2021-10-05 09:17:33 -07:00
|
|
|
import ray
|
2021-07-01 16:10:58 -07:00
|
|
|
import os
|
|
|
|
import time
|
2021-10-05 09:17:33 -07:00
|
|
|
import json
|
2022-03-13 21:39:41 +00:00
|
|
|
from util import import_and_execute_test_script
|
2021-06-11 02:03:04 -07:00
|
|
|
|
2021-10-05 09:17:33 -07:00
|
|
|
NOTEBOOK_PATH_RELATIVE_TO_RAY_REPO = (
|
2022-02-19 10:19:07 +01:00
|
|
|
"doc/source/ray-core/examples/modin_xgboost/modin_xgboost.py"
|
[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-22 00:42:05 +01:00
|
|
|
)
|
2021-06-11 02:03:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
def main():
|
2021-10-05 09:17:33 -07:00
|
|
|
import_and_execute_test_script(NOTEBOOK_PATH_RELATIVE_TO_RAY_REPO)
|
2021-06-11 02:03:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
2021-07-01 16:10:58 -07:00
|
|
|
start = time.time()
|
2021-07-07 22:37:41 -07:00
|
|
|
|
2021-08-31 17:07:47 +02:00
|
|
|
addr = os.environ.get("RAY_ADDRESS")
|
|
|
|
job_name = os.environ.get("RAY_JOB_NAME", "modin_xgboost_test")
|
2021-10-05 09:17:33 -07:00
|
|
|
if addr is not None and addr.startswith("anyscale://"):
|
2021-08-31 17:07:47 +02:00
|
|
|
ray.init(address=addr, job_name=job_name)
|
|
|
|
else:
|
|
|
|
ray.init(address="auto")
|
2021-07-07 22:37:41 -07:00
|
|
|
|
2021-06-11 02:03:04 -07:00
|
|
|
main()
|
2021-07-07 22:37:41 -07:00
|
|
|
|
2021-07-01 16:10:58 -07:00
|
|
|
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!")
|