Skip to content

Commit b464ece

Browse files
Added pickle type to load
1 parent dc25ad4 commit b464ece

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

evalml/automl/automl_search.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1337,11 +1337,14 @@ def save(
13371337
pkl_lib.dump(self, f, protocol=pickle_protocol)
13381338

13391339
@staticmethod
1340-
def load(file_path):
1340+
def load(
1341+
file_path,
1342+
):
13411343
"""Loads AutoML object at file path
13421344
13431345
Arguments:
13441346
file_path (str): location to find file to load
1347+
pickle_type {"pickle", "cloudpickle"}: the pickling library to use. Currently not used since the standard pickle library can handle cloudpickles.
13451348
13461349
Returns:
13471350
AutoSearchBase object

evalml/tests/automl_tests/test_automl.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,9 @@ def test_automl_serialization(pickle_type, X_y_binary, tmpdir):
665665
)
666666
automl.search()
667667
# Testing pickling of SearchIterationPlot object
668-
automl.search_iteration_plot = automl.plot.search_iteration_plot(interactive_plot=True)
668+
automl.search_iteration_plot = automl.plot.search_iteration_plot(
669+
interactive_plot=True
670+
)
669671
if pickle_type == "invalid":
670672
with pytest.raises(
671673
ValueError,

0 commit comments

Comments
 (0)