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

API feedback #25

Open
erikhuck opened this issue Apr 2, 2024 · 3 comments
Open

API feedback #25

erikhuck opened this issue Apr 2, 2024 · 3 comments

Comments

@erikhuck
Copy link
Collaborator

erikhuck commented Apr 2, 2024

Suggested changes from Dr. Moseley:

  • Conversion of JSON text into __str__ output is a bit inelegant. Should be able to replace this with some sort of template that utilizes the values in the JSON nested dictionary. But this would be an improvement for later. A simple multiline formatted string may work as the template.
  • The setting of self._gpu_ram_coefficient should use a class level data member that stores the dictionary of unit to coefficient. Could call the class level data member _gpu_ram_unit2coefficient and _ram_unit2coefficient and _time_unit2coefficient.
  • Could remove _validate_mem_unit and use _gpu_ram_unit2coefficient.keys() passed to _validate_unit.
@erikhuck
Copy link
Collaborator Author

erikhuck commented Apr 4, 2024

@hunter-moseley Question about the first bullet point. Basing the text output on the JSON enforces consistency. I understand the implementation is a bit messy, but wouldn't manually constructing the string possibly be more error-prone?

@hunter-moseley
Copy link
Member

hunter-moseley commented Apr 4, 2024 via email

@erikhuck
Copy link
Collaborator Author

@hunter-moseley great idea! Then we get the best of both.

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

No branches or pull requests

2 participants