-
Notifications
You must be signed in to change notification settings - Fork 3k
[CI] Fix some warnings #4547
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
[CI] Fix some warnings #4547
Changes from 13 commits
00ce68b
5541c57
2ca3620
877c7a9
ab17252
3041959
bcdb64a
305c6b4
4cd685b
6841ebc
6cdcee2
899e544
5741988
020a18b
031e8d0
ec7a245
26cb868
21769e2
03a81b4
3237c8d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,7 +5,7 @@ | |
| from datasets.commands.dummy_data import DummyDataCommand | ||
| from datasets.commands.env import EnvironmentCommand | ||
| from datasets.commands.run_beam import RunBeamCommand | ||
| from datasets.commands.test import TestCommand | ||
| from datasets.commands.test import CLITestCommand | ||
|
||
| from datasets.utils.logging import set_verbosity_info | ||
|
|
||
|
|
||
|
|
@@ -23,7 +23,7 @@ def main(): | |
| # Register commands | ||
| ConvertCommand.register_subcommand(commands_parser) | ||
| EnvironmentCommand.register_subcommand(commands_parser) | ||
| TestCommand.register_subcommand(commands_parser) | ||
| CLITestCommand.register_subcommand(commands_parser) | ||
lhoestq marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| RunBeamCommand.register_subcommand(commands_parser) | ||
| DummyDataCommand.register_subcommand(commands_parser) | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -65,8 +65,8 @@ def _tensorize(self, value): | |||||||||
| def _recursive_tensorize(self, data_struct: dict): | ||||||||||
| # support for nested types like struct of list of struct | ||||||||||
| if isinstance(data_struct, (list, np.ndarray)): | ||||||||||
| if ( | ||||||||||
| data_struct.dtype == np.object | ||||||||||
| if data_struct.dtype == np.dtype( | ||||||||||
| "object" | ||||||||||
|
||||||||||
| if data_struct.dtype == np.dtype( | |
| "object" | |
| if ( | |
| data_struct.dtype == object |
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.
This is not resolved yet.
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -46,7 +46,9 @@ def _recursive_tensorize(self, data_struct: dict): | |||||||||
| # support for nested types like struct of list of struct | ||||||||||
| if isinstance(data_struct, (list, np.ndarray)): | ||||||||||
| data_struct = np.array(data_struct, copy=False) | ||||||||||
| if data_struct.dtype == np.object: # pytorch tensors cannot be instantied from an array of objects | ||||||||||
| if data_struct.dtype == np.dtype( | ||||||||||
| "object" | ||||||||||
| ): # pytorch tensors cannot be instantied from an array of objects | ||||||||||
|
||||||||||
| if data_struct.dtype == np.dtype( | |
| "object" | |
| ): # pytorch tensors cannot be instantied from an array of objects | |
| if data_struct.dtype == object: # pytorch tensors cannot be instantied from an array of objects |
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.
This is not resolved yet.
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.
The warning message suggests to use
boolinstead.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.
Done, and for object as well