GNU bug report logs - #50672
nnpack is not reproducible

Previous Next

Package: guix;

Reported by: Ludovic Courtès <ludovic.courtes <at> inria.fr>

Date: Sun, 19 Sep 2021 09:58:01 UTC

Severity: normal

Done: Ludovic Courtès <ludovic.courtes <at> inria.fr>

Bug is archived. No further changes may be made.

Full log


Message #22 received at 50672 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludovic.courtes <at> inria.fr>
To: zimoun <zimon.toutoune <at> gmail.com>
Cc: 50672 <at> debbugs.gnu.org
Subject: Re: bug#50672: nnpack is not reproducible
Date: Fri, 22 Oct 2021 17:31:08 +0200
[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.