Logging
Get started with logging.
Logs are useful resources for assessing your models’ performance, identifying problems, and tuning results.
Getting logs using the API
A GetLog
method request must include an HTTP header with Content-Type
set to application/json
to indicate that the body of the request contains JSON data.
The request body requires the following fields:
- An
auth
object with the following fields:organization
set to your Tune Studio organization ID.cluster
containing the cluster ID.
resourceId
containing the resource ID.type
specifying the type of log to get. Options areLOG_TYPE_UNSPECIFIED
,LOG_TYPE_MODEL
, orLOG_TYPE_JOB
.startTime
specifying the starting date and time for the period for which log entries must be retrieved.endTime
specifying the ending date and time for the period for which log entries must be retrieved.level
setting the severity level of the log entries to be retrieved. Options areinfo
,error
,debug
, orwarn
.- A parent
page
object containing pagination details.limit
specifying the number of rows to return.prevPageToken
containing the previous page token (empty allowed).nextPageToken
containing the next page token (empty allowed).totalPage
specifying the total number of pages to return.
Here’s an example GetLog
method using the curl
CLI:
The example above returns the following logs:
Getting logs using Python
To create a log request using Python, create a new file called get_logs.py
and open it for editing.
Paste the following code into the file, replacing <YOUR-API-KEY>
, <YOUR-ORG-ID>
, and <YOUR-MODEL-ID>
with your values:
Run the program with the following command:
You should see logs retrieved similar to the following:
Was this page helpful?