Skip to content
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

Script fails to install linux-tools on distributions where that package is not available by that name #192

Closed
jessetaylor opened this issue Feb 6, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@jessetaylor
Copy link

When post-processing the results of a benchmark, one of the scripts attempts to install the package linux-tools, which fails when that package is not available by that name. On RHEL and similar distributions, the equivalent package is named kernel-tools, and the kernel-tools package provides the same tool, cpupower, that is used during post-processing. Even when the kernel-tools package is already installed, the script still unsuccessfully attempts to install the linux-tools package. From the available documentation, there does not appear to be a way to work around the failed attempt to install the linux-tools package.

This error was encountered while attempting to run the following example command from the MLPerf Inference documentation:

$ mlcr run-mlperf,inference,_find-performance,_full,_r5.0-dev \
   --model=retinanet \
   --implementation=reference \
   --framework=pytorch \
   --category=datacenter \
   --scenario=Offline \
   --execution_mode=test \
   --device=cpu  \
   --quiet \
   --test_query_count=100
...
[2025-02-05 20:03:20,898 module.py:560 INFO] -     * mlcr get,generic-sys-util,_install,_linux-tools
[2025-02-05 20:03:20,906 module.py:560 INFO] -       * mlcr detect,os
[2025-02-05 20:03:20,911 module.py:5340 INFO] -              ! cd /home/user1/MLC/repos/local/cache/get-generic-sys-util_54d0248d
[2025-02-05 20:03:20,911 module.py:5341 INFO] -              ! call /home/user1/MLC/repos/mlcommons@mlperf-automations/script/detect-os/run.sh from tmp-run.sh
[2025-02-05 20:03:20,932 module.py:5487 INFO] -              ! call "postprocess" from /home/user1/MLC/repos/mlcommons@mlperf-automations/script/detect-os/customize.py
Traceback (most recent call last):
  File "/home/user1/mlc/bin/mlcr", line 8, in <module>
    sys.exit(mlcr())
  File "/home/user1/mlc/lib64/python3.9/site-packages/mlc/main.py", line 1354, in mlcr
    main()
  File "/home/user1/mlc/lib64/python3.9/site-packages/mlc/main.py", line 1441, in main
    res = method(run_args)
  File "/home/user1/mlc/lib64/python3.9/site-packages/mlc/main.py", line 1196, in run
    return self.call_script_module_function("run", run_args)
  File "/home/user1/mlc/lib64/python3.9/site-packages/mlc/main.py", line 1176, in call_script_module_function
    result = automation_instance.run(run_args)  # Pass args to the run method
  File "/home/user1/MLC/repos/mlcommons@mlperf-automations/automation/script/module.py", line 225, in run
    r = self._run(i)
  File "/home/user1/MLC/repos/mlcommons@mlperf-automations/automation/script/module.py", line 1772, in _run
    r = customize_code.preprocess(ii)
  File "/home/user1/MLC/repos/mlcommons@mlperf-automations/script/run-mlperf-inference-app/customize.py", line 286, in preprocess
    r = mlc.access(ii)
  File "/home/user1/mlc/lib64/python3.9/site-packages/mlc/main.py", line 96, in access
    result = method(self, options)
  File "/home/user1/mlc/lib64/python3.9/site-packages/mlc/main.py", line 1196, in run
    return self.call_script_module_function("run", run_args)
  File "/home/user1/mlc/lib64/python3.9/site-packages/mlc/main.py", line 1176, in call_script_module_function
    result = automation_instance.run(run_args)  # Pass args to the run method
  File "/home/user1/MLC/repos/mlcommons@mlperf-automations/automation/script/module.py", line 225, in run
    r = self._run(i)
  File "/home/user1/MLC/repos/mlcommons@mlperf-automations/automation/script/module.py", line 1858, in _run
    r = prepare_and_run_script_with_postprocessing(
  File "/home/user1/MLC/repos/mlcommons@mlperf-automations/automation/script/module.py", line 5494, in prepare_and_run_script_with_postprocessing
    r = script_automation._call_run_deps(posthook_deps, local_env_keys, local_env_keys_from_meta, env, state, const, const_state,
  File "/home/user1/MLC/repos/mlcommons@mlperf-automations/automation/script/module.py", line 3538, in _call_run_deps
    r = script._run_deps(deps, local_env_keys, env, state, const, const_state, add_deps_recursive, recursion_spaces,
  File "/home/user1/MLC/repos/mlcommons@mlperf-automations/automation/script/module.py", line 3708, in _run_deps
    r = self.action_object.access(ii)
  File "/home/user1/mlc/lib64/python3.9/site-packages/mlc/main.py", line 96, in access
    result = method(self, options)
  File "/home/user1/mlc/lib64/python3.9/site-packages/mlc/main.py", line 1196, in run
    return self.call_script_module_function("run", run_args)
  File "/home/user1/mlc/lib64/python3.9/site-packages/mlc/main.py", line 1176, in call_script_module_function
    result = automation_instance.run(run_args)  # Pass args to the run method
  File "/home/user1/MLC/repos/mlcommons@mlperf-automations/automation/script/module.py", line 225, in run
    r = self._run(i)
  File "/home/user1/MLC/repos/mlcommons@mlperf-automations/automation/script/module.py", line 1842, in _run
    r = self._call_run_deps(prehook_deps, self.local_env_keys, local_env_keys_from_meta, env, state, const, const_state, add_deps_recursive,
  File "/home/user1/MLC/repos/mlcommons@mlperf-automations/automation/script/module.py", line 3538, in _call_run_deps
    r = script._run_deps(deps, local_env_keys, env, state, const, const_state, add_deps_recursive, recursion_spaces,
  File "/home/user1/MLC/repos/mlcommons@mlperf-automations/automation/script/module.py", line 3708, in _run_deps
    r = self.action_object.access(ii)
  File "/home/user1/mlc/lib64/python3.9/site-packages/mlc/main.py", line 96, in access
    result = method(self, options)
  File "/home/user1/mlc/lib64/python3.9/site-packages/mlc/main.py", line 1196, in run
    return self.call_script_module_function("run", run_args)
  File "/home/user1/mlc/lib64/python3.9/site-packages/mlc/main.py", line 1176, in call_script_module_function
    result = automation_instance.run(run_args)  # Pass args to the run method
  File "/home/user1/MLC/repos/mlcommons@mlperf-automations/automation/script/module.py", line 225, in run
    r = self._run(i)
  File "/home/user1/MLC/repos/mlcommons@mlperf-automations/automation/script/module.py", line 1842, in _run
    r = self._call_run_deps(prehook_deps, self.local_env_keys, local_env_keys_from_meta, env, state, const, const_state, add_deps_recursive,
  File "/home/user1/MLC/repos/mlcommons@mlperf-automations/automation/script/module.py", line 3538, in _call_run_deps
    r = script._run_deps(deps, local_env_keys, env, state, const, const_state, add_deps_recursive, recursion_spaces,
  File "/home/user1/MLC/repos/mlcommons@mlperf-automations/automation/script/module.py", line 3708, in _run_deps
    r = self.action_object.access(ii)
  File "/home/user1/mlc/lib64/python3.9/site-packages/mlc/main.py", line 96, in access
    result = method(self, options)
  File "/home/user1/mlc/lib64/python3.9/site-packages/mlc/main.py", line 1196, in run
    return self.call_script_module_function("run", run_args)
  File "/home/user1/mlc/lib64/python3.9/site-packages/mlc/main.py", line 1186, in call_script_module_function
    raise ScriptExecutionError(f"Script {function_name} execution failed. Error : {error}")
mlc.main.ScriptExecutionError: Script run execution failed. Error : No package name specified for dnf and util name linux-tools
arjunsuresh added a commit to GATEOverflow/mlperf-automations that referenced this issue Feb 6, 2025
@arjunsuresh arjunsuresh added the bug Something isn't working label Feb 6, 2025
arjunsuresh added a commit that referenced this issue Feb 6, 2025
* Update test-nvidia-mlperf-inference-implementations.yml

* Fix get-platform-details, #192
@arjunsuresh
Copy link
Collaborator

Thank you for reporting this. Can you please do mlc pull repo and give a retry?

@jessetaylor
Copy link
Author

After running mlc pull repo and retrying, the issue was resolved.
Since the fix in #193 was to set ignore_missing: True, there may still be an issue for others using distributions with kernel-tools instead of linux-tools if the kernel-tools package is not installed manually, although it looks like the script that runs cpupower is able to handle failing to run the command so it may not be a blocking issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

2 participants