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

Added additional system_info #246

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

amd-pworfolk
Copy link
Contributor

Added collection of additional data for system_info, and updated method to collect Python package versions.

Closes #245

Copy link
Collaborator

@ramkrishna2910 ramkrishna2910 left a comment

Choose a reason for hiding this comment

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

Added some comments

@@ -297,10 +328,52 @@ def get_wmic_info(command):
info_dict["Physical Memory"] = f"{mem_info_gb} GB"
except ValueError:
info_dict["Physical Memory"] = mem_info_bytes
info_dict["BIOS Version"] = get_wmic_info("wmic bios get smbiosbiosversion")
Copy link
Collaborator

Choose a reason for hiding this comment

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

wmic was deprecated recently and in most runs we are not getting this information unless the user installs wmic.
But Get-WmiObject is built into PowerShell (up to version 5.1). In PowerShell 7 and beyond, it is replaced by Get-CimInstance.
Can you please replace all the wmic and Get-WmiObject commands with the following Get-CimInstance alternatives:

Processor: Get-CimInstance -ClassName Win32_Processor | Select-Object Name, Manufacturer, NumberOfCores, NumberOfLogicalProcessors
OEM info: Get-CimInstance -ClassName Win32_ComputerSystem | Select-Object Manufacturer, Model
Physical memory: Get-CimInstance -ClassName Win32_PhysicalMemory | Select-Object Manufacturer, Capacity, Speed
BIOS info: Get-CimInstance -ClassName Win32_BIOS | Select-Object SMBIOSBIOSVersion
CPU Max clock: Get-CimInstance -ClassName Win32_Processor | Select-Object MaxClockSpeed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm making this change, but there is one issue to be aware of. The Get-CmiInstance calls are each 1-2 secs slower than the comparable wmic calls. On my Strix system, get_system_info() was taking 6 secs using wmic and now takes nearly 16 secs using the PowerShell Get-CimInstance cmdlet. It impacts the user experience for interactive CLI sessions. Concerns?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

One thought is to add a global argument flag to skip gathering the system info. For example, the command lemonade -i Qwen/Qwen2.5-0.5B-Instruct oga-load --device igpu --dtype int4 takes about 22 seconds to run, assuming that the model is already cached locally. If you skip gathering the system info, the same command takes less than 6 seconds to run. I can imagine many situations where you only need to gather the system info once (it is in fact sticky in the turnkeyml_stats.yaml file), so would be happy to save the time in most calls to lemonade. How about adding a -x global flag to skip gathering the system info?

src/turnkeyml/common/build.py Outdated Show resolved Hide resolved
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.

Capture additional system info
2 participants