forked from pycaret/pycaret
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_create_docker.py
57 lines (42 loc) · 1.2 KB
/
test_create_docker.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import sys
import pytest
import pycaret.classification
import pycaret.datasets
import pycaret.regression
if sys.platform == "win32":
pytest.skip("Skipping test module on Windows", allow_module_level=True)
def test_classification_create_docker():
# loading dataset
data = pycaret.datasets.get_data("blood")
# initialize setup
pycaret.classification.setup(
data,
target="Class",
html=False,
n_jobs=1,
)
# train model
lr = pycaret.classification.create_model("lr")
# create api
pycaret.classification.create_api(lr, "blood_api")
pycaret.classification.create_docker("blood_api")
assert 1 == 1
def test_regression_create_docker():
# loading dataset
data = pycaret.datasets.get_data("boston")
# initialize setup
pycaret.regression.setup(
data,
target="medv",
html=False,
n_jobs=1,
)
# train model
lr = pycaret.regression.create_model("lr")
# create api
pycaret.regression.create_api(lr, "boston_api")
pycaret.regression.create_docker("boston_api")
assert 1 == 1
if __name__ == "__main__":
test_classification_create_docker()
test_regression_create_docker()