Skip to content

Commit 4f9ab4d

Browse files
committed
refactor: swap model_id to model for ease of use in argument choice
1 parent f250b5f commit 4f9ab4d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/sasctl/_services/score_definitions.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class ScoreDefinitions(Service):
3939
def create_score_definition(
4040
cls,
4141
score_def_name: str,
42-
model_id: str,
42+
model: Union[str, dict],
4343
table_name: str,
4444
table_file: Union[str, Path] = None,
4545
description: str = "",
@@ -53,8 +53,8 @@ def create_score_definition(
5353
--------
5454
score_def_name: str
5555
Name of score definition.
56-
model_id: str
57-
A user-inputted model if where the model exists in a project.
56+
model : str or dict
57+
The name or id of the model, or a dictionary representation of the model.
5858
table_name: str
5959
A user-inputted table name in CAS Management.
6060
table_file: str or Path, optional
@@ -74,7 +74,8 @@ def create_score_definition(
7474
7575
"""
7676

77-
model = cls._model_repository.get_model(model_id)
77+
model = cls._model_repository.get_model(model)
78+
model_id = model.id
7879

7980
if not model:
8081
raise HTTPError(

0 commit comments

Comments
 (0)