Problem in workflow mode with Python 3.11 and 3.10
All WORKFLOW mode tests fail with a fresh install with python 3.11.7 or 3.10.5. Here an example:
______________________________________________________________ ERROR at setup of test_empty_program[WORKFLOW] ______________________________________________________________
test_config = (True, True)
@pytest.fixture(name='model_kwargs')
def fixture_kwargs(test_config):
"""setting up kwargs for model instance"""
model_kwargs = {'deferred_mode': test_config[0]}
if test_config[1]:
> lpad = LaunchPad.from_file(LAUNCHPAD_LOC) if LAUNCHPAD_LOC else LaunchPad()
conftest.py:28:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
python-3.11.7_gnu_11.2__/lib/python3.11/site-packages/fireworks/utilities/fw_serializers.py:291: in from_file
return cls.from_format(f.read(), f_format=f_format)
python-3.11.7_gnu_11.2__/lib/python3.11/site-packages/fireworks/utilities/fw_serializers.py:256: in from_format
dct = yaml.safe_load(f_str)
python-3.11.7_gnu_11.2__/lib/python3.11/site-packages/ruamel/yaml/main.py:1105: in safe_load
error_deprecation('safe_load', 'load', arg="typ='safe', pure=True")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
fun = 'safe_load', method = 'load', arg = "typ='safe', pure=True", comment = 'instead of'
def error_deprecation(fun: Any, method: Any, arg: str = '', comment: str = 'instead of') -> None: # NOQA
import inspect
s = f'\n"{fun}()" has been removed, use\n\n yaml = YAML({arg})\n yaml.{method}(...)\n\n{comment}' # NOQA
try:
info = inspect.getframeinfo(inspect.stack()[2][0])
context = '' if info.code_context is None else "".join(info.code_context)
s += f' file "{info.filename}", line {info.lineno}\n\n{context}'
except Exception as e:
_ = e
s += '\n'
if sys.version_info < (3, 10):
raise AttributeError(s)
else:
> raise AttributeError(s, name=None)
E AttributeError:
E "safe_load()" has been removed, use
E
E yaml = YAML(typ='safe', pure=True)
E yaml.load(...)
E
E instead of file "python-3.11.7_gnu_11.2__/lib/python3.11/site-packages/fireworks/utilities/fw_serializers.py", line 256
E
E dct = yaml.safe_load(f_str)
python-3.11.7_gnu_11.2__/lib/python3.11/site-packages/ruamel/yaml/main.py:1039: AttributeError
It seems like a bug in fireworks (using a function removed from the yaml module) but it has to be checked independently. All tests have passed in INSTANT and DEFERRED mode.
Edited by Ivan Kondov