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

breaking: remove multi-task support in tf #3763

Merged
merged 6 commits into from
May 11, 2024

Conversation

iProzd
Copy link
Collaborator

@iProzd iProzd commented May 9, 2024

Summary by CodeRabbit

  • New Features
    • Removed the multi_task parameter across various descriptor initialization methods, streamlining the setup process.
    • Introduced a new option --head for specifying a model branch to freeze in multi-task mode.
  • Bug Fixes
    • Corrected initialization and training processes by removing outdated multi-task functionalities.
  • Documentation
    • Updated guides on model freezing and training to reflect the removal of multi-task functionalities and the shift towards using the PyTorch backend.
  • Refactor
    • Eliminated redundant code and simplified parameter assignments in training scripts.
  • Chores
    • Removed unused dictionaries and outdated code across several modules to clean up the codebase.

Copy link
Contributor

coderabbitai bot commented May 9, 2024

Walkthrough

Walkthrough

The recent updates across the DeepMD library primarily involve the removal of the multi_task parameter from various descriptor classes and entrypoints, simplifying the initialization and training processes. This change reflects a shift towards single-task focused functionalities, streamlining the codebase and potentially enhancing maintenance and performance. Additionally, corresponding documentation updates guide users towards using the PyTorch backend for model training.

Changes

Files Change Summary
deepmd/dpmodel/descriptor/dpa1.py, se_e2_a.py, se_r.py, tf/descriptor Removed multi_task parameter from the __init__ methods in various descriptor classes.
deepmd/main.py, tf/entrypoints, tf/train/trainer.py, utils/argcheck.py Removed multi-task related functionalities, arguments, and imports across scripts and utilities.
tf/model/__init__.py MultiModel entity removed from the exported entities list.
doc Documentation updated to reflect the removal of multi-task functionalities and to promote PyTorch backend usage.

This table provides a concise overview of the key changes made in the library, emphasizing the removal of multi-task capabilities and adjustments in documentation to align with the new direction.


Recent Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 9a85780 and caccd72.
Files selected for processing (1)
  • source/tests/tf/test_nvnmd_entrypoints.py (2 hunks)

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Out of diff range and nitpick comments (7)
deepmd/tf/descriptor/se_r.py (5)

281-282: The method merge_input_stats lacks a detailed docstring. It's important for maintainability and understandability to have comprehensive documentation, especially for public or complex methods.


281-282: The method merge_input_stats lacks a detailed docstring. It's important for maintainability and understandability to have comprehensive documentation, especially for public or complex methods.


281-282: The method merge_input_stats lacks a detailed docstring. It's important for maintainability and understandability to have comprehensive documentation, especially for public or complex methods.


281-282: The method merge_input_stats lacks a detailed docstring. It's important for maintainability and understandability to have comprehensive documentation, especially for public or complex methods.


281-282: The method merge_input_stats lacks a detailed docstring. It's important for maintainability and understandability to have comprehensive documentation, especially for public or complex methods.

deepmd/tf/descriptor/se_atten.py (1)

402-408: Ensure that the statistical dictionary keys are correctly documented and used.

While the keys in the statistical dictionary are standard, it's good practice to ensure they are documented somewhere in the method or class docstring for clarity, especially for large and complex methods like compute_input_stats.

deepmd/utils/argcheck.py (1)

Line range hint 59-67: Ensure that the deprecation warning includes more context about the deprecation, such as the version it was deprecated in and the alternative to use if applicable.

doc/freeze/freeze.md Outdated Show resolved Hide resolved
deepmd/tf/descriptor/se_a.py Show resolved Hide resolved
deepmd/tf/descriptor/se_atten.py Show resolved Hide resolved
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

doc/freeze/freeze.md Show resolved Hide resolved
Copy link

codecov bot commented May 9, 2024

Codecov Report

Attention: Patch coverage is 89.87342% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 82.26%. Comparing base (7ab3040) to head (caccd72).

Files Patch % Lines
deepmd/tf/train/trainer.py 87.69% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            devel    #3763      +/-   ##
==========================================
+ Coverage   82.25%   82.26%   +0.01%     
==========================================
  Files         513      511       -2     
  Lines       47666    46952     -714     
  Branches     2979     2980       +1     
==========================================
- Hits        39207    38625     -582     
+ Misses       7548     7416     -132     
  Partials      911      911              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

iProzd and others added 2 commits May 9, 2024 23:43
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: Duo <50307526+iProzd@users.noreply.github.com>
@iProzd iProzd linked an issue May 9, 2024 that may be closed by this pull request
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

source/tests/tf/test_nvnmd_entrypoints.py Show resolved Hide resolved
source/tests/tf/test_nvnmd_entrypoints.py Show resolved Hide resolved
@wanghan-iapcm wanghan-iapcm added this pull request to the merge queue May 11, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 11, 2024
@wanghan-iapcm wanghan-iapcm added this pull request to the merge queue May 11, 2024
Merged via the queue into deepmodeling:devel with commit 063de8a May 11, 2024
60 checks passed
mtaillefumier pushed a commit to mtaillefumier/deepmd-kit that referenced this pull request Sep 18, 2024
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Removed the `multi_task` parameter across various descriptor
initialization methods, streamlining the setup process.
- Introduced a new option `--head` for specifying a model branch to
freeze in multi-task mode.
- **Bug Fixes**
- Corrected initialization and training processes by removing outdated
multi-task functionalities.
- **Documentation**
- Updated guides on model freezing and training to reflect the removal
of multi-task functionalities and the shift towards using the PyTorch
backend.
- **Refactor**
- Eliminated redundant code and simplified parameter assignments in
training scripts.
- **Chores**
- Removed unused dictionaries and outdated code across several modules
to clean up the codebase.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Duo <50307526+iProzd@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] deprecate multi-task in TF
3 participants