-
Notifications
You must be signed in to change notification settings - Fork 2
feat: add megatron-bridge as dependency #32
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Pablo Garay <pagaray@nvidia.com>
Signed-off-by: Pablo Garay <pagaray@nvidia.com>
Signed-off-by: Pablo Garay <pagaray@nvidia.com>
Signed-off-by: Pablo Garay <pagaray@nvidia.com>
Signed-off-by: Pablo Garay <pagaray@nvidia.com>
|
/ok to test 0547378 |
Signed-off-by: Pablo Garay <pagaray@nvidia.com>
… dependency group) Signed-off-by: Pablo Garay <pagaray@nvidia.com>
Signed-off-by: Pablo Garay <pagaray@nvidia.com>
Signed-off-by: Pablo Garay <pagaray@nvidia.com>
Signed-off-by: Pablo Garay <pagaray@nvidia.com>
Signed-off-by: Pablo Garay <pagaray@nvidia.com>
|
/ok to test de72a5b |
Signed-off-by: Pablo Garay <pagaray@nvidia.com>
Signed-off-by: Pablo Garay <pagaray@nvidia.com>
|
/ok to test b75984f |
@pablo-garay, there was an error processing your request: See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/2/ |
|
/ok to test b75984f |
@pablo-garay, there was an error processing your request: See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/2/ |
|
/ok to test 069c536 |
|
/ok to test 6c08f5e |
Signed-off-by: Pablo Garay <pagaray@nvidia.com>
|
/ok to test 90f32c8 |
Signed-off-by: Pablo Garay <pagaray@nvidia.com>
|
/ok to test 8e0c998 |
|
✅ uv.lock is up to date The lockfile is in sync with pyproject.toml. |
Signed-off-by: Pablo Garay <pagaray@nvidia.com>
|
/ok to test 8b8adff |
|
✅ uv.lock is up to date The lockfile is in sync with pyproject.toml. |
|
abhinavg4
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see comments
| RUN uv venv ${UV_PROJECT_ENVIRONMENT} --system-site-packages | ||
|
|
||
| # Copy dependency files and source code (needed for dynamic version resolution) | ||
| COPY pyproject.toml uv.lock ./ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should do this. Why are we doing this? We should copy these to /opt/DFM or something.
Similar to https://github.com/NVIDIA-NeMo/Megatron-Bridge/blob/main/docker/Dockerfile.ci
@abhinavg4 i agree with the proposed above. This PR while seeming small took already 30 commits though. It really was an effort of putting different pieces to be able together to make it work (even if changes in the diff look simple). I recommend we take an incremental/iterative approach & we merge this & i can create follow up PR's to address the above proposal. |
| "ftfy", | ||
| "imageio-ffmpeg", | ||
| "opencv-python-headless==4.10.0.84", | ||
| "megatron-bridge", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MBridge has a tricky problem I think because it's installing MCore from a submodule rather than MCore's pypi package. It's unfortunately an issue with how we decided to use the MCore dev branch and there is no dev branch pypi package. So if we just list MBridge here, it will not install the expected MCore dependency. Please work with @ko3n1g for a suggested path forward.
It may be cleaner to handle both Automodel and MBridge in a similar fashion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @chtruong814 I think Mbridge does install Mcore here?
https://github.com/NVIDIA-NeMo/Megatron-Bridge/blob/main/pyproject.toml#L81
Nonetheless, we can use Megatron and Mbridge as a 3rd party for our dev work and containers, (See point 6 here but to release on pypi, we can only use packages from pypi?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is that MBridge uses a commit of MCore off of the MCore dev branch, which is referenced as a 3rd party submodule. That's only installed correctly using uv with this:
https://github.com/NVIDIA-NeMo/Megatron-Bridge/blob/main/pyproject.toml#L117
Otherwise, uv would by default install whatever available pypi packages exists, which is not the same as the referenced commit.
| git push origin HEAD:${{ github.ref_name }} | ||
| - name: Comment on PR with lockfile status | ||
| if: github.event_name == 'pull_request' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This new workflow isn't running on PR events.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right. This was intended. Only run on manual trigger. This workflow is super helpful but optional for when people want it only.
feat: add megatron-bridge (as dependency)
Passing tests: https://github.com/NVIDIA-NeMo/DFM/actions/runs/19188264333/job/54859363462?pr=32