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

[Vision sdk] ObjectDetection Notebook: update url, remove redundant params #2538

Merged
merged 5 commits into from
Aug 7, 2023
Merged
Changes from 4 commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@
"outputs": [],
"source": [
"# Generate jsonl file from coco file\n",
"base_url = os.path.join(uri_folder_data_asset.path, \"images\", '')\n",
"base_url = uri_folder_data_asset.path + \"/images/\"\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not to use os.path.join. That would be more safe, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

os.path.join is for local system files. We are editing azureml url, which is more like web-url. The slashes are forward slashes only, in case of web-url.

"\n",
"!python coco2jsonl.py \\\n",
"--input_coco_file_path \"./odFridgeObjects_coco.json\" \\\n",
Expand Down Expand Up @@ -613,63 +613,6 @@
"print(f\"Finetuning model {use_model_name}\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# One can provide values to training args specified in pipeline component as a dictionary as shown below.\n",
"# In this case, user specified values will be respected.\n",
"\n",
"custom_pipeline_component_args = {\n",
" # model_selection_args\n",
" \"model_family\": \"MmDetectionImage\",\n",
" # # specify the model_name instead of mlflow_model if you want to use a model from the mmdetection model zoo\n",
" \"mlflow_model\": foundation_model,\n",
" # \"model_name\": mmdetection_model_name,\n",
" # finetune_args\n",
" # # \"auto_hyperparameter_selection\": False,\n",
" \"image_min_size\": -1,\n",
" \"image_max_size\": -1,\n",
" \"task_name\": \"image-object-detection\",\n",
" \"metric_for_best_model\": \"mean_average_precision\",\n",
" \"apply_augmentations\": True,\n",
" \"number_of_workers\": 8,\n",
" \"apply_deepspeed\": False,\n",
" \"deepspeed_config\": \"./deepspeed_configs/zero1.json\",\n",
" \"apply_ort\": False,\n",
" \"number_of_epochs\": 15,\n",
" \"max_steps\": -1,\n",
" \"training_batch_size\": 4,\n",
" \"validation_batch_size\": 4,\n",
" \"auto_find_batch_size\": False,\n",
" \"learning_rate\": 5e-5,\n",
" \"learning_rate_scheduler\": \"warmup_linear\",\n",
" \"warmup_steps\": 0,\n",
" \"optimizer\": \"adamw_hf\",\n",
" \"weight_decay\": 0.0,\n",
" \"extra_optim_args\": \"\",\n",
" \"gradient_accumulation_step\": 1,\n",
" \"precision\": \"32\",\n",
" \"iou_threshold\": 0.5,\n",
" \"box_score_threshold\": 0.3,\n",
" \"random_seed\": 42,\n",
" \"evaluation_strategy\": \"epoch\",\n",
" \"evaluation_steps\": 500,\n",
" \"logging_strategy\": \"epoch\",\n",
" \"logging_steps\": 500,\n",
" \"save_strategy\": \"epoch\",\n",
" \"save_steps\": 500,\n",
" \"save_total_limit\": -1,\n",
" \"early_stopping\": False,\n",
" \"early_stopping_patience\": 1,\n",
" \"max_grad_norm\": 1.0,\n",
" \"resume_from_checkpoint\": False,\n",
" \"save_as_mlflow_model\": True,\n",
"}"
]
},
{
"attachments": {},
"cell_type": "markdown",
Expand Down