Skip to content

Commit

Permalink
add compiler, filtering, new plots [tmlr revision]
Browse files Browse the repository at this point in the history
  • Loading branch information
bheijden committed Mar 28, 2024
1 parent 4e0b8bb commit 6cb05c4
Show file tree
Hide file tree
Showing 28 changed files with 6,172 additions and 1,541 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ jobs:
- name: Check codestyle
run: |
make check-codestyle
- name: Lint with flake8
run: |
make lint
# - name: Lint with flake8
# run: |
# make lint
#----------------------------------------------
# add matrix specifics and run test suite
#----------------------------------------------
Expand Down
Binary file not shown.
256 changes: 256 additions & 0 deletions notebooks/code_example.ipynb

Large diffs are not rendered by default.

1,025 changes: 1,025 additions & 0 deletions notebooks/compiler.ipynb

Large diffs are not rendered by default.

239 changes: 0 additions & 239 deletions notebooks/paper.ipynb

This file was deleted.

1,159 changes: 617 additions & 542 deletions poetry.lock

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "supergraph"
version = "0.0.6"
version = "0.0.8"
license = "Apache2.0"
description = "Supergraph compiler"
authors = ["bheijden <b.heijden@hotmail.com>"]
Expand Down Expand Up @@ -30,9 +30,13 @@ ipywidgets = { version = "^8.0.7", optional = true }
#jupyter = "^1.0.0"
#jupyterlab = "^4.0.3"
#ipywidgets = "^8.0.7"
#jax = { version = "0.4.13", optional = true }
#flax = { version = "0.7.2", optional = true }
#tensorflow-probability = { version = "0.21.0", optional = true }
#brax = { version = "0.9.4", optional = true }

[tool.poetry.extras]
paper = ["matplotlib", "seaborn"]
paper = ["matplotlib", "seaborn"]#, "jax", "flax", "tensorflow-probability", "brax"]
experiments = ["wandb", "matplotlib", "jupyter", "jupyterlab", "ipywidgets", "dill", "pandas"]

[tool.poetry.dev-dependencies]
Expand Down
Binary file added scripts/df_5169bcd50ee7b580c719432598541572.pkl
Binary file not shown.
Binary file not shown.
28 changes: 14 additions & 14 deletions scripts/evaluate_graphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,35 @@
import yaml
import datetime

# Graph inputs
TOPOLOGY_TYPE = ["unidirectional-ring", "bidirectional-ring", "unirandom-ring"]
FREQUENCY_TYPE = ["linear"]
# TOPOLOGY_TYPE = ["unirandom-ring", "bidirectional-ring", "unidirectional-ring"]
TOPOLOGY_TYPE = ["v2v-platooning", "uav-swarm-control"]
FREQUENCY_TYPE = [20] # "linear", "proportional", or a fixed number
MAX_FREQ = [200]
WINDOW = [0]
WINDOW = [1]
LEAF_KIND = [0]
EPISODES = [20]
LENGTH = [100]
NUM_NODES = [32] # [2, 4, 8, 16, 32] # , 64]
SIGMA = [0.1] # [0, 0.1, 0.2, 0.3]
EPISODES = [10]
LENGTH = [10]
NUM_NODES = [2, 4, 8, 16, 32, 64] # todo: generate graphs for 2 nodes # [2, 4, 8, 16, 32, 64] # , 64]
SIGMA = [0., 0.1, 0.2, 0.3] # [0, 0.1, 0.2, 0.3] # [0, 0.1, 0.2, 0.3]
THETA = [0.07]
SCALING_MODE = ["after_generation"]
SEED = [0, 1, 2, 3, 4]

# Algorithm inputs
SUPERGRAPH_TYPE = ["mcs"]# , "topological", "generational", "sequential"]
SUPERGRAPH_TYPE = ["mcs", "topological", "generational"]#, "sequential"]
COMBINATION_MODE = ["linear"] #, power]
SORT_MODE = ["arbitrary"]#, "optimal"]
BACKTRACK = [0, 10, 15, 20]
BACKTRACK = [20] # [0, 10, 15, 20]

# Logging inputs
MUST_LOG = False
MULTIPROCESSING = True
WORKERS = 6
MUST_LOG = True # todo:
MULTIPROCESSING = True # todo:
WORKERS = 12
os.environ["WANDB_SILENT"] = "true"
DATA_DIR = "/home/r2ci/supergraph/data"
PROJECT = "supergraph"
SYNC_MODE = "offline"
GROUP = f"backtrack-32-0.1-evaluation-{datetime.datetime.today().strftime('%Y-%m-%d-%H%M')}" # todo: adjust name
GROUP = f"cps-all-noablation-evaluation-{datetime.datetime.today().strftime('%Y-%m-%d-%H%M')}" # todo: adjust name


def progress_fn(run, Gs_num_nodes, t_final, t_elapsed, Gs_num_partitions, Gs_matched, i_partition, G_monomorphism, G, S):
Expand Down
Loading

0 comments on commit 6cb05c4

Please sign in to comment.