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

[train] Do not raise warning when no results were reported #39454

Merged
merged 1 commit into from
Sep 9, 2023

Conversation

krfricke
Copy link
Contributor

@krfricke krfricke commented Sep 8, 2023

Why are these changes needed?

When no result is reported, a training run will print this message at the end of training:

2023-09-07 18:53:20,003 WARNING experiment_analysis.py:205 -- Failed to fetch metrics for 1 trial(s):
- TorchTrainer_78aea_00000: JSONDecodeError('Expecting value: line 1 column 1 (char 0)')

This is due to the results json file being empty. Instead, we should identify empty files early and return an empty dataframe, avoiding the error message.

Related issue number

Closes #39430

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

@krfricke krfricke added tests-ok The tagger certifies test failures are unrelated and assumes personal liability. v2.7.0-pick labels Sep 8, 2023
Copy link
Contributor

@justinvyu justinvyu left a comment

Choose a reason for hiding this comment

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

Thanks! Can we also do the same thing for the csv case?

@matthewdeng matthewdeng merged commit 33ebb78 into ray-project:master Sep 9, 2023
56 of 61 checks passed
matthewdeng pushed a commit to matthewdeng/ray that referenced this pull request Sep 9, 2023
GeneDer pushed a commit that referenced this pull request Sep 10, 2023
…39515)

* [docs] update doc links in Use Cases (#39445)

Signed-off-by: Matthew Deng <[email protected]>

* [train][release] Fix `tune_worker_fault_tolerance` release test node killing (#39233)


Signed-off-by: Justin Yu <[email protected]>

* [train] Do not raise warning when no results were reported (#39454)

Signed-off-by: Kai Fricke <[email protected]>

* [train] add diagram in overview page (#39512)

Signed-off-by: Matthew Deng <[email protected]>

* [train] New persistence mode: Sanity-check release test (#39354)

Signed-off-by: Justin Yu <[email protected]>
Co-authored-by: matthewdeng <[email protected]>

* [train][doc] Configuring persistent storage user guide (#39428)


Signed-off-by: Justin Yu <[email protected]>
Signed-off-by: matthewdeng <[email protected]>
Co-authored-by: matthewdeng <[email protected]>
Co-authored-by: matthewdeng <[email protected]>

* [train][doc] New checkpointing user guide (#39505)


Signed-off-by: Justin Yu <[email protected]>

---------

Signed-off-by: Matthew Deng <[email protected]>
Signed-off-by: Justin Yu <[email protected]>
Signed-off-by: Kai Fricke <[email protected]>
Signed-off-by: matthewdeng <[email protected]>
Co-authored-by: Justin Yu <[email protected]>
Co-authored-by: Kai Fricke <[email protected]>
@krfricke krfricke deleted the train/json-decode branch September 11, 2023 23:50
jimthompson5802 pushed a commit to jimthompson5802/ray that referenced this pull request Sep 12, 2023
vymao pushed a commit to vymao/ray that referenced this pull request Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests-ok The tagger certifies test failures are unrelated and assumes personal liability.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[train] confusing warning when train.report is never called
3 participants