Skip to content

update dependencies - liger + trl#2987

Merged
winglian merged 3 commits into
mainfrom
updates
Jul 31, 2025
Merged

update dependencies - liger + trl#2987
winglian merged 3 commits into
mainfrom
updates

Conversation

@winglian

@winglian winglian commented Jul 29, 2025

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Chores
    • Updated package dependencies to use newer versions of liger-kernel and trl.
  • New Features
    • Added an option to control importance sampling granularity in training settings.
  • Tests
    • Enhanced test configuration to improve dataset processing performance.

@coderabbitai

coderabbitai Bot commented Jul 29, 2025

Copy link
Copy Markdown
Contributor
📝 Walkthrough

"""

Walkthrough

The requirements.txt file was updated to increase the version numbers of two dependencies: liger-kernel was upgraded from 0.6.0 to 0.6.1, and trl from 0.19.1 to 0.20.0. The test_activation_checkpointing_offload test was modified to add "dataset_processes": 4 to its configuration. The GRPOStrategy class was extended to include an importance_sampling_level argument from the trl config. The TRLConfig schema was updated to add an optional importance_sampling_level field.

Changes

Cohort / File(s) Change Summary
Dependency version bumps
requirements.txt
Updated liger-kernel from 0.6.0 to 0.6.1 and trl from 0.19.1 to 0.20.0. No other changes.
Test configuration update
tests/e2e/patched/test_activation_checkpointing.py
Added "dataset_processes": 4 to the test configuration dictionary in test_activation_checkpointing_offload.
GRPOStrategy training args update
src/axolotl/core/trainers/grpo/__init__.py
Extended set_training_args_kwargs method to add importance_sampling_level from the trl config if present.
TRLConfig schema update
src/axolotl/utils/schemas/trl.py
Added optional importance_sampling_level field to TRLConfig model accepting "sequence", "token", or None with descriptive doc.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~15 minutes

Possibly related PRs

Suggested labels

ready to merge

Suggested reviewers

  • SalmanMohammadi
  • djsaunde
    """

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9d6f786 and 959319d.

📒 Files selected for processing (2)
  • src/axolotl/core/trainers/grpo/__init__.py (1 hunks)
  • src/axolotl/utils/schemas/trl.py (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
src/axolotl/core/trainers/grpo/__init__.py (1)

Learnt from: NanoCode012
PR: #2952
File: src/axolotl/common/datasets.py:125-125
Timestamp: 2025-07-22T08:27:00.129Z
Learning: GRPO (cfg.rl == "grpo" or cfg.rl is RLType.GRPO) should be excluded from dataset label checking during preprocessing, while other RL methods should continue to have this functionality available.

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
  • GitHub Check: PyTest from Source Dist (3.11, 2.7.0)
  • GitHub Check: PyTest (3.11, 2.7.0)
  • GitHub Check: PyTest from Source Dist (3.11, 2.6.0)
  • GitHub Check: PyTest (3.11, 2.7.1)
  • GitHub Check: PyTest from Source Dist (3.11, 2.7.1)
  • GitHub Check: PyTest (3.11, 2.6.0)
  • GitHub Check: pre-commit
  • GitHub Check: test-axolotl-multigpu (126, 12.6.3, 3.11, 2.6.0, 2, true)
  • GitHub Check: test-axolotl-multigpu (126, 12.6.3, 3.11, 2.7.1, vllm, 2, true)
  • GitHub Check: test-axolotl-multigpu (126, 12.6.3, 3.11, 2.7.0, 2, true)
  • GitHub Check: pre-commit
🔇 Additional comments (2)
src/axolotl/utils/schemas/trl.py (1)

83-89: LGTM! Well-structured configuration field addition.

The new importance_sampling_level field is properly implemented with:

  • Correct type annotation using Literal for constrained string values
  • Comprehensive description explaining the purpose and usage differences between GRPO and GSPO
  • Appropriate default value of None for backward compatibility
  • Consistent formatting with other fields in the class
src/axolotl/core/trainers/grpo/__init__.py (1)

85-88: LGTM! Proper integration of the new configuration field.

The implementation correctly:

  • Uses a proper None check before adding the field to the kwargs dictionary
  • Follows the established pattern used by other conditional field additions in the method
  • Maintains consistency with the TRLConfig schema field naming
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch updates

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this 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.

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.

@winglian winglian requested a review from NanoCode012 July 29, 2025 14:05
@winglian winglian changed the title update dependencies update dependencies - liger + trl Jul 29, 2025
@codecov

codecov Bot commented Jul 29, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/axolotl/core/trainers/grpo/__init__.py 50.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@winglian winglian merged commit 563f5ee into main Jul 31, 2025
17 of 18 checks passed
@winglian winglian deleted the updates branch July 31, 2025 15:17
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.

2 participants