-
Notifications
You must be signed in to change notification settings - Fork 20
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
MAINT: cleanup rendering warnings #321
Conversation
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.
I tried running most of these on Fornax and ran into a bunch of issues. Some are probably unrelated to this PR. Issues that do seem to be related to this PR are:
- I have to manually select the kernel after opening the notebooks.
- Changing code cells starting with
!
to bash cells causes them to be rendered as markdown cells and prevents them from executing.
I did not try to run the spectroscopy notebooks since the changes here are only to text, not code.
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.
I ran into several problems with this notebook:
-
On Fornax I had to manually select a kernel for this notebook. I think it should be set to 'science_demo' since that's apparently the only one with tractor installed.
-
(This looks like nway.py call is not general #313 and probably unrelated to this PR.) The cell
# call nway !/home/jovyan/.local/bin/nway.py 'data/Chandra/COSMOS_chandra.fits' :ERROR_RADIUS 'data/multiband_phot.fits' 0.1 --out=data/Chandra/chandra_multiband.fits --radius 15 --prior-completeness 0.9 #!/opt/conda/bin/nway.py 'data/Chandra/COSMOS_chandra.fits' :ERROR_RADIUS 'data/multiband_phot.fits' 0.1 --out=data/Chandra/chandra_multiband.fits --radius 15 --prior-completeness 0.9
fails for me with
/bin/bash: line 1: /home/jovyan/.local/bin/nway.py: No such file or directory
. Using the commented-out line that points to /opt/conda/... instead of /home/jovyan/... works. -
The first figure in section '5. Plot Final Results' is empty and the second one throws an
AttributeError
. I don't know whether it's related to this PR.
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.
the nway cell is being fixed by #316; I just have one minor question there for which I would like to see other opinions. (my preference would be to do the PATH change up at the very top where we also add code_src
, but if I'm alone with this preference, then it can go in as-is)
light_curves/ML_AGNzoo.md
Outdated
name: conda-root-py | ||
name: python3 |
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.
With this change, I have to manually select the kernel. Changing this back to name: conda-root-py
works out of the box.
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.
those custom kernel names doesn't work for the CI. I would recommend opening a separate bug report issue for it, though #303 may cover it.
light_curves/ML_AGNzoo.md
Outdated
```{code-cell} ipython3 | ||
```bash | ||
# To download the data file containing the light curves from Googledrive | ||
!gdown 1gb2vWn0V2unstElGTTrHIIWIftHbXJvz -O ./data/df_lc_020724.parquet.gzip | ||
$ gdown 1gb2vWn0V2unstElGTTrHIIWIftHbXJvz -O ./data/df_lc_020724.parquet.gzip | ||
``` |
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.
With this change, the bash code becomes part of the markdown cell above and is not executable.
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.
Starting with a clean environment, I had to make a few additions to this file.
# beginning of the notebook, make sure the lists are consistent and only | ||
# contain dependencies that are actually used in the notebook. | ||
tqdm | ||
numpy |
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.
numpy | |
numpy<2.0 # sompy requires numpy<2.0 |
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.
Yeap, it's done here in fada9e7
numpy | ||
scipy | ||
pandas | ||
matplotlib |
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.
matplotlib | |
matplotlib | |
scikit-image # sompy requires scikit-image |
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.
I missed this one, thanks! will rather add it to fada9e7
light_curves/scale_up.md
Outdated
```{code-cell} | ||
!cat output/lightcurves-demo-SDSS-500k/logs/scale_up.sh.log | ||
```bash | ||
$ cat output/lightcurves-demo-SDSS-500k/logs/scale_up.sh.log |
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.
With this change, the bash code becomes part of the markdown cell above and is not executable. Same for the four other changes in this file.
# List explicit python dependencies here. They are also spelt out at the | ||
# beginning of the notebook, make sure the lists are consistent and only | ||
# contain dependencies that are actually used in the notebook. | ||
numpy |
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.
In the science_demo environment, I had to also install numba
.
numpy | |
numba # required by Arsenal (sktime) | |
numpy |
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.
It gets pulled without issues both locally and in CI, so I would rather not list it as we don't use numba directly.
(see the log in #309)
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.
tqdm
doesn't seem to be working anymore. The iterator doesn't progress and the time stays at "00:00<?". My guess is that it's from #300. Here's an example screenshot:
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.
Hmm, interesting. Do you have this issue in the other notebooks, too? Do you have ipywidgets
installed?
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.
(as it's already in main, could you open a bug report issue for it?)
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.
Do you have this issue in the other notebooks, too?
Yes, in ML_AGNzoo at least.
Do you have ipywidgets installed?
Yes, ipywidgets==8.1.5
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.
Opened #323
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.
I've had this notebook running for about an hour and it's still not done. It has been stuck on the second cell in section '4) Repeating the above, this time with ZTF + WISE manifold' for most of the time. It hasn't crashed (top
shows that the CPU is still in use), though there are a bunch of warnings. I don't know whether this is normal/expected or not.
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.
I can't comment on that as I got stuck with the data download both locally and in CI, maybe open a separate issue for it.
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.
Yes, I can confirm that I also timeout on that cell locally.
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.
Opened #324
name: conda-env-science_demo-py | ||
name: python3 |
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.
With this change, I have to manually select the kernel. Changing this back to name: conda-env-science_demo-py
works out of the box.
7904008
to
91b88d6
Compare
OK, so given some of the issues we run into here, I would reorganise the commits in this and #309, and bring the commits into this that are uncontroversial (additional dependency installs, etc.) at the expense of knowingly not fixing all the warnings. And all the rest that are needed for execution but causing some inconveniences (e.g. kernel names) will be gathered in the actual CI PR. |
…nd neither add a line break without an empty line in the list)
91b88d6
to
b104f04
Compare
OK, so I cleaned up this PR and only included the commits (and new fixes) that didn't cause any issues above. The rest will go into #309 |
MAINT: cleanup rendering warnings 6d66e51
MAINT: cleanup rendering warnings 6d66e51
This PR cleans up 35 warnings we currently see. There are only two untouched, one is in conflict/will be fixed in #316 while the other is related to the cloud access clean-ups and #311
(there maybe some sphinx deprecations, too, I have opened upstream PRs to fix those, we cannot do much about them here (other than adding a sphinx pin, but given we don't yet fail the CI on warnings, I don't think we gain anything by doing it)
The PR is put on top of #318 and should be rebased once that is merged in.