Project-MONAI / Project-MONAI/MONAI

LazyTrait and apply_transform API issue

Open
#6,597 2 comments 1 reaction 1 assignee View on GitHub

@atbenmurray is already working on this.

Since Oct 20, 2023.

bug
Dominant language
Python
Stars
8.7k
Forks
1.6k
Avg merge
5d 1h
Merged PRs (30d)
20

Description

Describe the bug
The pattern of invoking transforms with a lazy parameter depending on isinstance(transform, LazyTrait) is problematic
https://github.com/Project-MONAI/MONAI/blob/e6ec945e4b87b90835cdad29ea64b1f27b8accda/monai/transforms/transform.py#L98
because the LazyTrait API doesn't provide a __call__ design.
https://github.com/Project-MONAI/MONAI/blob/e6ec945e4b87b90835cdad29ea64b1f27b8accda/monai/transforms/traits.py#L22-L24

(introduced since https://github.com/Project-MONAI/MONAI/pull/6537)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.