Repository navigation
Fix cml runner --cloud-gpu to accept nogpu - #747
Conversation
|
Functional test: |
| cloudGpu: { | ||
| type: 'string', | ||
| choices: ['nogpu', 'k80', 'v100', 'tesla'], | ||
| choices: ['nogpu', 'k80', 'v100', 'tesla', null], |
There was a problem hiding this comment.
Interesting that this is not working. It was as far as I remember. Maybe using undefined in the coerce function do the trick? If thats the case maybe is better than null explicitly which is going to be a difficult type to setup
There was a problem hiding this comment.
I tried changing the value and it seemed that if the result of the coerce function isn't in the choices array then it fails.
My very first patch was to set it to 'nogpu' instead of null which worked fine.
I opted to add null as an option instead to preserve the truthy/falsy behavior in ternary statements.
There was a problem hiding this comment.
I'll try this and we can see.
choices: ['nogpu', 'k80', 'v100', 'tesla'],
coerce: (val) => (val === 'nogpu' ? undefined : val),There was a problem hiding this comment.
Thats what I suggested
There was a problem hiding this comment.
@DavidGOrtega It looks like undefined behaves as expected, Im going to do a full test in our gcp env and if it works as expected I'll update the PR.
There was a problem hiding this comment.
@DavidGOrtega It looks like undefined behaves as expected, Im going to do a full test in our gcp env and if it works as expected I'll update the PR.
@DanielBarnes that was my intuition, since its allowing you to not set it, I would say that this worked also with null previously, but not sure... JS and its non "Good parts" 🙏
There was a problem hiding this comment.
JS and its non "Good parts" 🙏
🤣
|
Updated to use |
nogpu
|
Thank you very much, @DanielBarnes! |
I subscribe!!! Thanks @DanielBarnes |
Uh oh!
There was an error while loading. Please reload this page.