Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Model Evaluation] Fix NER predictor #3207

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: compute_metrics
display_name: Compute Metrics
description: Calculate model performance metrics, given ground truth and prediction data.

version: 0.0.30
version: 0.0.31
type: command
tags:
type: evaluation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: model_prediction
display_name: Model Prediction
description: Generate predictions on a given mlflow model for supported tasks.

version: 0.0.30
version: 0.0.31
type: command
tags:
type: evaluation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$schema: https://azuremlschemas.azureedge.net/latest/pipelineComponent.schema.json
name: model_evaluation_pipeline
version: 0.0.30
version: 0.0.31
type: pipeline
display_name: Model Evaluation Pipeline
description: Pipeline component for model evaluation for supported tasks. \
Expand Down Expand Up @@ -87,7 +87,7 @@ outputs:
jobs:
validation_trigger_model_evaluation:
type: command
component: azureml:validation_trigger_model_evaluation:0.0.30
component: azureml:validation_trigger_model_evaluation:0.0.31
compute: '${{parent.inputs.compute_name}}'
resources:
instance_type: '${{parent.inputs.instance_type}}'
Expand All @@ -111,7 +111,7 @@ jobs:

model_prediction:
type: command
component: azureml:model_prediction:0.0.30
component: azureml:model_prediction:0.0.31
compute: '${{parent.inputs.compute_name}}'
resources:
instance_type: '${{parent.inputs.instance_type}}'
Expand All @@ -128,7 +128,7 @@ jobs:

compute_metrics:
type: command
component: azureml:compute_metrics:0.0.30
component: azureml:compute_metrics:0.0.31
compute: '${{parent.inputs.compute_name}}'
resources:
instance_type: '${{parent.inputs.instance_type}}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: validation_trigger_model_evaluation
display_name: Validation Trigger Model Evaluation
description: Component for enabling validation of model evaluation pipeline.

version: 0.0.30
version: 0.0.31
type: command
tags:
type: evaluation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ def ner_predictor_for_transformers(X_test, params=None):
Returns:
_type_: _description_
"""
transformers_class._override_model_config(params)
try:
transformers_class._override_model_config(params)
except AttributeError:
logger.info(f"Using newer version of mlflow.transformers._TransformersWrapper\
model config override API")
transformers_class._merge_model_config_with_params(transformers_class.model_config, params)
from azureml.evaluate.mlflow.hftransformers._task_based_predictors import NERPredictor
predictor = NERPredictor(task_type="token-classification", model=transformers_class.pipeline.model,
tokenizer=transformers_class.pipeline.tokenizer,
Expand Down
Loading