<jupyter_start><jupyter_text>mlconfig<jupyter_code>from mlrun import mlconf
import os

mlconf.dbpath = mlconf.dbpath or 'http://mlrun-api:8080'
artifact_path = mlconf.artifact_path or os.path.abspath('./')<jupyter_output><empty_output><jupyter_text>save<jupyter_code>from mlrun import code_to_function 
# create job function object from notebook code
fn = code_to_function("test_classifier", handler="test_classifier",
                      description="test a classifier using held-out or new data",
                      categories=["ml", "test"],
                      labels = {"author": "yjb", "framework": "sklearn"},
                      code_output='.')<jupyter_output><empty_output><jupyter_text>tests<jupyter_code>from mlutils import get_vol_mount
fn.apply(get_vol_mount())
task_params = {
    "name" : "tasks test classifier",
    "params": {
        "label_column"  : "labels"}}<jupyter_output><empty_output><jupyter_text>run locally<jupyter_code>TEST_REPO = "https://raw.githubusercontent.com/yjb-ds/testdata/master"
DATA_PATH  = "/User/ml2/test_set.parquet"
MODELS_PATH = "/User/artifacts/multi-models/sklearn.linear_model.LogisticRegression/model.pkl"
from mlrun import run_local, NewTask
m = 'store://default/sklearn_ensemble_AdaBoostClassifier_model#533c501fca484b3e8bf9fe8d7abbbdb5'


run = run_local(NewTask(**task_params),
                handler=test_classifier,
                inputs={"test_set":   f"{DATA_PATH}",
                        "models_path": m},
                artifact_path=artifact_path)<jupyter_output>[mlrun] 2020-06-05 23:36:35,094 starting run tasks test classifier uid=9958837817a048dea70fe0b6780484c2  -> http://10.199.227.162:8080
[mlrun] 2020-06-05 23:36:36,015 log artifact confusion-matrix at /User/ml2/test/plots/confusion-matrix.html, size: 20273, db: N
[mlrun] 2020-06-05 23:36:36,273 log artifact feature-importances at /User/ml2/test/plots/feature-importances.html, size: 11857, db: N
[mlrun] 2020-06-05 23:36:36,393 log artifact precision-recall-multiclass at /User/ml2/test/plots/precision-recall-multiclass.html, size: 55889, db: N
[mlrun] 2020-06-05 23:36:36,523 log artifact roc-multiclass at /User/ml2/test/plots/roc-multiclass.html, size: 34633, db: N
[mlrun] 2020-06-05 23:36:36,928 log artifact test_set_preds at /User/ml2/test/test_set_preds.parquet, size: 702584, db: Y
{'fraction_non_alphanumeric': 0.12724935732647816, 'fraction_numerical': 0.08226221079691516, 'mean_word_length': 4.306818181818182, 'pattern_counts': {'":': 5, '<': 16, '<?xml version=': 0, '>': 17, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '120832', 'license': 'Apache-2.0', 'n_tokens_mistral': 979, 'n_tokens_neox': 822, 'n_words': 145, 'path': 'test_classifier/test_classifier.ipynb', 'repo_name': 'adiso75/functions', 'size': '2334'}