From 6720e7c66bf99409bc366577ad4e22e0b5fcd77b Mon Sep 17 00:00:00 2001 From: JegernOUTT Date: Fri, 8 Sep 2023 18:24:17 +0930 Subject: [PATCH 1/2] make it daemon, removed extra set_start_method --- refact_scratchpads_no_gpu/stream_results.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/refact_scratchpads_no_gpu/stream_results.py b/refact_scratchpads_no_gpu/stream_results.py index 0d1d9b4f..87cd827e 100644 --- a/refact_scratchpads_no_gpu/stream_results.py +++ b/refact_scratchpads_no_gpu/stream_results.py @@ -142,13 +142,9 @@ def test_head_and_tail(): class UploadProxy: def __init__( self, - upload_q: Optional[multiprocessing.Queue], - cancelled_q: Optional[multiprocessing.Queue], + upload_q: Optional[multiprocessing.Queue] = None, + cancelled_q: Optional[multiprocessing.Queue] = None, ): - try: - multiprocessing.set_start_method("spawn") - except: # it could be already set - pass self.upload_q = upload_q or multiprocessing.Queue() self.cancelled_q = cancelled_q or multiprocessing.Queue() self.proc = None @@ -161,6 +157,7 @@ def start_upload_result_daemon(self): target=_upload_results_loop, args=(self.upload_q, self.cancelled_q), name="upload_results", + daemon=True ) self.proc.start() return self.proc From ac473fca5483797bd5c77fe7711ce968d701bab5 Mon Sep 17 00:00:00 2001 From: Oleg Klimov Date: Mon, 11 Sep 2023 13:53:48 +0200 Subject: [PATCH 2/2] "toolbox is under reconstruction" --- CONTRIBUTING.md | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 20fac644..cb069eff 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -33,28 +33,7 @@ that you should be abloe to create a pull request for the main repository. ## Adding Toolbox Functions -Are you missing a function in the toolbox? It's easy to implement it yourself! - -It's even possible without a GPU, clone this repo and install it like this: - -``` -SETUP_PACKAGE=refact_scratchpads_no_gpu pip install -e refact/ -``` - -In this folder `refact_scratchpads_no_gpu/gpt_toolbox/toolbox_functions` there are some -functions implemented using OpenAI API. There you can add a new one by analogy, or even -make an existing function better. - -Add your new function to `infserver_no_gpu.py` and `modelcap_records.py`. - -To test your function, run `infserver_no_gpu` as in the previous section. - - -## Simplifying Toolbox (WORK IN PROGRESS) - -1. Toolbox for models with GPU https://github.com/smallcloudai/refact/pull/33 - -2. Simplify functions list, so you don't have to touch `infserver_no_gpu.py` and `modelcap_records` (no PR yet) +UPDATE: toolbox is under reconstruction. ## Install Linguist