ray/release/golden_notebook_tests/workloads/modin_xgboost_test.py
Max Pumperla f9b71a8bf6
[docs] new structure (#21776)
This PR consolidates both #21667 and #21759 (look there for features), but improves on them in the following way:

- [x] we reverted renaming of existing projects `tune`, `rllib`, `train`, `cluster`, `serve`, `raysgd` and `data` so that links won't break. I think my consolidation efforts with the `ray-` prefix were a little overeager in that regard. It's better like this. Only the creation of `ray-core` was a necessity, and some files moved into the `rllib` folder, so that should be relatively benign.
- [x] Additionally, we added Algolia `docsearch`, screenshot below. This is _much_ better than our current search. Caveat: there's a sphinx dependency that needs to be replaced (`sphinx-tabs`) by another, newer one (`sphinx-panels`), as the former prevents loading of the `algolia.js` library. Will follow-up in the next PR (hoping this one doesn't get re-re-re-re-reverted).
2022-01-21 15:42:05 -08:00

37 lines
990 B
Python

import ray
import os
import time
import json
from util import import_and_execute_test_script, wait_for_cluster_client
NOTEBOOK_PATH_RELATIVE_TO_RAY_REPO = (
"doc/source/ray-core/_examples/modin_xgboost/modin_xgboost.py")
def main():
import_and_execute_test_script(NOTEBOOK_PATH_RELATIVE_TO_RAY_REPO)
if __name__ == "__main__":
start = time.time()
addr = os.environ.get("RAY_ADDRESS")
job_name = os.environ.get("RAY_JOB_NAME", "modin_xgboost_test")
if addr is not None and addr.startswith("anyscale://"):
ray.init(address=addr, job_name=job_name)
else:
ray.init(address="auto")
wait_for_cluster_client(4, 600)
main()
taken = time.time() - start
result = {
"time_taken": taken,
}
test_output_json = os.environ.get("TEST_OUTPUT_JSON",
"/tmp/modin_xgboost_test.json")
with open(test_output_json, "wt") as f:
json.dump(result, f)
print("Test Successful!")