Problems with parallelization within a batch using `const` token
See original GitHub issueHello Again,
So I’ve been trying to get the parallelization working for this, and when I set n_cores_batch = 2
in the config.json
file it keeps giving me the error below. I’m not sure what is causing this issue, and it persists with any other value for n_cores_batch
other than 1. Do you have any insight into why this might be?
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/home/software/anaconda/3/envs/dso-sw/lib/python3.7/multiprocessing/pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "/home/software/anaconda/3/envs/dso-sw/lib/python3.7/multiprocessing/pool.py", line 44, in mapstar
return list(map(*args))
File "/nas0/tluchko/sandbox/deep-symbolic-optimization/dso/dso/train.py", line 28, in work
optimized_constants = p.optimize()
File "/nas0/tluchko/sandbox/deep-symbolic-optimization/dso/dso/program.py", line 393, in optimize
optimized_constants = Program.const_optimizer(f, x0)
TypeError: 'NoneType' object is not callable
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "rundso.py", line 9, in <module>
model.train()
File "/nas0/tluchko/sandbox/deep-symbolic-optimization/dso/dso/core.py", line 90, in train
**self.config_training))
File "/nas0/tluchko/sandbox/deep-symbolic-optimization/dso/dso/train.py", line 278, in learn
results = pool.map(work, programs_to_optimize)
File "/home/software/anaconda/3/envs/dso-sw/lib/python3.7/multiprocessing/pool.py", line 268, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
File "/home/software/anaconda/3/envs/dso-sw/lib/python3.7/multiprocessing/pool.py", line 657, in get
raise self._value
TypeError: 'NoneType' object is not callable
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Parallelize a Bash FOR Loop - Unix & Linux Stack Exchange
We use file descriptor 3 as a semaphore by pushing (= printf ) and poping (= read ) tokens ( '000' ). By...
Read more >.net - How to limit the Maximum number of parallel tasks in c#
In my programs, it seems that when using Parallel.Foreach, the list is cut in n sets (MaxDegreeOfParallelism). All sets are processed in ......
Read more >Running the tokeniser in parallel does not gain a lot from more ...
The setup is I read in a newline json and tokenized all texts. It includes (I have recalculated the number of tokens a...
Read more >Analyzing 3 Ways to Run Batch Tasks in Parallel Using ...
Let's demonstrate this solution with a simple problem — given 10 tasks where the essence of each task consumes a constant amount of...
Read more >Massive Parallel Processing with Lambda functions and when ...
AWS allows you to trigger lambda for each message or batch of messages and lambda just scales like anything until no messages are...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @Sean-Reilly, as a temporary hack, you can add
pool = None
intrain.py
at the beginning of thelearn()
function. That will break some other use cases (namely, thecontrol
task when using PyBullet envs), but should be just fine forregression
.A real fix will be incoming.
Hi @Sean-Reilly , thanks for the config! I am able to reproduce the bug. Looks like an issue when using
n_cores_batch > 1
and theconst
token. I can reproduce the bug with a simplified config:I will look into this and report back! Thanks.