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

re: mjx-playground3 #13

Open
0num4 opened this issue Apr 10, 2024 · 3 comments
Open

re: mjx-playground3 #13

0num4 opened this issue Apr 10, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@0num4
Copy link
Owner

0num4 commented Apr 10, 2024

動かなくなってるのでとりあえず動くようにする

@0num4 0num4 added the enhancement New feature or request label Apr 10, 2024
@0num4 0num4 self-assigned this Apr 10, 2024
@0num4 0num4 added bug Something isn't working and removed enhancement New feature or request labels Apr 10, 2024
@0num4
Copy link
Owner Author

0num4 commented Apr 10, 2024

readmeによるとpoetry + python 3.09 on wslで動いてたっぽい

@0num4
Copy link
Owner Author

0num4 commented Apr 10, 2024

3.9で作り直したら動いた

Administrator in mjx-playground on  main [$?] is 📦 v0.1.0 via 🐍 v3.11.4
❯ wsl
root@DESKTOP-2TQ96U5:/mnt/c/Users/Owner/work/private/mahjong/mjx-playground# poetry env use python3.9
Creating virtualenv mjx-playground-S0ozRpda-py3.9 in /root/.cache/pypoetry/virtualenvs
Using virtualenv: /root/.cache/pypoetry/virtualenvs/mjx-playground-S0ozRpda-py3.9
root@DESKTOP-2TQ96U5:/mnt/c/Users/Owner/work/private/mahjong/mjx-playground# poetry shell
Spawning shell within /root/.cache/pypoetry/virtualenvs/mjx-playground-S0ozRpda-py3.9
root@DESKTOP-2TQ96U5:/mnt/c/Users/Owner/work/private/mahjong/mjx-playground# . /root/.cache/pypoetry/virtualenvs/mjx-playground-S0ozRpda-py3.9/bin/activate
(mjx-playground-py3.9) root@DESKTOP-2TQ96U5:/mnt/c/Users/Owner/work/private/mahjong/mjx-playground# cd tra
train-from-paifu/       transformer-playground/ translated_table.csv
(mjx-playground-py3.9) root@DESKTOP-2TQ96U5:/mnt/c/Users/Owner/work/private/mahjong/mjx-playground# cd train-from-paifu/
(mjx-playground-py3.9) root@DESKTOP-2TQ96U5:/mnt/c/Users/Owner/work/private/mahjong/mjx-playground/train-from-paifu# python mlp_agent_playground.py
Traceback (most recent call last):
  File "/mnt/c/Users/Owner/work/private/mahjong/mjx-playground/train-from-paifu/mlp_agent_playground.py", line 1, in <module>
    import mjx
ModuleNotFoundError: No module named 'mjx'
(mjx-playground-py3.9) root@DESKTOP-2TQ96U5:/mnt/c/Users/Owner/work/private/mahjong/mjx-playground/train-from-paifu# poetry install
Installing dependencies from lock file

Package operations: 79 installs, 0 updates, 0 removals

  • Installing certifi (2023.11.17)
  • Installing charset-normalizer (3.3.2)
  • Installing filelock (3.13.1)
  • Installing frozenlist (1.4.0)
  • Installing idna (3.6)
  • Installing markupsafe (2.1.3)
  • Installing mpmath (1.3.0)
  • Installing multidict (6.0.4)
  • Installing urllib3 (2.1.0)
  • Installing aiosignal (1.3.1)
  • Installing async-timeout (4.0.3)
  • Installing attrs (23.1.0)
  • Installing exceptiongroup (1.2.0)
  • Installing fsspec (2023.10.0)
  • Installing greenlet (3.0.2)
  • Installing h11 (0.14.0)
  • Installing jinja2 (3.1.2)
  • Installing networkx (3.2.1)
  • Installing packaging (23.2)
  • Installing pyyaml (6.0.1)
  • Installing requests (2.31.0)
  • Installing six (1.16.0)
  • Installing sniffio (1.3.0)
  • Installing soupsieve (2.5)
  • Installing sympy (1.12)
  • Installing tqdm (4.66.1)
  • Installing triton (2.1.0)
  • Installing typing-extensions (4.8.0)
  • Installing wcwidth (0.2.12)
  • Installing yarl (1.9.3)
  • Installing aiohttp (3.9.1)
  • Installing annotated-types (0.6.0)
  • Installing anyio (4.1.0)
  • Installing beautifulsoup4 (4.12.2)
  • Installing blessed (1.20.0)
  • Installing httpcore (1.0.2)
  • Installing huggingface-hub (0.19.4)
  • Installing lightning-utilities (0.10.0)
  • Installing mako (1.3.0)
  • Installing numpy (1.26.2)
  • Installing pydantic-core (2.14.5)
  • Installing python-editor (1.0.4)
  • Installing readchar (4.0.5)
  • Installing sqlalchemy (2.0.23)
  • Installing torch (2.1.1+cu118)
  • Installing zipp (3.17.0)
  • Installing alembic (1.13.0)
  • Installing box2d-py (2.3.5): Preparing...
  • Installing cloudpickle (3.0.0)
  • Installing colorlog (6.8.0)
  • Installing farama-notifications (0.0.4)
  • Installing google (3.0.0)
  • Installing grpcio (1.39.0)
  • Installing gym-notices (0.0.8)
  • Installing httpx (0.25.2)
  • Installing httpx-sse (0.3.1): Pending...
  • Installing box2d-py (2.3.5)
  • Installing cloudpickle (3.0.0)
  • Installing colorlog (6.8.0)
  • Installing farama-notifications (0.0.4)
  • Installing google (3.0.0)
  • Installing grpcio (1.39.0)
  • Installing gym-notices (0.0.8)
  • Installing httpx (0.25.2)
  • Installing httpx-sse (0.3.1)
  • Installing importlib-metadata (6.9.0)
  • Installing inquirer (3.1.4)
  • Installing llvmlite (0.41.1)
  • Installing pillow (10.1.0)
  • Installing protobuf (3.17.3)
  • Installing pydantic (2.5.2)
  • Installing pygame (2.5.2)
  • Installing regex (2023.10.3)
  • Installing safetensors (0.4.1)
  • Installing svgwrite (1.4.3)
  • Installing swig (4.1.1.post1)
  • Installing tokenizers (0.15.0)
  • Installing torchmetrics (1.2.0)
  • Installing fireworks-ai (0.9.0)
  • Installing gym (0.26.2)
  • Installing gymnasium (0.29.1)
  • Installing mjx (0.1.0)
  • Installing numba (0.58.1)
  • Installing optuna (3.4.0)
  • Installing pytorch-lightning (2.1.2)
  • Installing torchaudio (2.1.1+cu118)
  • Installing torchvision (0.16.1+cu118)
  • Installing transformers (4.36.0)

Installing the current project: mjx-playground (0.1.0)
(mjx-playground-py3.9) root@DESKTOP-2TQ96U5:/mnt/c/Users/Owner/work/private/mahjong/mjx-playground/train-from-paifu# python mlp_agent_playground.py
[-135, 45, -135, 45, 0, 45, -135, 0, 45, 45, 45, 90, 90, 90, 90, 0, -135, 0, 90, 90, 0, 90, 45, 90, 45, 45, 45, 45, 90, 90, 45, 90, 90, 90, 90, 90, -135, 90, 90, 45, 45, 90, 90, 90, 90, 45, 90, 90, 45, -135, 0, -135, 90, 0, -135, 90, 0, 90, 0, 0, 45, 45, 90, -135, 90, 90, -135, 90, 90, -135, 90, 45, 90, 45, 45, 0, 90, 0, -135, 0, 45, 90, 45, 0, 45, 45, 45, 90, 45, 90, 90, 45, 45, 0, 90, 90, 0, 90, 0, -135, 0, 45, 0, 90, -135, 90, -135, 0, -135, 45, 90, 45, 90, 0, 90, 90, 0, 45, 45, 90, -135, 90, 45, 45, 90, 90, 45, 90, 0, 45, 0, 45, 0, 90, 45, 0, 90, 0, 0, 90, 45, 90, 45, 45, 90, -135, 45, 0, 90, 0, 0, 45, 90, 45, 0, 0, -135, -135, 45, 90, 90, 0, 90, -135, 45, -135, -135, 90, -135, 45, 90, 0, 45, 90, 90, 90, 45, 90, 0, 90, -135, 90, 0, -135, 45, 0, 0, 90, 45, -135, 0, 90, 90, 90, 90, 0, -135, 90, 45, -135, 90, 0, 45, 45, 45, 45, 90, 45, 0, -135, 45, 0, 0, 90, 90, 0, 90, -135, 90, 90, 90, 90, 0, 90, 45, 90, 0, 90, 90, 45, 45, 0, 0, -135, 0, 90, 45, 45, 0, 0, 0, 45, 90, -135, 45, 90, 90, 45, 90, 90, 0, 45, 0, 45, 90, 90, 90, 0, 90, 90, -135, 45, 45, 45, 0, 90, 0, 90, 0, 45, 90, 90, 45, -135, 90, -135, 45, 90, 0, 45, 90, -135, -135, 0, 45, -135, 90, 45, 0, 45, 90, -135, 90, 90, 0, 90, 0, 90, 45, 0, 0, 45, 90, 45, 90, 90, -135, 45, -135, 90, 0, 90, 0, 90, 90, 45, 90, 90, 90, 45, 0, 90, 0, 0, 90, 0, 90, 45, -135, -135, 90, 45, 90, 0, 90, 90, 0, 45, 0, 0, 90, 45, 0, 90, -135, 90, 45, 90, 0, 90, 0, -135, 45, 45, 90, 45, 90, 90, 90, 90, 90, 90, 0, 45, 0, 45, 90, 90, 90, 90, 90, -135, -135, 45, 90, 90, 45, -135, 90, 90, -135, 90, 45, 0, 0, -135, 90, 90, -135, 0, 45, 90, 45, 90, -135, 90, 45, 45, 45, 0, 90, 90, 45, 0, 45, 0, 0, 45, 90, 0, 90, 45, 90, -135, 90, 45, 90, 45, 45, 90, 90, 90, -135, 45, 90, -135, 45, 0, 45, -135, -135, 90, 45, 90, 45, 0, 0, 90, 90, 0, 0, 0, 90, 45, 45, 45, -135, 45, 45, 45, 0, 90, 0, 90, 45, 45, 0, 0, 45, 90, 90, 0, 90, 90, -135, 0, 90, 90, 90, -135, 45, 90, 90, 0, 90, 45, 45, 45, 90, 45, 90, 90, 0, 90, 90, 90, 0, 45, 90, 90, 90, 90, 90, 0, 90, 45, 45, 0, 45, 90, 0, 90, 45, 90, 90, -135, 90, 45, 45, -135, 0, -135, 90, -135, -135, 90, 90, 45, 45, 90, 45, 0, 0, 45, 90, 45, 90, 0, 90, 90, 45, 90, -135, 45, 0, 90, 90, -135, 90, 90, 45, 45, 90, -135, -135, 0, 45, 45, 45, 45, 45, 90, 90, 0, -135, 90, 90, 45, 0, 90, 90, 45, 45, -135, 45, 90, 90, 0, 0, 90, -135, 0, 90, 90, 90, 90, -135, 45, 90, 0, 90, 90, 45, 0, -135, 0, 90, 90, 45, 90, 45, 45, 90, 90, 90, 45, 90, 90, 90, 0, 0, 0, 45, -135, 90, 90, 0, 90, 45, 45, 0, 45, 0, 90, 45, 45, -135, 90, 0, 90, 45, 90, 0, 45, 90, 45, 90, 90, 45, 90, 0, 0, 90, 45, -135, 90, 90, 0, 90, 45, 0, 0, 45, 45, -135, 90, 90, 90, 45, 0, 0, 0, 90, -135, 0, 0, 90, 90, 90, 45, 45, 0, 45, 0, -135, 45, 0, -135, 45, 90, -135, 90, 90, 0, 0, 45, 45, 45, 90, 45, -135, 90, 90, 0, 90, -135, -135, -135, 45, 45, 90, 0, 90, 90, 45, 90, -135, 90, 0, 45, 90, 90, 45, 0, -135, 90, 90, 0, 45, 0, 45, 90, 0, 0, -135, 45, 45, 45, 90, 90, 0, 45, 90, 90, 45, 90, 45, 0, 90, 0, 90, 0, 90, 45, -135, 0, 45, 0, -135, -135, 0, 0, 90, -135, -135, -135, 45, 0, 90, -135, -135, -135, 90, 45, 0, 0, 45, -135, 90, 0, 45, -135, 90, 45, 45, 0, 45, 0, 45, 90, -135, 90, -135, 90, 90, 0, 90, 0, 45, 0, 45, 45, 0, 90, 45, 90, 45, 45, 45, 0, 45, 90, 45, 90, 90, 45, 45, 90, 90, 90, 45, 0, -135, 0, 90, 0, 90, 90, -135, -135, 0, 45, 0, 45, 90, 90, 45, 45, 45, 45, 90, -135, 90, 45, 45, -135, 90, 0, 45, 45, 45, 90, 0, 45, 90, 45, -135, 0, 45, 90, 90, 90, 45, 90, 90, 90, 90, 90, -135, 45, 45, 90, 0, 90, 0, 90, 90, 45, 0, 45, -135, 0, -135, 45, 90, 90, 90, 45, 90, 0, 90, 45, 90, 90, 0, 90, 90, 0, 90, -135, 90, 0, 90, 0, 90, -135, 45, -135, 0, -135, 45, 0, 45, 45, 45, -135, 45, 45, -135, 45, 45, 90, -135, 45, -135, 90, 90, 0, 90, -135, -135, 0, 45, -135, 45, 90, -135, 45, 0, -135, -135, 90, 90, 90, 90, 90, 90, 45, 45, 45, 45, 45, 90, -135, 45, 90, 45, -135, 45, 90, 45, 90, 45, 90, -135, -135, -135, 0, 45, 45, -135, 90, 45, 0, 45, 90, 45, 90, 0, 0, 45, 90, 90, 0, 90, 45, 90, 90, -135, 45, 90, -135, 0, -135, 45, 45, 90, 45, 45, 90, 45, 45, 45, 45, 0, -135, 45, 0, 0, 90, 90, 90, 90, 45, -135, 0, 90, 0, 0, 90]

@0num4
Copy link
Owner Author

0num4 commented Apr 10, 2024

    File "/tmp/tmpa8i2r9ft/.venv/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
      self.run_command(cmd)
    File "/tmp/tmpa8i2r9ft/.venv/lib/python3.11/site-packages/setuptools/dist.py", line 967, in run_command
      super().run_command(command)
    File "/tmp/tmpa8i2r9ft/.venv/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/tmp/tmpa8i2r9ft/.venv/lib/python3.11/site-packages/wheel/bdist_wheel.py", line 368, in run
      self.run_command("build")
    File "/tmp/tmpa8i2r9ft/.venv/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "/tmp/tmpa8i2r9ft/.venv/lib/python3.11/site-packages/setuptools/dist.py", line 967, in run_command
      super().run_command(command)
    File "/tmp/tmpa8i2r9ft/.venv/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/tmp/tmpa8i2r9ft/.venv/lib/python3.11/site-packages/setuptools/_distutils/command/build.py", line 131, in run
      self.run_command(cmd_name)
    File "/tmp/tmpa8i2r9ft/.venv/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "/tmp/tmpa8i2r9ft/.venv/lib/python3.11/site-packages/setuptools/dist.py", line 967, in run_command
      super().run_command(command)
    File "/tmp/tmpa8i2r9ft/.venv/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/tmp/tmpa8i2r9ft/.venv/lib/python3.11/site-packages/setuptools/command/build_ext.py", line 91, in run
      _build_ext.run(self)
    File "/tmp/tmpa8i2r9ft/.venv/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run
      self.build_extensions()
    File "/tmp/tmpc_7xel28/grpcio-1.39.0/src/python/grpcio/commands.py", line 290, in build_extensions
      raise CommandError(
  commands.CommandError: Failed `build_ext` step:
  Traceback (most recent call last):
    File "/tmp/tmpa8i2r9ft/.venv/lib/python3.11/site-packages/setuptools/_distutils/unixccompiler.py", line 185, in _compile
      self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs)
    File "/tmp/tmpc_7xel28/grpcio-1.39.0/src/python/grpcio/_spawn_patch.py", line 54, in _commandfile_spawn
      _classic_spawn(self, command)
    File "/tmp/tmpa8i2r9ft/.venv/lib/python3.11/site-packages/setuptools/_distutils/ccompiler.py", line 1041, in spawn
      spawn(cmd, dry_run=self.dry_run, **kwargs)
    File "/tmp/tmpa8i2r9ft/.venv/lib/python3.11/site-packages/setuptools/_distutils/spawn.py", line 70, in spawn
      raise DistutilsExecError(
  distutils.errors.DistutilsExecError: command '/usr/bin/gcc' failed with exit code 1
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "/tmp/tmpc_7xel28/grpcio-1.39.0/src/python/grpcio/commands.py", line 286, in build_extensions
      build_ext.build_ext.build_extensions(self)
    File "/tmp/tmpa8i2r9ft/.venv/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 467, in build_extensions
      self._build_extensions_serial()
    File "/tmp/tmpa8i2r9ft/.venv/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 493, in _build_extensions_serial
      self.build_extension(ext)
    File "/tmp/tmpa8i2r9ft/.venv/lib/python3.11/site-packages/setuptools/command/build_ext.py", line 252, in build_extension
      _build_ext.build_extension(self, ext)
    File "/tmp/tmpa8i2r9ft/.venv/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 548, in build_extension
      objects = self.compiler.compile(
                ^^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/tmpc_7xel28/grpcio-1.39.0/src/python/grpcio/_parallel_compile_patch.py", line 58, in _parallel_compile
      multiprocessing.pool.ThreadPool(BUILD_EXT_COMPILER_JOBS).map(
    File "/root/.anyenv/envs/pyenv/versions/3.11.4/lib/python3.11/multiprocessing/pool.py", line 367, in map
      return self._map_async(func, iterable, mapstar, chunksize).get()
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/root/.anyenv/envs/pyenv/versions/3.11.4/lib/python3.11/multiprocessing/pool.py", line 774, in get
      raise self._value
    File "/root/.anyenv/envs/pyenv/versions/3.11.4/lib/python3.11/multiprocessing/pool.py", line 125, in worker
      result = (True, func(*args, **kwds))
                      ^^^^^^^^^^^^^^^^^^^
    File "/root/.anyenv/envs/pyenv/versions/3.11.4/lib/python3.11/multiprocessing/pool.py", line 48, in mapstar
      return list(map(*args))
             ^^^^^^^^^^^^^^^^
    File "/tmp/tmpc_7xel28/grpcio-1.39.0/src/python/grpcio/_parallel_compile_patch.py", line 54, in _compile_single_file
      self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
    File "/tmp/tmpa8i2r9ft/.venv/lib/python3.11/site-packages/setuptools/_distutils/unixccompiler.py", line 187, in _compile
      raise CompileError(msg)
  distutils.errors.CompileError: command '/usr/bin/gcc' failed with exit code 1
  
  

  at ~/.local/share/pypoetry/venv/lib/python3.11/site-packages/poetry/installation/chef.py:164 in _prepare
      160│ 
      161│                 error = ChefBuildError("\n\n".join(message_parts))
      162│ 
      163│             if error is not None:
    → 164│                 raise error from None
      165│ 
      166│             return path
      167│ 
      168│     def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:

Note: This error originates from the build backend, and is likely not a problem with poetry but with grpcio (1.39.0) not supporting PEP 517 builds. You can verify this by running 'pip wheel --no-cache-dir --use-pep517 "grpcio (==1.39.0)"'.

(mjx-playground-S0ozRpda-py3.11) root@DESKTOP-2TQ96U5:/mnt/c/Users/Owner/work/private/mahjong/mjx-playground/train-from-paifu# 

grpcio周りをガチャガチャする必要がありそう(dockerを用意するか)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant