Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: initialize default metadata with all required fields #6583

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

xingyaoww
Copy link
Collaborator

@xingyaoww xingyaoww commented Feb 2, 2025

This PR fixes an issue where the evaluation script would error out if metadata.json doesn't exist. Now it will initialize a default EvalMetadata with all required fields when the file is missing.

Changes:

  • Added a fallback to create default metadata when metadata.json doesn't exist
  • Initializes EvalMetadata with all required fields:
    • agent_class: "dummy_agent" (placeholder)
    • llm_config: LLMConfig with "dummy_model"
    • max_iterations: 1
    • eval_output_dir: input file directory
    • start_time: current time
    • git_commit: current commit hash
    • dataset: from args.dataset
  • Maintains type safety by ensuring metadata is always an EvalMetadata instance

To run this PR locally, use the following command:

docker run -it --rm   -p 3000:3000   -v /var/run/docker.sock:/var/run/docker.sock   --add-host host.docker.internal:host-gateway   -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:543d0ba-nikolaik   --name openhands-app-543d0ba   docker.all-hands.dev/all-hands-ai/openhands:543d0ba

@xingyaoww xingyaoww marked this pull request as ready for review February 2, 2025 05:02
@xingyaoww xingyaoww requested review from csmith49 and neubig February 2, 2025 05:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants