Skip to content

Instantly share code, notes, and snippets.

@tomigee
tomigee / pytest_error.txt
Created March 12, 2024 15:07
Error using pytest command
ERROR: usage: __main__.py [options] [file_or_dir] [file_or_dir] [...]
__main__.py: error: unrecognized arguments: -n --dist=loadfile tests/models/auto/test_modeling_tf_auto.py tests/models/auto/test_modeling_tf_pytorch.py tests/models/bert/test_modeling_tf_bert.py tests/models/dpr/test_modeling_tf_dpr.py tests/models/encoder_decoder/test_modeling_tf_encoder_decoder.py tests/models/rag/test_modeling_tf_rag.py tests/models/vision_text_dual_encoder/test_modeling_tf_vision_text_dual_encoder.py tests/test_modeling_tf_utils.py tests/test_modeling_utils.py tests/utils/test_file_utils.py
inifile: /Users/tomi/DevProjects/transformers/pyproject.toml
rootdir: /Users/tomi/DevProjects/transformers
@tomigee
tomigee / make_repo-consistency_error.txt
Created March 12, 2024 15:01
Error encountered running `make repo-consistency`
python utils/check_copies.py
python utils/check_table.py
python utils/check_dummies.py
python utils/check_repo.py
Checking all models are included.
Checking all models are public.
Checking all models are properly tested.
Checking all objects are properly documented.
Checking all models are in at least one auto class.
utils/check_repo.py:368: UserWarning: Full repo consistency checks require all backends to be installed (with `pip install -e '.[dev]'` in the Transformers repo, the following are missing: PyTorch, Flax. While it's probably fine as long as you didn't make any change in one of those backends modeling files, you should probably execute the command above to be on the safe side.
@tomigee
tomigee / InvalidArgumentError.txt
Created March 8, 2024 20:02
[Traceback for Bug Report] TFBertModel: InvalidArgumentError.__init__() missing 2 required positional arguments: 'op' and 'message'
InvalidArgumentError Traceback (most recent call last)
File ~/miniconda3/envs/WeThePeople/lib/python3.10/site-packages/transformers/modeling_tf_pytorch_utils.py:348, in load_pytorch_state_dict_in_tf2_model(tf_model, pt_state_dict, tf_inputs, allow_missing_keys, output_loading_info, _prefix, tf_to_pt_weight_rename, ignore_mismatched_sizes)
347 try:
--> 348 array = apply_transpose(transpose, array, symbolic_weight.shape)
349 except tf.errors.InvalidArgumentError as e:
File ~/miniconda3/envs/WeThePeople/lib/python3.10/site-packages/transformers/modeling_tf_pytorch_utils.py:143, in apply_transpose(transpose, weight, match_shape, pt_to_tf)
142 try:
--> 143 weight = reshape(weight, match_shape)
144 except AssertionError as e: