Skip to content

Commit 1945500

Browse files
author
PyCaret
authored
update action based on pycaret==2.0
1 parent f362799 commit 1945500

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
name: "PyCaret AutoML Git Action"
2-
description: "pycaret.classification"
2+
description: "A simple example of AutoML created using PyCaret 2.0"
33
author: "Moez Ali"
44
inputs:
55
DATASET:
66
description: "Dataset for Training"
77
required: true
88
default: "juice"
99
TARGET:
10-
description: "Target variable"
10+
description: "Name of Target variable"
1111
required: true
1212
default: "Purchase"
1313
outputs:

app.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@
88
data = pd.read_csv(dataset_path)
99
data.head()
1010

11-
from pycaret.classification import *
12-
clf1 = setup(data, target = target, session_id=123, silent=True, html=False, log_experiment=True, experiment_name='exp_github')
11+
if type(target) is float:
12+
from pycaret.regression import *
13+
else:
14+
from pycaret.classification import *
15+
16+
exp1 = setup(data, target = target, session_id=123, silent=True, html=False, log_experiment=True, experiment_name='exp_github')
1317

1418
c = compare_models()
1519

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
pycaret-nightly==0.24
1+
pycaret==2.0

0 commit comments

Comments
 (0)