๋ชจ๋‹ˆํ„ฐ๋ง

Vertex AI Feature Store(๊ธฐ์กด)์—์„œ ํ”ผ์ฒ˜์Šคํ† ์–ด ๋ฐ ํŠน์„ฑ์— ๋Œ€ํ•œ ์•Œ๋ฆผ์„ ๋ชจ๋‹ˆํ„ฐ๋งํ•˜๊ณ  ์„ค์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด ์šด์˜ํŒ€์€ ํ”ผ์ฒ˜์Šคํ† ์–ด๋ฅผ ๋ชจ๋‹ˆํ„ฐ๋งํ•˜์—ฌ CPU ์‚ฌ์šฉ๋ฅ ์„ ์ถ”์ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋ฐ์ดํ„ฐ ๊ณผํ•™์ž์™€ ๊ฐ™์€ ํŠน์„ฑ ์†Œ์œ ์ž๋Š” ํŠน์„ฑ ๊ฐ’์„ ๋ชจ๋‹ˆํ„ฐ๋งํ•˜์—ฌ ์‹œ๊ฐ„ ๊ฒฝ๊ณผ์— ๋”ฐ๋ฅธ ๋“œ๋ฆฌํ”„ํŠธ๋ฅผ ๊ฐ์ง€ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

ํ”ผ์ฒ˜์Šคํ† ์–ด ๋ฐ ํŠน์„ฑ์„ ๋ชจ๋‹ˆํ„ฐ๋งํ•˜๋Š” ๋ฐฉ๋ฒ•์€ ๋‹ค์Œ ์„น์…˜์— ์„ค๋ช…๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.

ํ”ผ์ฒ˜์Šคํ† ์–ด ๋ชจ๋‹ˆํ„ฐ๋ง

Vertex AI Feature Store(๊ธฐ์กด)๋Š” CPU ๋ถ€ํ•˜, ์Šคํ† ๋ฆฌ์ง€ ์šฉ๋Ÿ‰, ์š”์ฒญ ์ง€์—ฐ ์‹œ๊ฐ„, ๊ฒฐ์ œ์™€ ๊ฐ™์€ ํ”ผ์ฒ˜์Šคํ† ์–ด์— ๋Œ€ํ•œ ์ธก์ •ํ•ญ๋ชฉ์„ Cloud Monitoring์— ๋ณด๊ณ ํ•ฉ๋‹ˆ๋‹ค. Vertex AI๋Š” ์ด๋Ÿฌํ•œ ์ธก์ •ํ•ญ๋ชฉ์„ ์ž๋™์œผ๋กœ ์ˆ˜์ง‘ํ•˜๊ณ  ๋ณด๊ณ ํ•ฉ๋‹ˆ๋‹ค. ํ”ผ์ฒ˜์Šคํ† ์–ด ๋ชจ๋‹ˆํ„ฐ๋ง์„ ๊ตฌ์„ฑํ•˜๊ฑฐ๋‚˜ ์‚ฌ์šฉ ์„ค์ •ํ•  ํ•„์š”๋Š” ์—†์Šต๋‹ˆ๋‹ค.

๊ธฐ์ค€๊ณผ ์•Œ๋ฆผ์„ ๊ตฌ์„ฑํ•˜๋ ค๋ฉด Cloud Monitoring์„ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด ํ‰๊ท  CPU ๋ถ€ํ•˜๊ฐ€ 70%๋ฅผ ์ดˆ๊ณผํ•˜๋Š” ๊ฒฝ์šฐ ์•Œ๋ฆผ์„ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์œผ๋ฉฐ, ์ด ๊ฒฝ์šฐ ํ”ผ์ฒ˜์Šคํ† ์–ด ๋…ธ๋“œ ์ˆ˜๋ฅผ ๋Š˜๋ ค์•ผ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

Google Cloud ์ฝ˜์†”์˜ Vertex AI ์„น์…˜์—์„œ ํ”ผ์ฒ˜์Šคํ† ์–ด ์ธก์ •ํ•ญ๋ชฉ์„ ํ™•์ธํ•˜์—ฌ ์‹œ๊ฐ„ ๊ฒฝ๊ณผ์— ๋”ฐ๋ฅธ ์ถ”์„ธ๋ฅผ ํ™•์ธํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค. ์ผ๋ถ€ ์ฐจํŠธ์˜ ๊ฒฝ์šฐ ์ •๋ณด๋ฅผ ๋” ์‰ฝ๊ฒŒ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋„๋ก ์ง‘๊ณ„๋˜๊ฑฐ๋‚˜ ๊ณ„์‚ฐ๋œ ๊ฐ’์ด ์ฝ˜์†”์— ํ‘œ์‹œ๋ฉ๋‹ˆ๋‹ค. ์–ธ์ œ๋“ ์ง€ Cloud Monitoring์—์„œ ์›์‹œ ๋ฐ์ดํ„ฐ๋ฅผ ๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์ž์„ธํ•œ ๋‚ด์šฉ์€ Vertex AI Cloud Monitoring ํŽ˜์ด์ง€์˜ Vertex AI Feature Store(๊ธฐ์กด) ๋ชจ๋‹ˆํ„ฐ๋ง ์ธก์ •ํ•ญ๋ชฉ์„ ์ฐธ์กฐํ•˜์„ธ์š”.

ํ”ผ์ฒ˜์Šคํ† ์–ด์—์„œ ์ฒ˜๋ฆฌ๋œ ์˜คํ”„๋ผ์ธ ๋ฐ์ดํ„ฐ์— ๋Œ€ํ•œ ๊ฒฐ์ œ ๋ชจ๋‹ˆํ„ฐ๋ง

Google Cloud ์ฝ˜์†”์„ ์‚ฌ์šฉํ•˜์—ฌ featurestores.batchReadFeatureValues ๋ฐ entityTypes.exportFeatureValues ๋ฉ”์„œ๋“œ์— ์˜ํ•ด ์˜คํ”„๋ผ์ธ์—์„œ ์ฒ˜๋ฆฌ๋œ ์ฒญ๊ตฌ ๊ฐ€๋Šฅํ•œ ๋ฐ์ดํ„ฐ๋ฅผ ๋ชจ๋‹ˆํ„ฐ๋งํ•ฉ๋‹ˆ๋‹ค. ๊ฐ ํ”ผ์ฒ˜์Šคํ† ์–ด์˜ ์ฒญ๊ตฌ ๊ฐ€๋Šฅํ•œ ๋ฐ”์ดํŠธ ์ˆ˜๋ฅผ ๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์ธก์ •ํ•ญ๋ชฉ ํƒ์ƒ‰๊ธฐ์—์„œ Vertex AI Feature Store(๊ธฐ์กด)์˜ ์ฒญ๊ตฌ ๊ฐ€๋Šฅํ•œ ๋ฐ”์ดํŠธ ์ˆ˜ ์ธก์ •ํ•ญ๋ชฉ์„ ๋ชจ๋‹ˆํ„ฐ๋งํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์ฝ˜์†”

  1. Google Cloud ์ฝ˜์†”์—์„œ ์ธก์ •ํ•ญ๋ชฉ ํƒ์ƒ‰๊ธฐ๋กœ ์ด๋™ํ•ฉ๋‹ˆ๋‹ค.

    ์ธก์ •ํ•ญ๋ชฉ ํƒ์ƒ‰๊ธฐ๋กœ ์ด๋™

  2. ์ธก์ •ํ•ญ๋ชฉ ๋ชฉ๋ก์—์„œ Vertex AI Feature Store > ํ”ผ์ฒ˜์Šคํ† ์–ด > ์ฒญ๊ตฌ ๊ฐ€๋Šฅํ•œ ๋ฐ”์ดํŠธ ์ˆ˜๋ฅผ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.

  3. ์ ์šฉ์„ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค. ์ฐจํŠธ์—๋Š” ํ”„๋กœ์ ํŠธ์˜ ํ”ผ์ฒ˜์Šคํ† ์–ด์— ๋Œ€ํ•œ ์ฒญ๊ตฌ ๊ฐ€๋Šฅํ•œ ์˜คํ”„๋ผ์ธ ๋ฐ์ดํ„ฐ๊ฐ€ ํ‘œ์‹œ๋ฉ๋‹ˆ๋‹ค.

    ์ฐจํŠธ๋ฅผ ์ƒ์„ฑํ•œ ํ›„ ์ด๋ฅผ ์ปค์Šคํ…€ ๋Œ€์‹œ๋ณด๋“œ์— ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ž์„ธํ•œ ๋‚ด์šฉ์€ ํ–ฅํ›„ ์ฐธ์กฐ์šฉ์œผ๋กœ ์ฐจํŠธ ์ €์žฅ์„ ์ฐธ์กฐํ•˜์„ธ์š”.

ํŠน์„ฑ ๊ฐ’ ๋ชจ๋‹ˆํ„ฐ๋ง

ํŠน์„ฑ ๊ฐ’ ๋ชจ๋‹ˆํ„ฐ๋ง์„ ์‚ฌ์šฉํ•˜๋ฉด ํ”ผ์ฒ˜์Šคํ† ์–ด์—์„œ ํŠน์„ฑ ๊ฐ’ ๋ถ„ํฌ๊ฐ€ ๋ณ€ํ•˜๋Š” ์ •๋„๋ฅผ ์ถ”์ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ง€์›๋˜๋Š” ํŠน์„ฑ ๊ฐ’ ๋ชจ๋‹ˆํ„ฐ๋ง ์œ ํ˜•์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

  • ์Šค๋ƒ…์ƒท ๋ถ„์„: Vertex AI Feature Store(๊ธฐ์กด)๋Š” ํŠน์„ฑ ๊ฐ’์˜ ์Šค๋ƒ…์ƒท์„ ์ฃผ๊ธฐ์ ์œผ๋กœ ๋งŒ๋“ญ๋‹ˆ๋‹ค. ์‹œ๊ฐ„์ด ์ง€๋‚จ์— ๋”ฐ๋ผ ๋” ๋งŽ์€ ๋ฐ์ดํ„ฐ๋ฅผ ์ˆ˜์ง‘ํ•˜๋ฉด ํŠน์„ฑ ๊ฐ’์˜ ๋ถ„ํฌ๊ฐ€ ๋ณ€๊ฒฝ๋˜๋Š” ๊ฒƒ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด๋Ÿฌํ•œ ๋ณ€๊ฒฝ์‚ฌํ•ญ์€ ํ•ด๋‹น ํŠน์„ฑ์„ ์‚ฌ์šฉํ•˜๋Š” ๋ชจ๋“  ๋ชจ๋ธ์„ ๋‹ค์‹œ ํ•™์Šต์‹œ์ผœ์•ผ ํ•  ์ˆ˜ ์žˆ์Œ์„ ๋‚˜ํƒ€๋ƒ…๋‹ˆ๋‹ค. ๋ถ„ํฌ ํŽธ์ฐจ๊ฐ€ ๊ธฐ์ค€์ ์„ ์ดˆ๊ณผํ•  ๋•Œ๋งˆ๋‹ค ์ด์ƒ์ด Cloud Logging Concole์— ๋กœ๊น…๋˜๋„๋ก ๊ธฐ์ค€์ ์„ ์ง€์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

    ์—”ํ‹ฐํ‹ฐ ID๊ฐ€ 500๋งŒ ๊ฐœ๋ฅผ ์ดˆ๊ณผํ•˜๋Š” ๋ฐ์ดํ„ฐ ์„ธํŠธ์˜ ๊ฒฝ์šฐ Vertex AI Feature Store(๊ธฐ์กด)๋Š” ๋น„ํ™œ์„ฑ ๊ธฐ๊ฐ„(์ผ ์ˆ˜)์œผ๋กœ ์ง€์ •ํ•œ ๊ธฐ๊ฐ„ ๋‚ด์— ๋ฌด์ž‘์œ„๋กœ ์„ ํƒ๋œ ์—”ํ‹ฐํ‹ฐ ID 500๋งŒ ๊ฐœ๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ์Šค๋ƒ…์ƒท์„ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.

  • ํŠน์„ฑ ๋ถ„์„ ๊ฐ€์ ธ์˜ค๊ธฐ: ๊ฐ ImportFeatureValues ์ž‘์—…์€ Vertex AI Feature Store(๊ธฐ์กด)์— ์ˆ˜์ง‘๋œ ๊ฐ’์˜ ๋ถ„ํฌ ํ†ต๊ณ„๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค. ๋ถ„ํฌ ํ†ต๊ณ„๋ฅผ ์ด์ „์— ๊ฐ€์ ธ์˜จ ํŠน์„ฑ ๊ฐ’ ๋ถ„ํฌ ๋˜๋Š” ์Šค๋ƒ…์ƒท ๋ถ„ํฌ(์‚ฌ์šฉ ์„ค์ •๋œ ๊ฒฝ์šฐ)์™€ ๋น„๊ตํ•˜์—ฌ ์ด์ƒ์„ ๊ฐ์ง€ํ•˜๋„๋ก ์„ ํƒํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

    ์ธ์Šคํ„ด์Šค๊ฐ€ 500๋งŒ ๊ฐœ๋ฅผ ์ดˆ๊ณผํ•˜๋Š” ๋ฐ์ดํ„ฐ ์„ธํŠธ์˜ ๊ฒฝ์šฐ Vertex AI Feature Store(๊ธฐ์กด)๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์ด ๋ฌด์ž‘์œ„๋กœ ์„ ํƒํ•œ ๋ฐ์ดํ„ฐ๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ์Šค๋ƒ…์ƒท์„ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.

    • ์ˆ˜์ง‘๋œ ๋ฐ์ดํ„ฐ ์„ธํŠธ ๋‚ด ์ธ์Šคํ„ด์Šค ์ˆ˜๊ฐ€ 500๋งŒ ๊ฐœ๋ฅผ ์ดˆ๊ณผํ•˜์ง€๋งŒ 5000๋งŒ ๊ฐœ๋ฅผ ์ดˆ๊ณผํ•˜์ง€ ์•Š์œผ๋ฉด ๋ฌด์ž‘์œ„๋กœ ์„ ํƒ๋œ ์ธ์Šคํ„ด์Šค 5๋ฐฑ๋งŒ ๊ฐœ๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ์Šค๋ƒ…์ƒท์ด ์ƒ์„ฑ๋ฉ๋‹ˆ๋‹ค.
    • ์ˆ˜์ง‘๋œ ๋ฐ์ดํ„ฐ ์„ธํŠธ ๋‚ด ์ธ์Šคํ„ด์Šค ์ˆ˜๊ฐ€ 5000๋งŒ ๊ฐœ๋ฅผ ์ดˆ๊ณผํ•˜๋ฉด ๋ฌด์ž‘์œ„๋กœ ์„ ํƒ๋œ ์ธ์Šคํ„ด์Šค์˜ 10%๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ์Šค๋ƒ…์ƒท์ด ์ƒ์„ฑ๋ฉ๋‹ˆ๋‹ค.

์˜ˆ๋ฅผ ๋“ค์–ด ์ตœ๊ทผ ํŒ๋งค๋œ ์ฃผํƒ์˜ ๊ฐ€๊ฒฉ์„ ์ˆ˜์ง‘ํ•œ ๋‹ค์Œ ์ฃผํƒ ๊ฐ€๊ฒฉ์„ ์˜ˆ์ธกํ•˜๋Š” ๋ชจ๋ธ์— ๊ฐ€์น˜๋ฅผ ์ž…๋ ฅํ•˜๋Š” ํŠน์„ฑ์„ ์‚ดํŽด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. ์ตœ๊ทผ์— ํŒ๋งค๋œ ์ฃผํƒ์˜ ๊ฐ€๊ฒฉ์ด ์‹œ๊ฐ„ ๊ฒฝ๊ณผ์— ๋”ฐ๋ผ ํฌ๊ฒŒ ๋ณ€๋™ํ•˜๊ฑฐ๋‚˜ ์ผ๊ด„์ ์œผ๋กœ ๊ฐ€์ ธ์˜จ ๊ฐ€์น˜์— ํ•™์Šต ๋ฐ์ดํ„ฐ์—์„œ ํฌ๊ฒŒ ๋ฒ—์–ด๋‚œ ๋ฐ์ดํ„ฐ๊ฐ€ ํฌํ•จ๋  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. Vertex AI Feature Store(๊ธฐ์กด)๋Š” ์ด๋Ÿฌํ•œ ๋ณ€๊ฒฝ์‚ฌํ•ญ์„ ์•Œ๋ ค์ค๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋ฉด ์ตœ์‹  ์ •๋ณด๋ฅผ ์‚ฌ์šฉํ•˜๋„๋ก ๋ชจ๋ธ์„ ๋‹ค์‹œ ํ•™์Šต์‹œํ‚ฌ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๋ชจ๋‹ˆํ„ฐ๋ง ๊ตฌ์„ฑ ์„ค์ •

๋ชจ๋‹ˆํ„ฐ๋ง์„ ์‹œ์ž‘ํ•˜๊ธฐ ์œ„ํ•ด ํ•ญ๋ชฉ ์œ ํ˜•์— ๋Œ€ํ•œ ๋ชจ๋‹ˆํ„ฐ๋ง ๊ตฌ์„ฑ์„ ์ •์˜ํ•  ์ˆ˜ ์žˆ์œผ๋ฉฐ ์ด๋ฅผ ํ†ตํ•ด ๋‹ค์Œ ์œ ํ˜•์˜ ๋ชจ๋“  ํŠน์„ฑ์— ๋Œ€ํ•œ ๋ชจ๋‹ˆํ„ฐ๋ง์„ ์ˆ˜ํ–‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

  • BOOL
  • STRING
  • DOUBLE
  • INT64

ํ•ญ๋ชฉ ์œ ํ˜•์„ ๋งŒ๋“ค ๋•Œ ๋ชจ๋‹ˆํ„ฐ๋ง ๊ตฌ์„ฑ์„ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. disableMonitoring ์†์„ฑ์„ ์„ค์ •ํ•˜์—ฌ ํŠน์ • ํŠน์„ฑ์— ๋Œ€ํ•œ ๋ชจ๋‹ˆํ„ฐ๋ง์„ ์„ ํƒ ํ•ด์ œํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค. ํ•ญ๋ชฉ ์œ ํ˜• ๋ชจ๋‹ˆํ„ฐ๋ง ๊ตฌ์„ฑ์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

  • ๋ชจ๋‹ˆํ„ฐ๋ง ์‚ฌ์šฉ ์„ค์ • ์—ฌ๋ถ€. Monitoring์€ ๊ธฐ๋ณธ์ ์œผ๋กœ ์‚ฌ์šฉ ์ค‘์ง€๋˜์–ด์žˆ์Šต๋‹ˆ๋‹ค.
  • ์ด์ƒ์น˜๋ฅผ ๊ฐ์ง€ํ•˜๋Š” ๋ฐ ์‚ฌ์šฉ๋˜๋Š” ๊ธฐ์ค€์ . ๊ธฐ๋ณธ ๊ธฐ์ค€์ ์€ 0.3์ž…๋‹ˆ๋‹ค.
  • ์Šค๋ƒ…์ƒท ๊ฐ„ ๊ฐ„๊ฒฉ ์™ธ์— ์ „ํ™˜ ํ™•์ธ ๊ธฐ๊ฐ„(์Šค๋ƒ…์ƒท ๋ถ„์„์šฉ). ๊ธฐ๋ณธ๊ฐ’์€ 21์ž…๋‹ˆ๋‹ค.
  • ๊ฐ€์ ธ์˜ค๊ธฐ ํŠน์„ฑ ๋ถ„์„์„ ์‚ฌ์šฉ ์„ค์ •ํ• ์ง€ ์—ฌ๋ถ€. ๊ธฐ๋ณธ๊ฐ’์€ ์‚ฌ์šฉ ์ค‘์ง€๋จ์ž…๋‹ˆ๋‹ค.

์ž์„ธํ•œ ๋‚ด์šฉ์€ API ์ฐธ์กฐ์˜ FeaturestoreMonitoringConfig ์œ ํ˜•์„ ์ฐธ์กฐํ•˜์„ธ์š”.

๋ชจ๋‹ˆํ„ฐ๋ง์ด ์‚ฌ์šฉ ์„ค์ •๋œ ํ•ญ๋ชฉ ์œ ํ˜• ๋งŒ๋“ค๊ธฐ

๋‹ค์Œ ์˜ˆ์‹œ์—์„œ๋Š” ํŠน์„ฑ ๋ชจ๋‹ˆํ„ฐ๋ง์ด ์‚ฌ์šฉ ์„ค์ •๋œ ํ•ญ๋ชฉ ์œ ํ˜•์„ ๋งŒ๋“ญ๋‹ˆ๋‹ค.

์›น UI

UI์—์„œ๋Š” ์Šค๋ƒ…์ƒท ๋ถ„์„๋งŒ ์ง€์›๋ฉ๋‹ˆ๋‹ค.

  1. Google Cloud ์ฝ˜์†”์˜ Vertex AI ์„น์…˜์—์„œ ํŠน์„ฑ ํŽ˜์ด์ง€๋กœ ์ด๋™ํ•ฉ๋‹ˆ๋‹ค.

    ํŠน์„ฑ ํŽ˜์ด์ง€๋กœ ์ด๋™

  2. ๋ฆฌ์ „ ๋“œ๋กญ๋‹ค์šด ๋ชฉ๋ก์—์„œ ๋ฆฌ์ „์„ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.
  3. ํ•ญ๋ชฉ ์œ ํ˜• ๋งŒ๋“ค๊ธฐ๋ฅผ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.
  4. ํŠน์„ฑ ๋ชจ๋‹ˆํ„ฐ๋ง ์„น์…˜์„ ์‚ฌ์šฉ ์„ค์ •๋จ์œผ๋กœ ์ „ํ™˜ํ•ฉ๋‹ˆ๋‹ค.
  5. Monitoring ์‹œ๊ฐ„ ๊ฐ„๊ฒฉ ํ•„๋“œ์— ์Šค๋ƒ…์ƒท ์‚ฌ์ด์˜ ์ผ์ˆ˜๋ฅผ ์ž…๋ ฅํ•ฉ๋‹ˆ๋‹ค.
    ํ•ญ๋ชฉ ์œ ํ˜• ๋˜๋Š” ํŠน์„ฑ์˜ ๋ชจ๋‹ˆํ„ฐ๋ง ์ž‘์—…์€ ํ•ญ๋ชฉ ์œ ํ˜• ๋˜๋Š” ํŠน์„ฑ์˜ ๋ชจ๋‹ˆํ„ฐ๋ง์„ ์‚ฌ์šฉ ์„ค์ •ํ•œ ์‹œ๊ฐ„ ์ดํ›„ ๊ฐ€์žฅ ๊ฐ€๊นŒ์šด ์ •์ˆ˜ ์‹œ๊ฐ„์— ์‹คํ–‰๋ฉ๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด ์›”์š”์ผ ์˜คํ›„ 10์‹œ 30๋ถ„์— ๋ชจ๋‹ˆํ„ฐ๋ง์„ ์‚ฌ์šฉ ์„ค์ •ํ•˜๊ณ  ๋ชจ๋‹ˆํ„ฐ๋ง ์‹œ๊ฐ„ ๊ฐ„๊ฒฉ์„ 2์ผ๋กœ ์ง€์ •ํ•˜๋ฉด ์ฒซ ๋ฒˆ์งธ ๋ชจ๋‹ˆํ„ฐ๋ง ์ž‘์—…์ด ์ˆ˜์š”์ผ ์˜คํ›„ 11์‹œ์— ์‹คํ–‰๋ฉ๋‹ˆ๋‹ค.
  6. Monitoring ์ „ํ™˜ ํ™•์ธ ๊ธฐ๊ฐ„ ํ•„๋“œ์— ๊ฐ ์Šค๋ƒ…์ƒท์— ๋Œ€ํ•œ ์ „ํ™˜ ํ™•์ธ ์ผ์ˆ˜๋ฅผ ์ž…๋ ฅํ•ฉ๋‹ˆ๋‹ค.
  7. ์ˆซ์ž ์•Œ๋ฆผ ๊ธฐ์ค€์  ํ•„๋“œ์— ์ˆซ์ž ํŠน์„ฑ์˜ ์ด์ƒ์„ ๊ฐ์ง€ํ•˜๋Š” ๋ฐ ์‚ฌ์šฉ๋œ ๊ธฐ์ค€์ ์„ ์ž…๋ ฅํ•˜์„ธ์š”.
  8. ๋ฒ”์ฃผํ˜• ์•Œ๋ฆผ ๊ธฐ์ค€์  ํ•„๋“œ์— ์ด EntityType์˜ ๋ฒ”์ฃผํ˜• ํŠน์„ฑ์— ๋Œ€ํ•œ ์ด์ƒ ๊ฐ์ง€์— ์‚ฌ์šฉ๋˜๋Š” ๊ธฐ์ค€์ ์„ ์ž…๋ ฅํ•ฉ๋‹ˆ๋‹ค.
    ํŠน์„ฑ ๊ฐ’ ์ด์ƒ ๊ฐ์ง€์— ๋Œ€ํ•œ ์ž์„ธํ•œ ๋‚ด์šฉ์€ ํŠน์„ฑ ๊ฐ’ ์ด์ƒ์น˜ ๋ณด๊ธฐ๋ฅผ ํ™•์ธํ•˜์„ธ์š”.
  9. ๋งŒ๋“ค๊ธฐ๋ฅผ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.
  10. ํŠน์„ฑ ํ…Œ์ด๋ธ”์—์„œ ํ•ญ๋ชฉ ์œ ํ˜•์„ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.
  11. ํ•ญ๋ชฉ์— ์ƒˆ ํŠน์„ฑ์„ ์ถ”๊ฐ€ํ•˜๋ ค๋ฉด ํŠน์„ฑ ์ถ”๊ฐ€๋ฅผ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.
  12. ํŠน์ • ํŠน์„ฑ์— ๋Œ€ํ•ด ๋ชจ๋‹ˆํ„ฐ๋ง์„ ์„ ํƒ ํ•ด์ œํ•˜๋ ค๋ฉด ๋ชจ๋‹ˆํ„ฐ๋ง ์‚ฌ์šฉ ์„ค์ •์„ ํ•ด์ œํ•ฉ๋‹ˆ๋‹ค.

REST

ํ•ญ๋ชฉ ์œ ํ˜•์„ ๋งŒ๋“ค๋ ค๋ฉด entityTypes.create ๋ฉ”์„œ๋“œ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ POST ์š”์ฒญ์„ ์ „์†กํ•ฉ๋‹ˆ๋‹ค.

์š”์ฒญ ๋ฐ์ดํ„ฐ๋ฅผ ์‚ฌ์šฉํ•˜๊ธฐ ์ „์— ๋‹ค์Œ์„ ๋ฐ”๊ฟ‰๋‹ˆ๋‹ค.

  • LOCATION_ID: ํ”ผ์ฒ˜์Šคํ† ์–ด๊ฐ€ ์žˆ๋Š” ๋ฆฌ์ „์ž…๋‹ˆ๋‹ค(์˜ˆ: us-central1).
  • PROJECT_ID: ํ”„๋กœ์ ํŠธ ID
  • FEATURESTORE_ID: ํ”ผ์ฒ˜์Šคํ† ์–ด์˜ ID
  • ENTITY_TYPE_ID: ํ•ญ๋ชฉ ์œ ํ˜•์˜ ID
  • DURATION: ์Šค๋ƒ…์ƒท ์‚ฌ์ด์˜ ๊ฐ„๊ฒฉ(์ผ)
  • STALENESS_DAYS: ์Šค๋ƒ…์ƒท ์ƒ์„ฑ ์‹œ ํ™•์ธํ•  ์ผ์ˆ˜
  • NUMERICAL_THRESHOLD_VALUE: ์ด ํ•ญ๋ชฉ ์œ ํ˜•์˜ ์ˆซ์ž ํŠน์„ฑ์—์„œ ์ด์ƒ์„ ๊ฐ์ง€ํ•˜๋Š” ๊ธฐ์ค€์ . ํ†ต๊ณ„ ํŽธ์ฐจ๋Š” Jenson-Shannon ๋ถˆ์ผ์น˜๋กœ ๊ณ„์‚ฐํ•ฉ๋‹ˆ๋‹ค.
  • CATEGORICAL_THRESHOLD_VALUE: ์ด ํ•ญ๋ชฉ ์œ ํ˜•์˜ ๋ฒ”์ฃผํ˜• ํŠน์„ฑ์—์„œ ์ด์ƒ์„ ๊ฐ์ง€ํ•˜๊ธฐ ์œ„ํ•œ ๊ธฐ์ค€์ ์ž…๋‹ˆ๋‹ค. ํ†ต๊ณ„ ํŽธ์ฐจ๋Š” L ๋ฌดํ•œ๋Œ€ ๊ฑฐ๋ฆฌ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๊ณ„์‚ฐํ•ฉ๋‹ˆ๋‹ค.
  • IMPORT_FEATURE_ANALYSIS_STATE: ๊ฐ€์ ธ์˜ค๊ธฐ ํŠน์„ฑ ๋ถ„์„์„ ์‚ฌ์šฉ ์„ค์ •ํ• ์ง€ ์—ฌ๋ถ€๋ฅผ ๋‚˜ํƒ€๋‚ด๋Š” ์ƒํƒœ์ž…๋‹ˆ๋‹ค.
  • IMPORT_FEATURE_ANALYSIS_BASELINE: ์‚ฌ์šฉ ์„ค์ •๋œ ๊ฒฝ์šฐ ๊ฐ€์ ธ์˜ค๊ธฐ ํŠน์„ฑ ๋ถ„์„์˜ ๊ธฐ์ค€์ž…๋‹ˆ๋‹ค.

HTTP ๋ฉ”์„œ๋“œ ๋ฐ URL:

POST https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/featurestores/FEATURESTORE_ID/entityTypes?entityTypeId=ENTITY_TYPE_ID

JSON ์š”์ฒญ ๋ณธ๋ฌธ:

{
  "monitoringConfig": {
    "snapshotAnalysis": {
      "monitoringIntervalDays": "DURATION"
      "stalenessDays": "STALENESS_DAYS"
    }
  },
 "numericalThresholdConfig": {
    "value": "NUMERICAL_THRESHOLD_VALUE"
  },
  "categoricalThresholdConfig": {
    "value": "CATEGORICAL_THRESHOLD_VALUE"
  },
  "importFeatureAnalysis": {
    "state": "IMPORT_FEATURE_ANALYSIS_STATE",
    "anomalyDetectionBaseline": "IMPORT_FEATURE_ANALYSIS_BASELINE"
  }
}

์š”์ฒญ์„ ๋ณด๋‚ด๋ ค๋ฉด ๋‹ค์Œ ์˜ต์…˜ ์ค‘ ํ•˜๋‚˜๋ฅผ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.

curl

์š”์ฒญ ๋ณธ๋ฌธ์„ request.json ํŒŒ์ผ์— ์ €์žฅํ•˜๊ณ  ๋‹ค์Œ ๋ช…๋ น์–ด๋ฅผ ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค.

curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/featurestores/FEATURESTORE_ID/entityTypes?entityTypeId=ENTITY_TYPE_ID"

PowerShell

์š”์ฒญ ๋ณธ๋ฌธ์„ request.json ํŒŒ์ผ์— ์ €์žฅํ•˜๊ณ  ๋‹ค์Œ ๋ช…๋ น์–ด๋ฅผ ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค.

$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest `
-Method POST `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/featurestores/FEATURESTORE_ID/entityTypes?entityTypeId=ENTITY_TYPE_ID" | Select-Object -Expand Content

๋‹ค์Œ๊ณผ ๋น„์Šทํ•œ ์ถœ๋ ฅ์ด ํ‘œ์‹œ๋ฉ๋‹ˆ๋‹ค. ์‘๋‹ต์˜ OPERATION_ID๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ž‘์—… ์ƒํƒœ๋ฅผ ๊ฐ€์ ธ์˜ฌ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

{
  "name": "projects/PROJECT_ID/locations/LOCATION_ID/operations/OPERATION_ID",
  "metadata": {
    "@type": "type.googleapis.com/google.cloud.aiplatform.ui.CreateEntityTypeOperationMetadata",
    "genericMetadata": {
      "createTime": "2022-04-29T20:29:05.206525Z",
      "updateTime": "2022-04-29T20:29:05.206525Z"
    }
  }
}

Java

์ด ์ƒ˜ํ”Œ์„ ์‚ฌ์šฉํ•ด ๋ณด๊ธฐ ์ „์— Vertex AI ๋น ๋ฅธ ์‹œ์ž‘: ํด๋ผ์ด์–ธํŠธ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์‚ฌ์šฉ์˜ Java ์„ค์ • ์•ˆ๋‚ด๋ฅผ ๋”ฐ๋ฅด์„ธ์š”. ์ž์„ธํ•œ ๋‚ด์šฉ์€ Vertex AI Java API ์ฐธ๊ณ  ๋ฌธ์„œ๋ฅผ ์ฐธ์กฐํ•˜์„ธ์š”.

Vertex AI์— ์ธ์ฆํ•˜๋ ค๋ฉด ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๊ธฐ๋ณธ ์‚ฌ์šฉ์ž ์ธ์ฆ ์ •๋ณด๋ฅผ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค. ์ž์„ธํ•œ ๋‚ด์šฉ์€ ๋กœ์ปฌ ๊ฐœ๋ฐœ ํ™˜๊ฒฝ์˜ ์ธ์ฆ ์„ค์ •์„ ์ฐธ์กฐํ•˜์„ธ์š”.


import com.google.api.gax.longrunning.OperationFuture;
import com.google.cloud.aiplatform.v1.CreateEntityTypeOperationMetadata;
import com.google.cloud.aiplatform.v1.CreateEntityTypeRequest;
import com.google.cloud.aiplatform.v1.EntityType;
import com.google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig;
import com.google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig.SnapshotAnalysis;
import com.google.cloud.aiplatform.v1.FeaturestoreName;
import com.google.cloud.aiplatform.v1.FeaturestoreServiceClient;
import com.google.cloud.aiplatform.v1.FeaturestoreServiceSettings;
import java.io.IOException;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;

public class CreateEntityTypeMonitoringSample {

  public static void main(String[] args)
      throws IOException, InterruptedException, ExecutionException, TimeoutException {
    // TODO(developer): Replace these variables before running the sample.
    String project = "YOUR_PROJECT_ID";
    String featurestoreId = "YOUR_FEATURESTORE_ID";
    String entityTypeId = "YOUR_ENTITY_TYPE_ID";
    String description = "YOUR_ENTITY_TYPE_DESCRIPTION";
    int monitoringIntervalDays = 1;
    String location = "us-central1";
    String endpoint = "us-central1-aiplatform.googleapis.com:443";
    int timeout = 300;
    createEntityTypeMonitoringSample(
        project,
        featurestoreId,
        entityTypeId,
        description,
        monitoringIntervalDays,
        location,
        endpoint,
        timeout);
  }

  static void createEntityTypeMonitoringSample(
      String project,
      String featurestoreId,
      String entityTypeId,
      String description,
      int monitoringIntervalDays,
      String location,
      String endpoint,
      int timeout)
      throws IOException, InterruptedException, ExecutionException, TimeoutException {

    FeaturestoreServiceSettings featurestoreServiceSettings =
        FeaturestoreServiceSettings.newBuilder().setEndpoint(endpoint).build();

    // Initialize client that will be used to send requests. This client only needs to be created
    // once, and can be reused for multiple requests. After completing all of your requests, call
    // the "close" method on the client to safely clean up any remaining background resources.
    try (FeaturestoreServiceClient featurestoreServiceClient =
        FeaturestoreServiceClient.create(featurestoreServiceSettings)) {

      FeaturestoreMonitoringConfig featurestoreMonitoringConfig =
          FeaturestoreMonitoringConfig.newBuilder()
              .setSnapshotAnalysis(
                  SnapshotAnalysis.newBuilder().setMonitoringIntervalDays(monitoringIntervalDays))
              .build();

      EntityType entityType =
          EntityType.newBuilder()
              .setDescription(description)
              .setMonitoringConfig(featurestoreMonitoringConfig)
              .build();

      CreateEntityTypeRequest createEntityTypeRequest =
          CreateEntityTypeRequest.newBuilder()
              .setParent(FeaturestoreName.of(project, location, featurestoreId).toString())
              .setEntityType(entityType)
              .setEntityTypeId(entityTypeId)
              .build();

      OperationFuture<EntityType, CreateEntityTypeOperationMetadata> entityTypeFuture =
          featurestoreServiceClient.createEntityTypeAsync(createEntityTypeRequest);
      System.out.format(
          "Operation name: %s%n", entityTypeFuture.getInitialFuture().get().getName());
      System.out.println("Waiting for operation to finish...");
      EntityType entityTypeResponse = entityTypeFuture.get(timeout, TimeUnit.SECONDS);
      System.out.println("Create Entity Type Monitoring Response");
      System.out.format("Name: %s%n", entityTypeResponse.getName());
    }
  }
}

Node.js

์ด ์ƒ˜ํ”Œ์„ ์‚ฌ์šฉํ•ด ๋ณด๊ธฐ ์ „์— Vertex AI ๋น ๋ฅธ ์‹œ์ž‘: ํด๋ผ์ด์–ธํŠธ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์‚ฌ์šฉ์˜ Node.js ์„ค์ • ์•ˆ๋‚ด๋ฅผ ๋”ฐ๋ฅด์„ธ์š”. ์ž์„ธํ•œ ๋‚ด์šฉ์€ Vertex AI Node.js API ์ฐธ๊ณ  ๋ฌธ์„œ๋ฅผ ์ฐธ์กฐํ•˜์„ธ์š”.

Vertex AI์— ์ธ์ฆํ•˜๋ ค๋ฉด ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๊ธฐ๋ณธ ์‚ฌ์šฉ์ž ์ธ์ฆ ์ •๋ณด๋ฅผ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค. ์ž์„ธํ•œ ๋‚ด์šฉ์€ ๋กœ์ปฌ ๊ฐœ๋ฐœ ํ™˜๊ฒฝ์˜ ์ธ์ฆ ์„ค์ •์„ ์ฐธ์กฐํ•˜์„ธ์š”.

/**
 * TODO(developer): Uncomment these variables before running the sample.\
 * (Not necessary if passing values as arguments)
 */

// const project = 'YOUR_PROJECT_ID';
// const featurestoreId = 'YOUR_FEATURESTORE_ID';
// const entityTypeId = 'YOUR_ENTITY_TYPE_ID';
// const description = 'YOUR_ENTITY_TYPE_DESCRIPTION';
// const duration = <MONITORING_INTERVAL_IN_SECONDS>;
// const location = 'YOUR_PROJECT_LOCATION';
// const apiEndpoint = 'YOUR_API_ENDPOINT';
// const timeout = <TIMEOUT_IN_MILLI_SECONDS>;

// Imports the Google Cloud Featurestore Service Client library
const {FeaturestoreServiceClient} =
  require('@google-cloud/aiplatform').v1beta1;

// Specifies the location of the api endpoint
const clientOptions = {
  apiEndpoint: apiEndpoint,
};

// Instantiates a client
const featurestoreServiceClient = new FeaturestoreServiceClient(
  clientOptions
);

async function createEntityTypeMonitoring() {
  // Configure the parent resource
  const parent = `projects/${project}/locations/${location}/featurestores/${featurestoreId}`;

  const entityType = {
    description: description,
    monitoringConfig: {
      snapshotAnalysis: {
        monitoringInterval: {
          seconds: Number(duration),
        },
      },
    },
  };

  const request = {
    parent: parent,
    entityTypeId: entityTypeId,
    entityType: entityType,
  };

  // Create EntityType request
  const [operation] = await featurestoreServiceClient.createEntityType(
    request,
    {timeout: Number(timeout)}
  );
  const [response] = await operation.promise();

  console.log('Create entity type monitoring response');
  console.log(`Name : ${response.name}`);
  console.log('Raw response:');
  console.log(JSON.stringify(response, null, 2));
}
createEntityTypeMonitoring();

์ถ”๊ฐ€ ์–ธ์–ด

Vertex AI SDK for Python์„ ์„ค์น˜ํ•˜๊ณ  ์‚ฌ์šฉํ•˜๋Š” ๋ฐฉ๋ฒ•์€ Vertex AI SDK for Python ์‚ฌ์šฉ์„ ์ฐธ์กฐํ•˜์„ธ์š”. ์ž์„ธํ•œ ๋‚ด์šฉ์€ Python์šฉ Vertex AI SDK API ์ฐธ๊ณ  ๋ฌธ์„œ๋ฅผ ํ™•์ธํ•˜์„ธ์š”.

์ƒˆ ํŠน์„ฑ์˜ ๋ชจ๋‹ˆํ„ฐ๋ง ์‚ฌ์šฉ ์ค‘์ง€

๋‹ค์Œ ์˜ˆ์‹œ์—์„œ๋Š” ๋ชจ๋‹ˆํ„ฐ๋ง์ด ์‚ฌ์šฉ ์ค‘์ง€๋œ ์ƒˆ ํŠน์„ฑ์„ ๋งŒ๋“ญ๋‹ˆ๋‹ค.

REST

ํŠน์„ฑ์„ ๋งŒ๋“ค๋ ค๋ฉด features.create ๋ฉ”์„œ๋“œ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ POST ์š”์ฒญ์„ ์ „์†กํ•ฉ๋‹ˆ๋‹ค.

์š”์ฒญ ๋ฐ์ดํ„ฐ๋ฅผ ์‚ฌ์šฉํ•˜๊ธฐ ์ „์— ๋‹ค์Œ์„ ๋ฐ”๊ฟ‰๋‹ˆ๋‹ค.

  • LOCATION_ID: ํ”ผ์ฒ˜์Šคํ† ์–ด๊ฐ€ ์žˆ๋Š” ๋ฆฌ์ „(์˜ˆ: us-central1)
  • PROJECT_ID: ํ”„๋กœ์ ํŠธ ID
  • FEATURESTORE_ID: ํ”ผ์ฒ˜์Šคํ† ์–ด์˜ ID
  • ENTITY_TYPE_ID: ํ•ญ๋ชฉ ์œ ํ˜•์˜ ID
  • FEATURE_ID: ํŠน์„ฑ์˜ ID
  • VALUE_TYPE: ํŠน์„ฑ์˜ ๊ฐ’ ์œ ํ˜•
  • DISABLE_MONITORING: ๋ชจ๋‹ˆํ„ฐ๋ง์„ ๋ช…์‹œ์ ์œผ๋กœ ์„ ํƒ ํ•ด์ œํ•˜๋ ค๋ฉด true๋กœ ์„ค์ •

HTTP ๋ฉ”์„œ๋“œ ๋ฐ URL:

POST https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/featurestores/FEATURESTORE_ID/entityTypes/ENTITY_TYPE_ID?featureId=/FEATURE_ID

JSON ์š”์ฒญ ๋ณธ๋ฌธ:

{
  "disableMonitoring": "DISABLE_MONITORING",
  "valueType": "VALUE_TYPE"
}

์š”์ฒญ์„ ๋ณด๋‚ด๋ ค๋ฉด ๋‹ค์Œ ์˜ต์…˜ ์ค‘ ํ•˜๋‚˜๋ฅผ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.

curl

์š”์ฒญ ๋ณธ๋ฌธ์„ request.json ํŒŒ์ผ์— ์ €์žฅํ•˜๊ณ  ๋‹ค์Œ ๋ช…๋ น์–ด๋ฅผ ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค.

curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/featurestores/FEATURESTORE_ID/entityTypes/ENTITY_TYPE_ID?featureId=/FEATURE_ID"

PowerShell

์š”์ฒญ ๋ณธ๋ฌธ์„ request.json ํŒŒ์ผ์— ์ €์žฅํ•˜๊ณ  ๋‹ค์Œ ๋ช…๋ น์–ด๋ฅผ ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค.

$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest `
-Method POST `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/featurestores/FEATURESTORE_ID/entityTypes/ENTITY_TYPE_ID?featureId=/FEATURE_ID" | Select-Object -Expand Content

๋‹ค์Œ๊ณผ ๋น„์Šทํ•œ ์ถœ๋ ฅ์ด ํ‘œ์‹œ๋ฉ๋‹ˆ๋‹ค. ์‘๋‹ต์˜ OPERATION_ID๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ž‘์—… ์ƒํƒœ๋ฅผ ๊ฐ€์ ธ์˜ฌ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

{
  "name": "projects/PROJECT_ID/locations/LOCATION_ID/operations/OPERATION_ID",
  "metadata": {
    "@type": "type.googleapis.com/google.cloud.aiplatform.ui.CreateFeatureOperationMetadata",
    "genericMetadata": {
      "createTime": "2022-04-29T20:29:05.206525Z",
      "updateTime": "2022-04-29T20:29:05.206525Z"
    }
  }
}

๋ชจ๋‹ˆํ„ฐ๋ง ๊ตฌ์„ฑ ์—…๋ฐ์ดํŠธ

ํ•ญ๋ชฉ ์œ ํ˜•์„ ์—…๋ฐ์ดํŠธํ•  ๋•Œ ๋ชจ๋‹ˆํ„ฐ๋ง ๊ตฌ์„ฑ์„ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. disableMonitoring ์†์„ฑ์„ ์„ค์ •ํ•˜์—ฌ ํŠน์ • ํŠน์„ฑ์— ๋Œ€ํ•œ ๋ชจ๋‹ˆํ„ฐ๋ง์„ ์„ ํƒ ํ•ด์ œํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค.

ํ•ญ๋ชฉ ์œ ํ˜• ๋ฐ ํŠน์„ฑ์˜ ๋ชจ๋‹ˆํ„ฐ๋ง ๊ตฌ์„ฑ ์—…๋ฐ์ดํŠธ

๋‹ค์Œ ์˜ˆ์‹œ์—์„œ๋Š” ๊ธฐ์กด ํ•ญ๋ชฉ ์œ ํ˜• ๋ฐ ์ด ํ•ญ๋ชฉ ์œ ํ˜•์˜ ํŠน์ • ํŠน์„ฑ์— ๋Œ€ํ•œ ๋ชจ๋‹ˆํ„ฐ๋ง ๊ตฌ์„ฑ์„ ์—…๋ฐ์ดํŠธํ•ฉ๋‹ˆ๋‹ค.

์›น UI

UI์—์„œ๋Š” ์Šค๋ƒ…์ƒท ๋ถ„์„๋งŒ ์ง€์›๋ฉ๋‹ˆ๋‹ค.

  1. Google Cloud ์ฝ˜์†”์˜ Vertex AI ์„น์…˜์—์„œ ํŠน์„ฑ ํŽ˜์ด์ง€๋กœ ์ด๋™ํ•ฉ๋‹ˆ๋‹ค.
  2. ๋ฆฌ์ „ ๋“œ๋กญ๋‹ค์šด ๋ชฉ๋ก์—์„œ ๋ฆฌ์ „์„ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.
  3. ํŠน์„ฑ ํ…Œ์ด๋ธ”์—์„œ ํ•ญ๋ชฉ ์œ ํ˜• ์—ด์„ ๋ณด๊ณ  ์—…๋ฐ์ดํŠธํ•  ํ•ญ๋ชฉ ์œ ํ˜•์„ ์ฐพ์Šต๋‹ˆ๋‹ค.
  4. ํ•ญ๋ชฉ ์œ ํ˜• ์ด๋ฆ„์„ ํด๋ฆญํ•˜์—ฌ ํ•ญ๋ชฉ ์„ธ๋ถ€์ •๋ณด ํŽ˜์ด์ง€๋ฅผ ๋ด…๋‹ˆ๋‹ค.
  5. ์ž‘์—… ๋ชจ์Œ์—์„œ ์ •๋ณด ์ˆ˜์ •์„ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.
  6. Monitoring ์‹œ๊ฐ„ ๊ฐ„๊ฒฉ์— ์Šค๋ƒ…์ƒท ์‚ฌ์ด์˜ ์ผ์ˆ˜๋ฅผ ์ž…๋ ฅํ•ฉ๋‹ˆ๋‹ค.
    ํ•ญ๋ชฉ ์œ ํ˜• ๋˜๋Š” ํŠน์„ฑ์˜ ๋ชจ๋‹ˆํ„ฐ๋ง ์ž‘์—…์€ ํ•ญ๋ชฉ ์œ ํ˜• ๋˜๋Š” ํŠน์„ฑ์˜ ๋ชจ๋‹ˆํ„ฐ๋ง์„ ์‚ฌ์šฉ ์„ค์ •ํ•œ ์‹œ๊ฐ„ ์ดํ›„ ๊ฐ€์žฅ ๊ฐ€๊นŒ์šด ์ •์ˆ˜ ์‹œ๊ฐ„์— ์‹คํ–‰๋ฉ๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด ์›”์š”์ผ ์˜คํ›„ 10์‹œ 30๋ถ„์— ๋ชจ๋‹ˆํ„ฐ๋ง์„ ์‚ฌ์šฉ ์„ค์ •ํ•˜๊ณ  ๋ชจ๋‹ˆํ„ฐ๋ง ์‹œ๊ฐ„ ๊ฐ„๊ฒฉ์„ 2์ผ๋กœ ์ง€์ •ํ•˜๋ฉด ์ฒซ ๋ฒˆ์งธ ๋ชจ๋‹ˆํ„ฐ๋ง ์ž‘์—…์ด ์ˆ˜์š”์ผ ์˜คํ›„ 11์‹œ์— ์‹คํ–‰๋ฉ๋‹ˆ๋‹ค.
  7. ์—…๋ฐ์ดํŠธ๋ฅผ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.
  8. ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ ํŠน์„ฑ ํ…Œ์ด๋ธ”์—์„œ ํŠน์„ฑ ์—ด์„ ํ™•์ธํ•˜์—ฌ ์—…๋ฐ์ดํŠธํ•  ํŠน์„ฑ์„ ์ฐพ์Šต๋‹ˆ๋‹ค.
  9. ํŠน์„ฑ ์ด๋ฆ„์„ ํด๋ฆญํ•˜์—ฌ ์„ธ๋ถ€์ •๋ณด ํŽ˜์ด์ง€๋ฅผ ๋ด…๋‹ˆ๋‹ค.
  10. ์ž‘์—… ๋ชจ์Œ์—์„œ ์ •๋ณด ์ˆ˜์ •์„ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.
  11. ํŠน์ • ํŠน์„ฑ์— ๋Œ€ํ•ด ๋ชจ๋‹ˆํ„ฐ๋ง์„ ์„ ํƒ ํ•ด์ œํ•˜๋ ค๋ฉด ์‚ฌ์šฉ ์„ค์ •๋œ ๋ชจ๋‹ˆํ„ฐ๋ง์„ ํ•ด์ œํ•ฉ๋‹ˆ๋‹ค.

REST

ํ•ญ๋ชฉ ์œ ํ˜•์„ ์—…๋ฐ์ดํŠธํ•˜๋ ค๋ฉด entityTypes.patch ๋ฉ”์„œ๋“œ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ PATCH ์š”์ฒญ์„ ์ „์†กํ•ฉ๋‹ˆ๋‹ค.

์š”์ฒญ ๋ฐ์ดํ„ฐ๋ฅผ ์‚ฌ์šฉํ•˜๊ธฐ ์ „์— ๋‹ค์Œ์„ ๋ฐ”๊ฟ‰๋‹ˆ๋‹ค.

  • LOCATION_ID: ํ”ผ์ฒ˜์Šคํ† ์–ด๊ฐ€ ์žˆ๋Š” ๋ฆฌ์ „์ž…๋‹ˆ๋‹ค(์˜ˆ: us-central1).
  • PROJECT_ID: ํ”„๋กœ์ ํŠธ ID
  • FEATURESTORE_ID: ํ”ผ์ฒ˜์Šคํ† ์–ด์˜ ID
  • ENTITY_TYPE_ID: ํ•ญ๋ชฉ ์œ ํ˜•์˜ ID
  • DURATION_IN_DAYS: ์Šค๋ƒ…์ƒท ์‚ฌ์ด์˜ ๊ฐ„๊ฒฉ(์ผ)
  • STALENESS_DAYS: ์Šค๋ƒ…์ƒท ์ƒ์„ฑ ์‹œ ํ™•์ธํ•  ์ผ์ˆ˜
  • NUMERICAL_THRESHOLD_VALUE: ์ด ํ•ญ๋ชฉ ์œ ํ˜•์˜ ์ˆซ์ž ํŠน์„ฑ์—์„œ ์ด์ƒ์„ ๊ฐ์ง€ํ•˜๋Š” ๊ธฐ์ค€์ . ํ†ต๊ณ„ ํŽธ์ฐจ๋Š” Jenson-Shannon ๋ถˆ์ผ์น˜๋กœ ๊ณ„์‚ฐํ•ฉ๋‹ˆ๋‹ค.
  • CATEGORICAL_THRESHOLD_VALUE: ์ด ํ•ญ๋ชฉ ์œ ํ˜•์˜ ๋ฒ”์ฃผํ˜• ํŠน์„ฑ์—์„œ ์ด์ƒ์„ ๊ฐ์ง€ํ•˜๊ธฐ ์œ„ํ•œ ๊ธฐ์ค€์ ์ž…๋‹ˆ๋‹ค. ํ†ต๊ณ„ ํŽธ์ฐจ๋Š” L ๋ฌดํ•œ๋Œ€ ๊ฑฐ๋ฆฌ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๊ณ„์‚ฐํ•ฉ๋‹ˆ๋‹ค.
  • IMPORT_FEATURE_ANALYSIS_STATE: ๊ฐ€์ ธ์˜ค๊ธฐ ํŠน์„ฑ ๋ถ„์„์„ ์‚ฌ์šฉ ์„ค์ •ํ• ์ง€ ์—ฌ๋ถ€๋ฅผ ๋‚˜ํƒ€๋‚ด๋Š” ์ƒํƒœ์ž…๋‹ˆ๋‹ค.
  • IMPORT_FEATURE_ANALYSIS_BASELINE: ???๋ฅผ ๋‚˜ํƒ€๋‚ด๋Š” ๊ธฐ์ค€์ž…๋‹ˆ๋‹ค.

HTTP ๋ฉ”์„œ๋“œ ๋ฐ URL:

PATCH https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/featurestores/FEATURESTORE_ID/entityTypes/ENTITY_TYPE_ID

JSON ์š”์ฒญ ๋ณธ๋ฌธ:

{
  "monitoringConfig": {
    "snapshotAnalysis": {
      "monitoringIntervalDays": "DURATION_IN_DAYS",
      "stalenessDays": "STALENESS_DAYS"
    }
  },
  "numericalThresholdConfig": {
    "value": "NUMERICAL_THRESHOLD_VALUE"
  },
  "categoricalThresholdConfig": {
    "value": "CATEGORICAL_THRESHOLD_VALUE"
  },
  "importFeatureAnalysis": {
    "state": "IMPORT_FEATURE_ANALYSIS_STATE",
    "anomalyDetectionBaseline": "IMPORT_FEATURE_ANALYSIS_BASELINE"
  }
}

์š”์ฒญ์„ ๋ณด๋‚ด๋ ค๋ฉด ๋‹ค์Œ ์˜ต์…˜ ์ค‘ ํ•˜๋‚˜๋ฅผ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.

curl

์š”์ฒญ ๋ณธ๋ฌธ์„ request.json ํŒŒ์ผ์— ์ €์žฅํ•˜๊ณ  ๋‹ค์Œ ๋ช…๋ น์–ด๋ฅผ ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค.

curl -X PATCH \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/featurestores/FEATURESTORE_ID/entityTypes/ENTITY_TYPE_ID"

PowerShell

์š”์ฒญ ๋ณธ๋ฌธ์„ request.json ํŒŒ์ผ์— ์ €์žฅํ•˜๊ณ  ๋‹ค์Œ ๋ช…๋ น์–ด๋ฅผ ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค.

$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest `
-Method PATCH `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/featurestores/FEATURESTORE_ID/entityTypes/ENTITY_TYPE_ID" | Select-Object -Expand Content

๋‹ค์Œ๊ณผ ๋น„์Šทํ•œ JSON ์‘๋‹ต์ด ํ‘œ์‹œ๋ฉ๋‹ˆ๋‹ค.

{
  "name": "projects/PROJECT_NUMBER/locations/LOCATION_ID/featurestores/FEATURESTORE_ID/entityTypes/ENTITY_TYPE_ID",
  "createTime": "2021-07-22T23:18:31.339972Z",
  "updateTime": "2021-07-29T22:24:40.221821Z",
  "etag": "AMEw9yPGDpwUwHx39gIDIg5mTQz65GMhnYHRzRslVPonm1g8xTnsTC5YUibmWo2MIuI=",
  "monitoringConfig": {
    "snapshotAnalysis": {
      "monitoringIntervalDays": "DURATION_IN_DAYS",
      "stalenessDays": "STALENESS_DAYS"
    }
  },
  "numericalThresholdConfig": {
    "value": "NUMERICAL_THRESHOLD_VALUE"
  },
  "categoricalThresholdConfig": {
    "value": "CATEGORICAL_THRESHOLD_VALUE"
  },
  "importFeatureAnalysis": {
    "state": "IMPORT_FEATURE_ANALYSIS_STATE",
    "anomalyDetectionBaseline": "IMPORT_FEATURE_ANALYSIS_BASELINE"
  }
}

Java

์ด ์ƒ˜ํ”Œ์„ ์‚ฌ์šฉํ•ด ๋ณด๊ธฐ ์ „์— Vertex AI ๋น ๋ฅธ ์‹œ์ž‘: ํด๋ผ์ด์–ธํŠธ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์‚ฌ์šฉ์˜ Java ์„ค์ • ์•ˆ๋‚ด๋ฅผ ๋”ฐ๋ฅด์„ธ์š”. ์ž์„ธํ•œ ๋‚ด์šฉ์€ Vertex AI Java API ์ฐธ๊ณ  ๋ฌธ์„œ๋ฅผ ์ฐธ์กฐํ•˜์„ธ์š”.

Vertex AI์— ์ธ์ฆํ•˜๋ ค๋ฉด ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๊ธฐ๋ณธ ์‚ฌ์šฉ์ž ์ธ์ฆ ์ •๋ณด๋ฅผ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค. ์ž์„ธํ•œ ๋‚ด์šฉ์€ ๋กœ์ปฌ ๊ฐœ๋ฐœ ํ™˜๊ฒฝ์˜ ์ธ์ฆ ์„ค์ •์„ ์ฐธ์กฐํ•˜์„ธ์š”.


import com.google.cloud.aiplatform.v1.EntityType;
import com.google.cloud.aiplatform.v1.EntityTypeName;
import com.google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig;
import com.google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig.SnapshotAnalysis;
import com.google.cloud.aiplatform.v1.FeaturestoreServiceClient;
import com.google.cloud.aiplatform.v1.FeaturestoreServiceSettings;
import com.google.cloud.aiplatform.v1.UpdateEntityTypeRequest;
import java.io.IOException;

public class UpdateEntityTypeMonitoringSample {

  public static void main(String[] args) throws IOException {
    // TODO(developer): Replace these variables before running the sample.
    String project = "YOUR_PROJECT_ID";
    String featurestoreId = "YOUR_FEATURESTORE_ID";
    String entityTypeId = "YOUR_ENTITY_TYPE_ID";
    int monitoringIntervalDays = 1;
    String location = "us-central1";
    String endpoint = "us-central1-aiplatform.googleapis.com:443";
    updateEntityTypeMonitoringSample(
        project, featurestoreId, entityTypeId, monitoringIntervalDays, location, endpoint);
  }

  static void updateEntityTypeMonitoringSample(
      String project,
      String featurestoreId,
      String entityTypeId,
      int monitoringIntervalDays,
      String location,
      String endpoint)
      throws IOException {

    FeaturestoreServiceSettings featurestoreServiceSettings =
        FeaturestoreServiceSettings.newBuilder().setEndpoint(endpoint).build();

    // Initialize client that will be used to send requests. This client only needs to be created
    // once, and can be reused for multiple requests. After completing all of your requests, call
    // the "close" method on the client to safely clean up any remaining background resources.
    try (FeaturestoreServiceClient featurestoreServiceClient =
        FeaturestoreServiceClient.create(featurestoreServiceSettings)) {
      FeaturestoreMonitoringConfig featurestoreMonitoringConfig =
          FeaturestoreMonitoringConfig.newBuilder()
              .setSnapshotAnalysis(
                  SnapshotAnalysis.newBuilder().setMonitoringIntervalDays(monitoringIntervalDays))
              .build();
      EntityType entityType =
          EntityType.newBuilder()
              .setName(
                  EntityTypeName.of(project, location, featurestoreId, entityTypeId).toString())
              .setMonitoringConfig(featurestoreMonitoringConfig)
              .build();

      UpdateEntityTypeRequest updateEntityTypeRequest =
          UpdateEntityTypeRequest.newBuilder().setEntityType(entityType).build();
      EntityType entityTypeResponse =
          featurestoreServiceClient.updateEntityType(updateEntityTypeRequest);
      System.out.println("Update Entity Type Monitoring Response");
      System.out.println(entityTypeResponse);
    }
  }
}

Node.js

์ด ์ƒ˜ํ”Œ์„ ์‚ฌ์šฉํ•ด ๋ณด๊ธฐ ์ „์— Vertex AI ๋น ๋ฅธ ์‹œ์ž‘: ํด๋ผ์ด์–ธํŠธ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์‚ฌ์šฉ์˜ Node.js ์„ค์ • ์•ˆ๋‚ด๋ฅผ ๋”ฐ๋ฅด์„ธ์š”. ์ž์„ธํ•œ ๋‚ด์šฉ์€ Vertex AI Node.js API ์ฐธ๊ณ  ๋ฌธ์„œ๋ฅผ ์ฐธ์กฐํ•˜์„ธ์š”.

Vertex AI์— ์ธ์ฆํ•˜๋ ค๋ฉด ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๊ธฐ๋ณธ ์‚ฌ์šฉ์ž ์ธ์ฆ ์ •๋ณด๋ฅผ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค. ์ž์„ธํ•œ ๋‚ด์šฉ์€ ๋กœ์ปฌ ๊ฐœ๋ฐœ ํ™˜๊ฒฝ์˜ ์ธ์ฆ ์„ค์ •์„ ์ฐธ์กฐํ•˜์„ธ์š”.

/**
 * TODO(developer): Uncomment these variables before running the sample.\
 * (Not necessary if passing values as arguments)
 */

// const project = 'YOUR_PROJECT_ID';
// const featurestoreId = 'YOUR_FEATURESTORE_ID';
// const entityTypeId = 'YOUR_ENTITY_TYPE_ID';
// const duration = <MONITORING_INTERVAL_IN_SECONDS>;
// const location = 'YOUR_PROJECT_LOCATION';
// const apiEndpoint = 'YOUR_API_ENDPOINT';
// const timeout = <TIMEOUT_IN_MILLI_SECONDS>;

// Imports the Google Cloud Featurestore Service Client library
const {FeaturestoreServiceClient} =
  require('@google-cloud/aiplatform').v1beta1;

// Specifies the location of the api endpoint
const clientOptions = {
  apiEndpoint: apiEndpoint,
};

// Instantiates a client
const featurestoreServiceClient = new FeaturestoreServiceClient(
  clientOptions
);

async function updateEntityTypeMonitoring() {
  // Configure the name resource
  const name = `projects/${project}/locations/${location}/featurestores/${featurestoreId}/entityTypes/${entityTypeId}`;

  // Constructing the monitoring configuration
  const monitoringConfig = {
    snapshotAnalysis: {
      monitoringInterval: {
        seconds: Number(duration),
      },
    },
  };

  // Constructing the entityType
  const entityType = {
    name: name,
    monitoringConfig: monitoringConfig,
  };

  const request = {
    entityType: entityType,
  };

  // Update EntityType request
  const [response] = await featurestoreServiceClient.updateEntityType(
    request,
    {timeout: Number(timeout)}
  );

  console.log('Update entity type monitoring response');
  console.log(`Name : ${response.name}`);
  console.log('Raw response:');
  console.log(JSON.stringify(response, null, 2));
}
updateEntityTypeMonitoring();

ํŠน์„ฑ ๋ชจ๋‹ˆํ„ฐ๋ง ์‚ฌ์šฉ ์ค‘์ง€

๋‹ค์Œ ์˜ˆ์‹œ๋Š” ๊ธฐ์กด ํŠน์„ฑ์— ๋Œ€ํ•ด ๋ชจ๋‹ˆํ„ฐ๋ง์„ ํ•ด์ œํ•ฉ๋‹ˆ๋‹ค.

REST

ํŠน์„ฑ์„ ์—…๋ฐ์ดํŠธํ•˜๋ ค๋ฉด features.patch ๋ฉ”์„œ๋“œ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ PATCH ์š”์ฒญ์„ ์ „์†กํ•ฉ๋‹ˆ๋‹ค.

์š”์ฒญ ๋ฐ์ดํ„ฐ๋ฅผ ์‚ฌ์šฉํ•˜๊ธฐ ์ „์— ๋‹ค์Œ์„ ๋ฐ”๊ฟ‰๋‹ˆ๋‹ค.

  • LOCATION_ID: ํ”ผ์ฒ˜์Šคํ† ์–ด๊ฐ€ ์žˆ๋Š” ๋ฆฌ์ „(์˜ˆ: us-central1)
  • PROJECT_ID: ํ”„๋กœ์ ํŠธ ID
  • FEATURESTORE_ID: ํ”ผ์ฒ˜์Šคํ† ์–ด์˜ ID
  • ENTITY_TYPE_ID: ํ•ญ๋ชฉ ์œ ํ˜•์˜ ID
  • FEATURE_ID: ์—…๋ฐ์ดํŠธํ•  ํŠน์„ฑ์˜ ID
  • DISABLE_MONITORING: ๋ชจ๋‹ˆํ„ฐ๋ง์„ ๋ช…์‹œ์ ์œผ๋กœ ์„ ํƒ ํ•ด์ œํ•˜๋ ค๋ฉด true๋กœ ์„ค์ •

HTTP ๋ฉ”์„œ๋“œ ๋ฐ URL:

PATCH https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/featurestores/FEATURESTORE_ID/entityTypes/ENTITY_TYPE_ID/features/FEATURE_ID

JSON ์š”์ฒญ ๋ณธ๋ฌธ:

{
  "disableMonitoring": "DISABLE_MONITORING"
}

์š”์ฒญ์„ ๋ณด๋‚ด๋ ค๋ฉด ๋‹ค์Œ ์˜ต์…˜ ์ค‘ ํ•˜๋‚˜๋ฅผ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.

curl

์š”์ฒญ ๋ณธ๋ฌธ์„ request.json ํŒŒ์ผ์— ์ €์žฅํ•˜๊ณ  ๋‹ค์Œ ๋ช…๋ น์–ด๋ฅผ ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค.

curl -X PATCH \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/featurestores/FEATURESTORE_ID/entityTypes/ENTITY_TYPE_ID/features/FEATURE_ID"

PowerShell

์š”์ฒญ ๋ณธ๋ฌธ์„ request.json ํŒŒ์ผ์— ์ €์žฅํ•˜๊ณ  ๋‹ค์Œ ๋ช…๋ น์–ด๋ฅผ ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค.

$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest `
-Method PATCH `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/featurestores/FEATURESTORE_ID/entityTypes/ENTITY_TYPE_ID/features/FEATURE_ID" | Select-Object -Expand Content

๋‹ค์Œ๊ณผ ๋น„์Šทํ•œ JSON ์‘๋‹ต์ด ํ‘œ์‹œ๋ฉ๋‹ˆ๋‹ค.

{
  "name": "projects/PROJECT_NUMBER/locations/LOCATION_ID/featurestores/FEATURESTORE_ID/entityTypes/ENTITY_TYPE_ID/features/FEATURE_ID",
  "valueType": "FEATURE_VALUE_TYPE",
  "createTime": "2021-07-22T23:18:31.339972Z",
  "updateTime": "2021-07-29T22:24:40.221821Z",
  "etag": "AMEw9yPGDpwUwHx39gIDIg5mTQz65GMhnYHRzRslVPonm1g8xTnsTC5YUibmWo2MIuI=",
  "disableMonitoring": "DISABLE_MONITORING"
}

ํŠน์„ฑ ๊ฐ’ ๋ถ„ํฌ ๋ณด๊ธฐ

Google Cloud ์ฝ˜์†”์„ ์‚ฌ์šฉํ•˜์—ฌ ์‹œ๊ฐ„ ๊ฒฝ๊ณผ์— ๋”ฐ๋ฅธ ํŠน์„ฑ ๊ฐ’์˜ ๋ถ„ํฌ๋ฅผ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค.

์›น UI

  1. Google Cloud ์ฝ˜์†”์˜ Vertex AI ์„น์…˜์—์„œ ํŠน์„ฑ ํŽ˜์ด์ง€๋กœ ์ด๋™ํ•ฉ๋‹ˆ๋‹ค.

    ํŠน์„ฑ ํŽ˜์ด์ง€๋กœ ์ด๋™

  2. ๋ฆฌ์ „ ๋“œ๋กญ๋‹ค์šด ๋ชฉ๋ก์—์„œ ๋ฆฌ์ „์„ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.

  3. ํ•ญ๋ชฉ ์œ ํ˜•์˜ ๋ชจ๋“  ํŠน์„ฑ์— ๋Œ€ํ•ด ํŠน์„ฑ ๊ฐ’ ๋ถ„ํฌ๋ฅผ ๋ณด๋ ค๋ฉด ํ•ญ๋ชฉ ์œ ํ˜• ์—ด์—์„œ ํ•ญ๋ชฉ ์œ ํ˜•์„ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.

  4. ํŠน์„ฑ์˜ ํŠน์„ฑ ๊ฐ’ ๋ถ„ํฌ ์ธก์ •ํ•ญ๋ชฉ์„ ๋ณด๋ ค๋ฉด ๋‹ค์Œ ์•ˆ๋‚ด๋ฅผ ๋”ฐ๋ฅด์„ธ์š”.

    1. ํŠน์„ฑ ์—ด์—์„œ ํŠน์„ฑ์„ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.

    2. ์ธก์ •ํ•ญ๋ชฉ ํƒญ์„ ํด๋ฆญํ•˜์—ฌ ํŠน์„ฑ ๊ฐ’ ๋ถ„ํฌ ์ธก์ •ํ•ญ๋ชฉ์„ ์—ด๋žŒํ•ฉ๋‹ˆ๋‹ค.

ํŠน์„ฑ ๊ฐ’ ์ด์ƒ ๋ณด๊ธฐ

ํŠน์„ฑ ๊ฐ’ ๋ถ„ํฌ๊ฐ€ ๋ชจ๋‹ˆํ„ฐ๋ง ํŒŒ์ดํ”„๋ผ์ธ์—์„œ ์ง€์ •๋œ ๊ธฐ์ค€์ ์„ ์ดˆ๊ณผํ•˜๋ฉด ํŽธ์ฐจ๋กœ ๊ฐ„์ฃผ๋ฉ๋‹ˆ๋‹ค. ์ด์ƒ์น˜์—๋Š” ํ•™์Šต-์„œ๋น™ ํŽธํ–ฅ ๋ฐ ๋“œ๋ฆฌํ”„ํŠธ์˜ ๋‘ ๊ฐ€์ง€ ์œ ํ˜•์ด ์žˆ์Šต๋‹ˆ๋‹ค. ํŽธ์ฐจ๋ฅผ ๊ณ„์‚ฐํ•˜๊ธฐ ์œ„ํ•ด Vertex AI๋Š” ํ”„๋กœ๋•์…˜์˜ ์ตœ์‹  ํŠน์„ฑ ๊ฐ’์„ ๊ธฐ์ค€๊ฐ’๊ณผ ๋น„๊ตํ•ฉ๋‹ˆ๋‹ค.

  • ํ•™์Šต-์„œ๋น™ ํŽธํ–ฅ์„ ๊ฐ์ง€ํ•˜๊ธฐ ์œ„ํ•ด Vertex AI๋Š” ํ”„๋กœ๋•์…˜์—์„œ ์ตœ์‹  ํŠน์„ฑ ๊ฐ’์„ ํ•™์Šต ๋ฐ์ดํ„ฐ์— ์žˆ๋Š” ํŠน์„ฑ ๊ฐ’์˜ ํ†ต๊ณ„ ๋ถ„ํฌ์™€ ๋น„๊ตํ•ฉ๋‹ˆ๋‹ค. ์—ฌ๊ธฐ์—์„œ๋Š” ํ•™์Šต ๋ฐ์ดํ„ฐ์—์„œ ํŠน์„ฑ ๊ฐ’์˜ ํ†ต๊ณ„ ๋ถ„ํฌ๊ฐ€ ๊ธฐ์ค€ ๋ถ„ํฌ๋กœ ๊ณ ๋ ค๋ฉ๋‹ˆ๋‹ค. ํ•™์Šต-์„œ๋น™ ํŽธํ–ฅ์— ๋Œ€ํ•ด ์ž์„ธํžˆ ์•Œ์•„๋ณด์„ธ์š”.

  • ๋“œ๋ฆฌํ”„ํŠธ๋ฅผ ๊ฐ์ง€ํ•˜๊ธฐ ์œ„ํ•ด Vertex AI๋Š” ํ”„๋กœ๋•์…˜์˜ ์ตœ์‹  ํŠน์„ฑ ๊ฐ’์„ ์ตœ์†Œ 1์‹œ๊ฐ„ ์ „์— ๋ฐœ์ƒํ•œ ์ตœ๊ทผ์˜ ๋ชจ๋‹ˆํ„ฐ๋ง ์‹คํ–‰์œผ๋กœ๋ถ€ํ„ฐ ์–ป์€ ํŠน์„ฑ ๊ฐ’์˜ ํ†ต๊ณ„ ๋ถ„ํฌ์™€ ๋น„๊ตํ•ฉ๋‹ˆ๋‹ค. ์—ฌ๊ธฐ์—์„œ ์ตœ๊ทผ ๋ชจ๋‹ˆํ„ฐ๋ง ์‹คํ–‰์œผ๋กœ๋ถ€ํ„ฐ ์–ป์€ ํŠน์„ฑ ๊ฐ’์˜ ํ†ต๊ณ„ ๋ถ„ํฌ๊ฐ€ ๊ธฐ์ค€ ๋ถ„ํฌ๋กœ ๊ณ ๋ ค๋ฉ๋‹ˆ๋‹ค. ๋“œ๋ฆฌํ”„ํŠธ์— ๋Œ€ํ•ด ์ž์„ธํžˆ ์•Œ์•„๋ณด์„ธ์š”.

๋‘ ๊ฒฝ์šฐ ๋ชจ๋‘ ๊ธฐ์ค€ ๋ถ„ํฌ๋ฅผ ํ”„๋กœ๋•์…˜์˜ ์ตœ๊ทผ ํŠน์„ฑ ๊ฐ’๊ณผ ๋น„๊ตํ•ด์„œ ์ฐจ์ด ์ ์ˆ˜๋ฅผ ๊ณ„์‚ฐํ•ฉ๋‹ˆ๋‹ค.

  • ๋ฒ”์ฃผํ˜• ํŠน์„ฑ์˜ ๊ฒฝ์šฐ L-๋ฌดํ•œ ๊ฑฐ๋ฆฌ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๊ฑฐ๋ฆฌ ์ ์ˆ˜๋ฅผ ๊ณ„์‚ฐํ•ฉ๋‹ˆ๋‹ค. ์ด ๊ฒฝ์šฐ ๊ฑฐ๋ฆฌ ์ ์ˆ˜๊ฐ€ ๋ฒ”์ฃผํ˜• ์•Œ๋ฆผ ๊ธฐ์ค€์  ํ•„๋“œ์— ์ง€์ •ํ•œ ๊ธฐ์ค€์ ์„ ์ดˆ๊ณผํ•˜๋ฉด ๋น„์ •์ƒ์œผ๋กœ ์‹๋ณ„๋ฉ๋‹ˆ๋‹ค.

  • ์ˆซ์ž ํŠน์„ฑ์˜ ๊ฒฝ์šฐ ๊ฑฐ๋ฆฌ ์ ์ˆ˜๋Š” Jensen-Shannon ๋ถ„์‚ฐ์„ ํ†ตํ•ด ๊ณ„์‚ฐ๋ฉ๋‹ˆ๋‹ค. ์ด ๊ฒฝ์šฐ ๊ฑฐ๋ฆฌ ์ ์ˆ˜๊ฐ€ ์ˆซ์ž ์•Œ๋ฆผ ๊ธฐ์ค€์  ํ•„๋“œ์— ์ง€์ •ํ•œ ๊ธฐ์ค€์ ๊ฐ’์„ ์ดˆ๊ณผํ•˜๋ฉด ์ด์ƒ์น˜๋กœ ์‹๋ณ„๋ฉ๋‹ˆ๋‹ค.

์–ด๋А ๊ฒฝ์šฐ๋“  ์ฐจ์ด ์ ์ˆ˜๋ฅผ ๊ณ„์‚ฐํ•˜๋Š” ๋ฐ ์‚ฌ์šฉ๋˜๋Š” ๊ธฐ์ค€ ๋ถ„ํฌ์— ๋”ฐ๋ผ ์ด์ƒ์น˜๊ฐ€ ํ•™์Šต-์„œ๋น™ ํŽธํ–ฅ ๋˜๋Š” ๋“œ๋ฆฌํ”„ํŠธ์ผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด์ƒ์น˜ ๋กœ๊ทธ๋Š” featurestore_log ๋กœ๊ทธ ์ด๋ฆ„์œผ๋กœ Cloud Logging์— ๊ธฐ๋ก๋ฉ๋‹ˆ๋‹ค. Pub/Sub์™€ ๊ฐ™์ด Cloud Logging์ด ์ง€์›ํ•˜๋Š” ๋ชจ๋“  ๋‹ค์šด์ŠคํŠธ๋ฆผ ์„œ๋น„์Šค์— ๋กœ๊ทธ๋ฅผ ๋™๊ธฐํ™”ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์•Œ๋ฆผ ๊ธฐ์ค€์  ์„ค์ •์— ๋Œ€ํ•œ ์ž์„ธํ•œ ๋‚ด์šฉ์€ ๋ชจ๋‹ˆํ„ฐ๋ง์ด ์‚ฌ์šฉ ์„ค์ •๋œ ํ•ญ๋ชฉ ์œ ํ˜• ๋งŒ๋“ค๊ธฐ๋ฅผ ์ฐธ์กฐํ•˜์„ธ์š”.

ํŠน์ • ํ”ผ์ฒ˜์Šคํ† ์–ด์—์„œ ์ƒ์„ฑ๋œ ๋ชจ๋“  ์ด์ƒ์— ๋Œ€ํ•œ ์ฟผ๋ฆฌ ์˜ˆ์‹œ

logName="projects/model-monitoring-demo/logs/aiplatform.googleapis.com%2FFfeaturestore_log"
resource.labels.resource_container=<project_number>
resource.labels.featurestore_id=<featurestore_id>

์ด์ƒ ๋กœ๊ทธ ํ•ญ๋ชฉ์˜ ์˜ˆ์‹œ

{
  "insertId": "ktbx5jf7vdn7b",
  "jsonPayload": {
    "threshold": 0.001,
    "featureName": "projects/<project_number>/locations/us-central1/featurestores/<featurestore_id>/entityTypes/<entity_type_id>/features/<feature_id>",
    "deviation": 1,
    "@type": "type.googleapis.com/google.cloud.aiplatform.logging.FeatureAnomalyLogEntry",
    "objective": "Featurestore Monitoring Snapshot Drift Anomaly"
  },
  "resource": {
    "type": "aiplatform.googleapis.com/Featurestore",
    "labels": {
      "resource_container": "<project_number>",
      "location": "us-central1",
      "featurestore_id": "<featurestore_id>"
    }
  },
  "timestamp": "2022-02-06T00:54:06.455501Z",
  "severity": "WARNING",
  "logName": "projects/model-monitoring-demo/logs/aiplatform.googleapis.com%2Ffeaturestore_log",
  "receiveTimestamp": "2022-02-06T00:54:06.476107155Z"
}

์ŠคํŠธ๋ฆฌ๋ฐ ์ˆ˜์ง‘์— ๋Œ€ํ•œ ์˜คํ”„๋ผ์ธ ์Šคํ† ๋ฆฌ์ง€ ์“ฐ๊ธฐ ์˜ค๋ฅ˜ ๋ชจ๋‹ˆํ„ฐ๋ง

Google Cloud ์ฝ˜์†”์„ ์‚ฌ์šฉํ•ด์„œ ์ŠคํŠธ๋ฆฌ๋ฐ ์ˆ˜์ง‘ ์ค‘ ์˜คํ”„๋ผ์ธ ์Šคํ† ๋ฆฌ์ง€์— ๋Œ€ํ•œ ์“ฐ๊ธฐ ์˜ค๋ฅ˜๋ฅผ ๋ชจ๋‹ˆํ„ฐ๋งํ•ฉ๋‹ˆ๋‹ค.

์˜คํ”„๋ผ์ธ ์Šคํ† ๋ฆฌ์ง€๋กœ์˜ ์ŠคํŠธ๋ฆฌ๋ฐ ์ˆ˜์ง‘์— ๋Œ€ํ•œ ์ธก์ •ํ•ญ๋ชฉ ๋ณด๊ธฐ

์ธก์ •ํ•ญ๋ชฉ ํƒ์ƒ‰๊ธฐ์—์„œ Vertex AI Feature Store(๊ธฐ์กด)์˜ ์ŠคํŠธ๋ฆฌ๋ฐ ์“ฐ๊ธฐ์šฉ ์˜คํ”„๋ผ์ธ ์Šคํ† ๋ฆฌ์ง€ ์“ฐ๊ธฐ ์ธก์ •ํ•ญ๋ชฉ์„ ๋ชจ๋‹ˆํ„ฐ๋งํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์›น UI

  1. Google Cloud ์ฝ˜์†”์—์„œ ์ธก์ •ํ•ญ๋ชฉ ํƒ์ƒ‰๊ธฐ๋กœ ์ด๋™ํ•ฉ๋‹ˆ๋‹ค.

    ์ธก์ •ํ•ญ๋ชฉ ํƒ์ƒ‰๊ธฐ๋กœ ์ด๋™

  2. ์ฐจํŠธ์— ํ‘œ์‹œ๋  ๋ฐ์ดํ„ฐ๋ฅผ ์ง€์ •ํ•ฉ๋‹ˆ๋‹ค.

    • ๋ฆฌ์†Œ์Šค ๋ฐ ์ธก์ •ํ•ญ๋ชฉ: Vertex AI Feature Store > ์ŠคํŠธ๋ฆฌ๋ฐ ์“ฐ๊ธฐ์— ๋Œ€ํ•œ ์˜คํ”„๋ผ์ธ ์Šคํ† ๋ฆฌ์ง€ ์“ฐ๊ธฐ ์ธก์ •ํ•ญ๋ชฉ์„ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.

    • ํ•„ํ„ฐ: error_code๋ฅผ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.

  3. ์ ์šฉ์„ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค. ์ฐจํŠธ์—๋Š” ๋‹ค์–‘ํ•œ ์˜ค๋ฅ˜ ์ฝ”๋“œ์— ๋Œ€ํ•œ ์˜คํ”„๋ผ์ธ ์Šคํ† ๋ฆฌ์ง€ ์“ฐ๊ธฐ ์˜ค๋ฅ˜๊ฐ€ ํ‘œ์‹œ๋ฉ๋‹ˆ๋‹ค.

    ์ฐจํŠธ๋ฅผ ์ƒ์„ฑํ•œ ํ›„ ์ด๋ฅผ ์ปค์Šคํ…€ ๋Œ€์‹œ๋ณด๋“œ์— ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ž์„ธํ•œ ๋‚ด์šฉ์€ ํ–ฅํ›„ ์ฐธ์กฐ์šฉ์œผ๋กœ ์ฐจํŠธ ์ €์žฅ์„ ์ฐธ์กฐํ•˜์„ธ์š”.

Vertex AI Feature Store(๊ธฐ์กด) ๋กœ๊ทธ ๋ณด๊ธฐ

๋กœ๊ทธ ํƒ์ƒ‰๊ธฐ์—์„œ ์˜คํ”„๋ผ์ธ ์ €์žฅ์†Œ ์“ฐ๊ธฐ ์˜ค๋ฅ˜ ์ค‘์— ์ƒ์„ฑ๋œ ๋กœ๊ทธ๋ฅผ ํฌํ•จํ•˜์—ฌ ํ”ผ์ฒ˜์Šคํ† ์–ด์˜ ๋กœ๊ทธ ํ•ญ๋ชฉ์„ ๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์›น UI

  1. Google Cloud ์ฝ˜์†”์—์„œ ๋กœ๊ทธ ํƒ์ƒ‰๊ธฐ๋กœ ์ด๋™ํ•ฉ๋‹ˆ๋‹ค.

    ๋กœ๊ทธ ํƒ์ƒ‰๊ธฐ๋กœ ์ด๋™

  2. ์ฟผ๋ฆฌ ๋นŒ๋”์—์„œ ๋‹ค์Œ ์ฟผ๋ฆฌ ๋งค๊ฐœ๋ณ€์ˆ˜๋ฅผ ์ถ”๊ฐ€ํ•œ ํ›„ ์ฟผ๋ฆฌ ์‹คํ–‰์„ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.

    • ๋ฆฌ์†Œ์Šค: Vertex AI Feature Store๋ฅผ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.
    • ๋กœ๊ทธ ์ด๋ฆ„: Vertex AI API์—์„œ aiplatform.googlapis.com/featurestore_log๋ฅผ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.