-
Notifications
You must be signed in to change notification settings - Fork 2
Added adopter to test llms for real-word-dataset : ManyType4Py #9
New issue
Have a question about this project? No Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “No 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? No Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
merge main to real-world-benchmark
…/TypeEvalPy into real-world-benchmark-llms
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for a new LLM adopter for processing the ManyTypes4Py real-world dataset. Key changes include:
- A new dataset preprocessing module that performs type hint stripping, file categorization, and JSON updates.
- A new code annotator module that masks type annotations using LibCST.
- Updates to runners, prompt templates, and result translation logic for LLM inference, alongside documentation and configuration improvements.
Reviewed Changes
Copilot reviewed 36 out of 41 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
src/target_tools/real-world-llms/src/dataset-preprocessing/prepare_dataset.py | Introduces dataset preprocessing and JSON update logic with type-cleaning and split categorization. |
src/target_tools/real-world-llms/src/code_annotator.py | Implements a CST transformer to mask type annotations in function definitions and assignments. |
src/target_tools/real-world-llms/models_info.md | Adds a comprehensive list of supported LLM models. |
src/target_tools/real-world-llms/README.md | Updates instructions for dataset preprocessing and model inference. |
src/target_tools/llms/src/utils.py | Adds handling for masked code-based prompt generation. |
src/target_tools/llms/src/runner.py | Incorporates a new JSON creation function for code files and integrates result translation. |
src/target_tools/llms/src/result_translator.py | Provides functionality to translate raw code outputs into JSON-formatted type annotations. |
src/target_tools/llms/src/prompts.py | Introduces new prompt templates for masked code based tasks. |
src/target_tools/hityperdl/* | Includes updates for type normalization and runner adjustments for HiTyper integration. |
src/runner_class.py | Updates Docker container creation with an Nvidia runtime specification. |
src/result_analyzer/* | Adds new analysis utilities for large-scale result matching and evaluation. |
Files not reviewed (5)
- src/target_tools/hityper/Dockerfile: Language not supported
- src/target_tools/hityperdl/Dockerfile.cuda: Language not supported
- src/target_tools/hityperdl/requirements.txt: Language not supported
- src/target_tools/real-world-llms/Dockerfile: Language not supported
- src/target_tools/real-world-llms/requirements.txt: Language not supported
- Removing JSON file if all files are missing | ||
""" | ||
global non_deleted_json_count | ||
global libcst_fail_count |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The global variable 'libcst_fail_count' is used without being initialized in the module; consider initializing it at the module level to ensure consistent behavior.
Copilot uses AI. Check for mistakes.
|
||
```bash | ||
python3.10 runner.py \ | ||
--bechmark_path /mnt/hf_cache/rashida_manytype4py/many-types-4-py-dataset/rw-benchmark \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The flag '--bechmark_path' appears to be misspelled; consider renaming it to '--benchmark_path' to avoid confusion.
--bechmark_path /mnt/hf_cache/rashida_manytype4py/many-types-4-py-dataset/rw-benchmark \ | |
--benchmark_path /mnt/hf_cache/rashida_manytype4py/many-types-4-py-dataset/rw-benchmark \ |
Copilot uses AI. Check for mistakes.
additional_type_mappings = { | ||
"integer": "int", | ||
"string": "str", | ||
"dictonary": "dict", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The key 'dictonary' appears to be a typo; consider correcting it to 'dictionary' for clarity and consistency.
"dictonary": "dict", | |
"dictionary": "dict", |
Copilot uses AI. Check for mistakes.
This merge request includes following