generated from pyiron/pyiron_module_template
-
Notifications
You must be signed in to change notification settings - Fork 3
Typed transformers #729
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
Merged
Merged
Typed transformers #729
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: liamhuber <[email protected]>
Signed-off-by: liamhuber <[email protected]>
Signed-off-by: liamhuber <[email protected]>
Signed-off-by: liamhuber <[email protected]>
in inputs_to_list Signed-off-by: liamhuber <[email protected]>
Signed-off-by: liamhuber <[email protected]>
Signed-off-by: liamhuber <[email protected]>
Signed-off-by: liamhuber <[email protected]>
Signed-off-by: liamhuber <[email protected]>
|
no problem - all good |
Signed-off-by: liamhuber <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #729 +/- ##
==========================================
+ Coverage 91.79% 91.87% +0.07%
==========================================
Files 34 35 +1
Lines 3730 3764 +34
==========================================
+ Hits 3424 3458 +34
Misses 306 306 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: liamhuber <[email protected]>
Signed-off-by: liamhuber <[email protected]>
Signed-off-by: liamhuber <[email protected]>
Signed-off-by: liamhuber <[email protected]>
Directly onto Transformer Signed-off-by: liamhuber <[email protected]>
Signed-off-by: liamhuber <[email protected]>
Signed-off-by: liamhuber <[email protected]>
And simplify the typing Signed-off-by: liamhuber <[email protected]>
Signed-off-by: liamhuber <[email protected]>
Signed-off-by: liamhuber <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Transformers map many:1 for i/o or o/i, and currently the hint for the 1 side of things is very generic. Here, we add the ability to specify a content type at construction:
Closes #703
@ligerzero-ai, at the moment I think I will move away from inferring hints. The trouble is that sometimes we initialize with direct values (then type inference is easy), but sometimes we initialize with nodes or channels (which are also perfectly valid input arguments to the new node!) I might take a crack at it again later, but this makes the inference logic pretty hairy.
I'm going to double-down on laziness and also not address that here. The error raised is actually being raised generically from trying to set invalid input values to an input channel, so there is no context that this channel was created as part of a
inputs_to_listnode or similar. The tail end of the error message already anyhow supplies a hint towards the type hinting:TODO:
transform.pyto condense away some abstract classes (got rid of all the intermediate classes --Transformserves to group them all and change their draw colour, but each one handles its functionality independently. There is a smidgen of code repetition, but I think it's more readable now)