This node provides an interface to write Python code for a custom PDG Scheduler and use it to schedule work items. The base Scheduler’s callbacks are exposed as Python text fields which should be filled in according to their function definition. Each callback field is then evaluated and executed during the general PDG work item schedule workflow. The Scheduler node API reference has a detailed explanation for each of the callback functions that you can implement.
The Python Scheduler node can be used as is in a TOP network, or it can be saved out to a Python file using the Save To Python button. The Save To Python functionality will write out a complete implementation of a custom Scheduler node with the filled in callback entries. The Python file should be placed in the PDG Python path (e.g. /home/username/houdini17.5/pdg/types/) so that it will be automatically picked up and registered with the Scheduler Factory. This happens on the launch of Houdini, which means changes to the custom Scheduler will require a relaunch of Houdini.
Once registered, the custom Scheduler node can be created by selecting it from the TAB menu under Schedulers. If it does not show up there, either the Python file was not found by Houdini at launch, or the Python file has errors.
Save To Python
Save this node out to a Python file, along with its custom callback entries.
Specifies the relative directory where the work generates intermediate files and output. The intermediate files are placed in a subdirectory. For the Local Scheduler or HQueue, typically
$HIP is used. For other schedulers, this should be a relative directory to
Local Shared Root Path and
Remote Shared Root Path; this path is then appended to these root paths.
Called when a work item needs to scheduled. Returns True if the work item has been successfully scheduled.
Called when the scheduler should process a static dependency graph.
Submit As Job
Called when the scheduler should cook the entire TOP Network as a standalone job. Returns the status URI for the submitted job.
Initialization and Cleanup
Called when the scheduler is registered with PDG. Should initialize or setup scheduler state.
Called when the scheduler is unregistered with PDG. Should clean up scheduler state.
Called when a cook starts, before any work items are scheduled. Returns True if started.
Called when cook completes or is canceled. Returns True if stopped.
Returns the URI that points to the log of the given work item (e.g. file:///myfarm/tasklogs/jobid20.log).
Returns the URI that points to the status of the given work item (e.g. http://myfarm/status/jobid20)