Skip to content

Conversation

@rjtokenring
Copy link
Contributor

Allow to specify a per brick configuration in model's list file.
Migrate compose files variable definition inside bricks config to allow to specify more metadata

Copy link

@dido18 dido18 left a comment

Choose a reason for hiding this comment

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

I would split the PR.

  • PR#1. [NO-ISSUE] Remove the model_configuration_variables from the brick-config.yaml. The arduino-app-cli does not read/use it.
  • PR#2. [BREAKING] Move the model_configuration under the model-list.yaml and put the configuration variable for each brick. This is a breaking change.
  • PR#X [Enhancement] When needed, open PR to add the boolean field into the brick_config.yaml. Each addition should be discussed and clearly described
private: true  => the variable is only used internally (i.e., the model path)
mandatory: true => if the variable must be filled 
secret: true           => a variable that is a secret. 

@rjtokenring
Copy link
Contributor Author

I would split the PR.

  • PR#1. [NO-ISSUE] Remove the model_configuration_variables from the brick-config.yaml. The arduino-app-cli does not read/use it.
  • PR#2. [BREAKING] Move the model_configuration under the model-list.yaml and put the configuration variable for each brick. This is a breaking change.
  • PR#X [Enhancement] When needed, open PR to add the boolean field into the brick_config.yaml. Each addition should be discussed and clearly described
private: true  => the variable is only used internally (i.e., the model path)
mandatory: true => if the variable must be filled 
secret: true           => a variable that is a secret. 

I do not agree. model_configuration_variables can be removed when the logic informatio is migrated into the new data model.
Some for the last point. Here we are changing the variable declaration data model and I think it is better to define it in a single PR.

- "${CUSTOM_MODEL_PATH:-/home/arduino/.arduino-bricks/ei-models/}:${CUSTOM_MODEL_PATH:-/home/arduino/.arduino-bricks/ei-models/}"
- "/run/udev:/run/udev"
command: ["--model-file", "${EI_CLASSIFICATION_MODEL:-/models/ootb/ei/mobilenet-v2-224px.eim}", "--dont-print-predictions", "--mode", "streaming", "--preview-original-resolution", "--camera", "${VIDEO_DEVICE:-/dev/video1}"]
command: ["--model-file", "${EI_V_CLASSIFICATION_MODEL:-/models/ootb/ei/mobilenet-v2-224px.eim}", "--dont-print-predictions", "--mode", "streaming", "--preview-original-resolution", "--camera", "${VIDEO_DEVICE:-/dev/video1}"]
Copy link

Choose a reason for hiding this comment

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

What is the diff between EI_CLASSIFICATION_MODEL and EI_V_CLASSIFICATION_MODEL variable?

Is the name of the variable changed on purpose?

Suggested change
command: ["--model-file", "${EI_V_CLASSIFICATION_MODEL:-/models/ootb/ei/mobilenet-v2-224px.eim}", "--dont-print-predictions", "--mode", "streaming", "--preview-original-resolution", "--camera", "${VIDEO_DEVICE:-/dev/video1}"]
command: ["--model-file", "${EI_CLASSIFICATION_MODEL:-/models/ootb/ei/mobilenet-v2-224px.eim}", "--dont-print-predictions", "--mode", "streaming", "--preview-original-resolution", "--camera", "${VIDEO_DEVICE:-/dev/video1}"]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

EI_CLASSIFICATION_MODEL was already used by object detection brick. Changed to fix the overlap.

Comment on lines +13 to +21
- name: EI_AUDIO_CLASSIFICATION_MODEL
description: Path to the model file
private: true
- name: CUSTOM_MODEL_PATH
description: Path to the custom model directory
private: true
- name: BIND_ADDRESS
description: Bind address
private: true

Choose a reason for hiding this comment

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

I honestly think we could just remove those variables. I would avoid to add the private concepts if it isn't needed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not agree. Thsi are useful and the concept of private is useful.

Choose a reason for hiding this comment

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

Can you elaborate? Why are they useful? Those are set by the model, so I am not sure why they should be defined here.

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