I'd like to configure retries for a few automateri...
# ask-community
p
I'd like to configure retries for a few automaterialized assets. The documentation here states that this is possible "if run retries are configured". That configuration allows me to
enable
retries and set a
max_retries
value. It's unclear to me how to configure things so that I can specify which assets get retried and which ones don't. Is it possible to enable run retries, but then only target specific assets, not every single run?
dagster bot responded by community 1
z
You should be able to just not provide a
max_retries
value in the
dagster.yaml
config, then use tags on specific jobs to set the max number of retries on the specific job like in the docs here. If you want to have retries specific to an op or an asset you can use RetryPolicies (the retry_policy parameter is available to
@asset
as well as
@op
). Note that the same doc page shows how you can raise a RetryRequested exception to handle specific cases in which you might want to retry something
p
Great, thanks for this! That's the conclusion I came to as well after reading this a few times over. In terms of feedback, perhaps renaming
max_retries
to
default_max_retries
under
run_retries
would help make it clear that it's the value that will apply to jobs when unspecified as opposed to some kind of global limit of the number of retries that any one job may have.