Create OpenMLBase, have most OpenML objects derive from it#828
Create OpenMLBase, have most OpenML objects derive from it#828
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #828 +/- ##
==========================================
Coverage ? 88.55%
==========================================
Files ? 37
Lines ? 4248
Branches ? 0
==========================================
Hits ? 3762
Misses ? 486
Partials ? 0
Continue to review full report at Codecov.
|
|
For the I propose to remove the 'Task Type' row from the body of the |
mfeurer
left a comment
There was a problem hiding this comment.
This looks really good! I have one more suggestion, but we can really merge this.
| # Default values are actually added here in the _setup() function which is | ||
| # called at the end of this module | ||
| server = _defaults['server'] | ||
| server = str(_defaults['server']) # so mypy knows it is a string |
There was a problem hiding this comment.
you could also use mypy.cast to not have to use a comment here
There was a problem hiding this comment.
I generally prefer this for simple types, as it is clear what is happening (whereas you have to be familiar with mypy.cast to immediately know what's being done and why).
mfeurer
left a comment
There was a problem hiding this comment.
It seems that there are right now three type issues which I unfortunately cannot handle from the web interface, could you please check these?
|
I fixed the mypy errors by using |
|
Looks like my local mypy reported different errors than CI. Great. |
|
@mfeurer I think this is good to go. The only failure on Appveyor seems like a server issue to me: |
Several OpenML entities are sharing a lot of code in theory, but have copy paste duplicate code in practice. This PR introduces a base class from which OpenML entities can derive and share common logic. In this draft some bare basics are implemented and OpenMLFlow derives from it.
This will be further extended to make the other main entities (Dataset, Task, Run and Study) derive from the base class.
I will take a look at a few other functions shared between some or all of those types such as
_to_xmlandpublish.edit: looks like unit tests fail due to illegal type annotation for Py3.6, please ignore. The Flow unit tests worked locally, will fix it to be Py3.6 compatible.
edit: Also fixes #433