Skip to content

Commit

Permalink
ypf
Browse files Browse the repository at this point in the history
  • Loading branch information
awaelchli committed Jun 12, 2021
1 parent b0c0b07 commit 0f17119
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
9 changes: 7 additions & 2 deletions pytorch_lightning/trainer/connectors/checkpoint_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,13 @@

import pytorch_lightning
from pytorch_lightning.core.lightning import LightningModule
from pytorch_lightning.utilities import _OMEGACONF_AVAILABLE, DeviceType, rank_zero_info, rank_zero_warn, \
rank_zero_deprecation
from pytorch_lightning.utilities import (
_OMEGACONF_AVAILABLE,
DeviceType,
rank_zero_deprecation,
rank_zero_info,
rank_zero_warn,
)
from pytorch_lightning.utilities.cloud_io import atomic_save, get_filesystem
from pytorch_lightning.utilities.cloud_io import load as pl_load
from pytorch_lightning.utilities.exceptions import MisconfigurationException
Expand Down
7 changes: 1 addition & 6 deletions tests/trainer/connectors/test_checkpoint_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import os
from pathlib import Path

import torch

Expand Down Expand Up @@ -87,11 +86,7 @@ def test_hpc_restore_attempt(tmpdir):
torch.nn.init.constant_(param, 0)

# case 2: explicit resume path provided, restore hpc anyway
trainer = Trainer(
default_root_dir=tmpdir,
max_steps=3,
resume_from_checkpoint="not existing"
)
trainer = Trainer(default_root_dir=tmpdir, max_steps=3, resume_from_checkpoint="not existing")
trainer.fit(model)

for param in model.parameters():
Expand Down

0 comments on commit 0f17119

Please sign in to comment.