Repository navigation
fix(lora): resolve adapters through configured caches - #833
Conversation
|
@coderabbitai full review Please review the current head 3dde949. This resolves admitted LoRA sources through the configured cache policy and depends on #827 for download containment. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to
|
The merge-base changed after approval.
|
@coderabbitai full review The prerequisite #827 is now merged. Approval 5579476211 on unchanged head 3dde949 was automatically dismissed with “The merge-base changed after approval.” Please refresh the full review against the current main merge base. No source or dependency changes were made. |
✅ Action performedFull review finished. Your included review limit is currently reached under our Fair Usage Limits Policy. Your current included review allowance is based on your included PR review attempts over the past 7 days. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 16 minutes. |
The merge-base changed after approval.
✅ Action performedFull review finished. Your included review limit is currently reached under our Fair Usage Limits Policy. Your current included review allowance is based on your included PR review attempts over the past 7 days. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 9 minutes. |
|
@coderabbitai full review Please review exact head |
✅ Action performedFull review finished. Your included review limit is currently reached under our Fair Usage Limits Policy. Your current included review allowance is based on your included PR review attempts over the past 7 days. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 4 minutes. |
Declared runtime LoRA adapters bypassed SIE’s configured cluster cache and downloaded directly from the Hub. This breaks cache-only deployments even when the adapter is already present in their local or cluster cache.
Route the PEFT mixin, SGLang and CrossEncoder LoRA loaders through one shared source resolver after their existing declaration/admission checks. It honors local → cluster → permitted Hub lookup, requires the exact immutable revision when supplied, validates the two adapter files, and rejects cross-repository path redirects. Explicit local HF snapshot directories retain their normal links to the same repository’s blobs. A local directory combined with a Hub revision is refused rather than silently ignoring the pin.
Allowed Hub fallback remains limited to
adapter_config.jsonandadapter_model.safetensors. Optional keyword-only cache arguments let LoRA require that pair and hydrate incomplete snapshots through the existing tiers without deleting cached data. Unpinned LoRA resolves the normalmainreference. Ordinary callers retain their unfiltered download and existing cache-hit defaults. PEFT config loading is local-only after resolution. Scoring, selection and adapter lifecycle methods are unchanged.Builds on merged #827 for cluster download containment. That prerequisite provides per-file atomic replacement; it does not make a whole snapshot transactional or defend against a hostile concurrent writer with the same local privileges. The shared GLiNER2/decision runtime integration is handled separately.
Validation: 519 focused CPU cases pass across the resolver, all three adapter loaders, and SDK cache/storage. These include Hub/network-denied cache controls, partial-cache recovery, exact-pin and repository-boundary negatives, real tiny PEFT/CrossEncoder lifecycle checks, and both localhost SDK routes. Ruff, formatting and scoped type checks pass. Independent source/adversarial review passed eight additional network-denied controls. Full current-head CI is pending. No GPU or performance claim.
The branch now includes current main to refresh review ancestry after the prerequisite merge. All ten resolver source/test files remain byte-identical to the reviewed implementation; only five already-landed main files were inherited. Eight focused startup/CI contract checks pass, and the 519-case resolver validation maps by identical source. Fresh current-head CI and review are pending.
Summary by CodeRabbit
New Features
Bug Fixes