File tree Expand file tree Collapse file tree 2 files changed +7
-18
lines changed
Expand file tree Collapse file tree 2 files changed +7
-18
lines changed Original file line number Diff line number Diff line change @@ -3,14 +3,9 @@ name: e2e
33
44on :
55 pull_request :
6- branches :
7- - main
8- - ' release-*'
9- paths-ignore :
10- - ' docs/**'
11- - ' **.adoc'
12- - ' **.md'
13- - ' LICENSE'
6+ branches : [ main ]
7+ push :
8+ branches : [ main ]
149
1510concurrency :
1611 group : ${{ github.head_ref }}-${{ github.workflow }}
@@ -117,7 +112,7 @@ jobs:
117112 pip install poetry
118113 poetry install --with test,docs
119114 echo "Running e2e tests..."
120- poetry run pytest -v -s ./tests/e2e -m 'kind and nvidia_gpu' > ${CODEFLARE_TEST_OUTPUT_DIR}/pytest_output.log 2>&1
115+ poetry run pytest -v -s ./tests/e2e/local_interactive_sdk_kind_test.py::TestRayLocalInteractiveOauth::test_local_interactives_nvidia_gpu > ${CODEFLARE_TEST_OUTPUT_DIR}/pytest_output.log 2>&1
121116 env :
122117 GRPC_DNS_RESOLVER : " native"
123118
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ def run_local_interactives(
4848 head_cpu_limits = "500m" ,
4949 head_memory_requests = 2 ,
5050 head_memory_limits = 2 ,
51+ head_extended_resource_requests = {gpu_resource_name : 0 },
5152 worker_cpu_requests = "500m" ,
5253 worker_cpu_limits = 1 ,
5354 worker_memory_requests = 1 ,
@@ -68,22 +69,15 @@ def run_local_interactives(
6869 ray .shutdown ()
6970 ray .init (address = cluster .local_client_url (), logging_level = "DEBUG" )
7071
71- @ray .remote (num_gpus = number_of_gpus / 2 )
72- def heavy_calculation_part (num_iterations ):
72+ @ray .remote (num_gpus = number_of_gpus )
73+ def heavy_calculation (num_iterations ):
7374 result = 0.0
7475 for i in range (num_iterations ):
7576 for j in range (num_iterations ):
7677 for k in range (num_iterations ):
7778 result += math .sin (i ) * math .cos (j ) * math .tan (k )
7879 return result
7980
80- @ray .remote (num_gpus = number_of_gpus / 2 )
81- def heavy_calculation (num_iterations ):
82- results = ray .get (
83- [heavy_calculation_part .remote (num_iterations // 30 ) for _ in range (30 )]
84- )
85- return sum (results )
86-
8781 ref = heavy_calculation .remote (3000 )
8882 result = ray .get (ref )
8983 assert result == 1789.4644387076714
You can’t perform that action at this time.
0 commit comments