Skip to content

Commit

Permalink
Fixup rtd build wrt compose metaclass conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
plstcharles committed Jan 25, 2019
1 parent c1d07e4 commit 0fd3a43
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions thelper/transforms/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class NoTransformWrapper(object):
pass


class Compose(torchvision.transforms.Compose, NoTransformWrapper):
class Compose(torchvision.transforms.Compose):
"""Composes several transforms together (with support for invert ops).
This interface is fully compatible with ``torchvision.transforms.Compose``.
Expand Down Expand Up @@ -80,7 +80,7 @@ def set_epoch(self, epoch=0):
t.set_epoch(epoch)


class CustomStepCompose(torchvision.transforms.Compose, NoTransformWrapper):
class CustomStepCompose(torchvision.transforms.Compose):
"""Composes several transforms together based on an epoch schedule.
This interface is fully compatible with ``torchvision.transforms.Compose``. It can be useful if
Expand Down
3 changes: 2 additions & 1 deletion thelper/transforms/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ def load_transforms(stages):
operation_type = thelper.utils.import_class(operation_name)
operation = operation_type(**operation_params)
if not isinstance(operation, (thelper.transforms.wrappers.TransformWrapper,
thelper.transforms.operations.NoTransformWrapper)):
thelper.transforms.operations.NoTransformWrapper,
torchvision.transforms.Compose)):
operations.append(thelper.transforms.wrappers.TransformWrapper(operation,
target_keys=operation_targets,
linked_fate=linked_fate))
Expand Down

0 comments on commit 0fd3a43

Please sign in to comment.