Format docstrings
This commit is contained in:
@@ -10,8 +10,7 @@ _LOGGER = getLogger(__name__)
|
||||
|
||||
|
||||
def get_file_path(path: str) -> Path:
|
||||
"""
|
||||
Get PrimAITE package data.
|
||||
"""Get PrimAITE package data.
|
||||
|
||||
:Example:
|
||||
|
||||
|
||||
@@ -7,11 +7,9 @@ import polars as pl
|
||||
|
||||
|
||||
def av_rewards_dict(av_rewards_csv_file: Union[str, Path]) -> Dict[int, float]:
|
||||
"""
|
||||
Read an average rewards per episode csv file and return as a dict.
|
||||
"""Read an average rewards per episode csv file and return as a dict.
|
||||
|
||||
The dictionary keys are the episode number, and the values are the mean
|
||||
reward that episode.
|
||||
The dictionary keys are the episode number, and the values are the mean reward that episode.
|
||||
|
||||
:param av_rewards_csv_file: The average rewards per episode csv file path.
|
||||
:return: The average rewards per episode cdv as a dict.
|
||||
|
||||
@@ -12,8 +12,7 @@ _LOGGER: Logger = getLogger(__name__)
|
||||
|
||||
|
||||
class SessionOutputWriter:
|
||||
"""
|
||||
A session output writer class.
|
||||
"""A session output writer class.
|
||||
|
||||
Is used to write session outputs to csv file.
|
||||
"""
|
||||
@@ -65,11 +64,9 @@ class SessionOutputWriter:
|
||||
_LOGGER.debug(f"Finished writing file: {self._csv_file_path}")
|
||||
|
||||
def write(self, data: Union[Tuple, Transaction]):
|
||||
"""
|
||||
Write a row of session data.
|
||||
"""Write a row of session data.
|
||||
|
||||
:param data: The row of data to write. Can be a Tuple or an instance
|
||||
of Transaction.
|
||||
:param data: The row of data to write. Can be a Tuple or an instance of Transaction.
|
||||
"""
|
||||
if isinstance(data, Transaction):
|
||||
header, data = data.as_csv_data()
|
||||
|
||||
Reference in New Issue
Block a user