Skip to content

JetBrains-Research/fine-tuning-ml-models

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code style: black CI

Fine-tuning-ml-models

Preprocessing

To extract data from PSI trees of Java project via psiminer, use this command

$ python -m scripts.prepocess <path-to-project-folder>

Resulting .c2s file with samples and vocabulary table are written to the datasets directory, the name of subdirectory name is same to the project's.

You can change extraction parameters (e.g., type preserving) by modifying configs/psiminer_config.json.

Evaluating model on single project

To calculate quality metrics on a preprocessed project via code2seq, use this command

$ python -m scripts.test_single <path-to-preprocessed-project> <path-to-model-checkpoint>

Function test_single returns the list of calculated metrics

Evaluating model on all projects

$ python -m scripts.test_single <path-to-preprocessed-raw-Java-dataset> <path-to-model-checkpoint> <path-to-results-storage-folder>

Automatically does preprocessing and evaluating, produces results.csv file, where all metrics and project names stored with header.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages