diff --git a/.github/workflows/jupyter-book.yml b/.github/workflows/jupyter-book.yml index 1cb68fb..3bdb9e7 100644 --- a/.github/workflows/jupyter-book.yml +++ b/.github/workflows/jupyter-book.yml @@ -1,22 +1,22 @@ -# name: jupyter-book +name: jupyter-book -# # Only run this when the master branch changes -# on: -# push: -# branches: -# - main +# Only run this when the master branch changes +on: + push: + branches: + - main -# # This job installs dependencies, build the book, and pushes it to `gh-pages` -# jobs: -# deploy-book: -# runs-on: ubuntu-latest -# steps: -# # Install dependencies -# - uses: actions/checkout@v3 -# - uses: actions/setup-python@v3 -# with: -# python-version: 3.7 -# - run: pip install jupyter-book +# This job installs dependencies, build the book, and pushes it to `gh-pages` +jobs: + deploy-book: + runs-on: ubuntu-latest + steps: + # Install dependencies + - uses: actions/checkout@v3 + - uses: actions/setup-python@v3 + with: + python-version: 3.7 + - run: pip install jupyter-book # # Build the book # - name: Build the book diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 858c3df..46c50f2 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -7,6 +7,25 @@ on: workflow_dispatch: jobs: + build: + name: Build wheel distribution + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3.7 + - name: Build a binary wheel and a source tarball + run: | + pip install wheel + python setup.py sdist bdist_wheel + - name: Store the distribution packages + uses: actions/upload-artifact@v3 + with: + name: python-package-distributions + path: dist/ + pypi-publish: name: upload to pypi runs-on: ubuntu-latest @@ -16,6 +35,10 @@ jobs: # IMPORTANT: this permission is mandatory for trusted publishing id-token: write steps: - # retrieve your distributions here + - name: Download all the dists + uses: actions/download-artifact@v3 + with: + name: python-package-distributions + path: dist/ - name: Publish package distributions to pypi uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/fuxictr/pytorch/models/rank_model.py b/fuxictr/pytorch/models/rank_model.py index 46468af..2a5da95 100644 --- a/fuxictr/pytorch/models/rank_model.py +++ b/fuxictr/pytorch/models/rank_model.py @@ -177,7 +177,7 @@ def checkpoint_and_earlystop(self, logs, min_delta=1e-6): self.save_weights(self.checkpoint) if self._stopping_steps >= self._early_stop_patience: self._stop_training = True - logging.info("********* Epoch=={} early stop *********".format(self._epoch_index + 1)) + logging.info("********* Epoch={} early stop *********".format(self._epoch_index + 1)) if not self._save_best_only: self.save_weights(self.checkpoint)