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
Add support for static value inputs (set by frontend) with Execution Number node #2433
Merged
Conversation
This file contains 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
joeyballentine
changed the title
Add support for non-deterministic helper nodes
Add support for static value inputs (set by frontend) w/ Get Execution Number node
Jan 15, 2024
For documentation purposes: This now utilizes a new type of input for adapting static values from the frontend. |
joeyballentine
changed the title
Add support for static value inputs (set by frontend) w/ Get Execution Number node
Add support for static value inputs (set by frontend) with Get Execution Number node
Jan 15, 2024
backend/src/packages/chaiNNer_standard/utility/value/get_execution_number.py
Outdated
Show resolved
Hide resolved
…tion_number.py Co-authored-by: Michael Schmidt <mitchi5000.ms@googlemail.com>
joeyballentine
changed the title
Add support for static value inputs (set by frontend) with Get Execution Number node
Add support for static value inputs (set by frontend) with Execution Number node
Jan 15, 2024
backend/src/packages/chaiNNer_standard/utility/value/execution_number.py
Outdated
Show resolved
Hide resolved
…_number.py Co-authored-by: Michael Schmidt <mitchi5000.ms@googlemail.com>
I don't personally think so. I plan on doing a follow-up to this where I add the ability to manually reset the number. I just haven't decided how I want to expose that yet |
…haiNNer-org/chaiNNer into non-deterministic-helper-nodes
RunDevelopment
approved these changes
Jan 18, 2024
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.
Adds support for non-deterministic nodes... kinda.
The only node I've implemented with this is an execution number node. It's just a number that increments every time you press run. If this gets approved/merged, I plan on doing one for the current datetime as well.
This is really, really jank - but basically, I hardcode a node on the frontend that only exists on the frontend. Then, in the code that converts the flow to the backend format, I get rid of that node and replace its connections with a static value, as if that value was typed into the input.
I'm sure this is still technically "wrong" and blah blah determinism, but I think this is a good compromise as it doesn't affect how we handle caching. It's just the same as if the user were to manually change a value every time. And since this has been requested many times, I think it's worth having, even if it's a bit jank.
This only partially implements #1447. I have not added a way to manipulate this counter yet, and probably won't in this PR.
This also does not display any Navi/type info about what the value will be before running. I'm not sure how we could implement that.