Skip to content
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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

OlgaOvcharenko
Copy link
Contributor

This PR adds a simple matrix rand(..) case. Currently, federated rand(..) is called only for the corresponding test, later this should be modified.

@OlgaOvcharenko OlgaOvcharenko changed the title [WIP][SYSTEMDS-3221] Federated DataGENInstruction [SYSTEMDS-3221] Federated DataGENInstruction Dec 2, 2021
Copy link
Contributor

@Baunsgaard Baunsgaard left a 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();
Copy link
Contributor

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();
Copy link
Contributor

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;
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

2 participants