GNU bug report logs -
#50672
nnpack is not reproducible
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Hi,
Ludovic Courtès <ludovic.courtes <at> inria.fr> skribis:
> No, I’ve retitled it. Now looking at PeachPy:
>
> https://github.com/Maratyszcza/PeachPy/issues/88
For the record, I tried the attached patch in an attempt to sort things
as discussed in the issue above, but it doesn’t have the intended
effect. There must be other unsorted dictionaries elsewhere.
Suggestions welcome!
Ludo’.
[python-peachpy-determinism.patch (text/x-patch, inline)]
Make PeachPy processes deterministic:
https://github.com/Maratyszcza/PeachPy/issues/88
https://issues.guix.gnu.org/50672
diff --git a/peachpy/name.py b/peachpy/name.py
index b6a03dc..c069fc2 100644
--- a/peachpy/name.py
+++ b/peachpy/name.py
@@ -95,6 +95,10 @@ class Namespace:
self.prenames[scope_name.prename].add(scope)
def assign_names(self):
+ # Step 0: sort the dictionary for deterministic output
+ self.prenames = dict(sorted(self.prenames.items(),
+ key=lambda item: "" if item[0] == None else item[0]))
+
# Step 1: assign names to symbols with prenames with no conflicts
for prename in six.iterkeys(self.prenames):
if prename is not None:
This bug report was last modified 3 years and 302 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.