Skip to content

Conversation

@Neeratyoy
Copy link
Contributor

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

  • Adds missing classes and functions to the API docs
  • Adds missing docstrings for classes and functions featuring in the API
  • Handles the case of missing docstrings for functions wrapped by decorators
  • Edits the Pull Request template instruction, asking for new functions/classes to be included alphabetically in api.rst

How should this PR be tested?

  • Viewing the api page

Any other comments?

  • For some functions/classes the docstrings are placeholders and can be much improved.

@Neeratyoy Neeratyoy requested a review from mfeurer May 20, 2019 13:32
@joaquinvanschoren
Copy link
Contributor

Hi Neeratyoy, Matthias, seems like the unit tests broke because of the release of scipy 1.3.0:
https://github.com/scipy/scipy/releases

which adds this:

For the Attribute-Relation File Format (ARFF) scipy.io.arff.loadarff
now supports relational attributes.

and breaks this:
https://travis-ci.org/openml/openml-python/jobs/534987620#L1420

Is this easy to fix, or shall we update the dependencies to: scipy>0.13.3,<1.3.0?

'scipy>=0.13.3',

@mfeurer
Copy link
Collaborator

mfeurer commented May 21, 2019

@joaquinvanschoren thanks for having a look at this. I'd actually prefer to use liac-arff for this instead. First, it's much faster now since Joel Nothman from the sklearn team improved it, and second, we'd use the same arff reader in all places. However, I suggest that we use a different PR for that. @Neeratyoy could you please put that on your todo list?

@Neeratyoy
Copy link
Contributor Author

@mfeurer alright I shall look into this first.

@@ -1,4 +1,4 @@
from .study import OpenMLStudy, OpenMLBenchmarkSuite
from .study import OpenMLStudy, OpenMLBenchmarkSuite, BaseStudy
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please do not make BaseStudy available to the user here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.
Pushed the changes.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry, but this one is still there.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, sorry my mistake. Just noticed. Pushed the changes.

Parameters
----------
task_type_id : int or str
Copy link
Collaborator

Choose a reason for hiding this comment

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

Seing this I'm surprised that we allow strings here and cast them to int inside the constructor. Could you please update the code so that:

  1. the casting happens outside
  2. the docstring reflects this
  3. the type annotation reflects this, too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

By casting outside, are you referring to an explicit cast made by the user or in any function invoking the constructor? Just checked some other constructors, and they accept ids only as int.
Shall I make the id parameters take only int here too?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I mean 'any function invoking the constructor'. Yes, it would be good to only accepts integers here, too.

@mfeurer mfeurer merged commit bed8652 into develop May 29, 2019
@mfeurer mfeurer deleted the apidocs branch May 29, 2019 12:39
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.

4 participants