Skip to content

Conversation

@alexandraBara
Copy link
Collaborator

@alexandraBara alexandraBara commented Nov 18, 2025

New DeviceEnumerationPlugin, run:

node-scraper run-plugins DeviceEnumerationPlugin

How to test: run with plugin_config.json:

{
  "global_args": {},
  "plugins": {
    "DeviceEnumerationPlugin": {
        "analysis_args": {
            "cpu_count" : 3,
            "gpu_count": 2,
            "vf_count": 1
        }
    }
  },
  "result_collators": {},
  "name": "plugin_config",
  "desc": "Auto generated config"
}

Cmd:

node-scraper --plugin-config plugin_config.json

Comment on lines 55 to 58
# Convert to lists if integers, otherwise use as-is
cpu_count = [args.cpu_count] if isinstance(args.cpu_count, int) else args.cpu_count
gpu_count = [args.gpu_count] if isinstance(args.gpu_count, int) else args.gpu_count
vf_count = [args.vf_count] if isinstance(args.vf_count, int) else args.vf_count
Copy link
Collaborator

Choose a reason for hiding this comment

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

may be better to add field validators on the arg model to do this instead, and have the values always stored as lists in the model.

cpu_count_res = self._run_sut_cmd(self.CMD_CPU_COUNT_WINDOWS)
gpu_count_res = self._run_sut_cmd(self.CMD_GPU_COUNT_WINDOWS)
vf_count_res = self._run_sut_cmd(self.CMD_VF_COUNT_WINDOWS)
cpu_count, gpu_count, vf_count = [None, None, None]
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: Instead of having these extra vars we could instantiate the model here instead and use its defaults which would already be 'None'

@alexandraBara alexandraBara merged commit 83110ac into development Dec 1, 2025
6 checks passed
@alexandraBara alexandraBara deleted the alex_devenum branch December 1, 2025 18:13
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