Add 10 trending model architectures across all task families#67
Merged
Conversation
Closes the most prominent gaps surfaced by the late-2025 architecture audit. Each file follows the existing single-file template (framework metadata, main_class / main_method, task-specific fields) and adds a `license` field per the new CLAUDE.md convention. - image_classification: convnext_v2, dinov3 (frozen backbone + linear head) - object_detection: rt_detr (first transformer detector in the zoo) - semantic_segmentation: mask2former (universal segmentation) - keypoint_detection: vitpose (first transformer pose model) - text_classification: modernbert, eurobert (multilingual) - tabular_classification + tabular_regression: mitra (foundation model) - time_series_forecasting: chronos_bolt (foundation model) - time_to_event_prediction: random_survival_forest CLAUDE.md gains a `license` metadata field and a federated-averaging conventions section (BatchNorm handling, EMA buffers, LoRA-only for foundation models). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
|
👋 Heads-up — Code review queue is at 16 / 8 Above the WIP limit. The team convention is to review existing PRs before opening new work. Open PRs currently in Code review (oldest first):
Pull from review before opening new work. (This is a nudge from the kanban WIP check, not a block.) |
2 tasks
This was referenced May 18, 2026
The backend's model-upload bandit gate (TBT001) now allows trust_remote_code=True only when the model id is a STRING LITERAL at the from_pretrained call site, matched against a small vetted-repos allowlist (see tracebloc/backend follow-up PR). Move the EuroBERT and Mitra repo ids from a module-level `model_id` variable into the from_pretrained() call itself so they pass the new check. Behaviour is unchanged; only the AST shape moves. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…lasses - semantic_segmentation/pytorch/fcn.py: FCNResNet.__init__ defaulted n_channels to image_size (256), which made the first Conv2d expect 256-channel input instead of 3-channel RGB. Reverted to n_channels=3 to match the other FCN class in the same file. - tabular_classification/pytorch/mitra.py: MyModel accepted num_classes but never forwarded it; AutoModel.from_pretrained now receives it as num_classes so the Mitra config picks up the requested head size. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 5c6c95a. Configure here.
- time_series_forecasting/pytorch/chronos_bolt.py: amazon/chronos-bolt-base ships a custom ChronosBoltModelForForecasting architecture; without trust_remote_code=True, transformers falls back to a plain T5 head, silently loading the wrong model. Mirrors the pattern already used by mitra.py and eurobert.py. - semantic_segmentation/pytorch/hrnet.py: HRNet.__init__ stored input_size/batch_size as instance attrs but never read them; duplicates module-level metadata and adds confusion about where config lives. Removed both params. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
shujaatTracebloc
approved these changes
May 18, 2026
shujaatTracebloc
pushed a commit
that referenced
this pull request
May 22, 2026
* fixed hrnet * feat: add 10 trending model architectures across all task families Closes the most prominent gaps surfaced by the late-2025 architecture audit. Each file follows the existing single-file template (framework metadata, main_class / main_method, task-specific fields) and adds a `license` field per the new CLAUDE.md convention. - image_classification: convnext_v2, dinov3 (frozen backbone + linear head) - object_detection: rt_detr (first transformer detector in the zoo) - semantic_segmentation: mask2former (universal segmentation) - keypoint_detection: vitpose (first transformer pose model) - text_classification: modernbert, eurobert (multilingual) - tabular_classification + tabular_regression: mitra (foundation model) - time_series_forecasting: chronos_bolt (foundation model) - time_to_event_prediction: random_survival_forest CLAUDE.md gains a `license` metadata field and a federated-averaging conventions section (BatchNorm handling, EMA buffers, LoRA-only for foundation models). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(security): inline trust_remote_code model ids as string literals The backend's model-upload bandit gate (TBT001) now allows trust_remote_code=True only when the model id is a STRING LITERAL at the from_pretrained call site, matched against a small vetted-repos allowlist (see tracebloc/backend follow-up PR). Move the EuroBERT and Mitra repo ids from a module-level `model_id` variable into the from_pretrained() call itself so they pass the new check. Behaviour is unchanged; only the AST shape moves. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(model-zoo): correct FCNResNet input channels and wire mitra num_classes - semantic_segmentation/pytorch/fcn.py: FCNResNet.__init__ defaulted n_channels to image_size (256), which made the first Conv2d expect 256-channel input instead of 3-channel RGB. Reverted to n_channels=3 to match the other FCN class in the same file. - tabular_classification/pytorch/mitra.py: MyModel accepted num_classes but never forwarded it; AutoModel.from_pretrained now receives it as num_classes so the Mitra config picks up the requested head size. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(model-zoo): chronos_bolt trust_remote_code, drop hrnet dead attrs - time_series_forecasting/pytorch/chronos_bolt.py: amazon/chronos-bolt-base ships a custom ChronosBoltModelForForecasting architecture; without trust_remote_code=True, transformers falls back to a plain T5 head, silently loading the wrong model. Mirrors the pattern already used by mitra.py and eurobert.py. - semantic_segmentation/pytorch/hrnet.py: HRNet.__init__ stored input_size/batch_size as instance attrs but never read them; duplicates module-level metadata and adds confusion about where config lives. Removed both params. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

Summary
Closes the most prominent gaps surfaced by the late-2025 architecture audit. Each new file follows the existing single-file template (framework metadata,
main_class/main_method, task-specific fields) plus the newlicensefield convention.New models
convnext_v2.pytimm.create_model("convnextv2_tiny")dinov3.pytransformers AutoModelfrozen backbone + linear headrt_detr.pytransformers.RTDetrForObjectDetectionmask2former.pytransformers.Mask2FormerForUniversalSegmentationvitpose.pytransformers.VitPoseForPoseEstimationmodernbert.pyanswerdotai/ModernBERT-baseeurobert.pyEuroBERT/EuroBERT-210m(multilingual,trust_remote_code)mitra.pyautogluon/mitra-classifier(foundation model)mitra.pyautogluon/mitra-regressorchronos_bolt.pyamazon/chronos-bolt-base(T5 via transformers)random_survival_forest.pysksurv.ensemble.RandomSurvivalForestCLAUDE.md updates
licenseSPDX-style metadata field so downstream tooling can filter models by license.Infra prerequisites (separate PRs in tracebloc-client / averaging-service)
transformers >= 4.56. Existing infra is pinned to4.51.3; that bump is being handled separately. If shipping ahead of the bump, swap DINOv3 → DINOv2.transformers == 4.51.3.Test plan
ruff,pytestmatrix across pytorch / tensorflow / sklearn / survival jobs).tests/test_model_contract.pyin the pytorch job (the CI matrix installs latesttransformers, which has RT-DETR + ViTPose).transformers==4.51.3), runfrom tracebloc_package import User; User().uploadModel(<path>)for each new file to confirm the SDK forward-pass check.🤖 Generated with Claude Code
Note
Medium Risk
Mostly additive model templates, but several new entries load Hugging Face models with
trust_remote_code=Trueand introduce new third-party dependencies/model IDs that can affect security review and runtime compatibility.Overview
Adds a set of new single-file model templates across task families (image classification, detection, segmentation, keypoints, text, tabular, time-series, and survival), primarily by loading pretrained backbones from
transformers(plustimmfor ConvNeXtV2) and exposing them via the existingmain_class/main_methodcontract.Updates
CLAUDE.mdto recommend a newlicensemetadata field and to document federated-averaging-oriented authoring conventions (BatchNorm/EMA handling and LoRA-only fine-tuning for large backbones).Reviewed by Cursor Bugbot for commit 4555c12. Bugbot is set up for automated code reviews on this repo. Configure here.