0

need help with my program

posted in Off Topic
Comments:
Threaded Linear
#1
Foxym

regarding the program used for this: https://www.vlr.gg/651575/vct-teams-lifetime-data-part-2

im trying to add multiprocessing to it
but i cant figure it out for the life of me
https://i.ibb.co/nshjSfR4/image-1778892995944.png

errors im getting

RuntimeError
ConnectionResetError: [Errno 104] Connection reset by peer

im considering sticking with the "just sleep through it" method

#2
NotaSenFan27
-1
Frags
+

claude ai

#3
Foxym
0
Frags
+

fuck off

#4
NotaSenFan27
0
Frags
+

not all ai is bad ai

#5
delighted
-1
Frags
+

use threading first, add retries with backoff

and lower the concurrency

#6
Foxym
0
Frags
+

did try using them, did not figure out how to run multiple threads at once
(prolly cause i didnt use the "args" thingy and just put it directly into it
like this:

threading.Threads(target=Calculate_Event_Stats(VCT_TEAMS[x], aom=0)

)

edit:
what is concurrency
it is currently 3am for me so im a bit slow rn

#7
delighted
0
Frags
+

isn't concurrency multiple tasks making progress during overlapping times

#10
larplarplarpsahur
0
Frags
+

concurrency jumpscare

I'm probably talking to a bot but the `multiprocessing` module is used to bypass the GIL for "truly parallel code" so if speed is what he's looking for this is better, although the % gains would probably have to be measured, I don't think it's all that faster for this block of code

#11
delighted
0
Frags
+

the GIL only matters for CPU heavy work iinw

#12
larplarplarpsahur
0
Frags
+

this is pretty literally trying to get more juice out of the CPU, prompt your shit correctly brother

#8
31Raven
-1
Frags
+

did u try turning it off and on again

#9
larplarplarpsahur
0
Frags
+

you should probably test if calculate_vct_stats() actually hits vlr before trying to parallelize tbh

also your inner loop looks like it's stepping through just test[0] and test[1] for the length of your test array.
Write a straightforward module with a single data point and process first and verify it runs before trying to do tricks.

#13
BabyWizard
0
Frags
+

This is too confusing im scared

  • Preview
  • Edit
› check that that your post follows the forum rules and guidelines or get formatting help
Sign up or log in to post a comment