File tree Expand file tree Collapse file tree 3 files changed +7
-9
lines changed Expand file tree Collapse file tree 3 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -112,14 +112,12 @@ def pickle_trained_model(
112
112
model = trained_model ,
113
113
force = True ,
114
114
path = pickle_path ,
115
- filename = f"{ model_prefix } .pickle"
115
+ filename = f"{ model_prefix } .pickle" ,
116
116
)
117
117
# For MOJO H2O models, gzip the model file and adjust the file extension
118
118
elif is_h2o_model and pickle_path :
119
119
trained_model .save_mojo (
120
- force = True ,
121
- path = pickle_path ,
122
- filename = f"{ model_prefix } .mojo"
120
+ force = True , path = pickle_path , filename = f"{ model_prefix } .mojo"
123
121
)
124
122
elif is_binary_model or is_h2o_model :
125
123
raise ValueError (
Original file line number Diff line number Diff line change @@ -73,9 +73,7 @@ def test_pickle_trained_model_h2o():
73
73
x .remove (y )
74
74
75
75
model = H2OGeneralizedLinearEstimator (
76
- family = "binomial" ,
77
- model_id = "test_model" ,
78
- lambda_search = True
76
+ family = "binomial" , model_id = "test_model" , lambda_search = True
79
77
)
80
78
model .train (x = x , y = y , training_frame = data )
81
79
Original file line number Diff line number Diff line change @@ -272,7 +272,9 @@ def test_write_file_metadata_json():
272
272
with patch .object (jf , "notebook_output" , True ):
273
273
capture_output = io .StringIO ()
274
274
sys .stdout = capture_output
275
- jf .write_file_metadata_json (model_prefix = "Test_Model" , json_path = Path (tmp_dir ))
275
+ jf .write_file_metadata_json (
276
+ model_prefix = "Test_Model" , json_path = Path (tmp_dir )
277
+ )
276
278
assert (Path (tmp_dir ) / "fileMetadata.json" ).exists ()
277
279
sys .stdout = sys .__stdout__
278
280
assert "was successfully written and saved to " in capture_output .getvalue ()
@@ -636,4 +638,4 @@ def test_create_requirements_json(change_dir):
636
638
unittest .TestCase .maxDiff = None
637
639
unittest .TestCase ().assertCountEqual (
638
640
json .loads (json_dict ["requirements.json" ]), expected
639
- )
641
+ )
You can’t perform that action at this time.
0 commit comments