๊ฐ ๋ฉํ๋ฐ์ดํฐ ๋ฆฌ์์ค๋ ํน์ MetadataSchema์ ์ฐ๊ด๋ฉ๋๋ค.
๋ฉํ๋ฐ์ดํฐ ๋ฆฌ์์ค ๋ง๋ค๊ธฐ ํ๋ก์ธ์ค๋ฅผ ๋จ์ํํ๊ธฐ ์ํด Vertex ML Metadata๋ ๊ณตํต ML ๊ฐ๋
์ ๋ํด ์ฌ์ ์ ์๋ ์ ํ์ ํธ์ถ๋ ์์คํ
์คํค๋ง๋ฅผ ๊ฒ์ํฉ๋๋ค. ์์คํ
์คํค๋ง๋ system
๋ค์์คํ์ด์ค ์๋์ ์ ์ง๋ฉ๋๋ค. Vertex ML Metadata API์์ ์์คํ
์คํค๋ง์ MetadataSchema ๋ฆฌ์์ค๋ก ์ก์ธ์คํ ์ ์์ต๋๋ค. ์คํค๋ง๋ ํญ์ ๋ฒ์ ์ด ์ง์ ๋ฉ๋๋ค. ์์คํ
์คํค๋ง์ ํ์์ OpenAPI 3.0 ์ฌ์์ ์ผ๋ถ์
๋๋ค.
์์คํ ์คํค๋ง ์ฌ์ฉ ๋ฐฉ๋ฒ
Vertex AI๋ ์์คํ
์คํค๋ง๋ฅผ ์ฌ์ฉํ์ฌ ML ์ํฌํ๋ก ์ถ์ ์ ์ํด ๋ฉํ๋ฐ์ดํฐ ๋ฆฌ์์ค๋ฅผ ๋ง๋ญ๋๋ค. ๊ทธ๋ฐ ํ schema_title
ํ๋๋ฅผ ์ฌ์ฉํ์ฌ ๋ฉํ๋ฐ์ดํฐ ์ฟผ๋ฆฌ์์ ๋ฆฌ์์ค๋ฅผ ํํฐ๋ง ๋ฐ ๊ทธ๋ฃนํํ ์ ์์ต๋๋ค. ํํฐ ํจ์ ์ฌ์ฉ ๋ฐฉ๋ฒ์ ๋ํ ์์ธํ ๋ด์ฉ์ Vertex ML Metadata ๋ถ์์ ์ฐธ์กฐํ์ธ์.
๋ํ Vertex ML Metadata API๋ฅผ ํตํด ์์คํ ์คํค๋ง๋ฅผ ์ฌ์ฉํ์ฌ ๋ฉํ๋ฐ์ดํฐ ๋ฆฌ์์ค๋ฅผ ์ง์ ๋ง๋ค ์๋ ์์ต๋๋ค. ์คํค๋ง ํ์ดํ ๋ฐ ์คํค๋ง ๋ฒ์ ์ ๋ฐ๋ผ ์์คํ ์คํค๋ง๋ฅผ ์๋ณํ ์ ์์ต๋๋ค. ์์คํ ์คํค๋ง์ ํ๋๋ ํญ์ ์ ํ์ฌํญ์ผ๋ก ๊ฐ์ฃผ๋ฉ๋๋ค. ์ฌ์ฉ์๋ ์์คํ ์คํค๋ง์ ์ฌ์ ์ ์๋ ํ๋๋ก ์ ํ๋์ง ์์ผ๋ฉฐ, ์ถ๊ฐ์ ์ธ ์์ ๋ฉํ๋ฐ์ดํฐ๋ฅผ ๋ชจ๋ ๋ฉํ๋ฐ์ดํฐ ๋ฆฌ์์ค์ ๋ก๊น ํ ์๋ ์์ต๋๋ค. ์์คํ ์คํค๋ง๋ฅผ ์ฌ์ฉํ์ฌ ๋ฉํ๋ฐ์ดํฐ ๋ฆฌ์์ค ๋ง๋ค๊ธฐ์ ๋ํ ์์ธํ ๋ด์ฉ์ Vertex ML Metadata ์ถ์ ์ ์ฐธ์กฐํ์ธ์.
์คํค๋ง ๋์ด
๋ค์ ๋ช ๋ น์ด๋ฅผ ์ฌ์ฉํ์ฌ ๊ธฐ์กด์ ๋ชจ๋ ๋ฑ๋ก๋ ์คํค๋ง ๋ชฉ๋ก์ ๋ณผ ์ ์์ต๋๋ค.
REST
์์ฒญ ๋ฐ์ดํฐ๋ฅผ ์ฌ์ฉํ๊ธฐ ์ ์ ๋ค์์ ๋ฐ๊ฟ๋๋ค.
- LOCATION_ID: ๋ฆฌ์
- PROJECT_ID: ํ๋ก์ ํธ ID์ ๋๋ค.
HTTP ๋ฉ์๋ ๋ฐ URL:
GET https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/metadataStores/default/metadataSchemas?pageSize=100&filter=schema_title=%22system*%22+OR+schema_title=%22google*%22
์์ฒญ์ ๋ณด๋ด๋ ค๋ฉด ๋ค์ ์ต์ ์ค ํ๋๋ฅผ ํผ์นฉ๋๋ค.
๋ค์๊ณผ ๋น์ทํ JSON ์๋ต์ด ํ์๋ฉ๋๋ค.
{ "metadataSchemas": [ { "name": "projects/PROJECT_ID/locations/LOCATION_ID/metadataStores/default/metadataSchemas/system-resolver-execution-v0-0-1", "schemaVersion": "0.0.1", "schema": "title: system.ResolverExecution\ntype: object\n", "schemaType": "EXECUTION_TYPE", "createTime": "2022-07-27T17:41:35.634Z" }, { "name": "projects/PROJECT_ID/locations/LOCATION_ID//metadataStores/default/metadataSchemas/system-html-v0-0-1", "schemaVersion": "0.0.1", "schema": "title: system.HTML\ntype: object\n", "schemaType": "ARTIFACT_TYPE", "createTime": "2022-07-27T17:41:35.602Z" } }
์๊ฒฉํ ์คํค๋ง ๋งค์นญ
Vertex ML Metadata๋ ์คํค๋ง ์์ฑ์๊ฐ ์๊ฒฉํ ์คํค๋ง ์ผ์น๋ฅผ ์ ์ฉํ ์ ์๋ ๋ ๊ฐ์ง ํ๋๊ทธ๋ฅผ ์ง์ํฉ๋๋ค.
additionalProperties
additionalProperties
๊ฐ์ true ๋๋ false์ผ ์ ์์ต๋๋ค. JSON ์คํค๋ง์ ์ผ์นํ๋๋ก additionalProperties
์ ๊ธฐ๋ณธ๊ฐ์ true์
๋๋ค. ์ด ํ๋๊ทธ๋ ์คํค๋ง์ ์ต์์ ์์ค์์ ์ค์ ๋ฉ๋๋ค. false๋ก ์ค์ ํ๋ฉด ์ ํ์ ์์ฑ์ด ํ์ฉ๋์ง ์์ต๋๋ค. ์๋ฅผ ๋ค์ด ์๋ ์คํค๋ง์์๋ payload_format
๋ฐ container_format
ํ๋๋ง ์ด ์คํค๋ง๋ฅผ ๊ธฐ๋ฐ์ผ๋ก ๋ฉํ๋ฐ์ดํฐ์ ํ์ฉ๋ฉ๋๋ค.
title: system.Dataset
version: 0.0.1
type: object
additionalProperties: false
properties:
container_format:
type: string
payload_format:
type: string
์ ์คํค๋ง๋ ๋ค์๊ณผ ๊ฐ์ ๋ฉํ๋ฐ์ดํฐ๋ฅผ ํ์ฉํฉ๋๋ค.
fields {
key: 'container_format'
value: { string_value: 'Text' }
}
fields {
key: 'payload_format'
value: { string_value: 'CSV' }
}
๊ทธ๋ฌ๋ ๋ค์ ๋ฉํ๋ฐ์ดํฐ๋ ๊ฑฐ๋ถ๋ฉ๋๋ค.
fields {
key: 'container_format'
value: { string_value: 'Text' }
}
fields {
key: 'payload_format'
value: { string_value: 'CSV' }
}
fields {
key: 'optional_field'
value: { string_value: 'optional_value' }
}
required
required
ํค์๋๋ 0๊ฐ ์ด์์ ๋ฌธ์์ด ๋ฐฐ์ด์ ์ทจํฉ๋๋ค. JSON ์คํค๋ง์ ์ผ๊ด๋๊ฒ ์์ฑ ํค์๋๋ก ์ ์๋ ์์ฑ์ ํ์ํ์ง ์์ต๋๋ค. required
ํค์๋๋ฅผ ์ฌ์ฉํ์ฌ ํ์ ์์ฑ ๋ชฉ๋ก์ ์ ๊ณตํ ์ ์์ต๋๋ค. ์๋ฅผ ๋ค์ด ๋ค์ ์คํค๋ง์๋ ํญ์ container_format
์ด ํ์ํฉ๋๋ค.
์ค์ฒฉ ์์ฑ์์๋ ์๋ํฉ๋๋ค. ์๋ฅผ ๋ค์ด ๋ค์์ผ๋ก ์ธํด container_format
์ด ํ์๊ฐ ๋ฉ๋๋ค.
title: system.Dataset
version: 0.0.1
type: object
required: ['container_format']
properties:
container_format:
type: string
payload_format:
type: string
์ ์คํค๋ง๋ ๋ค์๊ณผ ๊ฐ์ ๋ฉํ๋ฐ์ดํฐ๋ฅผ ํ์ฉํฉ๋๋ค.
fields {
key: 'container_format'
value: { string_value: 'Text' }
}
๊ทธ๋ฌ๋ ๋ค์ ๋ฉํ๋ฐ์ดํฐ๋ ๊ฑฐ๋ถ๋ฉ๋๋ค.
fields {
key: 'payload_format'
value: { string_value: 'CSV' }
}
์คํค๋ง๋ ์์ฑ์ ๊ฐ์ฒด ์ ํ ํ๋๊ฐ ์๋ ์ค์ฒฉ ์์ฑ์ ์ง์ํฉ๋๋ค. ์ค์ฒฉ ์คํค๋ง์์ ์ค์ฒฉ ์์ฑ ๋
ธ๋๋ required
ํค์๋๋ฅผ ๊ฐ์ง ์ ์์ต๋๋ค. ์๋ฅผ ๋ค๋ฉด ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
title: system.Dataset
version: 0.0.1
type: object
properties:
container_format:
type: string
payload:
type: string
nested_property:
type: object
required: ['property_1']
properties:
property_1:
type: integer
property_2:
type: integer
nested_property
ํ๋ ์์ฒด๋ ํ์๊ฐ ์๋๋ฏ๋ก ์์ ์คํค๋ง๋ ๋ค์ ๋ฉํ๋ฐ์ดํฐ๋ฅผ ํ์ฉํฉ๋๋ค.
fields {
key: 'container_format'
value: { string_value: 'Text' }
}
๋ค์ ๋ฉํ๋ฐ์ดํฐ๋ ์ ํจํฉ๋๋ค.
fields {
key: 'nested_property'
value: {
struct_value {
fields {
key: 'property_1'
value: { number_value: 1 }
}
fields {
key: 'property_2'
value: { number_value: 1 }
}
}
}
}
๊ทธ๋ฌ๋ ๋ค์ ๋ฉํ๋ฐ์ดํฐ๋ ๊ฑฐ๋ถ๋ฉ๋๋ค.
fields {
key: 'nested_property'
value: {
struct_value {
fields {
key: 'property_2'
value: { number_value: 1 }
}
}
}
}
์์คํ ์คํค๋ง ์์
๋ค์ ์์๋ ์ฆ๊ฐ์ ์ธ ์ฌ์ฉ์ ์ํด ์ ๊ณต๋๋ ์ผ๋ฐ์ ์ธ ์์คํ ์คํค๋ง์ ๋๋ค.
์ํฐํฉํธ
system.Artifact
๋ ๋ชจ๋ ์ํฐํฉํธ์ ๋ํ ๋ฉํ๋ฐ์ดํฐ๋ฅผ ์ ์ฅํ ์ ์๋ ์ผ๋ฐ ์คํค๋ง์
๋๋ค.
์ด ์คํค๋ง์๋ ํน์ ํ๋๊ฐ ์ ์๋์ง ์์ต๋๋ค.
title: system.Artifact
version: 0.0.1
type: object
๋ฐ์ดํฐ ์ธํธ
system.Dataset
๋ ML ์ํฌํ๋ก ๋จ๊ณ์์ ์ฌ์ฉ ๋๋ ์์ฑ๋๋ ๋ฐ์ดํฐ์ ์ปจํ
์ด๋๋ฅผ ๋ํ๋
๋๋ค. ๋ฐ์ดํฐ ์ธํธ๋ BigQuery URI์ ๊ฐ์ ํ์ผ ์์น ๋๋ ์ฟผ๋ฆฌ๋ฅผ ๊ฐ๋ฆฌํฌ ์ ์์ต๋๋ค.
title: system.Dataset
version: 0.0.1
type: object
properties:
container_format:
type: string
description: "Format of the container. Examples include 'TFRecord', 'Text', or 'Parquet'."
payload_format:
type: string
description: "Format of the payload. For example, 'proto:TFExample', 'CSV', or 'JSON'."
๋ชจ๋ธ
system.Model
์ ํ์ต๋ ๋ชจ๋ธ์ ๋ํ๋
๋๋ค. ๋ชจ๋ธ์ URI๋ ํ์ผ ์์น(PPP, Cloud Storage ๋ฒํท, ๋ก์ปฌ ๋๋ผ์ด๋ธ) ๋๋ API ๋ฆฌ์์ค(์: Vertex AI API์ ๋ชจ๋ธ ๋ฆฌ์์ค ๋ฑ)๋ฅผ ๊ฐ๋ฆฌํฌ ์ ์์ต๋๋ค.
title: system.Model
version: 0.0.1
type: object
properties:
framework:
type: string
description: "The framework type. For example: 'TensorFlow' or 'Scikit-Learn'."
framework_version:
type: string
description: "The framework version. For example: '1.15' or '2.1'."
payload_format:
type: string
description: "The format of the Model payload, for example: 'SavedModel' or 'TFLite'."
์ธก์ ํญ๋ชฉ
system.Metrics
๋ ML ์ํฌํ๋ก ์ค ์์ฑ๋๋ ํ๊ฐ ์ธก์ ํญ๋ชฉ์ ๋ํ๋
๋๋ค.
์ธก์ ํญ๋ชฉ์ ์ ํ๋ฆฌ์ผ์ด์
๋ฐ ์ฌ์ฉ ์ฌ๋ก์ ๋ฐ๋ผ ๋ฌ๋ผ์ง๋ฉฐ, ์์คํ
์ ๋ค๋ฅธ ๊ณณ์ ์ ์ฅ๋๋ ์ ํ๋ ๋๋ ๋ณต์ก์ฑ ์ธก์ ํญ๋ชฉ๊ณผ ๊ฐ์ ๋จ์ ์ค์นผ๋ผ ์ธก์ ํญ๋ชฉ๋ค๋ก ๊ตฌ์ฑ๋ ์ ์์ต๋๋ค.
title: system.Metrics
version: 0.0.1
type: object
properties:
type:
accuracy:
type: number
description: "Optional summary metric describing accuracy of a model."
precision:
type: number
description: "Optional summary metric describing precision of a model."
recall:
type: number
description: "Optional summary metric describing the recall of a model."
f1score:
type: number
description: "Optional summary metric describing the f1-score of a model."
mean_absolute_error:
type: number
description: "Optional summary metric describing the mean absolute error of a model."
mean_squared_error:
type: number
description: "Optional summary metric describing the mean-squared error of a model."
๋ค์ ๋จ๊ณ
- Vertex ML Metadata๋ก ๋ฉํ๋ฐ์ดํฐ ์ถ์ ์์ํ๊ธฐ
- Vertex ML Metadata ๊ฐ๋ ๋ฐ ๋ฐ์ดํฐ ๋ชจ๋ธ ๊ฒํ