Skip to content

Commit 4d82f52

Browse files
committed
fix errors and add tests
1 parent cfec963 commit 4d82f52

File tree

5 files changed

+74
-5
lines changed

5 files changed

+74
-5
lines changed

AutoTS/CondaPkg.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[deps]
2+
pycaret = "3.3.*"
3+
python = "3.11.*"
4+
mlflow = ""
5+
requests = ""

AutoTS/Project.toml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,45 @@ name = "AutoTS"
22
uuid = "9f9003ca-5fd1-4e14-9a26-1226c8bf687b"
33
version = "0.1.0"
44
authors = ["Paulito Palmes, PhD <[email protected]>"]
5+
6+
[deps]
7+
AMLPipelineBase = "e3c3008a-8869-4d53-9f34-c96f99c8a2b6"
8+
ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63"
9+
AutoMLPipeline = "08437348-eef5-4817-bc1b-d4e9459680d6"
10+
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
11+
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
12+
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
13+
PDFmerger = "3beb2ed1-af7d-458f-b727-6e9beb3586c0"
14+
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
15+
PythonCall = "6099a3de-0909-46bc-b1f4-468b9a2dfc0d"
16+
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
17+
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
18+
Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
19+
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
20+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
21+
22+
[compat]
23+
AMLPipelineBase = "0.1.18"
24+
ArgParse = "1.2.0"
25+
AutoMLPipeline = "0.4.7"
26+
CSV = "0.10.15"
27+
DataFrames = "1.8.1"
28+
Distributed = "1.11.0"
29+
PDFmerger = "0.3.3"
30+
Plots = "1.41.2"
31+
PythonCall = "0.9.30"
32+
Random = "1.11.0"
33+
Reexport = "1.2.2"
34+
Serialization = "1.11.0"
35+
Statistics = "1.11.1"
36+
Test = "1.11.0"
37+
julia = "1.6"
38+
39+
[extras]
40+
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
41+
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
42+
Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
43+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
44+
45+
[test]
46+
test = ["DataFrames", "Distributed", "Serialization", "Test"]

AutoTS/src/AutoTS.jl

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,28 @@ module AutoTS
22

33
greet() = print("Hello World!")
44

5+
include("./main.jl")
6+
7+
using Reexport
8+
@reexport using AutoMLPipeline
9+
@reexport using AMLPipelineBase
10+
11+
using CSV
12+
using DataFrames
13+
using AMLPipelineBase.AbsTypes
14+
export fit, fit!, transform, transform!, fit_transform, fit_transform!
15+
import AMLPipelineBase.AbsTypes: fit!, transform!, fit, transform
16+
using AMLPipelineBase: AbsTypes, Utils
17+
18+
export get_iris
19+
20+
function get_iris()
21+
iris = CSV.read(joinpath(Base.@__DIR__, "../../data", "iris.csv"), DataFrame)
22+
return iris
23+
end
24+
25+
# -----------------------
26+
527
include("carettspredictor.jl")
628
using .CaretTSPredictors
729
export CaretTSPredictor, carettsdriver

AutoTS/src/main.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using AutoAD
1+
using AutoTS
22
using ArgParse
33
using CSV
44
using DataFrames
@@ -44,7 +44,7 @@ function doprediction_only(args::Dict)
4444
run_id = args[:runid]
4545
url = args[:url]
4646
predtype = args[:prediction_type]
47-
mlf=AutoMLFlowTSPrediction((Dict(:rund_id=>run_id,:url=>url)))
47+
mlf = AutoMLFlowTSPrediction((Dict(:rund_id => run_id, :url => url)))
4848
Yn = transform!(mlf, X)
4949
ofile = args[:output_file]
5050
if ofile != "NONE"
@@ -58,12 +58,12 @@ end
5858

5959
function dotrainandpredict(args::Dict)
6060
url = args[:url]
61-
learner=args[:learner]
61+
learner = args[:learner]
6262
forecast_horizon = args[:forecast_horizon]
6363
fname = args[:csvfile]
6464
df = CSV.read(fname, DataFrame)
6565
X = df[:, 1:1]
66-
autots = AutoMLFlowTSPrediction(Dict(:url => url, :impl_args=>Dict(:forecast_horizon=>forecast_horizon,:learner=>learner)))
66+
autots = AutoMLFlowTSPrediction(Dict(:url => url, :impl_args => Dict(:forecast_horizon => forecast_horizon, :learner => learner)))
6767
Yc = fit_transform!(autots, X)
6868
println("output:", Yc |> x -> first(x, 5))
6969
return Yc

AutoTS/test/test_caret_tspredictor.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module TestCaretTSPredictor
22
using Distributed
33
using Test
4-
using AutoAD
4+
using AutoTS
55
using DataFrames: DataFrame
66
using Serialization
77

0 commit comments

Comments
 (0)