justheuristic il y a 3 ans
Parent
commit
dad8e025ac
2 fichiers modifiés avec 8 ajouts et 3 suppressions
  1. 3 2
      .github/workflows/run-tests.yaml
  2. 5 1
      tests/test_block_exact_match.py

+ 3 - 2
.github/workflows/run-tests.yaml

@@ -34,7 +34,7 @@ jobs:
 
   run-tests:
     runs-on: ubuntu-latest
-#    needs: convert-model
+    #needs: convert-model
     strategy:
       matrix:
         python-version: [ 3.7, 3.8, 3.9 ]
@@ -69,9 +69,10 @@ jobs:
           SERVER1_PID=$$
           
           sleep 60  # wait for server to download layers
+          
           # test individual blocks
           export PYTHONPATH=. REF_NAME=bloom-testing/test-bloomd-350m
           BLOCK_UID=bloom-testing/test-bloomd-350m.0 REF_INDEX=0 pytest tests/test_block_exact_match.py
           BLOCK_UID=bloom-testing/test-bloomd-350m.4 REF_INDEX=4 pytest tests/test_block_exact_match.py
-          
+
           kill $INITIAL_PID $SERVER1_PID

+ 5 - 1
tests/test_block_exact_match.py

@@ -24,7 +24,11 @@ REF_INDEX = int(os.environ.get("REF_INDEX", BLOCK_UID.split(".")[-1]))
 
 
 def test_remote_block_exact_match(atol_forward=1e-5, atol_inference=1e-3):
-    dht = hivemind.DHT(initial_peers=INITIAL_PEERS, client_mode=True, start=True)
+    try:
+        dht = hivemind.DHT(initial_peers=INITIAL_PEERS, client_mode=True, start=True)
+    except Exception as e:
+        raise Exception(f"{INITIAL_PEERS} ; {repr(e)}")
+
     remote_block = get_remote_module(dht, BLOCK_UID)
     assert remote_block is not None, f"Could not find {BLOCK_UID} in DHT"
     assert isinstance(remote_block, RemoteTransformerBlock)