Skip to content

fix(llm): propagate deployment concurrency to Pylon - #1947

Open
FamousDirector wants to merge 1 commit into
mainfrom
jcameron/fix-pylon-concurrency-1946
Open

FamousDirector wants to merge 1 commit into
mainfrom
jcameron/fix-pylon-concurrency-1946

Conversation

@FamousDirector

@FamousDirector FamousDirector commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

TL;DR

Propagate each NVCF deployment's maxRequestConcurrency value through ICMS to the worker launch specification. Use that typed value to configure Pylon's static maximum engine concurrency fallback.

Additional Details

Pylon needs a capacity limit when the inference engine does not publish live max_engine_concurrency statistics. The source of that limit is the selected NVCF deployment GPU specification.

This change carries maxRequestConcurrency from GpuSpecificationEntity into the NVCF-to-ICMS request, the ICMS launch model, and the BYOC worker queue message. The Go workload translator then adds --max-engine-concurrency=<value> to the Pylon sidecar for both container-based and Helm-based LLM functions.

The typed deployment value is authoritative when it is present. Reading MAX_REQUEST_CONCURRENCY remains only as a mixed-version fallback for queue messages created by older services during rollout. Live inference-engine statistics continue to take precedence over Pylon's static command-line fallback.

No diagram update is needed because this adds a field to the existing launch path without changing component topology.

Customer Release Notes

LLM request routing now uses each deployment's configured request concurrency as a static worker-capacity fallback when live engine statistics are unavailable.

For the Reviewer

Review the deployment-field propagation across NVCF, ICMS, and the BYOC queue model, then the precedence logic in pkg/icms-translate/translate/function/llm.go. The Go unit test intentionally provides different typed and legacy environment values to verify that the deployment field wins.

For QA

Passed:

  • Built the NVCF core, ICMS core, and Go translator Bazel targets with remote JDK 25.
  • IcmsClientTest: 9 tests.
  • CreateInstanceApiModelConverterTest, ByocMessageGeneratorTest, and ByocSqsMessageModelTest: 27 tests.
  • GOWORK=off GOFLAGS=-mod=vendor go test ./pkg/icms-translate/... -count=1.
  • bazel test //src/libraries/go/lib/pkg/icms-translate/translate/function:function_test --test_output=errors.
  • Regenerated the container and Helm LLM manifests and compared them with the checked-in fixtures.
  • git diff --check origin/main...HEAD.

The local Go codegen command could not run because deepcopy-gen is not installed. The new Go field is a scalar and does not change generated deepcopy code. The go-lib codegen CI check passed.

QA needed: No.

Issues

Fixes #1946

Dependencies

None. No license or NOTICE changes.

Checklist

  • I am familiar with the Contributing Guidelines.
  • I have signed off my commits for Developer Certificate of Origin (DCO) compliance.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

Summary by CodeRabbit

  • New Features
    • Added support for configuring the maximum number of concurrent requests handled by each function instance.
    • The configured deployment limit is propagated through instance creation and launch configuration.
    • Deployment-level concurrency settings take precedence over legacy environment-based settings.
    • When no concurrency limit is configured, no engine concurrency override is applied.
  • Tests
    • Added coverage verifying configuration propagation, precedence, serialization, and default behavior.

@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: ddda2783-d136-455f-b76c-0634ff5d6e4e

📥 Commits

Reviewing files that changed from the base of the PR and between a52285c and 707999c.

⛔ Files ignored due to path filters (4)
  • src/libraries/go/lib/testdata/icms-translate/function/container/llm/exp.yaml is excluded by !**/testdata/**
  • src/libraries/go/lib/testdata/icms-translate/function/container/llm/message.json is excluded by !**/testdata/**
  • src/libraries/go/lib/testdata/icms-translate/function/helmchart/llm/exp.yaml is excluded by !**/testdata/**
  • src/libraries/go/lib/testdata/icms-translate/function/helmchart/llm/message.json is excluded by !**/testdata/**
📒 Files selected for processing (14)
  • src/control-plane-services/cloud-functions/nvcf-core/src/main/java/com/nvidia/nvcf/icms/client/IcmsClient.java
  • src/control-plane-services/cloud-functions/nvcf-core/src/main/java/com/nvidia/nvcf/icms/client/IcmsStubService.java
  • src/control-plane-services/cloud-functions/nvcf-core/src/test/java/com/nvidia/nvcf/icms/client/IcmsClientTest.java
  • src/control-plane-services/instance-cluster-management/icms-core/src/main/java/com/nvidia/icms/inbound/rest/converters/CreateInstanceApiModelConverter.java
  • src/control-plane-services/instance-cluster-management/icms-core/src/main/java/com/nvidia/icms/inbound/rest/model/CreateSpotInstanceLaunchSpecificationApiModel.java
  • src/control-plane-services/instance-cluster-management/icms-core/src/main/java/com/nvidia/icms/inbound/rest/model/swagger/schema/SpotInstanceRequestSchema.java
  • src/control-plane-services/instance-cluster-management/icms-core/src/main/java/com/nvidia/icms/outbound/sqs/model/byoc/ByocSqsMessageModel.java
  • src/control-plane-services/instance-cluster-management/icms-core/src/main/java/com/nvidia/icms/service/byoc/ByocMessageGenerator.java
  • src/control-plane-services/instance-cluster-management/icms-core/src/test/java/com/nvidia/icms/inbound/rest/converters/CreateInstanceApiModelConverterTest.java
  • src/control-plane-services/instance-cluster-management/icms-core/src/test/java/com/nvidia/icms/outbound/sqs/model/byoc/ByocSqsMessageModelTest.java
  • src/control-plane-services/instance-cluster-management/icms-core/src/test/java/com/nvidia/icms/service/byoc/ByocMessageGeneratorTest.java
  • src/libraries/go/lib/pkg/icms-translate/translate/function/llm.go
  • src/libraries/go/lib/pkg/icms-translate/translate/function/llm_test.go
  • src/libraries/go/lib/pkg/icms-translate/translate/function/types.go

Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review.


📝 Walkthrough

Walkthrough

Changes

The launch path now carries maxRequestConcurrency from the selected GPU specification through ICMS and the BYOC queue message. The worker translator uses this typed value for --max-engine-concurrency, with an environment fallback.

Request propagation

Layer / File(s) Summary
ICMS request propagation
src/control-plane-services/cloud-functions/nvcf-core/...
IcmsClient resolves the value with a default of 1, sends it in the ICMS request, and exposes it through the environment. Tests verify the encoded request.
Launch specification and BYOC message
src/control-plane-services/instance-cluster-management/icms-core/...
ICMS request models, schemas, and BYOC messages preserve the nullable concurrency field. Conversion, serialization, and message-generation tests verify the value.
Worker translation to Pylon
src/libraries/go/lib/pkg/icms-translate/translate/function/...
The translator prefers positive LaunchSpecification.MaxRequestConcurrency, falls back to MAX_REQUEST_CONCURRENCY, and omits the argument when neither value exists. Tests cover these cases.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Bug fix · Severity of issue fixed: Medium

Sequence Diagram(s)

sequenceDiagram
  participant NVCF
  participant ICMS
  participant WorkerQueue
  participant Translator
  participant Pylon
  NVCF->>ICMS: Send maxRequestConcurrency
  ICMS->>WorkerQueue: Preserve launch specification value
  WorkerQueue->>Translator: Provide MaxRequestConcurrency
  Translator->>Pylon: Set --max-engine-concurrency
Loading

Merge Risk: ⚪ Minimal · up to 70799

The deployment concurrency value reaches regular container and Helm Pylon workers while legacy and live-stat fallbacks remain intact, with no merge-blocking risk established.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 21.05% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 19 functions across 14 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title uses the required Conventional Commits format, includes the required scope for a customer-impacting fix, and accurately describes the propagation of deployment concurrency to Pylon.
Linked Issues check ✅ Passed The changes satisfy the coding requirements in issue #1946. NVCF resolves the deployment GPU specification value and passes it through the ICMS launch specification, REST conversion, BYOC message mode…
Out of Scope Changes check ✅ Passed The changed source and test files support issue #1946. The model, conversion, serialization, client, translator, and test changes implement or verify the requested propagation and precedence behavior.…
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jcameron/fix-pylon-concurrency-1946

Comment @coderabbitai help to get the list of available commands.

Carry maxRequestConcurrency from the NVCF deployment GPU specification through ICMS to the Pylon worker. Prefer it over the legacy environment value.

Fixes #1946

Signed-off-by: jcameron <jcameron@nvidia.com>
@FamousDirector
FamousDirector force-pushed the jcameron/fix-pylon-concurrency-1946 branch from 3614987 to 707999c Compare September 17, 2026 00:43
@FamousDirector FamousDirector changed the title fix(llm): pass request concurrency to Pylon fix(llm): propagate deployment concurrency to Pylon Sep 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🛡️ CodeQL Analysis

🚨 Found 11 issue(s)

Severity Breakdown:

  • 🔴 Errors: 0
  • 🟡 Warnings: 0
  • 🔵 Notes: 0
📋 Top Issues

🔗 View full details in Security tab

🕐 Last updated: 2026-09-17 00:51:25 UTC | Commit: 707999c

@FamousDirector
FamousDirector marked this pull request as ready for review September 17, 2026 00:58
@FamousDirector
FamousDirector requested review from a team as code owners September 17, 2026 00:58
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.

feat(llm): propagate deployment request concurrency to Pylon

3 participants