lama/registration_pipeline/validate_config.py
def check_paths(self):
        """
        Check the presence of files named in the config.
        All paths are relative to the config dir. Set the resolved paths in self.options
        """
        failed = []

        # Check the target paths first. Paths that should be in the target folder
        target_folder = (self.config_dir / self.config['target_folder']).resolve()
        if not target_folder.is_dir():
            raise LamaConfigError(f'target folder not found: {target_folder}')

        self.options['target_dir'] = target_folder

        for tn in self.target_names:
            if tn in self.config:
                target_path = target_folder / self.config[tn]
                if not target_path.exists():
                    failed.append(target_path)
                else:
                    self.options[tn] = target_path
                    self.space_filename_check(target_path)
            else:
                self.options[tn] = None

        # Check paths
        if not self.config.get('inputs'):
            #
            self.options['inputs'] = self.config_dir / 'inputs'
        else:
            self.options['inputs'] = self.config_dir / self.config['inputs']

        if failed:
            for f in failed:
                logging.error("Cannot find '{}'. All paths need to be relative to config file".format(f))
            raise LamaConfigError("Cannot find '{}'. All paths need to be relative to config file".format(f))

        Check the presence of files named in the config.
        All paths are relative to the config dir. Set the resolved paths in self.options
        
Check the presence of files named in the config.
All paths are relative to the config dir. Set the resolved paths in self.options
Check the presence of files named in the config . All paths are relative to the config dir . Set the resolved paths in self . options
def check_paths(self):
        failed = []
        target_folder = (self.config_dir / self.config['target_folder']).resolve()
        if not target_folder.is_dir():
            raise LamaConfigError(f'target folder not found: {target_folder}')
        self.options['target_dir'] = target_folder
        for tn in self.target_names:
            if tn in self.config:
                target_path = target_folder / self.config[tn]
                if not target_path.exists():
                    failed.append(target_path)
                else:
                    self.options[tn] = target_path
                    self.space_filename_check(target_path)
            else:
                self.options[tn] = None
        if not self.config.get('inputs'):
            self.options['inputs'] = self.config_dir / 'inputs'
        else:
            self.options['inputs'] = self.config_dir / self.config['inputs']
        if failed:
            for f in failed:
                logging.error("Cannot find '{}'. All paths need to be relative to config file".format(f))
            raise LamaConfigError("Cannot find '{}'. All paths need to be relative to config file".format(f))
def check_paths ( self ) : failed = [ ] target_folder = ( self . config_dir / self . config [ 'target_folder' ] ) . resolve ( ) if not target_folder . is_dir ( ) : raise LamaConfigError ( f'target folder not found: {target_folder}' ) self . options [ 'target_dir' ] = target_folder for tn in self . target_names : if tn in self . config : target_path = target_folder / self . config [ tn ] if not target_path . exists ( ) : failed . append ( target_path ) else : self . options [ tn ] = target_path self . space_filename_check ( target_path ) else : self . options [ tn ] = None if not self . config . get ( 'inputs' ) : self . options [ 'inputs' ] = self . config_dir / 'inputs' else : self . options [ 'inputs' ] = self . config_dir / self . config [ 'inputs' ] if failed : for f in failed : logging . error ( "Cannot find '{}'. All paths need to be relative to config file" . format ( f ) ) raise LamaConfigError ( "Cannot find '{}'. All paths need to be relative to config file" . format ( f ) )
Check the presence of files named in the config.
Check the presence of files named in the config .
"""
        Check the presence of files named in the config.
        All paths are relative to the config dir. Set the resolved paths in self.options
        """ # Check the target paths first. Paths that should be in the target folder # Check paths #
self