Skip to content

Commit 1621308

Browse files
committed
Remove vLLM x86_64 NVIDIA platform warning from pull compat check
1 parent 2ccfcab commit 1621308

3 files changed

Lines changed: 1 addition & 32 deletions

File tree

pkg/distribution/distribution/client.go

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"log/slog"
99
"os"
1010
"path/filepath"
11-
"slices"
1211
"strings"
1312

1413
"github.com/docker/model-runner/pkg/distribution/huggingface"
@@ -22,7 +21,6 @@ import (
2221
"github.com/docker/model-runner/pkg/distribution/registry"
2322
"github.com/docker/model-runner/pkg/distribution/tarball"
2423
"github.com/docker/model-runner/pkg/distribution/types"
25-
"github.com/docker/model-runner/pkg/inference/platform"
2624
"github.com/docker/model-runner/pkg/internal/utils"
2725
)
2826

@@ -774,13 +772,6 @@ func (c *Client) GetBundle(ref string) (types.ModelBundle, error) {
774772
return c.store.BundleForModel(normalizedRef)
775773
}
776774

777-
func GetSupportedFormats() []types.Format {
778-
if platform.SupportsVLLM() {
779-
return []types.Format{types.FormatGGUF, types.FormatSafetensors, types.FormatDiffusers}
780-
}
781-
return []types.Format{types.FormatGGUF, types.FormatDiffusers}
782-
}
783-
784775
func checkCompat(image types.ModelArtifact, log *slog.Logger, reference string, progressWriter io.Writer) error {
785776
manifest, err := image.Manifest()
786777
if err != nil {
@@ -797,14 +788,7 @@ func checkCompat(image types.ModelArtifact, log *slog.Logger, reference string,
797788
}
798789

799790
if config.GetFormat() == "" {
800-
log.Warn("Model format field is empty for , unable to verify format compatibility", "model", utils.SanitizeForLog(reference))
801-
} else if !slices.Contains(GetSupportedFormats(), config.GetFormat()) {
802-
// Write warning but continue with pull
803-
log.Warn(warnUnsupportedFormat)
804-
if err := progress.WriteWarning(progressWriter, warnUnsupportedFormat, oci.ModePull); err != nil {
805-
log.Warn("Failed to write warning message", "error", err)
806-
}
807-
// Don't return an error - allow the pull to continue
791+
log.Warn("Model format field is empty; unable to verify format compatibility", "model", utils.SanitizeForLog(reference))
808792
}
809793

810794
return nil

pkg/distribution/distribution/client_test.go

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import (
2424
"github.com/docker/model-runner/pkg/distribution/oci/remote"
2525
mdregistry "github.com/docker/model-runner/pkg/distribution/registry"
2626
"github.com/docker/model-runner/pkg/distribution/registry/testregistry"
27-
"github.com/docker/model-runner/pkg/inference/platform"
2827
)
2928

3029
var (
@@ -434,25 +433,13 @@ func TestClientPullModel(t *testing.T) {
434433
t.Fatalf("Failed to create test client: %v", err)
435434
}
436435

437-
// Try to pull the safetensors model with a progress writer to capture warnings
438436
var progressBuf bytes.Buffer
439437
err = testClient.PullModel(t.Context(), testTag, &progressBuf)
440438

441-
// Pull should succeed on all platforms now (with a warning on non-Linux)
442439
if err != nil {
443440
t.Fatalf("Expected no error, got: %v", err)
444441
}
445442

446-
if !platform.SupportsVLLM() {
447-
// On non-Linux, verify that a warning was written
448-
progressOutput := progressBuf.String()
449-
if !strings.Contains(progressOutput, `"type":"warning"`) {
450-
t.Fatalf("Expected warning message on non-Linux platforms, got output: %s", progressOutput)
451-
}
452-
if !strings.Contains(progressOutput, warnUnsupportedFormat) {
453-
t.Fatalf("Expected warning about safetensors format, got output: %s", progressOutput)
454-
}
455-
}
456443
})
457444

458445
t.Run("pull with JSON progress messages", func(t *testing.T) {

pkg/distribution/distribution/errors.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,3 @@ var (
1818
)
1919
ErrConflict = errors.New("resource conflict")
2020
)
21-
22-
const warnUnsupportedFormat = "vLLM backend currently only implemented for x86_64 NVIDIA platforms"

0 commit comments

Comments
 (0)