Skip to content

Commit

Permalink
Minor typing cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
nv-braf committed Oct 16, 2024
1 parent 1984d16 commit 3949897
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions genai-perf/genai_perf/checkpoint/checkpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from genai_perf.config.input.config_command import ConfigCommand
from genai_perf.config.run.results import Results
from genai_perf.exceptions import GenAIPerfException
from genai_perf.types import CheckpointObject


@dataclass(frozen=True)
Expand Down Expand Up @@ -60,10 +61,12 @@ def _read_from_checkpoint(self) -> None:
try:
with open(checkpoint_filename, "r") as checkpoint_file:
checkpoint_json = json.load(checkpoint_file)
self._state = {}
self._state["Results"] = Results.read_from_checkpoint(
checkpoint_json["Results"]
)
self._state: CheckpointObject = {
"Results": Results.read_from_checkpoint(
checkpoint_json["Results"]
)
}

except EOFError:
raise (
GenAIPerfException(
Expand Down

0 comments on commit 3949897

Please sign in to comment.