-
Notifications
You must be signed in to change notification settings - Fork 18
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: amd-pworfolk <[email protected]>
Signed-off-by: amd-pworfolk <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some comments
src/turnkeyml/common/build.py
Outdated
@@ -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") |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
Signed-off-by: amd-pworfolk <[email protected]>
Signed-off-by: amd-pworfolk <[email protected]>
Added collection of additional data for system_info, and updated method to collect Python package versions.
Closes #245