unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludovic.courtes@inria.fr>
To: zimoun <zimon.toutoune@gmail.com>
Cc: 50672@debbugs.gnu.org
Subject: bug#50672: nnpack is not reproducible
Date: Fri, 22 Oct 2021 17:31:08 +0200	[thread overview]
Message-ID: <87pmrxt6tf.fsf_-_@gnu.org> (raw)
In-Reply-To: <87ilylf3yn.fsf@inria.fr> ("Ludovic Courtès"'s message of "Tue, 28 Sep 2021 11:24:00 +0200")

[-- Attachment #1: Type: text/plain, Size: 417 bytes --]

Hi,

Ludovic Courtès <ludovic.courtes@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’.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: the patch --]
[-- Type: text/x-patch, Size: 755 bytes --]

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:

  reply	other threads:[~2021-10-22 15:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-19  9:57 bug#50672: python-pytorch is not reproducible Ludovic Courtès
2021-09-21 15:17 ` Ludovic Courtès
2021-09-24 14:04   ` Ludovic Courtès
2021-09-27 13:25     ` zimoun
2021-09-28  9:24       ` Ludovic Courtès
2021-10-22 15:31         ` Ludovic Courtès [this message]
2021-10-23  3:32           ` bug#50672: nnpack " Kyle Meyer
2021-10-25 12:54             ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pmrxt6tf.fsf_-_@gnu.org \
    --to=ludovic.courtes@inria.fr \
    --cc=50672@debbugs.gnu.org \
    --cc=zimon.toutoune@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).