Skip to content

Conversation

@jcaip
Copy link
Contributor

@jcaip jcaip commented Oct 24, 2025

att, looks like new version of transformers needs accelerate to support device map:

======================================================================
ERROR: test_deprecated_hf_models_model_info3 (__main__.TestLoadAndRunCheckpoint.test_deprecated_hf_models_model_info3)
Test that we print correct warning message when loading a deprecated checkpoint
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jessecai/.conda/envs/ao-A-nightly/lib/python3.12/site-packages/torch/testing/_internal/common_utils.py", line 3224, in wrapper
    method(*args, **kwargs)
  File "/home/jessecai/.conda/envs/ao-A-nightly/lib/python3.12/site-packages/torch/testing/_internal/common_utils.py", line 553, in instantiated_test
    test(self, **param_kwargs)
  File "/home/jessecai/local/A/ao/test/integration/test_load_and_run_checkpoint.py", line 194, in test_deprecated_hf_models
    quantized_model = AutoModelForCausalLM.from_pretrained(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jessecai/.conda/envs/ao-A-nightly/lib/python3.12/site-packages/transformers/models/auto/auto_factory.py", line 604, in from_pretrained
    return model_class.from_pretrained(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jessecai/.conda/envs/ao-A-nightly/lib/python3.12/site-packages/transformers/modeling_utils.py", line 277, in _wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/jessecai/.conda/envs/ao-A-nightly/lib/python3.12/site-packages/transformers/modeling_utils.py", line 4806, in from_pretrained
    raise ValueError(
ValueError: Using a `device_map`, `tp_plan`, `torch.device` context manager or setting `torch.set_default_device(device)` requires `accelerate`. You can install it with `pip install accelerate`

@pytorch-bot
Copy link

pytorch-bot bot commented Oct 24, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/3244

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 45bbcf4 with merge base e9c7bea (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 24, 2025
@jcaip jcaip added the topic: not user facing Use this tag if you don't want this PR to show up in release notes label Oct 24, 2025
jcaip and others added 2 commits October 24, 2025 10:41
Removed print statements for generated IDs in the test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. topic: not user facing Use this tag if you don't want this PR to show up in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants