-
Notifications
You must be signed in to change notification settings - Fork 3k
Fix use_dataset.mdx #6351
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
Fix use_dataset.mdx #6351
Conversation
The current example isn't working because it can find labels inside the Dataset object. So I've added an extra step to the process. Tested and working in Colab.
Missing closing bracket
|
The documentation is not available anymore as the PR was closed or merged. |
mariosasko
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
docs/source/use_dataset.mdx
Outdated
| ***4**. Add the `labels` key with the current label info to match the columns of the current model: | ||
| ```py | ||
| >>> dataset = dataset.map(lambda example: {"labels": example["label"]}, batched=True) | ||
| ``` | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can avoid introducing a new step by replacing labels mentions with label in the existing ones.
mariosasko
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made the changes myself. Looks good now. Thanks!
Show benchmarksPyArrow==8.0.0 Show updated benchmarks!Benchmark: benchmark_array_xd.json
Benchmark: benchmark_getitem_100B.json
Benchmark: benchmark_indices_mapping.json
Benchmark: benchmark_iterating.json
Benchmark: benchmark_map_filter.json
Show updated benchmarks!Benchmark: benchmark_array_xd.json
Benchmark: benchmark_getitem_100B.json
Benchmark: benchmark_indices_mapping.json
Benchmark: benchmark_iterating.json
Benchmark: benchmark_map_filter.json
|

The current example isn't working because it can't find
labelsinside the Dataset object. So I've added an extra step to the process. Tested and working in Colab.