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

FIXED: CPU shows UNKNOWN #883

Merged
merged 1 commit into from
Aug 15, 2022
Merged

FIXED: CPU shows UNKNOWN #883

merged 1 commit into from
Aug 15, 2022

Conversation

MonoHue
Copy link
Contributor

@MonoHue MonoHue commented Jul 29, 2022

Function get_cpu_info() in Package cpuinfo returns a dict that CPU model is indexed by "brand_raw" instead of "brand", see L210 in sacred/hostinfo.py .

Function get_cpu_info() in Package cpuinfo returns a dict that CPU model is index by "brand_raw" instead of "brand", see L210 in sacred/hostinfo.py .
@thequilo
Copy link
Collaborator

Hi @MonoHue! Thank you! Do you know when that changed or if this breaks in some environments? I'm pretty sure the "brand" key worked a while back. What is the difference between "brand" and "brand_raw"?

@MonoHue
Copy link
Contributor Author

MonoHue commented Aug 15, 2022

Hi @MonoHue! Thank you! Do you know when that changed or if this breaks in some environments? I'm pretty sure the "brand" key worked a while back. What is the difference between "brand" and "brand_raw"?

Hi thequilo!

It's true that the field was called "Brand". On Apr 5, 2019, py-cpuinfo rename "Brand" to "Brand_raw" (See workhorsy/py-cpuinfo@419e82e). In fact, there have been many fields renamed, you can check those out at cpuinfo.py.

Setting a fallback for compatibility is great too.

Regards

@thequilo
Copy link
Collaborator

Thanks for the clarification. Since the key change happened three years ago I guess it's fine to just use the "brand_raw" key and drop "brand" (as it is currently implemented in the PR).

@thequilo thequilo merged commit 3254319 into IDSIA:master Aug 15, 2022
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.

2 participants