Comments (10)
I'm fine with pyTorch style
from sbi.
Pyro style docstrings in the slice sampler are on purpose, makes it's easier to potentially contribute the slice sampling kernel (so this should be a warranted inconsistency).
For the rest of the code base, I also think it's easiest to just use type annotations in the signature and avoid duplication in the docstring, so just use name: explanation
.
from sbi.
OK, then if Jan agrees we keep this issue open and reference it from a sanitize-docstrings PR (to be created).
from sbi.
Here is a template for VSCode's autoDocstring
without types:
{{! Google Docstring Template without types }}
{{summaryPlaceholder}}
{{extendedSummaryPlaceholder}}
{{#parametersExist}}
Args:
{{#args}}
{{var}}: {{descriptionPlaceholder}}
{{/args}}
{{#kwargs}}
{{var}}: {{descriptionPlaceholder}}
{{/kwargs}}
{{/parametersExist}}
{{#returnsExist}}
Returns:
{{#returns}}
{{typePlaceholder}}: {{descriptionPlaceholder}}
{{/returns}}
{{/returnsExist}}
{{#yieldsExist}}
Yields:
{{#yields}}
{{typePlaceholder}}: {{descriptionPlaceholder}}
{{/yields}}
{{/yieldsExist}}
from sbi.
Thank you so much. This has to go in a file AFAICT, do you know what the canonical places/names/extensions would if project local or if global? Which one did you end up choosing?
from sbi.
I also wondered where to put the file, ended up placing it in a autodocstring
subfolder relative to my global settings.json
from sbi.
I wonder whether with 3 of 4 (currently active) devs using vscode and a mandated format for the docstring it'd be too much of a stretch to version in git .vscode/settings.json
and the template. Non-vscode users would not be affected, but could also get documentation (e.g. line length) for their own IDEs by looking at it. What do you think?
from sbi.
I put it in ~/.config/Code - Insiders/User/autodocstring.template
from sbi.
Thanks! and where and how do you refer to autodocstring.template
in vscode?
from sbi.
Thanks! and where and how do you refer to autodocstring.template in vscode?
I'll answer in #128
from sbi.
Related Issues (20)
- Use conventional commits and commit linter? HOT 1
- Density Estimator batched sample mixes up samples from different posteriors
- unable to import `posterior_nn` from `sbi.neural_nets` in v0.22.0 HOT 8
- GPU compatible (L-)C2ST
- hardcoded transfer of data and model to cpu triggers UserWarning
- Pyright failing on main in pyro flows HOT 2
- Create web hook for SBI discord server. HOT 1
- Improving the structure of the documentation and website HOT 1
- Analysis tests file on GPU HOT 1
- Remove UserWarning about GPU speed up HOT 1
- categorial mass estimator and mnle fails for 2D density estimator test HOT 2
- Using MCMCPosterior gives 'Sequential' object has no attribute 'log_prob' HOT 3
- `simulate_for_sbi` not saturating CPU HOT 11
- Slow L-C2ST test fails locally HOT 2
- `pairplot` with 1 dimensional tensor returns an error HOT 2
- `sbi.analysis` seems broken because `np.string_` was removed in the NumPy 2.0 release. HOT 8
- refactor neural_nets module HOT 1
- hyperparameter tuning for the models? HOT 1
- How to set up custom embedding nets for CUDA training HOT 1
- c2st fails when one feature is constant HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sbi.