Skip to content

Commit cc336ca

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

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,
@@ -504,12 +505,18 @@ def parse_arguments():
504505

505506
# Validate cloud_dir if exist
506507
if args.cloud_dir:
507-
_ = CloudPath(args.cloud_dir)
508-
if not args.cloud_dir.startswith("gs://"):
508+
try:
509+
CloudPath(args.cloud_dir).exists()
510+
except Exception as e:
509511
print(
510-
f"[ERROR TUN-0030] Cloud storage directory {args.cloud_dir} is not supported."
512+
f"[ERROR TUN-0007] Cloud storage directory {args.cloud_dir} does not exist or invalid IAM supplied."
511513
)
512514
sys.exit(1)
515+
if not args.cloud_dir.startswith("gs://"):
516+
warnings.warn(
517+
f"Cloud storage directory {args.cloud_dir} is not supported. Please use gs://<bucket-name>.",
518+
UserWarning,
519+
)
513520

514521
return args
515522

0 commit comments

Comments
 (0)