Skip to content

Commit 18ce675

Browse files
committed
bug fixes
1 parent a244b41 commit 18ce675

File tree

3 files changed

+10
-19
lines changed

3 files changed

+10
-19
lines changed

DockerizedAutoAD/automl_precompile.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ include(joinpath(pkgdir(AMLPipelineBase), "test", "runtests.jl"))
44
import AutoMLPipeline
55
include(joinpath(pkgdir(AutoMLPipeline), "test", "runtests.jl"))
66

7-
import AutoAI
7+
import AutoAD
88
include(joinpath(pkgdir(AutoAD), "test", "runtests.jl"))

DockerizedAutoAD/main.jl

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
using AutoAD: AutoMLFlowAnomalyDetections
2-
using Distributed
1+
using AutoAD
32
using ArgParse
43
using CSV
54
using DataFrames
6-
using AutoAI
75
using Statistics
6+
using AutoAD
87

98

109
function parse_commandline()
@@ -17,7 +16,7 @@ function parse_commandline()
1716
"--prediction_type", "-t"
1817
help = "timeseriesprediction, anomalydetection"
1918
arg_type = String
20-
default = "anomalydetecion"
19+
default = "anomalydetection"
2120
"--output_file", "-o"
2221
help = "output location"
2322
arg_type = String
@@ -37,24 +36,15 @@ function parse_commandline()
3736
return parse_args(s; as_symbols=true)
3837
end
3938

40-
const _cliargs = (; parse_commandline()...)
41-
#_cliargs = parse_commandline()
42-
const _workers = _cliargs[:workers]
43-
#_workers = _cliargs[:nworkers]
44-
45-
nprocs() == 1 && addprocs(_workers; exeflags=["--project=$(Base.active_project())"])
46-
47-
@everywhere using AutoAD
39+
const _cliargs = parse_commandline()
4840

4941
function autoadmode(args::Dict)
5042
url = args[:url]
51-
prediction_type = args[:prediction_type]
5243
votepercent = args[:votepercent]
53-
dictargs = (; votepercent, prediction_type) |> pairs |> Dict
5444
fname = args[:csvfile]
5545
df = CSV.read(fname, DataFrame)
5646
X = df[:, 1:1]
57-
autoad = AutoMLFlowAnomalyDetections(Dict(:url => url, dictargs...))
47+
autoad = AutoMLFlowAnomalyDetection(Dict(:url => url, :impl_args=>Dict(:votepercent=>votepercent)))
5848
Yc = fit_transform!(autoad, X)
5949
println("output:", Yc |> x -> first(x, 5))
6050
return Yc
@@ -68,9 +58,9 @@ function main(args)
6858
if predtype == "anomalydetection"
6959
autoadmode(args)
7060
elseif predtype == "timeseriesprediction"
71-
autotsmode(_cliargs)
72-
elseif predtype == "anomalydetection"
73-
autoadmode(_cliargs)
61+
autotsmode(args)
62+
else
63+
@error "check cli arguments: $args"
7464
end
7565
end
7666

DockerizedAutoAD/run.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ docker run -it --rm --platform=linux/amd64 automlad
55
# julia --project -- ./main.jl -c low -t classification -f 3 -w 3 iris.csv
66
# julia --project -- ./main.jl -c low -t anomalydetection iris.csv
77
# podman run -it --rm --platform=linux/amd64 localhost/automlai -u http://spendor2.sl.cloud9.ibm.com:30412 iris.csv
8+
podman run -it --rm --platform=linux/amd64 localhost/automlad -u http://spendor3.sl.cloud9.ibm.com:30412 ../AutoAD/data/node_cpu_ratio_rate_5m_1d_1m.csv

0 commit comments

Comments
 (0)