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

chore: error output logs for cortex run #818

Merged
merged 3 commits into from
Jul 3, 2024
Merged

Conversation

louis-jan
Copy link
Contributor

@louis-jan louis-jan commented Jul 3, 2024

chore: error handling - cortex run error outputs and logs file

Describe Your Changes

Added error outputs and log file

NOTES: Removed Checking model files for existing...

cortex run: Loading status

image

cortex run: Error outputs from cortex-js

image

cortex run: Error outputs from cortex-cpp

image

cortex pull: with remote URL

image image

Fixes Issues

Self Checklist

  • Added relevant comments, esp in complex areas
  • Updated docs (for bug fixes / features)
  • Created issues for follow-up changes or refactoring needed

@louis-jan
Copy link
Contributor Author

Removed Checking model files for existing...

chore: error handling - cortex run error outputs and logs file
*/
export async function printLastErrorLines(
dataFolderPath: string,
numLines: number = 5,

Choose a reason for hiding this comment

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

stupid qn from me - any reason why only 5 lines (will they see a truncated error message?)

Choose a reason for hiding this comment

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

non blocking curious qn, otherwise LGTM!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

stupid qn from me - any reason why only 5 lines (will they see a truncated error message?)

Yeah, that's a rough estimate for common cases. Since we output everything into the log file across sessions, we should output only several lines (not just errors), similar to other applications. Otherwise, there would be hundreds of lines of cortex-cpp printed out. The applications are not running in attached mode; in attached mode, users would see the full session logs.

@louis-jan louis-jan merged commit 4d05273 into dev Jul 3, 2024
1 check passed
@louis-jan louis-jan deleted the fix/error-logs-cortex-run branch July 3, 2024 11:25
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.

feat: stdout "loading model..." during run and start feat: Better stdout when pulling models
3 participants