Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
bpkroth committed Jul 10, 2024
1 parent ef71a8b commit 0f3dbf1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
14 changes: 11 additions & 3 deletions mlos_bench/mlos_bench/storage/base_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,9 @@ def __exit__(
else:
assert exc_type and exc_val
_LOG.warning(
"Finishing experiment: %s", self, exc_info=(exc_type, exc_val, exc_tb)
"Finishing experiment: %s",
self,
exc_info=(exc_type, exc_val, exc_tb),
)
assert self._in_context
self._teardown(is_ok)
Expand Down Expand Up @@ -279,7 +281,10 @@ def load(

@abstractmethod
def pending_trials(
self, timestamp: datetime, *, running: bool
self,
timestamp: datetime,
*,
running: bool,
) -> Iterator["Storage.Trial"]:
"""
Return an iterator over the pending trials that are scheduled to run on or
Expand Down Expand Up @@ -430,7 +435,10 @@ def update(

@abstractmethod
def update_telemetry(
self, status: Status, timestamp: datetime, metrics: List[Tuple[datetime, str, Any]]
self,
status: Status,
timestamp: datetime,
metrics: List[Tuple[datetime, str, Any]],
) -> None:
"""
Save the experiment's telemetry data and intermediate status.
Expand Down
4 changes: 3 additions & 1 deletion mlos_bench/mlos_bench/storage/storage_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@


def from_config(
config_file: str, global_configs: Optional[List[str]] = None, **kwargs: Any
config_file: str,
global_configs: Optional[List[str]] = None,
**kwargs: Any,
) -> Storage:
"""
Create a new storage object from JSON5 config file.
Expand Down

0 comments on commit 0f3dbf1

Please sign in to comment.