Skip to content

[Bug]: Unable to pickle MatterSim ACE Calculator #83

@chiang-yuan

Description

@chiang-yuan

Contact Details

No response

Bug Description

As title, pickling MatterSim ACE Calculator will raise TypeError: cannot pickle 'weakref.ReferenceType' object.

from mattersim.forcefield import MatterSimCalculator
import pickle

calc = MatterSimCalculator()

pickle.dumps(calc)

MatterSim Version

1.0.0rc9

Python Version

3.11

Reproduction Steps

from mattersim.forcefield import MatterSimCalculator
import pickle

pickle.dumps(calc)

Expected Behavior

without any error

Actual Behavior

----> 1 pickle.dumps(calc)

TypeError: cannot pickle 'weakref.ReferenceType' object

Error Logs

Code of Conduct

  • I agree to follow the project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions