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

Feature: Masked Operator #147

Merged
merged 3 commits into from
Jul 31, 2024
Merged

Feature: Masked Operator #147

merged 3 commits into from
Jul 31, 2024

Conversation

JakobEliasWagner
Copy link
Collaborator

@JakobEliasWagner JakobEliasWagner commented Jul 1, 2024

Feature: Masked Operator

Description

Masked operators are able to apply masks during the forward pass to selectively use or ignore parts of the input. While the current Operator implementation usually allows to use various numbers of evaluation points, if fails to facilitate this behavior for differing numbers of sensors. While some operators are able to handle this behavior batched inputs are necessary to promote efficient and stable training. Therefore, masked inputs, allowing for padding sequences are required.

This PR introduces two new operator classes MaskedOperator. The MaskedOperator is able to process masked inputs by additionally accepting masks during the forward pass.

Which issue does this PR tackle?

  • Masked inputs cannot be passed to the operator implementation.

How does it solve the problem?

  • Implements MaskedOperator class to allow for masked inputs, that extends the Operator base class.

How are the changes tested?

  • All unit tests run without new errors.

Notes

  • Some neural operator implementations currently remain "unmasked" while theoretically being able to handle masked inputs (neural operator).
  • The trainer is currently only able to handle "unmasked" opreators and datasets.
  • There is no "masked" dataset implementation.
  • The PI loss could be extended to also allow for "masked" inputs.
  • The benchmark structure relies on "unmasked" operators, benchmarks, and datasets.

Checklist for Contributors

  • Scope: This PR tackles exactly one problem.
  • Conventions: The branch follows the feature/title-slug convention.
  • Conventions: The PR title follows the Bugfix: Title convention.
  • Coding style: The code passes all pre-commit hooks.
  • Documentation: All changes are well-documented.
  • Tests: New features are tested and all tests pass successfully.
  • Changelog: Updated CHANGELOG.md for new features or breaking changes.
  • Review: A suitable reviewer has been assigned.

Checklist for Reviewers:

  • The PR solves the issue it claims to solve and only this one.
  • Changes are tested sufficiently and all tests pass.
  • Documentation is complete and well-written.
  • Changelog has been updated, if necessary.

@JakobEliasWagner JakobEliasWagner self-assigned this Jul 1, 2024
@JakobEliasWagner JakobEliasWagner added the enhancement New feature or request label Jul 1, 2024
@samuelburbulla samuelburbulla added this to the 0.2 milestone Jul 9, 2024
src/continuiti/operators/operator.py Outdated Show resolved Hide resolved
@samuelburbulla samuelburbulla enabled auto-merge (squash) July 31, 2024 10:33
@samuelburbulla samuelburbulla merged commit cb825d7 into main Jul 31, 2024
14 checks passed
@samuelburbulla samuelburbulla deleted the feature/masked-operator branch July 31, 2024 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants