Skip to content

Commit

Permalink
remove redundant
Browse files Browse the repository at this point in the history
  • Loading branch information
tae898 committed Apr 25, 2024
1 parent 2bcc9af commit 785bc7f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
3 changes: 0 additions & 3 deletions room_env/envs/room0.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,6 @@ def renew(self) -> None:
room = []
for head, relation, tail in self.room:
name1, head = split_by_possessive(head)
# name2, tail = split_by_possessive(tail)

# assert name1 == name2, "we don't do name mixing at this moment."

if random.random() < self.probs["new_object"]:
while True:
Expand Down
13 changes: 0 additions & 13 deletions room_env/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,19 +157,6 @@ def argmax(iterable) -> int:
return max(enumerate(iterable), key=lambda x: x[1])[0]


def remove_posession(entity: str) -> str:
"""Remove name from the entity.
Args:
entity: e.g., bob's laptop
Returns:
e.g., laptop
"""
return entity.split("'s ")[-1]


def split_by_possessive(name_entity: str) -> tuple[str, str]:
"""Separate name and entity from the given string.
Expand Down

0 comments on commit 785bc7f

Please sign in to comment.