CH·02CLI reference
gpu functions
Inspect and manage your functions (Python functions that run on a GPU.ai GPU)
Inspect and manage your functions (Python functions that run on a GPU.ai GPU)
Synopsis
A function is a Python function that GPU.ai runs on a GPU machine it starts and stops for you. You write and call functions from Python with the Functions client in the gpuai-sdk package. These commands show what your functions are doing and what they cost, print a run's output, cancel a run, and delete a function.
Functions cannot be deployed or called from the CLI. A function is Python code that the library packages on your computer, so that part lives in Python.
Wherever a command takes , pass the function's name or its id.
gpu functions [command]
Examples
# What are my functions doing, and what did they cost today?
gpu functions list
# The last runs of one function
gpu functions runs embed
# Why did a run fail?
gpu functions run embed 7b2e4d1c-0a9f-4e3b-8c6d-5f4a3b2c1d0e
# Watch a run's output live
gpu functions logs embed 7b2e4d1c-0a9f-4e3b-8c6d-5f4a3b2c1d0e --follow
Options
-h, --help help for functions
Options inherited from parent commands
--api-base string API base URL (override with GPUAI_API_BASE env) (default "https://api.gpu.ai/v1")
--debug Enable debug logging to stderr
-o, --output string Output format: table|json (default table on TTY, json otherwise)
SEE ALSO
- gpu - GPU.ai command-line interface
- gpu functions cancel - Cancel a run
- gpu functions delete - Delete a function, releasing its machines
- gpu functions get - Show one function's settings, machines and 24 hour cost
- gpu functions list - List your functions
- gpu functions logs - Print a run's output
- gpu functions run - Show one run, including its error and traceback if it failed
- gpu functions runs - List a function's runs, newest first