-
Notifications
You must be signed in to change notification settings - Fork 481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SYSTEMDS-3221] Federated DataGENInstruction #1459
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The design with a global list of federated addresses is not good,
i would extend the rand to include federated addresses,
Then a next task would be to make a rewrite instruction to rewrite data gen to a federated data gen based on subsequent operations.
With this design it will nicely fit into the framework.
@@ -277,6 +280,7 @@ public static boolean executeScript( Configuration conf, String[] args ) | |||
//reset runtime platform and visualize flag | |||
setGlobalExecMode(oldrtplatform); | |||
EXPLAIN = oldexplain; | |||
DMLScript.FED_WORKER_PORTS.clear(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like if this was not a variable in DMLScript, since it would not be available when executing in python.
maybe put it in:
src/main/java/org/apache/sysds/runtime/controlprogram/context/ExecutionContext.java
or
not have it.
Maybe the best design is to add another argument to rand, that allows you to specify a federated range of worker addresses.
catch(UnknownHostException e) { | ||
e.printStackTrace(); | ||
} | ||
String host = addr.getHostName(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With only here is another argument for why we need to specify a list of federated addresses, in the arguments for the instruction since we need to specify other hosts than localhost.
int addedRows = size * (nworkers -1); | ||
long[] rowsPerWorker = new long[nworkers]; | ||
Arrays.fill(rowsPerWorker, 0, nworkers-1, size); | ||
rowsPerWorker[nworkers-1] = getRows() - addedRows; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should specify the rows as well in the instruction, using the federated addresses, since these give the dimensions of each federated site.
This PR adds a simple matrix rand(..) case. Currently, federated rand(..) is called only for the corresponding test, later this should be modified.