put back notebooks/test.ipynb
This commit is contained in:
parent
cdcc207871
commit
0eeed616e0
|
|
@ -0,0 +1,78 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"print(\"Simulation Run 2: Pairwise Execution\")\n",
|
||||
"print()\n",
|
||||
"multi_proc_ctx = ExecutionContext(exec_mode.multi_proc)\n",
|
||||
"run2 = Executor(multi_proc_ctx, configs)\n",
|
||||
"run2_raw_results = run2.main()\n",
|
||||
"for raw_result in run2_raw_results:\n",
|
||||
" result = pd.DataFrame(raw_result)\n",
|
||||
" print(tabulate(result, headers='keys', tablefmt='psql'))\n",
|
||||
"print()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"print(\"Simulation Run 1\")\n",
|
||||
"print()\n",
|
||||
"single_config = [configs[0]]\n",
|
||||
"single_proc_ctx = ExecutionContext(exec_mode.single_proc)\n",
|
||||
"run1 = Executor(single_proc_ctx, single_config)\n",
|
||||
"run1_raw_result = run1.main()\n",
|
||||
"result = pd.DataFrame(run1_raw_result)\n",
|
||||
"result"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"collapsed": true
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import pandas as pd\n",
|
||||
"from tabulate import tabulate\n",
|
||||
"\n",
|
||||
"from SimCAD.engine import ExecutionMode, ExecutionContext, Executor\n",
|
||||
"from sandboxUX import config1, config2\n",
|
||||
"from SimCAD import configs\n",
|
||||
"\n",
|
||||
"# ToDo: pass ExecutionContext with execution method as ExecutionContext input\n",
|
||||
"\n",
|
||||
"exec_mode = ExecutionMode()"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 2",
|
||||
"language": "python",
|
||||
"name": "python2"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 2
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython2",
|
||||
"version": "2.7.6"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 0
|
||||
}
|
||||
Loading…
Reference in New Issue