ABSL-Extra
A collection of utils I commonly use for running my experiments. It will:
- Notify on execution start, finish or failed.
- By default, Notifier will just log those out to
stdout. - I prefer receiving those in Slack, though (see example below).
- By default, Notifier will just log those out to
- Log parsed CLI flags from
absl.flags.FLAGSand config values fromconfig_file:get_config() - Select registered task to run based on --task= CLI argument.
Minimal example
import os
from absl import logging
import tensorflow as tf
from absl_extra import tf_utils, tasks, notifier
@tasks.register_task(
notifier=notifier.SlackNotifier(slack_token=os.environ["SLACK_BOT_TOKEN"], channel_id=os.environ["CHANNEL_ID"])
)
@tf_utils.requires_gpu
def main() -> None:
if tf_utils.supports_mixed_precision():
tf.keras.mixed_precision.set_global_policy("mixed_float16")
with tf_utils.make_gpu_strategy().scope():
logging.info("Doing some heavy lifting...")
if __name__ == "__main__":
tasks.run()
flax_utils.py
- Common utilities used for training flax models, which I got tired of copy-pasting in every project.
Metadata
Release files for absl-extra 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| absl_extra-0.1.3.tar.gz | 13.7 kB | Without provenance | Details for absl_extra-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| absl_extra-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for absl_extra-0.1.3-py3-none-any.whl |
Total release size: 30.2 kB
Release files / absl_extra-0.1.3.tar.gz
| Download URL | absl_extra-0.1.3.tar.gz |
|---|---|
| Size | 13.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c1bc927febee852a40193763d4453632fb74c482fb0c5faf34e19a56e2cb6009
|
|
BLAKE2b-256 checksum How to use checksums |
73bde340ca0f2fde4912f9710d10bf83e209711952abdd8ab99e95f3e3a6f989
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / absl_extra-0.1.3-py3-none-any.whl
| Download URL | absl_extra-0.1.3-py3-none-any.whl |
|---|---|
| Size | 16.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ab974a2ba40a9a515b8f20ba14955e5bda38ee55655b23e5ad6cf2ed2a562358
|
|
BLAKE2b-256 checksum How to use checksums |
e613eec46f949977dcf25dcb5d67c594bf01af0d1a4881ae7f70fbff2353b43c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Security for absl-extra 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.