Skip to content

Commit

Permalink
fix distributed tf notebook (#2509)
Browse files Browse the repository at this point in the history
  • Loading branch information
iamrk04 authored Jul 28, 2023
1 parent aee2192 commit 70cbba5
Showing 1 changed file with 19 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"name": "job",
"gather": {
"logged": 1634855420019
}
},
"name": "job"
},
"outputs": [],
"source": [
Expand All @@ -134,12 +134,12 @@
" compute=\"cpu-cluster\",\n",
" instance_count=2,\n",
" # distribution = {\"type\": \"mpi\", \"process_count_per_instance\": 1},\n",
" distribution={\n",
" \"type\": \"tensorflow\",\n",
" \"parameter_server_count\": 1,\n",
" \"worker_count\": 2,\n",
" \"added_property\": 7,\n",
" },\n",
" # distribution={\n",
" # \"type\": \"tensorflow\",\n",
" # \"parameter_server_count\": 1, # for legacy TensorFlow 1.x\n",
" # \"worker_count\": 2,\n",
" # \"added_property\": 7,\n",
" # },\n",
" # distribution = {\n",
" # \"type\": \"pytorch\",\n",
" # \"process_count_per_instance\": 4,\n",
Expand All @@ -151,7 +151,7 @@
")\n",
"\n",
"# can also set the distribution in a separate step and using the typed objects instead of a dict\n",
"job.distribution = TensorFlowDistribution(parameter_server_count=1, worker_count=2)"
"job.distribution = TensorFlowDistribution(worker_count=2)"
]
},
{
Expand Down Expand Up @@ -183,6 +183,16 @@
"returned_job = ml_client.create_or_update(job)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Wait until the job completes\n",
"ml_client.jobs.stream(returned_job.name)"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down

0 comments on commit 70cbba5

Please sign in to comment.