Releases: google/etils
Releases · google/etils
v1.6.0
ecolab
:- Added protobuf repeated fields support to
ecolab.inspect
ecolab.auto_display
:- Support specifiers to customize auto-display (
;s
,;a
,;i
,
;p
,...) - Fixed auto-display when the line contain UTF-8 character
- Support specifiers to customize auto-display (
- Fix a bug for
ecolab.highlight_html
to escape HTML string.
- Added protobuf repeated fields support to
epy
:epy.lazy_imports()
support adhoc imports (will re-create the original
ecolab.adhoc
context when resolved)- Added:
epy.binary_adhoc()
to add adhoc imports when using Python
interpreter. epy.lazy_imports()
supports error and success callbacks
(error_callback
/success_callback
).- Added:
epy.pretty_repr
supportattr
dataclass-like objects.
exm
:- Adding artifacts can be used inside
with xm.create_experiment()
- Adding artifacts can be used inside
v1.5.2
ecolab
:- Fix import error in IPython when 7.0 <= version < 8
epath
:- Fix resource_path when used on a adhoc-imported module.
v1.5.1
epath
:- Fix
glob
issue when used with ffspec.
- Fix
v1.5.0
ecolab
:- Auto display statements ending with
;
(assignments, return
statements, expressions,...). - Adhoc proto now supports message extensions.
- Auto display statements ending with
epath
:- Add
missing_ok=False
kwargs topath.rmtree
. - Add
fsspec_backend
relying on fsspec to handle GCS/S3 without needing
TensorFlow. This means thatgcsfs
ands3fs
become required
dependencies to read respectively GCS and S3. TensorFlow is no more
required. Note: If TensorFlow is installed, we still default to
thetf_backend
for backward compatibility. - Changed:
path.glob
raise an error if insufficient permission.
- Add
enp
:ArraySpec.from_array
:- Fix when TF is in graph mode.
- Add
orbax
metadata support
epy
:- Add
epy.pretty_repr
for pretty print an object (including dataclass). - Add
epy.diff_str
for pretty diff print of 2 objects. - Add
epy.is_namedtuple
- Add
etree
:- Fix
etree.map
fornamedtuple
(Python backend)
- Fix
v1.4.1
lazy_imports
: More lazy importsepath
: Remove circular deps
v1.4.0
epy
:- Add
@epy.lazy_imports
to lazyly import modules. - Fix
@epy.frozen
when class has custom__getattr__
- Add
ecolab
:ecolab.collapse()
- Breaking: Remove
widget=True
argument to (widget always enabled).- Add
expanded: bool
kwargs to control whether the widget is
expanded or collapsed by default.
- Add
- Breaking: Remove
- Breaking: Remove
keep_proto
kwargs fromclear_cached_modules
and
import_proto
kwargs fromadhoc
(proto always supported) - Add
expanded
argument toecolab.json()
and change default behavior
to False.
enp
:- Make array spec (e.g.
etree.spec_like()
) hashable. enp.lazy.is_tf
returnsTrue
fortf.TensorSpec
- Remove
array_types.dtypes
andarray_types.typing
(should use
enp.dtypes
andenp.typing
instead).
- Make array spec (e.g.
epath
:- Add
owner
andgroup
toepath.Path.stat
output. Does not work for
Windows nor whentf.io.gfile
is used.
- Add
etree
:- Fix
etree.map
forcollections.defaultdict
- Fix
internal
:- Add a
unwrap_on_reload
to save/restore original function after a
module is reloaded (e.g. on colab)
- Add a
v1.3.0
ecolab
:- Add
widget=True
argument toecolab.collapse()
for better
interactivity. - Add
ecolab.highlight_html(code)
to add syntax highlighting to cell
outputs of specific objects.
- Add
edc
:- Add
contextvars
option: Fields annotated asedc.ContextVars[T]
are
wrapped incontextvars.ContextVars
. - Fix error when using
_: dataclasses.KW_ONLY
__repr__
now also pretty-print nested dataclasses, list, dict,...
- Add
enp
:ArraySpec
supportgrain.ArraySpec
(allow support
etree.spec_like(ds.element_spec)
on grain datasets)
epy
:- Better
epy.Lines.make_block
for custom pretty print classes, list,...
- Better
v1.2.0
enp
:etree.spec_like
supportf32
,... annotations (when fully defined).
etree
:- Add
optree
backend.
- Add
ecolab
:- Add
ecolab.auto_inspect()
to allow inspecting all colab outputs. - Fix various
ecolab.inspect
issues (e.g. when used on metaclasses,...). - Add
ecolab.inspect
support for Jupyter notebook (non-Colab).
- Add
v1.1.1
enp
:- Fix
torch==2.0
compatibility.
- Fix
- Fix warning during
pip install
(missingepath-no-tf
)
v1.1.0
enp
:- Add
torch
support! - Add
enp.lazy.LazyArray
to lazily check
isinstance(array, enp.lazy.LazyArray)
without triggeringTF
,
jax
,... imports - Add
skip=['jnp', ...]
kwarg toenp.testing.parametrize_xnp
to
exclude a specific xnp module from tests. - Add
enp.compat
function to fix compatibility issues between Jax, TF,
torch, numpy (e.g.x.astype()
missing fromtorch
, but working in
jax
,tf
,np
). - Breaking: Move some functions from
enp.linalg
toenp.compat
. - Add more
enp.lazy.
methods for conversions from/to dtype
- Add
ecolab
:- Add
ecolab.inspect
for interactively inspect any Python objects. - Add
ecolab.json
for interactive expandable JSON display. ecolab.auto_plot_array
- Add
torch
- Small/large images (height outside 100-250px) are automatically
scaled up/down. Can be disabled with
ecolab.auto_plot_array(height=None)
- Can overwrite
mediapy
default options withshow_images_kwargs
andshow_videos_kwargs
- Add
- Add
ecolab.interruptible
for graceful interruption of loops. - Fixed: Pytype/pylance support for
lazy_imports
: unlock auto-complete,
docstring tooltip, do not trigger linter errors anymore
("xxx" is not definedPylancereportUndefinedVariable
).
- Add
etree
:from etils import etree
now expose the Python backend (
etree.map
,...). Other backend are still available as previously
(etree.jax.map
,...)
epy
:- Added:
epy.splitby
to split an iterator in 2, based on a predicate.
(e.g.small, big = epy.splitby([20, 1, 30, 1, 2], lambda x: x > 10)
)
- Added: