File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
ads/opctl/operator/lowcode/forecast/whatifserve Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 1111import oci
1212
1313import pandas as pd
14- from joblib import dump
14+ import cloudpickle
1515
1616from ads .opctl import logger
1717from ads .common .model_export_util import prepare_generic_model
@@ -93,7 +93,8 @@ def save_to_catalog(self):
9393 os .mkdir (self .path_to_artifact )
9494
9595 artifact_dict = {"spec" : self .spec .to_dict (), "models" : self .model_obj }
96- dump (artifact_dict , os .path .join (self .path_to_artifact , "model.joblib" ))
96+ with open (f"{ self .path_to_artifact } /models.pickle" , "wb" ) as f :
97+ cloudpickle .dump (artifact_dict , f )
9798 artifact = prepare_generic_model (
9899 self .path_to_artifact ,
99100 function_artifacts = False ,
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ def load_model():
4444 """
4545 model_dir = os .path .dirname (os .path .realpath (__file__ ))
4646 contents = os .listdir (model_dir )
47- model_file_name = "model.joblib "
47+ model_file_name = "models.pickle "
4848 if model_file_name in contents :
4949 with open (os .path .join (os .path .dirname (os .path .realpath (__file__ )), model_file_name ), "rb" ) as file :
5050 model = load (file )
You can’t perform that action at this time.
0 commit comments