GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — chore: Add ray unit test suites to noxfile.py and add ray_testing extras · RCLDevelopers/python-aiplatform@6c3838e

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • noxfile.py
  • setup.py
  • testing
    • constraints-ray-2.4.0.txt
    • constraints-ray-2.9.3.txt
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎noxfile.py‎

Copy file name to clipboardExpand all lines: noxfile.py
+28-1Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
# 'docfx' is excluded since it only needs to run in 'docs-presubmit'
6868
nox.options.sessions = [
6969
"unit",
70+
"unit_ray",
7071
"system",
7172
"cover",
7273
"lint",
@@ -190,8 +191,34 @@ def unit(session):
190191
default(session)
191192

192193

193-
def install_systemtest_dependencies(session, *constraints):
194+
@nox.session(python="3.10")
195+
@nox.parametrize("ray", ["2.4.0", "2.9.3"])
196+
def unit_ray(session, ray):
197+
# Install all test dependencies, then install this package in-place.
198+
199+
constraints_path = str(CURRENT_DIRECTORY / "testing" / f"constraints-ray-{ray}.txt")
200+
standard_deps = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_DEPENDENCIES
201+
session.install(*standard_deps, "-c", constraints_path)
202+
203+
# Install ray extras
204+
session.install("-e", ".[ray_testing]", "-c", constraints_path)
205+
206+
# Run py.test against the unit tests.
207+
session.run(
208+
"py.test",
209+
"--quiet",
210+
f"--junitxml=unit_ray_{ray}_sponge_log.xml",
211+
"--cov=google",
212+
"--cov-append",
213+
"--cov-config=.coveragerc",
214+
"--cov-report=",
215+
"--cov-fail-under=0",
216+
os.path.join("tests", "unit", "vertex_ray"),
217+
*session.posargs,
218+
)
194219

220+
221+
def install_systemtest_dependencies(session, *constraints):
195222
# Use pre-release gRPC for system tests.
196223
# Exclude version 1.52.0rc1 which has a known issue.
197224
# See https://github.com/grpc/grpc/issues/32163
Collapse file

‎setup.py‎

Copy file name to clipboardExpand all lines: setup.py
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,17 @@
116116
"docstring_parser < 1",
117117
)
118118

119+
ray_testing_extra_require = ray_extra_require + [
120+
# ray train extras required for prediction tests
121+
"ray[train] >= 2.4, <= 2.9.3,!= 2.5.*,!= 2.6.*,!= 2.7.*,!= 2.8.*,!=2.9.0,!=2.9.1,!=2.9.2",
122+
# Framework version constraints copied from testing_extra_require
123+
"scikit-learn",
124+
"tensorflow",
125+
"torch >= 2.0.0, < 2.1.0",
126+
"xgboost",
127+
"xgboost_ray",
128+
]
129+
119130
full_extra_require = list(
120131
set(
121132
tensorboard_extra_require
@@ -210,6 +221,7 @@
210221
"autologging": autologging_extra_require,
211222
"preview": preview_extra_require,
212223
"ray": ray_extra_require,
224+
"ray_testing": ray_testing_extra_require,
213225
},
214226
python_requires=">=3.8",
215227
classifiers=[
Collapse file

‎testing/constraints-ray-2.4.0.txt‎

Copy file name to clipboard
+13Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
ray==2.4.0
2+
# Below constraints are inherited from constraints-3.10.txt
3+
google-api-core
4+
proto-plus==1.22.0
5+
protobuf
6+
mock==4.0.2
7+
google-cloud-storage==2.2.1 # Increased for kfp 2.0 compatibility
8+
packaging==20.0 # Increased for compatibility with MLFlow
9+
grpcio-testing==1.34.0
10+
mlflow==1.30.1 # Pinned to speed up installation
11+
pytest-xdist==3.3.1 # Pinned to unbreak unit tests
12+
IPython # Added to test supernova rich html buttons
13+
Collapse file

‎testing/constraints-ray-2.9.3.txt‎

Copy file name to clipboard
+13Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
ray==2.9.3
2+
# Below constraints are inherited from constraints-3.10.txt
3+
google-api-core
4+
proto-plus==1.22.0
5+
protobuf
6+
mock==4.0.2
7+
google-cloud-storage==2.2.1 # Increased for kfp 2.0 compatibility
8+
packaging==20.0 # Increased for compatibility with MLFlow
9+
grpcio-testing==1.34.0
10+
mlflow==1.30.1 # Pinned to speed up installation
11+
pytest-xdist==3.3.1 # Pinned to unbreak unit tests
12+
IPython # Added to test supernova rich html buttons
13+

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.