MCPcopy Create free account
hub / github.com/catboost/catboost / test_cv_pairs_generated

Function test_cv_pairs_generated

catboost/python-package/ut/medium/test.py:3536–3557  ·  view source on GitHub ↗
(task_type)

Source from the content-addressed store, hash-verified

3534
3535
3536def 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
3560def test_cv_custom_loss(task_type):

Callers

nothing calls this directly

Calls 7

PoolClass · 0.90
cvFunction · 0.90
test_output_pathFunction · 0.85
remove_time_from_jsonFunction · 0.85
JSON_LOG_CV_PATHFunction · 0.85
local_canonical_fileFunction · 0.50
joinMethod · 0.45

Tested by

no test coverage detected