Skip to content

Commit

Permalink
update format
Browse files Browse the repository at this point in the history
  • Loading branch information
tesatory committed Oct 16, 2024
1 parent 2ccdd95 commit 8051cff
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 21 deletions.
4 changes: 2 additions & 2 deletions projects/self_notes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ the ball is inside the basket.
Frank is with John.
Daniel has the basket.
Mary is at the museum.
>
>
> Q: Where is the basket?
A: the basket is at the museum.

Expand Down Expand Up @@ -50,4 +50,4 @@ If you use our code in your own work, please cite with the following BibTex entr
booktitle={Thirty-seventh Conference on Neural Information Processing Systems},
year={2023},
}
```
```
3 changes: 1 addition & 2 deletions projects/self_notes/toy_story/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@

from typing import List, Type

from relation import IsAtEdge, IsWithEdge, HasEdge, IsInsideEdge, create_rules
from graph import Edge

from relation import HasEdge, IsAtEdge, IsInsideEdge, IsWithEdge, create_rules

PEOPLE = ["Alice", "Bob", "Charlie", "Daniel", "Frank", "Mary", "John", "Sandra"]
PLACES = [
Expand Down
10 changes: 5 additions & 5 deletions projects/self_notes/toy_story/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
LICENSE file in the root directory of this source tree.
"""

import json
import random
import argparse
import json
import os
import random
from os import path
from typing import Any, Dict, List
from tqdm import tqdm
import numpy as np

from world import World
import numpy as np
from constants import MAX_SAMPLE_TRIAL
from tqdm import tqdm
from world import World


def save_json(data: List, file_name: str):
Expand Down
4 changes: 2 additions & 2 deletions projects/self_notes/toy_story/relation.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@

from typing import List, Tuple

from graph import Edge, Node
from rules import (
CheckRule,
InferenceRule,
UniqueRule,
SymmetryInference,
TriangleInference,
UniqueRule,
)
from graph import Edge, Node


class IsAtEdge(Edge):
Expand Down
20 changes: 10 additions & 10 deletions projects/self_notes/toy_story/world.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@

import logging
import random
import numpy as np
from typing import Any, Dict, List, Optional, Tuple, Type

from graph import Edge, Graph
from relation import IsAtEdge, IsWithEdge, HasEdge, IsInsideEdge, create_rules
from rules import TriangleInference
import numpy as np
from constants import (
PEOPLE,
SMALL_ITEMS,
CONTAINER_ITEMS,
PLACES,
RELATIONS,
QUESTION_RELATIONS,
MAX_OBS_TRIAL,
MAX_NUM_SUPPORT,
MAX_OBS_TRIAL,
MAX_QUESTION_TRIAL,
PEOPLE,
PLACES,
QUESTION_RELATIONS,
RELATIONS,
SMALL_ITEMS,
)
from graph import Edge, Graph
from relation import HasEdge, IsAtEdge, IsInsideEdge, IsWithEdge, create_rules
from rules import TriangleInference


class World:
Expand Down

0 comments on commit 8051cff

Please sign in to comment.