@File : save_data.py @Time : 2025/04/03 10:02:16 @Author : Alejandro Marrero @Version : 1.0 @Contact : amarrerd@ull.edu.es @License : (C)Copyright 2025, Alejandro Marrero @Desc : None
save_results_to_files(base_dir, filename_pattern, result, variables_names=None, descriptor_names=None, lazily=False, only_instances=False, files_format='parquet')
Saves the results of the generation to CSV files. Args: filename_pattern (str): Pattern for the filenames. result (GenResult): Result of the generation. variables_names (Sequence[str]): Names of the variables. lazily (bool, optional): Whether the instances inside the result object should be collected as a LazyFrame or a DataFrame. Defaults ot False. only_instances (bool): Generate only the files with the resulting instances. Default True. If False, it would generate an history and arhice_metrics files. files_format (Literal[str] = "csv", "parquet"): Format to store the resulting instances file. Parquet is the most efficient for large datasets.
Source code in digneapy/utils/save_data.py
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | |