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

Fix: finetune error with cpu device #76

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ZeroKnighting
Copy link
Contributor

This pull request includes significant updates to the src/mattersim/training/finetune_mattersim.py and src/mattersim/utils/vasprun_to_xyz.py files to enhance device compatibility and parameter configuration. The key changes involve adding support for different device types (CUDA and Gloo) and introducing argument parsing for better flexibility.

Device Compatibility Enhancements:

  • Conditional initialization of the process group based on the device type in src/mattersim/training/finetune_mattersim.py.
  • Setting the pin memory flag conditionally based on the device type in src/mattersim/training/finetune_mattersim.py. [1] [2]
  • Wrapping the model with DistributedDataParallel only if the device is CUDA in src/mattersim/training/finetune_mattersim.py.

Parameter Configuration Improvements:

  • Introduction of argument parsing to dynamically set paths, ratios, and seed values in src/mattersim/utils/vasprun_to_xyz.py. [1] [2]

These changes improve the flexibility and robustness of the code, making it more adaptable to different environments and use cases.

@ZeroKnighting ZeroKnighting changed the title Xixian/fix finetune cpu Fix: finetune error with cpu device Jan 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

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