Advertisement
kopyl

Untitled

Dec 23rd, 2023
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. ---------------------------------------------------------------------------
  2. TypeError Traceback (most recent call last)
  3. Cell In[28], line 1
  4. ----> 1 train_dataset.save_to_disk("test")
  5.  
  6. File /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:1496, in Dataset.save_to_disk(self, dataset_path, fs, max_shard_size, num_shards, num_proc, storage_options)
  7. 1494 json.dumps(state["_format_kwargs"][k])
  8. 1495 except TypeError as e:
  9. -> 1496 raise TypeError(
  10. 1497 str(e) + f"\nThe format kwargs must be JSON serializable, but key '{k}' isn't."
  11. 1498 ) from None
  12. 1499 # Get json serializable dataset info
  13. 1500 dataset_info = asdict(self._info)
  14.  
  15. TypeError: Object of type function is not JSON serializable
  16. The format kwargs must be JSON serializable, but key 'transform' isn't.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement