Skip to content

docs: add embedding network usage examples+ - #2120

Open
Ashwini8686 wants to merge 2 commits into
sbi-dev:mainfrom
Ashwini8686:docs/cnn-embedding-example
Open

Ashwini8686 wants to merge 2 commits into
sbi-dev:mainfrom
Ashwini8686:docs/cnn-embedding-example

Conversation

@Ashwini8686

Copy link
Copy Markdown

What does this PR do?

  • Add a runnable usage example to the FCEmbedding class docstring.
  • Demonstrate passing a batch through the network and displaying the output shape.
  • Retain the existing CNNEmbedding usage example.

Validation

  • Both examples produced the expected output shape: (32, 20).
  • Embedding network tests passed.
  • Ruff lint and formatting checks passed.
  • Git whitespace checks passed.

@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 60f457a2-0d51-41fc-a55c-3340aeae423f
Commits

Reviewing files that changed from the base of the PR and between 6ca1a59 and 3cd30b7.

Files selected for processing: 2
  • sbi/neural_nets/embedding_nets/cnn.py
  • sbi/neural_nets/embedding_nets/fully_connected.py

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

Walkthrough

The CNNEmbedding and FCEmbedding class docstrings now include examples that construct each network, pass inputs through it, and show the resulting output shape. No implementation or public declarations changed.

Changes: Embedding network documentation

Layer / File(s) Summary
Class usage examples
sbi/neural_nets/embedding_nets/cnn.py, sbi/neural_nets/embedding_nets/fully_connected.py
The class docstrings now show how to construct each embedding network, run a batch through it, and inspect the output shape.

Priority: Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Possibly related PRs

  • sbi-dev/sbi#2113: Updates the CNNEmbedding docstring and validation behavior; this PR adds an example to the same class documentation.
  • sbi-dev/sbi#2118: Changes FCEmbedding construction and output-layer documentation; this PR adds an example to that class documentation.

Suggested reviewers: michaeldeistler

Merge Risk: Minimal · up to 3cd30

No merge-blocking risk is identified.

Pre-merge checks: Passed 5
Check name Status Explanation
Description check Passed The description clearly states the documentation changes and reports validation results. It does not include the issue-link section, the additional-information section, or the checklist, but the core …
Title check Passed The title clearly identifies the addition of embedding network usage examples. The trailing plus sign is unnecessary but does not obscure the main change.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description clearly states the documentation changes and reports validation results. It does not include the issue-link section, the additional-information section, or the checklist, but the core information is complete.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 2 files.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@janfb janfb self-assigned this Oct 31, 2026
@janfb

janfb commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

@Ashwini8686 thanks for the PR! I will review it after November 9.

Thanks, Jan

@manuelgloeckler
manuelgloeckler self-requested a review November 11, 2026 19:25

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants