quinkgl 0.1.2__tar.gz → 0.1.8__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.
- {quinkgl-0.1.2/src/quinkgl.egg-info → quinkgl-0.1.8}/PKG-INFO +1 -1
- {quinkgl-0.1.2 → quinkgl-0.1.8}/pyproject.toml +1 -1
- {quinkgl-0.1.2 → quinkgl-0.1.8}/src/quinkgl/network/gossip_community.py +52 -15
- {quinkgl-0.1.2 → quinkgl-0.1.8/src/quinkgl.egg-info}/PKG-INFO +1 -1
- {quinkgl-0.1.2 → quinkgl-0.1.8}/MANIFEST.in +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/README.md +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/requirements.txt +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/setup.cfg +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/src/quinkgl/__init__.py +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/src/quinkgl/aggregation/__init__.py +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/src/quinkgl/aggregation/base.py +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/src/quinkgl/aggregation/fedavg.py +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/src/quinkgl/config.py +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/src/quinkgl/core/__init__.py +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/src/quinkgl/core/context.py +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/src/quinkgl/core/dummy_model.py +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/src/quinkgl/core/model_interface.py +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/src/quinkgl/core/node.py +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/src/quinkgl/data/__init__.py +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/src/quinkgl/data/datasets.py +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/src/quinkgl/gossip/__init__.py +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/src/quinkgl/gossip/orchestrator.py +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/src/quinkgl/gossip/protocol.py +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/src/quinkgl/models/__init__.py +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/src/quinkgl/models/base.py +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/src/quinkgl/models/pytorch.py +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/src/quinkgl/models/tensorflow.py +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/src/quinkgl/network/__init__.py +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/src/quinkgl/network/connection_manager.py +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/src/quinkgl/network/gossip_node.py +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/src/quinkgl/network/gossip_pb2.py +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/src/quinkgl/network/gossip_pb2_grpc.py +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/src/quinkgl/network/grpc_node.py +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/src/quinkgl/network/ipv8_community.py +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/src/quinkgl/network/ipv8_manager.py +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/src/quinkgl/network/model_serializer.py +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/src/quinkgl/network/tunnel_client.py +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/src/quinkgl/network/tunnel_pb2.py +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/src/quinkgl/network/tunnel_pb2_grpc.py +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/src/quinkgl/storage/__init__.py +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/src/quinkgl/storage/model_store.py +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/src/quinkgl/topology/__init__.py +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/src/quinkgl/topology/base.py +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/src/quinkgl/topology/cyclon.py +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/src/quinkgl/topology/random.py +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/src/quinkgl/topology/sampler.py +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/src/quinkgl/utils/serialization.py +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/src/quinkgl.egg-info/SOURCES.txt +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/src/quinkgl.egg-info/dependency_links.txt +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/src/quinkgl.egg-info/requires.txt +0 -0
- {quinkgl-0.1.2 → quinkgl-0.1.8}/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.
|
|
3
|
+
Version: 0.1.8
|
|
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
|
|
@@ -521,6 +521,7 @@ class GossipLearningCommunity(Community):
|
|
|
521
521
|
model_version=payload.model_version
|
|
522
522
|
)
|
|
523
523
|
self.known_peers[payload.node_id] = peer_info
|
|
524
|
+
print(f" 🔗 Peer adresi: {payload.node_id} @ {peer.address}")
|
|
524
525
|
logger.info(f"✅ Discovered compatible peer: {payload.node_id}")
|
|
525
526
|
|
|
526
527
|
if self.on_peer_discovered_callback:
|
|
@@ -592,17 +593,20 @@ class GossipLearningCommunity(Community):
|
|
|
592
593
|
"""
|
|
593
594
|
transfer_id = payload.transfer_id
|
|
594
595
|
|
|
595
|
-
# Log chunk receipt
|
|
596
|
+
# Log chunk receipt with visible print statements
|
|
596
597
|
if payload.chunk_index == 0:
|
|
598
|
+
print(f" 📥 Chunk alımı başladı: {payload.sender_id} ({payload.total_chunks} chunk)")
|
|
597
599
|
logger.info(
|
|
598
600
|
f"[NET] Receiving chunked model from {payload.sender_id} "
|
|
599
601
|
f"(transfer={transfer_id[:8]}..., chunks={payload.total_chunks}, "
|
|
600
602
|
f"round={payload.round_number})"
|
|
601
603
|
)
|
|
602
|
-
elif payload.chunk_index == payload.total_chunks - 1:
|
|
604
|
+
elif (payload.chunk_index + 1) % 10 == 0 or payload.chunk_index == payload.total_chunks - 1:
|
|
605
|
+
progress = (payload.chunk_index + 1) / payload.total_chunks * 100
|
|
606
|
+
print(f" 📥 Alındı: {payload.chunk_index + 1}/{payload.total_chunks} ({progress:.0f}%)")
|
|
607
|
+
|
|
608
|
+
if payload.chunk_index == payload.total_chunks - 1:
|
|
603
609
|
logger.info(f"[NET] Received final chunk {payload.chunk_index + 1}/{payload.total_chunks} from {payload.sender_id}")
|
|
604
|
-
elif payload.chunk_index % 100 == 0:
|
|
605
|
-
logger.debug(f"[NET] Chunk progress: {payload.chunk_index + 1}/{payload.total_chunks} from {payload.sender_id}")
|
|
606
610
|
|
|
607
611
|
# Create or get buffer for this transfer
|
|
608
612
|
if transfer_id not in self._chunk_buffers:
|
|
@@ -625,12 +629,27 @@ class GossipLearningCommunity(Community):
|
|
|
625
629
|
# Update peer last seen
|
|
626
630
|
if payload.sender_id in self.known_peers:
|
|
627
631
|
self.known_peers[payload.sender_id].update_seen()
|
|
632
|
+
|
|
633
|
+
# NAT keepalive: Send heartbeat every 5 chunks to keep NAT hole open
|
|
634
|
+
if payload.chunk_index % 5 == 0:
|
|
635
|
+
peer_info = self.known_peers[payload.sender_id]
|
|
636
|
+
self.ez_send(peer_info.peer, HeartbeatPayload(
|
|
637
|
+
self.node_id,
|
|
638
|
+
self._heartbeat_sequence
|
|
639
|
+
))
|
|
628
640
|
|
|
629
641
|
# If all chunks received, reassemble and process
|
|
630
642
|
if is_complete:
|
|
631
643
|
logger.info(
|
|
632
644
|
f"[NET] All {payload.total_chunks} chunks received from {payload.sender_id}, reassembling..."
|
|
633
645
|
)
|
|
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]}...")
|
|
634
653
|
|
|
635
654
|
try:
|
|
636
655
|
# Reassemble the complete weights
|
|
@@ -658,14 +677,23 @@ class GossipLearningCommunity(Community):
|
|
|
658
677
|
|
|
659
678
|
# Call callback
|
|
660
679
|
if self.on_model_update_callback:
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
680
|
+
print(f" ✅ Model reassemble tamamlandı, callback çağrılıyor...")
|
|
681
|
+
try:
|
|
682
|
+
await self.on_model_update_callback(
|
|
683
|
+
sender_id=payload.sender_id,
|
|
684
|
+
weights=weights,
|
|
685
|
+
sample_count=buffer.sample_count,
|
|
686
|
+
round_number=buffer.round_number,
|
|
687
|
+
loss=buffer.loss,
|
|
688
|
+
accuracy=buffer.accuracy
|
|
689
|
+
)
|
|
690
|
+
print(f" ✅ Callback başarılı!")
|
|
691
|
+
except Exception as cb_err:
|
|
692
|
+
print(f" ❌ Callback hatası: {cb_err}")
|
|
693
|
+
import traceback
|
|
694
|
+
traceback.print_exc()
|
|
695
|
+
else:
|
|
696
|
+
print(f" ⚠️ Callback yok!")
|
|
669
697
|
|
|
670
698
|
except Exception as e:
|
|
671
699
|
logger.error(f"Failed to reassemble/process chunked model from {payload.sender_id}: {e}")
|
|
@@ -731,6 +759,9 @@ class GossipLearningCommunity(Community):
|
|
|
731
759
|
transfer_id = str(uuid.uuid4())
|
|
732
760
|
total_chunks = (len(weights_bytes) + CHUNK_SIZE - 1) // CHUNK_SIZE
|
|
733
761
|
|
|
762
|
+
# Debug: show target peer address
|
|
763
|
+
print(f" 🎯 Target: {target_node_id} @ {peer_info.peer.address}")
|
|
764
|
+
|
|
734
765
|
logger.info(
|
|
735
766
|
f"[NET] Sending chunked model to {target_node_id} "
|
|
736
767
|
f"(transfer={transfer_id[:8]}..., size={len(weights_bytes)} bytes, chunks={total_chunks})"
|
|
@@ -756,10 +787,16 @@ class GossipLearningCommunity(Community):
|
|
|
756
787
|
|
|
757
788
|
self.ez_send(peer_info.peer, chunk_payload)
|
|
758
789
|
|
|
759
|
-
#
|
|
760
|
-
|
|
790
|
+
# Progress logging every 10 chunks
|
|
791
|
+
if (i + 1) % 10 == 0 or i == total_chunks - 1:
|
|
792
|
+
progress = (i + 1) / total_chunks * 100
|
|
793
|
+
print(f" 📦 Chunk {i + 1}/{total_chunks} ({progress:.0f}%)")
|
|
794
|
+
|
|
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
|
|
761
798
|
if i < total_chunks - 1: # Don't sleep after the last chunk
|
|
762
|
-
time.sleep(0.
|
|
799
|
+
time.sleep(0.1)
|
|
763
800
|
|
|
764
801
|
logger.info(f"[NET] Sent {total_chunks} chunks to {target_node_id}")
|
|
765
802
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: quinkgl
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.8
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|