-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Expand file tree
/
Copy pathconstants.py
More file actions
71 lines (60 loc) · 2.81 KB
/
constants.py
File metadata and controls
71 lines (60 loc) · 2.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanying this file. This file 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.
"""
DEPRECATED: This module has been moved to sagemaker.core.training.constants
This is a backward compatibility shim. Please update your imports to:
from sagemaker.core.training.constants import ...
"""
from __future__ import absolute_import
import os
SM_CODE = "code"
SM_CODE_CONTAINER_PATH = "/opt/ml/input/data/code"
SM_DRIVERS = "sm_drivers"
SM_DRIVERS_CONTAINER_PATH = "/opt/ml/input/data/sm_drivers"
SM_DRIVERS_LOCAL_PATH = os.path.join(
os.path.dirname(os.path.abspath(__file__)), "container_drivers"
)
SOURCE_CODE_JSON = "sourcecode.json"
DISTRIBUTED_JSON = "distributed.json"
TRAIN_SCRIPT = "sm_train.sh"
DEFAULT_CONTAINER_ENTRYPOINT = ["/bin/bash"]
DEFAULT_CONTAINER_ARGUMENTS = [
"-c",
f"chmod +x {SM_DRIVERS_CONTAINER_PATH}/{TRAIN_SCRIPT} "
+ f"&& {SM_DRIVERS_CONTAINER_PATH}/{TRAIN_SCRIPT}",
]
HUB_NAME = "SageMakerPublicHub"
# Allowed reward model IDs for RLAIF trainer with region restrictions
_ALLOWED_REWARD_MODEL_IDS = {
"openai.gpt-oss-120b-1:0": ["us-west-2", "us-east-1", "ap-northeast-1", "eu-west-1"],
"openai.gpt-oss-20b-1:0": ["us-west-2", "us-east-1", "ap-northeast-1", "eu-west-1"],
"qwen.qwen3-32b-v1:0": ["us-west-2", "us-east-1", "ap-northeast-1", "eu-west-1"],
"qwen.qwen3-coder-30b-a3b-v1:0": ["us-west-2", "us-east-1", "ap-northeast-1", "eu-west-1"],
"qwen.qwen3-coder-480b-a35b-v1:0": ["us-west-2", "ap-northeast-1"],
"qwen.qwen3-235b-a22b-2507-v1:0": ["us-west-2", "ap-northeast-1"]
}
# Allowed evaluator models for LLM as Judge evaluator with region restrictions
_ALLOWED_EVALUATOR_MODELS = {
"anthropic.claude-3-5-sonnet-20240620-v1:0": ["us-west-2", "us-east-1", "ap-northeast-1"],
"anthropic.claude-3-5-sonnet-20241022-v2:0": ["us-west-2"],
"anthropic.claude-3-haiku-20240307-v1:0": ["us-west-2", "us-east-1", "ap-northeast-1", "eu-west-1"],
"anthropic.claude-3-5-haiku-20241022-v1:0": ["us-west-2"],
"meta.llama3-1-70b-instruct-v1:0": ["us-west-2"],
"mistral.mistral-large-2402-v1:0": ["us-west-2", "us-east-1", "eu-west-1"],
"amazon.nova-pro-v1:0": ["us-east-1"]
}
SM_DEPENDENCIES = "sm_dependencies"
SM_DEPENDENCIES_CONTAINER_PATH = "/opt/ml/input/data/sm_dependencies"
SM_RECIPE = "recipe"
SM_RECIPE_YAML = "recipe.yaml"
SM_RECIPE_CONTAINER_PATH = f"/opt/ml/input/data/recipe/{SM_RECIPE_YAML}"