Update tutorial dependencies and conversion notebooks#93
Conversation
klemen1999
left a comment
There was a problem hiding this comment.
General comments:
- We should keep some outputs of the cells commited so it's quicker to see what's happening. Basically cells that had output visible before should have it now as well
- We should always use the latest hubai-sdk because this is actively being adjusted based on the underlying REST API from Hub. This means that we shouldn't have it pinned anywhere (just leave it at
pip install -U hubai-sdkfor example) , we should just in code make sure that we are passing parameters, calling functions, etc that work with current latest HubAI SDK
There was a problem hiding this comment.
Nitpick: Let's adjust this "Run this cell locally with an OAK / RVC2 Luxonis device connected." to "Run this cell locally with an OAK Luxonis device connected."
Because example also works for RVC4 devices (if you switch to a different model) so we can make the error more generic
There was a problem hiding this comment.
Change the "DepthAI Script" script so that this check
if DEVICE is None and not available_devices:
raises an error instead of wrapping everything in if/else block. What is then below this code can be out of the else since if "if" gets triggered program stops immediately
There was a problem hiding this comment.
Same nitpicks as mentioned in the "pytorch_conversion.ipynb"
There was a problem hiding this comment.
Let's bump up the DataDreamer version to 0.2.3 as well. This has to be done for all of the DataDreamer notebooks
Purpose
Update tutorial dependency pins for the HubAI SDK / DepthAI / Luxonis package bump and fix the affected conversion notebooks so they remain reproducible with the updated package stack.
Reviewer guide
The main review areas are:
conversion/pytorch_conversion.ipynb: dependency alignment, HubAI SDK migration, artifact path handling, and runtime cleanup changes.conversion/onnx_conversion.ipynb: model asset download flow, standalone ONNX generation, NN Archive generation, HubAI SDK migration, and DepthAI runtime path handling.conversion/nvidia_tao_conversion.ipynb: dependency bump and HubAI SDK migration. Full TAO export was not run end-to-end because it requires Docker / NGC authentication and TAO runtime setup.training/**: mostly mechanical dependency pin bumps.training/train_detection_model.ipynbwas used as the representative training validation notebook.Specification
This PR updates the relevant tutorial notebooks to the newer dependency pins, including:
luxonis-train==0.4.5luxonis-ml==0.8.5depthai==3.7.1depthai-nodes==0.5.1modelconv==0.5.5Main changes:
PyTorch conversion notebook
Updated
conversion/pytorch_conversion.ipynband fixed issues needed to run it reproducibly in a clean / Colab-style environment.Notable changes:
opset_version=18anddynamo=Falsefor RVC2 / OpenVINO Model Optimizer compatibility.output_dirandresponse.downloaded_path.ONNX conversion notebook
Updated
conversion/onnx_conversion.ipynband fixed reproducibility issues found while validating the notebook.Notable changes:
output_dirandresponse.downloaded_path.NVIDIA TAO conversion notebook
Updated
conversion/nvidia_tao_conversion.ipynb.Notable changes:
output_dirandresponse.downloaded_path.Training notebooks
Bumped dependency pins across the training notebooks.
The training changes were kept minimal and mechanical to avoid notebook output / metadata churn.
Dependencies & Potential Impact
This affects tutorial notebook dependencies and conversion / training tutorial execution.
Some flows still require external setup, such as:
The NVIDIA TAO tutorial was not validated end-to-end because the full TAO export flow requires Docker / NGC authentication and TAO runtime setup.
Deployment Plan
None / not applicable. This PR only updates tutorial notebooks.
Testing & Validation
Validation performed:
training/train_detection_model.ipynbwas validated in a fresh local environment through dataset creation, training, test, inference, and prediction visualization.AI Usage
Assisted-by: ChatGPT
Submitted code was reviewed by a human: YES
The author is taking the responsibility for the contribution: YES