guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Towards reproducibly Jupyter notebooks with Guix-Jupyter


From: Ludovic Courtès
Subject: Re: Towards reproducibly Jupyter notebooks with Guix-Jupyter
Date: Mon, 14 Oct 2019 09:21:21 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Hi Konrad,

Konrad Hinsen <address@hidden> skribis:

>> That reminds me of an interesting issue regarding
>> bitwise-reproducibility that was raised on the Reproducible Builds
>> mailing list:
>>
>>   
>> https://lists.reproducible-builds.org/pipermail/rb-general/2019-September/001657.html
>
> We ran into this problem as well in the Reproducible Research MOOC. It's
> hard to test equality for notebooks. But we went for solution a) because
> our main goal is to teach good practices for writers of future
> notebooks, rather than patch bad practices of the past with an
> additional layer of build tools.

Yeah.

(Though printing addresses in a REPL isn’t “bad practice” IMO, it’s just
that it doesn’t mesh well with the intended use of notebooks.)

>>> It would be nice in fact to adapt the ideas behind Guix-Jupyter (and
>>> perhaps parts of the code) to Org-mode. Some integration with Emacs will
>>> be necessary to tell Org-mode to start Python etc. from the Guix
>>> environment.
>>
>> I’d love to see that happen!  I thought perhaps we could trick Alex Kost
>> or Pierre Neidhardt to hack on that, let’s see.  :-)
>
> I might also do it myself because I suspect it would be less work to
> write the required Emacs package than to explain how to live without it.
> Tutorial-driven development :-)

Would be sweet!  :-)

> What would be the best way to run code in a specific environment created
> for recorded channels? The obvious approach would be
>
>    guix pull -C channels.scm -p /tmp/temp-profile
>    /tmp/temp-profile/bin/guix environment –-pure -m manifest.scm –-
>    python script.py
>    rm -rf /tmp/temp-profile
>
> but doing that properly involves the usual messy precautions for dealing
> with temporary directories, and it's probably expensive to do the "guix
> pull" repeatedly for the same channel file just because the temporary
> profile gets deleted immediately.

At the API level, there’s ‘inferior-for-channels’ which does that +
registers a GC root + maintains a cache so that the second time you use
a given instance of Guix it’s immediately available.

> This looks like a use case for "guix inferior", but is that already
> stable enough to be talked about in public?

It’s still documented as “subject to change”.  :-)

  https://guix.gnu.org/manual/devel/en/html_node/Inferiors.html

Now, I think you can safely use it in your code, I don’t foresee any
significant change at this point.

As to whether you’d want to talk about it in the MOOC for instance, you
could, but maybe with a word of warning because the MOOC may be around
for a long time.

Thanks,
Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]