Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci, docs: add linkcheck job, fix links #1705

Merged
merged 12 commits into from
Mar 5, 2021
Next Next commit
ci, docs: add linkcheck job, fix links
  • Loading branch information
ydcjeff committed Feb 25, 2021
commit fa176b972d5c596a5f2c399185e006e3180d456d
22 changes: 22 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ name: Build docs
on:
push:
branches: [master]
pull_request:
release:
types: [published]

jobs:
build-deploy:
if: github.event_name == 'push'
ydcjeff marked this conversation as resolved.
Show resolved Hide resolved
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -34,3 +36,23 @@ jobs:
publish_dir: docs/build/html
publish_branch: gh-pages
commit_message: Deploy pytorch/ignite docs

linkcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.7

- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: pip-${{ hashFiles('requirements-dev.txt') }}-${{ hashFiles('docs/requirements.txt') }}

- name: Install docs deps
run: bash .github/workflows/install_docs_deps.sh

- name: make linkcheck
working-directory: ./docs/
run: make linkcheck --jobs 2
6 changes: 3 additions & 3 deletions docs/source/about.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ been leading the development.

Governance
----------
PyTorch-Ignite is a [NumFOCUS Affiliated Project](https://www.numfocus.org/) and open-source community effort.
Project's affiliation to `PyTorch organization <https://github.com/pytorch>`_ is due to historical reasons and it
PyTorch-Ignite is a `NumFOCUS Affiliated Project <https://numfocus.org/>`_ and open-source community effort.
Project's affiliation to `PyTorch organization <https://github.com/pytorch>`_ is due to historical reasons and it
has the same implication to the project's governance as for other community projects from
`PyTorch Ecosystem <https://pytorch.org/ecosystem/>`_.

The decision making process and governance structure of the project is described in the `governance document <governance.html>`_.
The decision making process and governance structure of the project is described in the :ref:`governance document<PyTorch-Ignite governance>`.

Authors
-------
Expand Down
4 changes: 2 additions & 2 deletions docs/source/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ flexibility to the user to allow for this:

Events defined by user should inherit from :class:`~ignite.engine.events.EventEnum`

More detailed implementation can be found in `TBPTT Trainer <_modules/ignite/contrib/engines/tbptt.html#create_supervised_tbptt_trainer>`_.
More detailed implementation can be found in `TBPTT Trainer <./_modules/ignite/contrib/engines/tbptt.html#create_supervised_tbptt_trainer>`_.


Gradients accumulation
Expand Down Expand Up @@ -503,4 +503,4 @@ Other questions

Other questions and answers can be also found on the github among the issues labeled by
`question <https://github.com/pytorch/ignite/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3Aquestion+>`_ and on the forum
`Discuss.PyTorch <https://discuss.pytorch.org/c/ignite>`_, category "Ignite".
`Discuss.PyTorch <https://discuss.pytorch.org/c/ignite/15>`_, category "Ignite".
2 changes: 1 addition & 1 deletion ignite/contrib/handlers/lr_finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def attach(

to_save = {"model": model, "optimizer": optimizer}
with lr_finder.attach(trainer, to_save=to_save) as trainer_with_lr_finder:
trainer_with_lr_finder.run(dataloader)`
trainer_with_lr_finder.run(dataloader)

Args:
trainer: lr_finder is attached to this trainer. Please, keep in mind that all attached handlers
Expand Down
2 changes: 1 addition & 1 deletion ignite/contrib/handlers/neptune_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class NeptuneLogger(BaseLogger):
Args:
api_token: Required in online mode. Neputne API token, found on https://neptune.ai.
Read how to get your API key
https://docs.neptune.ai/python-api/tutorials/get-started.html#copy-api-token.
https://docs.neptune.ai/security-and-privacy/api-tokens/how-to-find-and-set-neptune-api-token.html.
project_name: Required in online mode. Qualified name of a project in a form of
"namespace/project_name" for example "tom/minst-classification".
If None, the value of NEPTUNE_PROJECT environment variable will be taken.
Expand Down
8 changes: 4 additions & 4 deletions ignite/contrib/handlers/visdom_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ class VisdomLogger(BaseLogger):
"""
VisdomLogger handler to log metrics, model/optimizer parameters, gradients during the training and validation.

This class requires `visdom <https://github.com/facebookresearch/visdom/>`_ package to be installed:
This class requires `visdom <https://github.com/fossasia/visdom/>`_ package to be installed:

.. code-block:: bash


pip install git+https://github.com/facebookresearch/visdom.git
pip install git+https://github.com/fossasia/visdom.git

Args:
server: visdom server URL. It can be also specified by environment variable `VISDOM_SERVER_URL`
Expand All @@ -44,7 +44,7 @@ class VisdomLogger(BaseLogger):
visdom server. Default, `num_workers=1`. If `num_workers=0` and logger uses the main thread. If using
Python 2.7 and `num_workers>0` the package `futures` should be installed: `pip install futures`
kwargs: kwargs to pass into
`visdom.Visdom <https://github.com/facebookresearch/visdom#visdom-arguments-python-only>`_.
`visdom.Visdom <https://github.com/fossasia/visdom#visdom-arguments-python-only>`_.

Note:
We can also specify username/password using environment variables: VISDOM_USERNAME, VISDOM_PASSWORD
Expand Down Expand Up @@ -153,7 +153,7 @@ def __init__(
raise RuntimeError(
"This contrib module requires visdom package. "
"Please install it with command:\n"
"pip install git+https://github.com/facebookresearch/visdom.git"
"pip install git+https://github.com/fossasia/visdom.git"
)

if num_workers > 0:
Expand Down
4 changes: 2 additions & 2 deletions ignite/contrib/handlers/wandb_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


class WandBLogger(BaseLogger):
"""`Weights & Biases <https://app.wandb.ai/>`_ handler to log metrics, model/optimizer parameters, gradients
"""`Weights & Biases <https://wandb.ai/site>`_ handler to log metrics, model/optimizer parameters, gradients
during training and validation. It can also be used to log model checkpoints to the Weights & Biases cloud.

.. code-block:: bash
Expand All @@ -23,7 +23,7 @@ class WandBLogger(BaseLogger):
Args:
args: Positional arguments accepted by `wandb.init`.
kwargs: Keyword arguments accepted by `wandb.init`.
Please see `wandb.init <https://docs.wandb.com/library/init>`_ for documentation of possible parameters.
Please see `wandb.init <https://docs.wandb.ai/library/init>`_ for documentation of possible parameters.

Examples:

Expand Down
4 changes: 2 additions & 2 deletions ignite/contrib/metrics/average_precision.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def average_precision_compute_fn(y_preds: torch.Tensor, y_targets: torch.Tensor)

class AveragePrecision(EpochMetric):
"""Computes Average Precision accumulating predictions and the ground-truth during an epoch
and applying `sklearn.metrics.average_precision_score <http://scikit-learn.org/stable/modules/generated/
and applying `sklearn.metrics.average_precision_score <https://scikit-learn.org/stable/modules/generated/
sklearn.metrics.average_precision_score.html#sklearn.metrics.average_precision_score>`_ .

Args:
Expand All @@ -27,7 +27,7 @@ class AveragePrecision(EpochMetric):
form expected by the metric. This can be useful if, for example, you have a multi-output model and
you want to compute the metric with respect to one of the outputs.
check_compute_fn (bool): Default False. If True, `average_precision_score
<http://scikit-learn.org/stable/modules/generated/sklearn.metrics.average_precision_score.html
<https://scikit-learn.org/stable/modules/generated/sklearn.metrics.average_precision_score.html
#sklearn.metrics.average_precision_score>`_ is run on the first batch of data to ensure there are
no issues. User will be warned in case there are any issues computing the function.

Expand Down
4 changes: 2 additions & 2 deletions ignite/contrib/metrics/precision_recall_curve.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def precision_recall_curve_compute_fn(y_preds: torch.Tensor, y_targets: torch.Te
class PrecisionRecallCurve(EpochMetric):
"""Compute precision-recall pairs for different probability thresholds for binary classification task
by accumulating predictions and the ground-truth during an epoch and applying
`sklearn.metrics.precision_recall_curve <http://scikit-learn.org/stable/modules/generated/
`sklearn.metrics.precision_recall_curve <https://scikit-learn.org/stable/modules/generated/
sklearn.metrics.precision_recall_curve.html#sklearn.metrics.precision_recall_curve>`_ .

Args:
Expand All @@ -28,7 +28,7 @@ class PrecisionRecallCurve(EpochMetric):
form expected by the metric. This can be useful if, for example, you have a multi-output model and
you want to compute the metric with respect to one of the outputs.
check_compute_fn (bool): Default False. If True, `precision_recall_curve
<http://scikit-learn.org/stable/modules/generated/sklearn.metrics.precision_recall_curve.html
<https://scikit-learn.org/stable/modules/generated/sklearn.metrics.precision_recall_curve.html
#sklearn.metrics.precision_recall_curve>`_ is run on the first batch of data to ensure there are
no issues. User will be warned in case there are any issues computing the function.

Expand Down
8 changes: 4 additions & 4 deletions ignite/contrib/metrics/roc_auc.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def roc_auc_curve_compute_fn(y_preds: torch.Tensor, y_targets: torch.Tensor) ->
class ROC_AUC(EpochMetric):
"""Computes Area Under the Receiver Operating Characteristic Curve (ROC AUC)
accumulating predictions and the ground-truth during an epoch and applying
`sklearn.metrics.roc_auc_score <http://scikit-learn.org/stable/modules/generated/
`sklearn.metrics.roc_auc_score <https://scikit-learn.org/stable/modules/generated/
sklearn.metrics.roc_auc_score.html#sklearn.metrics.roc_auc_score>`_ .

Args:
Expand All @@ -39,7 +39,7 @@ class ROC_AUC(EpochMetric):
form expected by the metric. This can be useful if, for example, you have a multi-output model and
you want to compute the metric with respect to one of the outputs.
check_compute_fn (bool): Default False. If True, `roc_curve
<http://scikit-learn.org/stable/modules/generated/sklearn.metrics.roc_auc_score.html#
<https://scikit-learn.org/stable/modules/generated/sklearn.metrics.roc_auc_score.html#
sklearn.metrics.roc_auc_score>`_ is run on the first batch of data to ensure there are
no issues. User will be warned in case there are any issues computing the function.

Expand All @@ -66,7 +66,7 @@ def __init__(self, output_transform: Callable = lambda x: x, check_compute_fn: b
class RocCurve(EpochMetric):
"""Compute Receiver operating characteristic (ROC) for binary classification task
by accumulating predictions and the ground-truth during an epoch and applying
`sklearn.metrics.roc_curve <http://scikit-learn.org/stable/modules/generated/
`sklearn.metrics.roc_curve <https://scikit-learn.org/stable/modules/generated/
sklearn.metrics.roc_curve.html#sklearn.metrics.roc_curve>`_ .

Args:
Expand All @@ -75,7 +75,7 @@ class RocCurve(EpochMetric):
form expected by the metric. This can be useful if, for example, you have a multi-output model and
you want to compute the metric with respect to one of the outputs.
check_compute_fn (bool): Default False. If True, `sklearn.metrics.roc_curve
<http://scikit-learn.org/stable/modules/generated/sklearn.metrics.roc_curve.html#
<https://scikit-learn.org/stable/modules/generated/sklearn.metrics.roc_curve.html#
sklearn.metrics.roc_curve>`_ is run on the first batch of data to ensure there are
no issues. User will be warned in case there are any issues computing the function.

Expand Down