Ensure model name does not override machine type - #1719
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the determine_node_type function to ensure that "machine-type" is prioritized over "Model name" regardless of their order in the contexts, and adds corresponding unit tests. The feedback suggests adding a defensive guard contexts or [] to prevent potential TypeError exceptions if contexts is None, and refactoring the unit tests using pytest.mark.parametrize to reduce redundancy and improve readability.
Ramble Performance Test MetricsResults produced with commit: 3295ec9
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1719 +/- ##
===========================================
+ Coverage 93.48% 93.49% +0.01%
===========================================
Files 367 367
Lines 35916 35922 +6
===========================================
+ Hits 33575 33586 +11
+ Misses 2341 2336 -5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| experiment.node_type = fom["value"] | ||
| continue | ||
| return | ||
| elif "Model name" in fom["name"] and node_type == default_node_type_val: |
There was a problem hiding this comment.
Does machine-type and Model name only come from modifiers like lscpu and gcp-metadata? If so, is there anything special or protected about these names? Does that mean if those modifiers are changed for some reason this code would break?
There was a problem hiding this comment.
Yeah this is currently only a best-effort for getting the machine type.
No description provided.