-
Notifications
You must be signed in to change notification settings - Fork 2
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
PREOPS-4646: feature- Support addition of opsim data to an archive for use by schedview-prenight #20
PREOPS-4646: feature- Support addition of opsim data to an archive for use by schedview-prenight #20
Changes from all commits
e2ac8e7
503ff55
7736e46
9b56db7
0e95d4f
0983f8d
8ce01c7
0525e94
18dd899
ef07272
6d8271a
bdfd4fb
f7bdb65
7a50d30
05c0ae7
bf9afed
554b4cc
13b1f32
b05caea
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ h5py | |
requests | ||
shapely | ||
tqdm | ||
conda | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you explain why we need conda as a requirement in a file that is installed with conda?(I'm not following) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One of the bits of metadata that can be included in the archive is the specification for the conda environment that ran the simulation. To get the envirenment, the python code uses the python api to conda, and so the conda package proper must be present. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You mean you are in a situation where this code is not running in a conda environment but needs to get information from a conda environment elsewhere? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, the code is running in a conda environment, and we want to record the details of that environment as metadata along with the results of a simulation run using code in that environment, to make it easy to answer questions like "What version of X was being using in the process that produced output Y?" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So in that case conda is already installed in your conda env and you don't need pypi to install it. I don't think it should be listed as a formal dependency but should have an import protection around it like we do in lsst-utils package when retrieving conda package versions. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's in the conda base environment, not the environment that is actually running the code and writing it to the archive. For example:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. That's why we add There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since we have a pyproject.toml file with project dependencies, I think you shouldn't have a problem with pip installation. I guess if conda is part of Rubin-env, it's reasonable to add as a dependency for this package. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1087,10 +1087,10 @@ | |
euclid_obs = np.where((obs_array["note"] == "DD:EDFS_b") | (obs_array["note"] == "DD:EDFS_a"))[0] | ||
all_other = np.where((obs_array["note"] != "DD:EDFS_b") & (obs_array["note"] != "DD:EDFS_a"))[0] | ||
|
||
survey1 = ScriptedSurvey([bf.AvoidDirectWind(nside=nside)], detailers=detailers) | ||
survey1 = ScriptedSurvey([bf.AvoidDirectWind(nside=nside)], nside=nside, detailers=detailers) | ||
survey1.set_script(obs_array[all_other]) | ||
|
||
survey2 = ScriptedSurvey([bf.AvoidDirectWind(nside=nside)], detailers=euclid_detailers) | ||
survey2 = ScriptedSurvey([bf.AvoidDirectWind(nside=nside)], nside=nside, detailers=euclid_detailers) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The addition of nside here -- this seems outside the range of the "add archiving to the simulation outputs" ... was this a case of something that went missing from the example_scheduler? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One of the very recent changes to rubin_scheduler (which added the direct wind basis functions to scripted surveys) caused schedview's tests to fail because the nside of the survey in the example scheduler in the didn't match the nside of its basis functions. (The schedview unit tests set a smaller nside to make the test go faster.) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I pulled that change over to |
||
survey2.set_script(obs_array[euclid_obs]) | ||
|
||
return [survey1, survey2] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from .sim_archive import * | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should get this into conda-forge ...
but I'm wondering if we can't add it to the requirements.txt file anyway?
If it's not necessarily for most uses, but only for the ones we're in control of for now, this is probably fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, requirments.txt is just a simple text list of packages, and I don't think this format supports pip/pypi packages. Such packages are supported by the conda's yaml format for specifying environments, and perhaps we should move to that format, but maybe that should be done as a separate issue (and corresponding PR).