Skip to content

Commit

Permalink
fix(sdk): fix documentation typos
Browse files Browse the repository at this point in the history
  • Loading branch information
maocorte committed Jul 19, 2024
1 parent e8e143c commit 0da84b0
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 17 deletions.
12 changes: 6 additions & 6 deletions sdk/radicalbit_platform_sdk/apis/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def load_reference_dataset(
:param bucket: The name of the S3 bucket.
:param object_name: The optional name of the object uploaded to S3. Default value is None.
:param aws_credentials: AWS credentials used to connect to S3 bucket. Default value is None.
:param separator: Optional value to define separator used inside CSV file. Default falue is ","
:param separator: Optional value to define separator used inside CSV file. Default value is ","
:return: An instance of `ModelReferenceDataset` representing the reference dataset
"""

Expand Down Expand Up @@ -222,11 +222,11 @@ def bind_reference_dataset(
aws_credentials: Optional[AwsCredentials] = None,
separator: str = ',',
) -> ModelReferenceDataset:
"""Bind an existing reference dataset file already uploded to S3 to a `Model`
"""Bind an existing reference dataset file already uploaded to S3 to a `Model`
:param dataset_url: The url of the file already uploaded inside S3
:param aws_credentials: AWS credentials used to connect to S3 bucket. Default value is None.
:param separator: Optional value to define separator used inside CSV file. Default falue is ","
:param separator: Optional value to define separator used inside CSV file. Default value is ","
:return: An instance of `ModelReferenceDataset` representing the reference dataset
"""

Expand Down Expand Up @@ -298,7 +298,7 @@ def load_current_dataset(
:param correlation_id_column: The name of the column used for correlation id
:param object_name: The optional name of the object uploaded to S3. Default value is None.
:param aws_credentials: AWS credentials used to connect to S3 bucket. Default value is None.
:param separator: Optional value to define separator used inside CSV file. Default falue is ","
:param separator: Optional value to define separator used inside CSV file. Default value is ","
:return: An instance of `ModelReferenceDataset` representing the reference dataset
"""

Expand Down Expand Up @@ -375,12 +375,12 @@ def bind_current_dataset(
aws_credentials: Optional[AwsCredentials] = None,
separator: str = ',',
) -> ModelCurrentDataset:
"""Bind an existing current dataset file already uploded to S3 to a `Model`
"""Bind an existing current dataset file already uploaded to S3 to a `Model`
:param dataset_url: The url of the file already uploaded inside S3
:param correlation_id_column: The name of the column used for correlation id
:param aws_credentials: AWS credentials used to connect to S3 bucket. Default value is None.
:param separator: Optional value to define separator used inside CSV file. Default falue is ","
:param separator: Optional value to define separator used inside CSV file. Default value is ","
:return: An instance of `ModelReferenceDataset` representing the reference dataset
"""

Expand Down
16 changes: 12 additions & 4 deletions sdk/radicalbit_platform_sdk/apis/model_current_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def status(self) -> str:
return self.__status

def statistics(self) -> Optional[DatasetStats]:
"""Get statistics about the current dataset
"""Get statistics about the actual dataset
:return: The `DatasetStats` if exists
"""
Expand All @@ -85,6 +85,8 @@ def __callback(
match self.__status:
case JobStatus.ERROR:
self.__statistics = None
case JobStatus.MISSING_CURRENT:
self.__statistics = None
case JobStatus.SUCCEEDED:
if self.__statistics is None:
_, stats = invoke(
Expand All @@ -107,7 +109,7 @@ def __callback(
return self.__statistics

def drift(self) -> Optional[Drift]:
"""Get drift about the current dataset
"""Get drift about the actual dataset
:return: The `Drift` if exists
"""
Expand All @@ -133,6 +135,8 @@ def __callback(
match self.__status:
case JobStatus.ERROR:
self.__drift = None
case JobStatus.MISSING_CURRENT:
self.__drift = None
case JobStatus.SUCCEEDED:
if self.__drift is None:
_, drift = invoke(
Expand All @@ -155,7 +159,7 @@ def __callback(
return self.__drift

def data_quality(self) -> Optional[DataQuality]:
"""Get data quality metrics about the current dataset
"""Get data quality metrics about the actual dataset
:return: The `DataQuality` if exists
"""
Expand Down Expand Up @@ -196,6 +200,8 @@ def __callback(
match self.__status:
case JobStatus.ERROR:
self.__data_metrics = None
case JobStatus.MISSING_CURRENT:
self.__data_metrics = None
case JobStatus.SUCCEEDED:
if self.__data_metrics is None:
_, metrics = invoke(
Expand All @@ -218,7 +224,7 @@ def __callback(
return self.__data_metrics

def model_quality(self) -> Optional[ModelQuality]:
"""Get model quality metrics about the current dataset
"""Get model quality metrics about the actual dataset
:return: The `ModelQuality` if exists
"""
Expand Down Expand Up @@ -266,6 +272,8 @@ def __callback(
match self.__status:
case JobStatus.ERROR:
self.__model_metrics = None
case JobStatus.MISSING_CURRENT:
self.__model_metrics = None
case JobStatus.SUCCEEDED:
if self.__model_metrics is None:
_, metrics = invoke(
Expand Down
12 changes: 9 additions & 3 deletions sdk/radicalbit_platform_sdk/apis/model_reference_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def status(self) -> str:
return self.__status

def statistics(self) -> Optional[DatasetStats]:
"""Get statistics about the current dataset
"""Get statistics about the actual dataset
:return: The `DatasetStats` if exists
"""
Expand All @@ -78,6 +78,8 @@ def __callback(
match self.__status:
case JobStatus.ERROR:
self.__statistics = None
case JobStatus.MISSING_REFERENCE:
self.__statistics = None
case JobStatus.SUCCEEDED:
if self.__statistics is None:
_, stats = invoke(
Expand All @@ -100,7 +102,7 @@ def __callback(
return self.__statistics

def data_quality(self) -> Optional[DataQuality]:
"""Get data quality metrics about the current dataset
"""Get data quality metrics about the actual dataset
:return: The `DataQuality` if exists
"""
Expand Down Expand Up @@ -141,6 +143,8 @@ def __callback(
match self.__status:
case JobStatus.ERROR:
self.__data_metrics = None
case JobStatus.MISSING_REFERENCE:
self.__data_metrics = None
case JobStatus.SUCCEEDED:
if self.__data_metrics is None:
_, metrics = invoke(
Expand All @@ -163,7 +167,7 @@ def __callback(
return self.__data_metrics

def model_quality(self) -> Optional[ModelQuality]:
"""Get model quality metrics about the current dataset
"""Get model quality metrics about the actual dataset
:return: The `ModelQuality` if exists
"""
Expand Down Expand Up @@ -211,6 +215,8 @@ def __callback(
match self.__status:
case JobStatus.ERROR:
self.__model_metrics = None
case JobStatus.MISSING_REFERENCE:
self.__model_metrics = None
case JobStatus.SUCCEEDED:
if self.__model_metrics is None:
_, metrics = invoke(
Expand Down
2 changes: 2 additions & 0 deletions sdk/radicalbit_platform_sdk/models/job_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ class JobStatus(str, Enum):
IMPORTING = 'IMPORTING'
SUCCEEDED = 'SUCCEEDED'
ERROR = 'ERROR'
MISSING_REFERENCE = 'MISSING_REFERENCE'
MISSING_CURRENT = 'MISSING_CURRENT'
8 changes: 4 additions & 4 deletions sdk/radicalbit_platform_sdk/models/model_definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ class BaseModelDefinition(BaseModel):
name: The name of the model.
description: An optional description to explain something about the model.
model_type: The type of the model
data_type: It explanin the data type used by the model
data_type: It explains the data type used by the model
granularity: The window used to calculate aggregated metrics
features: A list column representing the features set
outputs: An OutputType definition to explaing the output of the model
outputs: An OutputType definition to explain the output of the model
target: The column used to represent model's target
timestamp: The column used to store the when prediction was done
timestamp: The column used to store when prediction was done
frameworks: An optional field to describe the frameworks used by the model
algorithm: An optional field to ecplane the algorithm used by the model
algorithm: An optional field to explain the algorithm used by the model
"""

Expand Down

0 comments on commit 0da84b0

Please sign in to comment.