Communitygithub.com

Uni-Mol 工具 - 分子特性預測 CLI

基於 Uni-Mol Tools 的互動式命令列介面,用於分子特性預測模型的訓練與推論,支援 5 種任務類型。

Uni-Mol 工具 - 分子特性預測 CLI 是什麼?

此技能提供一個完整的互動式 CLI 工具,用於訓練和執行分子特性預測模型的推論,底層使用 Uni-Mol Tools 作為後端。它支援二元分類、回歸、多類別分類、多標籤分類與多標籤回歸等五種任務類型,並具備專案管理、模型追蹤、儲存空間分析與自動清理等功能。使用者可以透過 JSON 模式(`--json` 旗標)進行自動化整合,或啟動互動式 REPL 環境以獲得 tab 補全與指令歷史等進階體驗。該工具需要 Python 3.8+、PyTorch 1.12+ 與 Uni-Mol Tools 後端,並包含用於測試的範例資料集。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/HKUDS/CLI-Anything/tree/main/skills/cli-anything-unimol-tools

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

Uni-Mol 工具 - 分子特性預測 CLI 是做什麼的?

套件: cli-anything-unimol-tools 指令: python3 -m cli_anything.unimol_tools

說明

互動式 CLI,用於使用 Uni-Mol Tools 進行分子特性預測模型的訓練與推論。支援 5 種任務類型:二元分類、回歸、多類別分類、多標籤分類與多標籤回歸。

主要功能

  • 專案管理: 以命名專案組織實驗
  • 5 種任務類型: 分類、回歸、多類別、多標籤變體
  • 模型追蹤: 自動記錄效能歷史與排名
  • 智慧儲存: 分析使用狀況並清理表現不佳的模型
  • JSON API: 透過 --json 旗標支援完整自動化

常用指令

專案管理

# 建立新專案
project create --name drug_discovery

# 列出所有專案
project list

# 切換專案
project switch --name drug_discovery

訓練

# 訓練分類模型
train --data-path train.csv --target-col active --task-type classification --epochs 10

# 訓練回歸模型
train --data-path train.csv --target-col affinity --task-type regression --epochs 10

模型管理

# 列出所有已訓練模型
models list

# 顯示模型詳細資訊與效能
models show --model-id <id>

# 依效能排名模型
models rank

儲存與清理

# 分析儲存空間使用狀況
storage analyze

# 自動清理效能較差的模型
cleanup auto

# 手動清理(設定條件)
cleanup manual --max-models 10 --min-score 0.7

預測

# 使用已訓練模型進行預測
predict --model-id <id> --data-path test.csv

資料格式

CSV 檔案必須包含:

  • SMILES 欄位:以 SMILES 格式表示的分子結構
  • 目標欄位:要預測的值(透過 --target-col 指定名稱)

範例:

SMILES,target
CCO,1
CCCO,0
CC(C)O,1

任務類型

  1. classification: 二元分類 (0/1)
  2. regression: 連續值預測
  3. multiclass: 多類別分類
  4. multilabel_classification: 多個二元標籤
  5. multilabel_regression: 多個連續值

JSON 模式

在任何指令後加上 --json 旗標即可取得機器可讀的輸出:

python3 -m cli_anything.unimol_tools --json models list

輸出格式:

{
  "status": "success",
  "data": [...],
  "message": "..."
}

互動模式

不帶任何指令啟動,進入互動式 REPL:

python3 -m cli_anything.unimol_tools

功能:

  • Tab 補全
  • 指令歷史
  • 上下文相關說明
  • 專案狀態持續性

測試資料

範例資料集可在以下位置取得: https://github.com/545487677/CLI-Anything-unimol-tools/tree/main/unimol_tools/examples

包含所有 5 種任務類型的資料。

系統需求

  • Python 3.8+
  • PyTorch 1.12+
  • Uni-Mol Tools 後端
  • 4GB+ RAM(訓練建議 8GB+)

安裝

cd unimol_tools/agent-harness
pip install -e .

文件

測試

cd docs/test
bash run_tests.sh --unit -v    # 單元測試 (67 個測試)
bash run_tests.sh --full -v    # 完整測試套件

效能建議

  • 初始實驗從 10 個 epoch 開始
  • 若記憶體不足,使用較小的批次大小
  • 使用 storage analyze 監控儲存空間
  • 使用 models rank 找出最佳模型
  • 定期使用 cleanup auto 進行清理

疑難排解

  • CUDA 錯誤: 縮小批次大小或改用 CPU 模式
  • CSV 無法識別: 確認存在 SMILES 欄位
  • 準確率低: 嘗試增加 epoch 或調整學習率
  • 儲存空間已滿: 執行 cleanup auto 釋放空間

相關資源

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

cli-anything-adguardhome

>-

cli-anything-anygen

>-

cli-anything-audacity

>-

cli-anything-blender

>-

cli-anything-browser

Browser automation CLI using DOMShell MCP server. Maps Chrome

cli-anything-calibre

>-

cli-anything-ccswitch

CLI interface for CC Switch — manage AI coding tool configurations from the terminal

cli-anything-chromadb

>-

cli-anything-cloudanalyzer

Command-line interface for CloudAnalyzer — Agent-friendly harness for CloudAnalyzer, a QA platform for mapping, localization, and perception outputs. Supports 27 commands across 8 groups: point cloud evaluation, trajectory evaluation, ground segmentation QA, config-driven quality gates, baseline evolution, processing, visualization, and interactive REPL.

cli-anything-cloudcompare

Command-line interface for CloudCompare — Agent-friendly harness for CloudCompare, the open-source 3D point cloud and mesh processing software. Supports 41 commands across 9 groups: project management, session control, point cloud operations (subsample, filter, segment, analyze), mesh operations, distance computation (C2C, C2M), transformations (ICP, matrix), export (LAS/LAZ/PLY/PCD/OBJ/STL/E57), and interactive REPL.

cli-anything-comfyui

>-

cli-anything-dify-workflow

Wrapper for the Dify workflow DSL CLI. Create, inspect, validate, edit, and export Dify workflow files through a CLI-Anything harness.

cli-anything-drawio

>-

cli-anything-eez-studio

Use EEZ Studio from the command line: inspect and modify native .eez-project files, edit LVGL screens/widgets, manage SCPI commands, and invoke the real EEZ Studio backend for LVGL builds.

cli-anything-eth2-quickstart

>-

cli-anything-exa

>-

cli-anything-firefly-iii

Firefly III CLI - Personal finance management via CLI-Anything

cli-anything-freecad

Complete CLI harness for FreeCAD parametric 3D CAD modeler (258 commands). Covers ALL workbenches: Part (29 primitives + boolean + mirror + loft + sweep), Sketcher (26 cmds: geometry + constraints + editing), PartDesign (38 cmds: pad/pocket/groove/fillet/chamfer/patterns/hole/datum), Assembly (11 cmds), Mesh (16 cmds), TechDraw (15 cmds: views + dimensions + PDF/SVG), Draft (33 cmds: 2D shapes + arrays + transforms), FEM (12 cmds), CAM/CNC (10 cmds), Surface (6 cmds), Spreadsheet (7 cmds), Import (13 formats), Export (17 formats), Measure (12 cmds), Materials (21 presets). Headless FreeCAD export to STEP/IGES/STL/OBJ/DXF/PDF/glTF/3MF.

cli-anything-gimp

>-

cli-anything-godot

>-

相關技能