0

当我运行下面的 pycaret 代码时,我收到了错误消息。

FileNotFoundError: [Errno 2] No such file or directory: 'e:\\xxxx\\xxxx\\xxxx\\ray_results\\_Trainable_2022-01-13_01-32-13\\_Trainable_7d3cdd8a_1_X__id=ObjectRef_ffffffffffffffffffff_ffffffffffff_0000_000000-000000000000000 32-13\\events.out.tfevents.1642026733.xxxx'

在 ray_results 文件夹中创建了许多文件,但它不会创建events.out.tfevents.1642026733.xxxx文件,我找不到解决方案。我需要你的帮助。

from pycaret.datasets import get_data
boston = get_data('boston')
from pycaret.regression import *
from pycaret.distributions import UniformDistribution, CategoricalDistribution
logs_base_dir = "./ray_results/"
exp_name = setup(data = boston,  target = 'medv',silent=True,n_jobs =None)
catboost_model = create_model('catboost')
catboost_param_dists = {
    'iterations': CategoricalDistribution([500,100,300]),
    # 'reg_lambda': UniformDistribution(1, 100),
    # 'bagging_temperature': UniformDistribution(0, 100),
    'colsample_bylevel': UniformDistribution(0.5, 1.0),
    'random_strength': CategoricalDistribution([0,0.1,0.2,1,10]), # tune.uniform(0, 100),
    # 'learning_rate': UniformDistribution(1e-3, 1e-1),
    'max_depth' : CategoricalDistribution([5,6,7,8,9])
}
tuned_top1 = tune_model(catboost_model,
                        optimize="R2",
                        search_library="tune-sklearn",
                        search_algorithm="hyperopt",
                        choose_better = True ,
                        custom_grid = catboost_param_dists ,
                        early_stopping = "asha",
                        early_stopping_max_iters = 10,
                        return_tuner = False , 
                        n_iter=100,
                        local_dir=logs_base_dir
                        )
4

0 回答 0