Hello everyone, has anyone seen this warning messa...
# ask-community
m
Hello everyone, has anyone seen this warning message before? It wasn't there before but suddenly showing up in one of our jobs.
Copy code
Task parameter introspection took 13.455 seconds , exceeding `PREFECT_TASK_INTROSPECTION_WARN_THRESHOLD` of 10.0. Try wrapping large task parameters with `prefect.utilities.annotations.quote` for increased performance, e.g. `my_task(quote(param))`. To disable this message set `PREFECT_TASK_INTROSPECTION_WARN_THRESHOLD=0`
n
hi @Moe - this usually means that you're passing something very large into the parameters for your task we resolve futures that you might pass in, so we have to check for those in the parameters you pass you can avoid us inspecting those parametets with
quote
if you're not passing futures. if you are passing futures, you can call .result on that before you pass it in and then use quote
m
@Nate This job had been in production fine for last 6 months and had no warnings like this before. And we didn't update Prefect version either
n
is it possible the amount of data you're passing into your task has increased? what does the task look like thats throwing this?
m
The data increase is minimal. It occurs in between a few tasks but not all. One type of task is data processing, the other is writing data to DB. But it doesn't occur for all other data processing or write tasks.
The entire job itself is small too, completes in 15 mins entirely
n
can you share the problematic task? and ideally the one that produces the result being passed into the task I'm curious how you're ending up seeing this if not much has changed > exceeding
PREFECT_TASK_INTROSPECTION_WARN_THRESHOLD
m
This is one of them
Copy code
@task
def wd_save_to_land(data, connection, table_name):
	df = pd.DataFrame(data)
	cols_to_drop = list(set(df.columns) - set(WD_COLUMNS))
	if len(cols_to_drop) > 0:
		df = df.drop(cols_to_drop, axis=1)
	df['land_inserted'] = utils.get_current_date_time()
	df['Worker_s_Manager_group'] = df['Worker_s_Manager_group'].astype(str)
	if utils.table_exists(connection, table_name):
		utils.clear_table(connection, table_name)
		<http://utils.logger.info|utils.logger.info>(f"existing records in {table_name} cleared...")
	df.to_sql(table_name, con=connection, if_exists='append', index=False)
n
are you using .submit or .map in your flow?
m
But I have a main flow that runs other flows. But not using .submit or .map
Prefect version is 2.14.11
n
makes sense. you should be able to take the recommendation of the error message then and wrap your inputs with
quote
to avoid the error message
Copy code
wd_save_to_land(quote(data), ...)
etc
m
But this message wasn't there before for last 6 months, what triggered it? Or was it always there but only now Prefect is showing it?
n
if you didn't update prefect and the size of data passing through has not changed, then I'm not sure. but my best guesses would be: • the size of data has actually increased • data size hasnt changed, but you changed something about log level but ultimately not sure, sorry
1
m
Okay, thank you!