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

Use fsspec with OmegaConf saving in saving.py #3782

Merged
merged 1 commit into from
Oct 2, 2020

Conversation

ananthsub
Copy link
Contributor

@ananthsub ananthsub commented Oct 2, 2020

What does this PR do?

Currently, the config_yaml is restricted to be saved to a local filepath when using an OmegaConf config. However, Omegaconf.save accepts an IO object. Opening the file and passing the filepointer to OmegaConf enables Lightning to save the config yaml to any storage backends enabled by fsspec.

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together? Otherwise, we ask you to create a separate PR for every change.
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?
  • Did you verify new and existing tests pass locally with your changes?
  • If you made a notable change (that affects users), did you update the CHANGELOG?

PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

@ananthsub ananthsub marked this pull request as draft October 2, 2020 01:40
@ananthsub ananthsub marked this pull request as ready for review October 2, 2020 01:46
@mergify mergify bot requested a review from a team October 2, 2020 01:46
@ananthsub ananthsub changed the title Update saving.py Use fsspec with OmegaConf saving in saving.py Oct 2, 2020
@Borda Borda added the feature Is an improvement or enhancement label Oct 2, 2020
Copy link
Member

@Borda Borda left a comment

Choose a reason for hiding this comment

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

lgtm

@mergify mergify bot requested a review from a team October 2, 2020 06:48
@Borda Borda added the ready PRs ready to be merged label Oct 2, 2020
@codecov
Copy link

codecov bot commented Oct 2, 2020

Codecov Report

Merging #3782 into master will increase coverage by 5%.
The diff coverage is 100%.

@@           Coverage Diff           @@
##           master   #3782    +/-   ##
=======================================
+ Coverage      85%     90%    +5%     
=======================================
  Files         110     110            
  Lines        8539    8685   +146     
=======================================
+ Hits         7295    7844   +549     
+ Misses       1244     841   -403     

Copy link
Contributor

@awaelchli awaelchli left a comment

Choose a reason for hiding this comment

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

Thanks Ananth! 🚀

@mergify mergify bot requested a review from a team October 2, 2020 12:39
@Borda Borda merged commit 88ad451 into Lightning-AI:master Oct 2, 2020
@Borda Borda added this to the 0.10.0 milestone Oct 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Is an improvement or enhancement ready PRs ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants