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

Add support for using run_model_on_task simply #888

Merged
merged 3 commits into from
Nov 22, 2019

Conversation

m7142yosuke
Copy link
Contributor

Reference Issue

Addresses #867

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

Allow to sepecify task_id(int or str) in run_model_on_task directly.
(i.e. you can use run_model_on_task(clf, task_id) and run_model_on_task(clf, task))

How should this PR be tested?

Compare the results of

from sklearn import ensemble
from openml import tasks, runs

clf = ensemble.RandomForestClassifier()
run = runs.run_model_on_task(clf, 3954)
run.publish()

and

from sklearn import ensemble
from openml import tasks, runs

clf = ensemble.RandomForestClassifier()
task = tasks.get_task(3954)
run = runs.run_model_on_task(clf, task)
run.publish()

Copy link
Collaborator

@mfeurer mfeurer left a comment

Choose a reason for hiding this comment

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

Thanks a lot for your contribution, very much appreciated!

@mfeurer mfeurer merged commit d5e46fe into openml:develop Nov 22, 2019
@codecov-io
Copy link

codecov-io commented Nov 22, 2019

Codecov Report

Merging #888 into develop will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           develop    #888      +/-   ##
==========================================
+ Coverage    88.49%   88.5%   +0.01%     
==========================================
  Files           37      37              
  Lines         4319    4324       +5     
==========================================
+ Hits          3822    3827       +5     
  Misses         497     497
Impacted Files Coverage Δ
openml/runs/functions.py 83.1% <100%> (+0.23%) ⬆️

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 2b7e740...39d6baa. Read the comment docs.

@m7142yosuke m7142yosuke deleted the simplify_run_model_on_task_867 branch November 22, 2019 12:16
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.

3 participants