Implement appropriate model/embeddings saving with high order flags.
danwhale opened this issue · comments
Danila Vaganov commented
embeddings_name = (
"../data_validation/"
+ self.data_name
+ "/processed/"
+ "embeddings_"
+ self.data_name
+ "_"
+ self.loss_name
+ ".npy"
)
if os.path.exists(embeddings_name):
emb = np.load(embeddings_name)
return emb
Danila Vaganov commented
embeddings_name,
out.detach().cpu().numpy(),
)
return out.detach().cpu().numpy()
```
Danila Vaganov commented
structural_neighbourhood
if os.path.exists(
"../data_validation/"
+ self.data_name
+ "/processed"
+ "/structural_neighbourhood_"
+ self.data_name
+ ".npy"
):
new_edge_index = np.load(
"../data_validation/"
+ self.data_name
+ "/processed"
+ "/structural_neighbourhood_"
+ self.data_name
+ ".npy"
)
```
np.save(
"../data_validation/"
+ self.data_name
+ "/processed"
+ "/structural_neighbourhood_"
+ self.data_name
+ ".npy",
np.array(new_edge_index),
)