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

docs: document more differences among different backends #4388

Merged
merged 1 commit into from
Nov 21, 2024

Conversation

njzjz
Copy link
Member

@njzjz njzjz commented Nov 20, 2024

Summary by CodeRabbit

  • New Features

    • Introduced new sections titled "Difference among different backends" in multiple documents, clarifying backend-specific constraints for various descriptors.
    • Added new descriptors for model training, including "se_atten" and "se_atten_v2".
  • Documentation

    • Enhanced clarity and structure of existing documents regarding tensor fitting and model training.
    • Updated guidance on model compression options and backend limitations.
  • Bug Fixes

    • Minor grammatical and formatting adjustments made for improved readability.

Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>

Choose a reason for hiding this comment

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

Copilot reviewed 5 out of 5 changed files in this pull request and generated no suggestions.

Copy link
Contributor

coderabbitai bot commented Nov 20, 2024

📝 Walkthrough

Walkthrough

The pull request introduces several enhancements to documentation files related to tensor fitting and model training across various backends, including TensorFlow, PyTorch, and JAX. Key updates include the addition of new sections that clarify backend-specific constraints and model compression options. The documents have been refined for better clarity, structure, and usability, with specific attention to descriptors such as se_atten and se_e2_a. Minor grammatical and formatting adjustments have also been made to improve readability.

Changes

File Path Change Summary
doc/model/train-fitting-tensor.md Added a new section "Difference among different backends" and refined training JSON format instructions.
doc/model/train-se-atten.md Introduced new descriptor se_atten, expanded on its parameters, and added a new descriptor version se_atten_v2.
doc/model/train-se-e2-a.md Added sections on "Difference among different backends" and "Model compression" with specific backend constraints.
doc/model/train-se-e2-r.md Added sections on "Difference among different backends" and "Model compression" with details on parameter limitations.
doc/model/train-se-e3.md Added a section on "Difference among different backends" and retained the model compression section with backend specifics.

Possibly related PRs

Suggested labels

Docs

Suggested reviewers

  • wanghan-iapcm
  • iProzd

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>, please review it.
    • 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @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.
    • @coderabbitai help me debug CodeRabbit configuration file.

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 using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration 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: 2

🧹 Outside diff range and nitpick comments (5)
doc/model/train-se-e2-r.md (1)

81-81: Consider expanding the model compression section.

While the information about type embedding is useful, this section could benefit from additional details such as:

  • Available compression methods
  • Expected impact on model size/performance
  • Any backend-specific compression considerations
  • Links to relevant compression documentation

Also applies to: 82-84

doc/model/train-se-e2-a.md (1)

103-106: LGTM! Consider adding explanations for the limitations.

The backend differences are clearly documented. To make it more helpful for users, consider adding brief explanations of why these limitations exist:

  • Why can't env_protection be non-zero in TensorFlow?
  • Why must type_one_side be true in JAX?
doc/model/train-fitting-tensor.md (1)

246-249: Enhance the backend differences section

While the section correctly explains the key differences, consider these improvements for clarity:

  1. Explicitly list which backends (PyTorch, JAX) use atom_exclude_types
  2. Add a comparative example showing both approaches:
    // TensorFlow approach (include types to fit)
    "fitting_net": {
      "sel_type": [0]  // Only fit type 0 (oxygen)
    }
    
    // Other backends approach (exclude types)
    "atom_exclude_types": [1]  // Exclude type 1 (hydrogen)
  3. Explain that these approaches are complementary - one specifies types to include, the other specifies types to exclude
doc/model/train-se-atten.md (2)

155-155: Grammar: Use plural form in section header

Change "Difference among different backends" to "Differences among different backends" since multiple differences are being discussed.


160-164: Enhance backend differences documentation

While the constraints are clearly listed, consider enhancing this section by:

  1. Adding brief explanations for why these constraints exist in TensorFlow
  2. Clarifying what happens if users attempt to set these parameters (e.g., will it raise an error?)
  3. Specifying the default values that will be used in TensorFlow

For example:

 In the TensorFlow backend, {ref}`scaling_factor <model[standard]/descriptor[se_atten]/scaling_factor>` cannot set to a value other than `1.0`;
+Attempting to set a different value will raise a ValueError. This constraint exists due to [brief explanation].
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between ca6a00d and 1f8d8cd.

📒 Files selected for processing (5)
  • doc/model/train-fitting-tensor.md (2 hunks)
  • doc/model/train-se-atten.md (1 hunks)
  • doc/model/train-se-e2-a.md (1 hunks)
  • doc/model/train-se-e2-r.md (1 hunks)
  • doc/model/train-se-e3.md (1 hunks)
🔇 Additional comments (3)
doc/model/train-se-e3.md (1)

72-73: LGTM! Section header follows documentation style.

The new section header "Difference among different backends" is consistent with the documentation style and clearly indicates its purpose.

doc/model/train-se-e2-r.md (1)

77-80: LGTM! Clear documentation of backend constraints.

The new section effectively documents the backend-specific limitations, using proper reference links to the documentation parameters.

doc/model/train-fitting-tensor.md (1)

33-34: LGTM: Clear and well-referenced explanation

The text clearly explains what needs to be modified for tensor fitting, with proper references to the relevant documentation sections.

doc/model/train-se-e3.md Show resolved Hide resolved
doc/model/train-se-e2-a.md Show resolved Hide resolved
@github-actions github-actions bot added the Docs label Nov 20, 2024
Copy link

codecov bot commented Nov 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.50%. Comparing base (ca6a00d) to head (1f8d8cd).
Report is 9 commits behind head on devel.

Additional details and impacted files
@@           Coverage Diff           @@
##            devel    #4388   +/-   ##
=======================================
  Coverage   84.50%   84.50%           
=======================================
  Files         604      604           
  Lines       56943    56943           
  Branches     3486     3488    +2     
=======================================
  Hits        48120    48120           
  Misses       7696     7696           
  Partials     1127     1127           

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


🚨 Try these New Features:

@njzjz njzjz added this pull request to the merge queue Nov 21, 2024
Merged via the queue into deepmodeling:devel with commit e9f9321 Nov 21, 2024
60 checks passed
@njzjz njzjz deleted the docs-more branch November 21, 2024 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants