Skip to content

Commit 9ed17c1

Browse files
committed
updated docstrings for scoring functions
1 parent 9d10504 commit 9ed17c1

3 files changed

Lines changed: 38 additions & 6 deletions

File tree

‎src/sasctl/_services/score_definitions.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def create_score_definition(
6060
table_name: str
6161
A user-inputted table name in CAS Management.
6262
use_cas_gateway: bool, optional
63-
Determines whether object uses CAS Gateway or not.
63+
Determines if scoring uses CAS Gateway.
6464
table_file: str or Path, optional
6565
A user-provided path to an uploadable file. Defaults to None.
6666
description: str, optional
@@ -70,9 +70,9 @@ def create_score_definition(
7070
library_name: str, optional
7171
The library within the CAS server the table exists in. Defaults to "Public".
7272
model_version: str, optional
73-
The user-chosen version of the model. Deafaults to "latest".
74-
input_mapping: list, optional
75-
A list of dictionaries mapping variables from the data table to the variables in the model if they are different. Defaults to None.
73+
The user-chosen version of the model. Defaults to "latest".
74+
input_mapping: dict, optional
75+
A dictionary mapping variables from the data table to the variables in the model if they are different. Defaults to None.
7676
7777
Returns
7878
-------

‎src/sasctl/_services/score_execution.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def get_score_execution_results(
158158
159159
Returns
160160
-------
161-
Table reference
161+
pandas.DataFrame
162162
163163
"""
164164
try:
@@ -216,7 +216,7 @@ def _no_gateway_get_results(cls, server_name, library_name, table_name):
216216
217217
Returns
218218
-------
219-
Pandas Dataframe
219+
pandas.DataFrame
220220
221221
"""
222222
if Version(pd.__version__) >= Version("1.0.3"):

‎src/sasctl/tasks.py‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -984,6 +984,38 @@ def score_model_with_cas(
984984
timeout: int = 300,
985985
input_mapping: dict = None,
986986
):
987+
"""Runs a score test on the specified model.
988+
989+
Parameters
990+
--------
991+
score_def_name: str
992+
Name of score definition.
993+
model : str or dict
994+
The name or id of the model, or a dictionary representation of the model.
995+
table_name: str
996+
A user-inputted table name in CAS Management.
997+
table_file: str or Path, optional
998+
A user-provided path to an uploadable file. Defaults to None.
999+
description: str, optional
1000+
Description of score definition. Defaults to an empty string.
1001+
server_name: str, optional
1002+
The server within CAS that the table is in. Defaults to "cas-shared-default".
1003+
library_name: str, optional
1004+
The library within the CAS server the table exists in. Defaults to "Public".
1005+
model_version: str, optional
1006+
The user-chosen version of the model. Defaults to "latest".
1007+
use_cas_gateway: bool, optional
1008+
Determines if scoring uses CAS Gateway.
1009+
timeout: int, optional
1010+
The maximum time in seconds to wait for the score execution to complete. Defaults to 300.
1011+
input_mapping: dict, optional
1012+
A dictionary mapping variables from the data table to the variables in the model if they are different. Defaults to None.
1013+
1014+
Returns
1015+
-------
1016+
pandas.DataFrame
1017+
1018+
"""
9871019
score_definition = sd.create_score_definition(
9881020
score_def_name,
9891021
model,

0 commit comments

Comments
 (0)