Skip to content

Instantly share code, notes, and snippets.

@korkridake
Created May 29, 2020 13:13
Show Gist options
  • Save korkridake/89efa34c3f4e611827d734536dc0ce7d to your computer and use it in GitHub Desktop.
Save korkridake/89efa34c3f4e611827d734536dc0ce7d to your computer and use it in GitHub Desktop.
MLOps Ep.4 Productionizing Training Script (Register a dataset in Azure Machine Learning Datastore)
# Get the datastore to upload prepared data
datastore = ws.get_default_datastore()
# Upload the local file from src_dir to the target_path in datastore
datastore.upload(src_dir='../aml-kaggle/datasets/', target_path='ds_regression')
# Create a dataset referencing the cloud location
dataset = Dataset.Tabular.from_delimited_files(datastore.path('ds_regression/autos.csv'))
# Register a dataset
dataset = dataset.register(workspace = ws,
name='ds_regression',
description='Datastore pattern for the regression tasks')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment