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

[chat] add tensorboard support for coati #4749

Closed
wants to merge 6 commits into from

Conversation

CZYCW
Copy link
Contributor

@CZYCW CZYCW commented Sep 18, 2023

📌 Checklist before creating the PR

  • I have created an issue for this PR for traceability
  • The title follows the standard format: [doc/gemini/tensor/...]: A concise description
  • I have added relevant tags if possible for us to better distinguish different PRs

🚨 Issue number

Link this PR to your issue with words like fixed to automatically close the linked issue upon merge

e.g. fixed #1234, closed #1234, resolved #1234

📝 What does this PR do?

Add capability to coati to record training metrics in the format of tensoboard and save them to local tensorboard log directory.

💥 Checklist before requesting a review

  • I have linked my PR to an issue (instruction)
  • My issue clearly describes the problem/feature/proposal, with diagrams/charts/table/code if possible
  • I have performed a self-review of my code
  • I have added thorough tests.
  • I have added docstrings for all the functions/methods I implemented

Testing:
I have tested the change with script as below

torchrun --standalone --nproc_per_node=4 train_sft.py \
    --pretrain '/root/test-coati/ColossalAI/applications/Chat/examples/model/checkpoint' \
    --model 'bloom' \
    --strategy colossalai_zero2 \
    --log_interval 10 \
    --tensorboard_dir "/root/test-coati/ColossalAI/applications/Chat/examples/tensorboard" \
    --save_path "/root/test-coati/ColossalAI/applications/Chat/examples/output" \
    --dataset "/root/test-coati/ColossalAI/applications/Chat/examples/data.json" \
    --batch_size 4 \
    --accumulation_steps 8 \
    --lr 2e-5 \
    --max_datasets_size 512 \
    --max_epochs 1

Verified the output tensorboard file can be served by tensorboard app.
image

⭐️ Do you enjoy contributing to Colossal-AI?

  • 🌝 Yes, I do.
  • 🌚 No, I don't.

Tell us more if you don't enjoy contributing to Colossal-AI.

@CZYCW CZYCW marked this pull request as ready for review September 18, 2023 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant