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

Quicklook #389

Merged
merged 12 commits into from
Jul 12, 2017
Merged

Quicklook #389

merged 12 commits into from
Jul 12, 2017

Conversation

rstaten
Copy link
Contributor

@rstaten rstaten commented May 30, 2017

This PR:

  • Simplifies the QuickLook configuration file (an example yaml file desispec/data/example-config-r0-00000002.yaml is provided).
  • Provides the user an option to produce either a simplified or fully expanded version of a QuickLook configuration file via desi_quicklook command line arguments.
  • Fixes an index issue in the SkyPeaks QuickLook QA.

@sbailey sbailey requested a review from afausti May 31, 2017 17:53
@sbailey
Copy link
Contributor

sbailey commented May 31, 2017

@afausti can you take a look at this to confirm that it is consistent with the configuration from QLF? Thanks.

@rstaten
Copy link
Contributor Author

rstaten commented Jun 2, 2017

Below is an example of how to run QuickLook based on the most recent commit using the example configuration file provided in desispec/data/quicklook:

desi_quicklook --config_file example-config-r0-00000002.yaml --night 20160728 --camera r0 --expid 2

Unless otherwise specified using the keyword --rawdata_dir, desi and fibermap files must be located in $QL_SPEC_DATA/night.

@rkehoe
Copy link
Contributor

rkehoe commented Jun 2, 2017

@sbailey. I recommend holding on merging this PR until the next set of updates which will fix several of the outstanding items raised by @afausti, as well as addressing other feature requests, etc. These should arrive early In the week.

@gdhungana
Copy link
Contributor

@sbailey I am not fully convinced to rebasing this branch to my last commit, as now the master has been merged and there are too many commits. While @rstaten 's latest push is safe locally and on progress, and will be updated next time, we decided to open a new branch, to avoid any potential headache. I'll send a separate PR from there soon. @rkehoe Please confirm if we need to keep this PR/branch?

@gdhungana gdhungana mentioned this pull request Jun 8, 2017
@rkehoe
Copy link
Contributor

rkehoe commented Jun 8, 2017

@rstaten we should continue with xwsigma devel. in this branch.

@rkehoe
Copy link
Contributor

rkehoe commented Jul 2, 2017

@sbailey This branch can now be considered for merge with one caveat noted below. It incorporates changes that accomplish:

  • Update to XWSigma QA which implements a 2D Gaussian psf in the testing.
  • incorporates a pipeline configuration for arcs processing to 'PSF' files, including with resolution information.
  • implements run-time params and metrics that follow discussions from Utah (May) and the June Collab. Meeting. These are mostly placeholders for the moment for the purpose of manifesting the data to QLF for development and testing, and updates based on the Hack Day will come in the next update.
  • remove code causing IndexError seen in test_ql_qa on Trivial change to support loadable modules on OS X, where the extensi… #413 by @tskisner

The remaining issue with this PR concerns the error:

ImportError: numpy.core.multiarray failed to import

Which appears to be with the offline pipeline, not QL. Can @sbailey suggest a solution here? Once that is addressed, this PR should be ready to merge.

@tskisner
Copy link
Member

tskisner commented Jul 3, 2017

The numpy.core.multiarray failure seems to be some feature of the travis environment. It does not show up locally for me, and it also shows up in a branch that has only trivial changes from master. Seems like something changed in the last ~month in the test environment. I will try to figure that out today some time unless someone beats me to it.

@geordie666
Copy link
Contributor

Thanks, @tkisner. I'm seeing the same errors on my latest branches of desitarget:

https://travis-ci.org/desihub/desitarget/jobs/249323894

So this appears to be general to the test environment.

@rkehoe
Copy link
Contributor

rkehoe commented Jul 11, 2017

@sbailey It appears @tskisner's update may have fixed the numpy problem with this branch. However, tests are still failing in a travis job_stages error (line 54) where one of the QL unit tests
Is being Killed for an unspecified reason. No changes to QL code, including this test, were implemented. @rstaten has noted that this error seems to happen on other github areas when there is a memory leak. Are there other anomalies showing up in Travis that could lead to a fix. I would rather not turn off this test to permit a merge.

@sbailey
Copy link
Contributor

sbailey commented Jul 11, 2017

The travis updates did change from a very old Ubuntu version (12.04) to a merely old version (14.04). Travis docs say this has 4 GB of memory, but we have hit memory limits before from memory hungry specsim (see desihub/specsim#67 and desihub/specsim#68). Options:

  • Isolate which test(s) are causing the problem and temporarily disable them on Travis, and then chase this issue in a separate PR. i.e. put this in front of any memory hungry tests: @unittest.skipIf('TRAVIS' in os.environ)
  • refactor tests to use coarser or shorter wavelength grid to use less memory
  • refactor tests to not use multiprocessing so that they remaining one core instead of 2 (might help, might not depending upon what is going on when we run out of memory).

Note that due to stdout caching, the last line in the log may not be the thing that was running when the job was killed. Previously I have debugged this with running the tests in one window on my laptop and watching "top" in another window, and noting what was running when the memory spikes.

@sbailey
Copy link
Contributor

sbailey commented Jul 11, 2017

Having cited memory hungry specsim, do the QL tests use specsim to generate input data? I don't think so... in which case the memory usage problems are elsewhere (resolution matrix is always a suspicious one to look at). If you can identify which test is using lots of memory that will give us further clues of how to proceed.

@rstaten
Copy link
Contributor Author

rstaten commented Jul 12, 2017

The memory issue was not with any particular test, but with the input files being created by the test setup. In particular, a pix file for the xwsigma test was being created more times than necessary, leading to the increase in memory. I moved this to the test itself, so that the file is only created once. This seems to have solved the issue as the travis tests now pass.

@rkehoe
Copy link
Contributor

rkehoe commented Jul 12, 2017

@sbailey I will merge this shortly.

@sbailey
Copy link
Contributor

sbailey commented Jul 12, 2017

thanks for cleaning up the memory usage in the tests. merge when ready.

@rkehoe rkehoe merged commit f1826cb into master Jul 12, 2017
@tkisner
Copy link

tkisner commented Jul 13, 2017 via email

@tskisner
Copy link
Member

@geordie666 , my user name is @tskisner, not "tkisner", which is some other user.

@rkehoe rkehoe deleted the quicklook branch July 13, 2017 02:40
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.

7 participants