Comments (3)
Example program:
#include "ps.h"
typedef float Val;
int CreateServerNode(int argc, char *argv[]) {
ps::OnlineServer<Val> server(ps::IOnlineHandle<float>(), 3, 0);
return 0;
}
int WorkerNodeMain(int argc, char *argv[]) {
using namespace ps;
std::vector<Key> key = {1};
std::vector<Val> val = {1, 2, 3};
std::vector<Val> recv_val;
KVWorker<Val> wk;
int ts = wk.Push(key, val);
wk.Wait(ts);
ts = wk.Pull(key, &recv_val);
wk.Wait(ts);
std::cout << "values pulled at " << MyNodeID() << ": " <<
Blob<const Val>(recv_val) << std::endl;
return 0;
}
With output:
values pulled at W0: [3]: 6 6 6
from ps-lite.
After a little more poking around, I realized example_e contained a working handler for vectors. Sorry for the confusion. Perhaps the guide clarify this? I'd be happy to give you a PR on it if you think it's appropriate.
from ps-lite.
It will be fantastic if you can update the guide:) Thanks.
from ps-lite.
Related Issues (20)
- what if scheduler/server/worker failed? HOT 1
- How to compile ps-lite to `.so` instead of `.a`? HOT 1
- throwing an instance of 'dmlc::Error HOT 4
- How to change the ip of scheduler?
- Is yarn cluster supported? HOT 1
- Is there an implementation of matrix transport based on ps-lite? HOT 4
- one key mapping to multiple values not implemented ??
- [Code Issue] Unnecessary assignment?
- CHEKC_NE ERROR for the available port HOT 2
- about AddPullCB size check
- Can I change the maximum bounded delay value? HOT 1
- What does `HEAPPROFILE ` do?
- Makefile:32: recipe for target 'lint' failed HOT 3
- Cound not bind a port (or IP).
- Why not using RDMA WRITE( with imm) or RDMA READ to avoid additional memory copy? HOT 9
- hides overloaded virtual function
- can not download the dependencies from last week HOT 3
- Can not train a model with multi_process kvworkers HOT 2
- key lost in this line when not exactly devided
- The thread safety of `RunCallback` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ps-lite.