-
Notifications
You must be signed in to change notification settings - Fork 13
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
✨ Add an artifact loader for .yaml
#2172
Conversation
FYI -- laminlabs/laminr#81 added a data loader for .rds. |
Thanks, Robrecht! Great!
That's a nice idea, yeah! |
We need a test here for the new lamindb/tests/core/test_artifact.py Line 714 in 996a416
@Koncopd, do you want to finalize and rename the test function to |
Do we want to add |
No, I'd not add pyyaml to the dependencies because we have too many anyway and nothing in lamindb requires it. |
Ok, i wanted to push some things here but again we have the problem with CI for PRs not from this repo. |
@rcannood @falexwolf i think a warning is more reasonable for that #2188 |
@@ -107,9 +108,17 @@ def load_json(path: UPathStr) -> dict: | |||
data = json.load(f) | |||
return data | |||
|
|||
def load_yaml(path: UPathStr) -> dict: | |||
"""Load `.yaml` to `dict`.""" | |||
import yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe except ImportError
and log a warning that the package is not installed and return a path.
There is also a comment from me, otherwise good to merge when the comments are resolved. |
This looks inactive, so moving it here #2270 |
load_image
.gif
and.yaml
.In addition, we could add a data loader for
.rds
, which when called, produces an error message that you should use laminr for loading.rds
files. WDYT?