Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

absl-py version #6

Closed
codon-consulting opened this issue Nov 15, 2023 · 3 comments · Fixed by #7
Closed

absl-py version #6

codon-consulting opened this issue Nov 15, 2023 · 3 comments · Fixed by #7

Comments

@codon-consulting
Copy link

codon-consulting commented Nov 15, 2023

Hi! Just a heads-up that after a fresh installation with micromamba and environment.yml, I was only able to make the regression.py script run after installing absl-py==0.7.0.

With the fresh installation, I got the following trace:

/PROJECTS/user_profiles/mikael/micromamba/envs/nn4dms/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
/PROJECTS/user_profiles/mikael/micromamba/envs/nn4dms/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/PROJECTS/user_profiles/mikael/micromamba/envs/nn4dms/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
/PROJECTS/user_profiles/mikael/micromamba/envs/nn4dms/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/PROJECTS/user_profiles/mikael/micromamba/envs/nn4dms/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
/PROJECTS/user_profiles/mikael/micromamba/envs/nn4dms/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
Traceback (most recent call last):
  File "code/regression.py", line 19, in <module>
    import tensorflow as tf
  File "/PROJECTS/user_profiles/mikael/micromamba/envs/nn4dms/lib/python3.6/site-packages/tensorflow/__init__.py", line 28, in <module>
    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
  File "/PROJECTS/user_profiles/mikael/micromamba/envs/nn4dms/lib/python3.6/site-packages/tensorflow/python/__init__.py", line 63, in <module>
    from tensorflow.python.framework.framework_lib import *  # pylint: disable=redefined-builtin
  File "/PROJECTS/user_profiles/mikael/micromamba/envs/nn4dms/lib/python3.6/site-packages/tensorflow/python/framework/framework_lib.py", line 25, in <module>
    from tensorflow.python.framework.ops import Graph
  File "/PROJECTS/user_profiles/mikael/micromamba/envs/nn4dms/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 54, in <module>
    from tensorflow.python.platform import app
  File "/PROJECTS/user_profiles/mikael/micromamba/envs/nn4dms/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 23, in <module>
    from absl.app import run as _run
  File "/PROJECTS/user_profiles/mikael/micromamba/envs/nn4dms/lib/python3.6/site-packages/absl/app.py", line 37, in <module>
    from absl import flags
  File "/PROJECTS/user_profiles/mikael/micromamba/envs/nn4dms/lib/python3.6/site-packages/absl/flags/__init__.py", line 35, in <module>
    from absl.flags import _argument_parser
  File "/PROJECTS/user_profiles/mikael/micromamba/envs/nn4dms/lib/python3.6/site-packages/absl/flags/_argument_parser.py", line 82, in <module>
    class ArgumentParser(Generic[_T], metaclass=_ArgumentParserCache):
TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases
@agitter
Copy link
Member

agitter commented Nov 16, 2023

Thanks for notifying us. We can also pin absl-py in our environment files.

I'm surprised that our GitHub actions workflow didn't fail when it last ran two weeks ago. It creates a fresh conda environment and runs regression.py. I'll check what version of absl-py it was using before pinning it.

@agitter
Copy link
Member

agitter commented Nov 17, 2023

@codon-consulting I did some testing in #7 and wonder if mamba has something to do with the problem you encountered. When I switched to mamba to install the environment, the installation failed entirely. It worked again with conda, and conda selected absl-py 0.15.0. I've pinned that version in the environment file now so that hopefully others won't run into this problem.

@codon-consulting
Copy link
Author

Interesting, the thought crossed my mind but I didn't test it. Thanks for checking and fixing!

@agitter agitter closed this as completed in #7 Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants