[doc] Fixathon 2: documentation sprint#22289
Conversation
5db0a05 to
c114459
Compare
ferdymercury
left a comment
There was a problem hiding this comment.
Thanks a lot for this endeavor!
Two remarks
- QHP generation shouldn't be disabled for main Doxyfile since it's used to publish qch file which is fundamental for qtcreator IDE
- it would be a lot cleaner if you used, as ALICE O2, this approach: #17426 rather than having two huge Doxyfiles almost impossible to review and annoying to maintain with warnings depending on version, etc
| # This tag requires that the tag GENERATE_HTML is set to YES. | ||
|
|
||
| GENERATE_QHP = YES | ||
| GENERATE_QHP = NO |
There was a problem hiding this comment.
| GENERATE_QHP = NO | |
| GENERATE_QHP = YES |
There was a problem hiding this comment.
OK, we won't touch it. I thought nobody uses this. 😅
There was a problem hiding this comment.
:) thanks
It's nice because it allows you press F1 in the IDE:
https://user-images.githubusercontent.com/10653970/154870916-28e4009d-eb70-46df-a52b-da81cfe3c97f.png
and that works also offline / no need to open web browser
c114459 to
b397b7e
Compare
- Move the web widgets to the webdisplay group. - Move webdisplay to GUI group. - Put the parametric functions group under Math. - Regroup I/O doxygen groups. - Move doxygen GUI group to Graphics Co-authored-by: martinfoell <m.foell.1999@gmail.com>
- Remove internal and detail classes from RDF group. - Remove source files from RDF group. - Expand docs of RDataFrame overview page. - Structure documentation of RDataFrame API.
…xygen group. Listing files on the doxygen page doesn't have a lot of benefit. Instead, we will list the contained classes.
- Enable sorting of groups in the treeview - Enable right-hand side scrolling site overview - Add "make preview" for a fast preview mode without ROOT customisations, with MT processing, and without dot graphs - Enable inlining of inherited members into the overview of class functions
vepadulano
left a comment
There was a problem hiding this comment.
Thank you for all of this work! I have reviewed the Python part of the PR, here are some comments from my side.
| \htmlonly | ||
| <div class="install-tabs"> | ||
| <div class="tab-buttons"> | ||
| <button class="tab-btn active" onclick="switchTab(this, 'conda')">conda</button> |
There was a problem hiding this comment.
As we were discussing during the hackathon, this is quite cool to have in the doxygen pages! Would be nice to have this in some compact form that can be used in other places, not for this PR
| # Write it to a ROOT file | ||
| with ROOT.TFile.Open("output.root", "RECREATE") as f: | ||
| h.Write() |
There was a problem hiding this comment.
nitpick, I would prefer we showed f.WriteObject(h, "name_of_histo"). My reasoning is that RFile will not support the syntax object.Write because there will be no implicit object registration anyway. I do see the point of WriteObject needing the extra string argument (which could even be defaulted to h.GetName() internally for TObject-derived objects). So this is mostly to voice my opinion, I will accept what the majority prefers
| # Define a column x | ||
| rdf = rdf.Define("x", lambda : np.random.normal(0, 1)) |
There was a problem hiding this comment.
We know that this syntax will be raising a warning for a while now, until we enable pure Python callables in RDF. Perhaps best not to show it already?
| # Define a Python callback to compute a new variable | ||
| def invariant_mass(E: float, p: float) -> float: | ||
| return math.sqrt(E**2 - p**2) |
There was a problem hiding this comment.
Similar comment here about the implicit numba-jit API
| # events with fewer than 10 jets are zero-padded | ||
| ~~~ | ||
|
|
||
| \warning Every RVec column in `columns` must appear in `max_vec_sizes`. |
There was a problem hiding this comment.
| \warning Every RVec column in `columns` must appear in `max_vec_sizes`. | |
| \warning Every vector column in `columns` must appear in `max_vec_sizes`. |
unless we really only support RVec?
| optimizer = torch.optim.Adam(model.parameters()) | ||
|
|
||
| for epoch in range(num_epochs): | ||
| for X, y in dl.as_torch(): |
There was a problem hiding this comment.
Any reason for the X to be capitalised?
|
|
||
| ### Eager loading | ||
|
|
||
| By default the loader reads data lazily, one chunk of data at a time. For small datasets that fit in memory and will be iterated many times, eager loading pays a one-time cost at construction and then serves every epoch from memory: |
There was a problem hiding this comment.
| By default the loader reads data lazily, one chunk of data at a time. For small datasets that fit in memory and will be iterated many times, eager loading pays a one-time cost at construction and then serves every epoch from memory: | |
| By default the loader reads data lazily, one chunk of data at a time. For small datasets that fit in memory and will be iterated many times, eager loading pays a one-time cost at construction and then serves batches in every epoch from memory: |
| loss = (loss_fn(model(X), y) * w).mean() | ||
| ~~~ | ||
|
|
||
| ### Eager loading |
There was a problem hiding this comment.
Perhaps I would move this section further up since it's referenced before by the resampling section
|
|
||
| ## API Reference | ||
|
|
||
| ### RDataLoader(rdataframes, ...) |
There was a problem hiding this comment.
This is nice, but it would be nicer if this was a full doxygen function doc like https://root.cern/doc/master/group__Pythonizations.html#ga7fd79fcb9358768e7b5f9fe0a924dd77
Test Results 22 files 22 suites 3d 14h 48m 10s ⏱️ Results for commit cf59381. |
Cleanup, refactoring, cheat sheets, etc.
Changes summary
General
\file xxx \ingroup yyy). These clutter the overview without adding useful documentation.Python Interface
RDataLoaderpage walking users through data preparation, loader configuration, batch iteration etc.UHIpage with an updated intro and a new Serialization sectionRDataLoaderandUHI) as a proof of concept (one-page PDF references downloadable and embedded directly in the docs too)Search Engine
Preview
See a preview of the doxygen page here:
https://root.cern/doc/hackathon/index.html
Note: This webpage does not contain the full doyxgen run. Macros embedded in the source code are not being run.