Browse Source

use fixed address and port for server 1

justheuristic 3 years ago
parent
commit
f5bb75fc00
2 changed files with 4 additions and 11 deletions
  1. 4 11
      .github/workflows/run-tests.yaml
  2. BIN
      tests/test.id

+ 4 - 11
.github/workflows/run-tests.yaml

@@ -63,18 +63,13 @@ jobs:
           pip install -r requirements-dev.txt
       - name: Test
         run: |
-
-          hivemind-dht --host_maddrs /ip4/127.0.0.1/tcp/31337 &> dht.log &
-          INITIAL_PID=$$
-          sleep 5
-          export INITIAL_PEERS=$(python -c "with open('dht.log') as f: print(f.readlines()[1].split()[-1])" )
-          echo "Initial peer: ${INITIAL_PEERS}"
-          cat dht.log
- 
           python -m cli.run_server --converted_model_name_or_path bloom-testing/test-bloomd-350m --block_indices 0:12 \
-            --torch_dtype float32 --initial_peers $INITIAL_PEERS --throughput 1 &
+            --torch_dtype float32 --identity tests/test.id --host_maddrs /ip4/127.0.0.1/tcp/31337 --throughput 1 &
           SERVER1_PID=$$
           
+          export INITIAL_PEERS=/ip4/127.0.0.1/tcp/31337/p2p/QmS9KwZptnVdB9FFV7uGgaTq4sEKBwcYeKZDfSpyKDUd1g
+          # ^-- server 1 multiaddr is determined by --identity and --host_maddrs
+          
           sleep 30  # wait for server to download layers
           ps aux
           
@@ -82,6 +77,4 @@ jobs:
           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
           echo "Done!"

BIN
tests/test.id