-
Notifications
You must be signed in to change notification settings - Fork 2
173 lines (149 loc) · 5.49 KB
/
python.yml
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
name: python
on:
pull_request:
push:
branches:
- main
jobs:
path-filter:
outputs:
common: ${{steps.changes.outputs.common}}
pytorch: ${{steps.changes.outputs.pytorch}}
ray: ${{steps.changes.outputs.ray}}
river: ${{steps.changes.outputs.river}}
tensorflow: ${{steps.changes.outputs.tensorflow}}
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: changes
with:
filters: |
common:
- .python-version
- .tool-versions
- poetry.lock
- pyproject.toml
- .github/workflows/python.yml
pytorch:
- 'pytorch/**'
- '!pytorch/README.md'
- '!pytorch/**/README.md'
ray:
- 'ray/**'
- '!ray/README.md'
- '!ray/**/README.md'
river:
- 'river/**'
- '!river/README.md'
- '!river/**/README.md'
tensorflow:
- 'tensorflow/**'
- '!tensorflow/README.md'
- '!tensorflow/**/README.md'
status-check-python:
# This job is used for the branch's branch protection rule's status check.
# If all dependent jobs succeed or are skipped this job succeeds.
runs-on: ubuntu-latest
needs:
- pytorch
- ray
- river
- tensorflow
permissions: {}
if: failure()
steps:
- run: exit 1
pytorch:
if: needs.path-filter.outputs.common == 'true' || needs.path-filter.outputs.pytorch == 'true'
needs: path-filter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python & Poetry
uses: nakamasato/github-actions/[email protected]
with:
install-dependencies: false
- name: run
working-directory: pytorch
run: |
poetry install --only pytorch --no-root
poetry run python distributed_example.py
ray:
if: needs.path-filter.outputs.common == 'true' || needs.path-filter.outputs.ray == 'true'
needs: path-filter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python & Poetry
uses: nakamasato/github-actions/[email protected]
with:
install-dependencies: false
- name: Install dependencies
run: poetry install --only ray,tensorflow,pytorch --no-root
- name: 02-task-pattern
run: poetry run python ray/02-task-pattern/task_pattern_map_and_reduce.py
- name: 05-train simple with torch
run: poetry run python ray/05-train/simple_example.py -b torch
- name: 05-train simple with tensorflow
run: poetry run python ray/05-train/simple_example.py -b tensorflow
# == Status ==
# Current time: 2023-09-23 10:32:09 (running for 00:07:35.39)
# Memory usage on this node: 1.6/6.8 GiB
# Using FIFO scheduling algorithm.
# Resources requested: 0/2 CPUs, 0/0 GPUs, 0.0/3.48 GiB heap, 0.0/1.74 GiB objects
# Result logdir: /home/runner/ray_results/TensorflowTrainer_2023-09-23_10-24-33
# Number of trials: 1/1 (1 PENDING)
# +-------------------------------+----------+-------+
# | Trial name | status | loc |
# |-------------------------------+----------+-------|
# | TensorflowTrainer_6383c_00000 | PENDING | |
# +-------------------------------+----------+-------+
# - name: 05-train tensorflow example
# run: python 05-train/tensorflow_example.py --smoke-test
# TODO: https://github.com/nakamasato/ml-training/issues/298
river:
if: needs.path-filter.outputs.common == 'true' || needs.path-filter.outputs.river == 'true'
needs: path-filter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python & Poetry
uses: nakamasato/github-actions/[email protected]
with:
install-dependencies: false
- name: Install dependencies
run: poetry install --only river --no-root
- name: run river/quickstart/main.py
run: poetry run python river/quickstart/main.py
- name: run river/examples/fm-for-datalens/main.py
run: poetry run python river/examples/fm-for-datalens/main.py --native-prediction --linear-regression --funk-mf --biased-mf --mimic-biased-mf --mf-with-improved-feature
tensorflow:
if: needs.path-filter.outputs.common == 'true' || needs.path-filter.outputs.tensorflow == 'true'
needs: path-filter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python & Poetry
uses: nakamasato/github-actions/[email protected]
with:
install-dependencies: false
- name: Install dependencies
run: poetry install --only tensorflow --no-root
- name: parameter-server-training
run: poetry run python tensorflow/parameter-server-training/train_in_process_cluster.py
- name: dataset
run: poetry run python tensorflow/dataset/practice.py
- name: movielens - retrieve
env:
TF_USE_LEGACY_KERAS: 1
run: |
poetry run python tensorflow/examples/movielens/retrieve.py
- name: movielens - rank
env:
WRAPT_DISABLE_EXTENSIONS: 1
run: |
poetry run python tensorflow/examples/movielens/rank.py