When experimenting on one data-set, it is convenient to import petrid to get petric.get_data(). However, currently the import actually reads all (3) data-sets. That takes some time and a lot of memory (and will just become worse). This is due to
https://github.com/SyneRBI/PETRIC/blob/58750541908e4ace9d47e4aed731c709628574ca/petric.py#L171-L181
I suggest to convert data_metric_pairs a list of pairs of srcdir, outdir and metrics. This will also have the effect that the redirection
https://github.com/SyneRBI/PETRIC/blob/58750541908e4ace9d47e4aed731c709628574ca/petric.py#L155-L156
will write files in the relevant outdir when get_data is called (currently, all redirections will be in the folder for the last get_data call).
(By the way, the redirection filenames should not use the BSREM prefix.)
When experimenting on one data-set, it is convenient to
import petrid
to getpetric.get_data()
. However, currently the import actually reads all (3) data-sets. That takes some time and a lot of memory (and will just become worse). This is due to https://github.com/SyneRBI/PETRIC/blob/58750541908e4ace9d47e4aed731c709628574ca/petric.py#L171-L181 I suggest to convertdata_metric_pairs
a list of pairs ofsrcdir
,outdir
andmetrics
. This will also have the effect that the redirection https://github.com/SyneRBI/PETRIC/blob/58750541908e4ace9d47e4aed731c709628574ca/petric.py#L155-L156 will write files in the relevant outdir whenget_data
is called (currently, all redirections will be in the folder for the lastget_data
call). (By the way, the redirection filenames should not use theBSREM
prefix.)Also, I see no reason to have https://github.com/SyneRBI/PETRIC/blob/58750541908e4ace9d47e4aed731c709628574ca/petric.py#L182-L183