首先需要在 yaml 里设置两个参数:
yaml
output_dir: /home/wangguisen/projects/LLaMA-Factory/weights/tensbox_demo
report_to: tensorboard
logging_dir: /home/wangguisen/projects/LLaMA-Factory/weights/tensbox_demo/runs
然后开始训练,在你的输出目录下会有 runs
文件夹。
安装 TensorBoard
:
shell
proxychains4 pip install tensorboard
然后在服务上使用默认的6006端口正常启动tensorboard:
shell
tensorboard --logdir=/home/wangguisen/projects/LLaMA-Factory/weights/tensbox_demo/runs --port=6006
然后浏览器打开链接。
ref:
https://github.com/hiyouga/LLaMA-Factory/issues/816
https://datawhalechina.github.io/thorough-pytorch/第七章/7.3 使用TensorBoard可视化训练过程.html#id8