3lc-compute-plugin-rf-detr 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 3lc_compute_plugin_rf_detr-0.2.1/.github/workflows/ci.yml +78 -0
- 3lc_compute_plugin_rf_detr-0.2.1/.github/workflows/release.yml +138 -0
- 3lc_compute_plugin_rf_detr-0.2.1/.gitignore +13 -0
- 3lc_compute_plugin_rf_detr-0.2.1/CHANGELOG.md +201 -0
- 3lc_compute_plugin_rf_detr-0.2.1/LICENSE +201 -0
- 3lc_compute_plugin_rf_detr-0.2.1/PKG-INFO +47 -0
- 3lc_compute_plugin_rf_detr-0.2.1/README-wheel.md +26 -0
- 3lc_compute_plugin_rf_detr-0.2.1/README.md +90 -0
- 3lc_compute_plugin_rf_detr-0.2.1/catalog.json +54 -0
- 3lc_compute_plugin_rf_detr-0.2.1/pyproject.toml +119 -0
- 3lc_compute_plugin_rf_detr-0.2.1/scripts/release_version.py +97 -0
- 3lc_compute_plugin_rf_detr-0.2.1/src/tlc_plugin_rf_detr/__init__.py +410 -0
- 3lc_compute_plugin_rf_detr-0.2.1/src/tlc_plugin_rf_detr/_instance_reduce.py +224 -0
- 3lc_compute_plugin_rf_detr-0.2.1/src/tlc_plugin_rf_detr/_rolling_writer.py +133 -0
- 3lc_compute_plugin_rf_detr-0.2.1/src/tlc_plugin_rf_detr/data_module.py +372 -0
- 3lc_compute_plugin_rf_detr-0.2.1/src/tlc_plugin_rf_detr/dataset.py +364 -0
- 3lc_compute_plugin_rf_detr-0.2.1/src/tlc_plugin_rf_detr/embeddings.py +223 -0
- 3lc_compute_plugin_rf_detr-0.2.1/src/tlc_plugin_rf_detr/models/__init__.py +34 -0
- 3lc_compute_plugin_rf_detr-0.2.1/src/tlc_plugin_rf_detr/models/base.py +53 -0
- 3lc_compute_plugin_rf_detr-0.2.1/src/tlc_plugin_rf_detr/models/rfdetr.py +1224 -0
- 3lc_compute_plugin_rf_detr-0.2.1/src/tlc_plugin_rf_detr/plugin.toml +44 -0
- 3lc_compute_plugin_rf_detr-0.2.1/src/tlc_plugin_rf_detr/postprocess.py +155 -0
- 3lc_compute_plugin_rf_detr-0.2.1/src/tlc_plugin_rf_detr/project_store.py +107 -0
- 3lc_compute_plugin_rf_detr-0.2.1/src/tlc_plugin_rf_detr/routes.py +151 -0
- 3lc_compute_plugin_rf_detr-0.2.1/src/tlc_plugin_rf_detr/runtime.py +38 -0
- 3lc_compute_plugin_rf_detr-0.2.1/src/tlc_plugin_rf_detr/task_detection.py +96 -0
- 3lc_compute_plugin_rf_detr-0.2.1/src/tlc_plugin_rf_detr/trainer.py +1120 -0
- 3lc_compute_plugin_rf_detr-0.2.1/src/tlc_plugin_rf_detr/ui.html +1328 -0
- 3lc_compute_plugin_rf_detr-0.2.1/tests/test_image_loading.py +69 -0
- 3lc_compute_plugin_rf_detr-0.2.1/tests/test_inline_project_config.py +45 -0
- 3lc_compute_plugin_rf_detr-0.2.1/tests/test_label_space.py +42 -0
- 3lc_compute_plugin_rf_detr-0.2.1/tests/test_metric_naming.py +48 -0
- 3lc_compute_plugin_rf_detr-0.2.1/tests/test_per_sample_loss.py +96 -0
- 3lc_compute_plugin_rf_detr-0.2.1/tests/test_project_store_times.py +43 -0
- 3lc_compute_plugin_rf_detr-0.2.1/tests/test_release_version.py +72 -0
- 3lc_compute_plugin_rf_detr-0.2.1/tests/test_run_data.py +34 -0
- 3lc_compute_plugin_rf_detr-0.2.1/tests/test_run_job_events.py +232 -0
- 3lc_compute_plugin_rf_detr-0.2.1/tests/test_table_transitions_ui.py +100 -0
- 3lc_compute_plugin_rf_detr-0.2.1/tests/test_task_detection.py +79 -0
- 3lc_compute_plugin_rf_detr-0.2.1/uv.lock +5519 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches: [main]
|
|
6
|
+
push:
|
|
7
|
+
branches: [main]
|
|
8
|
+
workflow_call: # reused as the gate by release.yml
|
|
9
|
+
|
|
10
|
+
concurrency:
|
|
11
|
+
group: ci-${{ github.ref }}
|
|
12
|
+
cancel-in-progress: true
|
|
13
|
+
|
|
14
|
+
# pyproject.toml routes the unreleased plugin SDK to its explicit `staging` index; uv applies
|
|
15
|
+
# these credentials to that index by name. Everything else resolves from PyPI.
|
|
16
|
+
env:
|
|
17
|
+
UV_INDEX_STAGING_USERNAME: ${{ secrets.CLOUDREPO_READ_USERNAME || secrets.CLOUDREPO_USERNAME }}
|
|
18
|
+
UV_INDEX_STAGING_PASSWORD: ${{ secrets.CLOUDREPO_READ_PASSWORD || secrets.CLOUDREPO_PASSWORD }}
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
ruff:
|
|
22
|
+
name: ruff (lint + format)
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v4
|
|
26
|
+
|
|
27
|
+
- name: Install uv
|
|
28
|
+
uses: astral-sh/setup-uv@v5
|
|
29
|
+
with:
|
|
30
|
+
version: "0.8.15"
|
|
31
|
+
|
|
32
|
+
# Ruff runs STANDALONE (uvx): linting must not require resolving the per-plugin
|
|
33
|
+
# dependency stacks — that would be slow and need extra indexes. Config lives in
|
|
34
|
+
# pyproject [tool.ruff]; pin matches 3lc-compute-plugin-sdk.
|
|
35
|
+
- name: Ruff lint
|
|
36
|
+
run: uvx --from 'ruff>=0.15,<0.16' ruff check .
|
|
37
|
+
|
|
38
|
+
- name: Ruff format check
|
|
39
|
+
run: uvx --from 'ruff>=0.15,<0.16' ruff format --check .
|
|
40
|
+
|
|
41
|
+
lockfile:
|
|
42
|
+
name: lockfile check
|
|
43
|
+
runs-on: ubuntu-latest
|
|
44
|
+
steps:
|
|
45
|
+
- uses: actions/checkout@v4
|
|
46
|
+
|
|
47
|
+
- name: Install uv
|
|
48
|
+
uses: astral-sh/setup-uv@v5
|
|
49
|
+
with:
|
|
50
|
+
version: "0.8.15"
|
|
51
|
+
|
|
52
|
+
- name: Verify lockfile is up to date
|
|
53
|
+
run: uv lock --check
|
|
54
|
+
|
|
55
|
+
test:
|
|
56
|
+
name: pytest
|
|
57
|
+
runs-on: ubuntu-latest
|
|
58
|
+
steps:
|
|
59
|
+
- uses: actions/checkout@v4
|
|
60
|
+
|
|
61
|
+
- name: Install uv
|
|
62
|
+
uses: astral-sh/setup-uv@v5
|
|
63
|
+
with:
|
|
64
|
+
version: "0.8.15"
|
|
65
|
+
|
|
66
|
+
- name: Set up Python
|
|
67
|
+
uses: actions/setup-python@v5
|
|
68
|
+
with:
|
|
69
|
+
python-version: "3.12"
|
|
70
|
+
|
|
71
|
+
- name: Install base deps + dev group
|
|
72
|
+
run: uv sync --locked --group dev
|
|
73
|
+
|
|
74
|
+
- name: Check distribution and manifest versions
|
|
75
|
+
run: uv run --no-sync python scripts/release_version.py
|
|
76
|
+
|
|
77
|
+
- name: Run tests
|
|
78
|
+
run: uv run --no-sync pytest -v tests/test_release_version.py
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
# Tag (`v*`) pushes publish to public PyPI via Trusted Publishing (GitHub OIDC, no secrets).
|
|
4
|
+
# To cut a release: bump `version` in pyproject.toml AND every plugin's plugin.toml (they move
|
|
5
|
+
# together — see CHANGELOG 0.1.2), regenerate uv.lock, update CHANGELOG.md, commit, then push
|
|
6
|
+
# a tag `vX.Y.Z` that matches the version.
|
|
7
|
+
#
|
|
8
|
+
# Manual runs build staged wheels for the private staging index. Publishing is an explicit input.
|
|
9
|
+
# Package and plugin-manifest versions are stamped together; staged builds never reach PyPI.
|
|
10
|
+
#
|
|
11
|
+
# NOTE: `uv build --no-sources` builds the plugin WHEEL only — it does not resolve or install
|
|
12
|
+
# the per-plugin dependency stacks. The wheel's metadata carries the SDK pin, resolved from
|
|
13
|
+
# the configured index at install time.
|
|
14
|
+
|
|
15
|
+
on:
|
|
16
|
+
push:
|
|
17
|
+
tags: ["v*"]
|
|
18
|
+
workflow_dispatch:
|
|
19
|
+
inputs:
|
|
20
|
+
publish:
|
|
21
|
+
description: Publish the verified staged build to the private staging index
|
|
22
|
+
type: boolean
|
|
23
|
+
default: false
|
|
24
|
+
|
|
25
|
+
jobs:
|
|
26
|
+
# Gate the release on the full CI suite (ruff · lockfile · pytest).
|
|
27
|
+
test:
|
|
28
|
+
uses: ./.github/workflows/ci.yml
|
|
29
|
+
secrets: inherit
|
|
30
|
+
|
|
31
|
+
# Tag (`v*`) pushes → the real release, to public PyPI.
|
|
32
|
+
publish-pypi:
|
|
33
|
+
if: github.event_name == 'push'
|
|
34
|
+
needs: test
|
|
35
|
+
runs-on: ubuntu-latest
|
|
36
|
+
environment: release
|
|
37
|
+
permissions:
|
|
38
|
+
contents: write # create the GitHub Release (step below)
|
|
39
|
+
id-token: write # OIDC token for PyPI Trusted Publishing
|
|
40
|
+
steps:
|
|
41
|
+
- uses: actions/checkout@v4
|
|
42
|
+
|
|
43
|
+
- name: Install uv
|
|
44
|
+
uses: astral-sh/setup-uv@v5
|
|
45
|
+
with:
|
|
46
|
+
version: "0.8.15"
|
|
47
|
+
|
|
48
|
+
- name: Verify tag matches pyproject version
|
|
49
|
+
run: |
|
|
50
|
+
PKG=$(uv version --frozen --output-format json | jq -r '.version')
|
|
51
|
+
TAG="${GITHUB_REF_NAME#v}"
|
|
52
|
+
echo "pyproject=$PKG tag=$TAG"
|
|
53
|
+
[ "$PKG" = "$TAG" ] || { echo "::error::tag $GITHUB_REF_NAME ($TAG) != pyproject version $PKG"; exit 1; }
|
|
54
|
+
|
|
55
|
+
- name: Verify plugin manifests match pyproject version
|
|
56
|
+
run: python scripts/release_version.py
|
|
57
|
+
|
|
58
|
+
# --no-sources strips [tool.uv.sources] so the released wheel never bakes in a dev
|
|
59
|
+
# index/path override (the published artifact resolves deps from PyPI).
|
|
60
|
+
- name: Build
|
|
61
|
+
run: |
|
|
62
|
+
uv build --no-sources
|
|
63
|
+
python scripts/release_version.py --wheel dist/*.whl
|
|
64
|
+
|
|
65
|
+
- name: Publish to PyPI
|
|
66
|
+
run: uv publish --trusted-publishing always
|
|
67
|
+
|
|
68
|
+
# Publish the tagged version's changelog section as a GitHub Release (curated notes,
|
|
69
|
+
# not GitHub's commit list). The Release stays editable after publish for touch-up.
|
|
70
|
+
- name: Extract changelog section
|
|
71
|
+
id: changelog
|
|
72
|
+
run: |
|
|
73
|
+
VER="${GITHUB_REF_NAME#v}"
|
|
74
|
+
awk -v v="$VER" '$0 ~ "^## \\[" v "\\]" {f=1; next} /^## \[/ && f {exit} f' \
|
|
75
|
+
CHANGELOG.md > notes.md
|
|
76
|
+
echo "ver=$VER" >> "$GITHUB_OUTPUT"
|
|
77
|
+
{ echo "notes<<EOF"; cat notes.md; echo EOF; } >> "$GITHUB_OUTPUT"
|
|
78
|
+
|
|
79
|
+
- name: Create GitHub Release
|
|
80
|
+
uses: softprops/action-gh-release@v2
|
|
81
|
+
with:
|
|
82
|
+
tag_name: ${{ github.ref_name }}
|
|
83
|
+
name: ${{ github.ref_name }}
|
|
84
|
+
body: |
|
|
85
|
+
${{ steps.changelog.outputs.notes }}
|
|
86
|
+
|
|
87
|
+
## Installation
|
|
88
|
+
Available in the 3LC Hub — open the plugin shop and install it with one click; the
|
|
89
|
+
Hub provisions it into its own isolated environment for you. See https://docs.3lc.ai.
|
|
90
|
+
draft: false
|
|
91
|
+
generate_release_notes: false
|
|
92
|
+
|
|
93
|
+
# Manual runs exercise the same build whether or not publishing is requested.
|
|
94
|
+
publish-cloudrepo-prerelease:
|
|
95
|
+
if: github.event_name == 'workflow_dispatch'
|
|
96
|
+
needs: test
|
|
97
|
+
runs-on: ubuntu-latest
|
|
98
|
+
environment: release
|
|
99
|
+
env:
|
|
100
|
+
UV_PUBLISH_URL: https://pypi.3lc.ai/repositories/prereleases
|
|
101
|
+
UV_PUBLISH_USERNAME: ${{ secrets.CLOUDREPO_USERNAME }}
|
|
102
|
+
UV_PUBLISH_PASSWORD: ${{ secrets.CLOUDREPO_PASSWORD }}
|
|
103
|
+
steps:
|
|
104
|
+
- uses: actions/checkout@v4
|
|
105
|
+
|
|
106
|
+
- name: Install uv
|
|
107
|
+
uses: astral-sh/setup-uv@v5
|
|
108
|
+
with:
|
|
109
|
+
version: "0.8.15"
|
|
110
|
+
|
|
111
|
+
- name: Verify the 'release' environment is configured
|
|
112
|
+
if: inputs.publish
|
|
113
|
+
run: |
|
|
114
|
+
: "${UV_PUBLISH_USERNAME:?set the CLOUDREPO_USERNAME secret on the 'release' environment}"
|
|
115
|
+
: "${UV_PUBLISH_PASSWORD:?set the CLOUDREPO_PASSWORD secret on the 'release' environment}"
|
|
116
|
+
|
|
117
|
+
# UTC ordering matches existing staged snapshots; run/attempt distinguish concurrent builds.
|
|
118
|
+
- name: Stamp distribution and plugin manifest versions
|
|
119
|
+
run: |
|
|
120
|
+
BASE=$(uv version --frozen --output-format json | jq -r '.version')
|
|
121
|
+
STAGED_VERSION="${BASE}.$(date -u +%Y%m%d%H%M%S).${GITHUB_RUN_NUMBER}.${GITHUB_RUN_ATTEMPT}"
|
|
122
|
+
python scripts/release_version.py --stamp "$STAGED_VERSION"
|
|
123
|
+
|
|
124
|
+
- name: Build
|
|
125
|
+
run: |
|
|
126
|
+
uv build --no-sources
|
|
127
|
+
python scripts/release_version.py --wheel dist/*.whl
|
|
128
|
+
|
|
129
|
+
- name: Retain build artifacts
|
|
130
|
+
uses: actions/upload-artifact@v4
|
|
131
|
+
with:
|
|
132
|
+
name: rf-detr-poc-${{ github.run_number }}-${{ github.run_attempt }}
|
|
133
|
+
path: dist/*
|
|
134
|
+
if-no-files-found: error
|
|
135
|
+
|
|
136
|
+
- name: Publish to the staging index
|
|
137
|
+
if: inputs.publish
|
|
138
|
+
run: uv publish
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [Unreleased]
|
|
4
|
+
|
|
5
|
+
- Derive the output project when the primary table changes; keep same-project settings, reset defaults across projects with Undo, and preserve explicit saved presets.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Changed
|
|
9
|
+
|
|
10
|
+
- RF-DETR requires Compute Service 1.2.0 or later.
|
|
11
|
+
|
|
12
|
+
- Accepts plugin SDK 0.6 (`3lc-compute-plugin-sdk<0.7.0`), so the plugin's workers get SDK 0.6's
|
|
13
|
+
worker: a job's outcome survives a controller that disconnects or restarts mid-run.
|
|
14
|
+
#### Table fields
|
|
15
|
+
|
|
16
|
+
- **Train Table URL and Validation Table URL are the Hub's table field (`<tlc-table-field>`).** Browse…, or a
|
|
17
|
+
double-click in the empty field, opens Browse Tables, which opens at the field's table and tags the table the
|
|
18
|
+
other field holds. The fields keep their ids, so presets, the swap button and `oninput=` work as before. The
|
|
19
|
+
plugin needs Hub 1.2.0 (`min_frontend_version`).
|
|
20
|
+
|
|
21
|
+
#### Presets
|
|
22
|
+
|
|
23
|
+
- **The Config bar is the SDK's preset bar.** One line at the top of the form: a select with Default
|
|
24
|
+
settings and the saved presets (model, task and age in the label), Save as… that opens a prefilled
|
|
25
|
+
name field in the bar, and a trash icon that asks in the bar. The entry the form came from gains
|
|
26
|
+
"· modified" once the form differs; picking it again reverts. A preset is a template of the whole
|
|
27
|
+
form, tables included: picking one fills the form, only Save writes one, and **Train no longer saves
|
|
28
|
+
into the selected config**, so a setup kept as a reference stays as it was. The "Config Name" field
|
|
29
|
+
and "+ New", "Save New" and "Delete" are gone with the bar. Saved configs appear as presets as they
|
|
30
|
+
are; the config the old bar remembered opens once more, then the page opens as it was last left in
|
|
31
|
+
this browser.
|
|
32
|
+
- **Opened from a table**, the table replaces the preset's tables (a validation table it does not
|
|
33
|
+
cover is cleared) and stays while the page is open, also when another preset is picked.
|
|
34
|
+
- The run body's `project_config` carries the preset's `id` and `name` only while the form is
|
|
35
|
+
unchanged from it, so the job card can name it. Requires SDK 0.5.5.
|
|
36
|
+
|
|
37
|
+
#### Actions that cannot run yet
|
|
38
|
+
|
|
39
|
+
- **Start waits until a run can start, and says why.** It stays disabled until there is a train
|
|
40
|
+
table, the table has been read, and a model is chosen; the line under it and its tooltip name the
|
|
41
|
+
first thing missing ("Choose a train table to enable Start RF-DETR Training.", "Wait while the
|
|
42
|
+
train table is read to enable …", "Choose another train table to enable …: this one could not be
|
|
43
|
+
read."), with the label the button shows in Collect mode ("Start Collection"). It also waits for
|
|
44
|
+
the model list, and says so when no models could be loaded. While this page's job runs, the line
|
|
45
|
+
says "Wait for the running job to finish to enable …" (the tooltip said "A job is already running").
|
|
46
|
+
This replaces the "Please select…" alerts.
|
|
47
|
+
- **Swap ⇅ is disabled while both table fields are empty**, and says so in its tooltip.
|
|
48
|
+
- **The Train Table URL and Model are marked required** in the Hub's style: a red * on the label, and
|
|
49
|
+
a red wash while the train table field is empty.
|
|
50
|
+
- `/detect-task` answers a table that cannot be read with an `error` as well as its `details`.
|
|
51
|
+
|
|
52
|
+
#### Data movement
|
|
53
|
+
|
|
54
|
+
- **The manifest declares the data a run reads.** `[runtime] data_inputs` names the train and val
|
|
55
|
+
table URLs and the pretrain weights in the run body, so a Hub that plans data movement asks where
|
|
56
|
+
that data is for the chosen machine (this computer or a GPU node) before the run starts.
|
|
57
|
+
- **The "Read this data from somewhere else for this run" card.** It checked only the host's disk
|
|
58
|
+
and saved an alias override with the config, which then applied to every later run of that config;
|
|
59
|
+
it also called the SDK's override helper with the wrong arguments, so a saved override was never
|
|
60
|
+
shown again. The Hub's run dialog now asks where a table's data is when the target cannot find it,
|
|
61
|
+
and the SDK worker applies the answer around the job (DataLoader workers still re-register it).
|
|
62
|
+
An override saved with an older config is ignored.
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
### Fixed
|
|
66
|
+
- **Start stays disabled for a table RF-DETR cannot train.** A classification, pose or OBB train
|
|
67
|
+
table was detected as the task "unknown", Start stayed enabled, and the run failed once the model
|
|
68
|
+
had loaded. Start now says "Choose a detection or segmentation train table to enable Start RF-DETR
|
|
69
|
+
Training.", the detected task says what the table is ("This table's task is classification; …"),
|
|
70
|
+
and a run refuses such a table at once with that reason.
|
|
71
|
+
- **A run no longer sends the previous table's task.** When the train table changed, the task
|
|
72
|
+
detected for the table before stayed in the form until detection answered, and for good when it
|
|
73
|
+
failed, so a run started meanwhile sent it with the new table. The task is now cleared as soon as
|
|
74
|
+
the table changes, Start waits for the answer, and an answer for a table no longer in the field is
|
|
75
|
+
ignored.
|
|
76
|
+
- Predicted bounding box labels no longer come out shifted by one or more classes
|
|
77
|
+
against a COCO-format table (e.g. a `person` detected and written as `bicycle`).
|
|
78
|
+
Sparse label ids (real COCO category ids skip ~10 values) were compacted into a
|
|
79
|
+
dense `0..n-1` range for the model's classification head, which mismatches RF-DETR's
|
|
80
|
+
own pretrained-checkpoint convention of indexing classes by the raw label id
|
|
81
|
+
directly. The head is now sized to the raw id range instead, which is a no-op for
|
|
82
|
+
already-dense id spaces (YOLO-style tables) and only changes behavior for sparse
|
|
83
|
+
ones like COCO.
|
|
84
|
+
- Collect-only jobs (metrics collection with no training) now report ETA and per-batch
|
|
85
|
+
timing on the generic progress panel. Timing was previously derived only from
|
|
86
|
+
completed-epoch durations, which a collect-only job never produces, leaving ETA and
|
|
87
|
+
per-step permanently blank.
|
|
88
|
+
- Collect-batch progress updates now also fire on a wall-clock cadence (every ~2s), not
|
|
89
|
+
just every 5% of batches — on slow batches the fixed batch-count gate could leave the
|
|
90
|
+
progress bar and label frozen for minutes, reading as a stalled job.
|
|
91
|
+
- The plugin's own Queue & Progress card no longer flashes a stale "Epoch 0/0" (or a
|
|
92
|
+
previous job's last epoch) when a new job starts — the per-epoch label/bar/timing now
|
|
93
|
+
reset to a neutral placeholder immediately, before the first real progress event
|
|
94
|
+
arrives.
|
|
95
|
+
- Recording `last_run` on the saved config after a finished run is best-effort: it no longer
|
|
96
|
+
fails a completed job when the store has no such config.
|
|
97
|
+
|
|
98
|
+
#### Other changes
|
|
99
|
+
- Runs are created under the project root the job carries (`ctx.project_root_url`), not the
|
|
100
|
+
worker's configured root.
|
|
101
|
+
- Require plugin SDK `>=0.5.0,<0.6.0` and lock the private POC build.
|
|
102
|
+
- Resolve the plugin SDK from the explicit `staging` index declared in `pyproject.toml`; developers and CI
|
|
103
|
+
need only `UV_INDEX_STAGING_USERNAME` / `UV_INDEX_STAGING_PASSWORD`.
|
|
104
|
+
- Stamp and validate package and manifest versions together before publication.
|
|
105
|
+
- Manual builds publish only to private CloudRepo when explicitly requested.
|
|
106
|
+
- Remove the redundant SDK `[shared]` extra.
|
|
107
|
+
- Lock the staged 3lc 3.5.0.dev149866 and SDK 0.5.0.20261007121635.34.1; require the staged core
|
|
108
|
+
directly (`3lc>=3.5.0.dev149866,<4.0.0`) and resolve it from the `staging` index too.
|
|
109
|
+
The `[rf_detr]` extra's `3lc[pacmap,umap]` floor rises to match.
|
|
110
|
+
- Per-epoch scalar metrics are written under the shared YOLO / `tlc_ultralytics` naming
|
|
111
|
+
(`val/mAP_50` → `val_mAP50`, `val/mAP_50_95` → `val_mAP50-95`, `val/precision` →
|
|
112
|
+
`val_precision`, `val/recall` → `val_recall`) so an RF-DETR run and a YOLO run overlay on
|
|
113
|
+
one Dashboard chart axis. RF-DETR-only metrics (EMA variants, mAP@75, mAR, loss) keep the
|
|
114
|
+
same underscore style. Names align; the mAP is still COCO-protocol `faster_coco_eval`, not
|
|
115
|
+
the ultralytics validator, so cross-model curves are indicative, not a controlled benchmark.
|
|
116
|
+
- The job outcome now rides the generic job channel: the 3LC run URL is reported with
|
|
117
|
+
`ctx.result` as soon as the run is created (so the Queue & Progress card shows its **Open**
|
|
118
|
+
link during training, not only at the end), and failures propagate to the host, which
|
|
119
|
+
records the error text on the job. The plugin-private `job_completed` / `job_failed`
|
|
120
|
+
SocketIO events are gone; `job_status` and `epoch_progress` are unchanged.
|
|
121
|
+
- Invalid launches (unknown config, model not in the registry) fail with a clean user-facing
|
|
122
|
+
message on the job card instead of a Python exception string.
|
|
123
|
+
- The `PluginJobs` client is no longer injected by the plugin — the SDK's `/ui` handler
|
|
124
|
+
provides it.
|
|
125
|
+
|
|
126
|
+
### Added
|
|
127
|
+
- **Running-state on mount**: when the RF-DETR page is opened while one of its jobs is
|
|
128
|
+
queued or running, the page picks the job up from the host's job list, shows its progress,
|
|
129
|
+
Stop button and Open link, and re-attaches to its live updates — instead of an idle form
|
|
130
|
+
over a job that is very much alive. Launching is disabled until that job finishes.
|
|
131
|
+
- The Queue & Progress block on the page shows the job's final status (completed / failed /
|
|
132
|
+
cancelled) and, on failure, the error message in the log.
|
|
133
|
+
- The run body carries the frozen training config inline (`project_config`) and `run_job`
|
|
134
|
+
prefers it over the `project_id` store lookup, so a job is self-contained: a worker whose
|
|
135
|
+
store does not hold the config (a fresh machine) can still run it. The store lookup remains
|
|
136
|
+
the fallback for older fragments and direct API calls.
|
|
137
|
+
- Images whose URL is not a local path (`s3://`, `gs://`, `http(s)://`, or an alias resolving to
|
|
138
|
+
one) are read through `tlc.Url.read_bytes`, so training streams straight from a bucket with
|
|
139
|
+
no local copy of the data.
|
|
140
|
+
- The sidebar icon and the page hero carry Roboflow's own mark and wordmark.
|
|
141
|
+
|
|
142
|
+
## 0.2.0 — Ported to the 3LC compute plugin SDK
|
|
143
|
+
|
|
144
|
+
Full conversion of the old in-monorepo `hub-plugin_RF-DETR` (host-contract) plugin to a
|
|
145
|
+
standalone, venv-isolated SDK plugin, modeled on the YOLO plugin.
|
|
146
|
+
|
|
147
|
+
### Plugin-system conversion
|
|
148
|
+
- Repackaged `plugins/rf_detr/` → `src/tlc_plugin_rf_detr/`; added a `plugin.toml` manifest
|
|
149
|
+
(identity + `[ui]` + `[runtime]` with `isolation="venv"`, `provision_extra="rf_detr"`,
|
|
150
|
+
`requires_gpu`, `training`). Plugin id is now `rf-detr`.
|
|
151
|
+
- Rewrote `pyproject.toml`: SDK-floor base dep + `[rf_detr]` heavy extra, `pytorch-cu126` and
|
|
152
|
+
`3lc-prereleases` indexes, entry-point, wheel packaging, ruff config.
|
|
153
|
+
- Swapped the host base class (`tlc_compute.plugins.base`) for `tlc_plugin_sdk.ComputePlugin`;
|
|
154
|
+
removed `register()` and all class-attribute metadata (now in the manifest).
|
|
155
|
+
- Replaced the whole job-runner/GPU-queue architecture (`job_runner.py`, `get_active_jobs`,
|
|
156
|
+
`cancel_job`, `/train` `/queue` `/cancel` routes) with the unified `run_job(ctx)` contract —
|
|
157
|
+
the host owns the queue, cancel, and generic progress.
|
|
158
|
+
- Rewrote routes as module-level relative handlers (`get_route_handlers`), dropping the reserved
|
|
159
|
+
`/ui` collision and the host-owned lifecycle routes; async→sync handlers (they touch the SDK).
|
|
160
|
+
- UI: replaced the hand-rolled SocketIO connection and dead lifecycle routes with `PluginJobs`
|
|
161
|
+
(`run` / `cancel` / `on` on the `/rf-detr` namespace).
|
|
162
|
+
|
|
163
|
+
### Licensing
|
|
164
|
+
- Only the Apache-2.0 RF-DETR variants (Nano–Large) are exposed; removed the PML-1.0 "Plus"
|
|
165
|
+
XLarge/2XLarge variants from the model map and dropdown. Added a UI license notice.
|
|
166
|
+
|
|
167
|
+
### Fixes / cleanup
|
|
168
|
+
- **Embedding alignment**: predicted per-instance embeddings now use the exact keep-mask from
|
|
169
|
+
`postprocess_detections` (conf_thres AND max_det), so they are row-aligned with the predicted
|
|
170
|
+
boxes — previously the embedding gather applied conf_thres only (no max_det) and could
|
|
171
|
+
over-count.
|
|
172
|
+
- **UI mode toggle**: collect-mode field hiding used YOLO's param ids by mistake; replaced with a
|
|
173
|
+
robust allow-list of the fields that apply in collect mode.
|
|
174
|
+
- **Disconnected UI inputs**: removed the static Pretrained-URL / Copy-model / Worker-threads
|
|
175
|
+
controls that sent param names the backend ignored (`pretrained_model_url` / `copy_model_to_run`
|
|
176
|
+
/ `workers`) and duplicated the dynamic schema (`pretrain_weights`, `num_workers`).
|
|
177
|
+
- **Apple Silicon (MPS)**: device `auto` now detects CUDA → MPS → CPU; the CUDA-only auto-batch
|
|
178
|
+
probe is skipped on MPS/CPU (default batch size), and `torch.cuda.empty_cache()` is guarded.
|
|
179
|
+
- **Temp dirs**: RF-DETR's transient dataset/output dirs go under the plugin's `ctx.state_dir`
|
|
180
|
+
when available, instead of leaking into the OS temp dir.
|
|
181
|
+
- Pinned `rfdetr[train,loggers]>=1.6,<1.7` (the plugin reaches into rfdetr internals; a minor
|
|
182
|
+
bump can change them).
|
|
183
|
+
- Collection defaults aligned to the YOLO plugin (`conf_thres` 0.5 → 0.1).
|
|
184
|
+
|
|
185
|
+
### Embedding reducers & full-embedding retention
|
|
186
|
+
- **PCA** added to the instance-embeddings reducer (via scikit-learn), alongside UMAP and
|
|
187
|
+
PaCMAP. PCA allows arbitrary output dimensions; the image reducer offers UMAP and PaCMAP.
|
|
188
|
+
- **Separate instance-embeddings reducer** (`instance_embeddings_reducer`) instead of reusing
|
|
189
|
+
the image reducer for the instance/GT streams. Both default to UMAP.
|
|
190
|
+
- **Keep full embeddings**: new `image_embeddings_keep_full` / `instance_embeddings_keep_full`
|
|
191
|
+
toggles store the un-reduced (high-dim) embeddings in the metrics table alongside the reduced
|
|
192
|
+
2D/3D ones, row-aligned (same buffers). Off by default.
|
|
193
|
+
|
|
194
|
+
### Known follow-ups (not blocking)
|
|
195
|
+
- **MPS**, the **embedding-alignment** change, and the new **PCA / keep-full** write paths need a
|
|
196
|
+
live run on real hardware to confirm (no GPU/rfdetr/3lc runtime in the conversion environment) —
|
|
197
|
+
in particular that the full-embedding column schemas write cleanly via `MetricsTableWriter`.
|
|
198
|
+
- A handful of opinionated ruff rules (EM/RUF012/…) are scoped-ignored for the ported ML code
|
|
199
|
+
rather than churned; revisit on refactor.
|
|
200
|
+
- Publish the wheel to the prereleases index and flip the `catalog-sources.toml` entry from
|
|
201
|
+
`github` to `index` mode.
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|