|
14 | 14 |
|
15 | 15 | jobs:
|
16 | 16 | verify-hf_interactive:
|
17 |
| - # if: ${{ github.event.label.name == 'test-additional-notebooks' }} |
| 17 | + if: ${{ github.event.label.name == 'test-additional-notebooks' }} |
18 | 18 | runs-on: ubuntu-20.04-4core
|
19 | 19 |
|
20 | 20 | steps:
|
@@ -85,18 +85,24 @@ jobs:
|
85 | 85 | # Remove login/logout cells, as KinD doesn't support authentication using token
|
86 | 86 | jq -r 'del(.cells[] | select(.source[] | contains("Create authentication object for user permissions")))' hf_interactive.ipynb > hf_interactive.ipynb.tmp && mv hf_interactive.ipynb.tmp hf_interactive.ipynb
|
87 | 87 | jq -r 'del(.cells[] | select(.source[] | contains("auth.logout()")))' hf_interactive.ipynb > hf_interactive.ipynb.tmp && mv hf_interactive.ipynb.tmp hf_interactive.ipynb
|
| 88 | + # Rewrite cluster_uri() to local_client_url() to retrieve client URL available out of cluster, as the test is executed outside of cluster |
| 89 | + sed -i "s/cluster_uri()/local_client_url()/g" hf_interactive.ipynb |
88 | 90 | # Replace async logs with waiting for job to finish, async logs don't work properly in papermill
|
89 | 91 | JOB_WAIT=$(jq -r '.' ${GITHUB_WORKSPACE}/.github/resources/wait_for_job_cell.json)
|
90 | 92 | jq --argjson job_wait "$JOB_WAIT" -r '(.cells[] | select(.source[] | contains("async for lines in client.tail_job_logs"))) |= $job_wait' hf_interactive.ipynb > hf_interactive.ipynb.tmp && mv hf_interactive.ipynb.tmp hf_interactive.ipynb
|
91 | 93 | # Set explicit namespace as SDK need it (currently) to resolve local queues
|
92 |
| - sed -i "s/worker_cpu_requests=8,/worker_cpu_requests=1, namespace='default',/" hf_interactive.ipynb |
93 | 94 | # Change cluster parameters (need to decrease)
|
94 | 95 | sed -i "s/{'nvidia.com\/gpu':1}/{'nvidia.com\/gpu':0}/g" hf_interactive.ipynb
|
95 |
| - sed -i "s/worker_cpu_limits=8,/worker_cpu_limits=1,/" hf_interactive.ipynb |
96 |
| - sed -i "s/worker_memory_requests=16,/worker_memory_requests=4,/" hf_interactive.ipynb |
97 |
| - sed -i "s/worker_memory_limits=8,/worker_memory_limits=4,/" hf_interactive.ipynb |
| 96 | + sed -i "s/worker_cpu_requests=8,/worker_cpu_requests='250m', namespace='default',/" hf_interactive.ipynb |
| 97 | + sed -i "s/worker_cpu_limits=8,/worker_cpu_limits=4,/" hf_interactive.ipynb |
| 98 | + sed -i "s/worker_memory_requests=16,/worker_memory_requests=12,/" hf_interactive.ipynb |
| 99 | + sed -i "s/worker_memory_limits=16,/worker_memory_limits=12,/" hf_interactive.ipynb |
| 100 | + sed -i "s/use_gpu=True/use_gpu=False/" hf_interactive.ipynb |
| 101 | + cat hf_interactive.ipynb |
98 | 102 | # Run notebook
|
99 | 103 | poetry run papermill hf_interactive.ipynb hf_interactive_out.ipynb --log-output --execution-timeout 1200
|
| 104 | + env: |
| 105 | + GRPC_DNS_RESOLVER: "native" |
100 | 106 | working-directory: demo-notebooks/additional-demos
|
101 | 107 |
|
102 | 108 | - name: Print CodeFlare operator logs
|
@@ -135,7 +141,6 @@ jobs:
|
135 | 141 |
|
136 | 142 | verify-local_interactive:
|
137 | 143 | # if: ${{ github.event.label.name == 'test-additional-notebooks' }}
|
138 |
| - # runs-on: ubuntu-20.04-4core |
139 | 144 | runs-on: ubuntu-20.04-4core
|
140 | 145 |
|
141 | 146 | steps:
|
@@ -205,13 +210,18 @@ jobs:
|
205 | 210 | # Remove login/logout cells, as KinD doesn't support authentication using token
|
206 | 211 | jq -r 'del(.cells[] | select(.source[] | contains("Create authentication object and log in to desired user account")))' local_interactive.ipynb > local_interactive.ipynb.tmp && mv local_interactive.ipynb.tmp local_interactive.ipynb
|
207 | 212 | jq -r 'del(.cells[] | select(.source[] | contains("auth.logout()")))' local_interactive.ipynb > local_interactive.ipynb.tmp && mv local_interactive.ipynb.tmp local_interactive.ipynb
|
| 213 | + # Rewrite cluster_uri() to local_client_url() to retrieve client URL available out of cluster, as the test is executed outside of cluster |
| 214 | + sed -i "s/cluster_uri()/local_client_url()/g" local_interactive.ipynb |
208 | 215 | # Replace async logs with waiting for job to finish, async logs don't work properly in papermill
|
209 | 216 | JOB_WAIT=$(jq -r '.' ${GITHUB_WORKSPACE}/.github/resources/wait_for_job_cell.json)
|
210 | 217 | jq --argjson job_wait "$JOB_WAIT" -r '(.cells[] | select(.source[] | contains("async for lines in client.tail_job_logs"))) |= $job_wait' local_interactive.ipynb > local_interactive.ipynb.tmp && mv local_interactive.ipynb.tmp local_interactive.ipynb
|
211 | 218 | # Set explicit namespace as SDK need it (currently) to resolve local queues
|
212 |
| - sed -i "s/worker_cpu_requests=1,/worker_cpu_requests=1, namespace='default',/" local_interactive.ipynb |
| 219 | + sed -i "s/worker_cpu_requests=1,/worker_cpu_requests='250m', namespace='default',/" local_interactive.ipynb |
| 220 | + cat local_interactive.ipynb |
213 | 221 | # Run notebook
|
214 |
| - poetry run papermill local_interactive.ipynb hf_interactive_out.ipynb --log-output --execution-timeout 1200 |
| 222 | + poetry run papermill local_interactive.ipynb local_interactive_out.ipynb --log-output --execution-timeout 1200 |
| 223 | + env: |
| 224 | + GRPC_DNS_RESOLVER: "native" |
215 | 225 | working-directory: demo-notebooks/additional-demos
|
216 | 226 |
|
217 | 227 | - name: Print CodeFlare operator logs
|
@@ -319,13 +329,21 @@ jobs:
|
319 | 329 | # Remove login/logout cells, as KinD doesn't support authentication using token
|
320 | 330 | jq -r 'del(.cells[] | select(.source[] | contains("Create authentication object for user permissions")))' ray_job_client.ipynb > ray_job_client.ipynb.tmp && mv ray_job_client.ipynb.tmp ray_job_client.ipynb
|
321 | 331 | jq -r 'del(.cells[] | select(.source[] | contains("auth.logout()")))' ray_job_client.ipynb > ray_job_client.ipynb.tmp && mv ray_job_client.ipynb.tmp ray_job_client.ipynb
|
| 332 | + # Rewrite cluster_uri() to local_client_url() to retrieve client URL available out of cluster, as the test is executed outside of cluster |
| 333 | + sed -i "s/cluster_uri()/local_client_url()/g" ray_job_client.ipynb |
322 | 334 | # Replace async logs with waiting for job to finish, async logs don't work properly in papermill
|
323 | 335 | JOB_WAIT=$(jq -r '.' ${GITHUB_WORKSPACE}/.github/resources/wait_for_job_cell.json)
|
324 | 336 | jq --argjson job_wait "$JOB_WAIT" -r '(.cells[] | select(.source[] | contains("async for lines in client.tail_job_logs"))) |= $job_wait' ray_job_client.ipynb > ray_job_client.ipynb.tmp && mv ray_job_client.ipynb.tmp ray_job_client.ipynb
|
325 | 337 | # Set explicit namespace as SDK need it (currently) to resolve local queues
|
326 |
| - sed -i "s/worker_cpu_requests=1,/worker_cpu_requests=1, namespace='default',/" ray_job_client.ipynb |
| 338 | + sed -i "s/worker_cpu_requests=1,/worker_cpu_requests='250m', namespace='default',/" ray_job_client.ipynb |
| 339 | + sed -i "s/worker_memory_requests=4,/worker_memory_requests=1,/" ray_job_client.ipynb |
| 340 | + sed -i "s/worker_memory_limits=4,/worker_memory_limits=1,/" ray_job_client.ipynb |
| 341 | + sed -i "s/RayJobClient(address=ray_dashboard, headers=header, verify=True)/RayJobClient(address=ray_dashboard, verify=False)/" ray_job_client.ipynb |
| 342 | + cat ray_job_client.ipynb |
327 | 343 | # Run notebook
|
328 | 344 | poetry run papermill ray_job_client.ipynb hf_interactive_out.ipynb --log-output --execution-timeout 1200
|
| 345 | + env: |
| 346 | + GRPC_DNS_RESOLVER: "native" |
329 | 347 | working-directory: demo-notebooks/additional-demos
|
330 | 348 |
|
331 | 349 | - name: Print CodeFlare operator logs
|
|
0 commit comments