Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,16 @@ def terrakit_data_fetch():
collection_name = data_connector_config["collection_name"]
dc = DataConnector(connector_type=model_input_data_spec["connector"])
logger.info(dc.connector.list_collections())
nonAlignedDates = False

if no_of_modalities == 1:
data_date = task_dict["date"]
primary_date = data_date
elif task_dict["date"][i] and no_of_modalities > 1 and task_dict["date"][i] != "":
data_date = task_dict["date"][i]
primary_date = task_dict["date"][0]
if primary_date != data_date:
nonAlignedDates = True

notify_gfmaas_ui(
event_id=inference_id,
Expand Down Expand Up @@ -157,6 +160,12 @@ def terrakit_data_fetch():
save_data_array_to_file(dai, imputed_file_path, imputed=True)
imputed_input_images += [imputed_file_path]

if (nonAlignedDates):
tk_save_filepath = save_filepath.replace(".tif", f"_{data_date}.tif")
tk_imputed_filepath = imputed_file_path.replace(".tif", f"_{data_date}.tif")
os.rename(tk_save_filepath, save_filepath)
os.rename(tk_imputed_filepath, imputed_file_path)

######################################################################################################
### (optional) if you want to pass on information to later stages of the pipelines,
### add information to the task config file which will be read later
Expand Down