In train.py:
run.tag('run_type', value='training')In later step:
#Retrieve associated run, workspace and experiment
run = Run.get_context()In train.py:
run.tag('run_type', value='training')In later step:
#Retrieve associated run, workspace and experiment
run = Run.get_context()In train.py:
run.tag('run_type', value='training')In later step:
#Retrieve associated run, workspace and experiment
run = Run.get_context()| import os | |
| import pandas as pd | |
| from azureml.core import Workspace, Dataset | |
| # Connect to Workspace and reference Dataset | |
| ws = Workspace.from_config() | |
| dataset = ws.datasets["german-credit-train-tutorial"] | |
| # Create mountcontext and mount the dataset | |
| mount_ctx = dataset.mount() |
| # Get the HyperDriveStep of the pipeline by name (make sure only 1 exists) | |
| hd_step_run = HyperDriveStepRun(step_run=pipeline_run.find_step_run('hd_step01')[0]) | |
| # Get RunID for best run (we're lazy) | |
| best_run_id = hd_step_run.get_best_run_by_primary_metric().id | |
| # Get all hyperparameters that where tried | |
| hyperparameters = hd_step_run.get_hyperparameters() | |
| # Get all metrics for the runs |
Steps:
Feed Read permission (details)
trigger:| name: conda-env | |
| dependencies: | |
| - pip | |
| - pip: | |
| - --index-url https://xxxxx | |
| - --extra-index-url https://xxxxxx | |
| - xxxxxx==x.x.x | |
| - -e git+https://github.com/xxxxxxxxxxx | |
| - -e ./xxxxxxx |
| from azureml.core import Workspace, Model | |
| from azureml.core.model import InferenceConfig | |
| from azureml.core.environment import Environment | |
| from azureml.core.conda_dependencies import CondaDependencies | |
| ws = Workspace.from_config() | |
| env = Environment("inference-env") | |
| env.docker.enabled = True | |
| # Replace with your conda enviroment file |
| { | |
| "mode": "All", | |
| "policyRule": { | |
| "if": { | |
| "allOf": [ | |
| { | |
| "field": "type", | |
| "equals": "Microsoft.MachineLearningServices/workspaces/computes" | |
| }, | |
| { |
| import requests, json | |
| key = "xxxxx" # Paste your API key here | |
| url = "https://api.bing.microsoft.com/v7.0/search" | |
| search_term = "Azure Cognitive Services" | |
| headers = {"Ocp-Apim-Subscription-Key" : key} | |
| params = {"q": search_term, "textDecorations": True, "textFormat": "HTML"} |
| import requests | |
| import io | |
| import time | |
| n = 50 | |
| # Enter your resource details here | |
| url = "https://xxxxxxx.cognitiveservices.azure.com/vision/v3.2/read/analyze?language=en&pages=1&readingOrder=natural" | |
| key = "xxxxxxx" |