Support evaluation-local configuration and names overrides

This commit is contained in:
sebastien committed 2026-11-03 18:44:56 +01:00
1 parent 0bb6f7d97c
commit d4404e4c27
36 files changed
+409 -184

No files matched your search

+3 -5
View File
@@ -31,8 +31,6 @@ from copienator import (
)
from copienator.utils import natural_key, read_all_labels
MODEL_ID = config.MODEL_FOR_LABEL_ID
api_key = config.API_KEY
REQUEST_TIMEOUT_SECONDS = 80
my_prompt = """I'm giving you an image of the left columns of a written exam.
@@ -583,7 +581,7 @@ def process_copy_group(
known_name=known_name,
)
response = client.models.generate_content(
model=MODEL_ID,
model=config.MODEL_FOR_LABEL_ID,
contents=contents,
config=request_config,
)
@@ -720,7 +718,7 @@ def run(
line.strip() for line in names_text.splitlines() if line.strip()
} | {"Unknown", "Continued"}
if client is None:
client = genai.Client(api_key=api_key)
client = genai.Client(api_key=config.API_KEY)
groups = group_images(images)
pending_groups = {key: files for key, files in groups.items()
@@ -828,7 +826,7 @@ def main(argv: Sequence[str] | None = None) -> int:
def handle(args: argparse.Namespace) -> ExitCode:
workspace, target = workspace_from_target(
args, repository=Path(__file__).resolve().parents[2]
args, repository=Path.cwd()
)
targets = [target]
for additional in args.additional_targets: