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

Move utility functions from _enqueue_next_runnable_component #7895

Merged
merged 1 commit into from
Jun 20, 2024

Conversation

silvanocerza
Copy link
Contributor

Related Issues

Part of #7614

Proposed Changes:

Move the following functions out of _enqueue_next_runnable_component:

  • _is_lazy_variadic
  • _has_all_inputs_with_defaults
  • _add_missing_input_defaults

They're going to be used in other functions.

How did you test it?

Ran tests locally.

Notes for the reviewer

N/A

Checklist

@silvanocerza silvanocerza added the ignore-for-release-notes PRs with this flag won't be included in the release notes. label Jun 19, 2024
@silvanocerza silvanocerza self-assigned this Jun 19, 2024
@silvanocerza silvanocerza requested a review from a team as a code owner June 19, 2024 16:10
@silvanocerza silvanocerza requested review from davidsbatista and removed request for a team and davidsbatista June 19, 2024 16:10
@github-actions github-actions bot added topic:core type:documentation Improvements on the docs labels Jun 19, 2024
@silvanocerza silvanocerza merged commit 4f4c1d6 into refactor/pipeline-run Jun 20, 2024
16 checks passed
@silvanocerza silvanocerza deleted the move-utility-functions branch June 20, 2024 08:19
shadeMe added a commit that referenced this pull request Jul 12, 2024
* Move utility functions from _enqueue_next_runnable_component (#7895)

* Isolate logic to check if we're stuck in a loop

* Simplify for else

* Add missing return in docstring

* Emit warning when stuck in a loop

* Fix docstring

Co-authored-by: Madeesh Kannan <shadeMe@users.noreply.github.com>

* Add utility function to move Components in queues

* Add function to find next Component to run

* Comment update

* Add missing break in loop

* Make _add_missing_input_defaults less error prone and add tests

* Fix tests

* Update docstring

* Simplify enqueue logic

* Remove unused _enqueue_next_runnable_component function

* Add method to find Component with lazy variadic input or all inputs with defaults

* Simplify _find_next_runnable_lazy_variadic_or_default_component

* Remove unnecessary type ignore

* Split _dequeue_components_that_received_no_input into separate functions

* Fix linting

* Simplify variadic check when running Component

* Simplify code

* Reorganize functions used by Pipeline.run

* Rename variables used in Pipeline.run() for clarity

* Add comment clarifying last_waiting_queue and before_last_waiting_queue

* Add functions to easily update waiting_queue

---------

Co-authored-by: Madeesh Kannan <shadeMe@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ignore-for-release-notes PRs with this flag won't be included in the release notes. topic:core type:documentation Improvements on the docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants