File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
hopsworks-api/src/main/java/io/hops/hopsworks/api Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,8 @@ public ModelDTO() {
76
76
private Integer modelRegistryId ;
77
77
78
78
private TagsDTO tags ;
79
+
80
+ private String type = "modelDTO" ;
79
81
80
82
public String getName () {
81
83
return name ;
@@ -216,11 +218,13 @@ public void setModelRegistryId(Integer modelRegistryId) {
216
218
public TagsDTO getTags () {
217
219
return tags ;
218
220
}
219
-
221
+
220
222
public void setTags (TagsDTO tags ) {
221
223
this .tags = tags ;
222
224
}
223
-
225
+
226
+ public String getType () { return type ; }
227
+
224
228
@ Override
225
229
public String toString () {
226
230
return "ModelDTO{" +
Original file line number Diff line number Diff line change @@ -145,7 +145,11 @@ private void validateModelVersion(Serving serving) {
145
145
146
146
private void validateModelFramework (Serving serving ) {
147
147
if (serving .getModelFramework () == null ) {
148
- throw new IllegalArgumentException ("Model framework not provided" );
148
+ serving .setModelFramework (serving .getModelServer () == ModelServer .TENSORFLOW_SERVING ?
149
+ ModelFramework .TENSORFLOW : ModelFramework .SKLEARN );
150
+ // backward compatibility with hsml 3.0 (which does not send model framework value)
151
+ // greater versions hsml and UI should not send null values
152
+ return ;
149
153
}
150
154
if (serving .getModelFramework () == ModelFramework .TENSORFLOW
151
155
&& serving .getModelServer () != ModelServer .TENSORFLOW_SERVING ) {
You can’t perform that action at this time.
0 commit comments