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

Fixed DLRModel / DLRMBlock to accept bottom_block with dropout on top of MLPs #1018

Merged
merged 2 commits into from
Mar 15, 2023

Conversation

gabrielspmoreira
Copy link
Member

Goals ⚽

This PR fixes an error raised by DLRModel when we provide in bottom_block=MLPBlock(..., dropout) arg set. For example:

model = mm.DLRMModel(
        schema,
        embedding_dim=10,
        bottom_block=mm.MLPBlock([64, 32], dropout=0.05),
        prediction_tasks=mm.BinaryOutput("click"),
    )

Implementation Details 🚧

This PR fixes that by iterating over bottom_block layers and finding the last MLP layer to check fit its output dim matches embedding dim.

Testing Details 🔍

The test_dlrm_model was updated to test bottom_block=mm.MLPBlock([5, 2], dropout=0.05)

@gabrielspmoreira gabrielspmoreira requested a review from rnyak March 14, 2023 17:01
@gabrielspmoreira gabrielspmoreira self-assigned this Mar 14, 2023
@gabrielspmoreira gabrielspmoreira added the bug Something isn't working label Mar 14, 2023
@gabrielspmoreira gabrielspmoreira added this to the Merlin 23.03 milestone Mar 14, 2023
@github-actions
Copy link

Documentation preview

https://nvidia-merlin.github.io/models/review/pr-1018

@rnyak rnyak mentioned this pull request Mar 15, 2023
@gabrielspmoreira gabrielspmoreira merged commit ca18dff into main Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants