Gradient-metrics

Latest version: v0.5.0

Safety actively analyzes 623586 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

0.5.0

⚙️ CI/CD

- Update concurrency groups in workflows (22)
- Run pytest on pull requests (25)

Other

- Increase maximum python version to 3.11 (23)
- Remove numpy dependency and relax PyTorch version specification (26)

0.4.0

⚙️ CI/CD

- Add `.python-version` for consistency (16)
- Update caching in workflows (17)
- Update release workflow (19)
- Update release workflow (20)

Other

- Update package versions (18)

0.3.0

❗️ Breaking Changes

- Remodel gathering of gradients (13)

🚀 Features

- Add possibility to specify sup norm with `PNorm` (8)

🐛 Fixes

- Remodel gathering of gradients (13)

🧪 Tests

- Expand tests to cover checks for inputs on different devices (12)

⚙️ CI/CD

- Update action workflows (9)
- Change python version used in workflows (10)
- Add tests tag to changelog config (11)
- Change trigger for linting workflow (14)

0.2.0

This release introduces the `grad_transform` option on `GradientMetric`s. With this you can transform the incoming gradient before applying the metric on it (see `simple_example.py` for an example use case).

Also a major change is the move of the `target_layers` option from the `GradientMetricCollector` to the individual `GradientMetric`s. This way one can use a `GradientMetric` as standalone metric and has also greater flexibility in defining a set of `GradientMetric`s for the `GradientMetricCollector`.

0.1.8

Removed the `create_graph` option from `GradientMetricCollector` as it should be implemented by using `torch.autograd.grad` to avoid memory leaks.

This will be implemented in a future release if necessary.

0.1.7

The `GradientMetricCollector.get_metrics` got replaced by `GradientMetricCollector.data` to be more consistent with `GradientMetric`.

Added a bunch of documentation and a simple example.

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.