- Began stricter adherence
- Improved error message for unparsable type in config files
- Deprecated
TickTock.__len__
- Deprecated
thousands_separators
due to better built-in syntax - Added support for
pathlib.Path
instead of solely using string paths - Added
torch
support tounique
function - Added rotation support to logger
- Fixed keyboard interrupts not killing profiles
- 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 ofTickTock.stats_by_profile_name
- 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
- 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 toHardwareInfo
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
todev
- Added
tensor_bytesize
function to get the size of NumPy arrays and PyTorch tensors in bytes - Added optional ID to
TickTock.tick
andTickTock.tock
methods for multiple concurrent timings - Added option to print the stacktrace with
log.log_with_stacktrace
- Allowed setting
--name
withParser
even whenmultiple_jobs
isTrue
- 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 sensiblearray_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
- 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
'sfigsize
argument array_ptr
(formerlyc_ptr
) now works for CUDA tensors- Fixed
Parser
allowingArgument
without given values when not using a config file
- Added
reset
method toTickTock
- Removed
TickTock.remove_outliers
- Moved
is_windows
to staticOS
attribute, which also containsis_mac
andis_linux
- Added
HardwareInfo
, which contains a bunch of system hardware information Figure
now automatically creates necessary subdirectories- Added
add_external_measurements
method toTickTock
- Added
tex
method toTable
for producing LaTeX code for atabular
environment - Replaced
clear_folders
argument inParser.parse_args
method withJobDescription.prepare_directory
method Parser
documentation files are now put in individual job directories when usingJobDescription.prepare_directory
Parser.document
has been removed- Changed from BSD-3-Clause license to MIT license
- Fixed different profiles with the same name in
TickTock
causing incorrect behavior - Fixed
Parser
being unable to read cased arguments from config files
- Include
hashmap.c
license in distributions - Include all header files in source distributions
- Fix
log.log_errors
loggingSystemExit(0)
as raised byclick
upon successful execution - Moved away from NumPy API for easier install
- Added
get_timestamp_for_files
- Fixed various parser bugs
- Removed
log.tqdm
- Added binning functions to
pelutils.ds.plot
- Added
pelutils.ds.distributions
withscipy
distributions that use same notation as Jim Pitman's "Probability" - Added
examples
directory, which currently only has plotting examples - Removed
subfolder
attribute onDataStorage
as this was cause for much confusion and many issues - Changed pickle extension from
p
topkl
- Added option to clear existing data folder saving with
DataStorage
- Added indent option to
json
files saved byDataStorage
- 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
tohline
inTable
as the line was horizontal rather than vertical - Added
jsonl.dumps
andjsonl.loads
and made all functions injsonl
module use same naming scheme asjson
- Added support for Pytorch tensors to
c_ptr
- Added
log.no_log
for disabling logging - Renamed
Levels
toLogLevels
as that makes it clearer in usage context unique
can now take non-contiguous arrays and also has anaxis
argument- Added a command line entry to examples,
pelexamples
- Added a
binary_search
for searching in ordered iterables inlog(n)
time - Added moving average function and variations thereof for plotting noisy data with uneven spacing
- Made
TickTock.tick
void andTickTock.tock
raiseTickTockException
if.tick
not called first - Changed to
rapidjson
instead for built-injson
module for all json operations for strictness and that sweet performance - Added
reverse_line_iterator
for iterating through a file backwards - Renamed
throws
toraises
- Reanedm
thousand_seps
tothousands_seperators
- Renamed HISTORY.md to CHANGELOG.md
- Made
get_timestamp
arguments keyword-only - Added
restore_argv
decorator that allows safe testing of simulatedsys.argv
- Added
except_keys
function for removing a list of keys from a dictionary - Renamed
thousand_seps
tothousands_seperators
- Made C functions to work on most platforms
- Added
is_windows
function - Removed
TickTock.profile_iter
- Added
SimplePool
for testing withmultiprocessing.Pool
- Renamed
MainTest
toUnitTestCollection
- 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
- 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
- Made
load_jsonl
load the file lazily
- Logger can now be used without writing to file
- Fixed parser naming when using config files and not
multiple_jobs
- Fixed parser naming when using cli only and
multiple_jobs
Parser.parse
now returns only a single experiment dict ifmultiple_jobs
is False- Improved logger error messages
- Added
Parser.is_explicit
to check if an argument was given explicitly, either from CLI or a config file - Fixed bug in parser, where if a type was not given, values from config files would not be used
- Made fields that should not be used externally private in parser
- Made
pelutils.ds.unique
slightly faster
- Commit is now logged as
DEBUG
- Removed
BatchFeedForward.update_net
BatchFeedForward
no longer requires batch size and increase factor as an argument- Removed
reset_cuda
function, as was a too small and obscure function and broke distributed training - Added
ignore_missing
field toDataStorage
for ignoring missing fields in stored data
- Fixed bug where TickTock profiles would sometimes not be printed in the correct order
- Removed
TickTock.reset
- Added
__len__
and__iter__
methods toTickTock
- Added option to print standard deviation for profiles
- Renamed
TimeUnit
toTimeUnits
to followenum
naming scheme - Time unit lengths are now given in units/s rather than s/unit
TickTock.__str__
now raises aValueError
if profiling is still ongoing to prevent incorrect calculations- Printing a
TickTock
instance now indents percentage of time spent to indicate task subsets
- Added
subfolder
argument toParser.document_settings
- A global instance of
TickTock
,TT
, has been added - similar tolog
- Added
TickTock.profile_iter
for performing profiling over a for loop - Fixed wrong error being thrown when keyboard interrupting within
with TT.profile(...)
- All collected logs are now logged upon an exception being thrown when using
log.log_errors
andcollect_logs
- Made
log.log_errors
capable of handling chained exeptions - Made
log.throw
private, as it had little use and could be exploited get_repo
no longer throws an error if a repository has not been found- Added utility functions for reading and writing
.jsonl
files - Fixed incorrect
torch
installations breaking importingpelutils
- Add
split_path
function which splits a path into components - Fix bug in
MainTest
where test files where not deleted
- Logger prints to
stderr
instead ofstdout
at level WARNING or above - Added
log.tqdm
that disables printing while looping over atqdm
object - Fixed
from __future__ import annotations
breakingDataStorage
- DataStorage can save all picklable formats +
torch.Tensor
specifically
- Test logging now uses
Levels.DEBUG
by default - Added
TickTock.fuse_multiple
for combining severalTickTock
instances - Fixed bugs when using multiple
TickTock
instances - Allow multiple hits in single profile
- Now possible to profile using
with
statement - Added method to logger to parse boolean user input
- Added method to
Table
for adding vertical lines manually
-
Change log error colour
-
Replace default log level with print level that defaults to
Levels.INFO
__call__
now always defaults toLevels.INFO
-
Print microseconds as
us
instead ofmus
- Fixed missing regex requirement
- Allowed disabling printing by default in logger
- Fixed accidental rich formatting in logger
- Fixed logger crashing when not configured
- Added np.unique-style unique function to
ds
that runs in linear time but does not sort - Replaced verbose/non-verbose logging with logging levels similar to built-in
logging
module - Added
with_print
option tolog.__call__
- Undid change from 0.3.4 such that
None
is now logged again - Added
format
module. Currently supports tables - Updated stringification of profiles to include percentage of parent profile
- Added
throws
function that checks if a functions throws an exception of a specific type - Use
Rich
for printing to console when logging
- Added append mode to logger to append to old log files instead of overwriting
-
Added
ds
submodule for data science and machine learning utilitiesThis includes
PyTorch
utility functions, statistics, andmatplotlib
default values
- Logger now raises errors normally instead of using
throw
method
get_repo
now accepts a custom path search for repo as opposed to always using working dir
-
log.input
now also accepts iterables as inputFor such inputs, it will return a generator of user inputs
-
Added functionality to logger for logging repository commit
-
Removed function
get_commit
-
Added function
get_repo
which returns repository path and commitIt attempts to find a repository by searching from working directory and upwards
-
Updates to examples in
README
and other minor documentation changes -
set_seeds
no longer returns seed, as this is already given as input to the function
-
Only works for Python 3.7+
-
If logger has not been configured, it now does no logging instead of crashing
This prevents dependecies that use the logger to crash the program if it is not used
-
log.throw
now also logs the actual error rather than just the stack trace -
log
now has public propertyis_verbose
-
Fixed
with log.log_errors
always throwing errors -
Added code samples to
README
-
Parser
no longer automatically determines if experiments should be placed in subfoldersInstead, this is given explicitly as an argument to
__init__
It also supports boolean flags in the config file
- Readd clean method to logger
-
The logger is now solely a global variable
Different loggers are handled internally in the global _Logger instance
- Add catch property to logger to allow automatically logging errors with with
- All code is now indented using spaces
- Allow finer verbosity control in logger
- Allow multiple log commands to be collected and logged at the same time
- Add decorator for aforementioned feature
- Change thousand_seps from TickTock method to stand-alone function in
__init__
- Verbose logging now has same signature as normal logging
- Add code to execute code with specific environment variables
-
Fix error where the full stacktrace was not printed by log.throw
-
set_seeds
now checks if torch is availableThis means torch seeds are still set without needing it as a dependency
- Make Unverbose class private and update documentation
- Update formatting when using .input
- Add input method to logger
- Better logging of errors
- Removed torch as dependency
-
Logger is now a global variable,
log
Logging should happen by importing the log variable and calling
.configure
to set it upTo reset the logger,
.clean
can be called -
It is still possible to just import
Logger
and use it in the traditional way, though.configure
should be called first -
Changed timestamp function to give a cleaner output
-
get_commit
now returnsNone
ifgitpython
is not installed
- Update documentation for logger and ticktock
- Fix bug where seperator was not an argument to
Logger.__call__
- Include
DataStorage
- Logger can throw errors and handle seperators
- TickTock includes time handling and units
- Minor parser path changes
- Logger, Parser, and TickTock added from previous projects