Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions sagemaker-train/src/sagemaker/train/evaluate/pipeline_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@

DETERMINISTIC_TEMPLATE = """{
"Version": "2020-12-01",
"Metadata": {},
"Metadata": {},{% if mlflow_resource_arn %}
"MlflowConfig": {
"MlflowResourceArn": "{{ mlflow_resource_arn }}"{% if mlflow_experiment_name %},
"MlflowExperimentName": "{{ mlflow_experiment_name }}"{% endif %}
},
},{% endif %}
"Parameters": [],
"Steps": [
{
Expand Down Expand Up @@ -325,11 +325,11 @@
# LLM-as-a-Judge Template for Base Model Only - 2-Phase Evaluation with optional ModelPackageConfig
LLMAJ_TEMPLATE_BASE_MODEL_ONLY = """{
"Version": "2020-12-01",
"Metadata": {},
"Metadata": {},{% if mlflow_resource_arn %}
"MlflowConfig": {
"MlflowResourceArn": "{{ mlflow_resource_arn }}"{% if mlflow_experiment_name %},
"MlflowExperimentName": "{{ mlflow_experiment_name }}"{% endif %}
},
},{% endif %}
"Parameters": [],
"Steps": [
{
Expand Down Expand Up @@ -460,11 +460,11 @@
# Deterministic Template for Base Model Only - Single step evaluation with optional ModelPackageConfig
DETERMINISTIC_TEMPLATE_BASE_MODEL_ONLY = """{
"Version": "2020-12-01",
"Metadata": {},
"Metadata": {},{% if mlflow_resource_arn %}
"MlflowConfig": {
"MlflowResourceArn": "{{ mlflow_resource_arn }}"{% if mlflow_experiment_name %},
"MlflowExperimentName": "{{ mlflow_experiment_name }}"{% endif %}
},
},{% endif %}
"Parameters": [],
"Steps": [
{
Expand Down Expand Up @@ -531,11 +531,11 @@
# Custom Scorer Template with Jinja2 Placeholders - Similar to Deterministic but uses CustomScorerEvaluation
CUSTOM_SCORER_TEMPLATE = """{
"Version": "2020-12-01",
"Metadata": {},
"Metadata": {},{% if mlflow_resource_arn %}
"MlflowConfig": {
"MlflowResourceArn": "{{ mlflow_resource_arn }}"{% if mlflow_experiment_name %},
"MlflowExperimentName": "{{ mlflow_experiment_name }}"{% endif %}
},
},{% endif %}
"Parameters": [],
"Steps": [
{
Expand Down Expand Up @@ -850,11 +850,11 @@
# Custom Scorer Template for Base Model Only - Single step evaluation with optional ModelPackageConfig
CUSTOM_SCORER_TEMPLATE_BASE_MODEL_ONLY = """{
"Version": "2020-12-01",
"Metadata": {},
"Metadata": {},{% if mlflow_resource_arn %}
"MlflowConfig": {
"MlflowResourceArn": "{{ mlflow_resource_arn }}"{% if mlflow_experiment_name %},
"MlflowExperimentName": "{{ mlflow_experiment_name }}"{% endif %}
},
},{% endif %}
"Parameters": [],
"Steps": [
{
Expand Down Expand Up @@ -924,11 +924,11 @@
# Phase 2: Use judge model to evaluate responses with built-in and custom metrics
LLMAJ_TEMPLATE = """{
"Version": "2020-12-01",
"Metadata": {},
"Metadata": {},{% if mlflow_resource_arn %}
"MlflowConfig": {
"MlflowResourceArn": "{{ mlflow_resource_arn }}"{% if mlflow_experiment_name %},
"MlflowExperimentName": "{{ mlflow_experiment_name }}"{% endif %}
},
},{% endif %}
"Parameters": [],
"Steps": [
{
Expand Down
Loading