Skip to content

feat(pretrain): add torch_compile_args for SSL pretraining - #1002

Open
IgorSusmelj wants to merge 3 commits into
mainfrom
pr-a/torch-compile
Open

IgorSusmelj wants to merge 3 commits into
mainfrom
pr-a/torch-compile

Conversation

@IgorSusmelj

Copy link
Copy Markdown
Contributor
  • Why: torch.compile was only available on the fine-tuning side (train_object_detection etc.), but pretraining spends essentially all its time in backbone feature extraction too. This adds the same option to pretrain() so long SSL runs can benefit as well.
  • What: new torch_compile_args argument on pretrain() and the CLI, backed by the existing TorchCompileArgs. It compiles the backbone feature extraction in the train/val steps and falls back to eager execution if compilation fails. Off by default, so nothing changes for existing users. Cross-resolution input changes trigger recompilation, so it is best used with a fixed crop size (as in pretraining).
  • Testing: new unit tests for the compile helpers and config plumbing (105 tests green), full tests/_commands/ suite green (390 passed), ruff and mypy clean.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T18:12:44.977487Z 7c63845 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7c6384501b

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@IgorSusmelj

Copy link
Copy Markdown
Contributor Author

/review

This branch has not been deployed

No deployments
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.

1 participant