Skip to content

Commit

Permalink
Merge branch 'master' into tests-use-distributed-fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
vfdev-5 authored Oct 2, 2023
2 parents b6406ad + e6deb71 commit daf0b67
Show file tree
Hide file tree
Showing 22 changed files with 805 additions and 854 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/binaries-nightly-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
build-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/code-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- if: github.event_name == 'push'
uses: actions/checkout@v3
uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.8"
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
hvd_version: ${{ steps.set-versions.outputs.hvd_version }}
msdp_version: ${{ steps.set-versions.outputs.msdp_version }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Changed Files Exporter
id: files
uses: futuratrepadeira/[email protected]
Expand All @@ -41,7 +41,7 @@ jobs:
if: contains(needs.setup.outputs.modified, 'hvd/') || contains(needs.setup.outputs.modified, 'docker.cfg')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Remove cache
run: |
sudo rm -rf "/usr/local/share/boost"
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
if: contains(needs.setup.outputs.modified, 'hvd/') || contains(needs.setup.outputs.modified, 'docker.cfg')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Remove cache
run: |
sudo rm -rf "/usr/local/share/boost"
Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
if: contains(needs.setup.outputs.modified, 'main/') || contains(needs.setup.outputs.modified, 'docker.cfg')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Remove cache
run: |
sudo rm -rf "/usr/local/share/boost"
Expand Down Expand Up @@ -152,7 +152,7 @@ jobs:
if: contains(needs.setup.outputs.modified, 'main/') || contains(needs.setup.outputs.modified, 'docker.cfg')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Remove cache
run: |
sudo rm -rf "/usr/local/share/boost"
Expand Down Expand Up @@ -187,7 +187,7 @@ jobs:
if: contains(needs.setup.outputs.modified, 'msdp/') || contains(needs.setup.outputs.modified, 'docker.cfg')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Remove cache
run: |
sudo rm -rf "/usr/local/share/boost"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.8
# TODO
# TODO
6 changes: 3 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
if: (github.ref == 'refs/heads/master' && github.event_name == 'push') || github.event_name == 'release'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.8
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.8
Expand All @@ -69,7 +69,7 @@ jobs:
if: github.event_name == 'pull_request' || github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.8
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hvd-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
pytorch-channel: [pytorch]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Get year & week number
id: get-date
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pytorch-version-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
python-version: 3.10

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Get year & week number
id: get-date
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
needs: build
if: always() && needs.build.result == 'failure'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: JasonEtco/create-an-issue@v2
name: Create issue if pytorch version tests failed
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stable-release-anaconda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
conda-build-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/stable-release-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
build-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2
Expand Down Expand Up @@ -37,7 +37,7 @@ jobs:
# runs-on: ubuntu-latest

# steps:
# - uses: actions/checkout@v3
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v4
# with:
# python-version: 3.8
2 changes: 1 addition & 1 deletion .github/workflows/tpu-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
xla-version: [nightly]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
skip-distrib-tests: 1

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
Expand Down
20 changes: 10 additions & 10 deletions ignite/engine/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def _prepare_batch(
def supervised_training_step(
model: torch.nn.Module,
optimizer: torch.optim.Optimizer,
loss_fn: Union[Callable, torch.nn.Module],
loss_fn: Union[Callable[[Any, Any], torch.Tensor], torch.nn.Module],
device: Optional[Union[str, torch.device]] = None,
non_blocking: bool = False,
prepare_batch: Callable = _prepare_batch,
Expand All @@ -57,7 +57,7 @@ def supervised_training_step(
Args:
model: the model to train.
optimizer: the optimizer to use.
loss_fn: the loss function to use.
loss_fn: the loss function that receives `y_pred` and `y`, and returns the loss as a tensor.
device: device type specification (default: None).
Applies to batches after starting the engine. Model *will not* be moved.
Device can be CPU, GPU.
Expand Down Expand Up @@ -120,7 +120,7 @@ def update(engine: Engine, batch: Sequence[torch.Tensor]) -> Union[Any, Tuple[to
def supervised_training_step_amp(
model: torch.nn.Module,
optimizer: torch.optim.Optimizer,
loss_fn: Union[Callable, torch.nn.Module],
loss_fn: Union[Callable[[Any, Any], torch.Tensor], torch.nn.Module],
device: Optional[Union[str, torch.device]] = None,
non_blocking: bool = False,
prepare_batch: Callable = _prepare_batch,
Expand All @@ -134,7 +134,7 @@ def supervised_training_step_amp(
Args:
model: the model to train.
optimizer: the optimizer to use.
loss_fn: the loss function to use.
loss_fn: the loss function that receives `y_pred` and `y`, and returns the loss as a tensor.
device: device type specification (default: None).
Applies to batches after starting the engine. Model *will not* be moved.
Device can be CPU, GPU.
Expand Down Expand Up @@ -212,7 +212,7 @@ def update(engine: Engine, batch: Sequence[torch.Tensor]) -> Union[Any, Tuple[to
def supervised_training_step_apex(
model: torch.nn.Module,
optimizer: torch.optim.Optimizer,
loss_fn: Union[Callable, torch.nn.Module],
loss_fn: Union[Callable[[Any, Any], torch.Tensor], torch.nn.Module],
device: Optional[Union[str, torch.device]] = None,
non_blocking: bool = False,
prepare_batch: Callable = _prepare_batch,
Expand All @@ -225,7 +225,7 @@ def supervised_training_step_apex(
Args:
model: the model to train.
optimizer: the optimizer to use.
loss_fn: the loss function to use.
loss_fn: the loss function that receives `y_pred` and `y`, and returns the loss as a tensor.
device: device type specification (default: None).
Applies to batches after starting the engine. Model *will not* be moved.
Device can be CPU, GPU.
Expand Down Expand Up @@ -295,7 +295,7 @@ def update(engine: Engine, batch: Sequence[torch.Tensor]) -> Union[Any, Tuple[to
def supervised_training_step_tpu(
model: torch.nn.Module,
optimizer: torch.optim.Optimizer,
loss_fn: Union[Callable, torch.nn.Module],
loss_fn: Union[Callable[[Any, Any], torch.Tensor], torch.nn.Module],
device: Optional[Union[str, torch.device]] = None,
non_blocking: bool = False,
prepare_batch: Callable = _prepare_batch,
Expand All @@ -308,7 +308,7 @@ def supervised_training_step_tpu(
Args:
model: the model to train.
optimizer: the optimizer to use.
loss_fn: the loss function to use.
loss_fn: the loss function that receives `y_pred` and `y`, and returns the loss as a tensor.
device: device type specification (default: None).
Applies to batches after starting the engine. Model *will not* be moved.
Device can be CPU, TPU.
Expand Down Expand Up @@ -404,7 +404,7 @@ def _check_arg(
def create_supervised_trainer(
model: torch.nn.Module,
optimizer: torch.optim.Optimizer,
loss_fn: Union[Callable, torch.nn.Module],
loss_fn: Union[Callable[[Any, Any], torch.Tensor], torch.nn.Module],
device: Optional[Union[str, torch.device]] = None,
non_blocking: bool = False,
prepare_batch: Callable = _prepare_batch,
Expand All @@ -420,7 +420,7 @@ def create_supervised_trainer(
Args:
model: the model to train.
optimizer: the optimizer to use.
loss_fn: the loss function to use.
loss_fn: the loss function that receives `y_pred` and `y`, and returns the loss as a tensor.
device: device type specification (default: None).
Applies to batches after starting the engine. Model *will not* be moved.
Device can be CPU, GPU or TPU.
Expand Down
Loading

0 comments on commit daf0b67

Please sign in to comment.