File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
tensorflow_datasets/core/dataset_builders Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 4242from tensorflow_datasets .core import dataset_builder
4343from tensorflow_datasets .core import dataset_info
4444from tensorflow_datasets .core import download
45+ from tensorflow_datasets .core import naming
4546from tensorflow_datasets .core import split_builder as split_builder_lib
4647from tensorflow_datasets .core import splits as splits_lib
4748from tensorflow_datasets .core .features import feature as feature_lib
@@ -173,7 +174,9 @@ def __init__(
173174 if mapping is None :
174175 mapping = {}
175176 self .dataset = mlc .Dataset (jsonld , mapping = mapping )
176- self .name = py_utils .make_valid_name (self .dataset .metadata .name )
177+ self .name = py_utils .make_valid_name (
178+ naming .camelcase_to_snakecase (self .dataset .metadata .name )
179+ )
177180 self .metadata = self .dataset .metadata
178181
179182 # In TFDS, version is a mandatory attribute, while in Croissant it is only a
@@ -189,7 +192,8 @@ def __init__(
189192 record_set .id for record_set in self .metadata .record_sets
190193 ]
191194 config_names = [
192- py_utils .make_valid_name (record_set ) for record_set in record_set_ids
195+ py_utils .make_valid_name (naming .camelcase_to_snakecase (record_set ))
196+ for record_set in record_set_ids
193197 ]
194198 self .BUILDER_CONFIGS : Sequence [dataset_builder .BuilderConfig ] = [ # pylint: disable=invalid-name
195199 dataset_builder .BuilderConfig (name = config_name )
Original file line number Diff line number Diff line change @@ -194,7 +194,7 @@ def setUpClass(cls):
194194 )
195195
196196 def test_dataset_info (self ):
197- assert self .builder .name == "DummyDataset "
197+ assert self .builder .name == "dummy_dataset "
198198 assert self .builder .version == "1.2.0"
199199 assert (
200200 self .builder ._info ().citation
You can’t perform that action at this time.
0 commit comments