外观
MetaGPT
261字小于1分钟
2025-04-30
安装基础环境
conda create -n meta_test python=3.11
conda activate meta_test
git clone https://github.com/geekan/MetaGPT
cd MetaGPT
pip install --upgrade -e
metagpt --init-config
nano ~/.metagpt/config2.yaml配置文件
llm:
api_type: "openai"
model: "DeepSeek-R1"
base_url: "https://llmapi.paratera.com/v1"
api_key: "<api_key>"
temperature: 0.5Windows 报错
由于 Windows 的路径长度限制,安装可能会失败。
解决方法:
- 按下
Win + R,输入regedit,打开注册表编辑器 - 导航到
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem - 将
LongPathsEnabled的值设置为1
安装 SELA 和下载数据集
cd ./metagpt/ext/sela
pip install -r requirements.txt- 修改配置文件
data.yaml中的路径,并在sela目录创建datasets文件夹
datasets_dir: "datasets"- 注释掉
data/dataset.py中变量CUSTOM_DATASETS对应的("06_santander-customer-transaction-prediction", "target"),行,相关数据集缺失 - 自定义数据集无法下载,需要手动复制文件夹
04_titanic、05_house-prices-advanced-regression-techniques、07_icr-identify-age-related-conditions、concrete-strength、smoker-status、software-defects到datasets文件夹下 - 执行,会下载数据集并使用之前设置的大模型进行分析,可能会提示无法计算 token 但不影响运行
python data/dataset.py --save_analysis_pool