This commit is contained in:
Lennart J. Kurzweg (Nx2)
2024-09-27 21:34:21 +02:00
parent 3c2429ce78
commit 76b2b436be
8 changed files with 297 additions and 133 deletions

View File

@@ -71,7 +71,7 @@ def run_tests(models: dict[int, Model], seeds: list[int], tests: dict[int, Test]
'seed': seed,
'technique_id': technique_id
}
hash_key = str(nxhash(json.dumps(combination, sort_keys=True)))
hash_key = nxhash(json.dumps(combination, sort_keys=True))
combination.update({
'test_name': test.name,

View File

@@ -157,9 +157,9 @@ def get_notes_containing(patterns: Union[list[str], str]) -> str:
return ret
@tool
def write_note(command: str) -> str:
def write_note(note: str) -> str:
"""Write a not with the current time to the database."""
return command
return "Written."
@tool
def save_python_repl(command: str):
@@ -171,6 +171,7 @@ def save_python_repl(command: str):
"^ *subprocess\\.",
"^ *(with)? ?open\\(",
"^ *shutil\\.",
"^ *requests\\.",
]
valid = True
for pattern in blocked_patterns: