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
import numpy as np | |
import torch | |
from torch.utils.data import Dataset, Subset, TensorDataset | |
from typing import ( | |
Callable, | |
Iterator, | |
Literal, | |
Optional, | |
Sequence, | |
Tuple, |
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
import logging | |
import operator as o | |
from typing import Callable, Union, Any, Type | |
log = logging.getLogger() | |
class _FunctionWrapper: | |
def __init__(self, function: Callable, name: str = None): | |
self.function = function |
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
import json | |
from abc import ABC, abstractmethod | |
from copy import copy | |
from enum import Enum | |
from typing import Generic, List, Type, TypeVar, get_args | |
import numpy as np | |
class KeyEnum(str, Enum): |