Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a lightweight server implementation that wraps a Ume model for generating embeddings, along with associated tests and dependency configuration updates.
- Adds a new UmeServer class in src/lobster/server/_server.py that registers an embedding tool.
- Implements tests in tests/lobster/server/test__ume_server.py for validating the server’s behavior with various modalities and inputs.
- Updates the dependency configuration in pyproject.toml and adjusts notebook metadata in two notebooks.
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/lobster/server/test__ume_server.py | New tests for UmeServer covering aggregated and per-sequence embeddings and error conditions. |
| src/lobster/server/_server.py | Introduces UmeServer that wraps the Ume model and exposes an embed_sequences tool via FastMCP. |
| pyproject.toml | Adds the mcp dependency and updates torch constraints for flash compatibility. |
| notebooks/04-ume-multimodal-embeddings.ipynb | Updates notebook outputs and Python version metadata. |
| notebooks/01-inference.ipynb | Adjusts kernelspec and Python version metadata. |
Comments suppressed due to low confidence (2)
tests/lobster/server/test__ume_server.py:41
- [nitpick] Test function names include 'mcp' even though the server class is named 'UmeServer'. Consider renaming them for consistency and clarity.
def test_ume_mcp_server(ume_server, sample_sequences):
tests/lobster/server/test__ume_server.py:60
- Using assert_called_with in a loop only verifies the most recent call. Consider resetting the mock between iterations or using assert_has_calls with a list of expected calls to thoroughly validate every invocation.
ume_server.model.embed_sequences.assert_called_with(sequences, modality, aggregate=True)
karinazad
approved these changes
Jun 5, 2025
Collaborator
|
very nice! could you please add README in src/server describing usage? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.