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

running mmm_lightweight with M1 mackbooks #101

Closed
Samuelchazy opened this issue Nov 13, 2022 · 6 comments
Closed

running mmm_lightweight with M1 mackbooks #101

Samuelchazy opened this issue Nov 13, 2022 · 6 comments
Assignees
Labels
dependencies Pull requests that update a dependency file

Comments

@Samuelchazy
Copy link

mmm_Lightweight won't get installed on the new M1 mackbook pro even if tensorflow is properly installed and running. There is the following error message:
ERROR: Could not find a version that satisfies the requirement tensorflow>=2.7.2 (from lightweight-mmm) (from versions: none)

@pabloduque0
Copy link
Collaborator

Hello @Samuelchazy !

Try following #98 and let me know if there are any follow up issues.

Best,

@pabloduque0 pabloduque0 self-assigned this Nov 13, 2022
@pabloduque0 pabloduque0 added question Further information is requested dependencies Pull requests that update a dependency file and removed question Further information is requested labels Nov 13, 2022
@Samuelchazy
Copy link
Author

Samuelchazy commented Nov 13, 2022

Thanks @pabloduque0 pabloduque0 , but now i get a different error when I import: from lightweight_mmm import lightweight_mmm


TypeError Traceback (most recent call last)
Input In [89], in <cell line: 5>()
1 #from lightweight_mmm import lightweight_mmm
2 # from lightweight_mmm import optimize_media
3 # from lightweight_mmm import plot
4 from lightweight_mmm import preprocessing
----> 5 from lightweight_mmm import utils
6 import jax.numpy as jnp

File ~/opt/anaconda3/lib/python3.9/site-packages/lightweight_mmm/utils.py:29, in
27 from scipy import spatial
28 from scipy import stats
---> 29 from tensorflow.io import gfile
30 from typing_extensions import Literal
32 from lightweight_mmm import media_transforms

File ~/opt/anaconda3/lib/python3.9/site-packages/tensorflow/init.py:37, in
34 import sys as _sys
35 import typing as _typing
---> 37 from tensorflow.python.tools import module_util as _module_util
38 from tensorflow.python.util.lazy_loader import LazyLoader as _LazyLoader
40 # Make sure code inside the TensorFlow codebase can use tf2.enabled() at import.

File ~/opt/anaconda3/lib/python3.9/site-packages/tensorflow/python/init.py:42, in
37 from tensorflow.python.eager import context
39 # pylint: enable=wildcard-import
40
41 # Bring in subpackages.
---> 42 from tensorflow.python import data
43 from tensorflow.python import distribute
44 # from tensorflow.python import keras

File ~/opt/anaconda3/lib/python3.9/site-packages/tensorflow/python/data/init.py:21, in
15 """tf.data.Dataset API for input pipelines.
16
17 See Importing Data for an overview.
18 """
20 # pylint: disable=unused-import
---> 21 from tensorflow.python.data import experimental
22 from tensorflow.python.data.ops.dataset_ops import AUTOTUNE
23 from tensorflow.python.data.ops.dataset_ops import Dataset

File ~/opt/anaconda3/lib/python3.9/site-packages/tensorflow/python/data/experimental/init.py:96, in
15 """Experimental API for building input pipelines.
16
17 This module contains experimental Dataset sources and transformations that can
(...)
92 @@UNKNOWN_CARDINALITY
93 """
95 # pylint: disable=unused-import
---> 96 from tensorflow.python.data.experimental import service
97 from tensorflow.python.data.experimental.ops.batching import dense_to_ragged_batch
98 from tensorflow.python.data.experimental.ops.batching import dense_to_sparse_batch

File ~/opt/anaconda3/lib/python3.9/site-packages/tensorflow/python/data/experimental/service/init.py:419, in
1 # Copyright 2020 The TensorFlow Authors. All Rights Reserved.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
(...)
13 # limitations under the License.
14 # ==============================================================================
15 """API for using the tf.data service.
16
17 This module contains:
(...)
416 job of ParameterServerStrategy).
417 """
--> 419 from tensorflow.python.data.experimental.ops.data_service_ops import distribute
420 from tensorflow.python.data.experimental.ops.data_service_ops import from_dataset_id
421 from tensorflow.python.data.experimental.ops.data_service_ops import register_dataset

File ~/opt/anaconda3/lib/python3.9/site-packages/tensorflow/python/data/experimental/ops/data_service_ops.py:24, in
22 from tensorflow.python import tf2
23 from tensorflow.python.compat import compat
---> 24 from tensorflow.python.data.experimental.ops import compression_ops
25 from tensorflow.python.data.experimental.service import _pywrap_server_lib
26 from tensorflow.python.data.experimental.service import _pywrap_utils

File ~/opt/anaconda3/lib/python3.9/site-packages/tensorflow/python/data/experimental/ops/compression_ops.py:16, in
1 # Copyright 2020 The TensorFlow Authors. All Rights Reserved.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
(...)
13 # limitations under the License.
14 # ==============================================================================
15 """Ops for compressing and uncompressing dataset elements."""
---> 16 from tensorflow.python.data.util import structure
17 from tensorflow.python.ops import gen_experimental_dataset_ops as ged_ops
20 def compress(element):

File ~/opt/anaconda3/lib/python3.9/site-packages/tensorflow/python/data/util/structure.py:23, in
20 import six
21 import wrapt
---> 23 from tensorflow.python.data.util import nest
24 from tensorflow.python.framework import composite_tensor
25 from tensorflow.python.framework import ops

File ~/opt/anaconda3/lib/python3.9/site-packages/tensorflow/python/data/util/nest.py:36, in
16 """## Functions for working with arbitrarily nested sequences of elements.
17
18 NOTE(mrry): This fork of the tensorflow.python.util.nest module
(...)
31 arrays.
32 """
34 import six as _six
---> 36 from tensorflow.python.framework import sparse_tensor as _sparse_tensor
37 from tensorflow.python.util import _pywrap_utils
38 from tensorflow.python.util import nest

File ~/opt/anaconda3/lib/python3.9/site-packages/tensorflow/python/framework/sparse_tensor.py:24, in
22 from tensorflow.python import tf2
23 from tensorflow.python.framework import composite_tensor
---> 24 from tensorflow.python.framework import constant_op
25 from tensorflow.python.framework import dtypes
26 from tensorflow.python.framework import ops

File ~/opt/anaconda3/lib/python3.9/site-packages/tensorflow/python/framework/constant_op.py:25, in
23 from tensorflow.core.framework import types_pb2
24 from tensorflow.python.eager import context
---> 25 from tensorflow.python.eager import execute
26 from tensorflow.python.framework import dtypes
27 from tensorflow.python.framework import op_callbacks

File ~/opt/anaconda3/lib/python3.9/site-packages/tensorflow/python/eager/execute.py:23, in
21 from tensorflow.python import pywrap_tfe
22 from tensorflow.python.eager import core
---> 23 from tensorflow.python.framework import dtypes
24 from tensorflow.python.framework import ops
25 from tensorflow.python.framework import tensor_shape

File ~/opt/anaconda3/lib/python3.9/site-packages/tensorflow/python/framework/dtypes.py:34, in
31 from tensorflow.python.types import trace
32 from tensorflow.core.function import trace_type
---> 34 _np_bfloat16 = _pywrap_bfloat16.TF_bfloat16_type()
37 class DTypeMeta(type(_dtypes.DType), abc.ABCMeta):
38 pass

TypeError: Unable to convert function return value to a Python type! The signature was
() -> handle

@pabloduque0
Copy link
Collaborator

So it is complaining about your current installation of tensorflow. What version do you have?

@Samuelchazy
Copy link
Author

@pabloduque0 . I have tensorflow 2.10.0 installed using tensorflow-macos

@Samuelchazy
Copy link
Author

@pabloduque0 It worked after upgrading tensorflow-macos and tensorflow-metal to the latest versions and restarting the kernel. Thank s for the help!

@pabloduque0
Copy link
Collaborator

Glad to hear! Thanks for confirming

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

2 participants