Utils
get_date_from_file(filename)
Extract date from filename.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
filenames |
List[str]
|
A list of filenames. |
required |
Returns:
Type | Description |
---|---|
datetime
|
List[str]: A list of dates extracted from the filenames. |
Source code in rs_tools/_src/datamodule/utils.py
get_dates_from_files(filenames)
Extract dates from a list of filenames.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
filenames |
List[str]
|
A list of filenames. |
required |
Returns:
Type | Description |
---|---|
List[datetime]
|
List[str]: A list of dates extracted from the filenames. |
Source code in rs_tools/_src/datamodule/utils.py
get_split(files, split_dict)
Split files based on dataset specification.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
files |
List
|
A list of files to be split. |
required |
split_dict |
DictConfig
|
A dictionary-like object containing the dataset specification. |
required |
Returns:
Type | Description |
---|---|
Tuple[List, List]
|
Tuple[List, List]: A tuple containing two lists: the training set and the validation set. |
Source code in rs_tools/_src/datamodule/utils.py
split_train_val(files, split_spec)
Split files into training and validation sets based on dataset specification.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
files |
List
|
A list of files to be split. |
required |
split_spec |
DictConfig
|
A dictionary-like object containing the dataset specification. |
required |
Returns:
Type | Description |
---|---|
Tuple[List, List]
|
Tuple[List, List]: A tuple containing two lists: the training set and the validation set. |