Open Shreyas-Bhat opened 6 days ago
File "/home/sbb36/SynthSeg/ext/lab2im/utils.py", line 335, in reformat_to_list
if isinstance(var, (int, float, np.int, np.int32, np.int64, np.float, np.float32, np
.float64)):
As suggested by the error, simply remove np.int
and np.float
from the offending line in utils.py and you should be alright.
Thank you so much for your response @hvgazula ! There seems to be a followup error and I wonder if it has anything to do with the numpy version. Thanks
Traceback (most recent call last):
File "/home/sbb36/SynthSeg/scripts/commands/SynthSeg_predict.py", line 28, in <module>
from SynthSeg.predict_synthseg import predict
File "/home/sbb36/SynthSeg/SynthSeg/__init__.py", line 1, in <module>
from . import brain_generator
File "/home/sbb36/SynthSeg/SynthSeg/brain_generator.py", line 21, in <module>
from SynthSeg.model_inputs import build_model_inputs
File "/home/sbb36/SynthSeg/SynthSeg/model_inputs.py", line 22, in <module>
from ext.lab2im import utils
File "/home/sbb36/SynthSeg/ext/lab2im/__init__.py", line 1, in <module>
from . import edit_tensors
File "/home/sbb36/SynthSeg/ext/lab2im/edit_tensors.py", line 28, in <module>
import tensorflow as tf
File "/autofs/vast/qtim/tools/pyenv/versions/3.11.3/envs/brainmets/lib/python3.11/site-packages/tensorflow/__init__.py", line 48, in <module>
from tensorflow._api.v2 import __internal__
File "/autofs/vast/qtim/tools/pyenv/versions/3.11.3/envs/brainmets/lib/python3.11/site-packages/tensorflow/_api/v2/__internal__/__init__.py", line 8, in <module>
from tensorflow._api.v2.__internal__ import autograph
File "/autofs/vast/qtim/tools/pyenv/versions/3.11.3/envs/brainmets/lib/python3.11/site-packages/tensorflow/_api/v2/__internal__/autograph/__init__.py", line 8, in <module>
from tensorflow.python.autograph.core.ag_ctx import control_status_ctx # line: 34
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/autofs/vast/qtim/tools/pyenv/versions/3.11.3/envs/brainmets/lib/python3.11/site-packages/tensorflow/python/autograph/core/ag_ctx.py", line 21, in <module>
from tensorflow.python.autograph.utils import ag_logging
File "/autofs/vast/qtim/tools/pyenv/versions/3.11.3/envs/brainmets/lib/python3.11/site-packages/tensorflow/python/autograph/utils/__init__.py", line 17, in <module>
from tensorflow.python.autograph.utils.context_managers import control_dependency_on_returns
File "/autofs/vast/qtim/tools/pyenv/versions/3.11.3/envs/brainmets/lib/python3.11/site-packages/tensorflow/python/autograph/utils/context_managers.py", line 19, in <module>
from tensorflow.python.framework import ops
File "/autofs/vast/qtim/tools/pyenv/versions/3.11.3/envs/brainmets/lib/python3.11/site-packages/tensorflow/python/framework/ops.py", line 45, in <module>
from tensorflow.python.eager import context
File "/autofs/vast/qtim/tools/pyenv/versions/3.11.3/envs/brainmets/lib/python3.11/site-packages/tensorflow/python/eager/context.py", line 37, in <module>
from tensorflow.python.eager import execute
File "/autofs/vast/qtim/tools/pyenv/versions/3.11.3/envs/brainmets/lib/python3.11/site-packages/tensorflow/python/eager/execute.py", line 21, in <module>
from tensorflow.python.framework import dtypes
File "/autofs/vast/qtim/tools/pyenv/versions/3.11.3/envs/brainmets/lib/python3.11/site-packages/tensorflow/python/framework/dtypes.py", line 21, in <module>
import ml_dtypes
File "/autofs/vast/qtim/tools/pyenv/versions/3.11.3/envs/brainmets/lib/python3.11/site-packages/ml_dtypes/__init__.py", line 32, in <module>
from ml_dtypes._custom_floats import bfloat16
ImportError: numpy.core.umath failed to import
Hello,
Thanks a lot for open-sourcing this code. It is very helpful. I am facing the following error. I tried to downgrade my numpy to several previous versions. However, this issues hasn't been resolved. Can the maintainers of synthseg kindly look into this issue and let me know what I can do to solve this?
Best,