Skip to content

Add comments to clarify code functionality #6

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

Merged
merged 1 commit into from
Jan 23, 2025
Merged

Conversation

akaday
Copy link
Owner

@akaday akaday commented Jan 23, 2025

Add comments to various files to summarize their purpose and functionality, and explain the purpose of specific classes, methods, and functions.

  • applications/DeepSpeed-Chat/chat.py

    • Add comments summarizing the file's purpose and functionality.
    • Add comments explaining the purpose of the main block, arguments, and command being executed.
  • applications/DeepSpeed-Chat/dschat/rlhf/ppo_trainer.py

    • Add comments summarizing the file's purpose and functionality.
    • Add comments explaining the purpose of the class, constructor, and specific methods.
  • applications/DeepSpeed-Chat/dschat/rlhf/rlhf_engine.py

    • Add comments summarizing the file's purpose and functionality.
    • Add comments explaining the purpose of the class, constructor, and specific methods.
  • applications/DeepSpeed-Chat/dschat/utils/data/data_utils.py

    • Add comments summarizing the file's purpose and functionality.
    • Add comments explaining the purpose of specific functions and the class.
  • applications/DeepSpeed-Chat/dschat/utils/data/raw_datasets.py

    • Add comments summarizing the file's purpose and functionality.
    • Add comments explaining the purpose of the class, constructor, and specific methods.
  • applications/DeepSpeed-Chat/dschat/utils/model/model_utils.py

    • Add comments summarizing the file's purpose and functionality.
    • Add comments explaining the purpose of specific functions.
  • applications/DeepSpeed-Chat/dschat/utils/model/reward_model.py

    • Add comments summarizing the file's purpose and functionality.
    • Add comments explaining the purpose of the class, constructor, and specific methods.
  • applications/DeepSpeed-Chat/e2e_rlhf.py

    • Add comments summarizing the file's purpose and functionality.
    • Add comments explaining the purpose of specific functions.
  • applications/DeepSpeed-Chat/training/step1_supervised_finetuning/README.md

    • Add sections summarizing the purpose and functionality of the supervised finetuning step.
    • Add sections explaining the training process, evaluation of the SFT checkpoint, and describing models and datasets used.
    • Add a section providing prompt examples from the OPT-1.3B model and its SFT variants.
  • applications/DeepSpeed-Chat/training/step2_dpo_finetuning/README.md

    • Add sections summarizing the purpose and functionality of the DPO finetuning step.
    • Add sections explaining the training process, evaluation of the DPO checkpoint, and describing datasets used.
  • applications/DeepSpeed-Chat/training/step2_reward_model_finetuning/README.md

    • Add sections summarizing the purpose and functionality of the reward model finetuning step.
    • Add sections explaining the training process, evaluation of the reward model checkpoint, and describing datasets used.
    • Add a section providing evaluation examples from the 350M reward model.
  • applications/DeepSpeed-Chat/training/step3_rlhf_finetuning/README.md

    • Add sections summarizing the purpose and functionality of the RLHF finetuning step.
    • Add sections explaining memory management techniques, DeepSpeed Hybrid Engine, training process, and evaluation of RLHF finetuning results.
  • applications/DeepSpeed-Chat/training/step3_rlhf_finetuning/main.py

    • Add comments summarizing the file's purpose and functionality.
    • Add comments explaining the purpose of specific functions and the main block.

For more details, open the Copilot Workspace session.

Add comments to various files to summarize their purpose and functionality, and explain the purpose of specific classes, methods, and functions.

* **applications/DeepSpeed-Chat/chat.py**
  - Add comments summarizing the file's purpose and functionality.
  - Add comments explaining the purpose of the main block, arguments, and command being executed.

* **applications/DeepSpeed-Chat/dschat/rlhf/ppo_trainer.py**
  - Add comments summarizing the file's purpose and functionality.
  - Add comments explaining the purpose of the class, constructor, and specific methods.

* **applications/DeepSpeed-Chat/dschat/rlhf/rlhf_engine.py**
  - Add comments summarizing the file's purpose and functionality.
  - Add comments explaining the purpose of the class, constructor, and specific methods.

* **applications/DeepSpeed-Chat/dschat/utils/data/data_utils.py**
  - Add comments summarizing the file's purpose and functionality.
  - Add comments explaining the purpose of specific functions and the class.

* **applications/DeepSpeed-Chat/dschat/utils/data/raw_datasets.py**
  - Add comments summarizing the file's purpose and functionality.
  - Add comments explaining the purpose of the class, constructor, and specific methods.

* **applications/DeepSpeed-Chat/dschat/utils/model/model_utils.py**
  - Add comments summarizing the file's purpose and functionality.
  - Add comments explaining the purpose of specific functions.

* **applications/DeepSpeed-Chat/dschat/utils/model/reward_model.py**
  - Add comments summarizing the file's purpose and functionality.
  - Add comments explaining the purpose of the class, constructor, and specific methods.

* **applications/DeepSpeed-Chat/e2e_rlhf.py**
  - Add comments summarizing the file's purpose and functionality.
  - Add comments explaining the purpose of specific functions.

* **applications/DeepSpeed-Chat/training/step1_supervised_finetuning/README.md**
  - Add sections summarizing the purpose and functionality of the supervised finetuning step.
  - Add sections explaining the training process, evaluation of the SFT checkpoint, and describing models and datasets used.
  - Add a section providing prompt examples from the OPT-1.3B model and its SFT variants.

* **applications/DeepSpeed-Chat/training/step2_dpo_finetuning/README.md**
  - Add sections summarizing the purpose and functionality of the DPO finetuning step.
  - Add sections explaining the training process, evaluation of the DPO checkpoint, and describing datasets used.

* **applications/DeepSpeed-Chat/training/step2_reward_model_finetuning/README.md**
  - Add sections summarizing the purpose and functionality of the reward model finetuning step.
  - Add sections explaining the training process, evaluation of the reward model checkpoint, and describing datasets used.
  - Add a section providing evaluation examples from the 350M reward model.

* **applications/DeepSpeed-Chat/training/step3_rlhf_finetuning/README.md**
  - Add sections summarizing the purpose and functionality of the RLHF finetuning step.
  - Add sections explaining memory management techniques, DeepSpeed Hybrid Engine, training process, and evaluation of RLHF finetuning results.

* **applications/DeepSpeed-Chat/training/step3_rlhf_finetuning/main.py**
  - Add comments summarizing the file's purpose and functionality.
  - Add comments explaining the purpose of specific functions and the main block.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/akaday/DeepSpeedExamples?shareId=XXXX-XXXX-XXXX-XXXX).
@akaday akaday merged commit 7575a6e into master Jan 23, 2025
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