Cryolite / kanachan

A Japanese (Riichi) Mahjong AI Framework
284 stars 40 forks source link

Exception when setting parameters to module kanachan.training.bert.phase1.train #22

Closed constellation39 closed 1 year ago

constellation39 commented 1 year ago

Explicit setting parameter

docker run \
...
--rm cryolite/kanachan python3 -m kanachan.training.bert.phase1.train \
--optimizer lamb \
--epsilon 1.0e-6 \
...

Exceptions

Traceback (most recent call last):
  File "/opt/conda/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/opt/conda/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/kanachan/training/bert/phase1/train.py", line 14, in <module>
    training.main(
  File "/home/ubuntu/.local/lib/python3.8/site-packages/kanachan/training/bert/training.py", line 455, in main
    if epsilon is not None and epsilon <= 0.0:
UnboundLocalError: local variable 'epsilon' referenced before assignment

docker images

REPOSITORY                          TAG                       IMAGE ID       CREATED        SIZE
cryolite/kanachan                   latest                    34665dea356b   2 days ago     15.4GB
Cryolite commented 1 year ago

Confirmed.

constellation39 commented 1 year ago

Fixed.