GithubHelp home page GithubHelp logo

Comments (7)

vietvo89 avatar vietvo89 commented on August 11, 2024 1

Hello @andrewilyas and @rsokl

I got the same issue when loading model l2 0.25 and 1.0. But loading model l2 0.5 and l_inf_8 has no problem. I followed your recommendation to downgrade dill 0.3.4 to 0.3.2, but it did not work. I am using python 3.8. Please do me a favor!

Thanks

from robustness.

andrewilyas avatar andrewilyas commented on August 11, 2024

Hi! Can you please indicate what version of dill is in each environment?

from robustness.

rsokl avatar rsokl commented on August 11, 2024

Sure! Both versions are using

dill                      0.3.2                    pypi_0    pypi

from robustness.

andrewilyas avatar andrewilyas commented on August 11, 2024

Sorry forgot to follow up on this! Can you also post your torch version on the 3.7 environment? Is it the same?

from robustness.

rsokl avatar rsokl commented on August 11, 2024

It is the same - 1.6.0

Both environments have the same library versions. Only the Python version is different

from robustness.

andrewilyas avatar andrewilyas commented on August 11, 2024

Ok looks like this is a known issue with dill (uqfoundation/dill#357), but it was patched in the latest version. If you have both 3.7 and 3.8 on your machine, you can fix this yourself by doing:

  1. Update dill to 0.3.2 in both versions
  2. In Python 3.7, execute:
import torch, dill
x = torch.load("cifar_l2_1_0.pt", pickle_module=dill)
torch.save(x, "cifar_l2_1_0.pt", pickle_module=dill)
  1. In Python 3.8, you should now be able to load the checkpoint using your attached code.

Meanwhile, we will do this for all the links we have above so that the public versions are also cross-compatible.

from robustness.

rsokl avatar rsokl commented on August 11, 2024

Great, I will give that a shot. Thank you for your help!

Closing this assuming that the above route will work without a hitch :)

from robustness.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.