Skip to content

Commit 00755dc

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

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
@@ -50,6 +50,7 @@
5050
from ray.util.queue import Queue
5151

5252
from ax.service.ax_client import AxClient
53+
import warnings
5354

5455
from autotuner.utils import (
5556
openroad,
@@ -471,12 +472,18 @@ def parse_arguments():
471472

472473
# Validate cloud_dir if exist
473474
if args.cloud_dir:
474-
_ = CloudPath(args.cloud_dir)
475-
if not args.cloud_dir.startswith("gs://"):
475+
try:
476+
CloudPath(args.cloud_dir).exists()
477+
except Exception as e:
476478
print(
477-
f"[ERROR TUN-0030] Cloud storage directory {args.cloud_dir} is not supported."
479+
f"[ERROR TUN-0007] Cloud storage directory {args.cloud_dir} does not exist or invalid IAM supplied."
478480
)
479481
sys.exit(1)
482+
if not args.cloud_dir.startswith("gs://"):
483+
warnings.warn(
484+
f"Cloud storage directory {args.cloud_dir} is not supported. Please use gs://<bucket-name>.",
485+
UserWarning,
486+
)
480487

481488
return args
482489

0 commit comments

Comments
 (0)