ferruzzi commented on code in PR #38693:
URL: https://github.com/apache/airflow/pull/38693#discussion_r1552557529


##########
airflow/providers/amazon/aws/operators/bedrock.py:
##########
@@ -91,3 +96,155 @@ def execute(self, context: Context) -> dict[str, str | int]:
         self.log.info("Bedrock %s prompt: %s", self.model_id, self.input_data)
         self.log.info("Bedrock model response: %s", response_body)
         return response_body
+
+
+class BedrockCustomizeModelOperator(AwsBaseOperator[BedrockHook]):
+    """
+    Create a fine-tuning job to customize a base model.
+
+    .. seealso::
+        For more information on how to use this operator, take a look at the 
guide:
+        :ref:`howto/operator:BedrockCustomizeModelOperator`
+
+    :param job_name: A unique name for the fine-tuning job.
+    :param custom_model_name: A name for the custom model being created.
+    :param role_arn: The Amazon Resource Name (ARN) of an IAM role that Amazon 
Bedrock can assume
+        to perform tasks on your behalf.
+    :param base_model_id: Name of the base model.
+    :param training_data_uri: The S3 URI where the training data is stored.
+    :param output_data_uri: The S3 URI where the output data is stored.
+    :param hyperparameters: Parameters related to tuning the model.
+    :param check_if_job_exists: If set to true, operator will check whether a 
model customization
+        job already exists for the name in the config. (Default: True)
+    :param action_if_job_exists: Behavior if the job name already exists. 
Options are "timestamp" (default),

Review Comment:
   I've actually been second-guessing this one.    A parameter with only two 
possible values sounds a lot like a bool to me, in hindsight.  I can't think of 
a good succinct name for it as a bool though.
   
   To maybe shake some ideas loose, if it stays as a string, I'll add this to 
the description: 
   
   ```
    If "timestamp" is used and the job name already exists, the current 
timestamp
    will be appended to the name in order to make it unique.
    ```
    
    But perhaps I should replace `action_if_job_exists: str` (and all the 
associated input validation for it) with `append_timestamp_on_name_conflict: 
bool`?



-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to