10 #include "blobpubsub.h" 11 #include "centraltrainer.h" 12 #include "episodeserver.h" 14 #include <shared_mutex> 18 namespace distributed {
33 std::unique_ptr<BaseSampler> sampler,
34 std::unique_ptr<AsyncBatcher> batcher =
nullptr,
35 std::string serverRole =
"train");
37 virtual bool update()
override;
45 return numUpdates_.load();
50 void recvWeights(
void const* data,
size_t len, int64_t numUpdates);
62 std::atomic<int64_t> numUpdates_{-1};
std::vector< std::string > endpoints_
Definition: centralcpid2ktrainer.h:55
std::mutex makeClientMutex_
Definition: centralcpid2ktrainer.h:54
Definition: distributed.h:108
A trainer that sends episodes to one or more central instances.
Definition: centraltrainer.h:37
std::unique_ptr< Cpid2kWorker > worker_
Definition: centralcpid2ktrainer.h:53
std::shared_ptr< BlobPublisher > modelPub_
Definition: centralcpid2ktrainer.h:59
int numUpdates()
Definition: centralcpid2ktrainer.h:44
std::string serverRole_
Definition: centralcpid2ktrainer.h:52
A trainer that sends episodes to one or more central instances.
Definition: centralcpid2ktrainer.h:28
std::shared_ptr< zmq::context_t > zmqContext_
Definition: centralcpid2ktrainer.h:57
The TorchCraftAI training library.
Definition: batcher.cpp:15
std::shared_ptr< BlobSubscriber > modelSub_
Definition: centralcpid2ktrainer.h:60