Skip to content

Conversation

@lhoestq
Copy link
Member

@lhoestq lhoestq commented Apr 27, 2021

We store a redundant copy of the features in the metadata of the schema of the arrow table. This is used to recover the features when doing Dataset.from_file. These metadata are updated after each transfor, that changes the feature types.

For each function that transforms the feature types of the dataset, I added a step in the tests to make sure the metadata in the arrow schema are up to date.

I also added a line to update the metadata directly in the Dataset.init method.
This way even a dataset instantiated with init will have a table with the right metadata.

Fix #2271.

cc @mariosasko

@lhoestq lhoestq merged commit 9a3fc19 into master Apr 29, 2021
@lhoestq lhoestq deleted the always-update-metadata-in-arrow-schema branch April 29, 2021 09:57
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.

Synchronize table metadata with features

2 participants