from sspace import Space, either, eq
import json
space = Space(backend='ConfigSpace')
optim = space.categorical('optimizer', ['sgd', 'adam'])
sgd_lr = space.loguniform('optimizer.lr', 1, 2, quantization=0.01)
sgd_lr.enable_if(either(eq(optim, 'adam'), eq(optim, 'sgd')))
sgd_lr.forbid_equal(1)
for sample in space.sample(2):
print(sample)
print(json.dumps(space.serialize(), indent=2))
Metadata
Release files for sspace 0.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sspace-0.0.0.tar.gz | 32.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sspace-0.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 47.9 kB
Release files / sspace-0.0.0.tar.gz
| Download URL | sspace-0.0.0.tar.gz |
|---|---|
| Size | 32.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
33b216581ca69b0378b625e0ba5cc74837bba0427ec524eacb3b3e63333a74ed
|
|
BLAKE2b-256 checksum How to use checksums |
432d7b5eead81020b3e4e6afda26114338e1bcfbca7083832f46b280e9485d01
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
|
Release files / sspace-0.0.0-py3-none-any.whl
| Download URL | sspace-0.0.0-py3-none-any.whl |
|---|---|
| Size | 15.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
de4957a2f6b1619f8311fdcbea74eea53d36d6ebc02f7eed795786f3d01b2f6f
|
|
BLAKE2b-256 checksum How to use checksums |
5480b20ab3ba658ac1c10f9167e6a767be2476f96bc3f50ee990201a51964c14
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
|