xffl.workflow.templates.cwl¶
Collection of CWL-related template code
Attributes¶
Default xFFL logger |
Classes¶
Class modelling a CWL configuration file as a YamlConfig object |
|
Abstract base class describing workflow-like objects |
|
Workflow describing the Federated Learning aggregation step |
|
Main description of a Federated Learning workflow |
|
Round workflow CWL description |
|
Workflow modelling a training step |
Module Contents¶
- xffl.workflow.templates.cwl.logger: logging.Logger¶
Default xFFL logger
- class xffl.workflow.templates.cwl.CWLConfig¶
Bases:
xffl.workflow.config.YamlConfig
Class modelling a CWL configuration file as a YamlConfig object
- classmethod get_default_content() collections.abc.MutableMapping[str, Any] ¶
Returns a basic CWL configuration to be updated and saved into a .yml
- Returns:
Basic CWL configuration for xFFL
- Return type:
MutableMapping[str, Any]
- add_inputs(facility_name: str, extra_inputs: collections.abc.MutableMapping[str, Any]) None ¶
Adds the CWL inputs to the YAML content
- Parameters:
facility_name (str) – Facility’s name
extra_inputs (MutableMapping[str, Any]) – Extra inputs
- class xffl.workflow.templates.cwl.Workflow¶
Bases:
abc.ABC
Abstract base class describing workflow-like objects
- cwl: cwl_utils.parser.cwl_v1_2.Process¶
- classmethod get_default_definition() cwl_utils.parser.cwl_v1_2.Process ¶
Returns the default workflow definition
- Returns:
Default workflow definition
- Return type:
cwl.Process()
- save() collections.abc.MutableMapping[str, Any] ¶
Returns the current CWL Workflow definition
- Returns:
Current CWL Workflow definition
- Return type:
MutableMapping[str, Any]
- abstractmethod add_inputs(facility_name: str, extra_inputs: collections.abc.MutableMapping[str, Any]) None ¶
Add the given extra inputs to the Workflow definition
- Parameters:
facility_name (str) – Facility’s name
extra_inputs (MutableMapping[str, str]) – Command line argument required by the executable script
- class xffl.workflow.templates.cwl.AggregateStep¶
Bases:
Workflow
Workflow describing the Federated Learning aggregation step
- classmethod get_default_definition() cwl_utils.parser.cwl_v1_2.Process ¶
Get the CWL file standard content for a xFFL application aggregation step
- Returns:
CWL object instance of the xFFL aggregation step
- Return type:
cwl.Process()
- add_inputs(facility_name: str, extra_inputs: collections.abc.MutableMapping[str, Any]) None ¶
Add the given extra inputs to the AggregateStep definition
- Parameters:
facility_name (str) – Facility’s name
extra_inputs (MutableMapping[str, str]) – Command line argument required by the executable script
- class xffl.workflow.templates.cwl.MainWorkflow¶
Bases:
Workflow
Main description of a Federated Learning workflow
- classmethod get_default_definition() cwl_utils.parser.cwl_v1_2.Process ¶
Get the CWL main file standard content for a xFFL application
- Returns:
CWL object instance of the xFFL main workflow
- Return type:
cwl.Process
- add_inputs(facility_name: str, extra_inputs: collections.abc.MutableMapping[str, Any]) None ¶
Add the given extra inputs to the MainWorkflow definition
- Parameters:
facility_name (str) – Facility’s name
extra_inputs (MutableMapping[str, str]) – Command line argument required by the executable script [name: cwl type]
- class xffl.workflow.templates.cwl.RoundWorkflow¶
Bases:
Workflow
Round workflow CWL description
- classmethod get_default_definition() cwl_utils.parser.cwl_v1_2.Process ¶
Get the CWL round file standard content for a xFFL application
- Returns:
round.cwl template
- Return type:
cwl.Process
- classmethod get_training_step(name: str) cwl_utils.parser.cwl_v1_2.Process ¶
Get the CWL file standard content for a xFFL application step
- Parameters:
name (str) – Name of the facility on which the step will be executed
- Returns:
Dict template of a CWL xFFL step
- Return type:
cwl.Process
- add_inputs(facility_name: str, extra_inputs: collections.abc.MutableMapping[str, Any]) None ¶
Add the given extra inputs to the RoundWorkflow definition
- Parameters:
facility_name (str) – Facility’s name
extra_inputs (MutableMapping[str, str]) – Command line argument required by the executable script [name: cwl type]
- update_merge_step() None ¶
Updates the merge step
- class xffl.workflow.templates.cwl.TrainingStep¶
Bases:
Workflow
Workflow modelling a training step
- classmethod get_default_definition() cwl_utils.parser.cwl_v1_2.Process ¶
Get the CWL file standard content for a xFFL application training step
- Returns:
CWL object instance of a xFFL training step
- Return type:
cwl.Process
- add_inputs(facility_name: str | None, extra_inputs: collections.abc.MutableMapping[str, Any]) None ¶
Add the given extra inputs to the TrainingStep definition
- Parameters:
facility_name (str) – Facility’s name
extra_inputs (MutableMapping[str, str]) – Command line argument required by the executable script [name: cwl type]
- get_available_position() int ¶