-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
17 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,27 @@ | ||
"""Machine learning generic data formats""" | ||
from typing import List | ||
from typing import Generic, TypeVar, Optional | ||
from pathlib import Path | ||
from . import Base, argument | ||
from experimaestro import Param, Meta, argument | ||
from . import Base | ||
|
||
Train = TypeVar("Train", bound=Base) | ||
Validation = TypeVar("Validation", bound=Base) | ||
Test = TypeVar("Test", bound=Base) | ||
|
||
@argument("train", type=Base, help="The training dataset") | ||
@argument("validation", type=Base, help="The validation dataset", required=False) | ||
@argument("test", type=Base, help="The test dataset", required=False) | ||
class Supervised(Base): | ||
pass | ||
|
||
class Supervised(Base, Generic[Train, Validation, Test]): | ||
train: Param[Base] | ||
"""The training dataset""" | ||
|
||
validation: Param[Optional[Base]] = None | ||
"""The validation dataset (optional)""" | ||
|
||
test: Param[Optional[Base]] = None | ||
"""The training optional""" | ||
|
||
|
||
@argument("path", type=Path) | ||
@argument("classes") | ||
class FolderBased(Base): | ||
"""Classification dataset where folders give the basis""" | ||
|
||
pass | ||
path: Meta[Path] |