Skip to content
Snippets Groups Projects
Commit 7b812c6c authored by Daniel CARRON's avatar Daniel CARRON :b:
Browse files

Changed typing of DatabaseSplit from dict to abc.Mapping

parent af6674cc
No related branches found
No related tags found
No related merge requests found
Pipeline #76455 failed
...@@ -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.
Please register or to comment