Repository navigation
fix(spaces): send the four pipeline config dicts create() requires - #24
Merged
Merged
Conversation
The backend's CreateMapSerializer (since the Synthesis abstraction change,
MantisAPI #1780) hard-requires embedding_config, reduction_config,
clustering_config and labeling_config as dicts in the /synthesis/landscape
request — a create without them 400s with 'This configuration object is
required.'
create() now sends the minimal self-defaulting shapes (verified against the
prod serializer inside the live container):
- embedding_config: {method: llm, service: vllm-embeddings, model: auto,
batch_size: 100}
- reduction_config: {reduction_method: <reducer>, start_dimension: null,
end_dimension: 2}
- clustering_config: {clustering_method: k_means}
- labeling_config: {config_type: metadata, service: vllm-instruct, model: auto}
All four are overridable via new kwargs (embedding_config=,
reduction_config=, clustering_config=, labeling_config=). from_github() is
unaffected — GitHubRepoSerializer builds its own configs.
Full payload verified end-to-end against the production CreateMapSerializer.
Test suite: 80 passed.
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
Follow-up to #23 (visibility contract). Found while end-to-end verifying the fixed SDK payload against the live prod serializer: the visibility fix alone is NOT sufficient to un-break SDK space creation.
The backend's
CreateMapSerializer(since the Synthesis abstraction change, MantisAPI #1780, Jul 11) hard-requires four pipeline config dicts in every/synthesis/landscaperequest —embedding_config,reduction_config,clustering_config,labeling_config. A request without them 400s with"This configuration object is required.". The SDK'screate()sends none of them. (The repo_radar failure log only ever showed theis_publicerror because that check fires first invalidate()— fixingis_publicalone would have exposed the config 400 the very next run.)Changes
create()now sends the four minimal self-defaulting config dicts, shapes verified against the productionCreateMapSerializerinside the live Django container:embedding_config:{method: llm, service: vllm-embeddings, model: auto, batch_size: 100}reduction_config:{reduction_method: <reducer arg>, start_dimension: null, end_dimension: 2}clustering_config:{clustering_method: k_means}labeling_config:{config_type: metadata, service: vllm-instruct, model: auto}embedding_config=,reduction_config=,clustering_config=,labeling_config=).from_github()is unaffected — the backend'sGitHubRepoSerializerbuilds its own configs.Verification
create()builds (string values + the view'sjson.loadspass simulated) through the realCreateMapSerializerinside the prod Django container —[PASS] FULL fixed-SDK payload validates,visibility: unlistedlands inspace_config, all four configs land inmap_config.Note for reviewers
The MantisAPI CI contract check (
sdk_contract.check_contract) only validates routes/data-types — the livetest_create_space_request_contractnever runs in CI (the SDK is deliberately not importable in the CI venv), which is why this drift wasn't caught. Worth considering a CI lane that runs the live contract test with the SDK installed.