File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 1313# See the License for the specific language governing permissions and
1414# limitations under the License.
1515
16+ import os
17+
1618import pytest
1719
1820from nemoguardrails .embeddings .providers .fastembed import FastEmbedEmbeddingModel
1921
22+ LIVE_TEST_MODE = os .environ .get ("LIVE_TEST" )
23+
2024
25+ @pytest .mark .skipif (not LIVE_TEST_MODE , reason = "Not in live mode." )
2126def test_sync_embeddings ():
2227 model = FastEmbedEmbeddingModel ("all-MiniLM-L6-v2" )
2328
@@ -26,13 +31,15 @@ def test_sync_embeddings():
2631 assert len (result [0 ]) == 384
2732
2833
34+ @pytest .mark .skipif (not LIVE_TEST_MODE , reason = "Not in live mode." )
2935def test_additional_params_with_fastembed ():
3036 model = FastEmbedEmbeddingModel ("all-MiniLM-L6-v2" , max_length = 512 , lazy_load = True )
3137 result = model .encode (["test" ])
3238
3339 assert len (result [0 ]) == 384
3440
3541
42+ @pytest .mark .skipif (not LIVE_TEST_MODE , reason = "Not in live mode." )
3643@pytest .mark .asyncio
3744async def test_async_embeddings ():
3845 model = FastEmbedEmbeddingModel ("all-MiniLM-L6-v2" )
You can’t perform that action at this time.
0 commit comments