Accelerator unit tests are failing due to `TypeError: load_model() got an unexpected keyword argument 'device'`
envgap__huggingface__accelerate-2939
01 / FAILURE SIGNATURE
As reported upstream
Several unit tests are failing with the error messages similar to `FAILED tests/test_accelerator.py::AcceleratorTester::test_save_load_model_use_safetensors - TypeError: load_model() got an unexpected keyword argument 'device'` which appears to originate from https://github.com/huggingface/accelerate/blob/main/src/accelerate/checkpointing.py#L208
Not a benchmark task.
- The project already builds and runs before the fix, so there is nothing to repair.
02 / ENVIRONMENT RECIPE
- Base commit
415eddf1bee77da9ae0b98b1900a342c6a5a235a- Manifest
setup.py- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
huggingface/accelerate #2939 · read the original issue
Several unit tests are failing with the error messages similar to `FAILED tests/test_accelerator.py::AcceleratorTester::test_save_load_model_use_safetensors - TypeError: load_model() got an unexpected keyword argument 'device'` which appears to originate from https://github.com/huggingface/accelerate/blob/main/src/accelerate/checkpointing.py#L208 For the versions of the packages below, running `make test` or `pytest tests/test_accelerator.py` on the main branch fails on my machine: ``` $ conda list | grep torch ffmpeg 4.3 hf484d3e_0 pytorch libjpeg-turbo 2.0.0 h9bf148f_0 pytorch pytorch 2.3.1 py3.11_cuda12.1_cudnn8.9.2_0 pytorch pytorch-cuda 12.1 ha16c6d3_5 pytorch pytorch-mutex 1.0 cuda pytorch torchaudio 2.3.1 py311_cu121 pytorch torchdata 0.7.1.dev20240703+cpu pypi_0 pypi torchtriton 2.3.1 py311 pytorch torchvision 0.18.1 py311_cu121 pytorch ```
04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]