-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
455 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"@ray.remote\n", | ||
"def get_minio_run_config():\n", | ||
" import s3fs\n", | ||
" import pyarrow\n", | ||
" s3_fs = s3fs.S3FileSystem(\n", | ||
" key = \"minio\",\n", | ||
" secret = \"minio123\",\n", | ||
" endpoint_url = \"http://minio-service.default.svc.cluster.local:9000\"\n", | ||
" )\n", | ||
" custom_fs = pyarrow.fs.PyFileSystem(pyarrow.fs.FSSpecHandler(s3_fs))\n", | ||
" run_config = ray.train.RunConfig(storage_path='training', storage_filesystem=custom_fs)\n", | ||
" return run_config" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"from time import sleep\n", | ||
"\n", | ||
"finished = False\n", | ||
"while not finished:\n", | ||
" sleep(5)\n", | ||
" status = client.get_job_status(submission_id)\n", | ||
" finished = (status == \"SUCCEEDED\" or status == \"FAILED\" or status == \"STOPPED\")\n", | ||
" print(status)\n", | ||
"print(\"Job status \" + status)\n", | ||
"print(\"Logs: \")\n", | ||
"print(client.get_job_logs(submission_id))\n", | ||
"assert status == \"SUCCEEDED\", \"Job failed or was stopped!\"" | ||
] | ||
} |
Oops, something went wrong.