CLI and SDK for the ML expert Platform Model Registry on NAVER Cloud Platform
Project description
ML expert Platform Model Registry CLI, SDK
개요
NAVER Cloud Platform의 ML expert Platform Model Registry 서비스를 이용하기 위한 CLI, SDK 패키지
설치하기
pip install ncloud-mlx[model-registry]
Quick Start
1. 환경변수 설정 (필수)
# 환경변수 설정
export MLX_ENDPOINT_URL="https://your-mlx-endpoint"
export MLX_APIKEY="your-api-key"
export MLX_PROJECT="your-project-name"
2. CLI 사용법
# 모델 생성
mlx model-registry create model {model_name}
# 버전 생성
mlx model-registry create version {model_name} {version}
# Model 업로드
mlx model-registry upload {model_name} {version} ./local_path
# Model 다운로드
mlx model-registry download {model_name} {version} ./output_path
3. SDK 사용법
from mlx.sdk.core import config
from mlx.sdk.model_registry import ModelRegistryAPI
from mlx.api.model_registry import ModelRequest, VersionRequest
import os
# 방법 1: 환경변수에서 직접 가져오기
mlxp_endpoint = os.getenv("MLX_ENDPOINT_URL")
mlxp_apikey = os.getenv("MLX_APIKEY")
mlxp_project = os.getenv("MLX_PROJECT")
# 방법 2: config 파일 사용 (환경변수가 설정되어 있으면 환경변수를 우선으로 사용)
# mlx 설치 필요 (pip install mlx)
# mlxp_endpoint = config.ConfigFile().endpoint_url
# mlxp_apikey = config.ConfigFile().apikey
# mlxp_project = config.ConfigFile().project
# 클라이언트 초기화
client = ModelRegistryAPI(mlxp_endpoint, mlxp_apikey)
# 모델 생성
model_request = ModelRequest(name="my_model")
model = client.model_api.create(mlxp_project, model_request)
# 버전 생성
version_request = VersionRequest(version="v1.0")
version = client.model_version_api.create(mlxp_project, "my_model", version_request)
# 파일 업로드
client.file_api.upload_sync(
project_name=mlxp_project,
model_name="my_model",
version_name="v1.0",
local_path="/path/to/local/files",
remote_path="/"
)
# 파일 다운로드
client.file_api.download_sync(
project_name=mlxp_project,
model_name="my_model",
version_name="v1.0",
remote_path="/",
local_path="/path/to/download"
)
실행
mlx-model-registry --help
$ mlx-model-registry --help
Usage: mlx-model-registry [OPTIONS] COMMAND [ARGS]...
╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --install-completion Install completion for the current shell. │
│ --show-completion Show completion for the current shell, to copy it or customize the installation. │
│ --help Show this message and exit. │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ──────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ create Model or version create │
│ delete Delete a model, version, file or directory on model service │
│ download Download a file or directory from model registry service │
│ get Print model or version's details │
│ public subcommand for public model │
│ update Update model or version on model registry service │
│ upload Upload file or directory to model registry service │
│ uri Print uri for MODEL_NAME and VERSION to access model registry │
│ verify Verify the local path's model file set with the model registry's file set │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ncloud_mlx_model_registry-0.1.0.tar.gz.
File metadata
- Download URL: ncloud_mlx_model_registry-0.1.0.tar.gz
- Upload date:
- Size: 74.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0eec7045006ac78f87b1e138c04112e31b10e11e8adc84355943c7eecb2e4868
|
|
| MD5 |
d771c0bcc560daf13602e04b9ebfa339
|
|
| BLAKE2b-256 |
e6e6103e4f5582cfa41bd0d355b57269fdbf879a97f3d15332a597bf909a0645
|
File details
Details for the file ncloud_mlx_model_registry-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ncloud_mlx_model_registry-0.1.0-py3-none-any.whl
- Upload date:
- Size: 156.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8a4da6204305156f6e7e62c003ac1e8b4c02525c6f1c6362d3ad68e861c71f3
|
|
| MD5 |
5b1b64d154138a07b8fa1009b47ad39c
|
|
| BLAKE2b-256 |
874598564ea93d05619abe498e9e95551ddef7b9eb4951f97b49a944d8736ea3
|