Skip to content

Commit 84c0fdf

Browse files
committed
reformat cloudpath warning, add try except
Signed-off-by: Jack Luar <[email protected]>
1 parent c399591 commit 84c0fdf

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

tools/AutoTuner/distributed/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ Currently, this setup supports GCP with batteries included. With configuration o
3737
alternative cloud providers could be used:
3838
- [Azure](https://docs.ray.io/en/latest/cluster/vms/user-guides/launching-clusters/azure.html)
3939
- [AWS](https://docs.ray.io/en/latest/cluster/vms/user-guides/launching-clusters/aws.html)
40-
- [vSphere](https://docs.ray.io/en/latest/cluster/vms/user-guides/launching-clusters/vsphere.html)
4140

4241
## Public cluster setup
4342

tools/AutoTuner/src/autotuner/distributed.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
from ray.util.queue import Queue
8686

8787
from ax.service.ax_client import AxClient
88+
import warnings
8889

8990
from autotuner.utils import (
9091
openroad,
@@ -506,12 +507,18 @@ def parse_arguments():
506507

507508
# Validate cloud_dir if exist
508509
if args.cloud_dir:
509-
_ = CloudPath(args.cloud_dir)
510-
if not args.cloud_dir.startswith("gs://"):
510+
try:
511+
CloudPath(args.cloud_dir).exists()
512+
except Exception as e:
511513
print(
512-
f"[ERROR TUN-0030] Cloud storage directory {args.cloud_dir} is not supported."
514+
f"[ERROR TUN-0007] Cloud storage directory {args.cloud_dir} does not exist or invalid IAM supplied."
513515
)
514516
sys.exit(1)
517+
if not args.cloud_dir.startswith("gs://"):
518+
warnings.warn(
519+
f"Cloud storage directory {args.cloud_dir} is not supported. Please use gs://<bucket-name>.",
520+
UserWarning,
521+
)
515522

516523
return args
517524

0 commit comments

Comments
 (0)