2025/9/1の研究ログ
exp/2024_baseline/version_37/がベースラインの結果
朝起きて確認したらエラーで止まっている
torch.loadで止まった
code: error
Traceback (most recent call last):
File "/home/beat/work/dcase2024/DESED_task/recipes/dcase2024_task4_baseline/train_pretrained.py", line 703, in <module>
single_run(
File "/home/beat/work/dcase2024/DESED_task/recipes/dcase2024_task4_baseline/train_pretrained.py", line 620, in single_run
^^^^^^^^^^^^^^^^^^^^^
File "/home/beat/work/dcase2024/.venv/lib/python3.12/site-packages/torch/serialization.py", line 1529, in load
raise pickle.UnpicklingError(_get_wo_message(str(e))) from None
_pickle.UnpicklingError: Weights only load failed. This file can still be loaded, to do so you have two options, do those steps only if you trust the source of the checkpoint.
(1) In PyTorch 2.6, we changed the default value of the weights_only argument in torch.load from False to True. Re-running torch.load with weights_only set to False will likely succeed, but it can result in arbitrary code execution. Do it only if you got the file from a trusted source.
(2) Alternatively, to load with weights_only=True please check the recommended steps in the following error message.
WeightsUnpickler error: Unsupported global: GLOBAL numpy._core.multiarray.scalar was not an allowed global by default. Please use torch.serialization.add_safe_globals([numpy._core.multiarray.scalar]) or the torch.serialization.safe_globals([numpy._core.multiarray.scalar]) context manager to allowlist this global if you trust this class/function.
timeの結果: 大分早くなっている
real 152m49.009s
user 371m57.247s
sys 137m1.089s
こんなモジュールを使っていないと思う
かなりそれっぽい事象だが,結局どうやって解決するのだろう?
エラー内に書いてある対処法で良いらしい
確かにその辺りきちんと読んでいなかった. 気をつけよう
torch.serialization.add_safe_globals([numpy._core.multiarray.scalar])を試す
学習は完了しているから,呼び出すだけで良いのでは?
ckptを引数として与えれば良いのかな?
uv run train_pretrained.py --eval_from_checkpoint exp/2024_baseline/version_37/epoch=199-step=11800.ckpt
エラー文の内容をいくつか試したが,次々とデフォルトで許可されない型が出てきてしまう
仕方ないのでWeights_only=Falseにした
外部のチェックポイントを利用しないように気をつけないといけないのだったか?
信頼できるチェックポイントの利用が肝要
誰かに相談してみるか?
結果
code: res.py
█████████████████| 2200/2200 03:23<00:00, 10.80it/ssave_dir /home/beat/work/dcase2024/DESED_task/recipes/dcase2024_task4_baseline/lightning_logs/version_0/metrics_test Raw scores for student saved in: /home/beat/work/dcase2024/DESED_task/recipes/dcase2024_task4_baseline/lightning_logs/version_0/metrics_test/student_scores/unprocessed
Postprocessed scores for student saved in: /home/beat/work/dcase2024/DESED_task/recipes/dcase2024_task4_baseline/lightning_logs/version_0/metrics_test/student_scores/postprocessed
Raw scores for teacher saved in: /home/beat/work/dcase2024/DESED_task/recipes/dcase2024_task4_baseline/lightning_logs/version_0/metrics_test/teacher_scores/unprocessed
どういう見方をするのだろう
以前見た時は非常に分かりづらかった気がする
せっかくだからtestもする
testの方だと普通に表示される
code: res
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
┃ Runningstage.testing metric ┃ DataLoader 0 ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
│ test/student/collar_f1_macro_thres05/sed_eval │ 0.4548394978046417 │
│ test/student/collar_f1_macro_thres05/sed_scores_eval │ 0.4549152963473933 │
│ test/student/intersection_f1_macro_thres05/psds_eval │ 0.7386054869414647 │
│ test/student/intersection_f1_macro_thres05/sed_scores_eval │ 0.7386054869414647 │
│ test/student/loss_strong │ 0.1244150847196579 │
│ test/student/psds1/psds_eval │ 0.4401515868436907 │
│ test/student/psds1/sed_scores_eval │ 0.44632465402887855 │
│ test/student/psds2/psds_eval │ 0.6884470241590002 │
│ test/student/psds2/sed_scores_eval │ 0.6995978979596535 │
│ test/student/segment_f1_macro_thresopt/sed_scores_eval │ 0.6240155575449106 │
│ test/student/segment_mauc/sed_scores_eval │ 0.9624967732763706 │
│ test/student/segment_mpauc/sed_scores_eval │ 0.7143524353052881 │
│ test/teacher/collar_f1_macro_thres05/sed_eval │ 0.48384976387023926 │
│ test/teacher/collar_f1_macro_thres05/sed_scores_eval │ 0.4839258723349687 │
│ test/teacher/intersection_f1_macro_thres05/psds_eval │ 0.7671829955795137 │
│ test/teacher/intersection_f1_macro_thres05/sed_scores_eval │ 0.7671829955795137 │
│ test/teacher/loss_strong │ 0.12096952646970749 │
│ test/teacher/psds1/psds_eval │ 0.4603634167480284 │
│ test/teacher/psds1/sed_scores_eval │ 0.4656060367075264 │
│ test/teacher/psds2/psds_eval │ 0.7216657373656931 │
│ test/teacher/psds2/sed_scores_eval │ 0.7343572267738425 │
│ test/teacher/segment_f1_macro_thresopt/sed_scores_eval │ 0.6478528434013735 │
│ test/teacher/segment_mauc/sed_scores_eval │ 0.9639618486046458 │
│ test/teacher/segment_mpauc/sed_scores_eval │ 0.7292151627387906
一通り済んだし,眠いから寝るか?
先ほどまで眠かったが半ば吹き飛んでしまった
休憩するか
13時くらいに起きた