Vector Scheduler

@Stefan and team, great forum and really cool project here!

Out of sheer curiosity, can you create and run Vector Scheduler workflows (typically .wfl files) with PyHamilton? If yes, I can’t wait to see an example. If not, how might you try to tackle this especially the handling of parameters for the tasks which will now correspond to Python scripts rather than .hsl files? How would you go about designing activities? Since you still have to use Method Editor for the deck layout, I assume adding resources wouldn’t be an issue though.

1 Like

Hi, thanks for the question.

I’m only a little familiar with the Vector Scheduler. My understanding is it lets you link a sequence of methods together into a larger process. So you have methods A, B, and C, and the scheduler lets you run A->B->C within a single workflow.

There are a lot of options for this in PyHamilton. One possibility is to define each separate method as a function, and call each function sequentially in a Python script. Here’s how this might look:

from pyhamilton import tip_pick_up, aspirate, dispense, tip_eject

def parse_worklist():

def method_1(num_samples, plate_barcode):

def method_2(worklist_path):
    worklist = parse_worklist(...)

if __name__ == '__main__':
    with HamiltonInterface(simulate = False) as ham_int:

Crucially, we can (and should) define these method functions separately in a common repository or library of functions. That way I can arbitrarily orchestrate any set of method functions in any order I want.

The “scheduler” part of the above code is the very last two lines. Let me know if this answers your question and if you’d like any more info.


Once you are in the python ecosystem, you might as well go for a well-tested python scheduler instead (assuming you mean dynamic scheduling rather than just method composition/orchestration), something like User guide — APScheduler 3.9.1 documentation, coupled with parameterised/CLI python calls (using something like click) could work well.


This tool seems perfect, thanks for posting it!

1 Like