diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml new file mode 100644 index 0000000..0f60a44 --- /dev/null +++ b/.github/workflows/doc.yml @@ -0,0 +1,28 @@ +name: Deploy Docs to GitHub Pages +on: + push: + branches: + - main +permissions: + contents: write +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Configure Git Credentials + run: | + git config user.name github-actions[bot] + git config user.email 41898282+github-actions[bot]@users.noreply.github.com + - uses: actions/setup-python@v5 + with: + python-version: 3.x + - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV + - uses: actions/cache@v4 + with: + key: mkdocs-material-${{ env.cache_id }} + path: .cache + restore-keys: | + mkdocs-material- + - run: pip install mkdocs-material mkdocs-material-extensions mkdocstrings mkdocstrings-python mkdocs-jupyter markdown-include mike mdx_truly_sane_lists + - run: mkdocs gh-deploy --force \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..0db3f97 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,36 @@ +# This workflow will upload a Python Package using Twine when a release is created +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Upload Python Package + +on: + release: + types: [published] + +permissions: + contents: read + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build + - name: Build package + run: python -m build + - name: Publish package + uses: pypa/gh-action-pypi-publish@release/v1.8 + with: + password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/README.md b/README.md index 424b19b..705c144 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,9 @@
- +[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/turkish-lm-tuner)](https://pypi.org/project/turkish-lm-tuner/) [![Code license](https://img.shields.io/badge/Code%20License-MIT-green.svg)](https://github.com/boun-tabi-LMG/blob/main/LICENSE) [![GitHub Repo stars](https://img.shields.io/github/stars/boun-tabi-LMG/turkish-lm-tuner)](https://github.com/boun-tabi-LMG/turkish-lm-tuner/stargazers) [![arXiv](https://img.shields.io/badge/arxiv-2401.14373-b31b1b.svg)](https://arxiv.org/abs/2401.14373) @@ -75,10 +75,10 @@ training_params = { 'num_train_epochs': 10 'per_device_train_batch_size': 4, 'per_device_eval_batch_size': 4, - 'output_dir': './', + 'output_dir': './', 'evaluation_strategy': 'epoch', 'save_strategy': 'epoch', - 'predict_with_generate': True + 'predict_with_generate': True } optimizer_params = { 'optimizer_type': 'adafactor', @@ -91,7 +91,7 @@ model_trainer = TrainerForConditionalGeneration( training_params=training_params, model_save_path="turna_summarization_tr_news", max_input_length=max_input_length, - max_target_length=max_target_length, + max_target_length=max_target_length, postprocess_fn=dataset_processor.dataset.postprocess_data ) diff --git a/docs/index.md b/docs/index.md index ed8e8a7..2f88f71 100644 --- a/docs/index.md +++ b/docs/index.md @@ -3,14 +3,13 @@
- +[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/turkish-lm-tuner)](https://pypi.org/project/turkish-lm-tuner/) [![Code license](https://img.shields.io/badge/Code%20License-MIT-green.svg)](https://github.com/boun-tabi-LMG/blob/main/LICENSE) [![GitHub Repo stars](https://img.shields.io/github/stars/boun-tabi-LMG/turkish-lm-tuner)](https://github.com/boun-tabi-LMG/turkish-lm-tuner/stargazers) [![arXiv](https://img.shields.io/badge/arxiv-2401.14373-b31b1b.svg)](https://arxiv.org/abs/2401.14373) - ## Overview Turkish LM Tuner is a library for fine-tuning Turkish language models on various NLP tasks. It is built on top of [HuggingFace Transformers](https://github.com/huggingface/transformers) library. It supports finetuning with conditional generation and sequence classification tasks. The library is designed to be modular and extensible. It is easy to add new tasks and models. The library also provides data loaders for various Turkish NLP datasets. @@ -26,7 +25,7 @@ pip install git+https://github.com/boun-tabi-LMG/turkish-lm-tuner.git ## Model Support Any Encoder or ConditionalGeneration model that is compatible with HuggingFace Transformers library can be used with Turkish LM Tuner. The following models are tested and supported. -- [TURNA]() +- [TURNA](https://arxiv.org/abs/2401.14373) - [mT5](https://aclanthology.org/2021.naacl-main.41/) - [mBART](https://aclanthology.org/2020.tacl-1.47/) - [BERTurk](https://github.com/stefan-it/turkish-bert) diff --git a/pyproject.toml b/pyproject.toml index 261311a..d90b794 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,6 @@ classifiers = [ "Intended Audience :: Developers", "Intended Audience :: Science/Research", "Topic :: Scientific/Engineering :: Artificial Intelligence", - "Topic :: Scientific/Engineering :: Natural Language Processing", "Topic :: Scientific/Engineering :: Information Analysis", "Natural Language :: Turkish", "Operating System :: OS Independent", @@ -110,4 +109,4 @@ ignore = [ ] # Exclude a variety of commonly ignored directories. exclude = [".git", "docs", "_notebooks"] -ignore-init-module-imports = true \ No newline at end of file +ignore-init-module-imports = true