Skip to content

lightweight server#96

Merged
ncfrey merged 4 commits intomainfrom
n/server
Jun 5, 2025
Merged

lightweight server#96
ncfrey merged 4 commits intomainfrom
n/server

Conversation

@ncfrey
Copy link
Contributor

@ncfrey ncfrey commented Jun 4, 2025

No description provided.

@ncfrey ncfrey requested a review from Copilot June 4, 2025 21:21
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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)

@ncfrey ncfrey temporarily deployed to test.pypi.org June 4, 2025 21:23 — with GitHub Actions Inactive
@ncfrey ncfrey requested a review from karinazad June 4, 2025 21:23
@karinazad
Copy link
Collaborator

very nice! could you please add README in src/server describing usage?

@ncfrey ncfrey merged commit 6381745 into main Jun 5, 2025
4 checks passed
@ncfrey ncfrey deleted the n/server branch June 5, 2025 14:03
@ncfrey ncfrey temporarily deployed to test.pypi.org June 5, 2025 14:04 — with GitHub Actions Inactive
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.

3 participants