This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $schema: https://azuremlschemas.azureedge.net/latest/pipelineJob.schema.json | |
| type: pipeline | |
| experiment_name: aml_pipeline_cli | |
| compute: azureml:cluster-cpu | |
| inputs: | |
| data_dir: | |
| path: azureml:data-fashion-mnist@latest | |
| type: uri_folder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json | |
| name: component_pipeline_cli_train | |
| version: 3 | |
| type: command | |
| inputs: | |
| data_dir: | |
| type: uri_folder | |
| outputs: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Schema Reference: https://learn.microsoft.com/en-us/azure/machine-learning/reference-yaml-deployment-managed-online?view=azureml-api-2 | |
| $schema: https://azuremlschemas.azureedge.net/latest/managedOnlineDeployment.schema.json | |
| name: blue | |
| endpoint_name: endpoint-command-cli | |
| model: azureml:model-command-cli@latest | |
| instance_type: Standard_DS3_v2 | |
| instance_count: 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Standard command. | |
| az ml job create -f cloud/azureml-create-command-job-inline-env.yml | |
| # Once the job finishes training the model, if we want to register the model for example, that requires a reference to the job instance. In that case: | |
| run_id=$(az ml job create -f cloud/azureml-create-command-job-inline-env.yml --query name -o tsv) | |
| # az ml job reference: https://learn.microsoft.com/en-us/cli/azure/ml/job?view=azure-cli-latest#az-ml-job-create | |
| # Register the model using the run_id: | |
| az ml model create --name model-command-cli --path "azureml://jobs/$run_id/outputs/model" --type mlflow_model |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Upload data from local folder (or remote path) | |
| az ml data create -f cloud/azureml-upload-local-folder.yml | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $schema: https://azuremlschemas.azureedge.net/latest/amlCompute.schema.json | |
| type: amlcompute | |
| name: cluster-cpu | |
| size: STANDARD_DS3_v2 | |
| min_instances: 0 | |
| max_instances: 2 | |
| idle_time_before_scale_down: 600 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Check if you're already logged in | |
| az account show | |
| # Interactive login | |
| az login | |
| # Interactive login with device code | |
| az login --use-device-code | |
| # Sign in with a system-assigned managed identity |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| To install Azure CLI and its ML extension on your local machine, follow these links: | |
| - Install the Azure CLI by following the instructions in the documentation (https://docs.microsoft.com/en-us/cli/azure/install-azure-cli). | |
| - Install the ML extension to the Azure CLI by following the "Installation" section of the documentation (https://docs.microsoft.com/en-us/azure/machine-learning/how-to-configure-cli). | |
| CLI (v2) core YAML syntax: | |
| https://learn.microsoft.com/en-us/azure/machine-learning/reference-yaml-core-syntax?view=azureml-api-2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # %% | |
| """ | |
| This script demonstrates how to use the `find_best_split_seed` function from the `find_robust_seed` package | |
| implemented in the https://github.com/lucazav/Robust-Multi-Objective-Optimization-for-Train-Test-Splits repository | |
| to identify the most stable random seed for train-test splits. The goal is to ensure that the training | |
| and test datasets maintain the statistical properties of the original dataset. | |
| Key Features: | |
| - Loads and cleans a dataset (Fish Market) using PyJanitor for column name normalization. | |
| - Uses `find_best_split_seed` to evaluate multiple random seeds and find the most robust split. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Conda environment specification. The dependencies defined in this file will | |
| # be automatically provisioned for runs with userManagedDependencies=False. | |
| # Details about the Conda environment file format: | |
| # https://conda.io/docs/user-guide/tasks/manage-environments.html#create-env-file-manually | |
| name: azureml_scoring_env | |
| dependencies: | |
| # The python interpreter version. | |
| # Currently Azure ML only supports 3.5.2 and later. |
NewerOlder