File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 2
2
# SPDX-License-Identifier: Apache-2.0
3
3
4
4
import yaml
5
+ import json
5
6
from pathlib import Path
6
7
7
8
@@ -44,11 +45,13 @@ def read_mlflow_model_file(cls, m_path=Path.cwd()):
44
45
}
45
46
except KeyError :
46
47
raise ValueError ("This MLFlow model type is not currently supported." ) from None
48
+ except TypeError :
49
+ raise ValueError ("This MLFlow model type is not currently supported." ) from None
47
50
48
51
# Read in the input and output variables
49
52
try :
50
- inputs_dict = m_yml ["signature" ]["inputs" ]
51
- outputs_dict = m_yml ["signature" ]["outputs" ]
53
+ inputs_dict = json . loads ( m_yml ["signature" ]["inputs" ])
54
+ outputs_dict = json . loads ( m_yml ["signature" ]["outputs" ])
52
55
except KeyError :
53
56
raise ValueError (
54
57
"Improper or unset signature values for model. No input or output "
You can’t perform that action at this time.
0 commit comments