PyGlove: A library for manipulating Python objects.
Project description
PyGlove
PyGlove is a general-purpose library for Python object manipulation. It is mainly used to handle complex machine learning scenarios such as AutoML. It also has been used in daily programming tasks, with no dependencies beyond the Python interpreter.
It provides:
- A mutable symbolic object model for Python;
- A rich set of operations for Python object manipulation;
- An easy-to-use API to automatically search for better Python programs;
- A framework for developing search algorithms;
- An API to interface with any distributed infrastructure.
It has been used in:
- Machine learning for large teams (code sharing, hparam management);
- Automated machine learning (AutoML);
- Evolutionary computing;
- Enhancing productivity and flexibility for general-purpose programs in Python.
PyGlove's method for AutoML was published at NeurIPS 2020. It has been widely used within Alphabet since 2019, including Google Research, Google Cloud, Youtube, Waymo and etc.
PyGlove is developed by Daiyi Peng and his colleagues in Google Brain.
Install
pip install pyglove
Hello PyGlove
import pyglove as pg
@pg.symbolize
class Hello:
def __init__(self, subject):
self._greeting = f'Hello, {subject}!'
def greet(self):
print(self._greeting)
hello = Hello('World')
hello.greet()
Hello, World!
hello.rebind(subject='PyGlove')
hello.greet()
Hello, PyGlove!
hello.rebind(subject=pg.oneof(['World', 'PyGlove']))
for h in pg.iter(hello):
h.greet()
Hello, World!
Hello, PyGlove!
Citing PyGlove
@article{peng2020pyglove,
title={PyGlove: Symbolic programming for automated machine learning},
author={Peng, Daiyi and Dong, Xuanyi and Real, Esteban and Tan, Mingxing and Lu, Yifeng and Bender, Gabriel and Liu, Hanxiao and Kraft, Adam and Liang, Chen and Le, Quoc},
journal={Advances in Neural Information Processing Systems},
volume={33},
pages={96--108},
year={2020}
}
Disclaimer: this is not an officially supported Google product.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pyglove-0.1.0a0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b38b4d9c221bd07e9a58f195df5e878ffd71b1797a020a3380c7f4626bf8f6a6 |
|
MD5 | 5cf57de6dbd283f7ccf18df78aaf9011 |
|
BLAKE2b-256 | 56344237bdc8ea31946b04314836b6614f8fb2d705ef595eb386544d7d2c4534 |