Skip to content

Commit

Permalink
Add Neuroarch-related vile hack to mpi_backend.py to address dill nam…
Browse files Browse the repository at this point in the history
…edtuple serialization limitation.
  • Loading branch information
lebedov committed Dec 24, 2015
1 parent f170f0a commit 82c8fdf
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions neurokernel/mpi_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@
# possibilities than possible with pickle:
import dill

# XXX This is a Neuroarch-related workaround required to compensate for dill's
# inability to serialize namedtuple within a module:
try:
import pyorient.ogm.graph
except ImportError:
pass
else:
setattr(pyorient.ogm.graph, 'orientdb_version',
pyorient.ogm.graph.ServerVersion)

# Fix for bug https://github.com/uqfoundation/dill/issues/81
@dill.register(property)
def save_property(pickler, obj):
Expand Down

0 comments on commit 82c8fdf

Please sign in to comment.