Skip to content

fix: Respect cc_model_filenames in Python backend auto-fill#489

Open
nightflight-dk wants to merge 1 commit intotriton-inference-server:mainfrom
nightflight-dk:cc_model_filename-respected-by-py-backend
Open

fix: Respect cc_model_filenames in Python backend auto-fill#489
nightflight-dk wants to merge 1 commit intotriton-inference-server:mainfrom
nightflight-dk:cc_model_filename-respected-by-py-backend

Conversation

@nightflight-dk
Copy link
Copy Markdown
Contributor

fix: Respect cc_model_filenames in Python backend auto-fill

Problem

When backend is set to "python" and default_model_filename is left empty, AutoCompleteBackendFields unconditionally sets default_model_filename to "model.py". This ignores any cc_model_filenames mappings the user may have configured to use a custom model filename (e.g., custom_model.py per device).

This causes the Python backend stub to always look for model.py, even when cc_model_filenames explicitly maps to a different file.

Fix

In model_config_utils.cc, the auto-fill of default_model_filename now checks that cc_model_filenames is also empty before defaulting to "model.py":

if (config->default_model_filename().empty() &&
    config->cc_model_filenames().empty()) {
  config->set_default_model_filename(kPythonFilename);
}

@nightflight-dk nightflight-dk force-pushed the cc_model_filename-respected-by-py-backend branch from cfae5e6 to 5f7ac3b Compare April 12, 2026 01:37
@nightflight-dk
Copy link
Copy Markdown
Contributor Author

nightflight-dk commented Apr 12, 2026

@whoisj this helps provide cc dependent implementation part of the same repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant