(task_type, loss_function)
| 3491 | ids=['loss_function=' + val for val in ['QueryRMSE', 'YetiRank']] |
| 3492 | ) |
| 3493 | def test_cv_query(task_type, loss_function): |
| 3494 | pool = Pool(QUERYWISE_TRAIN_FILE, column_description=QUERYWISE_CD_FILE) |
| 3495 | train_dir_prefix = test_output_path('') |
| 3496 | |
| 3497 | computed_metric = { |
| 3498 | 'QueryRMSE': 'QueryRMSE', |
| 3499 | 'YetiRank': 'PFound' |
| 3500 | }[loss_function] |
| 3501 | |
| 3502 | results = cv( |
| 3503 | pool, |
| 3504 | {"iterations": 20, "learning_rate": 0.03, "loss_function": loss_function, "task_type": task_type, "gpu_ram_part": TEST_GPU_RAM_PART, |
| 3505 | "train_dir": os.path.join(train_dir_prefix, 'catboost_info')}, |
| 3506 | ) |
| 3507 | assert f"test-{computed_metric}-mean" in results |
| 3508 | |
| 3509 | return local_canonical_file(remove_time_from_json(os.path.join(train_dir_prefix, JSON_LOG_CV_PATH(0)))) |
| 3510 | |
| 3511 | |
| 3512 | def test_cv_pairs(task_type): |
nothing calls this directly
no test coverage detected