Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add update_environment function to manage.sh #170

Closed
wants to merge 923 commits into from

Conversation

jmbenlloch
Copy link
Contributor

Add new function update_environment X.Y to update all packages within one particular IC environment to their latest versions available in conda.

Basically one needs to run:

source manage.sh update_environment 2.7
source manage.sh update_environment 3.5
source manage.sh update_environment 3.6

This is the low-hanging fruit from #166. Opinions?

@jacg
Copy link
Collaborator

jacg commented Mar 13, 2017

Updating conda-installed packages is not enough: some things we get through pip!

@jacg
Copy link
Collaborator

jacg commented Mar 13, 2017

I'd also like an update_all function, so that we don't have to do the same thing N times for however many python versions we happend to be supporting at the time.

@jmbenlloch
Copy link
Contributor Author

You are right, I forgot about those, I'll updated the code and also create update_all.

@jmbenlloch
Copy link
Contributor Author

Ok, I have added update_all so we can run only one command to update all environments. Not sure whether awk is available in MacOS, if not it can be changed easily by something else.

Regarding pip-installed packages, it is not obvious how to update them. There is no command to update all packages in pip (pypa/pip#59). If we want to iterate manually over all packages installed by pip we need to know which ones are those, but pip list and pip freeze shows all packages installed (also those from conda).

@jacg
Copy link
Collaborator

jacg commented Mar 13, 2017

This whole manage.sh business makes me nervous because

  • I don't see how we can sensibly test it automatically, so we have to test it by eye.
  • There's lots of repetition in there, and because it's never of highest urgency, we're putting up with it and slowly letting it grow into a monster.

The conda env | grep IC, while a great idea in principle, makes me nervous in practice. I just hope that I (and everyone else) remember never to have any non-IC related envs with IC in their name.

As for pip ... hmm, some thoughts

  • What if we just trash whole of pip, and re-install everything. To what extent is pip shared between different conda envs?
  • Iterate over the things mentioned in the pip section of the environment specification. This will probably fail to update dependencies.

jjgomezcadenas and others added 25 commits July 19, 2017 18:02
Traffic of arguments in function events_loop for the various cities
expressed more concisely  with the user of DataVectors and PmapVectors
containers.
A KrCity computes and writes KrEvents, e.g, point-like events. This
means that the baricenter integrates all the time slices for a given
SiPM. Instead, a HitCity computes and writes HitEvents, in which the
baricenter (or any other position-finding algo) is computed
slice-by-slice. A HitCity is derived from a KrCity since both of them
use the same file_loop() function (which starts from pmaps).
Without the exit, the command-line test was passing with pretty greens
when the city was not found (e.g, a captured ModuleNotFound, print
that pytest captures and digests without telling anything and happy
ending in spite of wrong situation). Adding traceback still gives
printout when running in normal mode but provides diagnostics of the problem
The first few events are rejected by selection in the test sample in
Penthesilea, running 10 events guarantees that the city runs fully.
this function allows takes an s2sid_peak and slice number and returns
the sipm ids of sipms in that s2si, with their charges at slice number
This is needed to use the corresponding cython function rather than
previous python version.
Include in the list only slices with positive charge.
One has to take into account the possibility that the slice results in
an empty SiPM list. This is handled via SipmEmptyList exception.
Cecilia is removed from cities. The simulation of the trigger will be
done shortly in Diomira.
Although it may be argued that we reinvent the wheel, the use of a
numerical NN is quite convenient when writing/reading pytables to/from
disk, as a proxy for NaN.
Cluster takes the std (not the rms) as argument. A number of
properties (Xrm and such) are modified accordingly.
The change of definition in Cluster (takes std, not rms) requires to
fix a number of tests.
hit_city inherits now from kr_city. Config. files modified accordingly.
abotas and others added 14 commits September 6, 2017 12:40
This pr will allow irene to make use of the ipmt pmap finders and
writers in order to save ipmt pmaps. I've run this irene in my
notebook a few times and everything looks good so far.

    In order to tell irene to write ipmt pmaps (or not) I had to put a
    flag compute_ipmt_pmaps in pmap_city.conf. This means that
    previous irene config files will not work without first adding the
    flag. This may be kind of annoying for people running productions
    @jmbenlloch @jerenner @gonzaponte. If there is a better way of
    doing this, please let me know, and I will implement it. The only
    alternative I could think of would be to create another city, but
    that sounds potentially even more annoying for you guys.

    I did some time/memory profiling for on Kr data. From run 4446
    with thr_sipm = 1pes and 'thr_sipm_s2 = 2pes' and found after
    running 1k events:
    speed
    1.92 evt / sec with IPMT
    2.06 evt / sec without
    file size
    2.37 x larger than without IPMT
    So, time does not appear to be an issue, but the file size does
    grow substantially...

    @jjgomezcadenas I don't remember if we decided we wanted to put
    the ipmt pmaps in a different group, called IPMT in the hdf5
    file... did we?
We were computing a new event number in Diomira because in the
previous MC production, each file restarted the event counter to
zero. This is not the case anymore, each file has a unique event
number. Since this was a patch intended to use that old production, it
could be removed now.
@jacg
Copy link
Collaborator

jacg commented Sep 7, 2017

This is stale: any plan to move it forward, @jacg, @jmbenlloch?

We'll get around to it eventually.

Jacek Generowicz and others added 3 commits September 8, 2017 11:18
Closes next-exp#328

Previously, the code was crashing when a hit collection contained only
one item.
@jacg
Copy link
Collaborator

jacg commented Jul 26, 2018

I suspect that this is going to be superseded by #496.

@jacg
Copy link
Collaborator

jacg commented Jul 28, 2018

I think that this is being superseded by #496.

@jacg jacg closed this Jul 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants