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

Bump to 0.0.11 #66

Merged
merged 2 commits into from
Sep 12, 2023
Merged

Bump to 0.0.11 #66

merged 2 commits into from
Sep 12, 2023

Conversation

talmo
Copy link
Contributor

@talmo talmo commented Sep 12, 2023

Summary by CodeRabbit


  • New Feature: Added functionality to convert labels into raw arrays. This allows for more efficient data processing and manipulation.
  • New Feature: Introduced code snippets that load predictions from an SLP file, convert them into point coordinates in a single array, and append confidence scores to the array. This enhances prediction accuracy and provides more detailed output.
  • Chore: Updated package version from "0.0.10" to "0.0.11". This change reflects the new features added and improvements made in this release.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 12, 2023

Walkthrough

This update primarily focuses on enhancing the functionality of label conversion to raw arrays and loading predictions from an SLP file. It also includes a minor version bump for the package.

Changes

File Summary
README.md Introduced code snippets for loading predictions, converting them to point coordinates, and appending confidence scores. No changes to existing label creation code.
sleap_io/init.py Package version updated from "0.0.10" to "0.0.11". No changes to function signatures, data structures, or interfaces.

🐇💻

With each new commit, we hop ahead,

In the world of code, where rabbits tread.

From labels to arrays, transformations we spin,

With every pull request, it's another win! 🎉🥕


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • Mention @coderabbitai in any review comment for bot assistance.
  • Note: Review comments are made on code diffs or files, not on the PR overview.

Pause Incremental Reviews

  • Insert @coderabbitai: ignore in the PR description to halt the bot's ongoing reviews. Remove the line to resume.

@talmo talmo merged commit e475a47 into main Sep 12, 2023
@talmo talmo deleted the talmo/pre_0.0.11 branch September 12, 2023 23:15
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 1

Commits Files that changed from the base of the PR and between d4aa283 and cdfe48b commits.
Files selected for processing (2)
  • README.md (1 hunks)
  • sleap_io/init.py (1 hunks)
Files skipped from review due to trivial changes (1)
  • sleap_io/init.py
Additional comments (Suppressed): 1
README.md (1)
  • 62-64: Ensure that the existing code for creating labels from raw data is compatible with the newly introduced functionalities for converting labels into raw arrays and loading predictions from an SLP file.

Comment on lines +44 to +60
### Convert labels to raw arrays

```py
import sleap_io as sio

labels = sio.load_slp("tests/data/slp/centered_pair_predictions.slp")

# Convert predictions to point coordinates in a single array.
trx = labels.numpy()
n_frames, n_tracks, n_nodes, xy = trx.shape
assert xy == 2

# Convert to array with confidence scores appended.
trx_with_scores = labels.numpy(return_confidence=True)
n_frames, n_tracks, n_nodes, xy_score = trx.shape
assert xy_score == 3
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new functionality to convert labels into raw arrays and load predictions from an SLP file is well implemented. However, there's a minor issue in line 58 where trx.shape should be replaced with trx_with_scores.shape to correctly reflect the shape of the array with confidence scores appended.

- n_frames, n_tracks, n_nodes, xy_score = trx.shape 
+ n_frames, n_tracks, n_nodes, xy_score = trx_with_scores.shape 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant