truefoundry-ml-repos

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
Routing note: For ambiguous user intents, use the shared clarification templates in references/intent-clarification.md.
<objective>
路由说明:对于模糊的用户意图,请使用references/intent-clarification.md中的通用澄清模板。
<objective>

ML Repos

ML仓库

Browse TrueFoundry ML repositories and model registry. List ML repos, get repo details, and list models/artifacts within a repo.
浏览TrueFoundry ML仓库和模型注册中心。列出ML仓库、获取仓库详情、列出仓库内的模型/工件。

Scope

适用范围

Browse ML repositories, list models and artifacts, and retrieve FQNs for use with other skills (prompts, llm-deploy).
</objective> <instructions>
浏览ML仓库、列出模型和工件,并检索FQN供其他Skill(prompts、llm-deploy)使用。
</objective> <instructions>

Step 1: Preflight

步骤1:预检查

Run the
status
skill first to verify
TFY_BASE_URL
and
TFY_API_KEY
are set and valid.
When using direct API, set
TFY_API_SH
to the full path of this skill's
scripts/tfy-api.sh
. See
references/tfy-api-setup.md
for paths per agent.
首先运行
status
Skill验证
TFY_BASE_URL
TFY_API_KEY
已设置且有效。
使用直接API时,将
TFY_API_SH
设置为该Skill的
scripts/tfy-api.sh
的完整路径。各Agent的路径请参见
references/tfy-api-setup.md

Step 2: List ML Repos

步骤2:列出ML仓库

Via Tool Call

调用工具

tfy_ml_repos_list()
tfy_ml_repos_list()

Via Direct API

直接调用API

bash
TFY_API_SH=~/.claude/skills/truefoundry-ml-repos/scripts/tfy-api.sh
bash
TFY_API_SH=~/.claude/skills/truefoundry-ml-repos/scripts/tfy-api.sh

List all ML repos

列出所有ML仓库

$TFY_API_SH GET /api/ml/v1/ml-repos

Present results:
ML Repos:
NameIDFQN
my-modelsmlr-abcml-repo:my-models
experiment-1mlr-defml-repo:experiment-1
undefined
$TFY_API_SH GET /api/ml/v1/ml-repos

展示结果格式:
ML Repos:
NameIDFQN
my-modelsmlr-abcml-repo:my-models
experiment-1mlr-defml-repo:experiment-1
undefined

Step 3: Get ML Repo Details

步骤3:获取ML仓库详情

Via Tool Call

调用工具

tfy_ml_repos_get(id="REPO_ID")
tfy_ml_repos_get(id="REPO_ID")

Via Direct API

直接调用API

bash
undefined
bash
undefined

Get ML repo by ID

根据ID获取ML仓库信息

$TFY_API_SH GET /api/ml/v1/ml-repos/REPO_ID
undefined
$TFY_API_SH GET /api/ml/v1/ml-repos/REPO_ID
undefined

Step 4: List Models in a Repo

步骤4:列出仓库中的模型

Via Tool Call

调用工具

tfy_models_list(ml_repo_id="REPO_ID")
tfy_models_list(ml_repo_id="REPO_ID")

Via Direct API

直接调用API

bash
undefined
bash
undefined

List models (filter by ml_repo_id, name, or fqn)

列出模型(可按ml_repo_id、name或fqn过滤)

$TFY_API_SH GET "/api/ml/v1/models?ml_repo_id=REPO_ID"
$TFY_API_SH GET "/api/ml/v1/models?ml_repo_id=REPO_ID"

Search by name

按名称搜索

$TFY_API_SH GET "/api/ml/v1/models?name=my-model"
$TFY_API_SH GET "/api/ml/v1/models?name=my-model"

Search by FQN

按FQN搜索

$TFY_API_SH GET "/api/ml/v1/models?fqn=model:my-models:my-model"

Present results:
Models in "my-models":
NameIDFQNVersions
my-modelmdl-abcmodel:my-models:my-model3
classifiermdl-defmodel:my-models:classifier1

</instructions>

<success_criteria>
$TFY_API_SH GET "/api/ml/v1/models?fqn=model:my-models:my-model"

展示结果格式:
Models in "my-models":
NameIDFQNVersions
my-modelmdl-abcmodel:my-models:my-model3
classifiermdl-defmodel:my-models:classifier1

</instructions>

<success_criteria>

Success Criteria

成功标准

  • The user can list all ML repos and see them in a formatted table
  • The user can get details for a specific ML repo by ID
  • The user can list models within a repo, filtered by repo ID, name, or FQN
  • The agent has provided FQN values that can be used with other skills (prompts, llm-deploy)
</success_criteria>
<references>
  • 用户可以列出所有ML仓库并在格式化表格中查看
  • 用户可以通过ID获取特定ML仓库的详情
  • 用户可以列出仓库内的模型,支持按仓库ID、名称或FQN过滤
  • Agent已提供可用于其他Skill(prompts、llm-deploy)的FQN值
</success_criteria>
<references>

Composability

可组合性

  • Preflight: Use
    status
    skill to verify TFY_BASE_URL and TFY_API_KEY
  • Prompts: ML repo FQN is needed when creating prompts (
    prompts
    skill)
  • Fine-tuning: Fine-tuned model outputs are saved to ML repos
  • Deploy: Models from the registry can be deployed using
    llm-deploy
    skill
  • 预检查:使用
    status
    Skill验证TFY_BASE_URL和TFY_API_KEY
  • 提示词:创建提示词时需要ML仓库FQN(
    prompts
    Skill)
  • 微调:微调后的模型输出会保存到ML仓库
  • 部署:可以使用
    llm-deploy
    Skill部署注册中心的模型

API Endpoints

API端点

See
references/api-endpoints.md
for the full ML Repos and Models API reference.
</references> <troubleshooting>
完整的ML仓库和模型API参考请参见
references/api-endpoints.md
</references> <troubleshooting>

Error Handling

错误处理

ML Repo Not Found

ML仓库未找到

ML repo ID not found. List repos first to find the correct ID.
ML repo ID not found. List repos first to find the correct ID.

No Models in Repo

仓库中无模型

This ML repo has no models yet. Models appear after logging artifacts via the SDK or fine-tuning.
This ML repo has no models yet. Models appear after logging artifacts via the SDK or fine-tuning.

Permission Denied

权限被拒绝

Cannot access ML repos. Check your API key permissions.
Cannot access ML repos. Check your API key permissions.

Empty Response

空响应

No ML repos found. Create one via the TrueFoundry UI or SDK:
  import truefoundry as tfy
  client = tfy.TrueFoundryClient()
  client.create_ml_repo(name="my-repo")
</troubleshooting>
No ML repos found. Create one via the TrueFoundry UI or SDK:
  import truefoundry as tfy
  client = tfy.TrueFoundryClient()
  client.create_ml_repo(name="my-repo")
</troubleshooting>