Repository navigation
Conversation
Runs stopped before the worker attests hub model/dataset revisions kept pending provenance, which incorrectly blocked can_resume_run and resume start. Treat that initial pending state like legacy runs without exact resource pins while still rejecting unattested snapshot paths.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 14b03375f6
ℹ️ 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".
| if isinstance(marker, dict) and _provenance_awaiting_attestation(marker, config): | ||
| return None |
There was a problem hiding this comment.
Validate pending provenance before allowing resume
When the stored marker is malformed but has status: "pending" (for example it is missing version) and has no snapshot fields yet, this early return bypasses the validation that exact_resume_resource_requirements() performs. resource_provenance_allows_resume() then marks the row resumable and can show the Resume button, but _prepare_resume_resource_provenance() still calls exact_resume_resource_requirements() and rejects the same run as invalid provenance when the user starts it. Include the version/status validation in the awaiting-attestation path or let this flow through the same validator first.
Useful? React with 👍 / 👎.
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Fixes #8150 — the Resume button was hidden after Stop and Save on hub-model training runs when the worker had not yet attested model/dataset revisions.
Root cause
initialize_resource_provenance()writes{"version": 1, "status": "pending"}at run start. If the user stops before the worker attests loaded resources, provenance stayspending.exact_resume_resource_requirements()treated that as "model revision not attested" and blocked bothcan_resume_run(UI) and resume start.Fix
Introduce
_provenance_awaiting_attestation()to detect the initial pending state (nomodel_status/dataset_status, no snapshot paths). Those runs resume like legacy runs without exact resource pins. Unattested snapshot paths andincompleteprovenance remain blocked.Test plan
test_stop_and_save_before_attestation_allows_resume— regression for [Bug] Resume training button missing immediately after Stop and Save in latest Unsloth Studio #8150test_pending_hub_model_resume_before_attestation_is_allowed— resume start pathtest_pending_current_hub_pins_are_not_treated_as_attested— still blocks untrusted snapshot paths