Skip to content

Commit

Permalink
Merge pull request #4 from idiap/keyboard-interrupt
Browse files Browse the repository at this point in the history
Return correct error code 130 on keyboard interrupt
  • Loading branch information
eginhard committed May 3, 2024
2 parents 5b32333 + 2624e31 commit 159f90a
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 113 deletions.
2 changes: 1 addition & 1 deletion requirements.dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
black
black==24.2.0
coverage
isort
pytest
Expand Down
18 changes: 6 additions & 12 deletions tests/test_train_gan.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ def __init__(self):
self.generator = Generator(latent_dim=100, img_shape=data_shape)
self.discriminator = Discriminator(img_shape=data_shape)

def forward(self, x):
...
def forward(self, x): ...

def train_step(self, batch, criterion, optimizer_idx):
imgs, _ = batch
Expand Down Expand Up @@ -174,8 +173,7 @@ def __init__(self):
self.generator = Generator(latent_dim=100, img_shape=data_shape)
self.discriminator = Discriminator(img_shape=data_shape)

def forward(self, x):
...
def forward(self, x): ...

def train_step(self, batch, criterion, optimizer_idx):
imgs, _ = batch
Expand Down Expand Up @@ -271,8 +269,7 @@ def __init__(self):
self.generator = Generator(latent_dim=100, img_shape=data_shape)
self.discriminator = Discriminator(img_shape=data_shape)

def forward(self, x):
...
def forward(self, x): ...

def optimize(self, batch, trainer):
imgs, _ = batch
Expand Down Expand Up @@ -385,8 +382,7 @@ def __init__(self):
self.generator = Generator(latent_dim=100, img_shape=data_shape)
self.discriminator = Discriminator(img_shape=data_shape)

def forward(self, x):
...
def forward(self, x): ...

def optimize(self, batch, trainer):
imgs, _ = batch
Expand Down Expand Up @@ -502,11 +498,9 @@ def __init__(self):
self.generator = Generator(latent_dim=100, img_shape=data_shape)
self.discriminator = Discriminator(img_shape=data_shape)

def train_step():
...
def train_step(): ...

def forward(self, x):
...
def forward(self, x): ...

def optimize(self, batch, trainer):
imgs, _ = batch
Expand Down
2 changes: 1 addition & 1 deletion trainer/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.1.0
v0.1.1

0 comments on commit 159f90a

Please sign in to comment.