cuddly-jelly-27016
09/08/2024, 4:24 PMTypeEngine.lazy_import_transformers()
e.g. if the executions take `StructuredDataset`s as inputs.
Resulting error looks something like
ValueError: Failed to find a handler for <class 'pandas.core.frame.DataFrame'>, protocol [flyte], fmt ['parquet']
Expected behavior
Both executions to be triggered without error.
Additional context to reproduce
Can reproduce with something like this
def run():
try:
flyte_remote.execute_remote_task_lp(
remote_launchplan,
inputs={
"dataset": StructuredDataset(dataframe=...),
},
)
except Exception as e:
_LOGGER.exception("failed_flyte_execution", e)
# Use parallel threads to test a race condition caused by Flyte's TypeEngine.lazy_import_transformers not being
# thread-safe.
t0 = threading.Thread(target=run)
t1 = threading.Thread(target=run)
t0.start()
t1.start()
t0.join()
t1.join()
Screenshots
No response
Are you sure this issue hasn't been raised already?
• Yes
Have you read the Code of Conduct?
• Yes
flyteorg/flytecuddly-jelly-27016
09/10/2024, 3:46 PM