Skip to content

Commit

Permalink
[Vision sdk] ObjectDetection Notebook: update url, remove redundant p…
Browse files Browse the repository at this point in the history
…arams (#2538)

* update base_url to have forward slashes

* Remove redundant custom_pipeline_component_args from od notebook

* Revert "Remove redundant custom_pipeline_component_args from od notebook"

This reverts commit 8ba4de3.

* remove extra custom_pipeline_component_args variable
  • Loading branch information
vivek-dani authored Aug 7, 2023
1 parent cd60844 commit dc84d4a
Showing 1 changed file with 1 addition and 57 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,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",
"\n",
"!python coco2jsonl.py \\\n",
"--input_coco_file_path \"./odFridgeObjects_coco.json\" \\\n",
Expand Down Expand Up @@ -633,62 +633,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 import args\n",
" \"model_family\": \"MmDetectionImage\",\n",
" \"mlflow_model\": foundation_model,\n",
" # \"model_name\": mmdetection_model_name, # specify the model_name instead of mlflow_model if you want to use a model from the mmdetection model zoo\n",
"\n",
" # Finetune args\n",
" \"task_name\": \"image-object-detection\",\n",
" \"image_min_size\": -1,\n",
" \"image_max_size\": -1,\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_config_path,\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

0 comments on commit dc84d4a

Please sign in to comment.