Skip to content

Conversation

@huydhn
Copy link
Contributor

@huydhn huydhn commented Nov 5, 2024

After #137602, the default weights_only has been set to True. This test is failing in trunk slow jobs atm

benchmark_utils/test_benchmark_utils.py::TestBenchmarkUtils::test_collect_callgrind GH job link HUD commit link

@pytorch-bot
Copy link

pytorch-bot bot commented Nov 5, 2024

🔗 Helpful Links

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

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

✅ No Failures

As of commit 2f0cf92 with merge base 59b6694 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@huydhn huydhn added the topic: not user facing topic category label Nov 5, 2024
@kit1980
Copy link
Contributor

kit1980 commented Nov 5, 2024

Let's add a TODO to allowlist required things via add_safe_globals instead of disabling weights_only.

@huydhn
Copy link
Contributor Author

huydhn commented Nov 5, 2024

Let's add a TODO to allowlist required things via add_safe_globals instead of disabling weights_only.

Good point! Let me try to see if I can do this in the correct way now instead of adding another TODO

@huydhn
Copy link
Contributor Author

huydhn commented Nov 6, 2024

I'll add the TODO then, I try to update the code snippet generated by the test to use torch.serialization.safe_globals, but still end up with UnpicklingError

add_one = torch.jit.load('/tmp/callgrind__1730858981__c5f7acde-f870-42ed-bbe2-8e7dd1ba51d7/data/add_one.pt')
with open('/tmp/callgrind__1730858981__c5f7acde-f870-42ed-bbe2-8e7dd1ba51d7/data/k.pkl', 'rb') as f:
    k = pickle.load(f)
import sys
sys.path.append('/data/users/huydo/github/pytorch/test/benchmark_utils')
from test_benchmark_utils import MyModule

with torch.serialization.safe_globals([MyModule]):
    model = torch.load('/tmp/callgrind__1730858981__c5f7acde-f870-42ed-bbe2-8e7dd1ba51d7/data/model.pt')

@huydhn
Copy link
Contributor Author

huydhn commented Nov 6, 2024

@pytorchbot merge -f 'Previous run has passed, this only add a TODO comment'

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants