Comments (5)
@koning mentioned this may be another concept related to one-off execution: running a single merlin task from the queue.
Something like:
merlin run-one myworkflow.yaml
would retrieve the first task in the merlin queue, run that task, and finish. In every situation I can imagine, you'd just run the task in the current shell (rather than using srun or equivalent--if you want to do this inside a batch allocation, you could srun merlin run-one
)
Ideally, this would ask celery to retrieve and run a single task, then quit. If celery does not have this feature, presumably a run-one
feature is still possible by manually querying the task queue, running the queue.
This could take a -n
argument to run n tasks then quit.
It could also take a -i
argument to run the i-th task, though I don't see why you'd need this.
For context: see the Fireworks feature rlaunch singleshot
, which does this: retrieves a single task from the queue and executes it.
from merlin.
For the one-off part of the feature discussion, this reminds me of something I'd wanted to add to maestro a while back and had forgotten about. I just made the ticket here before forgetting again: LLNL/maestrowf#293. The gist of it is enabling extra arguments to pass through to the scheduler, such as slurms' delayed execution time (presumably other schedulers have something similar). This would make it pretty easy to use the inherited script adapter to make and submit these one-off scripts. That still leaves parsing out what a one off is to dump into this script: whole step, single sample in a step, or all steps in a sample's chain.
Also, for a one off, does it make sense to run any of this through the servers vs just submitting the single batch script? I know celery has features for this but it seems like a lot of extra unnecessary steps to kickstart that vs a single script.
from merlin.
Thinking of all the args we'd need for this.
--local
for consistency--args
equivalent tomerlin.resources.workers.<worker_name>.args
--queue
name of the task queue to use--block
or--noblock
Thing is, we currently need a yaml spec for run-workers
so would we want an alternate, simplified run-workers
command too?
from merlin.
In the merlin world the "run" argument is synonymous with "define tasks". Nothing will run at that point, only when workers are started will the tasks be run.
So in your case is:
merlin run-one myworkflow.yaml
defining a single task from the yaml or a single instance of the DAG in the yaml file (all steps for one sample)?
We would need to change the producer/consumer concept for merlin run-one
to actually run a step. Maybe it could alos start local workers in that case.
from merlin.
We could call this concept merlin consume-one
for now--versus the example at the top of this issue which looks like produce-one
. It consumes one task from the queue associated with the provided yaml file. It should be as close as possible to merlin run-workers
, except instead of continually consuming tasks it will stop after a single task is consumed.
Why would somebody want this? Suppose the DAG looks like:
Single setup -> many samples step 1 -> step 2 for each sample.
I might want to run the setup step and check that things look correct.
Or, perhaps I've finished all the step 1s, but I haven't started the step 2s (because step 2 uses a different machine, and I haven't launched any workers on that machine). Maybe I'd like to run a step 2 individually to check if it's working before spinning up a whole bunch of workers.
Or perhaps I come back after a couple of days to see that my batch sessions have timed out and there are still a few step 1s left in the queue. I could run a single one of those immediately to see what the issue is.
from merlin.
Related Issues (20)
- [FUTURE WORK] Return to PR 337
- [BUG] merlin example list gives an error HOT 4
- [BUG] errors hidden in sample generation
- [FEAT] Adding configuration features to merlin server command. HOT 2
- [FEAT] Unify merlin server config and configfile app.yaml HOT 1
- [FEAT] Need to transition off lgtm to github code-scanning
- [FEAT] Launch workers with flux if it is the main scheduler HOT 2
- "merlin stop-workers" with "--spec" and "--queues" flags does not work
- [BUG] JSON Schema Validation causes failures with restarts/resubmits
- Basic Workflow examples requires another service? HOT 29
- Add what is the default concurrency value to the documentation HOT 1
- Walltime in Batch Block HOT 4
- Question: where does singularity openfoam image get pulled? HOT 10
- Step restart may not work with many workers and long run times HOT 2
- [BUG] MERLIN_SPEC variables are not working properly HOT 11
- [BUG] slurm_par example only spins up 1 node instead of 2
- Unable to Place Environment Varibles in field resources.workers.sim_workers.nodes of merlin section
- subprocess in check_for_scheduler can also raise PermissionError HOT 1
- [FEAT] Allow for None and empty string in some batch input HOT 2
- [BUG] new “merlin status” on old workflows HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from merlin.