has anyone manage to run on colab?

オープン
#116 コメント 2 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
python

調査の方向性

まず、報告された Colab コマンドと traceback を再現します。alphageometry.py:get_lm から lm_inference.py、models.py、meliad_lib/meliad/transformer/decoder_stack.py へとモデルの初期化を追跡し、報告された dtype エラーに焦点を当てます。ドキュメントに記載された Colab ワークフローで、このエラーなしに垂心の例を完了できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

I am trying to run alphageometry on colab but keep running into problems:

https://colab.research.google.com/drive/1RrTfa3O80QOFL68rXdtAyn1KHt0NCCB3?usp=sharing

The stack trace below excludes JAX-internal frames. The preceding is the original exception that occurred, unmodified.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/content/alphageometry/alphageometry.py", line 651, in
app.run(main)
File "/usr/local/lib/python3.10/dist-packages/absl/app.py", line 308, in run
_run_main(main, args)
File "/usr/local/lib/python3.10/dist-packages/absl/app.py", line 254, in _run_main
sys.exit(main(argv))
File "/content/alphageometry/alphageometry.py", line 637, in main
model = get_lm(_CKPT_PATH.value, _VOCAB_PATH.value)
File "/content/alphageometry/alphageometry.py", line 203, in get_lm
return lm.LanguageModelInference(vocab_path, ckpt_init, mode='beam_search')
File "/content/alphageometry/lm_inference.py", line 62, in init
(tstate, _, imodel, prngs) = trainer.initialize_model()
File "/content/alphageometry/meliad_lib/meliad/training_loop.py", line 367, in initialize_model
variables = model_init_fn(init_rngs, imodel.get_fake_input())
File "/content/alphageometry/models.py", line 68, in call
self.decoder(
File "/content/alphageometry/meliad_lib/meliad/transformer/decoder_stack.py", line 273, in call
embeddings = embeddings.astype(self.dtype)
File "/usr/local/lib/python3.10/dist-packages/jax/_src/numpy/lax_numpy.py", line 4952, in _astype
dtypes.check_user_dtype_supported(dtype, "astype")
TypeError: JAX only supports number and bool dtypes, got dtype bfloat16 in astype`
and this is where it stops:

!python -m alphageometry
--alsologtostderr
--problems_file=$(pwd)/examples.txt
--problem_name=orthocenter
--mode=alphageometry
--defs_file=$(pwd)/defs.txt
--rules_file=$(pwd)/rules.txt
--ckpt_path=$DATA
--vocab_path=$DATA/geometry.757.model
--gin_search_paths=$MELIAD_PATH/transformer/configs,$(pwd)
--gin_file=base_htrans.gin
--gin_file=size/medium_150M.gin
--gin_file=options/positions_t5.gin
--gin_file=options/lr_cosine_decay.gin
--gin_file=options/seq_1024_nocache.gin
--gin_file=geometry_150M_generate.gin
--gin_param=DecoderOnlyLanguageModelGenerate.output_token_losses=True
--gin_param=TransformerTaskConfig.batch_size=$BATCH_SIZE
--gin_param=TransformerTaskConfig.sequence_length=128
--gin_param=Trainer.restore_state_variables=False
--beam_size=$BEAM_SIZE
--search_depth=$DEPTH \
Has anyone managed to make it work in colab so far? I didn't find anything related online.

I followed the tutorial provided on git but the error persists.

主要言語
Python
スター
4.9k
フォーク
572
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

google-deepmind/alphageometry のほかの issue

google-deepmind/alphageometry の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。