talmolab / sleap

A deep learning framework for multi-animal pose tracking.
https://sleap.ai
Other
435 stars 97 forks source link

Fix unrag always set to true in sleap-export #1531

Closed roomrys closed 1 year ago

roomrys commented 1 year ago

Description

The --unrag argument was previous unable to be set to False. This PR allows it to be set to false, but also changes it's data type to an int. If we want to use the bool data type, then it might be more correct to use a --rag argument wihich is default false and true if --rag is included.

We opted to instead merge:

Types of changes

Does this address any currently open issues?

Outside contributors checklist

Thank you for contributing to SLEAP!

:heart:

Summary by CodeRabbit

codecov[bot] commented 1 year ago

Codecov Report

Merging #1531 (f74429e) into develop (ed77b49) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop    #1531   +/-   ##
========================================
  Coverage    73.39%   73.39%           
========================================
  Files          134      134           
  Lines        23961    23961           
========================================
  Hits         17586    17586           
  Misses        6375     6375           
Files Coverage Δ
sleap/nn/inference.py 81.25% <ø> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

coderabbitai[bot] commented 1 year ago

Walkthrough

This change set modifies the export_cli function in the inference module, changing the unrag_outputs argument from a boolean to an integer type. It also includes updates to the associated command-line arguments and help messages. Additionally, tests for the _make_export_cli_parser function have been added.

Changes

File Summary
sleap/nn/inference.py Modified export_cli function and its command-line arguments. Changed unrag_outputs from boolean to integer with default value of 1. Updated help message.
tests/nn/test_inference.py Added import statement for _make_export_cli_parser. Included new test function test_make_export_cli for testing _make_export_cli_parser.

🐇💻

In the land of code where the shadows lie, A rabbit hops, his gaze held high. With each key press, a change is spun, A task once many, now is one. The tests run green, the bugs all flee, Oh, what a joyous coding spree! So raise your cups, let's toast this feat, For every line of code is sweet! 🥂🎉

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. - Additionally, enter `@coderabbitai pause` to halt the bot's ongoing reviews as any issue or review comment. To resume reviews, enter `@coderabbitai resume` as any issue or review comment.
roomrys commented 1 year ago

We merged #1539 instead.