Arize AI
Search…
⌃K

Timestamp

Time that the data will show up in the UI

Overview

The timestamp indicates when the data will show up in the UI. Typically, this is used for the time the prediction was made. However, there are instances such as time series models, where you may want the timestamp to be the date the prediction was made for.

Code Example

When logging your model inference via the Python batch method, set a column as the timestamp column with prediction_id_column_name.
schema = Schema(
prediction_id_column_name="prediction_id",
timestamp_column_name="prediction_ts",
prediction_label_column_name="PREDICTION",
prediction_score_column_name="PREDICTION_SCORE",
actual_label_column_name="ACTUAL",
actual_score_column_name="ACTUAL_SCORE"
)
When logging your model inferences via the Python real-time method, log your prediction_timestamp per prediction.
# Log your prediction
response = arize.log(
prediction_id='plED4eERDCasd9797ca34',
model_id='sample-model-1',
model_type=ModelTypes.SCORE_CATEGORICAL,
environment=Environments.PRODUCTION,
model_version='v1',
prediction_timestamp=1618590882,
prediction_label=('Fraud',.4)
features=features,
embedding_features=embedding_features,
tags=tags
)
Arize Field
Data Type
Description
timestamp_column_name
str
Column name for timestamps
prediction_timestamp
int
If int representing Unix epoch time in seconds, set overwrite the timestamp for prediction. If None, default to log prediction using the current timestamp. Important: Future and Historical predictions are supported up to 1 year from the current wall clock time.

FAQ

1. Do I have to send the timestamp of when the prediction is made?
It is not required, it defaults to the time you sent the prediction to Arize.
2. Can I send future timestamps?
Yes. Arize supports sending in timestamps up to 1 year in the future from the current timestamp.
3. How far back when I send timestamps?
Arize supports sending in timestamps up to 1 year back from the current timestamp.
4. Can I send the timestamp the prediction was made for, not the timestamp the prediction was made?
Yes, Arize supports both run date and forecast date. It is up to the user to decide how they want to visualize the data.
The below example shows different timestamp options for a time series model.
  • Run date: the date the prediction (weather forecast) was made
    • in this example, the predictions were made on March 3, so there are 3 timestamps for March 3
  • Forecast date: the date the prediction (weather forecast) was made for
    • in this example, the forecasts were made for March March 5, March 6, and March 7, so there are 3 timestamps for each of those dates.
Run Date vs. Forecast Date Timestamps for Timeseries Models
Questions? Email us at [email protected] or Slack us in the #arize-support channel