Open Arjun31415 opened 9 months ago
It's available on docs.rs, we are probably missing a feature flag when building the docs, but I'm not able to find it.
It's not a feature flag that is missing here but the fact that the burn
package's docs are build with --no-deps
. While rustdoc still expands and documents re-exported items (in this case these from burn-core
), it can't produce the source links to the code of the dependency. Docs.rs doesn't suffer from this as it generates the docs for every uploaded library crate and interlinks them (including the links to the source code).
I wasn't able to find where the API docs are build in the CI, are they build manually? I think the most sensible fix would be to build the whole workspace instead of just the burn
package for the API docs. Or build the burn
package without the --no-deps
flag. The former can be done with --no-deps
to avoid 3rd-party crates to be added to the docs, which should be fine if burn doesn't re-export any items from them. If it does, the source links for said items would be missing again. Maybe something like cargo doc -p burn -p burn-core -p burn-train --no-deps
would be enough to add the source links to every item, I haven't checked whether burn-core
or burn-train
re-export any items themselves.
Tagging @Luni-4 @syl20bnr
@jofas analysis is correct. If I remember correctly, we have removed the --no-deps
option because of the great amount of time in bulding the docs. Here and here are the function calls, even used on CI.
Since documentation should be independent from any operating systems (@nathanielsimard @antimora @louisfd please confirm whether my previous statement is correct for what concerns burn
), a possible solution might be the creation of a specific documentation task. This task can be run both locally and on CI.
This kind of task:
cargo doc ...
command for each operating systempublish
workflowWhat do you think @syl20bnr?
This might be outdated? I see currently source links in the docs: https://docs.rs/burn/latest/burn/nn/conv/struct.Conv2d.html
This issue is about the docs hosted on burn.dev, which are missing the source buttons.
The source button present in docs for tch-rs as a sample -
No such button for burn-rs docs
It would greatly help looking into pin-pointing the definition and implementation of modules in this vast repo