wrmxs227 commented on code in PR #27759:
URL: https://github.com/apache/flink/pull/27759#discussion_r2930274104


##########
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:
   OK
   Added testNumericDefaultValueReturnedAfterAllRetriesFail to cover INT output 
type with default value '-1'.



-- 
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]

Reply via email to