Skip to content

Fix trackio logic#1713

Merged
deep1401 merged 9 commits intomainfrom
fix/trackio-dir-logic
Apr 1, 2026
Merged

Fix trackio logic#1713
deep1401 merged 9 commits intomainfrom
fix/trackio-dir-logic

Conversation

@deep1401
Copy link
Copy Markdown
Member

@deep1401 deep1401 commented Apr 1, 2026

No description provided.

@deep1401 deep1401 changed the title Fix trackio dir logic Fix trackio logic Apr 1, 2026
@sentry
Copy link
Copy Markdown

sentry bot commented Apr 1, 2026

@paragon-review
Copy link
Copy Markdown

paragon-review bot commented Apr 1, 2026

Paragon Summary

This pull request review analyzed 8 files and found no issues. The review examined code changes, potential bugs, security vulnerabilities, performance issues, and code quality concerns using automated analysis tools.

Paragon did not detect any problems in the current diff. Proceed with merge after your normal checks.

This PR fixes how the Trackio working directory is determined and propagated when launching jobs and sweeps, so runs use the correct path consistently across the backend, SDK, and UI. It also updates related configuration to keep the compute-provider flow aligned with that corrected behavior.

Key changes:

  • Fixed Trackio directory resolution in compute-provider launch flow.
  • Updated sweep/template launch services and remote job endpoints to use the corrected Trackio dir logic.
  • Aligned lab-sdk facade behavior with the new Trackio path handling.
  • Refreshed api/lab-sdk pyproject metadata to match the implementation changes.
  • Minor JobsList renderer update to stay in sync with backend behavior.

Confidence score: 5/5

  • This PR has low risk with no critical or high-priority issues identified
  • Score reflects clean code review with only minor suggestions or no issues found
  • Code quality checks passed - safe to proceed with merge

8 files reviewed, 0 comments


Tip: @paragon-run <instructions> to chat with our agent or push fixes!

Dashboard

Copy link
Copy Markdown
Member

@dadmobile dadmobile left a comment

Choose a reason for hiding this comment

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

Leaving some factoring recommendations but you might judge some to be more work than worth. But have a look and make a call?

env_vars["_TFL_EXPERIMENT_ID"] = request.experiment_id
env_vars["_TFL_USER_ID"] = user_id

trackio_project_name_for_child: str | None = None
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Wondering if there's an opportunity to factor out some sort of shared helper here? Seems like we ahve 3 separate places where we figure out a project name, set some VARS, build up a path, write a thing.

I know each case is slightly different so possibly I'm over simplifying?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Okay I'll put the trackio dir logic in lab.dirs but for the other things like run name and project, it all depends on each type of launch right instead of common logic?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Okay I was able to build a shared helper for all of the common trackio logic and I also did the lab.dirs thing so it should cover everything

temp_dir = f"/tmp/trackio/{job_id_env}"
os.makedirs(temp_dir, exist_ok=True)
os.environ["TRACKIO_DIR"] = temp_dir
trackio_dir = (os.environ.get("TRACKIO_DIR") or "").strip()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe another place for factoring...same as line 176 below?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed to get through get_trackio_dir

trackio_run_name_for_child = st_run_name
env_vars["TLAB_TRACKIO_PROJECT_NAME"] = st_project_name
env_vars["TLAB_TRACKIO_RUN_NAME"] = st_run_name
env_vars["TRACKIO_DIR"] = f"/tmp/trackio/{child_job_id}"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hardcode /tmp/trackio in a bunch of places. I wonder if we put in DIRS or something?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed

@deep1401 deep1401 requested a review from dadmobile April 1, 2026 15:47
@deep1401 deep1401 merged commit 1f197d2 into main Apr 1, 2026
14 of 15 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.

2 participants