-
Notifications
You must be signed in to change notification settings - Fork 45
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
DOCS-3423: Update training script to parse labels based on feedback from etai/tahiya #3941
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for viam-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
||
|
||
# This is used for parsing the dataset file (produced and stored in Viam), | ||
# parse it to get the label annotations | ||
# Used for training classifiction models | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flake8 parser was complaining about this
|
||
# Save labels.txt file | ||
save_labels(LABELS + [unknown_label], MODEL_DIR) | ||
# Convert the model to tflite | ||
save_model( | ||
model, MODEL_DIR, "classification_model", IMG_SIZE + (3,) | ||
model, MODEL_DIR, "classification_model" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
correction, was never being used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Make sure to try out the script on Viam and add some details about manual testing in the PR comments, then it'll be good to merge
|
||
# This parses the required args for the training script. | ||
# The model_dir variable will contain the output directory where | ||
# the ML model that this script creates should be stored. | ||
# The data_json variable will contain the metadata for the dataset | ||
# that you should use to train the model. | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
know this is awk but python markdown parser was complaining about this specifically
docs/data-ai/ai/train.md
Outdated
@@ -90,15 +88,17 @@ If you haven't already, create a folder called <file>model</file> and create an | |||
|
|||
<p><strong>4. Add <code>training.py</code> code</strong></p> | |||
|
|||
<p>Copy this template into <file>training.py</file>:</p> | |||
<p>Copy one of the following templates into <file>training.py</file>, depending on whether or not you wish to parse labels:</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you rephrase this to have the condition based on which the reader should decide be clearer? Why would a user need to use the labels flag or not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comment about conditional
Co-authored-by: Naomi Pentrel <[email protected]>
Co-authored-by: Naomi Pentrel <[email protected]>
Manual testing notes: