davidradl commented on code in PR #27385: URL: https://github.com/apache/flink/pull/27385#discussion_r2747125355
########## flink-models/flink-model-triton/src/main/java/org/apache/flink/model/triton/TritonOptions.java: ########## @@ -0,0 +1,136 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.flink.model.triton; + +import org.apache.flink.configuration.ConfigOption; +import org.apache.flink.configuration.ConfigOptions; +import org.apache.flink.configuration.description.Description; + +import static org.apache.flink.configuration.description.TextElement.code; + +/** Configuration options for Triton Inference Server model functions. */ +public class TritonOptions { + + private TritonOptions() { + // Utility class with static options only + } + + public static final ConfigOption<String> ENDPOINT = + ConfigOptions.key("endpoint") + .stringType() + .noDefaultValue() + .withDescription( + Description.builder() + .text( + "Full URL of the Triton Inference Server endpoint, e.g., %s", + code("http://localhost:8000/v2/models")) + .build()); + + public static final ConfigOption<String> MODEL_NAME = + ConfigOptions.key("model-name") + .stringType() + .noDefaultValue() + .withDescription("Name of the model to invoke on Triton server."); + + public static final ConfigOption<String> MODEL_VERSION = + ConfigOptions.key("model-version") + .stringType() + .defaultValue("latest") + .withDescription("Version of the model to use. Defaults to 'latest'."); + + public static final ConfigOption<Long> TIMEOUT = + ConfigOptions.key("timeout") + .longType() + .defaultValue(30000L) Review Comment: we should use the Duration type for this -- 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]
