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

Tool classification cmake #19

Merged
merged 11 commits into from
Jan 17, 2024
Merged

Tool classification cmake #19

merged 11 commits into from
Jan 17, 2024

Conversation

sushidelivery
Copy link
Contributor

Implemented a CMake script that executes a Python script (load_labels_2_config.py). This script automatically updates classifier labels in assets/config.yml file by parsing them from a labels.txt file.

Copy link
Collaborator

@9and3 9and3 left a comment

Choose a reason for hiding this comment

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

Nice! Tiny little defensive catch to be added on the load_labels_2_config.py and a small indentation fix, besides it is good. Be sure to check it on Lydia!

Comment on lines 27 to 33
- 0.485
- 0.456
- 0.406
classifierStd:
- 0.229
- 0.224
- 0.225
- 0.229
- 0.224
- 0.225
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please keep the same indentation as before, here is one space less.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops! Sorry! Fixed the config file indentation in d546ef3. Please check it out ! :)

if not os.path.isfile(args.config):
_log_error("The path to the config file is not valid.")
sys.exit()

Copy link
Collaborator

Choose a reason for hiding this comment

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

Here it would be worth to catch the error if ai/torchscripts/labels.txt exists since it is a manually-added file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey ! I am catching the error in the except. So if the file does not exist or the path is wrong, it will be caught! Please, have a look. I also added the success log in 2270968.

@sushidelivery
Copy link
Contributor Author

Hey @9and3 ! Checked on NUC, everything works ok! the branch can be merged :)

Copy link
Collaborator

@9and3 9and3 left a comment

Choose a reason for hiding this comment

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

Well done!

@9and3 9and3 merged commit 6e19a12 into main Jan 17, 2024
2 checks passed
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.

2 participants