I have the same problem when following Summarization section of chapter 7 in NLP Course
Summarization - Hugging Face NLP Course
from transformers import Seq2SeqTrainer
trainer = Seq2SeqTrainer(
model,
args,
train_dataset=tokenized_datasets["train"],
eval_dataset=tokenized_datasets["validation"],
data_collator=data_collator,
tokenizer=tokenizer,
compute_metrics=compute_metrics,
)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[32], line 3
1 from transformers import Seq2SeqTrainer
----> 3 trainer = Seq2SeqTrainer(
4 model,
5 args,
6 train_dataset=tokenized_datasets["train"],
7 eval_dataset=tokenized_datasets["validation"],
8 data_collator=data_collator,
9 tokenizer=tokenizer,
10 compute_metrics=compute_metrics,
11 )
File ~/micromamba/envs/nlpcourse/lib/python3.10/site-packages/transformers/trainer.py:489, in Trainer.__init__(self, model, args, data_collator, train_dataset, eval_dataset, tokenizer, model_init, compute_metrics, callbacks, optimizers, preprocess_logits_for_metrics)
487 # Create clone of distant repo and output directory if needed
488 if self.args.push_to_hub:
--> 489 self.init_git_repo(at_init=True)
490 # In case of pull, we need to make sure every process has the latest.
491 if is_torch_tpu_available():
File ~/micromamba/envs/nlpcourse/lib/python3.10/site-packages/transformers/trainer.py:3284, in Trainer.init_git_repo(self, at_init)
3281 repo_name = get_full_repo_name(repo_name, token=self.args.hub_token)
3283 try:
-> 3284 self.repo = Repository(
3285 self.args.output_dir,
3286 clone_from=repo_name,
3287 use_auth_token=use_auth_token,
3288 private=self.args.hub_private_repo,
3289 )
3290 except EnvironmentError:
3291 if self.args.overwrite_output_dir and at_init:
3292 # Try again after wiping output_dir
File ~/micromamba/envs/nlpcourse/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py:120, in validate_hf_hub_args.._inner_fn(*args, **kwargs)
117 if check_use_auth_token:
118 kwargs = smoothly_deprecate_use_auth_token(fn_name=fn.__name__, has_token=has_token, kwargs=kwargs)
--> 120 return fn(*args, **kwargs)
TypeError: Repository.__init__() got an unexpected keyword argument 'private'
env:
❯ conda list
List of packages in environment: "/home/john/micromamba/envs/nlpcourse"
Name Version Build Channel
──────────────────────────────────────────────────────────────────────────────────────────────
_libgcc_mutex 0.1 conda_forge conda-forge
_openmp_mutex 4.5 2_gnu conda-forge
abseil-cpp 20211102.0 hd4dd3e8_0 anaconda/pkgs/main
absl-py 1.3.0 py310h06a4308_0 anaconda/pkgs/main
accelerate 0.19.0 pyhd8ed1ab_0 anaconda/cloud/conda-forge
aiohttp 3.8.3 py310h5eee18b_0 anaconda/pkgs/main
aiosignal 1.2.0 pyhd3eb1b0_0 anaconda/pkgs/main
appdirs 1.4.4 pyhd3eb1b0_0 anaconda/pkgs/main
arrow 1.2.3 py310h06a4308_1 anaconda/pkgs/main
arrow-cpp 8.0.0 py310h3098874_1 anaconda/pkgs/main
asttokens 2.0.5 pyhd3eb1b0_0 anaconda/pkgs/main
async-timeout 4.0.2 py310h06a4308_0 anaconda/pkgs/main
attrs 22.1.0 py310h06a4308_0 anaconda/pkgs/main
aws-c-common 0.4.57 he6710b0_1 anaconda/pkgs/main
aws-c-event-stream 0.1.6 h2531618_5 anaconda/pkgs/main
aws-checksums 0.1.9 he6710b0_0 anaconda/pkgs/main
aws-sdk-cpp 1.8.185 hce553d0_0 anaconda/pkgs/main
backcall 0.2.0 pyhd3eb1b0_0 anaconda/pkgs/main
beautifulsoup4 4.12.2 py310h06a4308_0 anaconda/pkgs/main
binaryornot 0.4.4 pyhd3eb1b0_1 anaconda/pkgs/main
blas 1.0 mkl anaconda/pkgs/main
boost-cpp 1.73.0 h7f8727e_12 anaconda/pkgs/main
brotlipy 0.7.0 py310h7f8727e_1002 anaconda/pkgs/main
bzip2 1.0.8 h7b6447c_0 anaconda/pkgs/main
c-ares 1.19.1 hd590300_0 conda-forge
ca-certificates 2023.05.30 h06a4308_0 anaconda/pkgs/main
certifi 2023.5.7 py310h06a4308_0 anaconda/pkgs/main
cffi 1.15.1 py310h5eee18b_3 anaconda/pkgs/main
chardet 4.0.0 py310h06a4308_1003 anaconda/pkgs/main
charset-normalizer 2.0.4 pyhd3eb1b0_0 anaconda/pkgs/main
click 8.1.3 unix_pyhd8ed1ab_2 conda-forge
comm 0.1.2 py310h06a4308_0 anaconda/pkgs/main
cookiecutter 1.7.3 pyhd3eb1b0_0 anaconda/pkgs/main
cryptography 39.0.1 py310h9ce1e76_0 anaconda/pkgs/main
cuda-cudart 11.8.89 0 nvidia
cuda-cupti 11.8.87 0 nvidia
cuda-libraries 11.8.0 0 nvidia
cuda-nvrtc 11.8.89 0 nvidia
cuda-nvtx 11.8.86 0 nvidia
cuda-runtime 11.8.0 0 nvidia
dataclasses 0.8 pyh6d0b6a4_7 anaconda/pkgs/main
datasets 2.12.0 py310h06a4308_0 anaconda/pkgs/main
debugpy 1.5.1 py310h295c915_0 anaconda/pkgs/main
decorator 5.1.1 pyhd3eb1b0_0 anaconda/pkgs/main
dill 0.3.6 pyhd8ed1ab_1 conda-forge
evaluate 0.4.0 py310h06a4308_0 anaconda/pkgs/main
executing 0.8.3 pyhd3eb1b0_0 anaconda/pkgs/main
ffmpeg 4.3 hf484d3e_0 pytorch
filelock 3.9.0 py310h06a4308_0 anaconda/pkgs/main
freetype 2.12.1 h4a9f257_0 anaconda/pkgs/main
frozenlist 1.3.3 py310h5eee18b_0 anaconda/pkgs/main
fsspec 2023.5.0 pyh1a96a4e_0 conda-forge
gflags 2.2.2 he1b5a44_1004 conda-forge
giflib 5.2.1 h5eee18b_3 anaconda/pkgs/main
glog 0.6.0 h6f12383_0 conda-forge
gmp 6.2.1 h295c915_3 anaconda/pkgs/main
gmpy2 2.1.2 py310heeb90bb_0 anaconda/pkgs/main
gnutls 3.6.15 he1e5248_0 anaconda/pkgs/main
grpc-cpp 1.46.1 h33aed49_1 anaconda/pkgs/main
huggingface_hub 0.14.1 py310h06a4308_0 anaconda/pkgs/main
icu 58.2 he6710b0_3 anaconda/pkgs/main
idna 3.4 py310h06a4308_0 anaconda/pkgs/main
importlib-metadata 6.6.0 pyha770c72_0 conda-forge
importlib_metadata 6.6.0 hd8ed1ab_0 conda-forge
intel-openmp 2023.1.0 hdb19cb5_46305 anaconda/pkgs/main
ipykernel 6.19.2 py310h2f386ee_0 anaconda/pkgs/main
ipython 8.12.0 py310h06a4308_0 anaconda/pkgs/main
ipywidgets 8.0.4 py310h06a4308_0 anaconda/pkgs/main
jedi 0.18.1 py310h06a4308_1 anaconda/pkgs/main
jinja2 3.1.2 py310h06a4308_0 anaconda/pkgs/main
jinja2-time 0.2.0 pyhd3eb1b0_3 anaconda/pkgs/main
joblib 1.2.0 pyhd8ed1ab_0 conda-forge
jpeg 9e h5eee18b_1 anaconda/pkgs/main
jupyter_client 8.1.0 py310h06a4308_0 anaconda/pkgs/main
jupyter_core 5.3.0 py310h06a4308_0 anaconda/pkgs/main
jupyterlab_widgets 3.0.5 py310h06a4308_0 anaconda/pkgs/main
keyutils 1.6.1 h166bdaf_0 conda-forge
krb5 1.19.4 h568e23c_0 anaconda/pkgs/main
lame 3.100 h7b6447c_0 anaconda/pkgs/main
lcms2 2.12 h3be6417_0 anaconda/pkgs/main
ld_impl_linux-64 2.38 h1181459_1 anaconda/pkgs/main
lerc 3.0 h295c915_0 anaconda/pkgs/main
libabseil 20211102.0 cxx17_h48a1fff_3 anaconda/cloud/conda-forge
libboost 1.73.0 h28710b8_12 anaconda/pkgs/main
libbrotlicommon 1.0.9 h166bdaf_8 conda-forge
libbrotlidec 1.0.9 h166bdaf_8 conda-forge
libbrotlienc 1.0.9 h166bdaf_8 conda-forge
libcrc32c 1.1.2 h9c3ff4c_0 conda-forge
libcublas 11.11.3.6 0 nvidia
libcufft 10.9.0.58 0 nvidia
libcufile 1.6.1.9 0 nvidia
libcurand 10.3.2.106 0 nvidia
libcurl 7.88.1 h91b91d3_0 anaconda/pkgs/main
libcusolver 11.4.1.48 0 nvidia
libcusparse 11.7.5.86 0 nvidia
libdeflate 1.17 h5eee18b_0 anaconda/pkgs/main
libedit 3.1.20221030 h5eee18b_0 anaconda/pkgs/main
libev 4.33 h516909a_1 conda-forge
libevent 2.1.12 h8f2d780_0 anaconda/pkgs/main
libffi 3.4.4 h6a678d5_0 anaconda/pkgs/main
libgcc-ng 12.2.0 h65d4601_19 conda-forge
libgfortran-ng 11.2.0 h00389a5_1 anaconda/pkgs/main
libgfortran5 11.2.0 h1234567_1 anaconda/pkgs/main
libgomp 12.2.0 h65d4601_19 conda-forge
libiconv 1.16 h7f8727e_2 anaconda/pkgs/main
libidn2 2.3.4 h5eee18b_0 anaconda/pkgs/main
libnghttp2 1.46.0 hce63b2e_0 anaconda/pkgs/main
libnpp 11.8.0.86 0 nvidia
libnsl 2.0.0 h7f98852_0 conda-forge
libnuma 2.0.16 h0b41bf4_1 conda-forge
libnvjpeg 11.9.0.86 0 nvidia
libpng 1.6.39 h5eee18b_0 anaconda/pkgs/main
libprotobuf 3.20.3 he621ea3_0 anaconda/pkgs/main
libsodium 1.0.18 h7b6447c_0 anaconda/pkgs/main
libsqlite 3.42.0 h2797004_0 conda-forge
libssh2 1.10.0 h8f2d780_0 anaconda/pkgs/main
libstdcxx-ng 12.2.0 h46fd767_19 conda-forge
libtasn1 4.19.0 h5eee18b_0 anaconda/pkgs/main
libthrift 0.15.0 hcc01f38_0 anaconda/pkgs/main
libtiff 4.5.0 h6a678d5_2 anaconda/pkgs/main
libunistring 0.9.10 h27cfd23_0 anaconda/pkgs/main
libutf8proc 2.8.0 h166bdaf_0 conda-forge
libuuid 1.41.5 h5eee18b_0 anaconda/pkgs/main
libwebp 1.2.4 h11a3e52_1 anaconda/pkgs/main
libwebp-base 1.2.4 h5eee18b_1 anaconda/pkgs/main
libzlib 1.2.13 h166bdaf_4 conda-forge
lz4-c 1.9.4 h6a678d5_0 anaconda/pkgs/main
markupsafe 2.1.1 py310h7f8727e_0 anaconda/pkgs/main
matplotlib-inline 0.1.6 py310h06a4308_0 anaconda/pkgs/main
mkl 2023.1.0 h6d00ec8_46342 anaconda/pkgs/main
mkl-service 2.4.0 py310h5eee18b_1 anaconda/pkgs/main
mkl_fft 1.3.6 py310h1128e8f_1 anaconda/pkgs/main
mkl_random 1.2.2 py310h1128e8f_1 anaconda/pkgs/main
mpc 1.1.0 h10f8cd9_1 anaconda/pkgs/main
mpfr 4.0.2 hb69a4c5_1 anaconda/pkgs/main
mpmath 1.2.1 py310h06a4308_0 anaconda/pkgs/main
multidict 6.0.2 py310h5eee18b_0 anaconda/pkgs/main
multiprocess 0.70.14 py310h5764c6d_3 conda-forge
ncurses 6.4 h6a678d5_0 anaconda/pkgs/main
nest-asyncio 1.5.6 py310h06a4308_0 anaconda/pkgs/main
nettle 3.7.3 hbbd107a_1 anaconda/pkgs/main
networkx 2.8.4 py310h06a4308_1 anaconda/pkgs/main
nltk 3.7 pyhd3eb1b0_0 anaconda/pkgs/main
numpy 1.24.3 py310h5f9d8c6_1 anaconda/pkgs/main
numpy-base 1.24.3 py310hb5e798b_1 anaconda/pkgs/main
openh264 2.1.1 h4ff587b_0 anaconda/pkgs/main
openssl 1.1.1t h7f8727e_0 anaconda/pkgs/main
orc 1.7.4 hb3bc3d3_1 anaconda/pkgs/main
packaging 23.1 pyhd8ed1ab_0 conda-forge
pandas 2.0.2 py310h7cbd5c2_0 conda-forge
parso 0.8.3 pyhd3eb1b0_0 anaconda/pkgs/main
pexpect 4.8.0 pyhd3eb1b0_3 anaconda/pkgs/main
pickleshare 0.7.5 pyhd3eb1b0_1003 anaconda/pkgs/main
pillow 9.4.0 py310h6a678d5_0 anaconda/pkgs/main
pip 23.0.1 py310h06a4308_0 anaconda/pkgs/main
platformdirs 2.5.2 py310h06a4308_0 anaconda/pkgs/main
pooch 1.4.0 pyhd3eb1b0_0 anaconda/pkgs/main
poyo 0.5.0 pyhd3eb1b0_0 anaconda/pkgs/main
prompt-toolkit 3.0.36 py310h06a4308_0 anaconda/pkgs/main
protobuf 3.20.3 py310h6a678d5_0 anaconda/pkgs/main
psutil 5.9.0 py310h5eee18b_0 anaconda/pkgs/main
ptyprocess 0.7.0 pyhd3eb1b0_2 anaconda/pkgs/main
pure_eval 0.2.2 pyhd3eb1b0_0 anaconda/pkgs/main
pyarrow 8.0.0 py310h468efa6_0 anaconda/pkgs/main
pycparser 2.21 pyhd3eb1b0_0 anaconda/pkgs/main
pygments 2.15.1 py310h06a4308_1 anaconda/pkgs/main
pyopenssl 23.0.0 py310h06a4308_0 anaconda/pkgs/main
pysocks 1.7.1 py310h06a4308_0 anaconda/pkgs/main
python 3.10.11 h7a1cb2a_2 anaconda/pkgs/main
python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge
python-slugify 5.0.2 pyhd3eb1b0_0 anaconda/pkgs/main
python-tzdata 2023.3 pyhd8ed1ab_0 conda-forge
python-xxhash 3.2.0 py310h1fa729e_0 conda-forge
python_abi 3.10 2_cp310 anaconda/cloud/conda-forge
pytorch 2.0.1 py3.10_cuda11.8_cudnn8.7.0_0 pytorch
pytorch-cuda 11.8 h7e8668a_5 pytorch
pytorch-mutex 1.0 cuda pytorch
pytz 2023.3 pyhd8ed1ab_0 conda-forge
pyyaml 6.0 py310h5764c6d_5 conda-forge
pyzmq 25.0.2 py310h6a678d5_0 anaconda/pkgs/main
rdma-core 28.9 h59595ed_1 conda-forge
re2 2022.04.01 h295c915_0 anaconda/pkgs/main
readline 8.2 h5eee18b_0 anaconda/pkgs/main
regex 2023.5.5 py310h2372a71_0 conda-forge
requests 2.29.0 py310h06a4308_0 anaconda/pkgs/main
responses 0.13.3 pyhd3eb1b0_0 anaconda/pkgs/main
rouge-score 0.1.2 pyhd8ed1ab_0 anaconda/cloud/conda-forge
s2n 1.3.33 hae46d1a_0 anaconda/cloud/conda-forge
sacremoses 0.0.53 pyhd8ed1ab_0 conda-forge
scikit-learn 1.2.2 py310h6a678d5_1 anaconda/pkgs/main
scipy 1.10.1 py310h5f9d8c6_1 anaconda/pkgs/main
sentencepiece 0.1.99 py310hdb19cb5_0 anaconda/pkgs/main
setuptools 67.8.0 py310h06a4308_0 anaconda/pkgs/main
six 1.16.0 pyhd3eb1b0_1 anaconda/pkgs/main
snappy 1.1.10 h9fff704_0 conda-forge
soupsieve 2.4 py310h06a4308_0 anaconda/pkgs/main
sqlite 3.41.2 h5eee18b_0 anaconda/pkgs/main
stack_data 0.2.0 pyhd3eb1b0_0 anaconda/pkgs/main
sympy 1.11.1 py310h06a4308_0 anaconda/pkgs/main
tbb 2021.8.0 hdb19cb5_0 anaconda/pkgs/main
text-unidecode 1.3 pyhd3eb1b0_0 anaconda/pkgs/main
threadpoolctl 2.2.0 pyh0d69192_0 anaconda/pkgs/main
tk 8.6.12 h1ccaba5_0 anaconda/pkgs/main
tokenizers 0.11.4 py310h3dcd8bd_1 anaconda/pkgs/main
torchaudio 2.0.2 py310_cu118 pytorch
torchtriton 2.0.0 py310 pytorch
torchvision 0.15.2 py310_cu118 pytorch
tornado 6.2 py310h5eee18b_0 anaconda/pkgs/main
tqdm 4.65.0 py310h2f386ee_0 anaconda/pkgs/main
traitlets 5.7.1 py310h06a4308_0 anaconda/pkgs/main
transformers 4.24.0 py310h06a4308_0 anaconda/pkgs/main
typing-extensions 4.5.0 py310h06a4308_0 anaconda/pkgs/main
typing_extensions 4.5.0 py310h06a4308_0 anaconda/pkgs/main
tzdata 2023c h04d1e81_0 anaconda/pkgs/main
ucx 1.14.1 hf587318_2 anaconda/cloud/conda-forge
unidecode 1.2.0 pyhd3eb1b0_0 anaconda/pkgs/main
urllib3 1.26.16 py310h06a4308_0 anaconda/pkgs/main
utf8proc 2.6.1 h27cfd23_0 anaconda/pkgs/main
wcwidth 0.2.5 pyhd3eb1b0_0 anaconda/pkgs/main
wheel 0.38.4 py310h06a4308_0 anaconda/pkgs/main
widgetsnbextension 4.0.5 py310h06a4308_0 anaconda/pkgs/main
xxhash 0.8.1 h0b41bf4_0 conda-forge
xz 5.4.2 h5eee18b_0 anaconda/pkgs/main
yaml 0.2.5 h7f98852_2 conda-forge
yarl 1.8.1 py310h5eee18b_0 anaconda/pkgs/main
zeromq 4.3.4 h2531618_0 anaconda/pkgs/main
zipp 3.15.0 pyhd8ed1ab_0 conda-forge
zlib 1.2.13 h166bdaf_4 conda-forge
zstd 1.5.5 hc292b87_0 anaconda/pkgs/main
anyone could give a help to fix it ?