Skip to content

test: Add L0_pytorch_python_runtime coverage for default_model_filename autofill - #8913

Open
mattwittwer wants to merge 3 commits into
mainfrom
mwittwer/fix_python_runtime_autofill
Open

test: Add L0_pytorch_python_runtime coverage for default_model_filename autofill#8913
mattwittwer wants to merge 3 commits into
mainfrom
mwittwer/fix_python_runtime_autofill

Conversation

@mattwittwer

@mattwittwer mattwittwer commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

What does the PR do?

Related to to triton-inference-server/core#518. Strengthens L0_pytorch_python_runtime so the core autofill regression fails with a direct diagnosis instead of an opaque constants.pkl load error:

  • test.sh: fail if neuralnet takes the TorchScript load path, and assert the served model config reports an empty default_model_filename.
  • unit_test.py: three _get_model_path cases — model.py preferred over a sibling weights model.pt, an explicit default_model_filename is honored, and a TorchScript-only model still resolves to model.pt.

Checklist

  • PR title reflects the change and is of format <commit_type>: <Title>
  • Changes are described in the pull request.
  • Related issues are referenced.
  • Populated github labels field
  • Added test plan and verified test passes.
  • Verified that the PR passes existing CI.
  • Verified copyright is correct on all changed files.
  • Added succinct git squash message before merging ref.
  • All template sections are filled out.
  • Optional: Additional screenshots for behavior/output changes with before/after.

Commit Type:

Check the conventional commit type
box here and add the label to the github PR.

  • build
  • ci
  • docs
  • feat
  • fix
  • perf
  • refactor
  • revert
  • style
  • test

Related PRs:

triton-inference-server/core#518

Where should the reviewer start?

Test plan:

  • CI Pipeline ID:

60326198

Caveats:

Background

Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)

  • closes GitHub issue: #xxx

Comment thread qa/L0_pytorch_python_runtime/test.sh Outdated
@greptile-apps

greptile-apps Bot commented Jul 30, 2026

Copy link
Copy Markdown

Greptile Summary

Adds regression coverage for Python-runtime model filename selection.

  • Validates that the served neuralnet configuration leaves default_model_filename empty and reports retrieval or parsing failures.
  • Detects accidental selection of the TorchScript loading path.
  • Adds unit tests covering Python-model preference, explicit filename selection, and TorchScript-only fallback.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
qa/L0_pytorch_python_runtime/test.sh Adds an end-to-end regression guard and now correctly treats configuration retrieval, parsing, and model-name validation failures as test failures.
qa/L0_pytorch_python_runtime/unit_test.py Adds isolated temporary-directory tests for the three intended model-path resolution cases.

Reviews (3): Last reviewed commit: "update failure case handling" | Re-trigger Greptile

@mattwittwer mattwittwer changed the title draft: add test cases for model name autofill test: Add L0_pytorch_python_runtime coverage for default_model_filename autofill Aug 3, 2026
@mattwittwer
mattwittwer requested review from Vinya567 and yinggeh August 3, 2026 23:04

@Vinya567 Vinya567 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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

Labels

testing Adding or correcting tests (test: PRs)

Development

Successfully merging this pull request may close these issues.

2 participants