FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Avoid assembling if already done and overwrite == False by KonradDanielewski · Pull Request #2317 · DeepLabCut/DeepLabCut · GitHub

Avoid assembling if already done and overwrite == False - #2317

Merged
MMathisLab merged 12 commits into
DeepLabCut:mainfrom
KonradDanielewski:main
Jul 27, 2023
Merged

Avoid assembling if already done and overwrite == False#2317
MMathisLab merged 12 commits into
DeepLabCut:mainfrom
KonradDanielewski:main

Conversation

Copy link
Copy Markdown
Contributor

This QoL significantly reduces time needed for testing different inference parameters by reading assemblies from an existing file (if already run once). Works for both identity True and False.

This QoL significantly reduces time needed for testing different inference parameters by reading assemblies from an existing file (if already run once). Works for both identity True and False.
MMathisLab requested a review from jeylau July 24, 2023 09:46
MMathisLab added WORK IN PROGRESS! developers are currently working on this feature... stay tuned. high-priority labels Jul 25, 2023
with open(pickle_path, "rb") as file:
data = pickle.load(file)

self.assemblies = {key: value for key, value in data.items() if key != "single"}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality
self.unique = data.pop('single', {})
self.assemblies = data

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Done. A small annoyance is that it hangs a little when loading the assemblies.pickle, but I don't think this can be avoided

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

No worries! That's nothing in comparison to the time that would otherwise be spent forming the assemblies.

jeylau previously requested changes Jul 27, 2023

jeylau left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Just left a minor comment about ass_filename; all good otherwise!

Copy link
Copy Markdown
Contributor Author

Renamed to assembly_builder, seems appropriate and avoids confusion with the class name. Also added assemblies_filename as a variable before the if statement

jeylau commented Jul 27, 2023

Copy link
Copy Markdown
Contributor

Looking good, thanks @KonradDanielewski!

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

high-priority WORK IN PROGRESS! developers are currently working on this feature... stay tuned.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL