8000 High level load metrics by talmo · Pull Request #573 · talmolab/sleap · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

High level load metrics #573

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

Merged
merged 4 commits into from
Aug 2, 2021
Merged

High level load metrics #573

merged 4 commits into from
Aug 2, 2021

Conversation

talmo
Copy link
Collaborator
@talmo talmo commented Jul 29, 2021

Description

High level API for loading metrics (sleap.load_metrics())

Types of changes

  • Bugfix
  • New feature
  • Refactor / Code style update (no logical changes)
  • Build / CI changes
  • Documentation Update
  • Other (explain)

Does this address any currently open issues?

N/A

Outside contributors checklist

  • Review the guidelines for contributing to this repository
  • Read and sign the CLA and add yourself to the authors list
  • Make sure you are making a pull request against the develop branch (not main). Also you should start your branch off develop
  • Add tests that prove your fix is effective or that your feature works
  • Add necessary documentation (if appropriate)

Thank you for contributing to SLEAP!

❤️

@codecov-commenter
Copy link

Codecov Report

Merging #573 (829ef9d) into develop (cf7b246) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #573      +/-   ##
===========================================
+ Coverage    64.94%   64.95%   +0.01%     
===========================================
  Files          124      124              
  Lines        19868    19875       +7     
===========================================
+ Hits         12903    12910       +7     
  Misses        6965     6965              
Impacted Files Coverage Δ
sleap/__init__.py 100.00% <100.00%> (ø)
sleap/nn/evals.py 13.27% <100.00%> (+2.36%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cf7b246...829ef9d. Read the comment docs.

"""
if os.path.isdir(model_path):
metrics_path = os.path.join(model_path, f"metrics.{split}.npz")
else:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: either make 'split' optional (and require a path to file in this case), or require that model_path is a folder. It is a bit loose when e.g. a 'test' metrics file can be loaded with 'split=val'

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah good point, added some info in the docstring

@talmo talmo merged commit 7ff2904 into develop Aug 2, 2021
talmo added a commit that referenced this pull request Aug 2, 2021
* Set Twine version to fix pypi uploads on build

- twine v3.4.x and greater seems to have issues with our build system since we have an older version of `importlib_metadata`

* Revert changes from merge into main

* Bump version to 1.1.3

* Update docs

* fix code samples in documentation (#535)

The code samples to render properly have to be valid rst literal blocks (https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#literal-blocks). The most affected are multi-line code samples that are joined to a singe line, see https://sleap.ai/api/sleap.io.dataset.html.

* Minor typo fixed (#538)

* Add CLI options for specifying the GPU when training (#547)

* Add GPU specification to training CLI
* Update CLI docs
* Set linter version

* Minor QOL update (#562)

* Add score metadata to the exported HDF5 analysis files

* Fix and add test for labels.numpy()

* Add some tweaks and docs to video rendering

* Add model describer to sleap-inspect CLI

* Minor logging

* CLI tweak

* Tweak visual indicator of not-visible points

* Color untracked instances consistently

* Track removal utilities
- Add menu option: Tracks -> Delete All Tracks
- Add Labels.remove_all_tracks() method
- Tests

* Try adding token to codecov action

* Pin black formatter version and relint

* Bump minor version

* Update minor version in docs

* Disable verbose coverage uploading

* Update codecov badge branch

* Empty instance fixes (#569)

* Fix augmentation with no instances

* Add Labels.copy

* Add empty instance removal methods

* Add empty instance removal in provider constructor

* Fix augmentation test

* Properly ignore empty instances and frames in DLC import

* Fix test

* Lint

* Small GUI fixes (#570)

* Increase range for number of instances to cull

* Add background box to missing nodes for improved visibility

* Lint

* Fix predicted instance coloring order

* Add node label font size configuration

* Fix single instance predictor not using peak threshold param (#571)

* Skeleton merge conflicts (#572)

* Fix video repr when shape data not available

* Merge incompletely matching skeletons into union of nodes

* Add a little extra padding when filling in missing points

* Add automatic call to _fix_array() when accessing or setting nodes

* Add node data merging

* Add test for predicted instance data merge

* Add node merging
- Will update base node with merge node when renaming from GUI

* Lint

* Fix broken tests

* Labels.split() (#574)

* Add labels.split() utility

* Lint

* High level load metrics (#573)

- Add `sleap.load_metrics()`
- Example notebook

* Pre-1.1.5 updates
- Remove version from some places
- Add open in colab button in model eval notebook
- Update installation doc
- Add a general Help page
- Add some deep links to the CLI sections

* Update readme with help links

Co-authored-by: Matěj Šmíd <m@matejsmid.cz>
Co-authored-by: Darío Hereñú <magallania@gmail.com>
@talmo talmo deleted the talmo/load_metrics branch February 13, 2022 08:05
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.

3 participants
0