ModuleNotFoundError: No module named 'hiphive.fitting'

I was trying to run a python script containing commands for hiphive code:

import numpy as np
from hiphive import ForceConstantPotential, StructureContainer
from hiphive import enforce_rotational_sum_rules
from hiphive.fitting import Optimizer
from hiphive import ForceConstants
from hiphive import ClusterSpace
from ase.io import read
from hiphive.utilities import extract_parameters

Here the fourth line is causing an error. I have attached the screenshot below. Kindly help

The fitting module is deprecated and you should use the trainstation package instead.

Where did the snippet come from?

Best Fredrik

1 Like