Skip to content

Commit

Permalink
Rename utils to aml_utils
Browse files Browse the repository at this point in the history
  • Loading branch information
mariamedp committed Dec 2, 2021
1 parent 30bd64c commit 9ee53f9
Show file tree
Hide file tree
Showing 20 changed files with 18 additions and 15 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion operation/execution/build_batchinference_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from azureml.data.data_reference import DataReference
from msrest.exceptions import HttpOperationError

from utils import config, workspace, compute, pipeline
from aml_utils import config, workspace, compute, pipeline


def main(model_name, dataset_name, pipeline_name, compute_name, environment_path,
Expand Down
2 changes: 1 addition & 1 deletion operation/execution/build_training_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from azureml.pipeline.steps import PythonScriptStep
from azureml.core.runconfig import RunConfiguration

from utils import config, workspace, compute, pipeline
from aml_utils import config, workspace, compute, pipeline


def main(dataset_name, model_name, pipeline_name, compute_name, environment_path, pipeline_version=None):
Expand Down
2 changes: 1 addition & 1 deletion operation/execution/create_compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import argparse

from utils import workspace, compute
from aml_utils import workspace, compute


def main(name, config_path):
Expand Down
2 changes: 1 addition & 1 deletion operation/execution/deploy_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from azureml.core import Model

from utils import config, workspace, deployment
from aml_utils import config, workspace, deployment


def main(model_name, service_name, compute_config_file, environment_path, aks_target_name=None):
Expand Down
2 changes: 1 addition & 1 deletion operation/execution/register_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import argparse

from utils import workspace, dataset
from aml_utils import workspace, dataset


def main(dataset_name, datastore_name, data_path):
Expand Down
2 changes: 1 addition & 1 deletion operation/execution/run_batchinference_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from azureml.core import Experiment
from azureml.pipeline.core import PublishedPipeline

from utils import workspace, config
from aml_utils import workspace, config


def main(pipeline_name, pipeline_version, model_name, experiment_name):
Expand Down
2 changes: 1 addition & 1 deletion operation/execution/run_training_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from azureml.core import Experiment
from azureml.pipeline.core import PublishedPipeline

from utils import workspace, config
from aml_utils import workspace, config


def main(pipeline_name, pipeline_version, experiment_name):
Expand Down
4 changes: 3 additions & 1 deletion operation/execution/smoke_test_webservice.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

import argparse
from utils import workspace, webservice

from aml_utils import workspace, webservice


def main(webservice_name):
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/batch_score.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import joblib
from azureml.core import Dataset, Model

from utils import retrieve_workspace
from aml_utils import retrieve_workspace


def main(dataset_name, model_name, output_dir, output_file):
Expand Down
5 changes: 3 additions & 2 deletions src/evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
from azureml.core import Run, Model
from azureml.exceptions import WebserviceException

import utils
import aml_utils


def main(model_name):
"""Evaluate the model.
Expand All @@ -20,7 +21,7 @@ def main(model_name):
"""

pipeline_run = Run.get_context().parent # Will fail if offline run, evaluation is only supported in AML runs
ws = utils.retrieve_workspace()
ws = aml_utils.retrieve_workspace()

try:
# Retrieve latest model registered with same model_name
Expand Down
4 changes: 2 additions & 2 deletions src/snapshot_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from azureml.core import Datastore

import utils
import aml_utils


def main(datastore, data_path):
Expand All @@ -17,7 +17,7 @@ def main(datastore, data_path):
with open(os.path.join(data_path, 'data.csv'), 'w') as f:
f.write('column1,column2,column3\n1,2,3\n4,5,6\n7,8,9\n')

ws = utils.retrieve_workspace()
ws = aml_utils.retrieve_workspace()
datastore = Datastore(ws, name=datastore)
datastore.upload(
src_dir=data_path,
Expand Down
4 changes: 2 additions & 2 deletions src/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
from azureml.core import Run, Dataset
from azureml.core.run import _OfflineRun

import utils
import aml_utils


def main(dataset_name, model_name, output_dir):
run = Run.get_context()
ws = utils.retrieve_workspace()
ws = aml_utils.retrieve_workspace()

# Get dataset
dataset = Dataset.get_by_name(ws, name=dataset_name)
Expand Down

0 comments on commit 9ee53f9

Please sign in to comment.