Repository navigation
feat(custom-models): LoRA adapters on a shared base; release 0.3.0 - #19
Merged
Merged
Conversation
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.
Summary
Adds LoRA adapters on a shared base (public beta) to the Python SDK and releases 0.3.0. Merging tags
v0.3.0and publishes to PyPI.custom_models.create(lora_enabled=True, max_lora_rank=16|64)deploys a shared base. A missing rank fails client-side.custom_models.adapters(sync and async):attach(Hugging Face, presigned S3, or assume-role S3; inferred from the arguments; optional idempotency key),list,get,delete,wait_until_ready,wait_until_deleted.custom_models.list(include_adapters=True).CustomModelfields:lora_enabled,max_lora_rank,max_adapters,parent_model_id,adapter_digest;LoraRankexported.custom_models.wait_until_readyon an adapter. The server answersrefreshwith 422ADAPTER_REFRESH_UNSUPPORTED, so it switches to pollingget.examples/lora_adapters.py, CHANGELOG[0.3.0].The first commit regenerates
_generated/from prod OpenAPI 0.26.1. Its tree is identical to #17's (git diff origin/spec-sync/auto -- src/graphn/_generatedis empty), so #17 can be closed once this merges.Chat needs no change:
chat.completions.create(model=adapter.id)already adds thecustom:prefix, and auto-wake'sPOST .../wakeon an adapter wakes its base.Tests
ruff check src testsandpytest -ra: 109 passed, 21 of them new (tests/test_custom_model_adapters.py).list(include_adapters=True)succeeds, andadapters.liston an unknown base raisesNotFoundError. Nothing was deployed.No tenant-scope change: every call goes through
cp_path, i.e./v1/{client workspace}/custom-models/..., and the server enforces workspace ownership of both the base and the adapter.