Skip to content

Leftover boilerplate: dev.py, preview.py, healthcheck and return annotation are all broken #14

Description

@peterbjohnson

Four small defects left over from the template. None affect the deployed eval path, but each misleads anyone working on the repo.

1. dev.py fails immediately. The documented command in the README crashes:

python -m evaluation_function.dev "<response>" "<answer>"
AttributeError: 'dict' object has no attribute 'to_dict'

evaluation_function() returns a plain dict, so result.to_dict() is invalid. The arguments are also passed in the wrong order: the docstring says <answer> <response> and the call site passes evaluation_function(answer, response, ...), while the real signature is (response, answer, params).

2. healthcheck reports an error inside the container.

FileNotFoundError: /app/data/longMIDIsequence.json

evaluation_test.py opens the bulk-case fixture at import time, but the Dockerfile copies only evaluation_function/. Either copy data/ into the image or load the fixture lazily / skip when absent.

3. preview.py is still the boilerplate sympy preview. It echoes the notes back under a sympy key, which is meaningless for MIDI. Either implement something useful (e.g. note count and duration) or remove the preview registration.

4. Wrong return annotation. evaluation_function is annotated -> Result but returns a dict. Same for the unused Result/Params imports it implies.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions