Skip to content

Setup caching#394

Merged
mfeurer merged 12 commits intodevelopfrom
setup_caching
Feb 16, 2018
Merged

Setup caching#394
mfeurer merged 12 commits intodevelopfrom
setup_caching

Conversation

@janvanrijn
Copy link
Copy Markdown
Member

This PR contains three branches:

  • Localruns (enables loading runs that are stored locally)
  • Adds an independent tagging function
  • corrects caching of runs, adds caching of setups

@janvanrijn
Copy link
Copy Markdown
Member Author

@mfeurer Could you have a look this week? Thanks!

@codecov-io
Copy link
Copy Markdown

codecov-io commented Feb 12, 2018

Codecov Report

Merging #394 into develop will decrease coverage by 0.16%.
The diff coverage is 95.83%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #394      +/-   ##
===========================================
- Coverage    89.34%   89.18%   -0.17%     
===========================================
  Files           32       32              
  Lines         2610     2653      +43     
===========================================
+ Hits          2332     2366      +34     
- Misses         278      287       +9
Impacted Files Coverage Δ
openml/runs/functions.py 86.19% <100%> (+0.09%) ⬆️
openml/setups/functions.py 94.35% <100%> (+1.28%) ⬆️
openml/utils.py 64.44% <88.23%> (+14.44%) ⬆️
openml/testing.py 88.23% <0%> (-10.3%) ⬇️

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 194706d...34a86a1. Read the comment docs.

Copy link
Copy Markdown
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.

I don't get what you mean with Localruns, could you please explain that?

Comment thread openml/utils.py Outdated


def _tag_entity(entity_type, entity_id, tag, untag=False):
"""Abstract function that can be used as a partial for tagging entities
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I do not see where this is used as a partial (assuming you mean functools.partial). Could you please clarify the docstring?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I haven't put these functions in yet. I will change the description, as this function can also be used standalone.


def test_get_cached_setup(self):
openml.config.set_cache_directory(self.static_cache_dir)
openml.setups.functions._get_cached_setup(1)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It would be great to have a test which checks that there's an exception for trying to access an uncached dataset.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Don't see how this would be different from test_get_uncached_setup() ?

We now test the following cases:

  • test_get_setup (downloads a setup and caches it)
  • test_get_cached_setup (retrieves a setup from cache)
  • test_get_uncached_setup (tries to retrieve an uncached setup, and throws an error)

Comment thread openml/utils.py Outdated
Returns
-------
tags : list
List of tags that the entity is still tagged with
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Maybe write List of tags that the entity is (still) tagged with because the number of tags could also increase, right?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Agreed

@janvanrijn
Copy link
Copy Markdown
Member Author

Localruns: a run object that is stored locally before uploading (hence it does not contain run id, uploader, upload_date, etc)

@mfeurer mfeurer merged commit ba7b2eb into develop Feb 16, 2018
@mfeurer mfeurer deleted the setup_caching branch February 16, 2018 15:27
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