Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor log watcher helpers #1483

Merged
merged 1 commit into from
Mar 24, 2025
Merged

Refactor log watcher helpers #1483

merged 1 commit into from
Mar 24, 2025

Conversation

nnarayen
Copy link
Contributor

🚀 What

Pure refactor of log functionality, I think after seeing the structure it's better to just nest all of these files under cli/. They're all logically related, and then we don't have to worry about rich dependency leaking. I don't imagine anybody outside the CLI will need this functionality.

New directory:

  > > cli
    > > logs
        > base_watcher.py
        > model_log_watcher.py
        > training_log_watcher.py
        > utils.py

💻 How

🔬 Testing

$ truss push my_model.py --tail --remote baseten-localhost --publish
$ truss train push config.py --remote baseten-localhost --tail

@nnarayen nnarayen requested a review from rcano-baseten March 21, 2025 13:39
job = remote_provider.api.get_training_job(project_id, job_id)
current_status = job.get("current_status")
# output if we're in a terminal state
if current_status == "TRAINING_JOB_COMPLETED":
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rcano-baseten I moved into the log watcher, so now it can be shared across both truss train logs and truss train push --tail`

Copy link
Contributor

@rcano-baseten rcano-baseten left a comment

Choose a reason for hiding this comment

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

makes sense to me!

@nnarayen nnarayen merged commit 9d37d86 into main Mar 24, 2025
5 checks passed
@nnarayen nnarayen deleted the nikhil/log-refactor branch March 24, 2025 17:49
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