Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some bugs #677

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion batchflow/batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class Batch(metaclass=MethodsTransformingMeta):

def __init__(self, index, dataset=None, pipeline=None, preloaded=None, copy=False, *args, **kwargs):
_ = args
if self.components is not None and not isinstance(self.components, tuple):
if self.components is not None and not isinstance(self.components, tuple):
raise TypeError("components should be a tuple of strings with components names")
self.index = index
self._preloaded_lock = threading.Lock()
Expand Down
5 changes: 3 additions & 2 deletions batchflow/batch_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ def _make_path(self, ix, src=None):
path : str
Full path to an element.
"""

if isinstance(src, FilesIndex):
if src is None:
path = str(ix)
elif isinstance(src, FilesIndex):
path = src.get_fullpath(ix)
elif isinstance(self.index, FilesIndex):
path = self.index.get_fullpath(ix)
Expand Down