(with_metric_period, task_type)
| 3651 | ids=['with_metric_period=' + val for val in ['False', 'True']] |
| 3652 | ) |
| 3653 | def test_cv_overfitting_detector(with_metric_period, task_type): |
| 3654 | pool = Pool(TRAIN_FILE, column_description=CD_FILE) |
| 3655 | train_dir_prefix = test_output_path('') |
| 3656 | results = cv( |
| 3657 | pool, |
| 3658 | { |
| 3659 | "iterations": 20, |
| 3660 | "learning_rate": 0.03, |
| 3661 | "loss_function": "Logloss", |
| 3662 | "eval_metric": "AUC", |
| 3663 | "task_type": task_type, |
| 3664 | "gpu_ram_part": TEST_GPU_RAM_PART, |
| 3665 | "train_dir": os.path.join(train_dir_prefix, 'catboost_info'), |
| 3666 | }, |
| 3667 | metric_period=5 if with_metric_period else None, |
| 3668 | early_stopping_rounds=7, |
| 3669 | ) |
| 3670 | assert "train-Logloss-mean" in results |
| 3671 | |
| 3672 | prev_value = results["train-Logloss-mean"][0] |
| 3673 | for value in results["train-Logloss-mean"][1:-1]: |
| 3674 | assert value < prev_value |
| 3675 | prev_value = value |
| 3676 | return local_canonical_file(remove_time_from_json(os.path.join(train_dir_prefix, JSON_LOG_CV_PATH(0)))) |
| 3677 | |
| 3678 | |
| 3679 | @pytest.mark.parametrize('param_type', ['indices', 'strings']) |
nothing calls this directly
no test coverage detected