resolved ModuleNotFoundError
This commit is contained in:
parent
141680e3a1
commit
19503e3d32
|
|
@ -1,15 +1,14 @@
|
|||
demos
|
||||
SimCAD
|
||||
simularions
|
||||
setup.py
|
||||
build
|
||||
|
||||
.idea
|
||||
.ipynb_checkpoints
|
||||
.DS_Store
|
||||
.idea
|
||||
SimCAD.egg-info
|
||||
__pycache__
|
||||
Pipfile
|
||||
Pipfile.lock
|
||||
results
|
||||
.mypy_cache
|
||||
.mypy_cache
|
||||
*.csv
|
||||
*.txt
|
||||
simulations/.ipynb_checkpoints
|
||||
|
||||
build
|
||||
SimCAD.egg-info
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
import pandas as pd
|
||||
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 SimCAD import configs
|
||||
|
||||
exec_mode = ExecutionMode()
|
||||
|
||||
|
||||
print("Simulation Execution 1")
|
||||
print()
|
||||
first_config = [configs[0]] # from config1
|
||||
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'))
|
||||
print("Output:")
|
||||
print(tabulate(result, headers='keys', tablefmt='psql'))
|
||||
print()
|
||||
|
||||
print("Simulation Execution 2: Pairwise Execution")
|
||||
print()
|
||||
multi_proc_ctx = ExecutionContext(context=exec_mode.multi_proc)
|
||||
run2 = Executor(exec_context=multi_proc_ctx, configs=configs)
|
||||
for raw_result, tensor_field in run2.main():
|
||||
result = pd.DataFrame(raw_result)
|
||||
print()
|
||||
print("Tensor Field:")
|
||||
print(tabulate(tensor_field, headers='keys', tablefmt='psql'))
|
||||
print("Output:")
|
||||
print(tabulate(result, headers='keys', tablefmt='psql'))
|
||||
print()
|
||||
137
demos/test.ipynb
137
demos/test.ipynb
|
|
@ -1,137 +0,0 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"collapsed": true
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import pandas as pd\n",
|
||||
"\n",
|
||||
"# The following imports NEED to be in the exact order\n",
|
||||
"from SimCAD.engine import ExecutionMode, ExecutionContext, Executor\n",
|
||||
"from simulations.validation import config1, config2\n",
|
||||
"from SimCAD import configs\n",
|
||||
"\n",
|
||||
"exec_mode = ExecutionMode()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"print(\"Simulation Execution 1\")\n",
|
||||
"print()\n",
|
||||
"first_config = [configs[0]] # from config1\n",
|
||||
"single_proc_ctx = ExecutionContext(context=exec_mode.single_proc)\n",
|
||||
"run1 = Executor(exec_context=single_proc_ctx, configs=first_config)\n",
|
||||
"run1_raw_result, raw_tensor_field = run1.main()\n",
|
||||
"result = pd.DataFrame(run1_raw_result)\n",
|
||||
"tensor_field = pd.DataFrame(raw_tensor_field)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"print(\"Tensor Field:\")\n",
|
||||
"tensor_field"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"print(\"Output:\")\n",
|
||||
"result"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"print(\"Simulation Execution 2: Pairwise Execution\")\n",
|
||||
"print()\n",
|
||||
"multi_proc_ctx = ExecutionContext(context=exec_mode.multi_proc)\n",
|
||||
"run2 = Executor(exec_context=multi_proc_ctx, configs=configs)\n",
|
||||
"results = []\n",
|
||||
"tensor_fields = []\n",
|
||||
"for raw_result, raw_tensor_field in run2.main():\n",
|
||||
" results.append(pd.DataFrame(raw_result))\n",
|
||||
" tensor_fields.append(pd.DataFrame(raw_tensor_field))"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"\n",
|
||||
"print(\"Tensor Field A:\")\n",
|
||||
"tensor_fields[0]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"print(\"Output A:\")\n",
|
||||
"results[0]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"print(\"Tensor Field B:\")\n",
|
||||
"tensor_fields[1]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"print(\"Output B:\")\n",
|
||||
"results[1]"
|
||||
]
|
||||
}
|
||||
],
|
||||
"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
|
||||
}
|
||||
4
setup.py
4
setup.py
|
|
@ -1,4 +1,4 @@
|
|||
from setuptools import setup
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
long_description = "SimCAD is a differential games based simulation software package for research, validation, and \
|
||||
Computer Aided Design of economic systems. An economic system is treated as a state based model and defined through \
|
||||
|
|
@ -19,5 +19,5 @@ setup(name='SimCAD',
|
|||
author='Joshua E. Jodesty',
|
||||
author_email='joshua@block.science',
|
||||
license='licenses',
|
||||
packages=['SimCAD']
|
||||
packages=find_packages() #['SimCAD']
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,13 +1,11 @@
|
|||
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 config_1, config_2
|
||||
from simulations.validation import config1, config2
|
||||
from SimCAD import configs
|
||||
|
||||
# ToDo: pass ExecutionContext with execution method as ExecutionContext input
|
||||
|
||||
exec_mode = ExecutionMode()
|
||||
|
||||
|
||||
|
|
@ -18,7 +16,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)
|
||||
# result.to_csv('~/Projects/DiffyQ-SimCAD/results/config4.csv', sep=',')
|
||||
print()
|
||||
print("Tensor Field:")
|
||||
print(tabulate(tensor_field, headers='keys', tablefmt='psql'))
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue