Skip to content

Model names with same prefix breaks API deployment #1699

Closed
@RobertLucian

Description

@RobertLucian

Version

>= 0.23

Description

When an API with a spec like in the following example gets deployed, the API breaks:

- name: multi-model-classifier
  kind: RealtimeAPI
  predictor:
    type: onnx
    path: predictor.py
    models:
      paths:
        - name: shufflenet
          model_path: ...
        - name: shufflenet-something
          model_path: ...

The reason is that in the cron.py script, we make extensive use of glob.glob(<model_directory> + "*/**", recursive=True), which will lead to inter-model path "bleeding".

Suggested solution

Replace all glob.glob(<model_directory> + "*/**", recursive=True) with glob.glob(os.path.join(<model_directory>, "**"), recursive=True) instead. There might be some gotchas here and there.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions