Skip to content

hpc job-output --follow for real-time log tailing #4

@ultimatile

Description

@ultimatile

Summary

Add a --follow / -f option to hpc job-output <id> that streams the running job's output, equivalent to tail -F.

Motivation

  • hpc wait blocks until completion but does not show output.
  • hpc job-output can only be used after the fact.
  • For long-running jobs, watching progress (training loss, progress indicators) from the local side currently requires manually running ssh myhpc tail -F /path/to/output.

Implementation notes

  • A thin implementation that just streams ssh ... tail -F <output_path> is sufficient.
  • The output path can be pulled from RunManager metadata or from the stdout/stderr paths assigned by the scheduler.
  • While the job is pending, the target file does not yet exist (tail -F retries, so this is largely a non-issue).
  • Confirm that SSH closes cleanly when the user exits with Ctrl-C.

Priority

Low. ssh ... tail -F is a working substitute, so this can wait until it becomes a frequent need.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions