graykode/commit-autosuggestions là một trong những repo tích hợp AI mà TopGit theo dõi, hiện có 386 sao, viết chủ yếu bằng Python. A tool that AI automatically recommends commit messages.
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
This is implementation of CommitBERT: Commit Message Generation Using Pre-Trained Programming Language Model. CommitBERT is accepted in ACL workshop : NLP4Prog.
Have you ever hesitated to write a commit message? Now get a commit message from Artificial Intelligence!
Abstract
CodeBERT: A Pre-Trained Model for Programming and Natural Languages introduces a pre-trained model in a combination of Program Language and Natural Language(PL-NL). It also introduces the problem of converting code into natural language (Code Documentation Generation).
diff --git a/test.py b/test.py
new file mode 100644
index 0000000..d13f441
--- /dev/null
+++ b/test.py
@@ -0,0 +1,6 @@
+
+import torch
+import argparse
+
+def add(a, b):
+ return a + b
Recommended Commit Message : Add two arguments .
We can use CodeBERT to create a model that generates a commit message when code is added. However, most code changes are not made only by add of the code, and some parts of the code are deleted.
diff --git a/test.py b/test.py
index d13f441..1b1b82a 100644
--- a/test.py
+++ b/test.py
@@ -1,6 +1,3 @@
-import torch
-import argparse
-
def add(a, b):
return a + b
To solve this problem, use a new embedding called patch_type_embeddings that can distinguish added and deleted, just as the XLM(Lample et al, 2019) used language embeddeding. (1 for added, 2 for deleted.)
Language support
Language
Added
Diff
Data(Only Diff)
Weights
Python
✅
✅
423k
Link
JavaScript
✅
✅
514k
Link
Go
⬜
⬜
⬜
⬜
JAVA
⬜
⬜
⬜
⬜
Ruby
⬜
⬜
⬜
⬜
PHP
⬜
⬜
⬜
⬜
✅ — Supported
⬜ - N/A ️
We plan to slowly conquer languages that are not currently supported. However, I also need to use expensive GPU instances of AWS or GCP to train about the above languages. Please do a simple sponsor for this! Add data is CodeSearchNet dataset.
Quick Start
To run this project, you need a flask-based inference server (GPU) and a client (commit module). If you don't have a GPU, don't worry, you can use it through Google Colab.
1. Run flask pytorch server.
Prepare Docker and Nvidia-docker before running the server.
1-a. If you have GPU machine.
Serve flask server with Nvidia Docker. Check the docker tag for programming language in here.
Language
Tag
Python
py
JavaScript
js
Go
go
JAVA
java
Ruby
ruby
PHP
php
$ docker run -it -d --gpus 0 -p 5000:5000 graykode/commit-autosuggestions:{language}
1-b. If you don't have GPU machine.
Even if you don't have a GPU, you can still serve the flask server by using the ngrok setting in commit_autosuggestions.ipynb.
2. Start commit autosuggestion with Python client module named commit.
First, install the package through pip.
$ pip install commit
Set the endpoint for the flask server configured in step 1 through the commit configure command. (For example, if the endpoint is http://127.0.0.1:5000, set it as follows: commit configure --endpoint http://127.0.0.1:5000)
$ commit configure --help
Usage: commit configure [OPTIONS]
Options:
--profile TEXT unique name for managing each independent settings
--endpoint TEXT endpoint address accessible to the server (example :
http://127.0.0.1:5000/) [required]
--help Show this message and exit.
All setup is done! Now, you can get a commit message from the AI with the command commit.
$ commit --help
Usage: commit [OPTIONS] COMMAND [ARGS]...
Options:
--profile TEXT unique name for managing each independent settings
-f, --file FILENAME patch file containing git diff (e.g. file created by
`git add` and `git diff --cached > test.diff`)
-v, --verbose print suggested commit message more detail.
-a, --autocommit automatically commit without asking if you want to
commit
--help Show this message and exit.
Commands:
configure
Training detail
Refer How to train for your lint style. This allows you to re-fine tuning to your repository's commit lint style.
Contribution
You can contribute anything, even a typo or code in the article. Don't hesitate!!.
Versions are managed only within the branch with the name of each version. After being released on Pypi, it is merged into the master branch and new development proceeds in the upgraded version branch.
Author
Tae Hwan Jung(@graykode)
Citation
@article{jung2021commitbert,
title={CommitBERT: Commit Message Generation Using Pre-Trained Programming Language Model},
author={Jung, Tae-Hwan},
journal={arXiv preprint arXiv:2105.14242},
year={2021}
}
Đọc thêm về graykode/commit-autosuggestions ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/graykode/commit-autosuggestions là nguồn chính thức.
graykode/commit-autosuggestions có những chủ đề gì?
GitHub topics của graykode/commit-autosuggestions: "bert", "commit-autosuggestions", "natural-language", "nlp", "text-generation". TopGit xếp repo vào nhóm AI Tools.
graykode/commit-autosuggestions có phải mã nguồn mở không?
TopGit chưa ghi nhận license cho graykode/commit-autosuggestions. Phần lớn repo public trên GitHub là mã nguồn mở, nhưng điều khoản khác nhau từng repo — mở file LICENSE để xác nhận.
graykode/commit-autosuggestions có trang demo không?
Dự án có trang chủ ở https://arxiv.org/abs/2105.14242. Tab "Readme" ở trang này thường có ảnh chụp và hướng dẫn bắt đầu nhanh.
graykode/commit-autosuggestions còn đang phát triển không?
Commit gần nhất trên graykode/commit-autosuggestions là 3.2 năm trước (theo timestamp GitHub). Repo có 16 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
Đọc đầy đủ README ở tab phía trên.
commit-autosuggestions có đáng để bạn bỏ thời gian?
ChatGPT, Claude và Perplexity đều đọc được trang này. Hỏi thử xem họ nghĩ gì về commit-autosuggestions.