quinkgl 0.1.8__tar.gz → 0.1.16__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. {quinkgl-0.1.8/src/quinkgl.egg-info → quinkgl-0.1.16}/PKG-INFO +1 -1
  2. {quinkgl-0.1.8 → quinkgl-0.1.16}/pyproject.toml +1 -1
  3. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl/network/gossip_community.py +20 -17
  4. {quinkgl-0.1.8 → quinkgl-0.1.16/src/quinkgl.egg-info}/PKG-INFO +1 -1
  5. {quinkgl-0.1.8 → quinkgl-0.1.16}/MANIFEST.in +0 -0
  6. {quinkgl-0.1.8 → quinkgl-0.1.16}/README.md +0 -0
  7. {quinkgl-0.1.8 → quinkgl-0.1.16}/requirements.txt +0 -0
  8. {quinkgl-0.1.8 → quinkgl-0.1.16}/setup.cfg +0 -0
  9. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl/__init__.py +0 -0
  10. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl/aggregation/__init__.py +0 -0
  11. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl/aggregation/base.py +0 -0
  12. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl/aggregation/fedavg.py +0 -0
  13. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl/config.py +0 -0
  14. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl/core/__init__.py +0 -0
  15. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl/core/context.py +0 -0
  16. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl/core/dummy_model.py +0 -0
  17. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl/core/model_interface.py +0 -0
  18. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl/core/node.py +0 -0
  19. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl/data/__init__.py +0 -0
  20. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl/data/datasets.py +0 -0
  21. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl/gossip/__init__.py +0 -0
  22. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl/gossip/orchestrator.py +0 -0
  23. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl/gossip/protocol.py +0 -0
  24. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl/models/__init__.py +0 -0
  25. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl/models/base.py +0 -0
  26. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl/models/pytorch.py +0 -0
  27. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl/models/tensorflow.py +0 -0
  28. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl/network/__init__.py +0 -0
  29. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl/network/connection_manager.py +0 -0
  30. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl/network/gossip_node.py +0 -0
  31. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl/network/gossip_pb2.py +0 -0
  32. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl/network/gossip_pb2_grpc.py +0 -0
  33. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl/network/grpc_node.py +0 -0
  34. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl/network/ipv8_community.py +0 -0
  35. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl/network/ipv8_manager.py +0 -0
  36. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl/network/model_serializer.py +0 -0
  37. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl/network/tunnel_client.py +0 -0
  38. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl/network/tunnel_pb2.py +0 -0
  39. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl/network/tunnel_pb2_grpc.py +0 -0
  40. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl/storage/__init__.py +0 -0
  41. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl/storage/model_store.py +0 -0
  42. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl/topology/__init__.py +0 -0
  43. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl/topology/base.py +0 -0
  44. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl/topology/cyclon.py +0 -0
  45. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl/topology/random.py +0 -0
  46. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl/topology/sampler.py +0 -0
  47. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl/utils/serialization.py +0 -0
  48. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl.egg-info/SOURCES.txt +0 -0
  49. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl.egg-info/dependency_links.txt +0 -0
  50. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl.egg-info/requires.txt +0 -0
  51. {quinkgl-0.1.8 → quinkgl-0.1.16}/src/quinkgl.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: quinkgl
3
- Version: 0.1.8
3
+ Version: 0.1.16
4
4
  Summary: A decentralized gossip learning framework for P2P edge intelligence
5
5
  Author-email: Ali Seyhan <aliseyhan@posta.mu.edu.tr>, Baki Turhan <bakiturhan@posta.mu.edu.tr>
6
6
  Project-URL: Homepage, https://github.com/aliseyhann/QuinkGL-Gossip-Learning-Framework
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "quinkgl"
7
- version = "0.1.8"
7
+ version = "0.1.16"
8
8
  description = "A decentralized gossip learning framework for P2P edge intelligence"
9
9
  readme = "README.md"
10
10
  authors = [
@@ -8,6 +8,7 @@ CHUNKED TRANSFER: Large model updates are split into chunks
8
8
  to work around UDP MTU limits (~1400 bytes).
9
9
  """
10
10
 
11
+ import asyncio
11
12
  import time
12
13
  import logging
13
14
  import hashlib
@@ -30,7 +31,7 @@ MAX_INCOMING_MESSAGE_SIZE = 150 * 1024 * 1024
30
31
  # Chunk size for large model transfers
31
32
  # Using 60KB which is below UDP's 65507 byte limit but reduces packet count significantly
32
33
  # A 5.8MB model = ~100 chunks instead of ~5800 chunks
33
- CHUNK_SIZE = 60000
34
+ CHUNK_SIZE = 10000 # 10KB chunks - smaller for better NAT traversal
34
35
 
35
36
  # Timeout for incomplete transfers (300 seconds - increased for Colab/slow networks)
36
37
  CHUNK_TRANSFER_TIMEOUT = 300
@@ -591,7 +592,8 @@ class GossipLearningCommunity(Community):
591
592
 
592
593
  Buffers chunks and triggers model processing when all chunks are received.
593
594
  """
594
- transfer_id = payload.transfer_id
595
+ print(f" [DEBUG] on_model_chunk called: chunk {payload.chunk_index}/{payload.total_chunks}")
596
+ transfer_id = f"{payload.sender_id}:{payload.round_number}" # Use sender:round as key
595
597
 
596
598
  # Log chunk receipt with visible print statements
597
599
  if payload.chunk_index == 0:
@@ -601,7 +603,7 @@ class GossipLearningCommunity(Community):
601
603
  f"(transfer={transfer_id[:8]}..., chunks={payload.total_chunks}, "
602
604
  f"round={payload.round_number})"
603
605
  )
604
- elif (payload.chunk_index + 1) % 10 == 0 or payload.chunk_index == payload.total_chunks - 1:
606
+ elif (payload.chunk_index + 1) % 50 == 0 or payload.chunk_index == payload.total_chunks - 1:
605
607
  progress = (payload.chunk_index + 1) / payload.total_chunks * 100
606
608
  print(f" 📥 Alındı: {payload.chunk_index + 1}/{payload.total_chunks} ({progress:.0f}%)")
607
609
 
@@ -610,6 +612,7 @@ class GossipLearningCommunity(Community):
610
612
 
611
613
  # Create or get buffer for this transfer
612
614
  if transfer_id not in self._chunk_buffers:
615
+ print(f" 🆕 Yeni buffer oluşturuldu: {transfer_id[:8]}... (chunk {payload.chunk_index})")
613
616
  self._chunk_buffers[transfer_id] = ChunkBuffer(
614
617
  transfer_id=transfer_id,
615
618
  sender_id=payload.sender_id,
@@ -643,13 +646,6 @@ class GossipLearningCommunity(Community):
643
646
  logger.info(
644
647
  f"[NET] All {payload.total_chunks} chunks received from {payload.sender_id}, reassembling..."
645
648
  )
646
- else:
647
- # Debug: if this is the final chunk but buffer is not complete, something is wrong
648
- if payload.chunk_index == payload.total_chunks - 1:
649
- actual_chunks = len(buffer.chunks)
650
- print(f" ⚠️ DEBUG: Son chunk alındı ama buffer complete değil!")
651
- print(f" Buffer: {actual_chunks}/{buffer.total_chunks} chunks")
652
- print(f" Eksik chunk indexleri: {[i for i in range(buffer.total_chunks) if i not in buffer.chunks][:10]}...")
653
649
 
654
650
  try:
655
651
  # Reassemble the complete weights
@@ -699,8 +695,16 @@ class GossipLearningCommunity(Community):
699
695
  logger.error(f"Failed to reassemble/process chunked model from {payload.sender_id}: {e}")
700
696
  if transfer_id in self._chunk_buffers:
701
697
  del self._chunk_buffers[transfer_id]
698
+ else:
699
+ # Debug: if this is the final chunk but buffer is not complete, log missing chunks
700
+ if payload.chunk_index == payload.total_chunks - 1:
701
+ actual_chunks = len(buffer.chunks)
702
+ print(f" ⚠️ DEBUG: Son chunk alındı ama buffer complete değil!")
703
+ print(f" Buffer: {actual_chunks}/{buffer.total_chunks} chunks")
704
+ missing = [i for i in range(buffer.total_chunks) if i not in buffer.chunks][:10]
705
+ print(f" Eksik chunk indexleri: {missing}...")
702
706
 
703
- def send_model_update(
707
+ async def send_model_update(
704
708
  self,
705
709
  target_node_id: str,
706
710
  weights: Any,
@@ -787,16 +791,15 @@ class GossipLearningCommunity(Community):
787
791
 
788
792
  self.ez_send(peer_info.peer, chunk_payload)
789
793
 
790
- # Progress logging every 10 chunks
791
- if (i + 1) % 10 == 0 or i == total_chunks - 1:
794
+ # Progress logging every 50 chunks (with 10KB chunks, we have ~230 chunks)
795
+ if (i + 1) % 50 == 0 or i == total_chunks - 1:
792
796
  progress = (i + 1) / total_chunks * 100
793
797
  print(f" 📦 Chunk {i + 1}/{total_chunks} ({progress:.0f}%)")
794
798
 
795
- # Rate limiting: 100ms delay between chunks to prevent UDP packet loss
796
- # Over NAT/internet, faster rates cause packet drops
797
- # 39 chunks * 100ms = ~4 seconds per transfer
799
+ # Rate limiting: 200ms delay between chunks
800
+ # Using asyncio.sleep so event loop can process incoming packets
798
801
  if i < total_chunks - 1: # Don't sleep after the last chunk
799
- time.sleep(0.1)
802
+ await asyncio.sleep(0.2)
800
803
 
801
804
  logger.info(f"[NET] Sent {total_chunks} chunks to {target_node_id}")
802
805
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: quinkgl
3
- Version: 0.1.8
3
+ Version: 0.1.16
4
4
  Summary: A decentralized gossip learning framework for P2P edge intelligence
5
5
  Author-email: Ali Seyhan <aliseyhan@posta.mu.edu.tr>, Baki Turhan <bakiturhan@posta.mu.edu.tr>
6
6
  Project-URL: Homepage, https://github.com/aliseyhann/QuinkGL-Gossip-Learning-Framework
File without changes
File without changes
File without changes
File without changes
File without changes