Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/sasctl/_services/score_definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def create_score_definition(
table_name: str
A user-inputted table name in CAS Management.
use_cas_gateway: bool, optional
Determines whether object uses CAS Gateway or not.
Determines if scoring uses CAS Gateway.
table_file: str or Path, optional
A user-provided path to an uploadable file. Defaults to None.
description: str, optional
Expand All @@ -70,9 +70,9 @@ def create_score_definition(
library_name: str, optional
The library within the CAS server the table exists in. Defaults to "Public".
model_version: str, optional
The user-chosen version of the model. Deafaults to "latest".
input_mapping: list, optional
A list of dictionaries mapping variables from the data table to the variables in the model if they are different. Defaults to None.
The user-chosen version of the model. Defaults to "latest".
input_mapping: dict, optional
A dictionary mapping variables from the data table to the variables in the model if they are different. Defaults to None.

Returns
-------
Expand Down
4 changes: 2 additions & 2 deletions src/sasctl/_services/score_execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def get_score_execution_results(

Returns
-------
Table reference
pandas.DataFrame

"""
try:
Expand Down Expand Up @@ -216,7 +216,7 @@ def _no_gateway_get_results(cls, server_name, library_name, table_name):

Returns
-------
Pandas Dataframe
pandas.DataFrame

"""
if Version(pd.__version__) >= Version("1.0.3"):
Expand Down
32 changes: 32 additions & 0 deletions src/sasctl/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -984,6 +984,38 @@ def score_model_with_cas(
timeout: int = 300,
input_mapping: dict = None,
):
"""Runs a score test on the specified model.

Parameters
--------
score_def_name: str
Name of score definition.
model : str or dict
The name or id of the model, or a dictionary representation of the model.
table_name: str
A user-inputted table name in CAS Management.
table_file: str or Path, optional
A user-provided path to an uploadable file. Defaults to None.
description: str, optional
Description of score definition. Defaults to an empty string.
server_name: str, optional
The server within CAS that the table is in. Defaults to "cas-shared-default".
library_name: str, optional
The library within the CAS server the table exists in. Defaults to "Public".
model_version: str, optional
The user-chosen version of the model. Defaults to "latest".
use_cas_gateway: bool, optional
Determines if scoring uses CAS Gateway.
timeout: int, optional
The maximum time in seconds to wait for the score execution to complete. Defaults to 300.
input_mapping: dict, optional
A dictionary mapping variables from the data table to the variables in the model if they are different. Defaults to None.

Returns
-------
pandas.DataFrame

"""
score_definition = sd.create_score_definition(
score_def_name,
model,
Expand Down
Loading