Describe the bug
Creating a mace calcluator on XPU currently gives the following error:
File "/python3.11/site-packages/mace/calculators/mace.py", line 256, in init model = ipex.optimize(model) ^^^^^^^^^^^^^^^^^^^^ File
"python3.11/site-packages/intel_extension_for_pytorch/frontend.py", line 337, in optimize assert optimizer is not None, "The optimizer should be given for training mode" ^^^^^^^^^^^^^^^^^^^^^AssertionError: The optimizer should be given for training mode
To Reproduce
Script to reproduce the behavior:
from mace.calculators import MACECalculator
calculator = MACECalculator(
model_paths="mace-mp-0b3-medium.model",
device='xpu',
)
Additional context
@naik-aakash suggested to add model.eval above line 262 in mace/calculators/mace.py . This fixes the calculator creaton problem and lets us successfully run structure relaxations, however we have not tested how this influences model fine-tuning.
Describe the bug
Creating a mace calcluator on XPU currently gives the following error:
File "/python3.11/site-packages/mace/calculators/mace.py", line 256, in init model = ipex.optimize(model) ^^^^^^^^^^^^^^^^^^^^ File
"python3.11/site-packages/intel_extension_for_pytorch/frontend.py", line 337, in optimize assert optimizer is not None, "The optimizer should be given for training mode" ^^^^^^^^^^^^^^^^^^^^^AssertionError: The optimizer should be given for training mode
To Reproduce
Script to reproduce the behavior:
from mace.calculators import MACECalculator
calculator = MACECalculator(
model_paths="mace-mp-0b3-medium.model",
device='xpu',
)
Additional context
@naik-aakash suggested to add
model.evalabove line 262 in mace/calculators/mace.py . This fixes the calculator creaton problem and lets us successfully run structure relaxations, however we have not tested how this influences model fine-tuning.