Skip to content

Fix resume button missing after stop-and-save (#8150) - #8217

Merged
Etherll merged 3 commits into
unslothai:mainfrom
Souravrajvi0:feat/fix-resume-after-stop-save-8150-b755
Aug 10, 2026
Merged

Etherll merged 3 commits into
unslothai:mainfrom
Souravrajvi0:feat/fix-resume-after-stop-save-8150-b755

Conversation

@Souravrajvi0

Copy link
Copy Markdown
Contributor

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 stays pending. exact_resume_resource_requirements() treated that as "model revision not attested" and blocked both can_resume_run (UI) and resume start.

Fix

Introduce _provenance_awaiting_attestation() to detect the initial pending state (no model_status/dataset_status, no snapshot paths). Those runs resume like legacy runs without exact resource pins. Unattested snapshot paths and incomplete provenance remain blocked.

Test plan

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.

@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: 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".

Comment on lines +917 to +918
if isinstance(marker, dict) and _provenance_awaiting_attestation(marker, config):
return None

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@Etherll Etherll self-assigned this Aug 10, 2026
@Etherll

Etherll commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: cdb91be359

ℹ️ 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".

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".

@Etherll
Etherll merged commit 68ac91f into unslothai:main Aug 10, 2026
37 of 40 checks passed
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.

[Bug] Resume training button missing immediately after Stop and Save in latest Unsloth Studio

2 participants