Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pytorch tests #18

Open
swashko opened this issue Aug 2, 2023 · 1 comment
Open

Pytorch tests #18

swashko opened this issue Aug 2, 2023 · 1 comment
Assignees
Labels

Comments

@swashko
Copy link
Contributor

swashko commented Aug 2, 2023

Add tests for pytorch new and old formats

@swashko swashko added the enhancement New feature or request label Aug 2, 2023
@swashko swashko self-assigned this Aug 2, 2023
@seanpmorgan seanpmorgan added tests and removed enhancement New feature or request labels Nov 21, 2023
@swashko
Copy link
Contributor Author

swashko commented Jan 19, 2024

New format tests (safe and unsafe files) added in #87
Old format unsafe file test still needed

Barrier to old format unsafe file test is issues with torch.save()
torch.save( torch.load(model_path), f=unsafe_file_path, pickle_module=PickleInject([payload]), _use_new_zipfile_serialization=False, )
gives an error of PickleInject needing a dump method to call
pickle_module.dump(MAGIC_NUMBER, f, protocol=pickle_protocol)
but adding a dump method results in an error that it received multiple values for protocol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants