ray/release/nightly_tests/shuffle/shuffle_test.py
SangBin Cho ee1ccb569d
[Test] Nightly shuffle test (#15998)
* shuffle daily test update.

* lint

* Improve testing.

* Download the real nightly.

* Addressed code review.

* fix typo

* fix issue

* fix the broken release test

* Updated the test.
2021-05-24 15:33:31 -07:00

32 lines
995 B
Python

import argparse
import time
import os
import json
import subprocess
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument(
"--num-partitions", help="number of partitions", default=50, type=str)
parser.add_argument(
"--partition-size",
help="number of reducer actors used",
default="200e6",
type=str)
args = parser.parse_args()
start = time.time()
success = True
try:
subprocess.check_call([
"python", "-m", "ray.experimental.shuffle",
"--ray-address={}".format(os.environ["RAY_ADDRESS"]),
f"--num-partitions={args.num_partitions}",
f"--partition-size={args.partition_size}"
])
except Exception as e:
print(f"The test failed with {e}")
success = False
delta = time.time() - start
with open(os.environ["TEST_OUTPUT_JSON"], "w") as f:
f.write(json.dumps({"shuffle_time": delta, "success": success}))