Skip to content

Commit bc5b5ec

Browse files
authored
Merge pull request #91 from ChEB-AI/fix/reader_dirname
Fix for reader directory for subclasses defined in other repository
2 parents 92d60f1 + 36ee9e1 commit bc5b5ec

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)