related-sciences / nxontology-ml

Machine learning to classify ontology nodes
Apache License 2.0
6 stars 0 forks source link

Fix flaky test #16

Closed yonromai closed 1 year ago

yonromai commented 1 year ago

Context:

I recently realized that the test nxontology_ml/text_embeddings/tests/text_embeddings_transformer_test.py::test_end_to_end has been making the build flaky (on the linux GH actions VMs, not MacOS).

It turns out that I can't manage to seed the LDA and PCA models to give the same results on Linux as on MacOS. Given that the dimensionality reduction is ran on 10 nodes in the test, it seems okay to just check that the dimensions of the resulting vectors match the expected ones (as opposed to inspecting the content of the vectors).