DEEPaaS icon indicating copy to clipboard operation
DEEPaaS copied to clipboard

`deepaas-cli` returns exit code 1 even if the prediction is successful

Open IgnacioHeredia opened this issue 9 months ago • 2 comments

This happens because, in the console script wrapper, sys.exit takes any non 0 returned value as exit code 1 (exception). (ref)

In cli.py:

def main():
    """Executes model's methods with corresponding parameters"""
    return None

--> exit code 0 (success)

def main():
    """Executes model's methods with corresponding parameters"""
    return 'success'

--> exit code 1 (error)

If we finally don't need them, consider removing returns from cli.py

IgnacioHeredia avatar May 17 '24 09:05 IgnacioHeredia