Skip to content

Commit d5f236d

Browse files
mattephisimeon-nedlvjonok
authored
Migrate to new translation function (#18)
* feat: optimisiing comp graph * feat: graph tranlsation * Feat/pendulum rollout example (#9) * added pendulum rollout as example * fixed README * fix: rebase * Update README.md Added hyperlink for landing * fix: update branch for colab benchmark * added demo notebook (#13) * added demo notebook * minor readme change * fix: rebase * fix: rebase and fix tests * fix: pre-commit * feat: graph expansion * fix: benchmarks for more powers * fix: disable graph compression * fix: densify structural zeros * fix: adaprive dimensionality #16 * fix: translate as graph_translate * feat: test expand, docs * feat: test examples * fix: exclude running examples from workflow * fix: remove ast debug files * fix: organize imports * fix: ops fix * fix: update plots for graph translation * fix: add plots to website --------- Co-authored-by: Simeon Nedelchev <[email protected]> Co-authored-by: Lev Kozlov <[email protected]>
1 parent 59316b8 commit d5f236d

24 files changed

+1186
-174
lines changed

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
python -m pip install --upgrade pip
3939
pip install -e .[dev]
4040
- name: Run tests
41-
run: python -m pytest
41+
run: python -m pytest --ignore=tests/test_examples.py
4242

4343
deploy:
4444
runs-on: ubuntu-latest
-1.45 KB
Binary file not shown.
-1.45 KB
Binary file not shown.

benchmarks/run_benchmark.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
class Paths:
1818
FUNCTIONS_DIR = os.path.join(cur_dir, "data")
1919
OUTPUT_DIR = cur_dir
20-
RUN_CUSADI = False
20+
RUN_CUSADI = True
2121

2222

2323
class ColabPaths:
@@ -43,11 +43,11 @@ class ColabPaths:
4343

4444
torch.manual_seed(0)
4545

46-
N_ENVS_SWEEP = [2**i for i in range(21)]
47-
N_EVALS = 20
46+
N_ENVS_SWEEP = [2**i for i in range(15)]
47+
N_EVALS = 10
4848

4949
# Load functions for CUDA benchmarking
50-
fn_files = ["fn_1e1.casadi", "fn_1e2.casadi"]
50+
fn_files = ["fn_1e1.casadi", "fn_1e2.casadi", "fn_1e3.casadi", "fn_1e4.casadi"]
5151
benchmark_fns = [Function.load(os.path.join(PathsProvider.FUNCTIONS_DIR, fn)) for fn in fn_files]
5252

5353

benchmarks/visualize.ipynb

Lines changed: 176 additions & 12 deletions
Large diffs are not rendered by default.

docs/index.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,12 @@ <h2 class="title is-3">Benchmarks</h2>
166166
<div class="item item-chair-tp">
167167
<img src="./static/images/compare_1e2_bar.png"/>
168168
</div>
169+
<div class="item item-chair-tp">
170+
<img src="./static/images/compare_1e3_bar.png"/>
171+
</div>
172+
<div class="item item-chair-tp">
173+
<img src="./static/images/compare_1e4_bar.png"/>
174+
</div>
169175
<div class="item item-steve">
170176
<img src="./static/images/speedup_ratio.png"/>
171177
</div>
9.22 KB
Loading
3.19 KB
Loading
32.1 KB
Loading
29.6 KB
Loading

0 commit comments

Comments
 (0)