Skip to content

update default target device in tests#4396

Merged
pgladkows merged 3 commits into
mainfrom
fix-default-target-device
Jul 24, 2026
Merged

update default target device in tests#4396
pgladkows merged 3 commits into
mainfrom
fix-default-target-device

Conversation

@pgladkows

@pgladkows pgladkows commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

🛠 Summary

https://jira.devtools.intel.com/browse/CVS-191325
Add default target device (CPU) to tests.

🧪 Checklist

  • Unit tests added.
  • The documentation updated.
  • Change follows security best practices.
    ``

@pgladkows
pgladkows force-pushed the fix-default-target-device branch 3 times, most recently from 30c5c05 to 7e37063 Compare July 23, 2026 14:31
@pgladkows
pgladkows force-pushed the fix-default-target-device branch from 7e37063 to a84bb10 Compare July 23, 2026 14:39
@pgladkows
pgladkows marked this pull request as ready for review July 23, 2026 14:51
Copilot AI review requested due to automatic review settings July 23, 2026 14:51

Copilot AI 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.

Pull request overview

This PR updates functional test helpers to consistently default the target device to CPU when no explicit device is provided, reducing reliance on implicit defaults in generated OVMS commands and MediaPipe graph snippets.

Changes:

  • Default OVMS command target_device to CPU when parameters.target_device is unset.
  • Emit device/target_device fields in generated MediaPipe calculator node content using CPU as the fallback.
  • Ensure model config generation always includes target_device, defaulting to CPU when unset.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
tests/functional/object_model/ovms_command.py Defaults target_device to CPU when building the OVMS command.
tests/functional/object_model/mediapipe_calculators.py Defaults MediaPipe node device/target_device fields to CPU when unspecified.
tests/functional/models/models.py Always includes target_device in generated model config, defaulting to CPU.

batchsize=batch_size if use_parameter else None,
nireq=parameters.nireq if use_parameter else None,
target_device=parameters.target_device if use_parameter else None,
target_device=(parameters.target_device or TargetDevice.CPU) if use_parameter else None,

@porlows1 porlows1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approved

@pgladkows
pgladkows force-pushed the fix-default-target-device branch from f78e84e to 0678a01 Compare July 23, 2026 15:10
@pgladkows
pgladkows merged commit 7c9e7cb into main Jul 24, 2026
1 check 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.

4 participants