Skip to content

No validation for model name field - allows empty string #2382

@Vasanthakumar-murugan

Description

@Vasanthakumar-murugan

Issue:

ModelSettings.name has no validation and defaults to "" (empty string), allowing models to be registered without a name.

Location:
mlserver/settings.py, line 424
name: str = ""

Problem:

  • Models are being loaded with empty names when MLSERVER_MODEL_NAME is not set
  • Logs show: INFO - Loaded model '' successfully (mlserver/registry.py, line 169)
  • Models are inaccessible via API endpoints

Expected:

  • Name should be required
  • Raise validation error if not provided or empty

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions