From 2f7c78041638a18a2cd5a11683eff8572917b6be Mon Sep 17 00:00:00 2001 From: Huy Do Date: Thu, 14 Dec 2023 10:36:25 -0800 Subject: [PATCH] Keep nightly 20231010 for ExecuTorch alpha 0.1 for now --- s3_management/manage.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/s3_management/manage.py b/s3_management/manage.py index 47c151f08..851a848c6 100644 --- a/s3_management/manage.py +++ b/s3_management/manage.py @@ -112,6 +112,12 @@ # How many packages should we keep of a specific package? KEEP_THRESHOLD = 60 +# TODO (huydhn): Clean this up once ExecuTorch has a new stable release that +# match PyTorch stable release cadence. This nightly version is currently +# referred to publicly in ExecuTorch alpha 0.1 release. So we want to keep +# nightly binaries around for now +KEEP_NIGHTLY_PACKAGES_FOR_EXECUTORCH = {datetime(2023, 10, 10, 0, 0)} + S3IndexType = TypeVar('S3IndexType', bound='S3Index') @@ -201,7 +207,10 @@ def nightly_packages_to_show(self: S3IndexType) -> List[S3Object]: if package_name not in PACKAGE_ALLOW_LIST: to_hide.add(obj) continue - if packages[package_name] >= KEEP_THRESHOLD or between_bad_dates(package_build_time): + if package_build_time not in KEEP_NIGHTLY_PACKAGES_FOR_EXECUTORCH and ( + packages[package_name] >= KEEP_THRESHOLD + or between_bad_dates(package_build_time) + ): to_hide.add(obj) else: packages[package_name] += 1