Skip to content

Commit

Permalink
Fixup mypy issues
Browse files Browse the repository at this point in the history
  • Loading branch information
yngve-sk committed Nov 18, 2024
1 parent 74c1250 commit 613fc4d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/everest/everest_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,7 @@ def write_to_experiment(self, experiment: _OptimizerOnlyExperiment):
for df_key, df in batch_data.existing_dataframes.items():
df.write_parquet(experiment.optimizer_mount_point / f"{df_key}.parquet")

def read_from_experiment(
self, experiment: _OptimizerOnlyExperiment
) -> EverestStorageDataFrames:
def read_from_experiment(self, experiment: _OptimizerOnlyExperiment) -> None:
self.initial_values = polars.read_parquet(
experiment.optimizer_mount_point / "initial_values.parquet"
)
Expand Down Expand Up @@ -515,7 +513,7 @@ def _rename_columns(df: polars.DataFrame):

def _store_gradient_results(
self, config: EnOptConfig, results: FunctionResults
) -> Tuple[polars.DataFrame, polars.DataFrame]:
) -> Tuple[polars.DataFrame, polars.DataFrame, polars.DataFrame, polars.DataFrame]:
obj_gradient_per_real = polars.from_pandas(
results.to_dataframe(config, "evaluations").reset_index()
)
Expand Down Expand Up @@ -672,7 +670,7 @@ def _handle_finished_batch_event(self, event: Event):
converted_results = tuple(
convert_to_maximize(result) for result in event.results
)
results = []
results: List[FunctionResults | GradientResults] = []
best_value = -np.inf
best_results = None
for item in converted_results:
Expand Down

0 comments on commit 613fc4d

Please sign in to comment.