ApolloResearch / rib

Library for methods related to the Local Interaction Basis (LIB)
MIT License
2 stars 0 forks source link

Distributed calculation for basis #332

Closed nix-apollo closed 9 months ago

nix-apollo commented 9 months ago

Distributed calculation for basis

Description

We've previously supported running distributed edge calculations. We now support distributed basis builds as well.

We only support this:

We split over the first dimension of the phis array, which represents all of the vectors we want to take our jacobian with. In the no-stochasticty case, there are out_pos * out_hidden different vectors. With stochasticity those factors become n_pos_sources and n_hidden_sources respectively.

We combine across processes by adding the resulting M_dash matrices in data_accumulator.py.

This PR also includes a refactor of the jacobian basis calculation, by:

Motivation and Context

Relevant past PRs for distributed edge calculations include:

196 #319

How Has This Been Tested?

Does this PR introduce a breaking change?

No.