Skip to content

Commit ef1c655

Browse files
committed
Let's build the usage histograms automatically.
1 parent ea63ef9 commit ef1c655

File tree

3 files changed

+29
-4
lines changed

3 files changed

+29
-4
lines changed

.github/workflows/validation_run_trigger.yaml

+22-4
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@ on:
66
- 'evaluation_runs.sql'
77
- 'inferences.sql'
88
- 'charts.py'
9+
- 'context_snapshots.sql'
10+
- 'context_usage.sql'
911
- '.github/workflows/validation_run_trigger.yaml'
1012
pull_request:
1113
paths:
1214
- 'evaluation_runs.sql'
1315
- 'inferences.sql'
1416
- 'charts.py'
17+
- 'context_snapshots.sql'
18+
- 'context_usage.sql'
1519
- '.github/workflows/validation_run_trigger.yaml'
1620

1721
jobs:
@@ -28,13 +32,25 @@ jobs:
2832
run: sqlite3 inferences.sqlite < evaluation_runs.sql
2933

3034
- name: Restore inferences
31-
run: sqlite3 inferences.sqlite < inferences.sql
35+
run: sqlite3 inferences.sqlite < inferences.sql
36+
37+
- name: Restore context snapshots
38+
run: sqlite3 inferences.sqlite < context_snapshots.sql
39+
40+
- name: Restore details of context usage
41+
run: sqlite3 inferences.sqlite < context_usage.sql
3242

3343
- name: Run charts.py
34-
run: python charts.py
44+
run: python3 charts.py
3545

3646
- name: Run neural-results-chart.py
37-
run: python neural-results-chart.py --input neural-results.csv --output neural-results.png
47+
run: python3 neural-results-chart.py --input neural-results.csv --output neural-results.png
48+
49+
- name: Run context history for sense1
50+
run: python3 ctxkhistochart.py --input inferences.sqlite --output sense-annotated1-context-usage.png --filename /ultratree/language-model/sense-annotated1.sqlite
51+
52+
- name: Run context history for unannotated1
53+
run: python3 ctxkhistochart.py --input inferences.sqlite --output unannotated-context-usage.png --filename /ultratree/language-model/unannotated-model1.sqlite
3854

3955
- name: Commit and Push Changes
4056
env:
@@ -53,6 +69,8 @@ jobs:
5369
git add noun_loss_vs_time.png
5470
git add neural-results.png
5571
git add plain_models_loss_vs_size.png
56-
git add exotic_models_loss_vs_size.png
72+
git add exotic_models_loss_vs_size.png
73+
git add sense-annotated1-context-usage.png
74+
git add unannotated-context-usage.png
5775
git commit -m "Add generated images [skip ci]" || echo "No changes to commit"
5876
git push https://${{ secrets.GH_PAT }}@github.com/${{ github.repository }}.git

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -162,3 +162,4 @@ cython_debug/
162162
#.idea/
163163
inferences.sqlite
164164
validation.sqlite
165+
*~

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ To-do: if the ensemble looks good, add it to the chart
4242

4343
![Average In-Region Hits vs Time](average_in_region_hits_vs_time.png)
4444

45+
## Context Usage
46+
47+
![Sense Annotated](sense-annotated1-context-usage.png)
48+
49+
![Unannotated](unannotated-context-usage.png)
50+
4551

4652
# How to reproduce these results
4753

0 commit comments

Comments
 (0)