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

Scan refactoring and simplification #584

Open
2 of 12 tasks
Tracked by #1426
brandonwillard opened this issue Sep 12, 2021 · 0 comments
Open
2 of 12 tasks
Tracked by #1426

Scan refactoring and simplification #584

brandonwillard opened this issue Sep 12, 2021 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed refactor This issue involves refactoring Scan Involves the `Scan` `Op`

Comments

@brandonwillard
Copy link
Member

Scan needs a lot of work. Here's a list of desired updates from #552:

  • Fix the Scan interface clearer and more consistent by
    • Make its attributes/fields more explicit (e.g. via the __init__ signature)
    • Remove opaque operations (e.g. use of self.__dict__.update)
    • Use info for only taps-related information, and not a random assortment of the Ops properties
  • Use a FunctionGraph to hold the inner-graph information instead of independent inputs and outputs attributes
    • This will be a big step toward unifying the interface for Ops with inner-graphs. It will also make it much easier to perform rewrites/optimizations on inner-graphs.
  • Convert lists to tuples
    • This helps make hashing simpler and reflects the actual immutability of the underlying properties
  • Merge ScanArgs and ScanMethodsMixin from Refactor Scan Op #552.
  • Extract and remove redundant SIT/SOT/MIT/MOT logic.
    • There are a lot of redundant for-loops that manipulate/prepare sequence configuration parameters.
  • Decouple Scan-specific logic from aesara.printing.debugprint
    • For example, we could generalize this logic so that it can be dispatched
  • Relocate/remove aesara.compile.ops.expandable_types and replace its use in aesara.tensor.type
  • Refactor steps/operations from aesara.scan.basic.scan into independent functions.
    • It would be nice if we could base all of the steps in this helper function on ScanArgs.
    • Extract/create a generate-updates-from-ScanArgs function
      • It might be as simple as this.
@brandonwillard brandonwillard added enhancement New feature or request help wanted Extra attention is needed refactor This issue involves refactoring Scan Involves the `Scan` `Op` labels Sep 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed refactor This issue involves refactoring Scan Involves the `Scan` `Op`
Projects
None yet
Development

No branches or pull requests

1 participant