agatha.construct.file_util module

agatha.construct.file_util.copy_to_local_scratch(src, local_scratch_dir)
Return type

Path

agatha.construct.file_util.get_part_files(dir_path)
Return type

List[Path]

agatha.construct.file_util.get_random_ascii_str(str_len)
Return type

str

agatha.construct.file_util.is_result_saved(path)
Return type

bool

agatha.construct.file_util.load(dir_path, allow_failure=False)
Return type

Bag

agatha.construct.file_util.load_part(path, allow_failure=False)
Return type

List[Any]

agatha.construct.file_util.load_random_sample_to_memory(data_dir, value_sample_rate=1, partition_sample_rate=1, disable_pbar=False)
Return type

List[Any]

agatha.construct.file_util.load_to_memory(dir_path, disable_pbar=False)

Performs loading right now, without dask

Return type

List[Any]

agatha.construct.file_util.load_value(path)

Loads an arbitrary object.

Return type

Any

agatha.construct.file_util.prep_scratches(local_scratch_root, shared_scratch_root, task_name)
Return type

Tuple[Path, Path]

agatha.construct.file_util.save(bag, path, keep_partial_result=False, textfile=False)
Return type

delayed

agatha.construct.file_util.save_part(part, path, textfile=False)

Stores that partition at path, returns path

Return type

Path

agatha.construct.file_util.save_value(value, path)

Saves an arbitrary object.

Return type

None

agatha.construct.file_util.touch_random_unused_file(base_dir, ext=None)
Return type

Path

agatha.construct.file_util.wait_for_file_to_appear(file_path, max_tries=5)
Return type

None

agatha.construct.file_util.write_done_file(parts, part_dir)
Return type

Path