Skip to content

Commit

Permalink
Solve pre-commit errors
Browse files Browse the repository at this point in the history
  • Loading branch information
maxencefaldor committed Jan 8, 2024
1 parent 5278ada commit dd72df7
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion qdax/baselines/genetic_algorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def update(
genotypes=genotypes,
fitnesses=fitnesses,
descriptors=None,
extra_scores=extra_scores | extra_info,
extra_scores={**extra_scores, **extra_info},
)

# update the metrics
Expand Down
2 changes: 1 addition & 1 deletion qdax/core/distributed_map_elites.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def update(
genotypes=genotypes,
fitnesses=fitnesses,
descriptors=descriptors,
extra_scores=extra_scores | extra_info,
extra_scores={**extra_scores, **extra_info},
)

# update the metrics
Expand Down
2 changes: 1 addition & 1 deletion qdax/core/emitters/multi_emitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def emit(
batch_size = jax.tree_util.tree_leaves(genotype)[0].shape[0]
assert batch_size == emitter.batch_size
all_offsprings.append(genotype)
all_extra_info = all_extra_info | extra_info
all_extra_info = {**all_extra_info, **extra_info}

# concatenate offsprings together
offsprings = jax.tree_util.tree_map(
Expand Down
2 changes: 1 addition & 1 deletion qdax/core/emitters/qdcg_emitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ def scan_train_critics(
length=self._config.num_critic_training_steps,
)

return emitter_state
return emitter_state # type: ignore

@partial(jax.jit, static_argnames=("self",))
def _train_critics(
Expand Down
2 changes: 1 addition & 1 deletion qdax/core/map_elites.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def update(
genotypes=genotypes,
fitnesses=fitnesses,
descriptors=descriptors,
extra_scores=extra_scores | extra_info,
extra_scores={**extra_scores, **extra_info},
)

# update the metrics
Expand Down

0 comments on commit dd72df7

Please sign in to comment.