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

local data only arrayset iteration #131

Merged
merged 2 commits into from
Oct 15, 2019

Conversation

rlizzo
Copy link
Member

@rlizzo rlizzo commented Oct 10, 2019

Motivation and Context

Why is this change required? What problem does it solve?:

added ability to iterate over keys, values, items of an arrayset with only locally available data.

Description

Describe your changes in detail:

added optional local argument to Arrayset .keys(), .values(), .items() methods. If set True, only return elements which exist on the local disk (not on a remote server). Default is False, which returns all samples recorded in the commit. This keeps the same behavior as previous uses of these methods.

Types of changes

What types of changes does your code introduce? Put an x in all the boxes that apply:

  • Documentation update
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Is this PR ready for review, or a work in progress?

  • Ready for review
  • Work in progress

How Has This Been Tested?

Put an x in the boxes that apply:

  • Current tests cover modifications made
  • New tests have been added to the test suite
  • Modifications were made to existing tests to support these changes
  • Tests may be needed, but they are not included when the PR was proposed
  • I don't know. Help!

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have signed (or will sign when prompted) the tensorwork CLA.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@rlizzo rlizzo added enhancement New feature or request Awaiting Review Author has determined PR changes area nearly complete and ready for formal review. labels Oct 10, 2019
@rlizzo rlizzo requested a review from hhsecond October 10, 2019 00:54
@codecov
Copy link

codecov bot commented Oct 10, 2019

Codecov Report

Merging #131 into master will increase coverage by 0.02%.
The diff coverage is 93.94%.

@@            Coverage Diff             @@
##           master     #131      +/-   ##
==========================================
+ Coverage   92.62%   92.65%   +0.02%     
==========================================
  Files          61       61              
  Lines       10520    10608      +88     
  Branches     1025     1041      +16     
==========================================
+ Hits         9744     9828      +84     
- Misses        564      566       +2     
- Partials      212      214       +2
Impacted Files Coverage Δ
src/hangar/checkout.py 89.63% <ø> (+0.46%) ⬆️
tests/test_arrayset.py 100% <100%> (ø) ⬆️
src/hangar/backends/selection.py 100% <100%> (ø) ⬆️
src/hangar/backends/__init__.py 100% <100%> (ø) ⬆️
src/hangar/arrayset.py 89.05% <79.31%> (-1%) ⬇️

@rlizzo rlizzo self-assigned this Oct 10, 2019
Copy link
Member

@hhsecond hhsecond left a comment

Choose a reason for hiding this comment

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

Looks good

@rlizzo rlizzo merged commit e1b0583 into tensorwerk:master Oct 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Review Author has determined PR changes area nearly complete and ready for formal review. enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants