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

Can the pretty cool TUI remain on my shell even after training finished? #2233

Closed
kingwingfly opened this issue Sep 1, 2024 · 1 comment
Closed
Labels
feature The feature request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@kingwingfly
Copy link
Contributor

kingwingfly commented Sep 1, 2024

Feature description

I'd prefer the TUI remains on my shell after training finished.

Feature motivation

So that I can observe the scatter diagram better.

(Optional) Suggest a Solution

let learner = LearnerBuilder::new(artifact_dir)
        .metric_train_numeric(LossMetric::new())
        ...
        .manually_quit()    // <- allow this
        .build(
            ...
        );
@nathanielsimard nathanielsimard added help wanted Extra attention is needed good first issue Good for newcomers feature The feature request labels Sep 9, 2024
@laggui
Copy link
Member

laggui commented Nov 25, 2024

This was added with #2489.

Current usage requires the user to be explicit about the TUI renderer usage:

let learner = LearnerBuilder::new(ARTIFACT_DIR)
    // ...
    .devices(vec![device.clone()])
    .num_epochs(config.num_epochs)
    .summary();

let tui = TuiMetricsRenderer::new(learner.interrupter(), None).persistent();
let learner = learner
    .renderer(tui)
    .build(Model::new(&device), config.optimizer.init(), 1e-4);

While it "breaks" the builder pattern, I think it's perfectly fine for now. If the training interrupter is provided another way this could be improved to not "break" the builder pattern.

@laggui laggui closed this as completed Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature The feature request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants