python - 错误:无法创建火车工作目录:catboost_info
问题描述
我一直在关注链接教程来构建 catboost 分类器模型:
https://www.analysisup.com/python-machine-learning/catboost-python-tutorial.html
代码运行良好,直到我尝试运行教程中的第 13 个命令:
model.grid_search(grid,train_dataset)
此时我收到以下错误:
CatBoostError: catboost/libs/train_lib/dir_helper.cpp:20: Can't create train working dir: catboost_info
解决方案
catboost_info
是 catboost 写入以跟踪日志的输出文件夹的名称(请参阅https://catboost.ai/docs/concepts/output-data.html)。
输出文件的目录在 train-dir (train_dir) 参数中指定。该参数的默认值为 catboost_info。
尝试更改您正在使用的环境以允许 catboost 写入catboost_info
文件夹,或指定写入输出文件的路径。
我在 Databricks 中工作时遇到了这个问题(使用 CatBoostClassifier),我将相同的代码复制到我的个人计算机上,它在本地工作,因为它能够catboost_info
在我的工作目录中写入文件夹。
多次运行模型后,您将收到
Custom logger is already specified. Specify more than one logger at same time is not thread safe.
这是由于写入此 catboost_info 文件夹的记录器信息,这只是一个警告,不会影响您的建模。
catboost_info 文件夹: 单击以查看输出文件夹内的内容
推荐阅读
- django - 在 Django 2 中验证动态创建的 ModelForm 字段
- git - GitKraken 打不开
- javascript - 尝试登录时出错
- html - Application for editing and rending HTML side by side?
- html - 表单提交按钮值有时未在 Chrome 中发布
- npm - npm / yarn install 期间的“链接依赖项”到底有什么作用?
- python-3.x - 在 Windows 10 上将 Python3 指定为 Atom
- javascript - 摩卡测试。超时 2000 毫秒
- mysql - 查找并删除 SQL 记录,如果它们发生在 8 小时内(最近的记录除外)
- c - char数组上的stdlib.h qsort()在c中崩溃