pb.deployments.download_request_logs
Downloads a zip archive containing incoming request (prompt) logs from a private deployment. Up to 30 days of logs may be downloaded at one time.
- Request logs are only collected if the deployment has been opted-in by setting the
request_logging_enabled
flag to true when creating or updating the deployment.
pb.deployments.download_request_logs
Downloads request logs with optional filters.
Parameters:
deployment_ref: str
Name of the private serverless deployment
dest: os.PathLike, default None
(Optional) Local destination for the downloaded logs archive
adapter_id: string, default None
(Optional) Retrieve only logs pertaining to a specific adapter. If not set, only requests NOT specifying an adapter are retrieved
from_: string, default None
(Optional) Retrieve logs at or after this time, specified in ISO format. At most hourly granularity is supported.
to: string, default None
(Optional) Retrieve logs strictly before this time, specified in ISO format. At most hourly granularity is supported.
Example:
Download one day's worth of requests using the base model (no adapter)
pb.deployments.download_request_logs(
"my-mistral-7b",
"/local/directory/",
from_="2024-11-12",
to="2024-11-13"
)
Download 7 days' worth of requests using adapter mymodel/1
pb.deployments.download_request_logs(
"my-mistral-7b",
"/local/directory/",
adapter_id="mymodel/1",
from_="2024-11-12",
to="2024-11-19"
)