(task_type)
| 3534 | |
| 3535 | |
| 3536 | def test_cv_pairs_generated(task_type): |
| 3537 | pool = Pool(QUERYWISE_TRAIN_FILE, column_description=QUERYWISE_CD_FILE) |
| 3538 | train_dir_prefix = test_output_path('') |
| 3539 | results = cv( |
| 3540 | pool, |
| 3541 | { |
| 3542 | "iterations": 10, |
| 3543 | "learning_rate": 0.03, |
| 3544 | "random_seed": 8, |
| 3545 | "loss_function": "PairLogit", |
| 3546 | "task_type": task_type, |
| 3547 | "gpu_ram_part": TEST_GPU_RAM_PART, |
| 3548 | "train_dir": os.path.join(train_dir_prefix, 'catboost_info') |
| 3549 | }, |
| 3550 | ) |
| 3551 | assert "train-PairLogit-mean" in results |
| 3552 | |
| 3553 | prev_value = results["train-PairLogit-mean"][0] |
| 3554 | for value in results["train-PairLogit-mean"][1:]: |
| 3555 | assert value < prev_value |
| 3556 | prev_value = value |
| 3557 | return local_canonical_file(remove_time_from_json(os.path.join(train_dir_prefix, JSON_LOG_CV_PATH(0)))) |
| 3558 | |
| 3559 | |
| 3560 | def test_cv_custom_loss(task_type): |
nothing calls this directly
no test coverage detected