[coll] Improve event loop. (#10199)

- Add a test for blocking calls.
- Do not require the queue to be empty after waking up; this frees up the thread to answer blocking calls.
- Handle EOF in read.
- Improve the error message in the result. Allow concatenation of multiple results.
This commit is contained in:
Jiaming Yuan
2024-04-18 03:29:52 +08:00
committed by GitHub
parent 7c0c9677a9
commit 4b10200456
11 changed files with 312 additions and 111 deletions

View File

@@ -40,7 +40,7 @@ def main(client):
# you can pass output directly into `predict` too.
prediction = dxgb.predict(client, bst, dtrain)
print("Evaluation history:", history)
return prediction
print("Error:", da.sqrt((prediction - y) ** 2).mean().compute())
if __name__ == "__main__":