AttributeError: module 'dill._dill' has no attribute 'stack'

Viewed 170

Use this colab https://colab.research.google.com/drive/12LjJazBl7Gam0XBPy_y0CTOJZeZ34c2v?usp=sharing

my CUDA Version: 11.2

when do this

train_dataset = train_dataset.map(
    process_data_to_model_inputs,
    batched=True,
    batch_size=batch_size,
    remove_columns=["article", "abstract", "section_names"],
)

AttributeError: module 'dill._dill' has no attribute 'stack'

I have try this

pip install dill==0.3.4

but not work

How to solve this problems, Thinks!

1 Answers

I'm the dill author. dill._dill.stack is not part of the public interface, and can't be guaranteed to be there. It was removed in 0.3.5 (and above). It is available in 0.3.4. If you have already installed 0.3.5.1 or something larger than 0.3.4, you will need to pip uninstall or force-reinstall the specific package version.

See: Installing specific package version with pip

Related