Giter Club home page Giter Club logo

Comments (4)

grumpyp avatar grumpyp commented on July 20, 2024 1

What Python version are you using?

I get the following error:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/Documents/GitHub/LWM/lwm/vision_generation.py", line 11, in <module>
    from tux import (
  File "/Documents/GitHub/LWM/venv/lib/python3.11/site-packages/tux/__init__.py", line 6, in <module>
    from .distributed import (FlaxTemperatureLogitsWarper, JaxDistributedConfig,
  File "/Documents/GitHub/LWM/venv/lib/python3.11/site-packages/tux/distributed.py", line 15, in <module>
    from jax.experimental.pjit import \
ImportError: cannot import name 'with_sharding_constraint' from 'jax.experimental.pjit' (/Documents/GitHub/LWM/venv/lib/python3.11/site-packages/jax/experimental/pjit.py)

from lwm.

Pkoiralap avatar Pkoiralap commented on July 20, 2024

Was able to make it work as soon as I posted this SMH
Here is what I did.

  1. Remove the decord line from requirements.txt file. Instead install eva-decord from https://github.com/georgia-tech-db/eva-decord
  2. Update jax, chex, tux, and flax to latest version.
pip install jax -U
pip install chex -U
pip install flax -U
pip install tux -U
  1. Remove the --mesh_dim='!-1,1,8,1' \ line from the run_sample_video.sh file.

This was able to make it run on CPU. However, to make it run on the M1 processor was a whole another level of dependencies issues. So I just stopped at that. For someone trying to open and clean the can of worms, start by installing jax-metal. This will make the script run on apple m1 processor by default and the show begins.

Since the original problem with this issue was resolved, I will let the repo owners decide if they should close this issue or keep it open as it technically doesn't run on the metal architecture.

from lwm.

eisneim avatar eisneim commented on July 20, 2024

@Pkoiralap thanks for your info, im using jax-metal, i installed eva-decord and update all libs, remove the mes-dim line, but still i got data type unsuppored error:

jaxlib.xla_extension.XlaRuntimeError: UNKNOWN: <unknown>:0: error: 'func.func' op One or more function input/output data types are not supported.
<unknown>:0: note: see current operation:
"func.func"() <{arg_attrs = [{mhlo.sharding = "{replicated}"}], function_type = (tensor<4096x32000xbf16>) -> tensor<4096x32000xf32>, res_attrs = [{jax.result_info = "", mhlo.sharding = "{replicated}"}], sym_name = "main", sym_visibility = "public"}> ({
^bb0(%arg0: tensor<4096x32000xbf16>):
  %0 = "mhlo.convert"(%arg0) : (tensor<4096x32000xbf16>) -> tensor<4096x32000xf32>
  "func.return"(%0) : (tensor<4096x32000xf32>) -> ()
}) : () -> ()
<unknown>:0: error: failed to legalize operation 'func.func'
<unknown>:0: note: see current operation:
"func.func"() <{arg_attrs = [{mhlo.sharding = "{replicated}"}], function_type = (tensor<4096x32000xbf16>) -> tensor<4096x32000xf32>, res_attrs = [{jax.result_info = "", mhlo.sharding = "{replicated}"}], sym_name = "main", sym_visibility = "public"}> ({
^bb0(%arg0: tensor<4096x32000xbf16>):
  %0 = "mhlo.convert"(%arg0) : (tensor<4096x32000xbf16>) -> tensor<4096x32000xf32>
  "func.return"(%0) : (tensor<4096x32000xf32>) -> ()
}) : () -> ()

any ideas? thanks

from lwm.

lhao499 avatar lhao499 commented on July 20, 2024

The code is tested on ubuntu, we are not sure about how well Jax would work on mac.

from lwm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.