Skip to content

Vine: Simplify Basic Application - #4591

Merged
btovar merged 31 commits into
cooperative-computing-lab:masterfrom
dthain:vine-user-simplify
Dec 4, 2026
Merged

btovar merged 31 commits into
cooperative-computing-lab:masterfrom
dthain:vine-user-simplify

Conversation

@dthain

@dthain dthain commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

Proposed Changes

Integrated multiple changes to simplify the initial user experience and
encourage best practices in vine_hello.py for more complex applications:

  • Manager and Factory are stated in one line each at the top.
  • Manager name is encouraged to be {shortname}-{username}-{random}
  • with factory pattern is used for provisioning.
  • as_completed helper returns a generator and produces a progress bar.
  • manager.stats gives fresh data when called externally by the application.

Notes and limitations:

  • The with factory pattern results in a delay of abt 5s at the end, waiting for the factory (or maybe the worker) to shutdown. This needs to be looked at.
  • No changes to the manual yet, I am staging the capability first then will update the manual.

Merge Checklist

The following items must be completed before PRs can be merged.
Check these off to verify you have completed all steps.

  • make test Run local tests prior to pushing.
  • make format Format source code to comply with lint policies. Note that some lint errors can only be resolved manually (e.g., Python)
  • make lint Run lint on source code prior to pushing.
  • Manual Update: Update the manual to reflect user-visible changes.
  • Type Labels: Select a github label for the type: bugfix, enhancement, etc.
  • Product Labels: Select a github label for the product: TaskVine, Makeflow, etc.
  • PR RTM: Mark your PR as ready to merge.

@dthain

dthain commented Dec 2, 2026

Copy link
Copy Markdown
Member Author

@btovar @saifulislampi have look and give me your thoughts. This doesn't change anything in the function of existing applications, but does smooth the path for a "golden" example that can be used easily from a single terminal.

If possible, I would like to have a quick release done so that Saiful can use this in our tutorial at Middleware next week.

Comment thread taskvine/test/vine_hello.py Resolved
Comment thread environment.yml Resolved
@dthain
dthain requested a review from btovar December 3, 2026 16:27
@dthain

dthain commented Dec 3, 2026

Copy link
Copy Markdown
Member Author

RTM

@btovar
btovar merged commit d9bd329 into cooperative-computing-lab:master Dec 4, 2026
13 checks passed
@btovar btovar added this to the 7.17.7 milestone Dec 4, 2026
btovar added a commit that referenced this pull request Dec 4, 2026
* Patch from mislam5@nd.edu to add all factory command-line options.

* - Get most up-to-date stats when the user calls stats() explicity.

* Add shortname argument to manager to encourage common pattern of {shortname}-{username}-{random}.

* - Add simple "workers" argument to Factory.

* Added wait_all convenience function for user ergonomics.

* Add new hello world test case to serve as basic user template.

* No need to check for task True

* set_cores(1) to get local parallelism

* Add tqdm for new manager progress display.

* Clean up progress bar arrangement and output.
Fix bug -- don't yield when Task==None

* wait_all -> as_completed

* Include tasks_with_results in "Running" to avoid confusion

* Reverse order of bars so that they finish in order of rendering.

* More interesting output

* Put back cached behavior of stats() and update refresh interval inside progress bar.

* Switch from tqdm to rich.

* typo

* Make rich display optional, fall back to quiet output

* Remove junk file

* format

* Quiet fallback must yield from the quiet function, not return.

* Import and check for rich at the top.

* Keep namespace clean with rich objects inside function.

* Make progress bar relative to tasks submitted at start of call.

* format

* make sure name and shortname are not used at the same time.

* protect vs no uid inside container

* split verbose/quiet as_completed generators

* count manually done vs running

otherwise cached tasks are miscounted

* minor fixes to test

* fix ETA display

---------

Co-authored-by: Benjamin Tovar <btovar@nd.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants