Skip to content

Update installation and import for veRL integration - #58

Merged
ChiYeungLaw merged 3 commits into
mainfrom
dev-ziji
Apr 7, 2026
Merged

ChiYeungLaw merged 3 commits into
mainfrom
dev-ziji

Conversation

@StevenShi-23

Copy link
Copy Markdown
Collaborator

This PR addresses #57 by adding veRL dependencies to project setup script and fixing imports.

@salesforce-cla

Copy link
Copy Markdown

Thanks for the contribution! Before we can merge this, we need @StevenShi-23 to sign the Salesforce Inc. Contributor License Agreement.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds packaging support for the VERL-based RL integration and prevents package import failures when the (currently missing/WIP) fully-async module isn’t present.

Changes:

  • Introduces a new rl optional dependency group with VERL + supporting libs.
  • Makes fully-async exports in mcpuniverse.rl.integrations.verl optional via a guarded import.

Reviewed changes

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

File Description
pyproject.toml Adds an rl extra to install VERL/RL-related dependencies.
mcpuniverse/rl/integrations/verl/__init__.py Wraps fully_async imports/exports in a try/except to avoid import-time failures.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pyproject.toml
Comment on lines +117 to +126
rl = [
"verl>=0.3.0",
"torch>=2.6.0",
"ray>=2.0.0",
"tensordict>=0.6.0",
"hydra-core>=1.3.0",
"tqdm>=4.60.0",
"transformers>=4.40.0",
"numpy>=1.24.0",
]

Copilot AI Mar 23, 2026

Copy link

Choose a reason for hiding this comment

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

This adds an rl extra in pyproject.toml, but the repo’s main install path documented in README.md is pip install -r requirements.txt, and requirements.txt currently only mentions the vllm/sglang extras. To avoid users still hitting missing-dependency errors for the VERL integration, consider updating the documented installation flow (e.g., mention pip install -e '.[rl]') and/or keeping requirements.txt guidance in sync with this new extra.

Copilot uses AI. Check for mistakes.
Comment on lines +50 to +51
except ImportError:
pass

Copilot AI Mar 23, 2026

Copy link

Choose a reason for hiding this comment

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

The except ImportError: pass will also swallow import errors coming from inside fully_async once that module exists (e.g., missing optional deps, syntax errors), making failures hard to debug. Consider only handling the specific case where the submodule is missing (e.g., catch ModuleNotFoundError and verify e.name matches this package’s fully_async module, or pre-check with importlib.util.find_spec), and let other import errors surface.

Suggested change
except ImportError:
pass
except ModuleNotFoundError as e:
# Only ignore the error if the optional fully_async module itself is missing.
# Re-raise if some other module is missing so real import errors are not hidden.
if e.name not in (__name__ + ".fully_async", "fully_async"):
raise

Copilot uses AI. Check for mistakes.
@StevenShi-23

StevenShi-23 commented Apr 6, 2026 •

Copy link
Copy Markdown
Collaborator Author

@ChiYeungLaw i've cleaned up the RL installation steps and vllm env var. Please let me know how you think, thanks!

@ChiYeungLaw
ChiYeungLaw merged commit 085f917 into main Apr 7, 2026
3 checks passed
pruksmhc pushed a commit to pruksmhc/MCP-Universe that referenced this pull request Apr 30, 2026
…dev-ziji

Update installation and import for veRL integration
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.

3 participants