Closed lewisoshaughnessy closed 3 years ago
Is it possible to test with later version of Python, either 3.7 or 3.8? I have looked through that setup_computation
function and I don't see how it can return None
as the trace above shows. If you can't try later Python, can you change 'dispynode.py' line 1496 (end of setup_computation
so it is::
dispynode_logger.info('setup finished')
raise StopIteration((None, 'ACK'))
That is, current line that is raise StopIteration(None, 'ACK')
is replaced by above lines. Note that replacement uses explicit tuple. I think this may be the problem with 3.6.8 although I thought I tested it at that time (but not sure).
I tested with Python 3.6.8 and it works as expected. Can you run following program and show the output:
import pycos
def g(task=None):
yield task.sleep(1)
raise StopIteration(1, 2)
def f(task=None):
res = yield g(task=task)
pycos.logger.info('res: %s / %s', type(res), str(res))
pycos.Task(f)
Hi pgiri,
Thank you for your response! I will test this when I get in to the office Monday.
Really appreciate the help. Will let you know how it goes :)
Lewis.
Hi pgiri,
Following your advice I attempted to use a later version of Python but ran into Pickle version errors.
Reverting to 3.6.8 I decided to run the scheduler, node and compute.py
on the same machine. After an ambiguous error from the Scheduler ("Ignored message"), I set the compute.py
port (using client_port
in the SharedJobCluster
) to 0 (random port) and everything started working for the first time ever!
I can surmise that executing over Windows and Linux causes some conflicts on the versions I'm running, but when all are running on the Windows machine they work flawlessly. So I can confirm that 4.12.3 and Python 3.6.8 works on Windows (with the Pickle version patch).
Thank you for your time and effort, this is a great project.
Lewis.
In case others may encounter these issues: Pickle error is due to change of pickle protocol in Python 3.7. If dispynode, client (and scheduler in case of SharedScheduler
) are run with Python 3.7, it should work. There is a way to interoperate with different Python versions by setting PickleProtocolVersion
in pycos's configuration (see pycos documentation).
dispy should work fine in mixed environments (e.g., dispynode under Linux and client under Windows) if exchanging native Python objects. If data exchanged involve user objects, it may not work. However, pycos should work in mixed environment with user objects. If there is an issue in mixed environment with dispy, it should be easy to fix. I will look into it after next version of pycos is released.
Hi guys,
I'm trying to set up a very simple proof-of-concept program to demonstrate dispy. I have my Windows 10 machine (192.168.254.202) and my network-bridged Ubuntu VM (192.168.254.157). The VM is running
dispyscheduler.py
anddispynode.py
usingpython3 dispynode.py -d --clean --ip_addr="192.168.254.157"
andpython3 dispyscheduler.py -d --ip_addr="192.168.254.157"
And the Windows machine is running a basic
compute.py
script which invokes the SharedJobCluster and basically tells the server to wait/sleep in increasingly longer steps:I first run the scheduler, then the node (both on VM). The node is discovered by the scheduler, then I run my
compute.py
script. As soon as this happens, the scheduler discovers the incoming computation, and submits it to the singledispynode
. When this happens thedispynode
console throws an exception:The scheduler continues to submit all 16 computations as normal:
I can't find any reference to this exact error, although I saw that the
client, resp = yield setup_computation(msg, task=task)
line has caused issues before. I have a feeling it's either a firewall issue or I haven't properly configured thenode
and/orscheduler
, or a bug ;)Here is a list of things I have done to try and fix:
If there's any more information I can give to help sort this I'm more than happy to oblige! I'd appreciate any information at all on this. I'm a big fan of the project and really want to get it working! Cheers all.