diff --git a/action.yml b/action.yml index 14eb85f..e1e06af 100644 --- a/action.yml +++ b/action.yml @@ -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" diff --git a/app.py b/app.py index 4d4fa24..5dacf0e 100644 --- a/app.py +++ b/app.py @@ -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) \ No newline at end of file