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

Remove extend from Loader #31

Open
LukasHedegaard opened this issue Apr 8, 2020 · 1 comment
Open

Remove extend from Loader #31

LukasHedegaard opened this issue Apr 8, 2020 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@LukasHedegaard
Copy link
Owner

LukasHedegaard commented Apr 8, 2020

Currently, there may be issues if a Loader dataset has no elements. Methods that require shape, (named for instance) will not work.
There is currently a temptation to create datasets as follows:

ds = Loader(getitems_fn).named(“image”, “label”)
ds.extend(ids)

This fails because the named function is only valid after extend was called.

Removing extend from the Loader and instead pass ids via the constructor would avoid the scenario. Also, it conforms better to our otherwise functional API

ds = Loader(getitems_fn, ids).named(“image”, “label”)
@LukasHedegaard LukasHedegaard added the bug Something isn't working label Apr 8, 2020
@LukasHedegaard LukasHedegaard added this to Backlog in Kanban board via automation Apr 8, 2020
@LukasHedegaard LukasHedegaard added this to the 0.1.0 milestone Apr 15, 2020
@LukasHedegaard
Copy link
Owner Author

Fixed in #34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Kanban board
  
Backlog
Development

No branches or pull requests

1 participant