Skip to content

Commit

Permalink
Fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
janosg committed Jul 10, 2024
1 parent d520208 commit 0968cbb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/estimagic/batch_evaluators.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ def _check_inputs(func, arguments, n_cores, error_handling, unpack_symbol):

try:
int(n_cores)
except Exception:
ValueError("n_cores must be an integer.")
except Exception as e:
raise ValueError("n_cores must be an integer.") from e

if unpack_symbol not in (None, "*", "**"):
raise ValueError(
Expand Down
4 changes: 2 additions & 2 deletions src/estimagic/benchmarking/get_benchmark_problems.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def get_benchmark_problems(
scaling_options = None

problems = {}
for name, specification in raw_problems.items():
for prob_name, specification in raw_problems.items():
inputs = _create_problem_inputs(
specification,
additive_options=additive_options,
Expand All @@ -114,7 +114,7 @@ def get_benchmark_problems(
rng=rng,
)

problems[name] = {
problems[prob_name] = {
"inputs": inputs,
"noise_free_criterion": specification["criterion"],
"solution": _create_problem_solution(
Expand Down
2 changes: 1 addition & 1 deletion src/estimagic/visualization/estimation_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -1226,7 +1226,7 @@ def _process_frame_indices(
elif isinstance(custom_index_names, dict):
df.rename_axis(index=custom_index_names, inplace=True)
else:
TypeError(
raise TypeError(
f"""Invalid custom_index_names can be of type either list or dict,
or NoneType. Not: {type(custom_index_names)}."""
)
Expand Down

0 comments on commit 0968cbb

Please sign in to comment.