Pelutils

Latest version: v3.1.0

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

Scan your dependencies

Page 1 of 8

3.1.0

- Removed final newline from Logger.log_repo and added option to set level
- Deprecated `Profile.hits` to instead only save aggregated statistics to prevent potential memory issues
- Deprecated `TickTock.measurements_by_profile_name` in favour of `TickTock.stats_by_profile_name`

3.0.1

- Add ruff linting
- Fixed hashing of TickTock profiles, removing the chance of potential hash collisions
- Added `TickTock.measurements_by_profile_name` which exposes measurements from a given profile

3.0.0

- Minimum Python version is now 3.9
- Strip all logged lines of extra whitespace
- Align logged lines with four space indents
- Do not automatically create subplots figure and axis in Figure
- Changed default axis timestamp labels to be more readable
- Support lists in moving average functions
- Changed DataStorage to have default name based on class name
- Non json-serializable data in DataStorage instances are now saved to a single pickle file
- Prevent NameError being raised if an exception was raised inside nested profiling without the use of `with TT.profile`
- Added `string` method to `HardwareInfo` for easy formatting
- Removed `no_grad` decorator, as this was already implemented in PyTorch
- Updated `JobDescription` to only include relevant and nonprivate attributes
- Renamed development distribution from `tests` to `dev`
- Added `tensor_bytesize` function to get the size of NumPy arrays and PyTorch tensors in bytes
- Added optional ID to `TickTock.tick` and `TickTock.tock` methods for multiple concurrent timings
- Added option to print the stacktrace with `log.log_with_stacktrace`
- Allowed setting `--name` with `Parser` even when `multiple_jobs` is `True`
- Exposed method for writing or appending configuration file to existing job folder
- Removed `[ds]` submodule as an install option -- PyTorch now has to be installed separately if the relevant features are needed
- `HardwareInfo` now supports multiple GPUs
- Removed `click` as a dependency
- Improved default table entry alignment
- Improved default `Figure` parameters
- Added option to set label size in `Figure`
- `name` no longer reserves `-n` abbreviation
- Renamed `c_ptr` to the more sensible `array_ptr`
- Changed parser submodule default values and error handling
- Added option to only parse a subset of sections in a config file
- Removed standard deviation calculation from profiles, as it was kind of pointless

Bug fixes

- Fixed missing `__init__.py` in `_entry_points` module
- Fixed incorrect whitespace when printing multiline logs
- Fixed wrong type annotation in `log.configure`
- Fixed wrong return type in `exp_moving_avg`
- Appending now works with `jsonl`
- Fixed wrong type annotation in `Figure`'s `figsize` argument
- `array_ptr` (formerly `c_ptr`) now works for CUDA tensors
- Fixed `Parser` allowing `Argument` without given values when not using a config file

2.0.0

- Added `reset` method to `TickTock`
- Removed `TickTock.remove_outliers`
- Moved `is_windows` to static `OS` attribute, which also contains `is_mac` and `is_linux`
- Added `HardwareInfo`, which contains a bunch of system hardware information
- `Figure` now automatically creates necessary subdirectories
- Added `add_external_measurements` method to `TickTock`
- Added `tex` method to `Table` for producing LaTeX code for a `tabular` environment
- Replaced `clear_folders` argument in `Parser.parse_args` method with `JobDescription.prepare_directory` method
- `Parser` documentation files are now put in individual job directories when using `JobDescription.prepare_directory`
- `Parser.document` has been removed
- Changed from BSD-3-Clause license to MIT license

Bug fixes

- Fixed different profiles with the same name in `TickTock` causing incorrect behavior
- Fixed `Parser` being unable to read cased arguments from config files

1.1.0

- Include `hashmap.c` license in distributions
- Include all header files in source distributions
- Fix `log.log_errors` logging `SystemExit(0)` as raised by `click` upon successful execution
- Moved away from NumPy API for easier install
- Added `get_timestamp_for_files`
- Fixed various parser bugs

1.0.0

- Removed `log.tqdm`
- Added binning functions to `pelutils.ds.plot`
- Added `pelutils.ds.distributions` with `scipy` distributions that use same notation as Jim Pitman's "Probability"
- Added `examples` directory, which currently only has plotting examples
- Removed `subfolder` attribute on `DataStorage` as this was cause for much confusion and many issues
- Changed pickle extension from `p` to `pkl`
- Added option to clear existing data folder saving with `DataStorage`
- Added indent option to `json` files saved by `DataStorage`
- Made naming of different submodules consistent
- Added `linecounter` entry point that allows plotting development of code in repositories over time
- Made `get_repo` return the absolute repository path
- Made logger use absolute instead of relative paths preventing issues with changing working directory
- Renamed `vline` to `hline` in `Table` as the line was horizontal rather than vertical
- Added `jsonl.dumps` and `jsonl.loads` and made all functions in `jsonl` module use same naming scheme as `json`
- Added support for Pytorch tensors to `c_ptr`
- Added `log.no_log` for disabling logging
- Renamed `Levels` to `LogLevels` as that makes it clearer in usage context
- `unique` can now take non-contiguous arrays and also has an `axis` argument
- Added a command line entry to examples, `pelexamples`
- Added a `binary_search` for searching in ordered iterables in `log(n)` time
- Added moving average function and variations thereof for plotting noisy data with uneven spacing
- Made `TickTock.tick` void and `TickTock.tock` raise `TickTockException` if `.tick` not called first
- Changed to `rapidjson` instead for built-in `json` module for all json operations for strictness and that sweet performance
- Added `reverse_line_iterator` for iterating through a file backwards
- Renamed `throws` to `raises`
- Reanedm `thousand_seps` to `thousands_seperators`
- Renamed HISTORY.md to CHANGELOG.md
- Made `get_timestamp` arguments keyword-only
- Added `restore_argv` decorator that allows safe testing of simulated `sys.argv`
- Added `except_keys` function for removing a list of keys from a dictionary
- Renamed `thousand_seps` to `thousands_seperators`
- Made C functions to work on most platforms
- Added `is_windows` function
- Removed `TickTock.profile_iter`
- Added `SimplePool` for testing with `multiprocessing.Pool`
- Renamed `MainTest` to `UnitTestCollection`
- Removed `BatchFeedForward`
- Added `Figure` plotting context class for easier plotting settings control
- Added convenience function for adding dates on the x axis, `get_dateticks`
- Added convenience function for getting path in test context, `UnitTestCollection.test_path`

Bug fixes

- Fixed a bug where a backslash would sometimes be printed from the logger before square brackets
- Fixed `raises` throwing errors if error was not caught
- Made `thousands_seperators` work with negative numbers
- Made `corr_ci` handle all iterable types correctly

Page 1 of 8

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.