You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to add new benchmarks, but when importing the benchmark classes I get an error (starting from when I pulled main today in the morning):
# Change to directory where I have baybe github folder (parent folder of benchmarks)
# Same err occurs if importing from benchmarks directly
from benchmarks.definition import (
ConvergenceBenchmark,
ConvergenceBenchmarkSettings,
)
Traceback (most recent call last):
File "/Users/karinhrovatin/miniforge3/envs/baybe/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3577, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-2-b4d93ed0baeb>", line 1, in <module>
from benchmarks import (
File "/Applications/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "/Users/karinhrovatin/Documents/code/baybe/benchmarks/__init__.py", line 3, in <module>
from benchmarks.definition import (
File "/Applications/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "/Users/karinhrovatin/Documents/code/baybe/benchmarks/definition/__init__.py", line 3, in <module>
from benchmarks.definition.base import (
File "/Applications/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "/Users/karinhrovatin/Documents/code/baybe/benchmarks/definition/base.py", line 77, in <module>
def unstructure_benchmark(benchmark: Benchmark, _) -> dict:
TypeError: BaseConverter.register_unstructure_hook() missing 1 required positional argument: 'func'
With @fabianliebig we already tried the below change in the code, but that did not help:
# Added underscore to function definition
@converter.register_unstructure_hook
def unstructure_benchmark(benchmark: Benchmark, _) -> dict:
Also, this does not happen when Fabian tries to run it on his computer.
Hi @Hrovatin, before I start investigating, can you quickly confirm that you are using one of the newer cattrs versions as specified in the updated pyproject.toml?
I tried to add new benchmarks, but when importing the benchmark classes I get an error (starting from when I pulled main today in the morning):
With @fabianliebig we already tried the below change in the code, but that did not help:
Also, this does not happen when Fabian tries to run it on his computer.
@AVHopp @AdrianSosic any ideas how to deal wit this?
The text was updated successfully, but these errors were encountered: