Skip to content

Commit 36ee9e1

Browse files
committed
fix dirname for subclasses defined in other repo
1 parent 94f6710 commit 36ee9e1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

chebai/preprocessing/reader.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import inspect
12
import os
23
import sys
34
from abc import ABC
@@ -39,7 +40,7 @@ def __init__(
3940
if collator_kwargs is None:
4041
collator_kwargs = dict()
4142
self.collator = self.COLLATOR(**collator_kwargs)
42-
self.dirname = os.path.dirname(__file__)
43+
self.dirname = os.path.dirname(inspect.getfile(self.__class__))
4344
self._token_path = token_path
4445

4546
def _get_raw_data(self, row: Dict[str, Any]) -> Any:

0 commit comments

Comments
 (0)