Skip to content

Betta meta - #253

Merged
pesser merged 5 commits into
pesser:devfrom
jhaux:betta_meta
Feb 28, 2020
Merged

pesser merged 5 commits into
pesser:devfrom
jhaux:betta_meta

Conversation

@jhaux

@jhaux jhaux commented Feb 25, 2020

Copy link
Copy Markdown
Collaborator

Adds cool new features to the MetaDataset:

  • New loader: The category loader takes an index as input and turns it into a category defined in your meta.yaml. This reduces the array size a lot, as we e.g. do not have to store a large string array but can store far better compressed integer array.
  • image and numpy loaders now have a root parameter, which is prepended to the path of a given example. This increases the portability of datasets and also make the sizes of the label arrays smaller.

Allows to define categories and load them given an index from some label
array. This is far more memory efficient than to store categorical
labels in string form, while still being human readable when loading an
example.
Images can now be loaded relative to a root parameter, which can be
definde in the meta.yaml. This makes datasets more portable and smaller,
as we do not need to store whole absolute paths.

@pesser pesser left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Nice, big fan of the root parameter! Does this break loadability of existing meta datasets?
I don't get what the category loader is for, could you given an example and maybe put that in the docstring, too?

Comment thread edflow/data/believers/meta_loaders.py Resolved
Comment thread edflow/data/believers/meta_loaders.py Resolved
@jhaux jhaux mentioned this pull request Feb 26, 2020

@pesser pesser left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

yet another betta meta, awesome!

Comment thread edflow/data/believers/meta_loaders.py Resolved
-------
category : object
``categories[index]``
"""

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Cool this docstring makes it really usable!

@pesser
pesser merged commit 34773bd into pesser:dev Feb 28, 2020
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