Skip to content

Commit 2596ced

Browse files
committed
fix!: Upgrade to Python 3.11
1 parent 4d4cb31 commit 2596ced

27 files changed

Lines changed: 131 additions & 63 deletions

File tree

.github/workflows/module-checks-dev-requirements-change.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ jobs:
4646
fail-fast: false
4747
matrix:
4848
modules: ${{ fromJson(needs.get-modules.outputs.matrix) }}
49-
python-version: [3.9]
49+
python-version: ["3.11"]
5050
node-version: [18.x]
5151
runs-on: ubuntu-latest
5252
env:
5353
MODULE_PATH: 'modules/${{ matrix.modules.module_name }}'
5454
steps:
5555
- name: Checkout
56-
uses: actions/checkout@v3
56+
uses: actions/checkout@v4
5757
with:
5858
fetch-depth: 0
5959
- id: determine-language
@@ -67,10 +67,14 @@ jobs:
6767
elif [ -f $MODULE_PATH/pyproject.toml ]; then \
6868
echo "language=python" >> "$GITHUB_OUTPUT"; \
6969
fi
70-
- name: Set up Python ${{ matrix.python-version }}
71-
uses: actions/setup-python@v4
70+
- name: Set up uv
71+
if: ${{ steps.determine-language.outputs.language == 'python' }}
72+
uses: astral-sh/setup-uv@v5
7273
with:
73-
python-version: ${{ matrix.python-version }}
74+
enable-cache: true
75+
- name: Set up Python ${{ matrix.python-version }}
76+
if: ${{ steps.determine-language.outputs.language == 'python' }}
77+
run: uv python install ${{ matrix.python-version }}
7478
- name: Set up Node ${{ matrix.node-version }}
7579
uses: actions/setup-node@v4
7680
with:
@@ -79,9 +83,8 @@ jobs:
7983
if: ${{ steps.determine-language.outputs.language == 'python' }}
8084
run: |
8185
set -x
82-
python -m pip install --upgrade pip
83-
pip install -r requirements-dev.txt
84-
pip install -r $MODULE_PATH/requirements.txt
86+
uv pip install --system -r requirements-dev.txt
87+
uv pip install --system -r $MODULE_PATH/requirements.txt
8588
- name: Install Requirements (Typescript)
8689
if: ${{ steps.determine-language.outputs.language == 'typescript' }}
8790
run: |

.github/workflows/module-checks.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,14 @@ jobs:
6464
fail-fast: false
6565
matrix:
6666
modules: ${{ fromJson(needs.get-modules.outputs.matrix) }}
67-
python-version: [3.9]
67+
python-version: ["3.11"]
6868
node-version: [18.x]
6969
runs-on: ubuntu-latest
7070
env:
7171
MODULE_PATH: 'modules/${{ matrix.modules.module_name }}'
7272
steps:
7373
- name: Checkout
74-
uses: actions/checkout@v3
74+
uses: actions/checkout@v4
7575
with:
7676
fetch-depth: 0
7777
- id: determine-language
@@ -87,11 +87,14 @@ jobs:
8787
else \
8888
echo "language=none" >> "$GITHUB_OUTPUT"; \
8989
fi
90-
- name: Set up Python ${{ matrix.python-version }}
90+
- name: Set up uv
9191
if: ${{ steps.determine-language.outputs.language == 'python' }}
92-
uses: actions/setup-python@v4
92+
uses: astral-sh/setup-uv@v5
9393
with:
94-
python-version: ${{ matrix.python-version }}
94+
enable-cache: true
95+
- name: Set up Python ${{ matrix.python-version }}
96+
if: ${{ steps.determine-language.outputs.language == 'python' }}
97+
run: uv python install ${{ matrix.python-version }}
9598
- name: Set up Node ${{ matrix.node-version }}
9699
if: ${{ steps.determine-language.outputs.language == 'typescript' }}
97100
uses: actions/setup-node@v4
@@ -101,9 +104,8 @@ jobs:
101104
if: ${{ steps.determine-language.outputs.language == 'python' }}
102105
run: |
103106
set -x
104-
python -m pip install --upgrade pip
105-
pip install -r requirements-dev.txt
106-
pip install -r $MODULE_PATH/requirements.txt
107+
uv pip install --system -r requirements-dev.txt
108+
uv pip install --system -r $MODULE_PATH/requirements.txt
107109
- name: Install Requirements (Typescript)
108110
if: ${{ steps.determine-language.outputs.language == 'typescript' }}
109111
run: |

.github/workflows/one-click-template-lint.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,16 @@ jobs:
3333
uses: actions/checkout@v4
3434
with:
3535
fetch-depth: 0
36-
- name: Set up Python
37-
uses: actions/setup-python@v5
36+
- name: Set up uv
37+
uses: astral-sh/setup-uv@v5
3838
with:
39-
python-version: 3.11
39+
enable-cache: true
40+
- name: Set up Python
41+
run: uv python install 3.11
4042
- name: Install Requirements
4143
run: |
4244
set -x
43-
python -m pip install --upgrade pip
44-
pip install -r requirements-dev.txt
45+
uv pip install --system -r requirements-dev.txt
4546
- name: cfn-lint
4647
run: cfn-lint --template ./one-click-launch.yaml
4748

.github/workflows/yaml-lint-check.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,13 @@ jobs:
2222
steps:
2323
- uses: actions/checkout@v4
2424

25+
- name: Set up uv
26+
uses: astral-sh/setup-uv@v5
27+
with:
28+
enable-cache: true
29+
2530
- name: Install yamllint
26-
run: pip install yamllint
31+
run: uv pip install --system yamllint
2732

2833
- name: Lint YAML files
2934
run: yamllint --format github -d "{extends: default, ignore: ['*chart*']}" .

manifests/bedrock-finetuning-sfn/bedrock-finetuning-modules.yaml

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: bedrock-finetuning
2-
path: git::https://github.com/awslabs/aiops-modules.git//modules/fmops/bedrock-finetuning?ref=release/2.1.1&depth=1
2+
path: modules/fmops/bedrock-finetuning
33
targetAccount: primary
44
parameters:
55
- name: bedrock-base-model-ID
@@ -18,3 +18,61 @@ parameters:
1818
key: PrivateSubnetIds
1919
- name: removal-policy
2020
value: DESTROY
21+
---
22+
name: studio
23+
path: modules/sagemaker/sagemaker-studio
24+
targetAccount: primary
25+
parameters:
26+
- name: vpc_id
27+
valueFrom:
28+
moduleMetadata:
29+
group: networking
30+
name: networking
31+
key: VpcId
32+
- name: subnet_ids
33+
valueFrom:
34+
moduleMetadata:
35+
group: networking
36+
name: networking
37+
key: PrivateSubnetIds
38+
- name: data_science_users
39+
value:
40+
- ds-user-1
41+
- name: lead_data_science_users
42+
value:
43+
- lead-ds-user-1
44+
- name: server_lifecycle_name
45+
value: studio-auto-shutdown
46+
- name: studio_bucket_name
47+
value: mlops-*
48+
- name: retain_efs
49+
value: 'False'
50+
- name: enable_domain_resource_isolation
51+
value: 'False'
52+
---
53+
name: deepseek-jumpstart
54+
path: modules/fmops/sagemaker-jumpstart-fm-endpoint
55+
targetAccount: primary
56+
parameters:
57+
- name: jump-start-model-name
58+
value: DEEPSEEK_LLM_R1_DISTILL_LLAMA_8B_1_1_2
59+
- name: instance-type
60+
value: ml.g6.12xlarge
61+
- name: vpc_id
62+
valueFrom:
63+
moduleMetadata:
64+
group: networking
65+
name: networking
66+
key: VpcId
67+
- name: subnet_ids
68+
valueFrom:
69+
moduleMetadata:
70+
group: networking
71+
name: networking
72+
key: PrivateSubnetIds
73+
---
74+
name: eks
75+
path: modules/agents/eks-strands-agents-demo
76+
parameters:
77+
- name: EksClusterName
78+
value: eks-strands-agents-demo

manifests/deepseek-sagemaker/sagemaker-endpoints-modules.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: deepseek-jumpstart
2-
path: git::https://github.com/awslabs/aiops-modules.git//modules/fmops/sagemaker-jumpstart-fm-endpoint?ref=release/2.1.1&depth=1
2+
path: modules/fmops/sagemaker-jumpstart-fm-endpoint
33
targetAccount: primary
44
parameters:
55
- name: jump-start-model-name

manifests/deepseek-sagemaker/sagemaker-studio-modules.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: studio
2-
path: git::https://github.com/awslabs/aiops-modules.git//modules/sagemaker/sagemaker-studio?ref=release/2.1.1&depth=1
2+
path: modules/sagemaker/sagemaker-studio
33
targetAccount: primary
44
parameters:
55
- name: vpc_id
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: eks
2-
path: git::https://github.com/awslabs/aiops-modules.git//modules/agents/eks-strands-agents-demo?ref=release/2.1.1&depth=1
2+
path: modules/agents/eks-strands-agents-demo
33
parameters:
44
- name: EksClusterName
55
value: eks-strands-agents-demo

modules/eks/ray-cluster/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ exclude = [
1414
"codeseeder",
1515
]
1616
line-length = 120
17-
target-version = "py38"
17+
target-version = "py311"
1818

1919
[tool.ruff.lint]
2020
select = ["F", "I", "E", "W"]
2121
fixable = ["ALL"]
2222

2323
[tool.mypy]
24-
python_version = "3.8"
24+
python_version = "3.11"
2525
strict = true
2626
ignore_missing_imports = true
2727
disallow_untyped_decorators = false

modules/eks/ray-operator/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ exclude = [
1414
"codeseeder",
1515
]
1616
line-length = 120
17-
target-version = "py38"
17+
target-version = "py311"
1818

1919
[tool.ruff.lint]
2020
select = ["F", "I", "E", "W"]
2121
fixable = ["ALL"]
2222

2323
[tool.mypy]
24-
python_version = "3.8"
24+
python_version = "3.11"
2525
strict = true
2626
ignore_missing_imports = true
2727
disallow_untyped_decorators = false

0 commit comments

Comments
 (0)