Skip to content

Commit 7c00618

Browse files
author
Daniel Mann
committed
update workflow
1 parent eab89da commit 7c00618

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

.github/workflows/unit_tests.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ on:
99
- main
1010
jobs:
1111
test-jobs:
12-
runs-on: ubuntu-latest
12+
runs-on:
13+
group: tj-runner-group
14+
labels: tj-runners
1315
steps:
1416
- uses: actions/checkout@v4
1517
with:
@@ -23,4 +25,4 @@ jobs:
2325
pip install -r requirements.txt
2426
- name: Test Ops
2527
run: |
26-
python -m unittest -v test
28+
python -m unittest -s discover -s test -v

test/test_fast_viterbi.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def test_best_sequence(self):
1414
[0.1, 0.9],
1515
[0.1, 0.9],
1616
], device="cuda", dtype=torch.float32)
17-
.unsqueeze(1)
17+
.unsqueeze(0)
1818
.log()
1919
)
2020
edges = (
@@ -33,8 +33,7 @@ def test_best_sequence(self):
3333
fsa = (2, edges, weights, start_end_states)
3434

3535
output, scores = align_viterbi(log_probs, fsa, seq_lens)
36-
best_sequence = list(output[:,0])
37-
score = float(scores[0])
36+
best_sequence = list(output[0,:])
3837

3938
self.assertEqual(best_sequence, [0, 0, 1, 1, 1])
4039

test/test_fbw2.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import itertools
2-
import gc
32
import unittest
43
import torch
54

0 commit comments

Comments
 (0)