Skip to content

Commit

Permalink
fix warning B908(2) in api_test.py
Browse files Browse the repository at this point in the history
Differential Revision: D53695249

Pull Request resolved: #821
  • Loading branch information
yikaiMeta authored Feb 13, 2024
1 parent a2800d4 commit 2845aec
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions torchx/runner/test/api_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,16 @@ def test_validate_no_resource(self, _) -> None:

def test_validate_invalid_replicas(self, _) -> None:
with self.get_runner() as runner:
role = Role(
"invalid replicas",
image="torch",
entrypoint="echo",
args=["hello_world"],
num_replicas=0,
resource=Resource(cpu=1, gpu=0, memMB=500),
)
app = AppDef("invalid replicas", roles=[role])
with self.assertRaises(ValueError):
role = Role(
"invalid replicas",
image="torch",
entrypoint="echo",
args=["hello_world"],
num_replicas=0,
resource=Resource(cpu=1, gpu=0, memMB=500),
)
app = AppDef("invalid replicas", roles=[role])
runner.run(app, scheduler="local_dir")

def test_run(self, _) -> None:
Expand Down

0 comments on commit 2845aec

Please sign in to comment.