Skip to content

Commit

Permalink
Merge pull request #797 from expectedparrot/serialization
Browse files Browse the repository at this point in the history
Comment out results breakpoint
  • Loading branch information
apostolosfilippas authored Jul 26, 2024
2 parents 0ca3618 + 63f9a11 commit 4c72fa6
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
2 changes: 1 addition & 1 deletion edsl/conversation/car_buying.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
c2 = Conversation(agent_list=AgentList([a1, a2]), max_turns=5, verbose=True)

c = Cache.load("car_talk.json.gz")
breakpoint()
# breakpoint()
combo = ConversationList([c1, c2], cache=c)
combo.run()
results = combo.to_results()
Expand Down
3 changes: 2 additions & 1 deletion edsl/results/Results.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,8 @@ def from_dict(cls, data: dict[str, Any]) -> Results:
),
)
except Exception as e:
breakpoint()
print(e)
# breakpoint()
return results

######################
Expand Down
22 changes: 22 additions & 0 deletions tests/misc/test_no_breakpoints.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import os
import re
from edsl import BASE_DIR


def test_no_breakpoint():
breakpoint_pattern = re.compile(r"\bbreakpoint\(\)")
for root, _, files in os.walk(BASE_DIR):
for file in files:
if file.endswith(".py"):
file_path = os.path.join(root, file)
with open(file_path, "r", encoding="utf-8") as f:
for lineno, line in enumerate(f, start=1):
stripped_line = line.strip()
# Skip lines that are comments
if stripped_line.startswith("#"):
continue
# Check if the pattern is found in the line
if breakpoint_pattern.search(line):
assert (
False
), f"Found 'breakpoint()' in {file_path} on line {lineno}"

0 comments on commit 4c72fa6

Please sign in to comment.