Skip to content

Commit d8b3660

Browse files
committed
Fix automation errors
1 parent dd8bc9f commit d8b3660

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

.github/workflows/publish.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ jobs:
5050
env:
5151
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
5252
run: |
53+
sleep 5m # wait for all the PyPi servers to be updated with the latest version of torch-hd
54+
5355
mkdir ./conda-build # create the artifact dir
5456
5557
# Get the version of the library

torchhd/tests/structures/test_sequence.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,11 @@ def test_replace(self):
120120
assert functional.cosine_similarity(S[2], hv)[2] < 0.35
121121
assert functional.cosine_similarity(S[2], hv)[6] > 0.35
122122

123-
hv1 = functional.random_hv(10, 10000)
124-
S2 = structures.BundleSequence.from_tensor(hv1)
125-
assert functional.cosine_similarity(S2[2], hv1)[2] > 0.3
126-
S2.replace(2, hv1[2], hv1[6])
127-
assert functional.cosine_similarity(S2[2], hv1)[2] < 0.3
128-
assert functional.cosine_similarity(S2[2], hv1)[6] > 0.3
123+
S2 = structures.BundleSequence.from_tensor(hv[:7])
124+
assert functional.cosine_similarity(S2[2], hv)[2] > 0.35
125+
S2.replace(2, hv[2], hv[6])
126+
assert functional.cosine_similarity(S2[2], hv)[2] < 0.35
127+
assert functional.cosine_similarity(S2[2], hv)[6] > 0.35
129128

130129
def test_concat(self):
131130
generator = torch.Generator()

0 commit comments

Comments
 (0)