Skip to content

feat: add support for dataset ref names in a run #6

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

Conversation

alkasm
Copy link
Contributor

@alkasm alkasm commented Aug 22, 2024

You can pass file paths to upload or a list of datasets (where the ref_name is pulled from dataset.filename) as before, or a dict mapping the ref_name to the dataset, which becomes the preferred ref_name in the run if it's included.

Testing

>>> import nominal as nm
>>> from nominal import Dataset, Run
>>> dataset = Dataset(nm.data.penguins(), "penguins.csv")
>>> r = Run(datasets=[dataset])
>>> r.upload()

Link to Run:
https://app-staging.gov.nominal.io/runs/
<Response [200]>
>>> r = Run(datasets={"test-ref-name": dataset})
>>> r.upload()

Link to Run:
https://app-staging.gov.nominal.io/runs/
<Response [200]>

As expected, the first run uploaded has the dataset ref_name "penguins.csv", the dataset filename:

Screenshot 2024-08-22 at 11 16 42 AM

and the second run uploaded has the dataset ref_name "test-ref-name":

Screenshot 2024-08-22 at 11 16 44 AM

@alkasm alkasm requested a review from bauerm97 August 22, 2024 18:07
@alkasm alkasm assigned jackparmer and unassigned jackparmer Aug 22, 2024
@alkasm alkasm requested a review from jackparmer August 22, 2024 18:20
@jackparmer jackparmer merged commit 451d2c1 into main Aug 22, 2024
1 check passed
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.

2 participants