Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.

Commit

Permalink
Don't confuse replace() and replace_data()
Browse files Browse the repository at this point in the history
  • Loading branch information
tmke8 committed May 27, 2022
1 parent 01f3bb1 commit be6b125
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ethicml/implementations/beutel.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def encode_dataset(
for embedding, _, _ in dataloader:
data_to_return += enc(embedding).data.numpy().tolist()

return datatuple.replace(x=pd.DataFrame(data_to_return), name=f"Beutel: {datatuple.name}")
return datatuple.replace(x=pd.DataFrame(data_to_return))


def encode_testset(enc: nn.Module, dataloader: torch.utils.data.DataLoader, testtuple: T) -> T:
Expand Down
2 changes: 1 addition & 1 deletion ethicml/implementations/vfae.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def transform(model: VFAENetwork, dataset: T, flags: VfaeArgs) -> T:
# z1 = model.reparameterize(z1_mu, z1_logvar)
post_train += z1_mu.data.tolist()

return dataset.replace(x=pd.DataFrame(post_train), name=f"VFAE: {dataset.name}")
return dataset.replace(x=pd.DataFrame(post_train))


def train_and_transform(train: DataTuple, test: T, flags: VfaeArgs) -> Tuple[DataTuple, T]:
Expand Down

0 comments on commit be6b125

Please sign in to comment.