fix: install rfdetr train extras in RF-DETR finetuning notebooks - #447
Merged
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Borda
approved these changes
Jul 15, 2026
There was a problem hiding this comment.
Pull request overview
Updates the RF-DETR finetuning notebooks’ dependency install cells so fresh Colab runs reliably install the correct RF-DETR version and the optional training/logging dependencies needed for training.
Changes:
- Quote the
rfdetr...>=...spec so>=is not misinterpreted by the shell as redirection. - Install
rfdetrwith[train,loggers]extras to include training dependencies required by newerrfdetrreleases. - Pin
supervisionto0.29.1to reduce notebook drift and match the pattern used elsewhere in the repo.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| notebooks/how-to-finetune-rf-detr-on-detection-dataset.ipynb | Fixes dependency installation to include RF-DETR training extras and pins supervision for stable Colab runs. |
| notebooks/how-to-finetune-rf-detr-on-segmentation-dataset.ipynb | Same dependency installation fix as detection notebook to ensure training works on fresh Colab. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On a fresh Colab run, the training cell in both RF-DETR finetuning notebooks fails:
Two causes:
rfdetrreleases (current: 1.8.3) moved training dependencies (pytorch_lightning,torchmetrics,pycocotools, etc.) into the optional[train]extra, so the plainrfdetrinstall can no longer train.!pip install -q rfdetr>=1.4.0 ...is unquoted, so the shell treats>=1.4.0as an output redirect — the version constraint was never actually applied and Colab always pulled the latest release.Fix
[train]restores the training dependencies;[loggers]matches the package's own error message and keeps default TensorBoard logging working outside Colab.>=1.4.0floor actually apply.supervisionis pinned to0.29.1, following the pattern in the newerrf-detr-keypoint-detection.ipynb, to prevent the same class of drift from the annotator API.Notebooks changed
notebooks/how-to-finetune-rf-detr-on-detection-dataset.ipynbnotebooks/how-to-finetune-rf-detr-on-segmentation-dataset.ipynbBoth verified end-to-end on fresh Colab runs (training now completes).
Note:
nvidia-launchables/how-to-finetune-rf-detr-on-segmentation-dataset-a100.ipynbstill pinsrfdetr==1.3.0(pre-extras split, so not broken today) — left untouched since updating it would need an A100 retest.