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

Schema improvements for Interactive Jobs #2109

Merged
merged 2 commits into from
Mar 9, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
14 changes: 6 additions & 8 deletions cli/jobs/basics/hello-interactive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,15 @@ code: src
environment: azureml:AzureML-tensorflow-2.7-ubuntu20.04-py38-cuda11-gpu@latest
compute: azureml:cpu-cluster

services:
my_vscode:
services:
my_vscode:
job_service_type: vs_code
my_jupyter_lab:
my_jupyter_lab:
job_service_type: jupyter_lab
my_tensorboard:
job_service_type: tensor_board
properties:
logDir: "outputs/tblogs"
log_dir: "outputs/tblogs"
# my_ssh:
# job_service_type: tensor_board
# properties:
# sshPublicKeys: <paste the entire pub key content>
# nodes: all # Use the `nodes` property for a distributed job to run interactive services on all nodes. If `nodes` are not selected, by default, interactive applications are only enabled on the head node.
# ssh_public_keys: <paste the entire pub key content>
# nodes: all # Use the `nodes` property for a distributed job to run interactive services on all nodes. If `nodes` are not selected, by default, interactive applications are only enabled on the head node.
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,19 @@ jobs:
learning_rate_schedule: ${{parent.inputs.pipeline_job_learning_rate_schedule}}
outputs:
model_output: ${{parent.outputs.pipeline_job_trained_model}}
services:
my_vscode:
services:
my_vscode:
job_service_type: vs_code
my_jupyter_lab:
my_jupyter_lab:
job_service_type: jupyter_lab
my_tensorboard:
job_service_type: tensor_board
properties:
logDir: "outputs/tblogs"
log_dir: "outputs/tblogs"
# my_ssh:
# job_service_type: tensor_board
# properties:
# sshPublicKeys: <paste the entire pub key content>
# ssh_public_keys: <paste the entire pub key content>
# nodes: all # Use the `nodes` property to pick which node you want to enable interactive services on. If `nodes` are not selected, by default, interactive applications are only enabled on the head node.

score_job:
type: command
component: azureml:my_score@latest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@
},
"outputs": [],
"source": [
"from azure.ai.ml.entities import JobService, SshJobService, VsCodeJobService, TensorBoardJobService, JupyterLabJobService\n",
"\n",
"# create the command\n",
"job = command(\n",
" code=\"./src\", # local path where the code is stored\n",
Expand All @@ -129,22 +131,16 @@
" compute=\"cpu-cluster\",\n",
" display_name=\"debug-and-monitor-example\",\n",
" services={\n",
" \"My_jupyterlab\": JobService(\n",
" job_service_type=\"jupyter_lab\",\n",
" ),\n",
" \"My_vscode\": JobService(\n",
" job_service_type=\"vs_code\",\n",
" ),\n",
" \"My_tensorboard\": JobService(\n",
" job_service_type=\"tensor_board\",\n",
" \"My_jupyterlab\": JupyterLabJobService(),\n",
" \"My_vscode\": VsCodeJobService(),\n",
" \"My_tensorboard\": TensorBoardJobService(\n",
" properties={\n",
" \"logDir\": \"outputs/tblogs\" # relative path of Tensorboard logs (same as in your training script)\n",
" },\n",
" ),\n",
" # \"My_ssh\": JobService(\n",
" # job_service_type=\"ssh\",\n",
" # \"My_ssh\": SshJobService(\n",
" # nodes=\"all\", # For distributed jobs, use the `nodes` property to pick which node you want to enable interactive services on. If `nodes` are not selected, by default, interactive applications are only enabled on the head node. Values are \"all\", or compute node index (for ex. \"0\", \"1\" etc.)\n",
" # properties={\"sshPublicKeys\": \"<add-public-key>\"},\n",
" # ssh_public_keys=\"<add-public-key>\",\n",
" # ),\n",
" }\n",
" # experiment_name: debug-and-monitor-example\n",
Expand Down Expand Up @@ -221,4 +217,4 @@
},
"nbformat": 4,
"nbformat_minor": 4
}
}