Skip to content

Commit

Permalink
update ml model
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelmattig committed Aug 28, 2024
1 parent 59f6958 commit c2440f0
Show file tree
Hide file tree
Showing 15 changed files with 43 additions and 45 deletions.
8 changes: 4 additions & 4 deletions .generation/input/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -7028,6 +7028,7 @@
"name",
"displayName",
"description",
"upload",
"metadata"
],
"properties": {
Expand All @@ -7042,6 +7043,9 @@
},
"name": {
"$ref": "#/components/schemas/MlModelName"
},
"upload": {
"$ref": "#/components/schemas/UploadId"
}
}
},
Expand All @@ -7052,7 +7056,6 @@
"MlModelMetadata": {
"type": "object",
"required": [
"upload",
"fileName",
"inputType",
"numInputBands",
Expand All @@ -7072,9 +7075,6 @@
},
"outputType": {
"$ref": "#/components/schemas/RasterDataType"
},
"upload": {
"$ref": "#/components/schemas/UploadId"
}
}
},
Expand Down
6 changes: 4 additions & 2 deletions python/geoengine_openapi_client/models/ml_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ class MlModel(BaseModel):
display_name: StrictStr = Field(..., alias="displayName")
metadata: MlModelMetadata = Field(...)
name: StrictStr = Field(...)
__properties = ["description", "displayName", "metadata", "name"]
upload: StrictStr = Field(...)
__properties = ["description", "displayName", "metadata", "name", "upload"]

class Config:
"""Pydantic configuration"""
Expand Down Expand Up @@ -75,7 +76,8 @@ def from_dict(cls, obj: dict) -> MlModel:
"description": obj.get("description"),
"display_name": obj.get("displayName"),
"metadata": MlModelMetadata.from_dict(obj.get("metadata")) if obj.get("metadata") is not None else None,
"name": obj.get("name")
"name": obj.get("name"),
"upload": obj.get("upload")
})
return _obj

Expand Down
6 changes: 2 additions & 4 deletions python/geoengine_openapi_client/models/ml_model_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ class MlModelMetadata(BaseModel):
input_type: RasterDataType = Field(..., alias="inputType")
num_input_bands: conint(strict=True, ge=0) = Field(..., alias="numInputBands")
output_type: RasterDataType = Field(..., alias="outputType")
upload: StrictStr = Field(...)
__properties = ["fileName", "inputType", "numInputBands", "outputType", "upload"]
__properties = ["fileName", "inputType", "numInputBands", "outputType"]

class Config:
"""Pydantic configuration"""
Expand Down Expand Up @@ -73,8 +72,7 @@ def from_dict(cls, obj: dict) -> MlModelMetadata:
"file_name": obj.get("fileName"),
"input_type": obj.get("inputType"),
"num_input_bands": obj.get("numInputBands"),
"output_type": obj.get("outputType"),
"upload": obj.get("upload")
"output_type": obj.get("outputType")
})
return _obj

Expand Down
10 changes: 5 additions & 5 deletions python/test/test_ml_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ def make_instance(self, include_optional) -> MlModel:
file_name = '',
input_type = 'U8',
num_input_bands = 0,
output_type = 'U8',
upload = '', ),
name = ''
output_type = 'U8', ),
name = '',
upload = ''
)
else:
return MlModel(
Expand All @@ -55,9 +55,9 @@ def make_instance(self, include_optional) -> MlModel:
file_name = '',
input_type = 'U8',
num_input_bands = 0,
output_type = 'U8',
upload = '', ),
output_type = 'U8', ),
name = '',
upload = '',
)
"""

Expand Down
4 changes: 1 addition & 3 deletions python/test/test_ml_model_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,14 @@ def make_instance(self, include_optional) -> MlModelMetadata:
file_name = '',
input_type = 'U8',
num_input_bands = 0,
output_type = 'U8',
upload = ''
output_type = 'U8'
)
else:
return MlModelMetadata(
file_name = '',
input_type = 'U8',
num_input_bands = 0,
output_type = 'U8',
upload = '',
)
"""

Expand Down
6 changes: 6 additions & 0 deletions typescript/dist/esm/models/MlModel.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ export interface MlModel {
* @memberof MlModel
*/
name: string;
/**
*
* @type {string}
* @memberof MlModel
*/
upload: string;
}
/**
* Check if a given object implements the MlModel interface.
Expand Down
3 changes: 3 additions & 0 deletions typescript/dist/esm/models/MlModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export function instanceOfMlModel(value) {
isInstance = isInstance && "displayName" in value;
isInstance = isInstance && "metadata" in value;
isInstance = isInstance && "name" in value;
isInstance = isInstance && "upload" in value;
return isInstance;
}
export function MlModelFromJSON(json) {
Expand All @@ -35,6 +36,7 @@ export function MlModelFromJSONTyped(json, ignoreDiscriminator) {
'displayName': json['displayName'],
'metadata': MlModelMetadataFromJSON(json['metadata']),
'name': json['name'],
'upload': json['upload'],
};
}
export function MlModelToJSON(value) {
Expand All @@ -49,5 +51,6 @@ export function MlModelToJSON(value) {
'displayName': value.displayName,
'metadata': MlModelMetadataToJSON(value.metadata),
'name': value.name,
'upload': value.upload,
};
}
6 changes: 0 additions & 6 deletions typescript/dist/esm/models/MlModelMetadata.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@ export interface MlModelMetadata {
* @memberof MlModelMetadata
*/
outputType: RasterDataType;
/**
*
* @type {string}
* @memberof MlModelMetadata
*/
upload: string;
}
/**
* Check if a given object implements the MlModelMetadata interface.
Expand Down
3 changes: 0 additions & 3 deletions typescript/dist/esm/models/MlModelMetadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export function instanceOfMlModelMetadata(value) {
isInstance = isInstance && "inputType" in value;
isInstance = isInstance && "numInputBands" in value;
isInstance = isInstance && "outputType" in value;
isInstance = isInstance && "upload" in value;
return isInstance;
}
export function MlModelMetadataFromJSON(json) {
Expand All @@ -36,7 +35,6 @@ export function MlModelMetadataFromJSONTyped(json, ignoreDiscriminator) {
'inputType': RasterDataTypeFromJSON(json['inputType']),
'numInputBands': json['numInputBands'],
'outputType': RasterDataTypeFromJSON(json['outputType']),
'upload': json['upload'],
};
}
export function MlModelMetadataToJSON(value) {
Expand All @@ -51,6 +49,5 @@ export function MlModelMetadataToJSON(value) {
'inputType': RasterDataTypeToJSON(value.inputType),
'numInputBands': value.numInputBands,
'outputType': RasterDataTypeToJSON(value.outputType),
'upload': value.upload,
};
}
6 changes: 6 additions & 0 deletions typescript/dist/models/MlModel.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ export interface MlModel {
* @memberof MlModel
*/
name: string;
/**
*
* @type {string}
* @memberof MlModel
*/
upload: string;
}
/**
* Check if a given object implements the MlModel interface.
Expand Down
3 changes: 3 additions & 0 deletions typescript/dist/models/MlModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ function instanceOfMlModel(value) {
isInstance = isInstance && "displayName" in value;
isInstance = isInstance && "metadata" in value;
isInstance = isInstance && "name" in value;
isInstance = isInstance && "upload" in value;
return isInstance;
}
exports.instanceOfMlModel = instanceOfMlModel;
Expand All @@ -40,6 +41,7 @@ function MlModelFromJSONTyped(json, ignoreDiscriminator) {
'displayName': json['displayName'],
'metadata': (0, MlModelMetadata_1.MlModelMetadataFromJSON)(json['metadata']),
'name': json['name'],
'upload': json['upload'],
};
}
exports.MlModelFromJSONTyped = MlModelFromJSONTyped;
Expand All @@ -55,6 +57,7 @@ function MlModelToJSON(value) {
'displayName': value.displayName,
'metadata': (0, MlModelMetadata_1.MlModelMetadataToJSON)(value.metadata),
'name': value.name,
'upload': value.upload,
};
}
exports.MlModelToJSON = MlModelToJSON;
6 changes: 0 additions & 6 deletions typescript/dist/models/MlModelMetadata.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@ export interface MlModelMetadata {
* @memberof MlModelMetadata
*/
outputType: RasterDataType;
/**
*
* @type {string}
* @memberof MlModelMetadata
*/
upload: string;
}
/**
* Check if a given object implements the MlModelMetadata interface.
Expand Down
3 changes: 0 additions & 3 deletions typescript/dist/models/MlModelMetadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ function instanceOfMlModelMetadata(value) {
isInstance = isInstance && "inputType" in value;
isInstance = isInstance && "numInputBands" in value;
isInstance = isInstance && "outputType" in value;
isInstance = isInstance && "upload" in value;
return isInstance;
}
exports.instanceOfMlModelMetadata = instanceOfMlModelMetadata;
Expand All @@ -41,7 +40,6 @@ function MlModelMetadataFromJSONTyped(json, ignoreDiscriminator) {
'inputType': (0, RasterDataType_1.RasterDataTypeFromJSON)(json['inputType']),
'numInputBands': json['numInputBands'],
'outputType': (0, RasterDataType_1.RasterDataTypeFromJSON)(json['outputType']),
'upload': json['upload'],
};
}
exports.MlModelMetadataFromJSONTyped = MlModelMetadataFromJSONTyped;
Expand All @@ -57,7 +55,6 @@ function MlModelMetadataToJSON(value) {
'inputType': (0, RasterDataType_1.RasterDataTypeToJSON)(value.inputType),
'numInputBands': value.numInputBands,
'outputType': (0, RasterDataType_1.RasterDataTypeToJSON)(value.outputType),
'upload': value.upload,
};
}
exports.MlModelMetadataToJSON = MlModelMetadataToJSON;
9 changes: 9 additions & 0 deletions typescript/src/models/MlModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ export interface MlModel {
* @memberof MlModel
*/
name: string;
/**
*
* @type {string}
* @memberof MlModel
*/
upload: string;
}

/**
Expand All @@ -61,6 +67,7 @@ export function instanceOfMlModel(value: object): boolean {
isInstance = isInstance && "displayName" in value;
isInstance = isInstance && "metadata" in value;
isInstance = isInstance && "name" in value;
isInstance = isInstance && "upload" in value;

return isInstance;
}
Expand All @@ -79,6 +86,7 @@ export function MlModelFromJSONTyped(json: any, ignoreDiscriminator: boolean): M
'displayName': json['displayName'],
'metadata': MlModelMetadataFromJSON(json['metadata']),
'name': json['name'],
'upload': json['upload'],
};
}

Expand All @@ -95,6 +103,7 @@ export function MlModelToJSON(value?: MlModel | null): any {
'displayName': value.displayName,
'metadata': MlModelMetadataToJSON(value.metadata),
'name': value.name,
'upload': value.upload,
};
}

9 changes: 0 additions & 9 deletions typescript/src/models/MlModelMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,6 @@ export interface MlModelMetadata {
* @memberof MlModelMetadata
*/
outputType: RasterDataType;
/**
*
* @type {string}
* @memberof MlModelMetadata
*/
upload: string;
}

/**
Expand All @@ -67,7 +61,6 @@ export function instanceOfMlModelMetadata(value: object): boolean {
isInstance = isInstance && "inputType" in value;
isInstance = isInstance && "numInputBands" in value;
isInstance = isInstance && "outputType" in value;
isInstance = isInstance && "upload" in value;

return isInstance;
}
Expand All @@ -86,7 +79,6 @@ export function MlModelMetadataFromJSONTyped(json: any, ignoreDiscriminator: boo
'inputType': RasterDataTypeFromJSON(json['inputType']),
'numInputBands': json['numInputBands'],
'outputType': RasterDataTypeFromJSON(json['outputType']),
'upload': json['upload'],
};
}

Expand All @@ -103,7 +95,6 @@ export function MlModelMetadataToJSON(value?: MlModelMetadata | null): any {
'inputType': RasterDataTypeToJSON(value.inputType),
'numInputBands': value.numInputBands,
'outputType': RasterDataTypeToJSON(value.outputType),
'upload': value.upload,
};
}

0 comments on commit c2440f0

Please sign in to comment.