Skip to content

Commit

Permalink
docstring fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
bpkroth committed Nov 22, 2024
1 parent a37071f commit 957a5ed
Showing 1 changed file with 28 additions and 17 deletions.
45 changes: 28 additions & 17 deletions mlos_core/mlos_core/data_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,6 @@
class Observation:
"""
A single observation of a configuration.
Attributes
----------
config : pandas.Series
The configuration observed.
score : pandas.Series
The score metrics observed.
context : Optional[pandas.Series]
The context in which the configuration was evaluated.
Not Yet Implemented.
metadata: Optional[pandas.Series]
The metadata in which the configuration was evaluated
"""

def __init__(
Expand All @@ -38,6 +26,22 @@ def __init__(
context: Optional[pd.Series] = None,
metadata: Optional[pd.Series] = None,
):
"""
Creates a new Observation object.
Parameters
----------
config : pandas.Series
The configuration observed.
score : pandas.Series
The score metrics observed.
context : Optional[pandas.Series]
The context in which the configuration was evaluated.
Not Yet Implemented.
metadata: Optional[pandas.Series]
The metadata in which the configuration was evaluated
"""

self._config = config
self._score = score
self._context = context
Expand Down Expand Up @@ -315,11 +319,6 @@ class Suggestion:
A Suggestion is an Observation that has not yet been scored.
Evaluating the Suggestion and calling `complete(scores)` can convert it to an Observation.
Attributes
----------
config : pandas.DataFrame
The suggested configuration.
"""

def __init__(
Expand All @@ -329,6 +328,18 @@ def __init__(
context: Optional[pd.Series] = None,
metadata: Optional[pd.Series] = None,
):
"""
Creates a new Suggestion.
Parameters
----------
config : pd.Series
The configuration suggested.
context : Optional[pd.Series]
The context for this suggestion, by default None
metadata : Optional[pd.Series]
Any metadata provided by the underlying optimizer, by default None
"""
self._config = config
self._context = context
self._metadata = metadata
Expand Down

0 comments on commit 957a5ed

Please sign in to comment.