Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize the NSGA-III and update IMMOEA for gpjax0.8.2 #123

Merged
merged 9 commits into from
Mar 25, 2024

Conversation

LiHao-MS
Copy link
Contributor

Description

Checklist

  • I have formatted my Python code with black.
  • I have good commit messages.
  • If adding new algorithms, problems, operators:
    • Added related test cases.
    • Added docstring to explain important parameters.
    • Added entries in the docs.

Copy link
Collaborator

@BillHuang2001 BillHuang2001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please delete all debug lines.

sorted_indices = jnp.sort(masked_indices).astype(jnp.int32)
next_generation = next_generation[sorted_indices, :]
next_generation = jnp.sort(next_generation, axis=0)
# jax.debug.print("next_generation: {}", next_generation[self.pop_size-5:self.pop_size+5, :])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# jax.debug.print("next_generation: {}", next_generation[self.pop_size-5:self.pop_size+5, :])

next_generation = lax.dynamic_slice(next_generation, (0, 0), population.shape)
next_generation = jnp.clip(next_generation, self.lb, self.ub)
# jax.debug.print("next_generation: {}", jnp.isinf(next_generation).all())
# next_generation = jnp.clip(next_generation, self.lb, self.ub)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# next_generation = jnp.clip(next_generation, self.lb, self.ub)


off = jax.lax.cond(valid_sum > num, valid_fun, invalid_fun, off)
off = jnp.where((jnp.arange(self.pop_size) > num)[:, None], jnp.inf, off)
# jax.debug.print("off: {}", off[self.pop_size - 5: , :])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# jax.debug.print("off: {}", off[self.pop_size - 5: , :])

@LiHao-MS
Copy link
Contributor Author

All debug lines have been deleted

@BillHuang2001 BillHuang2001 merged commit 9898c98 into EMI-Group:main Mar 25, 2024
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants