Skip to content

Commit 9b1589f

Browse files
author
FelixAbrahamsson
committed
improve: remove inhereitance from torch dataset
1 parent b3994cc commit 9b1589f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

datastream/dataset.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
11
from __future__ import annotations
22
from pydantic import BaseModel
33
from typing import (
4-
Tuple, Callable, Any, Union, List, TypeVar, Generic, Dict, Optional
4+
Tuple, Callable, Union, List, TypeVar, Generic, Dict, Optional
55
)
66
from pathlib import Path
77
from functools import lru_cache
88
import textwrap
99
import inspect
1010
import numpy as np
1111
import pandas as pd
12-
import torch
1312
from datastream import tools
1413

1514

1615
T = TypeVar('T')
1716
R = TypeVar('R')
1817

1918

20-
class Dataset(BaseModel, torch.utils.data.Dataset, Generic[T]):
19+
class Dataset(BaseModel, Generic[T]):
2120
'''
2221
A ``Dataset[T]`` is a mapping that allows pipelining of functions in a
2322
readable syntax returning an example of type ``T``.

0 commit comments

Comments
 (0)