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

Function test_coreml_import_export

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

Source from the content-addressed store, hash-verified

1507
1508
1509def test_coreml_import_export(task_type):
1510 train_pool = Pool(QUERYWISE_TRAIN_FILE, column_description=QUERYWISE_CD_FILE)
1511 test_pool = Pool(QUERYWISE_TEST_FILE, column_description=QUERYWISE_CD_FILE)
1512 model = CatBoost(params={'loss_function': 'RMSE', 'iterations': 20, 'thread_count': 8, 'task_type': task_type, 'gpu_ram_part': TEST_GPU_RAM_PART, 'devices': '0'})
1513 model.fit(train_pool)
1514 output_coreml_model_path = test_output_path(OUTPUT_COREML_MODEL_PATH)
1515 model.save_model(output_coreml_model_path, format="coreml")
1516 canon_pred = model.predict(test_pool)
1517 coreml_loaded_model = CatBoostRegressor()
1518 coreml_loaded_model.load_model(output_coreml_model_path, format="coreml")
1519 assert all(canon_pred == coreml_loaded_model.predict(test_pool))
1520 return compare_canonical_models(output_coreml_model_path)
1521
1522
1523def test_coreml_import_export_one_hot_features(task_type):

Callers

nothing calls this directly

Calls 11

fitMethod · 0.95
save_modelMethod · 0.95
predictMethod · 0.95
predictMethod · 0.95
PoolClass · 0.90
CatBoostClass · 0.90
CatBoostRegressorClass · 0.90
test_output_pathFunction · 0.85
compare_canonical_modelsFunction · 0.85
load_modelMethod · 0.80
allFunction · 0.50

Tested by

no test coverage detected