Automating Code Review Activities by Large-Scale Pre-training
Paper • 2203.09095 • Published
How to use josephj6802/codereviewer with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="josephj6802/codereviewer") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("josephj6802/codereviewer")
model = AutoModelForSeq2SeqLM.from_pretrained("josephj6802/codereviewer", device_map="auto")This is an ONNX version of the microsoft/codereviewer model.
The Codereviewer model is designed for text classification tasks, specifically for code review comments. This model has been converted to the ONNX format to enable efficient inference.
This model can be used to classify code review comments into various categories. It is suitable for integrating into automated code review systems to assist developers in identifying and categorizing comments.
You can use the model with the transformers library by loading it as follows:
from transformers import pipeline
model_id = "josephj6802/codereviewer"
# Load the model
classifier = pipeline("text-classification", model=model_id)
# Use the model for inference
result = classifier("Your input text here")
print(result)
@article{li2022codereviewer,
title={CodeReviewer: Pre-Training for Automating Code Review Activities},
author={Li, Zhiyu and Lu, Shuai and Guo, Daya and Duan, Nan and Jannu, Shailesh and Jenks, Grant and Majumder, Deep and Green, Jared and Svyatkovskiy, Alexey and Fu, Shengyu and others},
journal={arXiv preprint arXiv:2203.09095},
year={2022}
}