Skip to content

Remaining To-Do for the new documentation website #1536

Open

Description

@michaeldeistler
  • more high-level FAQ: "What methods are implemented", "Do I need a Python simulator",...
  • better looking "boxes" on landing page.
  • add brief citations to all how-to guides.
  • ensure correctness of all how-to guides.
  • add examples to docstrings (for API reference).

Activity

  1. added
    docs
    on Mar 26, 2025
  2. jorobledo commented on Mar 27, 2025

    @jorobledo
    Collaborator

    Hi Micha,

    As mentioned, I can help with adding examples to docstrings for API reference. If you think it makes sense, I'll do a couple of them, and a PR and we can discuss on top of that. Do you have any standardized format it mind that I can take as an example?

  3. michaeldeistler commented on Mar 27, 2025

    @michaeldeistler
    ContributorAuthor

    Yes, anytime!

    Something like this would be nice:

        Examples:
        ------------
    
        ::
    
            import torch
            from torch.distributions import Gamma, Beta, MultivariateNormal
            prior = MultipleIndependent([
                Gamma(torch.zeros(1), torch.ones(1)),
                Beta(torch.zeros(1), torch.ones(1)),
                MultivariateNormal(torch.ones(2), torch.tensor([[1, .1], [.1, 1.]]))
            ])
    

    Thanks a ton!

  4. jorobledo commented on Mar 27, 2025

    @jorobledo
    Collaborator

    Can it be that the documentation on how to contribute is outdated? I built it using the make file, but it's not what is mentioned here.

    Image

  5. jorobledo commented on Mar 27, 2025

    @jorobledo
    Collaborator

    Something like this looks good? I understand we want simple standalone examples. Maybe not explore all methods? Maybe not explore any?

    https://github.com/jorobledo/sbi/blob/42c5d7c27e5e857c62fc1bdbfaf9830d478cccfe/sbi/utils/torchutils.py#L276-L328

    Also, are examples of methods necessary?

    https://github.com/jorobledo/sbi/blob/42c5d7c27e5e857c62fc1bdbfaf9830d478cccfe/sbi/utils/torchutils.py#L362-L377

    I don't see them in the new documentation format. What do you think?

    Screenshot on how I see it (Methods don't show extended docstrings)

    Image
  6. jorobledo commented on Mar 31, 2025

    @jorobledo
    Collaborator

    @michaeldeistler suggestions on these comments?

    Should I PR to main for documentation changes?

  7. michaeldeistler commented on Mar 31, 2025

    @michaeldeistler
    ContributorAuthor

    Hi @jorobledo!

    Sorry for the slow response! The example looks great! No need to explore all methods, I like how you solved it. Please open a PR. Thanks a ton!

  8. Pratyusha-DS13 commented on Mar 22, 2026

    @Pratyusha-DS13

    Hi! I was going through the documentation and noticed that the introductory example could be improved for better readability and accessibility.

    Some specific ideas:

    • Replace unicode variable (θ) with 'theta'
    • Refactor the example into a clearer multi-line Python function
    • Improve comments to better explain the inference workflow
    • Update installation command to the recommended format

    Would this fit under this To-Do, or would you prefer a separate issue for this?

    I'd be happy to work on it!

  9. janfb commented on Mar 23, 2026

    @janfb
    Contributor

    Hi @Pratyusha-DS13 thanks for offering your help here!

    Can you be more specific about which intro example you want to edit?

    Regarding your points: I think the unicode variable is actually intended for readability in the tutorial setting.

  10. Pratyusha-DS13 commented on Mar 23, 2026

    @Pratyusha-DS13

    Thanks for the clarification!

    I was referring to the introductory example in the getting started documentation (the simulator + inference workflow).

    I made a few targeted changes to improve readability and clarity for first-time users:

    • Refactored the simulator into a clearer multi-line function with comments explaining what it does
    • Made the data generation flow more explicit (theta → simulator(theta) → x) so the pipeline is easier to follow
    • Improved comments around the inference step to better explain what is happening conceptually (e.g., initializing and training the neural density estimator)
    • Slightly simplified some of the surrounding explanation to make it easier to read without losing meaning
    • Updated the installation phrasing to be more consistent ("using pip")

    Regarding the unicode variable, that makes sense — I can keep θ as-is and focus only on structural and explanatory improvements.

    The goal is mainly to make the first example easier to follow for new users encountering sbi for the first time.

    Would you like me to proceed with these changes as a PR, or should I narrow the scope further?

  11. janfb commented on Oct 8, 2026

    @janfb
    Contributor

    @Pratyusha-DS13 sorry that your question went unanswered for so long, and thanks for the detailed list.

    We will work on the remaining items of this list within the team, including the getting-started example. So please don't open a PR for it.

    Thanks again for offering your help, Jan

  12. Ashwini8686 commented on Oct 18, 2026

    @Ashwini8686
    Contributor

    Hi! I noticed that the FCEmbedding class in the API reference does not currently show a usage example.

    I propose adding a short example to its docstring demonstrating how to instantiate FCEmbedding, pass a batch of input tensors through the network, and check the output shape. This would help users understand how to use the embedding network without needing to work out the usage from the implementation.

    To test the change, I would run the example with PyTorch to verify that it executes successfully and produces an output with the expected shape. I would also build the documentation locally to confirm that the example renders correctly in the API reference.

    I checked the current pull requests for FCEmbedding and did not find one specifically focused on adding a usage example. Since the team is working through the remaining documentation tasks in this issue, I wanted to describe this specific improvement here before proceeding.

  13. Ashwini8686 commented on Oct 19, 2026

    @Ashwini8686
    Contributor

    Hi! Just following up on my suggestion for adding a usage example to the FCEmbedding API docstring. Could you please let me know if this approach would be useful and whether you'd be happy for me to open a PR for it? I'd be glad to make any adjustments based on your feedback. Thank you!

  14. Ashwini8686 commented on Oct 19, 2026

    @Ashwini8686
    Contributor

    Hi! While reviewing CNNEmbedding in sbi/neural_nets/embedding_nets/cnn.py, I noticed that two parameter names in the __init__ docstring don't match the constructor signature:

    • num_cnn_layers should be num_conv_layers.
    • pool_size should be pool_kernel_size.

    I'd like to correct these descriptions and update the related assertion message that still refers to num_cnn_layers. This would make the documentation and error message consistent with the actual API.

    I checked the open documentation PR #1987 and didn't find cnn.py among its changed files. Would this be a useful, focused contribution?

  15. Ashwini8686 commented on Oct 19, 2026

    @Ashwini8686
    Contributor

    Hi! I'd also like to propose adding a small, runnable Examples section to the CNNEmbedding class docstring in sbi/neural_nets/embedding_nets/cnn.py.

    The example would demonstrate initializing the embedding network, passing a batch of channel-first images through it, and checking the resulting embedding shape. I'd follow the project's Google-style docstring format and test the example before submitting a PR.

    Would this be a useful addition? I haven't made any changes yet.

  16. janfb commented on Oct 29, 2026

    @janfb
    Contributor

    @Ashwini8686 thanks for spotting the wrong argument names in the CNNEmbedding docstring and error messages, and sorry for the late answer. We found more to fix in these embedding nets at the same time, so I included your fix in PR #2113 and credited you there.

    Your proposals for usage examples in the FCEmbedding and CNNEmbedding docstrings are welcome. Please open one small follow-up PR for both. Keep each example short: build the net, pass one batch through it, and show the output shape. Please check that each example runs.

    thanks again, Jan

  17. Ashwini8686 commented on Oct 29, 2026

    @Ashwini8686
    Contributor

    Hi !
    I've opened the follow-up PR #2120 with usage examples for both FCEmbedding and CNNEmbedding, as you suggested.

    I tested both examples and ran the relevant embedding network tests. The lint and formatting checks also passed.

    Whenever you have time, could you please review it? Thank you for your guidance!

  18. janfb commented on Nov 19, 2026

    @janfb
    Contributor

    @Ashwini8686 thanks for adding the FCEmbedding and CNNEmbedding examples, PR #2120 is merged now.

    We will take care of the remaining items of this list internally, so please don't open PRs for them.

    thanks, Jan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docs

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions