mirror of
https://github.com/macaodha/batdetect2.git
synced 2025-06-29 14:41:58 +02:00
Add load dataset config function
This commit is contained in:
parent
b5b4229990
commit
235f0e27da
@ -8,6 +8,7 @@ from batdetect2.data.annotations import (
|
||||
from batdetect2.data.datasets import (
|
||||
DatasetConfig,
|
||||
load_dataset,
|
||||
load_dataset_config,
|
||||
load_dataset_from_config,
|
||||
)
|
||||
|
||||
@ -19,5 +20,6 @@ __all__ = [
|
||||
"DatasetConfig",
|
||||
"load_annotated_dataset",
|
||||
"load_dataset",
|
||||
"load_dataset_config",
|
||||
"load_dataset_from_config",
|
||||
]
|
||||
|
@ -161,6 +161,11 @@ def insert_source_tag(
|
||||
)
|
||||
|
||||
|
||||
# TODO: add documentation
|
||||
def load_dataset_config(path: data.PathLike, field: Optional[str] = None):
|
||||
return load_config(path=path, schema=DatasetConfig, field=field)
|
||||
|
||||
|
||||
def load_dataset_from_config(
|
||||
path: data.PathLike,
|
||||
field: Optional[str] = None,
|
||||
|
Loading…
Reference in New Issue
Block a user