montreal_forced_aligner/abc.py
def _validate_previous_configuration(self, conf: MetaDict) -> bool:
        """
        Validate the current configuration against a previous configuration

        Parameters
        ----------
        conf: dict[str, Any]
            Previous run's configuration

        Returns
        -------
        bool
            Flag for whether the current run is compatible with the previous one
        """
        from montreal_forced_aligner.utils import get_mfa_version

        clean = True
        current_version = get_mfa_version()
        if conf["dirty"]:
            self.logger.debug("Previous run ended in an error (maybe ctrl-c?)")
            clean = False
        if "type" in conf:
            command = conf["type"]
        elif "command" in conf:
            command = conf["command"]
        else:
            command = self.workflow_identifier
        if command != self.workflow_identifier:
            self.logger.debug(
                f"Previous run was a different subcommand than {self.workflow_identifier} (was {command})"
            )
            clean = False
        if conf.get("version", current_version) != current_version:
            self.logger.debug(
                f"Previous run was on {conf['version']} version (new run: {current_version})"
            )
            clean = False
        for key in [
            "corpus_directory",
            "dictionary_path",
            "acoustic_model_path",
            "g2p_model_path",
            "language_model_path",
        ]:
            if conf.get(key, None) != getattr(self, key, None):
                self.logger.debug(
                    f"Previous run used a different {key.replace('_', ' ')} than {getattr(self, key, None)} (was {conf.get(key, None)})"
                )
                clean = False
        return clean

        Validate the current configuration against a previous configuration

        Parameters
        ----------
        conf: dict[str, Any]
            Previous run's configuration

        Returns
        -------
        bool
            Flag for whether the current run is compatible with the previous one
        
Validate the current configuration against a previous configuration
Parameters

dict[str, Any]
Previous run's configuration

Returns

bool
Flag for whether the current run is compatible with the previous one
Validate the current configuration against a previous configuration Parameters dict [ str Any ] Previous run ' s configuration Returns bool Flag for whether the current run is compatible with the previous one
def _validate_previous_configuration(self, conf: MetaDict) -> bool:
        from montreal_forced_aligner.utils import get_mfa_version
        clean = True
        current_version = get_mfa_version()
        if conf["dirty"]:
            self.logger.debug("Previous run ended in an error (maybe ctrl-c?)")
            clean = False
        if "type" in conf:
            command = conf["type"]
        elif "command" in conf:
            command = conf["command"]
        else:
            command = self.workflow_identifier
        if command != self.workflow_identifier:
            self.logger.debug(
                f"Previous run was a different subcommand than {self.workflow_identifier} (was {command})"
            )
            clean = False
        if conf.get("version", current_version) != current_version:
            self.logger.debug(
                f"Previous run was on {conf['version']} version (new run: {current_version})"
            )
            clean = False
        for key in [
            "corpus_directory",
            "dictionary_path",
            "acoustic_model_path",
            "g2p_model_path",
            "language_model_path",
        ]:
            if conf.get(key, None) != getattr(self, key, None):
                self.logger.debug(
                    f"Previous run used a different {key.replace('_', ' ')} than {getattr(self, key, None)} (was {conf.get(key, None)})"
                )
                clean = False
        return clean
def _validate_previous_configuration ( self , conf : MetaDict ) -> bool : from montreal_forced_aligner . utils import get_mfa_version clean = True current_version = get_mfa_version ( ) if conf [ "dirty" ] : self . logger . debug ( "Previous run ended in an error (maybe ctrl-c?)" ) clean = False if "type" in conf : command = conf [ "type" ] elif "command" in conf : command = conf [ "command" ] else : command = self . workflow_identifier if command != self . workflow_identifier : self . logger . debug ( f"Previous run was a different subcommand than {self.workflow_identifier} (was {command})" ) clean = False if conf . get ( "version" , current_version ) != current_version : self . logger . debug ( f"Previous run was on {conf['version']} version (new run: {current_version})" ) clean = False for key in [ "corpus_directory" , "dictionary_path" , "acoustic_model_path" , "g2p_model_path" , "language_model_path" , ] : if conf . get ( key , None ) != getattr ( self , key , None ) : self . logger . debug ( f"Previous run used a different {key.replace('_', ' ')} than {getattr(self, key, None)} (was {conf.get(key, None)})" ) clean = False return clean
Validate the current configuration against a previous configuration
Parameters
Validate the current configuration against a previous configuration Parameters
"""
        Validate the current configuration against a previous configuration

        Parameters
        ----------
        conf: dict[str, Any]
            Previous run's configuration

        Returns
        -------
        bool
            Flag for whether the current run is compatible with the previous one
        """
self
conf
MetaDict