lama/scripts/lama_job_runner.py
def make_jobs_file(jobs_file: Path, root_dir: Path):
    """
    Creates a joblist csv file for use with lama_job_runner.
    Searches for all images paths in subdirectories of root_dir/inputs
    and ...

    Parameters
    ----------
    jobfile_path: Path to save job file to
    root_dir: the root project directory
    is_mutants: if True search the folder for individual line sub folders

    """
    output_dir = root_dir / 'output'
    output_dir.mkdir(exist_ok=True)

    jobs_entries = []

    input_root_dir = root_dir / 'inputs'  # This will contain one or more line folders or a single baseline folder

    # Get the line subdirectories
    for line in input_root_dir.iterdir():
        if not line.is_dir():
            continue
        for vol_path in line.iterdir():

            # Create a job entry. Dir will be the specimen directory relative to the jobs file
            rel_path_to_specimen_input = str(vol_path.relative_to(root_dir))
            jobs_entries.append([rel_path_to_specimen_input, 'to_run', '_', '_', '_'])

    jobs_df = pd.DataFrame.from_records(jobs_entries, columns=['job', 'status', 'host', 'start_time', 'end_time'])

    jobs_df.to_csv(jobs_file)
    return True

    Creates a joblist csv file for use with lama_job_runner.
    Searches for all images paths in subdirectories of root_dir/inputs
    and ...

    Parameters
    ----------
    jobfile_path: Path to save job file to
    root_dir: the root project directory
    is_mutants: if True search the folder for individual line sub folders

    
Creates a joblist csv file for use with lama_job_runner.
Searches for all images paths in subdirectories of root_dir/inputs
and

Parameters

Path to save job file to
root_dir: the root project directory
is_mutants: if True search the folder for individual line sub folders
Creates a joblist csv file for use with lama_job_runner . Searches for all images paths in subdirectories of root_dir / inputs and Parameters Path to save job file to root_dir : the root project directory is_mutants : if True search the folder for individual line sub folders
def make_jobs_file(jobs_file: Path, root_dir: Path):
    output_dir = root_dir / 'output'
    output_dir.mkdir(exist_ok=True)
    jobs_entries = []
    input_root_dir = root_dir / 'inputs'  
    for line in input_root_dir.iterdir():
        if not line.is_dir():
            continue
        for vol_path in line.iterdir():
            rel_path_to_specimen_input = str(vol_path.relative_to(root_dir))
            jobs_entries.append([rel_path_to_specimen_input, 'to_run', '_', '_', '_'])
    jobs_df = pd.DataFrame.from_records(jobs_entries, columns=['job', 'status', 'host', 'start_time', 'end_time'])
    jobs_df.to_csv(jobs_file)
    return True
def make_jobs_file ( jobs_file : Path , root_dir : Path ) : output_dir = root_dir / 'output' output_dir . mkdir ( exist_ok = True ) jobs_entries = [ ] input_root_dir = root_dir / 'inputs' for line in input_root_dir . iterdir ( ) : if not line . is_dir ( ) : continue for vol_path in line . iterdir ( ) : rel_path_to_specimen_input = str ( vol_path . relative_to ( root_dir ) ) jobs_entries . append ( [ rel_path_to_specimen_input , 'to_run' , '_' , '_' , '_' ] ) jobs_df = pd . DataFrame . from_records ( jobs_entries , columns = [ 'job' , 'status' , 'host' , 'start_time' , 'end_time' ] ) jobs_df . to_csv ( jobs_file ) return True
Creates a joblist csv file for use with lama_job_runner.
Creates a joblist csv file for use with lama_job_runner .
"""
    Creates a joblist csv file for use with lama_job_runner.
    Searches for all images paths in subdirectories of root_dir/inputs
    and ...

    Parameters
    ----------
    jobfile_path: Path to save job file to
    root_dir: the root project directory
    is_mutants: if True search the folder for individual line sub folders

    """ # This will contain one or more line folders or a single baseline folder # Get the line subdirectories # Create a job entry. Dir will be the specimen directory relative to the jobs file
jobs_file
Path
root_dir
Path