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 d392da4..f9fd717 100644 --- a/docs/index.md +++ b/docs/index.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) 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