You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix multiprocessing with spawn in iterable datasets (#6165)
* fixed remove columns and rename columns
* fixed rename column, removed code duplication
* linting
* typo
* added pickle test
* fixed rename column not being picklable
* linting
* added verif that the pickling process does not change the data
---------
Co-authored-by: Bruno Hays <[email protected]>
Co-authored-by: Quentin Lhoest <[email protected]>
f"Error when renaming {list(column_mapping)} to {list(column_mapping.values())}: columns {set(example) -set(column_mapping.values())} are already in the dataset."
'movie_review': 'the rock is destined to be the 21st century\'s new " conan " and that he\'s going to make a splash even greater than arnold schwarzenegger , jean-claud van damme or steven segal .'}
1936
1956
```
1937
1957
"""
1938
-
1939
-
defrename_column_fn(example):
1940
-
iforiginal_column_namenotinexample:
1941
-
raiseValueError(
1942
-
f"Error when renaming {original_column_name} to {new_column_name}: column {original_column_name} is not in the dataset."
1943
-
)
1944
-
ifnew_column_nameinexample:
1945
-
raiseValueError(
1946
-
f"Error when renaming {original_column_name} to {new_column_name}: column {new_column_name} is already in the dataset."
f"Error when renaming {list(column_mapping)} to {list(column_mapping.values())}: columns {set(example) -set(column_mapping.values())} are already in the dataset."
0 commit comments