TopLevelMfaWorker#

class montreal_forced_aligner.abc.TopLevelMfaWorker(**kwargs)[source]#

Bases: MfaWorker, TemporaryDirectoryMixin

Abstract mixin for top-level workers in MFA. This class holds properties about the larger workflow run.

Parameters:
  • num_jobs (int) – Number of jobs and processes to use

  • clean (bool) – Flag for whether to remove any old files in the work directory

check_previous_run()[source]#

Check whether a previous run has any conflicting settings with the current run.

Returns:

Flag for whether the current run is compatible with the previous one

Return type:

bool

cleanup()[source]#

Clean up loggers and output final message for top-level workers

cleanup_logger()[source]#

Ensure that loggers are cleaned up on delete

property identifier#

Combined identifier of the data source and workflow

property log_file#

Path to the worker’s log file

property output_directory#

Root temporary directory to store all of this worker’s files

classmethod parse_args(args, unknown_args)[source]#

Class method for parsing configuration parameters from command line arguments

Parameters:
  • args (dict[str, Any]) – Parsed arguments

  • unknown_args (list[str]) – Optional list of arguments that were not parsed

Returns:

Dictionary of specified configuration parameters

Return type:

dict[str, Any]

classmethod parse_parameters(config_path=None, args=None, unknown_args=None)[source]#

Parse configuration parameters from a config file and command line arguments

Parameters:
  • config_path (Path, optional) – Path to yaml configuration file

  • args (dict[str, Any]) – Parsed arguments

  • unknown_args (list[str]) – Optional list of arguments that were not parsed

Returns:

Dictionary of specified configuration parameters

Return type:

dict[str, Any]

save_worker_config()[source]#

Export worker configuration to its working directory

setup()[source]#

Setup for worker

setup_logger()[source]#

Construct a logger for a command line run

property worker_config_path#

Path to worker’s configuration in the working directory

property working_directory#

Alias for a folder that contains worker information, separate from the data directory