Skip to content

Conversation

@kylesayrs
Copy link
Collaborator

Purpose

  • Add support for returning any unmatched sets when using match_modules_set
    • This is useful for more verbose/specific erroring in the case of checking for fused modules

Changes

  • Fix typo FusedMappping -> FusedMapping`
  • Fix typo in match_modules_set docstring
  • Add return_unmatched argument to match_modules_set
  • More verbose error when double matching in match_modules_set

Returned values from generators can be accessed in the following way:

matched_modules = []
unmatched_module = None
try:
  while True:
      matched_modules.append(next(match_modules_set(model, targets, return_unmatched=True)))
except StopIteration as exception:
  unmatched_module = exception.value

Testing

  • Added test_incomplete_set_return

Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
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.

2 participants