Skip to content

Commit bed8652

Browse files
Neeratyoymfeurer
authored andcommitted
Apidocs (#692)
* Adding status_update to datasets api * Adding assert_flows_equals to flows api * Updating init for runs * Adding run_exists for runs api * Adding study and extensions api * Adding OpenMLSetup and OpenMLParameter to top-level class docu * Adding docstrings * Debugging for missing documentation * Adding class docstrings * Addressing descriptor docstrings + adding Study object docstrings * Updating PR template + Adding missing class from study to api * Fixing typo in api.rst * Changes to docstrings * Removing BaseStudy from import
1 parent ca3a25f commit bed8652

File tree

12 files changed

+254
-151
lines changed

12 files changed

+254
-151
lines changed

PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ Please make sure that:
66
77
* this pull requests is against the `develop` branch
88
* you updated all docs, this includes the changelog!
9+
* for any new function or class added, please add it to doc/api.rst
10+
* the list of classes and functions should be alphabetical
11+
* for any new functionality, consider adding a relevant example
912
-->
1013

1114
#### Reference Issue

doc/api.rst

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,22 @@ Top-level Classes
1313
:toctree: generated/
1414
:template: class.rst
1515

16+
OpenMLBenchmarkSuite
17+
OpenMLClassificationTask
18+
OpenMLClusteringTask
19+
OpenMLDataFeature
1620
OpenMLDataset
21+
OpenMLEvaluation
22+
OpenMLFlow
23+
OpenMLLearningCurveTask
24+
OpenMLParameter
25+
OpenMLRegressionTask
1726
OpenMLRun
18-
OpenMLTask
27+
OpenMLSetup
1928
OpenMLSplit
20-
OpenMLFlow
21-
OpenMLEvaluation
29+
OpenMLStudy
30+
OpenMLSupervisedTask
31+
OpenMLTask
2232

2333
.. _api_extensions:
2434

@@ -40,9 +50,10 @@ Extensions
4050
:toctree: generated/
4151
:template: function.rst
4252

43-
register_extension
44-
get_extension_by_model
4553
get_extension_by_flow
54+
get_extension_by_model
55+
register_extension
56+
4657

4758
Modules
4859
-------
@@ -61,6 +72,7 @@ Modules
6172
get_dataset
6273
get_datasets
6374
list_datasets
75+
status_update
6476

6577
:mod:`openml.evaluations`: Evaluation Functions
6678
-----------------------------------------------
@@ -80,6 +92,7 @@ Modules
8092
:toctree: generated/
8193
:template: function.rst
8294

95+
assert_flows_equal
8396
flow_exists
8497
get_flow
8598
list_flows
@@ -100,6 +113,7 @@ Modules
100113
list_runs
101114
run_model_on_task
102115
run_flow_on_task
116+
run_exists
103117

104118
:mod:`openml.setups`: Setup Functions
105119
-------------------------------------
@@ -122,7 +136,20 @@ Modules
122136
:toctree: generated/
123137
:template: function.rst
124138

125-
get_study
139+
attach_to_study
140+
attach_to_suite
141+
create_benchmark_suite
142+
create_study
143+
delete_study
144+
delete_suite
145+
detach_from_study
146+
detach_from_suite
147+
get_study
148+
get_suite
149+
list_studies
150+
list_suites
151+
update_study_status
152+
update_suite_status
126153

127154
:mod:`openml.tasks`: Task Functions
128155
-----------------------------------

openml/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,11 @@
3737
from .runs import OpenMLRun
3838
from . import flows
3939
from .flows import OpenMLFlow
40-
from . import setups
4140
from . import study
42-
from .study import OpenMLStudy
41+
from .study import OpenMLStudy, OpenMLBenchmarkSuite
4342
from . import utils
43+
from . import setups
44+
from .setups import OpenMLSetup, OpenMLParameter
4445

4546

4647
from .__version__ import __version__
@@ -89,6 +90,7 @@ def populate_cache(task_ids=None, dataset_ids=None, flow_ids=None,
8990
'OpenMLSplit',
9091
'OpenMLEvaluation',
9192
'OpenMLSetup',
93+
'OpenMLParameter',
9294
'OpenMLTask',
9395
'OpenMLSupervisedTask',
9496
'OpenMLClusteringTask',
@@ -97,6 +99,7 @@ def populate_cache(task_ids=None, dataset_ids=None, flow_ids=None,
9799
'OpenMLClassificationTask',
98100
'OpenMLFlow',
99101
'OpenMLStudy',
102+
'OpenMLBenchmarkSuite',
100103
'datasets',
101104
'evaluations',
102105
'exceptions',

openml/datasets/functions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,8 @@ def get_dataset(
440440
Returns
441441
-------
442442
dataset : :class:`openml.OpenMLDataset`
443-
The downloaded dataset."""
443+
The downloaded dataset.
444+
"""
444445
if isinstance(dataset_id, str):
445446
try:
446447
dataset_id = int(dataset_id)

openml/runs/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
list_runs,
88
get_runs,
99
get_run_trace,
10+
run_exists,
1011
initialize_model_from_run,
1112
initialize_model_from_trace,
1213
)
@@ -21,6 +22,7 @@
2122
'list_runs',
2223
'get_runs',
2324
'get_run_trace',
25+
'run_exists',
2426
'initialize_model_from_run',
2527
'initialize_model_from_trace'
2628
]

openml/runs/functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ def list_runs(
772772
offset: Optional[int] = None,
773773
size: Optional[int] = None,
774774
id: Optional[List] = None,
775-
task: Optional[List] = None,
775+
task: Optional[List[int]] = None,
776776
setup: Optional[List] = None,
777777
flow: Optional[List] = None,
778778
uploader: Optional[List] = None,

openml/runs/run.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,14 @@
2525
class OpenMLRun(object):
2626
"""OpenML Run: result of running a model on an openml dataset.
2727
28-
Parameters
29-
----------
30-
FIXME
31-
28+
Parameters
29+
----------
30+
task_id : int
31+
Refers to the task.
32+
flow_id : int
33+
Refers to the flow.
34+
dataset_id: int
35+
Refers to the data.
3236
"""
3337

3438
def __init__(self, task_id, flow_id, dataset_id, setup_string=None,

openml/setups/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class OpenMLSetup(object):
1010
The flow that it is build upon
1111
parameters : dict
1212
The setting of the parameters
13-
"""
13+
"""
1414

1515
def __init__(self, setup_id, flow_id, parameters):
1616
if not isinstance(setup_id, int):

0 commit comments

Comments
 (0)