This commit is contained in:
Joshua E. Jodesty 2019-01-11 11:00:47 -05:00
parent 06de968a60
commit 9a7af89691
6 changed files with 8 additions and 14 deletions

1
.gitignore vendored
View File

@ -9,6 +9,7 @@ results
*.csv
*.txt
simulations/.ipynb_checkpoints
dist/SimCAD-0.1.tar.gz
build
SimCAD.egg-info

View File

@ -19,7 +19,7 @@ A/B testing policies, monte carlo analysis and other common numerical methods is
**1. Install Dependencies:**
```bash
pip install -r requirements.txt
pip install -e .
python3 setup.py sdist bdist_wheel
```
**2. Configure Simulation:**
@ -33,25 +33,19 @@ Examples:
**3. Import SimCAD & Run Simulation:**
Example:
`/demos/sim_test.py` or `test.ipynb`
`/simulations/sim_test.py` or `/simulations/test.ipynb`
```python
import pandas as pd
from tabulate import tabulate
# The following imports NEED to be in the exact same order
# The following imports NEED to be in the exact order
from SimCAD.engine import ExecutionMode, ExecutionContext, Executor
from simulations.validation import config1, config2
from validation import config1, config2
from SimCAD import configs
# ToDo: pass ExecutionContext with execution method as ExecutionContext input
exec_mode = ExecutionMode()
print("Simulation Execution 1")
print()
first_config = [configs[0]] # from config1
@ -59,7 +53,6 @@ single_proc_ctx = ExecutionContext(context=exec_mode.single_proc)
run1 = Executor(exec_context=single_proc_ctx, configs=first_config)
run1_raw_result, tensor_field = run1.main()
result = pd.DataFrame(run1_raw_result)
print()
print("Tensor Field:")
print(tabulate(tensor_field, headers='keys', tablefmt='psql'))

Binary file not shown.

BIN
dist/SimCAD-0.1.tar.gz vendored

Binary file not shown.

View File

@ -3,12 +3,11 @@ from tabulate import tabulate
# The following imports NEED to be in the exact order
from SimCAD.engine import ExecutionMode, ExecutionContext, Executor
from simulations.validation import config1, config2
from validation import config1, config2
from SimCAD import configs
exec_mode = ExecutionMode()
print("Simulation Execution 1")
print()
first_config = [configs[0]] # from config1
@ -34,4 +33,4 @@ for raw_result, tensor_field in run2.main():
print(tabulate(tensor_field, headers='keys', tablefmt='psql'))
print("Output:")
print(tabulate(result, headers='keys', tablefmt='psql'))
print()
print()

View File

@ -7,6 +7,7 @@
"outputs": [],
"source": [
"import pandas as pd\n",
"from tabulate import tabulate\n",
"\n",
"# The following imports NEED to be in the exact order\n",
"from SimCAD.engine import ExecutionMode, ExecutionContext, Executor\n",