Training pipeline failed with error message: INVALID_ARGUMENT. Error while training using TFT model

exact error message is this:

RuntimeError: Training failed with:
code: 3
message: "INVALID_ARGUMENT"

Dataset sample is this:

Date Store_ID total_sales holiday is_festival
04-01-2020 2 20769.36 0 0
04-01-2020 3 17950.25 0 0
05-01-2020 2 1125 0 0
05-01-2020 3 21862.4 0 0
06-01-2020 2 26412.89 0 0
06-01-2020 3 19954.29 1 1
07-01-2020 2 13343.59 0 1
07-01-2020 3 23486.04 0 0
08-01-2020 2 12862.11 0 0
08-01-2020 3 20183.7 0 0
09-01-2020 2 12613.01 0 0
09-01-2020 3 18248.29 0 0
10-01-2020 2 10416.81 0 0
10-01-2020 3 20464.63 0 0

Training job configuration:

import urllib

import google.cloud.aiplatform as aiplatform
from google.cloud import bigquery

aiplatform.init(project='genaipoc-396111', staging_bucket='forecasting_bucket_new')

DATASET_URI = "gs://forecasting_bucket_new/sales_data_new_trail_2.csv"
# Download the dataset
! gsutil cp {DATASET_URI} dataset.csv

dataset = aiplatform.TimeSeriesDataset.create(
display_name="Forecast_TFT - Refit",
gcs_source=DATASET_URI,
)

time_column = "Date"
time_series_identifier_column = "Store_ID"
target_column = "total_sales"

print(dataset.resource_name)

display_name = "TFT - Refit"

training_job = aiplatform.TemporalFusionTransformerForecastingTrainingJob(
display_name="TFT - Refit",
optimization_objective="minimize-rmse",
column_specs={
"Date": "timestamp",
"total_sales": "numeric",
"holiday": "auto",
"is_festival": "categorical"
},
)

time_column = "Date"
time_series_identifier_column = "Store_ID"
target_column = "total_sales"
available1 = "holiday"
available2 = "is_festival"

model = training_job.run(
dataset=dataset,
target_column=target_column,
time_column=time_column,
time_series_identifier_column=time_series_identifier_column,
available_at_forecast_columns=[time_column, available1, available2],
unavailable_at_forecast_columns=[target_column],
forecast_horizon=7,
context_window=3,
data_granularity_unit="day",
data_granularity_count=1,
model_display_name="TFT - Refit",
weight_column=None,
budget_milli_node_hours=1000
)

code execution environment: is local machine on vs code which is connected to GCP vertex AI as you can see in the above code which I have provided the connection

Additional information: I am using temporal fusion transformer (TFT) model to train my dataset.

NOTE : This is urgent, please give your suggestions, it would be a great help!
I have also provided the entire code under the training job configuration.

Thanks,
Krithika

0 REPLIES 0