{ "info": { "author": "Justin Bayer", "author_email": "bayer.justin@googlemail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: BSD License", "Topic :: Utilities" ], "description": "Alchemy\n=======\n\nAlchemy is a tool that eases running jobs like scientific experiments that \ndiffer minimally in configuration. Features include:\n\n - Multiprocessor support, \n - nice handling of standard output and standard error of your job,\n - nice handling of directory structure so that you don't have to take\n care of that in your job functions.\n\nAlchemy requires two things to get started. First, you need to define a function\nthat actually does what you want. Then you will need a configuration file (we\nuse yaml for this) where you put the parametrizations of your experiments. You\ncan then fire off your experiments with\n\n $ python alchemy.py -c config.yaml\n\nExperiments will typically only differ slightly. For example, you might want to\nrun a simulation on the moon with a gravitation value of 1.63 and on the earth \nwith a gravitation value of 9.81.\n\nSay you have a function \"rocket\" in your module \"vehicles\" of package \n\"machines\". You want to run two experiments, one letting it start from earth and\none where it goes off from the moon. Your rocket has the name \"rockstar\" and you\nwant it to be exactly 3 meters long. You would then define the following yaml \ndocument.\n\n---\nfunction: machines.vehicles.rocket\nname: rockstar\nlength: 3.0\n?: [{gravity: 9.81}.\n {gravity: 1.63}]\n...\n\nThis resembles exactly two experiments. The question mark symbol tells alchemy\nthat you want to run one experiment for each of the values of the list. Thus, it\nwill result in the following dictionaries.\n\nThe first one will be for earth:\n\n {'function': 'machines.vehicles.rocket', \n 'name': 'rockstar', \n 'length': 3.0, \n 'gravity': 9.81}\n\nwhile the second one will be for the moon:\n\n {'function': 'machines.vehicles.rocket', \n 'name': 'rockstar', \n 'length': 3.0, \n 'gravity': 1.63}\n\nAlchemy will generate the crossproduct of all varying values. So if you have \nmultiple ?'s in your yaml file, all possible values for all ?'s will be \ncombined.\n\nBut how exactly is your function called? Alchemy retrieves the value of the \nfield 'function' and looks that object up on the PYTHONPATH. It the removes\nthe 'function' field, and feeds the resulting dictionary as keyword arguments\ninto your function. The code would be roughly something like this:\n\n from machines.vehicles import rocket\n rocket(name='rockstar', length=3.0, gravity=1.63)\n\nIf you are interested in creating more sophisticated configuration files,\nyou can use all stuff that PyYaml can process. Check out http://pyyaml.org/.\n\n\nOutputs of experiments\n----------------------\n\nAlchemy uses Python's very own `uuid` module to generate a unique identifier\nfor your experiment. It will then make a directory of that identifier and\nfor each job of your experiment (if you have no varying values, that will be 1)\na separate subdirectory with an increasing number is generated. \n\nThe id will be printed out when you start alchemy.\n\nBefore your function is executed, the Python interpreter will switch into that\ndirectory. Thus, if you use relative paths in your function, you can make sure\nthat all your output files fall into that directory.\n\nFurthermore, a file `stdout` and a file `stderr` will be created into which the\ncorresponding streams will be redirected. Also, the actual configuration used\nwill be saved into `config.yaml` for future reference.\n\n\nUsing multiple processors\n-------------------------\n\nPython's `multiprocessing` package is used to make use of multi processor \nsystems. You can specify the number of processes used with the `-p` option. It\ndefaults to one processor.\n\n\nLimitations\n-----------\n\n- No supports for cluster\n- Using combinations of varying values other than the cross product", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "UNKNOWN", "keywords": "science experiments job batch", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "alchemy", "package_url": "https://pypi.org/project/alchemy/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/alchemy/", "project_urls": { "Download": "UNKNOWN", "Homepage": "UNKNOWN" }, "release_url": "https://pypi.org/project/alchemy/0.0.1/", "requires_dist": null, "requires_python": null, "summary": "job processing", "version": "0.0.1" }, "last_serial": 278091, "releases": { "0.0.1": [] }, "urls": [] }