Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release byod] fix ml requirements file selection #39353

Merged
merged 1 commit into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions release/ray_release/byod/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
RELEASE_BYOD_DIR = os.path.join(RELEASE_PACKAGE_DIR, "ray_release/byod")
REQUIREMENTS_BYOD = "requirements_byod"
REQUIREMENTS_ML_BYOD = "requirements_ml_byod"
PYTHON_VERSION = "3.8"


def build_champagne_image(
Expand Down Expand Up @@ -124,11 +123,12 @@ def build_anyscale_base_byod_images(tests: List[Test]) -> None:
and int(time.time()) - start < BASE_IMAGE_WAIT_TIMEOUT
):
for byod_image, test in to_be_built.items():
byod_requirements = (
f"{REQUIREMENTS_BYOD}_{test.get('python', PYTHON_VERSION)}.txt"
if test.get_byod_type() == "cpu"
else f"{REQUIREMENTS_ML_BYOD}_{test.get('python', PYTHON_VERSION)}.txt"
)
py_version = test.get_python_version()
if test.use_byod_ml_image():
byod_requirements = f"{REQUIREMENTS_ML_BYOD}_{py_version}.txt"
else:
byod_requirements = f"{REQUIREMENTS_BYOD}_{py_version}.txt"

if _byod_image_exist(test):
logger.info(f"Image {byod_image} already exists")
built.add(byod_image)
Expand Down Expand Up @@ -210,7 +210,7 @@ def _validate_and_push(byod_image: str) -> None:
assert (
docker_ray_commit == expected_ray_commit
), f"Expected ray commit {expected_ray_commit}, found {docker_ray_commit}"
logger.info(f"Pushing image to ECR: {byod_image}")
logger.info(f"Pushing image to registry: {byod_image}")
subprocess.check_call(
["docker", "push", byod_image],
stdout=sys.stderr,
Expand Down
4 changes: 2 additions & 2 deletions release/ray_release/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,15 +251,15 @@ def get_byod_image_tag(self) -> str:
}
return f"{self.get_byod_base_image_tag()}-{dict_hash(custom_info)}"

def _use_byod_ml_image(self) -> bool:
def use_byod_ml_image(self) -> bool:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe if using ml image should have it's own field? like technically speaking, we also have ray-ml:cpu image, just never used in release tests..

"""Returns whether to use the ML image for this test."""
return self.get_byod_type() == "gpu"

def get_byod_repo(self) -> str:
"""
Returns the byod repo to use for this test.
"""
if self._use_byod_ml_image():
if self.use_byod_ml_image():
return DATAPLANE_ECR_ML_REPO
return DATAPLANE_ECR_REPO

Expand Down
Loading