1b75347d3ccfe3b054c33807aaaa4299a3c02386,tests/spacy/test_spacy_model_export.py,,test_model_log_without_pyfunc_flavor,#,259

Before Change


    nlp = spacy.blank("en")

    // Add a component not compatible with pyfunc
    ner = nlp.create_pipe("ner")
    nlp.add_pipe(ner, last=True)

    // Ensure the pyfunc flavor is not present after logging and loading the model
    with mlflow.start_run():
        mlflow.spacy.log_model(spacy_model=nlp, artifact_path=artifact_path)

After Change


    nlp = spacy.blank("en")

    // Add a component not compatible with pyfunc
    if IS_SPACY_VERSION_NEWER_THAN_OR_EQUAL_TO_3_0_0:
        nlp.add_pipe("ner", last=True)
    else:
        ner = nlp.create_pipe("ner")
        nlp.add_pipe(ner, last=True)

    // Ensure the pyfunc flavor is not present after logging and loading the model
    with mlflow.start_run():
        mlflow.spacy.log_model(spacy_model=nlp, artifact_path=artifact_path)
        model_path = _download_artifact_from_uri(
            "runs:/{run_id}/{artifact_path}".format(
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: mlflow/mlflow
Commit Name: 1b75347d3ccfe3b054c33807aaaa4299a3c02386
Time: 2021-02-02
Author: hkawamura0130@gmail.com
File Name: tests/spacy/test_spacy_model_export.py
Class Name:
Method Name: test_model_log_without_pyfunc_flavor


Project Name: mlflow/mlflow
Commit Name: 1b75347d3ccfe3b054c33807aaaa4299a3c02386
Time: 2021-02-02
Author: hkawamura0130@gmail.com
File Name: examples/spacy/train.py
Class Name:
Method Name:


Project Name: mlflow/mlflow
Commit Name: 1b75347d3ccfe3b054c33807aaaa4299a3c02386
Time: 2021-02-02
Author: hkawamura0130@gmail.com
File Name: tests/spacy/test_spacy_model_export.py
Class Name:
Method Name: spacy_model_with_data