Skip to content

Conversation

@jaspals3123
Copy link
Collaborator

@jaspals3123 jaspals3123 commented Dec 3, 2025

Adding support in PackagePlugin to filter rocm packages with regex like:

'ocl-icd|kfdtest|llvm-amd|miopen|half|^ii hip|hcc|hsa|rocm|atmi|^ii comgr|composa|amd-smi|aomp|amdgpu|rock|mivision|migraph|rocprofiler|roctracer|rocbl|hipify|rocsol|rocthr|rocff|rocalu|rocprim|rocrand|rccl|rocspar|rdc|rocwmma|rpp|openmp|amdfwflash|ocl|opencl'

Before:

  2025-12-04 17:12:27 UTC       INFO               nodescraper | --------------------------------------------------
  2025-12-04 17:12:27 UTC       INFO               nodescraper | Running plugin PackagePlugin
  2025-12-04 17:12:27 UTC       INFO               nodescraper | Running data collector: PackageCollector
  2025-12-04 17:12:28 UTC       INFO               nodescraper | (PackagePlugin) task completed successfully
  2025-12-04 17:12:28 UTC       INFO               nodescraper | Running data analyzer: PackageAnalyzer
  2025-12-04 17:12:28 UTC       INFO               nodescraper | Expected packages: ['gcc']
  2025-12-04 17:12:28 UTC       INFO               nodescraper | Expected value: gcc, 11.4.0

After:

  2025-12-04 17:13:50 UTC       INFO               nodescraper | --------------------------------------------------
  2025-12-04 17:13:50 UTC       INFO               nodescraper | Running plugin PackagePlugin
  2025-12-04 17:13:50 UTC       INFO               nodescraper | Running data collector: PackageCollector
  2025-12-04 17:13:51 UTC       INFO               nodescraper | (PackagePlugin) Found 2 ROCm-related packages installed
  2025-12-04 17:13:51 UTC       INFO               nodescraper | Running data analyzer: PackageAnalyzer
  2025-12-04 17:13:51 UTC       INFO               nodescraper | Expected packages: ['gcc']
  2025-12-04 17:13:51 UTC       INFO               nodescraper | Expected value: gcc, 11.4.0
(venv) (py39) [jaspals@pp-128-a5-2 node-scraper]$ cat  ./scraper_logs_pp_128_a5_2_aus_dcgpu_2025_12_04-05_20_40_PM/package_plugin/package_collector/events.json 
[
  {
    "id": "bc3d871f-0b1a-4f62-9a87-df4bfb8b4de8",
    "timestamp": "2025-12-04T17:20:42.189217Z",
    "reporter": "NODE_SCRAPER",
    "category": "OS",
    "description": "Found 2 ROCm-related packages installed as per given regex: ocl-icd|kfdtest|llvm-amd",
    "data": {
      "rocm_packages": [
        "llvm-amdgpu-libs.x86_64",
        "ocl-icd.x86_64"
      ],
      "task_name": "PackageCollector",
      "task_type": "DATA_COLLECTOR",
      "parent": "PackagePlugin"
    },
    "priority": "INFO"
  }
](

Test with the plugin_config.json:

{
  "global_args": {},
  "plugins": {
    "PackagePlugin": {
      "collection_args": {
        "rocm_regex": "ocl-icd|kfdtest|llvm-amd"
      },
      "analysis_args": {
        "exp_package_ver": {
          "gcc": "11.4.0"
        },
        "regex_match": false
      }
    }
  },
  "result_collators": {},
  "name": "plugin_config",
  "desc": "Auto generated config"
}

Run:

node-scraper --plugin-config plugin_config.json

Copy link
Collaborator

@alexandraBara alexandraBara left a comment

Choose a reason for hiding this comment

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

Please add functional test, or update existing if there and also add utest for the new functions/functionality you have added.

self.result.status = ExecutionStatus.OK
self._log_event(
category=EventCategory.OS,
description=f"Found {len(rocm_packages)} ROCm-related packages installed as per given regex: {rocm_pattern}",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
description=f"Found {len(rocm_packages)} ROCm-related packages installed as per given regex: {rocm_pattern}",
description=f"Found {len(rocm_packages)} ROCm-related packages installed.",

Leave the regex out since it will be printed as part of the data

@alexandraBara alexandraBara merged commit eff353b into development Dec 9, 2025
6 checks passed
@alexandraBara alexandraBara deleted the jaspal_packageplugin branch December 9, 2025 18:31
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