Skip to content

Conversation

@d4l3k
Copy link
Member

@d4l3k d4l3k commented Apr 1, 2023

Fixes #715

This sets an error handler so any invalid UTF-8 characters are replaced with the unknown character symbol instead of logs failing. https://docs.python.org/3/library/codecs.html#error-handlers

Test plan:

pytest torchx/schedulers/test/local_scheduler_test.py -k invalid_utf8

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 1, 2023
@d4l3k d4l3k requested a review from kiukchung April 1, 2023 04:13
Copy link
Contributor

@kiukchung kiukchung left a comment

Choose a reason for hiding this comment

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

lgtm

@codecov
Copy link

codecov bot commented Apr 1, 2023

Codecov Report

Merging #718 (47868b8) into main (cc6b386) will decrease coverage by 0.05%.
The diff coverage is 75.00%.

@@            Coverage Diff             @@
##             main     #718      +/-   ##
==========================================
- Coverage   93.02%   92.98%   -0.05%     
==========================================
  Files          91       91              
  Lines        5997     6000       +3     
==========================================
  Hits         5579     5579              
- Misses        418      421       +3     
Impacted Files Coverage Δ
torchx/schedulers/local_scheduler.py 93.12% <75.00%> (ø)

... and 2 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@d4l3k d4l3k merged commit 4750614 into main Apr 1, 2023
@d4l3k d4l3k deleted the nonutf8 branch April 1, 2023 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

local_scheduler can't handle non utf-8 characters from subprocesses

4 participants