Delu

Latest version: v0.0.26

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

Scan your dependencies

Page 1 of 3

0.0.26

Dependencies

- Python: the minimum required version is now 3.9.
- NumPy: the minimum required version is now 1.21. Also, NumPy v2.x is now supported.
- PyTorch: the minimum required version is now 1.9.

0.0.25

Performance

- Significantly improve the efficiency of `delu.nn.NLinear` for cases where batch size is greater than 1. The larger the input dimensions -- the larger the speedup. Since the computation algorithm is updated, the results can be slightly different with the new version (the underlying "math" is totally the same).

0.0.23

This is a minor release.

- Various improvements in the documentation.
- `delu.nn.named_sequential` is deprecated.
- `delu.utils.data.Enumerate` is deprecated.
- `delu.utils.data.IndexDataset` is deprecated.

0.0.22

This release improves the documentation website (both style and content).

0.0.21

This is a relatively big release after v0.0.18.

Breaking changes
- `delu.iter_batches`: now, `shuffle` is a keyword-only argument
- `delu.nn.Lambda`
- now, this module accepts only the functions from the `torch` module or methods of `torch.Tensor`
- now, the passed callable is not accessible as a public attribute
- `delu.random.seed`: the algorithm computing the library- and device-specific seeds changed, so the result can change compared to the previous versions
- In the following functions, the first arguments are now positional-only:
- `delu.to`
- `delu.cat`
- `delu.iter_batches`
- `delu.Timer.format`
- `delu.data.Enumerate`
- `delu.nn.Lambda`
- `delu.random.seed`
- `delu.random.set_state`

New features

- Added `delu.tools` -- a new home for `EarlyStopping`, `Timer` and other general tools.

- Added `delu.nn.NLinear` -- a module representing N linear layers that are applied to N different inputs:
`(*B, *N, D1) -> (*B, *N, D2)`, where `*B` are the batch dimensions.
- Added `delu.nn.named_sequential` -- a shortcut for creating `torch.nn.Sequential` with named modules without `OrderedDict`:

sequential = delu.nn.named_sequential(
('linear1', nn.Linear(10, 20)),
('activation', nn.ReLU()),
('linear2', nn.Linear(20, 1))
)


- `delu.nn.Lambda`: now, the constructor accepts keyword arguments for the callable:

m = delu.nn.Lambda(torch.squeeze, dim=1)


- `delu.random.seed`
- the algorithm computing random seeds for all libraries was improved
- now, `None` is allowed as `base_seed`; in this case, an unpredictable seed generated by OS will be used **and returned**:

truly_random_seed = delu.random.seed(None)

- `delu.random.set_state`: now, omitting the `'torch.cuda'` is allowed to avoid setting the states of CUDA RNGs
Deprecations & Renamings
- `delu.data` was renamed to `delu.utils.data`. The old name is now a deprecated alias.
- `delu.Timer` and `delu.EarlyStopping` were moved to the new `delu.tools` submodule. The old names are now deprecated aliases.

Dependencies
- Now, `torch >=1.8,<3`

Documentation
- Updated logo
- Simplified structure
- Removed the only (and not particularly representative) end-to-end example

Project
- Migrate from sphinx doctest to xdoctest

0.0.18

Add support for PyTorch 2

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.