-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parallelize sensor search #962
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
This reverts commit 5ee2396.
…an asset Signed-off-by: F.N. Claessen <felix@seita.nl>
sure, I will do. |
Docker image cannot be build, as failing in the test. Locally, I could build it but making it live causing issue. |
[FLEXMEASURES][2024-01-16 14:59:19,356] ERROR: ConnectTimeout:"HTTPConnectionPool(host='*******', port=80): Max retries exceeded with url: //api/v3_0/assets?account_id=4 (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7fc41d9d2200>, 'Connection to **** timed out. (connect timeout=None)'))" [occurred at /usr/local/lib/python3.10/dist-packages/requests/adapters.py(send):507,URL was: /assets/] The above exception was the direct cause of the following exception: Traceback (most recent call last): The above exception was the direct cause of the following exception: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): |
This looks very promising. We should continue this work. I volunteer testing this locally in the following two weeks. |
@Flix6x Wouldn't this PR also improve our simulation work (i.e. are we often querying multiple sensors at once there?). Of course, we browse data there, as well, so the tooling would benefit. I'm guessing the analysis part we're doing there (using reporters to compute KPIs across sensors) would improve speed-wise with this. I'm trying to say that this is a neglected high-value PR, which we should put in the planning for the next weeks. |
Maybe this is the blocking issue? |
Signed-off-by: Felix Claessen <30658763+Flix6x@users.noreply.github.com>
Signed-off-by: F.N. Claessen <felix@seita.nl>
…to 4 Signed-off-by: F.N. Claessen <felix@seita.nl>
The test steps and the build step failed after 6 hours. I tried rerunning the falling steps in the pipeline on the same day, and am today retrying just one of the four test steps (for different Python versions) to see if the issue still persists. |
Is this issue still alive? |
…llel-sensor-search # Conflicts: # flexmeasures/data/models/generic_assets.py # flexmeasures/utils/config_defaults.py
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
…ch sensor` happens in tests when the fixtures use one session that hasn't been committed yet, and the parallel search method opens a new session in each parallel process Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Update
|
Tech spike to increase chart loading speed through parallelization. I'm using
n=4
parallel processes here, but that could become a config setting.@Ahmad-Wahid could you do a speed benchmark on this branch (compared to main) for me? Some manual tests of mine (locally) suggested an asset chart with 4 sensors and 1 week of data loads about twice as fast. I'm interested to see whether you can reproduce that result on a cloud server, and how the speed-up factor would change with a larger time frame and with more sensors.