davidradl commented on code in PR #27759:
URL: https://github.com/apache/flink/pull/27759#discussion_r2923808012
##########
flink-models/flink-model-triton/src/main/java/org/apache/flink/model/triton/TritonOptions.java:
##########
@@ -181,4 +181,36 @@ private TritonOptions() {
+ "Example: %s",
code("'X-Custom-Header:value,X-Another:value2'"))
.build());
+
+ @Documentation.Section({Documentation.Sections.MODEL_TRITON_ADVANCED})
+ public static final ConfigOption<Integer> MAX_RETRIES =
+ ConfigOptions.key("max-retries")
+ .intType()
+ .defaultValue(0)
+ .withDescription(
+ "Maximum number of retry attempts for failed
inference requests. "
+ + "Retries are triggered by network errors
and retryable server "
+ + "errors (HTTP 503, 504). Client errors
(HTTP 4xx) are not retried. "
+ + "Defaults to 0 (no retries).");
+
+ @Documentation.Section({Documentation.Sections.MODEL_TRITON_ADVANCED})
+ public static final ConfigOption<Duration> RETRY_BACKOFF =
+ ConfigOptions.key("retry-backoff")
+ .durationType()
+ .defaultValue(Duration.ofMillis(100))
+ .withDescription(
+ "Initial backoff duration for the exponential
retry strategy. "
+ + "Each subsequent retry doubles the wait
time: 100ms, 200ms, 400ms, etc. "
+ + "Only used when max-retries > 0.
Defaults to 100ms.");
+
+ @Documentation.Section({Documentation.Sections.MODEL_TRITON_ADVANCED})
+ public static final ConfigOption<String> DEFAULT_VALUE =
+ ConfigOptions.key("default-value")
+ .stringType()
+ .noDefaultValue()
+ .withDescription(
+ "Fallback value returned when all retry attempts
are exhausted. "
+ + "Supports STRING and numeric output
types. "
Review Comment:
the config option is string, but is supports numeric output types . It would
be worth expanding in the description when to use numeric types and an example
of good practise.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]