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

Define API for accessing DataLoader class attributes #46

Closed
aribrill opened this issue Jul 19, 2018 · 0 comments · Fixed by #117
Closed

Define API for accessing DataLoader class attributes #46

aribrill opened this issue Jul 19, 2018 · 0 comments · Fixed by #117
Assignees

Comments

@aribrill
Copy link
Collaborator

All HDF5DataLoader class attributes are currently specific to that class as opposed to DataLoader, but are accessed outside the class in run_model.py.

When defining data_loader, generator_output_dtypes, map_fn_output_dtypes, output_names, and output_is_label are all accessed. It doesn't seem these are specific to the data format, so if they are made part of the DataLoader base class, then this entire section except for data_loader = HDF5DataLoader() can be pulled out of the if clause, resulting in cleaner code.

Similarly, when getting the event indices in predict mode, example_type and examples are accessed and the event index names are manually defined, but again it may be possible to define all these in such a way that the event indices whatever they may be could be accessed for any DataLoader without relying on specific attributes for each DataLoader subclass.

This issue is probably best tackled at the time we actually add another DataLoader subclass.

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 a pull request may close this issue.

2 participants