ChRIS_ultron_backEnd
ChRIS_ultron_backEnd copied to clipboard
Allow max_gpu_limit to be undefined
Consider this plugin representation:
{
"type": "fs",
"parameters": [
{
"name": "query_gpu",
"type": "str",
"optional": true,
"flag": "--query-gpu",
"short_flag": "-q",
"action": "store",
"help": "Information about GPU.",
"default": "index,name,memory.total,driver_version",
"ui_exposed": true
}
],
"icon": "",
"authors": "FNNDSC <[email protected]>",
"title": "NVIDIA-SMI Wrapper",
"category": "Troubleshooting",
"description": "A ChRIS fs plugin wrapper for nvidia-smi",
"documentation": "https://github.com/FNNDSC/dbg-nvidia-smi",
"license": "MIT",
"version": "1.0.0",
"selfpath": "/opt/conda/bin",
"selfexec": "nvidia-smi-wrapper",
"execshell": "/opt/conda/bin/python3.1",
"min_number_of_workers": 1,
"max_number_of_workers": 1,
"min_memory_limit": "",
"max_memory_limit": "",
"min_cpu_limit": "",
"max_cpu_limit": "",
"min_gpu_limit": 1,
"max_gpu_limit": ""
}
It was uploaded successfully to https://chrisstore.co/api/v1/plugins/133/, however it is rejected from /chris-admin/
with the following error:
{'non_field_errors': [ErrorDetail(string='Minimum gpu limit should be less than maximum gpu limit.', code='invalid')]}
@jennydaman this looks interesting .. so basically we would want to treat empty string in max_gpu_limit as not 0 , empty string should be considered as not defined and no comparisons shall be made with min_gpu_limit ? am I going correct with this .. one ?
The short answer is, we should "allow" max_gpu_limit
to be given as an empty string, and I don't care how this is represented in the database or what actual behavior is represented by it.
The long answer is, the various components of ChRIS were developed without a "specification" so there does not exist an authoritative truth for what are valid values for max_gpu_limit
and how the value should be interpreted as behavior.