Skip to content

Commit 6eb17f6

Browse files
committed
added attribute in prepare to accept custom scorepy
1 parent cbdfb65 commit 6eb17f6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

ads/model/generic_model.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,8 @@ def prepare(
843843
ignore_conda_error: (bool, optional). Defaults to False.
844844
Parameter to ignore error when collecting conda information.
845845
score_py_uri: (str, optional). Defaults to False.
846-
The uri of the customized score.py. The provided score.py will be added into artifact_dir.
846+
The uri of the customized score.py, which can be local path or OCI object storage URI.
847+
The provided score.py will be added into artifact_dir.
847848
kwargs:
848849
impute_values: (dict, optional).
849850
The dictionary where the key is the column index(or names is accepted
@@ -1008,8 +1009,9 @@ def prepare(
10081009
if score_py_uri:
10091010
utils.copy_file(
10101011
uri_src=score_py_uri,
1011-
uri_dst=self.artifact_dir,
1012-
force_overwrite=force_overwrite,auth=self.auth
1012+
uri_dst=os.path.join(self.artifact_dir, "score.py"),
1013+
force_overwrite=force_overwrite,
1014+
auth=self.auth
10131015
)
10141016
else:
10151017
self.model_artifact.prepare_score_py(

0 commit comments

Comments
 (0)