Skip to content

Commit

Permalink
update docstring
Browse files Browse the repository at this point in the history
Signed-off-by: kalyanr <kalyan.ben10@live.com>
  • Loading branch information
rawwar committed Mar 20, 2024
1 parent 1836682 commit dab84e3
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions opensearch_py_ml/ml_commons/ml_commons_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,21 @@ def get_stats(
stat_id: Optional[str] = "",
payload: Optional[dict] = None,
):
"""
Retrieves statistics for a given node or stat ID.
Args:
node_id (str, optional): The ID of the node to retrieve statistics for.
stat_id (str, optional): The ID of the specific statistic to retrieve.
payload (dict, optional): Additional payload for the request.
Returns:
dict: The response from the server containing the statistics.
Raises:
ValidationError: If the input parameters fail validation.
"""
validate_stats_input(node_id, stat_id, payload)
if node_id and stat_id:
url = f"{ML_BASE_URI}/{node_id}/stats/{stat_id}"
Expand Down

0 comments on commit dab84e3

Please sign in to comment.