Skip to content

Commit 426282b

Browse files
committed
Black reformatting
1 parent eb4e267 commit 426282b

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

src/sasctl/pzmm/mlflow_model.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,20 @@ def read_mlflow_model_file(cls, m_path=Path.cwd()):
3939
var_dict = {
4040
"python_version": m_yml["flavors"]["python_function"]["python_version"],
4141
"model_path": m_yml["flavors"]["python_function"]["model_path"],
42-
"serialization_format": m_yml["flavors"]["sklearn"]["serialization_format"],
42+
"serialization_format": m_yml["flavors"]["sklearn"][
43+
"serialization_format"
44+
],
4345
"run_id": m_yml["run_id"],
44-
"mlflowPath": m_path
46+
"mlflowPath": m_path,
4547
}
4648
except KeyError:
47-
raise ValueError("This MLFlow model type is not currently supported.") from None
49+
raise ValueError(
50+
"This MLFlow model type is not currently supported."
51+
) from None
4852
except TypeError:
49-
raise ValueError("This MLFlow model type is not currently supported.") from None
53+
raise ValueError(
54+
"This MLFlow model type is not currently supported."
55+
) from None
5056

5157
# Read in the input and output variables
5258
try:
@@ -57,5 +63,5 @@ def read_mlflow_model_file(cls, m_path=Path.cwd()):
5763
"Improper or unset signature values for model. No input or output "
5864
"dicts could be generated. "
5965
) from None
60-
66+
6167
return var_dict, inputs_dict, outputs_dict

src/sasctl/pzmm/write_json_files.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ def write_file_metadata_json(
510510
dict_list.append({"role": "scoreResource", "name": model_prefix + ".mojo"})
511511
elif is_tf_keras_model:
512512
dict_list.append({"role": "scoreResource", "name": model_prefix + ".h5"})
513-
#conditions added for pytorch.
513+
# conditions added for pytorch.
514514
elif is_pytorch_model:
515515
dict_list.append(({"role": "scoreResource", "name": model_prefix + ".pth"}))
516516
else:

src/sasctl/pzmm/write_score_code.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ def _viya35_model_load(
563563
)
564564
elif pytorch_model:
565565
cls.score_code += (
566-
f"model = torch.load(\"/models/resources/viya/{model_id}/\" + "
566+
f'model = torch.load("/models/resources/viya/{model_id}/" + '
567567
f"{model_file_name})\n\n"
568568
)
569569
return (

0 commit comments

Comments
 (0)