Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
PyCaret authored Jul 14, 2020
1 parent 95a0188 commit f362799
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
10 changes: 7 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@ name: "PyCaret AutoML Git Action"
description: "pycaret.classification"
author: "Moez Ali"
inputs:
myInput:
description: "Classification"
DATASET:
description: "Dataset for Training"
required: true
default: "target-variable"
default: "juice"
TARGET:
description: "Target variable"
required: true
default: "Purchase"
outputs:
myOutput:
description: "Output from the action"
Expand Down
11 changes: 6 additions & 5 deletions app.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
import os, ast
import pandas as pd

dataset_path = "https://raw.githubusercontent.com/" + os.environ["GITHUB_REPOSITORY"] +"/master/dataset.csv"
dataset = os.environ["INPUT_DATASET"]
target = os.environ["INPUT_TARGET"]

dataset_path = "https://raw.githubusercontent.com/" + os.environ["GITHUB_REPOSITORY"] + "/master/" + os.environ["INPUT_DATASET"] + '.csv'
data = pd.read_csv(dataset_path)
data.head()

target = os.environ["INPUT_MYINPUT"]

from pycaret.classification import *
clf1 = setup(data, target = target, session_id=123, silent=True, html=False, log_experiment=True, experiment_name='exp1')
clf1 = setup(data, target = target, session_id=123, silent=True, html=False, log_experiment=True, experiment_name='exp_github')

c = compare_models()

save_model(c, 'model')

logs_exp1 = get_logs(save=True)
logs_exp_github = get_logs(save=True)

0 comments on commit f362799

Please sign in to comment.