Releases: google/etils
Releases · google/etils
v1.0.0
etree
:- Added:
etree.stack
to stack/batch multiple trees of arrays together. - Added:
etils.etree.py
backend (pure Python implementation to avoid
installing extra deps). - Added:
etree.map
(as convenience to access the corresponding
map_structure
).
- Added:
enp
:- Added:
enp.batch_dot
: Always dot product on the last axis with
broadcasting support (whilenp.dot
is inconsistent 1-D vs 2-D). - Added:
enp.angle_between
to compute angle between 2 n-dimensions
vectors. - Changed:
enp.project_onto_vector
,enp.project_onto_plane
supports
broadcasting. - Fixed:
TF
accidentally imported when usingenp.linalg
functions.
- Added:
ecolab
:- Added:
ecolab.patch_graphviz
to fix Colab display withgraphviz
. - Added:
ecolab.set_verbose
to activate stderr logging on Colab. - Changed:
ecolab.clear_cached_modules
accept singlestr
- Changed:
ecolab.clear_cached_modules
has ainvalidate=False
to not
invalidate previous instances of the modules.
- Added:
edc
:- Added: Expose
edc.repr
, for functional use or directly assign class
members (e.g.__repr__ = edc.repr
)
- Added: Expose
eapp
:- Fixed:
eapp.better_logging()
do not raiseis_borg
AttributeError
anymore.
- Fixed:
epath
:- Fixed:
local_path.copy('gs://')
uses the correct backend.
- Fixed:
- All:
- Changed: Better error message when missing import.
v0.9.0
eapp
(Added):- Added:
.make_flags_parser
to define CLI flags through dataclasses. - Added:
.better_logging
to display logs by default, tqdm
compatibility,...
- Added:
epy
:- Added:
@epy.frozen
class decorator to make class immutable
- Added:
edc
:- Added: Attributes of
@edc.dataclass
can be annotated withx: edc.AutoCast[T]
(for auto-normalization).
- Added: Attributes of
ecolab
:- Added:
ecolab.clear_cached_modules
to reload modules (useful for
interactive development) - Added:
etils.lazy_imports
supports multi-import (e.g. using
concurrent
also triggerconcurrent.futures
import).
- Added:
v0.8.0
epath
:- Added:
path.stat()
- Fix performance issues for
path.mkdir
.
- Added:
ecolab
:- Added:
from etils.lazy_imports import *
alias offrom etils.ecolab.lazy_imports import *
. - Changed: Mutating a lazy_import module mutate the original one. This
allow to mutatebuiltins
module for example.
- Added:
edc
:- Changed:
.replace
only added once (not in subclasses).
- Changed:
v0.7.1
ecolab
: Addeddataclass_array
to lazy_imports.
v0.7.0
array_types
:- Added: More array types:
complex64
,... - Added: An experimental
array_types.dtypes.DType
to support more
flexible dtype expression (AnyFloat
, type union,...) - Changed:
FloatArray
,IntArray
do supports any float, int without
casting. - Changed (breaking): Array dtypes (e.g. (
f32.dtype
) are now
array_types.dtypes.DType
.
- Added: More array types:
ecolab
:- Added:
lazy_imports.print_current_imports
to display the active lazy
imports (e.g. to add imports before publishing a colab).
- Added:
epy
:- Added:
epy.ContextManager
to create yield-based contextmanager class
(see
discussion) - Added:
epy.issubclass
(likeissubclass
but does not raises error for
non-types) - Added:
epy.groupby
, likeitertools.groupby
but returns adict
. - Added:
epy.Lines.make_block
helper to create code blocks (function
calls,...) - Fixed:
epy.StrEnum
raises better error message if invalid input.
- Added:
epath
- Added:
epath.DEFINE_path
forabsl.flags
support - Changed (breaking): Recursive glob (
rglob
,glob('**/')
) now raise an
error rather than being silently ignored. - Changed:
path.as_uri()
returnsgs://
ands3://
(rather than
file:///gs/
) - Changed: Add
__eq__
and__hash__
for resource path.
- Added:
edc
- Fixed:
__repr__
is correctly added in Python 3.10 (#143) - Fixed:
dc.frozen()
compatibility with autograd. - Changed:
dc.unfrozen()
now supportsjax.tree_map
. - Changed: Better
dc.unfrozen()
repr which display overwritten fields.
- Fixed:
enp
:- Added:
enp.check_and_normalize_arrays
util to dynamically validate
array dtype/shape from typing annotations. - Added:
enp.linalg.normalize
util. - Added:
enp.project_onto_vector
andenp.project_onto_plane
geometry
utils.
- Added:
- Other:
- Added: Guide on
API design principles.
- Added: Guide on
v0.6.0
epath
:- Remove TensorFlow dependency from
epath.Path
by default. (For now
accessinggs://
still require TF to be installed). - Add
epath.testing.mock_epath
to mock GCS calls.
- Remove TensorFlow dependency from
epy.testing
:- Add
epy.testing.subtest
for better subtests support. - Add
epy.testing.non_hermetic
to mark non-hermetic tests.
- Add
oss-kit
:pypi-auto-publish
GitHub action for automated PyPI and GitHub releases