Skip to content

Commit

Permalink
✅ Upgrade signature format for mlflow==2.10 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Galileo-Galilei committed Jan 28, 2024
1 parent 4c07f1c commit e886799
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/framework/cli/test_cli_modelify.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,8 @@ def test_modelify_with_infer_signature_arg(
loaded_model = mlflow.pyfunc.load_model(f"runs:/{new_run_id}/model")

assert loaded_model.metadata.get_input_schema().to_dict() == [
{"name": "col_int", "type": "long"},
{"name": "col_str", "type": "string"},
{"name": "col_int", "type": "long", "required": True},
{"name": "col_str", "type": "string", "required": True},
]


Expand Down
4 changes: 2 additions & 2 deletions tests/framework/hooks/test_hook_pipeline_ml.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,14 +301,14 @@ def test_mlflow_hook_save_pipeline_ml(
assert (
(trained_model.metadata.signature.to_dict())
== {
"inputs": '[{"name": "a", "type": "long"}]',
"inputs": '[{"name": "a", "type": "long", "required": true}]',
"outputs": None,
"params": None,
}
) or (
(trained_model.metadata.signature.to_dict())
== {
"inputs": '[{"type": "long", "name": "a"}]',
"inputs": '[{"type": "long", "name": "a", "required": true}]',
"outputs": None,
"params": None,
}
Expand Down

0 comments on commit e886799

Please sign in to comment.