Skip to content

Commit 04a2c9c

Browse files
committed
preparing for phase 1 run, fixing config params
1 parent b2ea0e7 commit 04a2c9c

3 files changed

Lines changed: 13 additions & 47 deletions

File tree

docs/kimon_updates.md

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -275,28 +275,6 @@ We have 48 tests cases validating the folloiwing:
275275
- Edge cases with extreme parameter values
276276

277277

278-
## Issues to be resolved
279-
280-
1. Grid size for HPC run
281-
2. Number of replicates for statistal power
282-
3. Directed and/or undirected runs
283-
4. Evolving and non-evolving runs?
284-
5. Mean field baseline or non evolving basiline
285-
6. Warmup period and measurement steps (i.e how many steps do we need to avoid init bias?)
286-
7. Measurement frequency for statistical accuracy
287-
8. Default parameters (Need Storm's input on this one).
288-
289-
Options:
290-
291-
1. Asymmetric repliates for non-evolving runs
292-
2. Coarse initial parameter sweep grid
293-
3. Discard non-evo runs and use mean field baseline instead or the opposite
294-
295-
NOTE:
296-
297-
Warmup and Measurement time must be scaled according to grid size. We need to write a method to estimate the approximate simulaiton time required. (Sary is working on that.)
298-
299-
300278
## Updates (25/1)
301279

302280

@@ -306,14 +284,4 @@ Refactored ```experiments.py``` according to ```experiments.md```. Phase 4 and P
306284

307285
- Phase 6: Will implement if all the other phases pass successfully.
308286

309-
TODO: We need to start drafting a proper version of the analyis (```analysis.py```) for postprocessing of all the data we are currenlty collecting and plotting utilities to visualize them.
310-
311-
312-
313-
314-
315-
316-
317-
318-
319-
287+
TODO: We need to start drafting a proper version of the analyis (```analysis.py```) for postprocessing of all the data we are currenlty collecting and plotting utilities to visualize them.

models/config.py

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ class Config:
6666
"""Central configuration for all experiments."""
6767

6868
# Grid settings
69-
grid_size: int = 100 #FIXME: Decide default configuration
69+
grid_size: int = 1000 #FIXME: Decide default configuration
7070
densities: Tuple[float, float] = (0.30, 0.15) # (prey, predator) #FIXME: Default densities
7171

7272
# For FSS experiments: multiple grid sizes
73-
grid_sizes: Tuple[int, ...] = (50, 75, 100, 150, 200)
73+
grid_sizes: Tuple[int, ...] = (100, 200, 500, 1000)
7474

7575
# Default/fixed parameters
7676
prey_birth: float = 0.20
@@ -99,7 +99,7 @@ class Config:
9999
n_replicates: int = 15 # FIXME: Decide number of indep. runs per parameter config
100100

101101
# Simulation steps
102-
warmup_steps: int = 200 # FIXME: Steps to run before measuring
102+
warmup_steps: int = 300 # FIXME: Steps to run before measuring
103103
measurement_steps: int = 300 # FIXME: Decide measurement steps
104104

105105
# Evo
@@ -148,11 +148,11 @@ def get_prey_deaths(self) -> np.ndarray:
148148

149149
def get_warmup_steps(self, L: int) -> int: #FIXME: This method will be updated depending on Sary's results.
150150
"""Scale warmup with grid size."""
151-
return int(self.warmup_steps * (L / 100))
151+
return self.warmup_steps
152152

153153
def get_measurement_steps(self, L: int) -> int:
154154
"""Scale measurement with grid size."""
155-
return int(self.measurement_steps * (L / 100))
155+
return self.measurement_steps
156156

157157
def estimate_runtime(self, n_cores: int = 32) -> str:
158158
"""Estimate total runtime based on benchmark data."""
@@ -191,14 +191,14 @@ def estimate_runtime(self, n_cores: int = 32) -> str:
191191

192192
# Phase 1: Parameter sweep to find critical point
193193
PHASE1_CONFIG = Config(
194-
grid_size=100,
194+
grid_size=1000,
195195
n_prey_birth=15,
196196
n_prey_death=15,
197197
prey_birth_range=(0.10, 0.35),
198198
prey_death_range=(0.001, 0.10),
199199
n_replicates=15,
200-
warmup_steps=200,
201-
measurement_steps=300,
200+
warmup_steps=300,
201+
measurement_steps=1000,
202202
collect_pcf=True,
203203
pcf_sample_rate=0.2,
204204
save_timeseries=False,
@@ -237,7 +237,7 @@ def estimate_runtime(self, n_cores: int = 32) -> str:
237237
prey_death_range=(0.01, 0.10),
238238
n_replicates=20,
239239
warmup_steps=200,
240-
measurement_steps=300,
240+
measurement_steps=1000,
241241
with_evolution=True,
242242
collect_pcf=False,
243243
save_timeseries=True,
@@ -258,9 +258,7 @@ def estimate_runtime(self, n_cores: int = 32) -> str:
258258
)
259259

260260
# Phase 6: Model extensions
261-
PHASE6_CONFIG = Config(
262-
... #FIXME: Will be defined later
263-
)
261+
PHASE6_CONFIG = Config() #FIXME: Will be defined later
264262

265263
PHASE_CONFIGS = {
266264
1: PHASE1_CONFIG,

scripts/experiments.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@
4545
warnings.filterwarnings("ignore")
4646

4747
# Project imports
48-
project_root = str(Path(__file__).parent)
48+
project_root = str(Path(__file__).parent.parent)
4949
if project_root not in sys.path:
5050
sys.path.insert(0, project_root)
5151

52-
from config import Config, get_phase_config, PHASE_CONFIGS
52+
from models.config import Config, get_phase_config, PHASE_CONFIGS
5353

5454
# Numba imports
5555
try:

0 commit comments

Comments
 (0)