Create a work-around for new installations due to fireworks
Fresh installations of vre-middleware will sometimes not work. This error occurs:
AttributeError:
"safe_load()" has been removed, use
yaml = YAML(typ='safe', pure=True)
yaml.load(...)
instead of file "jupyter-base-2024-05-14/lib64/python3.9/site-packages/fireworks/utilities/fw_serializers.py", line 256
dct = yaml.safe_load(f_str)
This issue has been solved in fireworks main branch but not yet released. See more discussions in this issue.
As a work-around vre-middleware tries to downgrade ruamel.yaml
automatically. If downgrade of ruamel.yaml <0.18.0
is not possible, for example when the package is installed system-wide, another, non-automatic workaround has to be performed by the user. A fresh virtual environment has to be created (without fireworks, vre-language and vre-middleware). Then
python -m pip install git+https://github.com/materialsproject/fireworks.git
python -m pip install vre-middleware