Skip to content

Commit

Permalink
examples: clean up notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
jtsextonMITRE committed Sep 18, 2024
1 parent ec2b04b commit 81ac8b2
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions examples/mnist-classifier-demo/demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,58 @@
"infer_jpeg = infer(experiment_id, queue_id, infer_ep, jpeg_comp_job, defense=True)"
]
},
{
"cell_type": "code",
"execution_count": 156,
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"text/plain": [
"'Job finished. Starting defense job.'"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"job_time_limit = '1h'\n",
"wait_for_job(fgm_job, 'defense')\n",
"jpeg_comp_job = client.experiments.create_jobs_by_experiment_id(\n",
" experiment_id,\n",
" f\"defense job for {experiment_id}\",\n",
" queue_id,\n",
" defense_ep,\n",
" {\n",
" \"job_id\": str(fgm_job['id']),\n",
" \"def_type\":\"gaussian_augmentation\"\n",
" }, # -1 means get the latest\n",
" job_time_limit\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 145,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'Job finished. Starting infer job.'"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"infer_jpeg = infer(experiment_id, queue_id, infer_ep, jpeg_comp_job, defense=True)"
]
},
{
"cell_type": "code",
"execution_count": 155,
Expand Down

0 comments on commit 81ac8b2

Please sign in to comment.