This module contains some of the most central FireWorks classes:
Bases: fireworks.utilities.fw_serializers.FWSerializable
Parameters: |
|
---|
If the FWAction gives any dynamic action, we skip the subsequent FireTasks
Returns: | (bool) |
---|
Bases: dict, fireworks.utilities.fw_serializers.FWSerializable
FireTaskBase is used like an abstract class that defines a computing task (FireTask). All FireTasks should inherit from FireTaskBase.
You can set parameters of a FireTask like you’d use a dict.
This method gets called when the FireTask is run. It can take in a FireWork spec, perform some task using that data, and then return an output in the form of a FWAction.
Parameters: | fw_spec – (dict) a FireWork spec |
---|---|
Returns: | (FWAction) |
Bases: fireworks.utilities.fw_serializers.FWSerializable
A FireWork is a workflow step and might be contain several FireTasks
Parameters: |
|
---|
Bases: fireworks.utilities.fw_serializers.FWSerializable, object
A Launch encapsulates data about a specific run of a FireWork on a computing resource
Parameters: |
|
---|
Returns: | (datetime) the time the Launch last pinged a heartbeat that it was still running |
---|
Returns: | (int) number of seconds the Launch was stuck as RESERVED in a queue |
---|
Returns: | (int) the number of seconds that the Launch ran for |
---|
Adds the job_id to the reservation
Parameters: | reservation_id – (str) the id of the reservation (e.g., queue reservation) |
---|
Returns: | (str) The current state of the Launch. |
---|
Returns: | (datetime) the time the Launch was COMPLETED or FIZZLED |
---|
Returns: | (datetime) the time the Launch was RESERVED in the queue |
---|
Returns: | (datetime) the time the Launch started RUNNING |
---|
Updates the update_at field of the state history of a Launch. Used to ping that a Launch is still alive.
Bases: fireworks.utilities.fw_serializers.FWSerializable
A Workflow connects a group of FireWorks in an execution order
Bases: dict, fireworks.utilities.fw_serializers.FWSerializable
An inner class for storing the DAG links between FireWorks
Parameters: |
|
---|
Apply a FWAction on a FireWork in the Workflow
Parameters: |
|
---|---|
Returns: | ([int]) list of FireWork ids that were updated or new |
Gets leaf FireWorks of this workflow (those with no children)
Returns: | ([int]) FireWork ids of leaf FWs |
---|
Refreshes the state of a FireWork and any affected children.
Parameters: |
|
---|---|
Returns: | ([int]) list of FireWork ids that were updated |
Gets root FireWorks of this workflow (those with no parents)
Returns: | ([int]) FireWork ids of root FWs |
---|
A set of global constants for FireWorks (Python code as a config file)
This module contains FireWorker, which encapsulates information about a computing resource
Bases: fireworks.utilities.fw_serializers.FWSerializable
Parameters: |
|
---|
The LaunchPad manages the FireWorks database.
Bases: fireworks.utilities.fw_serializers.FWSerializable
The LaunchPad manages the FireWorks database.
Parameters: |
|
---|
Parameters: | wf – a Workflow object. |
---|
Given a FireWork id, give back a FireWork object
Parameters: | fw_id – FireWork id (int) |
---|---|
Returns: | FireWork object |
Return all the fw ids that match a query, :param query: a dict representing a Mongo query
Given a Launch id, return details of the Launch
Parameters: | launch_id – launch id |
---|---|
Returns: | Launch object |
Checkout the next FireWork id
Checkout the next Launch id
Given a FireWork id, give back the Workflow containing that FireWork :param fw_id: :return: A Workflow object
Create a new FireWorks database. This will overwrite the existing FireWorks database! To safeguard against accidentally erasing an existing database, a password must be entered.
Parameters: |
|
---|
Checks to see if the database contains any FireWorks that are ready to run :return: (T/F)
Note: usernames/passwords are exported as unencrypted Strings!
A Rocket fetches a FireWork from the database, runs the sequence of FireTasks inside, and then completes the Launch
The Rocket fetches a workflow step from the FireWorks database and executes it.
Parameters: |
|
---|
Run the rocket (check out a job from the database and execute it)
This module contains methods for launching Rockets, both singly and in rapid-fire mode
Run a single rocket in the current directory :param launchpad: (LaunchPad) :param fworker: (FWorker) :param fw_id: (int) if set, a particular FireWork to run :param strm_lvl: (str) level at which to output logs to stdout
Keeps running Rockets in m_dir until we reach an error. Automatically creates subdirectories for each Rocket. Usually stops when we run out of FireWorks from the LaunchPad.
Parameters: |
|
---|