Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
latent folder precommit
Browse files Browse the repository at this point in the history
AFg6K7h4fhy2 committed Apr 12, 2024
1 parent 725048b commit 844dff2
Showing 5 changed files with 12 additions and 34 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -27,10 +27,10 @@ repos:
rev: v0.1.0
hooks:
- id: ruff
- repo: https://github.com/numpy/numpydoc
rev: v1.6.0
hooks:
- id: numpydoc-validation
# - repo: https://github.com/numpy/numpydoc
# rev: v1.6.0
# hooks:
# - id: numpydoc-validation
#####
# Secrets
- repo: https://github.com/Yelp/detect-secrets
24 changes: 0 additions & 24 deletions model/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion model/src/pyrenew/latent/hospitaladmissions.py
Original file line number Diff line number Diff line change
@@ -63,7 +63,9 @@ class InfectHospRate(RandomVariable):

def __init__(
self,
dist: Optional[dist.Distribution] = dist.LogNormal(jnp.log(0.05), 0.05),
dist: Optional[dist.Distribution] = dist.LogNormal(
jnp.log(0.05), 0.05
),
varname: Optional[str] = "IHR",
) -> None:
"""
2 changes: 1 addition & 1 deletion model/src/pyrenew/latent/i0.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import numpyro as npro
import numpyro.distributions as dist
from pyrenew.metaclass import RandomVariable
from tpying import Any, Optional

from tpying import Optional, Any

class Infections0(RandomVariable):
"""Initial infections helper class.
8 changes: 4 additions & 4 deletions model/src/pyrenew/latent/infections.py
Original file line number Diff line number Diff line change
@@ -19,13 +19,13 @@
Attributes
----------
infections : ArrayLike or None
The estimated latent infections. Defaults to None.
The estimated latent infections. Defaults to None.
"""


class Infections(RandomVariable):
"""Latent infections
Methods
-------
sample(Rt, I0, gen_int, **kwargs)
@@ -35,7 +35,7 @@ def __init__(
self,
infections_mean_varname: str = "latent_infections",
) -> None:
"""Default constructor for Infections class.
"""Default constructor for Infections class.
Parameters
----------
@@ -53,7 +53,7 @@ def __init__(

@staticmethod
def validate() -> None:
"""
"""
Notes
-----
TODO: Complete this method.

0 comments on commit 844dff2

Please sign in to comment.