Postagens

Mostrando postagens de dezembro, 2023

Reproducibility with Python - Notes and tips

 I understand reproducibility as two situations: When you (yes, you) get to run (in your (yes, your) own machine) the code produced by “someone else” and obtain the exact same results that “someone else” obtained in her/his/their machine. When “someone else” gets to run in her/his/their own machine the code produced by you (yes, you) and obtains the exact same results that you obtained in your (yes, your) machine. How can we achieve (or get closer to) reproducibility to our python code? Well, we must ensure that “someone else” will run our code using, at least, the same python version we were using as well as the same versions of the packages we were also using. How can we “help someone else” with this? I recommend using in your projects one of these two solutions: Poetry Conda (either Anaconda either miniconda ) Both work with the concept of virtual environment, a “sandbox” in which you can specify, use and “freeze” the “exact state” of package versions (and in cas...