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

fix object detection notebook example on dataset fetch in build CI and improve header documentation #2424

Merged
merged 1 commit into from
Jul 5, 2023

Conversation

imatiach-msft
Copy link
Contributor

@imatiach-msft imatiach-msft commented Jul 3, 2023

Description

The object detection notebook with RAI was just merged. When trying to add another notebook example, I found that the object detection notebook started failing when registering a dataset, because it was already registered in a previous run against the test workspace used:

HttpResponseError                         Traceback (most recent call last)
Cell In[8], line 13
      4 input_test_data = "MSCOCO_Test_MLTable_OD18"
      6 test_data = Data(
      7     path=data_path,
      8     type=AssetTypes.MLTABLE,
   (...)
     11     version=rai_example_version_string,
     12 )
---> 13 ml_client.data.create_or_update(test_data)
...
HttpResponseError: (UserError) A data version with this name and version already exists. If you are trying to create a new data version, use a different name or version. If you are trying to update an existing data version, the existing asset's data uri cannot be changed. Only tags, description, and isArchived can be updated.
Code: UserError

Link to build failure:
https://github.com/Azure/azureml-examples/actions/runs/5446414448/jobs/9907120291?pr=2423

To fix this build issue, the notebook should be following the logic of other notebooks, which is to have a try/except around the dataset fetch logic and simply get the dataset if it already exists in the test workspace instead of trying to add it.

In addition to the fix for the notebook CI test failures, I also added a title and documentation header at the top of the notebook similar to the other RAI notebooks to be consistent.

Checklist

@imatiach-msft imatiach-msft force-pushed the ilmat/fix-obj-detect-data-get branch from 2b44989 to 799f949 Compare July 3, 2023 17:56
@imatiach-msft imatiach-msft merged commit 66d1a3a into main Jul 5, 2023
9 checks passed
@imatiach-msft imatiach-msft deleted the ilmat/fix-obj-detect-data-get branch July 5, 2023 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants