Skip to content

Commit f4d4a49

Browse files
fix: Set error level as warning for unknown model type
1 parent 325f7e2 commit f4d4a49

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

examples/composer.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"require": {
1515
"php": "^8.1",
1616
"symfony/console": "^7.0",
17-
"codewithkyrian/transformers": "*"
17+
"codewithkyrian/transformers": "*",
18+
"rokka/imagine-vips": "dev-master"
1819
},
1920
"require-dev": {
2021
"symfony/var-dumper": "^7.0"

src/Models/Auto/PretrainedMixin.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public static function fromPretrained(
7272
}
7373

7474
if (static::BASE_IF_FAIL) {
75-
trigger_error("Unknown model class for model type {$config->modelType}. Using base class PreTrainedModel.");
75+
trigger_error("Unknown model class for model type {$config->modelType}. Using base class PreTrainedModel.", E_USER_WARNING);
7676

7777
return PretrainedModel::fromPretrained(
7878
modelNameOrPath: $modelNameOrPath,

0 commit comments

Comments
 (0)