Recent Releases of https://github.com/google/etils
https://github.com/google/etils - v1.13.0
-
ecolab:-
adhoc: Better error message for adhoc invalidate withepy.reraise - Fix Digraph
patch_graphviz() - Fix pretty display with syntax-highlighting for
;land;h -
adhoc.inspect: Cleaner display for protos
-
-
epath:- Fix error in
path.is_file()when the file do not exists.
- Fix error in
-
edc:- Add a
edc.ContextStack()util for a thread-safe / contextvars-aware stack.
- Add a
-
epy:-
epy.pretty_reprsupportscollections.UserDict,pydantic,immutabledictobjects. -
epy.pretty_reprdict keys are pretty-printed. - Support
__setattr__and__delattr__on LazyModules. - Fix
epy.ContextVardescriptor that were sharing their state.
-
-
etree:- Add a
etree.copyto copy a tree structure without modifying its leaves
- Add a
- Python
Published by github-actions[bot] 8 months ago
https://github.com/google/etils - v1.12.2
-
enp:- Fix orbax ArraySpec issue.
- Python
Published by github-actions[bot] 12 months ago
https://github.com/google/etils - v1.12.1
-
enp:- Add
enp.flatten/enp.unflattento flatten batch shape using an einops-like syntax.
- Add
- Python
Published by github-actions[bot] 12 months ago
https://github.com/google/etils - v1.12.0
-
epy:- Add experimental util for ml_python + multi-process compatibility for adhoc-imports (when using PyGrain).
-
epy.lazy_api_imports: Make lazy importing thread safe. -
epy.StrEnum: Fix!=operator.
-
epath:- Supports
hf://urls.
- Supports
-
ecolab:- Make mediapy lazy
- Python
Published by github-actions[bot] about 1 year ago
https://github.com/google/etils - v1.11.0
-
enp:- Make
enp.testing.parametrize_xnp()import only requested xnp modules. - Fix orbax error when inspecting specs of an orbax checkpoint.
- Make
-
ecolab:-
ecolab.inspect: Proto are better displayed (hide attributesDESCRIPTOR,Extensionsin sub-section)
-
-
epy:-
epy.lazy_api_imports: Fix infinite recursion when importing sub-module
-
-
exm:- Add dummy implementation of the API to simplify open-sourcing.
- Python
Published by github-actions[bot] over 1 year ago
https://github.com/google/etils - v1.10.0
-
epy:- Add frozen dataclass support for
epy.ContextManager - Make
epy.StrEnumtruly case-insensitive - Support adhoc import of proto files with hyphen.
- Add
fiddlesupports toepy.pretty_repr
- Add frozen dataclass support for
-
enp: AddArraySpecsupport forgrain.python.SharedMemoryArrays.
- Python
Published by github-actions[bot] over 1 year ago
https://github.com/google/etils - v1.9.4
- Return Python 3.10 support.
- Python
Published by github-actions[bot] over 1 year ago
https://github.com/google/etils - v1.9.3
-
eapp:- Allow extra kwargs in
eapp.make_flags_parser()
- Allow extra kwargs in
-
epath:- Fix epath.Path pydantic deserialization for URI-style paths
-
epy:- Add
epy.is_testto check whether we're running in a test environment. - Add
epy.typing.Json. - Add
epy.ExitStackwhich allows setting the contextmanagers during init. - Add proto support for
epy.binary_adhoc - Hide reraise from the traceback for cleaner error messages
- Add
-
exm:- Add
exm.url_to_python_only_logs()andexm.curr_job_name()to add artifact to Python only logs (without all the verbose C++ junk ). - Fix a bug which makes
exm.current_experimentcrash
- Add
- Python
Published by github-actions[bot] over 1 year ago
https://github.com/google/etils - v1.9.2
-
epath:- Support pydantic serialization of epath.Path
- Python
Published by github-actions[bot] over 1 year ago
https://github.com/google/etils - v1.9.1
-
epath:- Fix an infinite recursion on
is_relative_tofor Python>=3.12.
- Fix an infinite recursion on
- Python
Published by github-actions[bot] over 1 year ago
https://github.com/google/etils - v1.9.0
-
epy:- Add
epy.lazy_api_importsto lazy-import__init__.pysymbols. - Removed:
epy.cached_property -
epy.lazy_imports: Error callback accept astrto auto-re-raise with additional info. - Fix mixing
epy.lazy_imports()withepy.binary_adhoc().
- Add
-
ecolab:- Added
reload_workspace=Trueto adhoc to auto-reload from workspace - Add
ecolab.get_permalink() - Fix
ecolab.inspectnot finding static files when the kernel contain partial etils deps.
- Added
-
epath:- Fix error when
importlib.resources.filesreturnMultiplexedPath - Fix
gs://URI for 3.12 - Fix
.walk3.12 error (topdown->top_downrename)
- Fix error when
- Full compatibility with Python 3.12 (unit tests run on both 3.11 and 3.12).
- Python
Published by github-actions[bot] over 1 year ago
https://github.com/google/etils - v1.8.0
- Drop Python 3.10 support.
-
epy:-
epy.pretty_repr: Add support for namedtuple
-
-
ecolab:- Add
ecolab.disp(obj) - Add
;hfor syntax highlighting with auto-display - Fix proto error on import
- Add
- Python
Published by github-actions[bot] almost 2 years ago
https://github.com/google/etils - v1.7.0
-
epath:- Add
modetoepath.Path.statoutput. Does not work for Windows nor whentf.io.gfileis used. - Add
.walktoepath.Path. Similar usage thanpathlib.Path.walk
- Add
-
epy:- Added:
epy.reverse_fstring: Reverse fstring parsing - Added:
reload=forepy.binary_adhoc(), fixed behavior for consistency withecolab.adhoc - Added:
epy.pprint: Pretty print an object (including dataclass). - Added:
epy.pretty_repr_top_level - Added:
epy.wraps_clsequivalent offunctools.wrapsbut for classes. - Breaking:
epy.lazy_imports(error_callback=)has now signature(Exception) -> None(instead of(str) -> None) - Fixed:
epy.pretty_reprmissing trailing,for tuple with single element.
- Added:
-
ecolab:- Changed:
ecolab.auto_display: Better representation when line is displayed - Fix
adhocthat delete sub-module wheninvalidate=False -
adhocwithreload_mode=UPDATE_INPLACEnow supports enums, so old versions compare equal to new versions. Enums compared asa is FOOmight still fail. -
adhocwithreload_mode=UPDATE_INPLACEis now much faster. - When using
cell_autoreload=Truethe defaultreload_modeis nowUPDATE_INPLACE. - Better error message for adhoc reload
- Changed:
-
exm:- Added:
exm.set_citc_source()to specify which workspace to use when using XManager on Colab
- Added:
-
etree:- Added
is_leafkwarg to.mapand.parallel_map
- Added
-
enp:- Add
ArraySpecsupport forflax.linen.summary.
- Add
- Python
Published by github-actions[bot] about 2 years ago
https://github.com/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_htmlto escape HTML string.
- Added protobuf repeated fields support to
-
epy:-
epy.lazy_imports()support adhoc imports (will re-create the originalecolab.adhoccontext 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_reprsupportattrdataclass-like objects.
-
-
exm:- Adding artifacts can be used inside
with xm.create_experiment()
- Adding artifacts can be used inside
- Python
Published by github-actions[bot] about 2 years ago
https://github.com/google/etils - 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.
- Python
Published by github-actions[bot] over 2 years ago
https://github.com/google/etils - v1.5.1
-
epath:- Fix
globissue when used with ffspec.
- Fix
- Python
Published by github-actions[bot] over 2 years ago
https://github.com/google/etils - 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=Falsekwargs topath.rmtree. - Add
fsspec_backendrelying on fsspec to handle GCS/S3 without needing TensorFlow. This means thatgcsfsands3fsbecome required dependencies to read respectively GCS and S3. TensorFlow is no more required. Note: If TensorFlow is installed, we still default to thetf_backendfor backward compatibility. - Changed:
path.globraise an error if insufficient permission.
- Add
-
enp:-
ArraySpec.from_array:- Fix when TF is in graph mode.
- Add
orbaxmetadata support
-
-
epy:- Add
epy.pretty_reprfor pretty print an object (including dataclass). - Add
epy.diff_strfor pretty diff print of 2 objects. - Add
epy.is_namedtuple
- Add
-
etree:- Fix
etree.mapfornamedtuple(Python backend)
- Fix
- Python
Published by github-actions[bot] over 2 years ago
https://github.com/google/etils - v1.4.1
-
lazy_imports: More lazy imports -
epath: Remove circular deps
- Python
Published by github-actions[bot] over 2 years ago
https://github.com/google/etils - v1.4.0
-
epy:- Add
@epy.lazy_importsto lazyly import modules. - Fix
@epy.frozenwhen class has custom__getattr__
- Add
-
ecolab:-
ecolab.collapse()- Breaking: Remove
widget=Trueargument to (widget always enabled).- Add
expanded: boolkwargs to control whether the widget is expanded or collapsed by default.
- Add
- Breaking: Remove
- Breaking: Remove
keep_protokwargs fromclear_cached_modulesandimport_protokwargs fromadhoc(proto always supported) - Add
expandedargument toecolab.json()and change default behavior to False.
-
-
enp:- Make array spec (e.g.
etree.spec_like()) hashable. -
enp.lazy.is_tfreturnsTruefortf.TensorSpec - Remove
array_types.dtypesandarray_types.typing(should useenp.dtypesandenp.typinginstead).
- Make array spec (e.g.
-
epath:- Add
ownerandgrouptoepath.Path.statoutput. Does not work for Windows nor whentf.io.gfileis used.
- Add
-
etree:- Fix
etree.mapforcollections.defaultdict
- Fix
-
internal:- Add a
unwrap_on_reloadto save/restore original function after a module is reloaded (e.g. on colab)
- Add a
- Python
Published by github-actions[bot] over 2 years ago
https://github.com/google/etils - v1.3.0
-
ecolab:- Add
widget=Trueargument toecolab.collapse()for better interactivity. - Add
ecolab.highlight_html(code)to add syntax highlighting to cell outputs of specific objects.
- Add
-
edc:- Add
contextvarsoption: 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:-
ArraySpecsupportgrain.ArraySpec(allow supportetree.spec_like(ds.element_spec)on grain datasets)
-
-
epy:- Better
epy.Lines.make_blockfor custom pretty print classes, list,...
- Better
- Python
Published by github-actions[bot] almost 3 years ago
https://github.com/google/etils - v1.2.0
-
enp:-
etree.spec_likesupportf32,... annotations (when fully defined).
-
-
etree:- Add
optreebackend.
- Add
-
ecolab:- Add
ecolab.auto_inspect()to allow inspecting all colab outputs. - Fix various
ecolab.inspectissues (e.g. when used on metaclasses,...). - Add
ecolab.inspectsupport for Jupyter notebook (non-Colab).
- Add
- Python
Published by github-actions[bot] almost 3 years ago
https://github.com/google/etils - v1.1.1
-
enp:- Fix
torch==2.0compatibility.
- Fix
- Fix warning during
pip install(missingepath-no-tf)
- Python
Published by github-actions[bot] almost 3 years ago
https://github.com/google/etils - v1.1.0
-
enp:- Add
torchsupport! - Add
enp.lazy.LazyArrayto lazily checkisinstance(array, enp.lazy.LazyArray)without triggeringTF,jax,... imports - Add
skip=['jnp', ...]kwarg toenp.testing.parametrize_xnpto exclude a specific xnp module from tests. - Add
enp.compatfunction to fix compatibility issues between Jax, TF, torch, numpy (e.g.x.astype()missing fromtorch, but working injax,tf,np). - Breaking: Move some functions from
enp.linalgtoenp.compat. - Add more
enp.lazy.methods for conversions from/to dtype
- Add
-
ecolab:- Add
ecolab.inspectfor interactively inspect any Python objects. - Add
ecolab.jsonfor 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
mediapydefault options withshow_images_kwargsandshow_videos_kwargs
- Add
- Add
ecolab.interruptiblefor 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 etreenow expose the Python backend (etree.map,...). Other backend are still available as previously (etree.jax.map,...)
-
-
epy:- Added:
epy.splitbyto 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:
- Python
Published by github-actions[bot] almost 3 years ago
https://github.com/google/etils - v1.0.0
-
etree:- Added:
etree.stackto stack/batch multiple trees of arrays together. - Added:
etils.etree.pybackend (pure Python implementation to avoid installing extra deps). - Added:
etree.map(as convenience to access the correspondingmap_structure).
- Added:
-
enp:- Added:
enp.batch_dot: Always dot product on the last axis with broadcasting support (whilenp.dotis inconsistent 1-D vs 2-D). - Added:
enp.angle_betweento compute angle between 2 n-dimensions vectors. - Changed:
enp.project_onto_vector,enp.project_onto_planesupports broadcasting. - Fixed:
TFaccidentally imported when usingenp.linalgfunctions.
- Added:
-
ecolab:- Added:
ecolab.patch_graphvizto fix Colab display withgraphviz. - Added:
ecolab.set_verboseto activate stderr logging on Colab. - Changed:
ecolab.clear_cached_modulesaccept singlestr - Changed:
ecolab.clear_cached_moduleshas ainvalidate=Falseto 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_borgAttributeErroranymore.
- Fixed:
-
epath:- Fixed:
local_path.copy('gs://')uses the correct backend.
- Fixed:
- All:
- Changed: Better error message when missing import.
- Python
Published by github-actions[bot] about 3 years ago
https://github.com/google/etils - v0.9.0
-
eapp(Added):- Added:
.make_flags_parserto define CLI flags through dataclasses. - Added:
.better_loggingto display logs by default, tqdm compatibility,...
- Added:
-
epy:- Added:
@epy.frozenclass decorator to make class immutable
- Added:
-
edc:- Added: Attributes of
@edc.dataclasscan be annotated withx: edc.AutoCast[T](for auto-normalization).
- Added: Attributes of
-
ecolab:- Added:
ecolab.clear_cached_modulesto reload modules (useful for interactive development) - Added:
etils.lazy_importssupports multi-import (e.g. usingconcurrentalso triggerconcurrent.futuresimport).
- Added:
- Python
Published by github-actions[bot] over 3 years ago
https://github.com/google/etils - 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 mutate
builtinsmodule for example.
- Added:
-
edc:- Changed:
.replaceonly added once (not in subclasses).
- Changed:
- Python
Published by github-actions[bot] over 3 years ago
https://github.com/google/etils - v0.7.1
-
ecolab: Addeddataclass_arrayto lazy_imports.
- Python
Published by github-actions[bot] over 3 years ago
https://github.com/google/etils - v0.7.0
-
array_types:- Added: More array types:
complex64,... - Added: An experimental
array_types.dtypes.DTypeto support more flexible dtype expression (AnyFloat, type union,...) - Changed:
FloatArray,IntArraydo supports any float, int without casting. - Changed (breaking): Array dtypes (e.g. (
f32.dtype) are nowarray_types.dtypes.DType.
- Added: More array types:
-
ecolab:- Added:
lazy_imports.print_current_importsto display the active lazy imports (e.g. to add imports before publishing a colab).
- Added:
-
epy:- Added:
epy.ContextManagerto create yield-based contextmanager class (see discussion) - Added:
epy.issubclass(likeissubclassbut does not raises error for non-types) - Added:
epy.groupby, likeitertools.groupbybut returns adict. - Added:
epy.Lines.make_blockhelper to create code blocks (function calls,...) - Fixed:
epy.StrEnumraises better error message if invalid input.
- Added:
-
epath- Added:
epath.DEFINE_pathforabsl.flagssupport - Changed (breaking): Recursive glob (
rglob,glob('**/')) now raise an error rather than being silently ignored. - Changed:
path.as_uri()returnsgs://ands3://(rather thanfile:///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_arraysutil to dynamically validate array dtype/shape from typing annotations. - Added:
enp.linalg.normalizeutil. - Added:
enp.project_onto_vectorandenp.project_onto_planegeometry utils.
- Added:
- Other:
- Added: Guide on API design principles.
- Python
Published by github-actions[bot] over 3 years ago
https://github.com/google/etils - v0.6.0
epath:- Remove TensorFlow dependency from
epath.Pathby default. (For now accessinggs://still require TF to be installed). - Add
epath.testing.mock_epathto mock GCS calls.
- Remove TensorFlow dependency from
epy.testing:- Add
epy.testing.subtestfor better subtests support. - Add
epy.testing.non_hermeticto mark non-hermetic tests.
- Add
oss-kit:pypi-auto-publishGitHub action for automated PyPI and GitHub releases
- Python
Published by github-actions[bot] over 3 years ago