Easy parameter space evaluation and serial farming.
Project description
Psyrun
Psyrun is a Python tool to define parameter spaces and execute an evaluation function for each parameter assignment. In addition Psyrun makes it easy to use serial farming, i.e. evaluating multiple parameter assignments in parallel, on a multicore computers and high-performance clusters.
Documentation
Overview
Define parameter spaces and evaluate them:
from psyrun import map_pspace, Param
def objective(a, b, c):
return a * b + c
pspace = (Param(a=np.arange(1, 5))
* Param(b=np.linspace(0, 1, 10))
* Param(c=[1., 1.5, 10., 10.5]))
results = map_pspace(objective, pspace)
Or do it in parallel:
from psyrun import map_pspace_parallel
results = map_pspace_parallel(objective, pspace)
Define tasks by placing task_<name>.py files in the psy-tasks` directory:
from psyrun import Param
pspace = (Param(a=np.arange(1, 5))
* Param(b=np.linspace(0, 1, 10))
* Param(c=[1., 1.5, 10., 10.5]))
def execute(a, b, c):
return {'result': a * b + c}
and run them by typing psy run with support for serial farming on high performance clusters.
Installation
pip install psyrun
To be able to use the NPZ store:
pip install numpy pip install 'psyrun[npz]'
To be able to use the HDF5 store:
pip install numpy pip install 'psyrun[h5]'
Requirements
Optional requirements
To have faulthandler activated for jobs submitted with psy run in Python 2.7:
Python 3.4+ already includes the faulthandler module.
To use map_pspace_parallel:
To use NPZ files as store:
To use HDF5 files as store:
To run the unit tests:
To build the documentation:
Changes
0.5
Initial release
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
File details
Details for the file psyrun-0.5.tar.gz
.
File metadata
- Download URL: psyrun-0.5.tar.gz
- Upload date:
- Size: 42.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf703205be5b6691868958153ad8a278b704b3e094ee4192063dee1ab4995d35 |
|
MD5 | da44f75c57465b2d9222510e17badf1b |
|
BLAKE2b-256 | a1c68fcadf33613833ea544f59707e9ff4eed912baceb18d8a03bdd069484f9a |