pytorch - 💡(How to fix) Fix DISABLED test_load_state_dict_child_swap_True (__main__.TestLoadStateDict) [2 comments, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
pytorch/pytorch#180632Fetched 2026-04-17 08:25:55
View on GitHub
Comments
2
Participants
1
Timeline
48
Reactions
0
Participants
Timeline (top)
mentioned ×21subscribed ×21labeled ×4commented ×2

Error Message

eckpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.4.1.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.4.1.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.4.2.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.4.2.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.4.3.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.4.3.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.4.4.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.4.4.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.4.5.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.4.5.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.4.6.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.4.6.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.4.7.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.4.7.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.4.8.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.4.8.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.4.9.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.4.9.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.5.0.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.5.0.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.5.1.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.5.1.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.5.2.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.5.2.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.5.3.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.5.3.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.5.4.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.5.4.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.5.5.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.5.5.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.5.6.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.5.6.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.5.7.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.5.7.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.5.8.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.5.8.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.5.9.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.5.9.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.6.0.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.6.0.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.6.1.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.6.1.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.6.2.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.6.2.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.6.3.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.6.3.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.6.4.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.6.4.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.6.5.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.6.5.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.6.6.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.6.6.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.6.7.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.6.7.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.6.8.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.6.8.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.6.9.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.6.9.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.7.0.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.7.0.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.7.1.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.7.1.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.7.2.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.7.2.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.7.3.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.7.3.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.7.4.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.7.4.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.7.5.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.7.5.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.7.6.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.7.6.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.7.7.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.7.7.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.7.8.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.7.8.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.7.9.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.7.9.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.8.0.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.8.0.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.8.1.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.8.1.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.8.2.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.8.2.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.8.3.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.8.3.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.8.4.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.8.4.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.8.5.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.8.5.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.8.6.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.8.6.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.8.7.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.8.7.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.8.8.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.8.8.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.8.9.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.8.9.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.9.0.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.9.0.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.9.1.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.9.1.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.9.2.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.9.2.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.9.3.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.9.3.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.9.4.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.9.4.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.9.5.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.9.5.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.9.6.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.9.6.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.9.7.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.9.7.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.9.8.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.9.8.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.9.9.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',). While swapping the parameter named "9.9.9.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).

To execute this test, run the following from the base repo dir: PYTORCH_TEST_WITH_DYNAMO=1 python test/nn/test_load_state_dict.py TestLoadStateDict.test_load_state_dict_child_swap_True

This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0

Root Cause

This test was disabled because it is failing in CI. See recent examples and the most recent trunk workflow logs.

Code Example

eckpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.4.1.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.4.1.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.4.2.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.4.2.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.4.3.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.4.3.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.4.4.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.4.4.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.4.5.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.4.5.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.4.6.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.4.6.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.4.7.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.4.7.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.4.8.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.4.8.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.4.9.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.4.9.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.5.0.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.5.0.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.5.1.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.5.1.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.5.2.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.5.2.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.5.3.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.5.3.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.5.4.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.5.4.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.5.5.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.5.5.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.5.6.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.5.6.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.5.7.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.5.7.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.5.8.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.5.8.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.5.9.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.5.9.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.6.0.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.6.0.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.6.1.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.6.1.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.6.2.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.6.2.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.6.3.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.6.3.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.6.4.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.6.4.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.6.5.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.6.5.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.6.6.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.6.6.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.6.7.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.6.7.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.6.8.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.6.8.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.6.9.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.6.9.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.7.0.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.7.0.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.7.1.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.7.1.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.7.2.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.7.2.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.7.3.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.7.3.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.7.4.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.7.4.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.7.5.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.7.5.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.7.6.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.7.6.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.7.7.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.7.7.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.7.8.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.7.8.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.7.9.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.7.9.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.8.0.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.8.0.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.8.1.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.8.1.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.8.2.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.8.2.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.8.3.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.8.3.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.8.4.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.8.4.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.8.5.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.8.5.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.8.6.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.8.6.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.8.7.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.8.7.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.8.8.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.8.8.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.8.9.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.8.9.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.9.0.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.9.0.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.9.1.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.9.1.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.9.2.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.9.2.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.9.3.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.9.3.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.9.4.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.9.4.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.9.5.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.9.5.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.9.6.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.9.6.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.9.7.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.9.7.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.9.8.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.9.8.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.9.9.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.9.9.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).

To execute this test, run the following from the base repo dir:
    PYTORCH_TEST_WITH_DYNAMO=1 python test/nn/test_load_state_dict.py TestLoadStateDict.test_load_state_dict_child_swap_True

This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0
RAW_BUFFERClick to expand / collapse

Platforms: dynamo

This test was disabled because it is failing in CI. See recent examples and the most recent trunk workflow logs.

Over the past 6 hours, it has been determined flaky in 10 workflow(s) with 20 failures and 10 successes.

Debugging instructions (after clicking on the recent samples link): DO NOT ASSUME THINGS ARE OKAY IF THE CI IS GREEN. We now shield flaky tests from developers so CI will thus be green but it will be harder to parse the logs. To find relevant log snippets:

  1. Click on the workflow logs linked above
  2. Click on the Test step of the job so that it is expanded. Otherwise, the grepping will not work.
  3. Grep for test_load_state_dict_child_swap_True
  4. There should be several instances run (as flaky tests are rerun in CI) from which you can study the logs.
<details><summary>Sample error message</summary>

Truncated for length

eckpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.4.1.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.4.1.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.4.2.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.4.2.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.4.3.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.4.3.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.4.4.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.4.4.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.4.5.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.4.5.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.4.6.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.4.6.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.4.7.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.4.7.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.4.8.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.4.8.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.4.9.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.4.9.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.5.0.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.5.0.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.5.1.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.5.1.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.5.2.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.5.2.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.5.3.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.5.3.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.5.4.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.5.4.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.5.5.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.5.5.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.5.6.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.5.6.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.5.7.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.5.7.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.5.8.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.5.8.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.5.9.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.5.9.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.6.0.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.6.0.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.6.1.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.6.1.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.6.2.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.6.2.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.6.3.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.6.3.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.6.4.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.6.4.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.6.5.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.6.5.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.6.6.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.6.6.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.6.7.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.6.7.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.6.8.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.6.8.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.6.9.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.6.9.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.7.0.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.7.0.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.7.1.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.7.1.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.7.2.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.7.2.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.7.3.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.7.3.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.7.4.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.7.4.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.7.5.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.7.5.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.7.6.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.7.6.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.7.7.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.7.7.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.7.8.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.7.8.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.7.9.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.7.9.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.8.0.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.8.0.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.8.1.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.8.1.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.8.2.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.8.2.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.8.3.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.8.3.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.8.4.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.8.4.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.8.5.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.8.5.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.8.6.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.8.6.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.8.7.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.8.7.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.8.8.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.8.8.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.8.9.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.8.9.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.9.0.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.9.0.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.9.1.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.9.1.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.9.2.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.9.2.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.9.3.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.9.3.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.9.4.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.9.4.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.9.5.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.9.5.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.9.6.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.9.6.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.9.7.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.9.7.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.9.8.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.9.8.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.9.9.weight", whose dimensions in the model are torch.Size([1, 1]) and whose dimensions in the checkpoint are torch.Size([1, 1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).
	While swapping the parameter named "9.9.9.bias", whose dimensions in the model are torch.Size([1]) and whose dimensions in the checkpoint are torch.Size([1]), an exception occurred : ('Cannot swap t1 because it has weakref associated with it',).

To execute this test, run the following from the base repo dir:
    PYTORCH_TEST_WITH_DYNAMO=1 python test/nn/test_load_state_dict.py TestLoadStateDict.test_load_state_dict_child_swap_True

This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0
</details>

Test file path: nn/test_load_state_dict.py

For all disabled tests (by GitHub issue), see https://hud.pytorch.org/disabled.

cc @albanD @mruberry @jbschlosser @walterddr @mikaylagawarecki @chauhang @penguinwu

extent analysis

TL;DR

The test test_load_state_dict_child_swap_True is failing due to an exception caused by a weak reference associated with a parameter, and to fix this, we need to investigate and resolve the weak reference issue.

Guidance

  • Investigate the error message to identify the specific parameters causing the weak reference issue.
  • Review the code in nn/test_load_state_dict.py to understand how the parameters are being swapped and why a weak reference is being associated with them.
  • Check if there are any existing issues or pull requests related to weak references in the PyTorch repository.
  • Consider running the test with the PYTORCH_PRINT_REPRO_ON_FAILURE=1 environment variable to get more information about the failure.

Example

No specific code example can be provided without further investigation, but the test can be run using the command PYTORCH_TEST_WITH_DYNAMO=1 python test/nn/test_load_state_dict.py TestLoadStateDict.test_load_state_dict_child_swap_True to reproduce the error.

Notes

The error message suggests that the issue is related to the swapping of parameters in the test_load_state_dict_child_swap_True test, and that a weak reference is being associated with one of the parameters. Further investigation is needed to determine the root cause of the issue.

Recommendation

Apply a workaround by modifying the test to avoid swapping parameters with weak references, or upgrade to a version of PyTorch that has fixed the weak reference issue, if available. The reason is that the test is failing due to a weak reference issue, and modifying the test or upgrading PyTorch may resolve the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING