-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Added batch decorator #47
Conversation
Reviewer's Guide by SourceryThis pull request introduces a batch decorator and updates the dependencies. Sequence diagram for batch data reshaping processsequenceDiagram
participant Input as Input Array
participant Reshape as Reshape Function
participant Transform as Spatial Transform
participant Restore as Restore Function
participant Output as Output Array
Input->>Reshape: Send N-dimensional array
Note over Reshape: reshape_batch() or reshape_3d()
Reshape->>Transform: Reshaped array (H,W,...)
Transform->>Restore: Transformed array
Note over Restore: restore_batch() or restore_3d()
Restore->>Output: Restored to original dimensions
Class diagram for array reshaping functionsclassDiagram
class ArrayReshaper {
+reshape_3d(data: ndarray) tuple[ndarray, tuple]
+reshape_batch(data: ndarray) tuple[ndarray, tuple]
+reshape_batch_3d(data: ndarray) tuple[ndarray, tuple]
+reshape_batch_3d_keep_depth(data: ndarray) tuple[ndarray, tuple]
+reshape_batch_channel(data: ndarray) tuple[ndarray, tuple]
+reshape_batch_3d_channel(data: ndarray) tuple[ndarray, tuple]
}
class ArrayRestorer {
+restore_3d(data: ndarray, original_shape: tuple) ndarray
+restore_batch(data: ndarray, original_shape: tuple) ndarray
+restore_batch_3d(data: ndarray, original_shape: tuple) ndarray
}
note for ArrayReshaper "Handles various reshape operations for different array dimensions"
note for ArrayRestorer "Restores arrays back to their original shapes"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #47 +/- ##
=======================================
Coverage ? 62.21%
=======================================
Files ? 21
Lines ? 2554
Branches ? 0
=======================================
Hits ? 1589
Misses ? 965
Partials ? 0 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @ternaus - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Summary by Sourcery
Update
ruff
tov0.0.255
andmypy
tov1.1.1
. Stop ignoring the number of images inreshape_*
functions.