Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove duplicate codes in classical/aml-cli-v2 #145

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 0 additions & 37 deletions classical/aml-cli-v2/data-science/src/prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,42 +47,11 @@
"vendor",
]

CAT_ORD_COLS = [
]
TARGET_COL = "cost"

NUMERIC_COLS = [
"distance",
"dropoff_latitude",
"dropoff_longitude",
"passengers",
"pickup_latitude",
"pickup_longitude",
"pickup_weekday",
"pickup_month",
"pickup_monthday",
"pickup_hour",
"pickup_minute",
"pickup_second",
"dropoff_weekday",
"dropoff_month",
"dropoff_monthday",
"dropoff_hour",
"dropoff_minute",
"dropoff_second",
]

CAT_NOM_COLS = [
"store_forward",
"vendor",
]

CAT_ORD_COLS = [
]

def parse_args():
'''Parse input arguments'''
'''Parse input arguments'''

parser = argparse.ArgumentParser("prep")
parser.add_argument("--raw_data", type=str, help="Path to raw data")
Expand All @@ -102,8 +71,6 @@ def log_training_data(df, table_name):
collector = Online_Collector(table_name)
collector.batch_collect(df)

def main(args):
'''Read, split, and save datasets'''
def main(args):
'''Read, split, and save datasets'''

Expand All @@ -127,15 +94,11 @@ def main(args):
train = data[msk_train]
val = data[msk_val]
test = data[msk_test]
test = data[msk_test]

mlflow.log_metric('train size', train.shape[0])
mlflow.log_metric('val size', val.shape[0])
mlflow.log_metric('test size', test.shape[0])

train.to_parquet((Path(args.train_data) / "train.parquet"))
val.to_parquet((Path(args.val_data) / "val.parquet"))
test.to_parquet((Path(args.test_data) / "test.parquet"))
train.to_parquet((Path(args.train_data) / "train.parquet"))
val.to_parquet((Path(args.val_data) / "val.parquet"))
test.to_parquet((Path(args.test_data) / "test.parquet"))
Expand Down
1 change: 0 additions & 1 deletion classical/aml-cli-v2/mlops/azureml/train/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
$schema: https://azuremlschemas.azureedge.net/latest/pipelineJob.schema.json
type: pipeline
experiment_name: taxi-fare-training
experiment_name: taxi-fare-training
description: Training Pipeline to train a model that predicts taxi fare price

# <inputs_and_outputs>
Expand Down