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

Fork api #937

Closed
wants to merge 21 commits into from
Closed

Fork api #937

wants to merge 21 commits into from

Conversation

sahithyaravi
Copy link
Member

Reference Issue

#929

What does this PR implement/fix? Explain your changes.

Fork API to clone a dataset.

How should this PR be tested?

id, forked_dataset = fork_dataset(did)
time.sleep(60)
dataset = get_dataset(id)
print(dataset.features)

Any other comments?

For the testing, I have just compared the did. Ideally we want to check if the cloned data==old data and cloned features == old features. But the time taken for the status of the dataset to change to active varies (may be 1 min).
time.sleep(60) should work most of the time, but I am not sure if the tests may fail at some point.
Let me know if it is a good idea to add this to the test. Something like:

old_dataset = get_dataset(did)
id, forked_dataset = fork_dataset(did)
time.sleep(60)
forked_dataset = get_dataset(id)
assertEqual(old_dataset.features == old_dataset.features)

@sahithyaravi sahithyaravi changed the title Edit api Fork api Jul 28, 2020
@codecov-commenter
Copy link

codecov-commenter commented Jul 28, 2020

Codecov Report

Merging #937 into develop will increase coverage by 0.00%.
The diff coverage is 90.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #937   +/-   ##
========================================
  Coverage    87.76%   87.76%           
========================================
  Files           37       37           
  Lines         4429     4446   +17     
========================================
+ Hits          3887     3902   +15     
- Misses         542      544    +2     
Impacted Files Coverage Δ
openml/datasets/functions.py 93.85% <90.00%> (-0.27%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9c93f5b...6cffa03. Read the comment docs.

@sahithyaravi sahithyaravi deleted the edit_api branch July 29, 2020 06:55
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