https://github.com/instadeepai/mlip/blob/main/src/mlip/data/helpers/neighborhood.py#L107
It should be np.zeros((len(senders), 3)) instead of np.array([[0] * 3] * len(senders)). Although they are mostly equal, errors may occur in certain situations as follows.
When len(senders) == 0, which means the graph is empty, the shape of shifts will be (0,) instead of (0,3), which will cause shape mismatching when concat the empty graph with others (this will be called by jraph.batch_np in dynamically_batch). This situation does not occur during training because the empty graphs have been filtered, but it may still occur when using run_batched_inference.
https://github.com/instadeepai/mlip/blob/main/src/mlip/data/helpers/neighborhood.py#L107
It should be
np.zeros((len(senders), 3))instead ofnp.array([[0] * 3] * len(senders)). Although they are mostly equal, errors may occur in certain situations as follows.When
len(senders) == 0, which means the graph is empty, the shape ofshiftswill be(0,)instead of(0,3), which will cause shape mismatching whenconcatthe empty graph with others (this will be called byjraph.batch_npindynamically_batch). This situation does not occur during training because the empty graphs have been filtered, but it may still occur when usingrun_batched_inference.