(task_type)
| 3510 | |
| 3511 | |
| 3512 | def test_cv_pairs(task_type): |
| 3513 | pool = Pool(QUERYWISE_TRAIN_FILE, column_description=QUERYWISE_CD_FILE, pairs=QUERYWISE_TRAIN_PAIRS_FILE) |
| 3514 | train_dir_prefix = test_output_path('') |
| 3515 | results = cv( |
| 3516 | pool, |
| 3517 | { |
| 3518 | "iterations": 20, |
| 3519 | "learning_rate": 0.03, |
| 3520 | "random_seed": 8, |
| 3521 | "loss_function": "PairLogit", |
| 3522 | "task_type": task_type, |
| 3523 | "gpu_ram_part": TEST_GPU_RAM_PART, |
| 3524 | "train_dir": os.path.join(train_dir_prefix, 'catboost_info') |
| 3525 | }, |
| 3526 | ) |
| 3527 | assert "train-PairLogit-mean" in results |
| 3528 | |
| 3529 | prev_value = results["train-PairLogit-mean"][0] |
| 3530 | for value in results["train-PairLogit-mean"][1:]: |
| 3531 | assert value < prev_value |
| 3532 | prev_value = value |
| 3533 | return local_canonical_file(remove_time_from_json(os.path.join(train_dir_prefix, JSON_LOG_CV_PATH(0)))) |
| 3534 | |
| 3535 | |
| 3536 | def test_cv_pairs_generated(task_type): |
nothing calls this directly
no test coverage detected