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

Throw away value for custom dataloaders #228

Merged
merged 5 commits into from
Aug 22, 2022
Merged

Conversation

bresilla
Copy link
Contributor

Summary:

A simple _* throw away value when loading a PyTorch dataset that returns more than data, target

Features:

This simply ignores values of dataset that returns more than data, target in modelwrapper.py
Many times there is a need to create a custom dataloader that for example returns path, name etc...
And the modelwrapper.py expects always two when unloading the dataset. This simle adition
would allow to have a datatset with multiple returns, since it will ignore all of them and use only the
ones that are necessarily (only data, target)

Checklist:

  • Your code is documented (To validate this, add your module to tests/documentation_test.py).
  • Your code is tested with unit tests.
  • You moved your Issue to the PR state.

@bresilla bresilla changed the title Throw away value for costum dataloaders Throw away value for custom dataloaders Aug 19, 2022
@Dref360
Copy link
Member

Dref360 commented Aug 20, 2022

Hello!

That's a great idea, do you think we should add this to train_on_dataset and predict_on_dataset as well?

@bresilla
Copy link
Contributor Author

Yes. Definitely, I just didn't use those functions, so I didn't know to edit...

I just checked now and indeed - if we do for one, we do for all :)
I'll edit the PR and add those changes and resubmit soon.

Cheers.

Copy link
Member

@Dref360 Dref360 left a comment

Choose a reason for hiding this comment

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

LGTM thank you!

@Dref360 Dref360 enabled auto-merge (squash) August 22, 2022 13:56
@Dref360 Dref360 merged commit dbe67b4 into baal-org:master Aug 22, 2022
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.

2 participants