Skip to content

fix(studio): use writable recipe artifact path - #7044

Merged
oobabooga merged 2 commits into
unslothai:mainfrom
Lyxot:fix/studio-recipe-artifact-path
Jul 13, 2026
Merged

oobabooga merged 2 commits into
unslothai:mainfrom
Lyxot:fix/studio-recipe-artifact-path

Conversation

@Lyxot

@Lyxot Lyxot commented Jul 9, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Default Studio Data Designer artifact storage to the recipe datasets root when callers omit artifact_path.
  • Keep explicit artifact_path callers, including the background recipe worker, unchanged.

Root Cause

Validation paths constructed DataDesigner without artifact_path. Data Designer then fell back to Path.cwd() / "artifacts", which can become /artifacts in packaged Studio when cwd is /.

Fixes #7038

Validation

python -m pytest studio/backend/tests/test_data_recipe_github_progress.py studio/backend/tests/test_data_recipe_pump_resilience.py studio/backend/tests/test_data_recipe_seed.py -q

Copilot AI review requested due to automatic review settings July 9, 2026 15:47

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a default fallback for artifact_path in create_data_designer using recipe_datasets_root(). The review feedback suggests using a dedicated temporary directory under tmp_root() instead of the persistent user-facing recipe_datasets_root() to avoid cluttering user datasets with temporary validation and preview artifacts.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot couldn't run its full agentic review because no GitHub Actions runner was available. Make sure your repository has a runner available to run Copilot's review, or add a copilot-setup-steps.yml file specifying one with the runs-on attribute. See the docs for more details.

Adjusts Studio’s Data Designer initialization so that when artifact_path is omitted, artifacts are written to a known-writable recipe datasets root instead of cwd/artifacts (which can become /artifacts in packaged Studio).

Changes:

  • Default artifact_path to recipe_datasets_root() when callers pass None.
  • Add import for recipe_datasets_root in the data recipe service.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@oobabooga

Copy link
Copy Markdown
Member

Reproduced #7038 before applying your change: on a real macOS box with cwd set to /, the default resolves to /artifacts and the mkdir from the issue traceback fails with the identical OSError(30, 'Read-only file system'). On your branch, create_data_designer with no artifact_path lands on ~/.unsloth/studio/assets/datasets/recipes (writable on that box), and an explicit path passes through untouched, so the background worker keeps its root, which is the right call.

On gemini's clutter concern: both dataset scanners only list recipe_* dirs containing parquet-files/*.parquet, and validation and preview write under other names, so nothing new can surface in the UI.

Your three cited suites pass locally (20 tests), and a mirror CI run is green: oobabooga#50

Thanks @Lyxot. Merging.

@oobabooga
oobabooga merged commit 2573dbd into unslothai:main Jul 13, 2026
34 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] Cannot run recipes because /artifacts cannot be written

3 participants