Skip to content
Snippets Groups Projects
Commit b2e2dc11 authored by Daniel CARRON's avatar Daniel CARRON :b: Committed by André Anjos
Browse files

Changed typing of DatabaseSplit from dict to abc.Mapping

parent 5605b8e7
No related branches found
No related tags found
1 merge request!6Making use of LightningDataModule and simplification of data loading
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
"""Defines most common types used in code.""" """Defines most common types used in code."""
import collections.abc
import typing import typing
import torch import torch
...@@ -47,12 +48,11 @@ Typically used in data-processing pipelines inside pytorch. ...@@ -47,12 +48,11 @@ Typically used in data-processing pipelines inside pytorch.
TransformSequence = typing.Sequence[Transform] TransformSequence = typing.Sequence[Transform]
"""A sequence of transforms.""" """A sequence of transforms."""
DatabaseSplit = dict[str, typing.Sequence[typing.Any]] DatabaseSplit = collections.abc.Mapping[str, typing.Sequence[typing.Any]]
"""The definition of a database script. """The definition of a database split.
A database script maps subset names to sequences of objects that, A database split maps subset names to sequences of objects that, through
through RawDataLoader's eventually become Samples in the processing RawDataLoader's eventually become Samples in the processing pipeline.
pipeline.
""" """
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment