Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: fixed pyright complaints with SilentTQDM and made not printing default behaviour #761

Merged
merged 7 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added `coreax.kernels.PowerKernel` to replace repeated calls of `coreax.kernels.ProductKernel`
within the `**` magic method of `coreax.kernel.ScalarValuedKernel`
- Added scalar-valued kernel functions `coreax.kernels.PoissonKernel` and `coreax.kernels.MaternKernel`
- Added `progress_bar` attribute to `coreax.score_matching.SlicedScoreMatching` to enable or
disable tqdm progress bar terminal output. Defaults to `` :data:`False` ``.
db091756 marked this conversation as resolved.
Show resolved Hide resolved


### Fixed
Expand Down
4 changes: 2 additions & 2 deletions coreax/score_matching.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def __init__( # noqa: PLR0913, PLR0917
num_noise_models: int = 100,
sigma: float = 1.0,
gamma: float = 0.95,
print_progress_bar: bool = False,
progress_bar: bool = False,
):
"""Define a sliced score matching class and update invalid inputs."""
# JAX will not error if we have num_random_vectors set to 0, but this approach
Expand All @@ -170,7 +170,7 @@ def __init__( # noqa: PLR0913, PLR0917
self.num_noise_models = num_noise_models
self.sigma = sigma
self.gamma = gamma
if print_progress_bar:
if progress_bar:
self.progress_bar = LoudTQDM
else:
self.progress_bar = SilentTQDM
Expand Down
1 change: 0 additions & 1 deletion coreax/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,4 +467,3 @@ def __iter__(self) -> Iterator[T]:
@staticmethod
def write(*args, **kwargs) -> None:
"""Do nothing instead of writing to output."""
del args, kwargs
1 change: 0 additions & 1 deletion documentation/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@
("py:obj", "coreax.weights._Data"),
("py:obj", "coreax.metrics._Data"),
("py:obj", "coreax.solvers.coresubset._SupervisedData"),
("py:obj", "coreax.solvers.coresubset._SupervisedData"),
]


Expand Down