cli-anything-unimol-tools
它能做什么
这个技能让 AI 智能体使用 Uni-Mol Tools,训练并使用预测分子性质的机器学习模型。适合从事分子研究的化学家和数据科学家。
适用场景
- ✓当你想用自己的数据文件训练一个预测化学性质的模型的时候。
- ✓当你需要比较不同训练模型的表现的时候。
- ✓当你想对新分子运行训练好的模型的时候。
技能链接
https://github.com/HKUDS/CLI-Anything/blob/main/skills/cli-anything-unimol-tools/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我用我的分子文件训练一个模型来预测活性,并看看哪个模型表现最好。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体通过命令行管理项目和训练任务,保存每个训练好的模型并跟踪其表现。它可以根据结果对模型进行排名。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Uni-Mol Tools - Molecular Property Prediction CLI
Package: cli-anything-unimol-tools
Command: python3 -m cli_anything.unimol_tools
Description
Interactive CLI for training and inference of molecular property prediction models using Uni-Mol Tools. Supports 5 task types: binary classification, regression, multiclass, multilabel classification, and multilabel regression.
Key Features
- Project Management: Organize experiments with named projects
- 5 Task Types: Classification, regression, multiclass, multilabel variants
- Model Tracking: Automatic performance history and rankings
- Smart Storage: Analyze usage and clean up underperformers
- JSON API: Full automation support with
--jsonflag
Common Commands
Project Management
# Create a new project
project create --name drug_discovery
# List all projects
project list
# Switch to a project
project switch --name drug_discovery
Training
# Train a classification model
train --data-path train.csv --target-col active --task-type classification --epochs 10
# Train a regression model
train --data-path train.csv --target-col affinity --task-type regression --epochs 10
Model Management
# List all trained models
models list
# Show model details and performance
models show --model-id <id>
# Rank models by performance
models rank
Storage & Cleanup
# Analyze storage usage
storage analyze
# Automatic cleanup of poor performers
cleanup auto
# Manual cleanup with criteria
cleanup manual --max-models 10 --min-score 0.7
Prediction
# Make predictions with a trained model
predict --model-id <id> --data-path test.csv
Data Format
CSV files must contain:
SMILEScolumn: Molecular structures in SMILES format- Target column(s): Values to predict (name specified via
--target-col)
Example:
SMILES,target
CCO,1
CCCO,0
CC(C)O,1
Task Types
- classification: Binary classification (0/1)
- regression: Continuous value prediction
- multiclass: Multiple class classification
- multilabel_classification: Multiple binary labels
- multilabel_regression: Multiple continuous values
JSON Mode
Add --json flag to any command for machine-readable output:
python3 -m cli_anything.unimol_tools --json models list
Output format:
{
"status": "success",
"data": [...],
"message": "..."
}
Interactive Mode
Launch without commands for interactive REPL:
python3 -m cli_anything.unimol_tools
Features:
- Tab completion
- Command history
- Contextual help
- Project state persistence
Test Data
Example datasets available at: https://github.com/545487677/CLI-Anything-unimol-tools/tree/main/unimol_tools/examples
Includes data for all 5 task types.
Requirements
- Python 3.8+
- PyTorch 1.12+
- Uni-Mol Tools backend
- 4GB+ RAM (8GB+ recommended for training)
Installation
cd unimol_tools/agent-harness
pip install -e .
Documentation
- SOP: UNIMOL_TOOLS.md
- Quick Start: docs/guides/02-QUICK-START.md
- Full Documentation: docs/README.md
Testing
cd docs/test
bash run_tests.sh --unit -v # Unit tests (67 tests)
bash run_tests.sh --full -v # Full test suite
Performance Tips
- Start with 10 epochs for initial experiments
- Use smaller batch sizes if memory is limited
- Monitor storage with
storage analyze - Use
models rankto identify best performers - Clean up regularly with
cleanup auto
Troubleshooting
- CUDA errors: Reduce batch size or use CPU mode
- CSV not recognized: Verify SMILES column exists
- Low accuracy: Try more epochs or adjust learning rate
- Storage full: Run
cleanup autoto free space
Related
- Uni-Mol Tools: https://github.com/dptech-corp/Uni-Mol/tree/main/unimol_tools
- Uni-Mol Paper: https://arxiv.org/abs/2209.11126
- CLI-Anything: https://github.com/HKUDS/CLI-Anything
常见问题
它支持哪些任务类型?
它支持五种任务类型,包括二分类、回归、多分类和多标签任务。
训练好的模型如何被跟踪?
该技能会记录每个模型的表现历史,可以对模型排名,也可以清理表现不佳的模型。
我的数据需要特殊格式吗?
示例使用 CSV 文件,并在训练命令中指定目标列的名称。
详情
作者的原始描述
Interactive CLI for Uni-Mol molecular property prediction training and inference workflows.
repo: HKUDS/CLI-Anything
热度
- GitHub 星标
- 58k
- 排名
- #3250
- 许可证
- Apache-2.0
- 更新时间
- 2026/9/21
评论
- …
同一仓库的更多技能
cli-anything-3mf
58k帮你的智能体检查和修复 3D 打印文件,包括查找圆孔、调整孔径、修复网格,以及比较两个文件。
cli-anything-qgis
58k帮你的智能体在终端中打开、编辑和导出 QGIS 地图项目,包括图层、要素、打印布局和处理工具。
cli-anything-adguardhome
58k帮你的智能体管理 AdGuard Home,这是一款全网络广告拦截器,可管理过滤规则、DNS 重写、客户端和查询日志。
cli-anything-anygen
58k帮你的智能体借助 AnyGen 服务,根据文字提示生成幻灯片、文档、网站和图表。