Skip to content

Commit 8c67e1f

Browse files
Pyre Bot Jr.facebook-github-bot
Pyre Bot Jr.
authored andcommitted
upgrade pyre version in fbcode/torchx - batch 1 (#942)
Summary: Pull Request resolved: #942 Differential Revision: D60994060
1 parent 86f4344 commit 8c67e1f

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

torchx/examples/apps/tracker/main.py

+2
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ def test(
9999
for data, target in test_loader:
100100
data, target = data.to(device), target.to(device)
101101
output = model(data)
102+
# pyre-fixme[58]: `+` is not supported for operand types `int` and
103+
# `Union[bool, float, int]`.
102104
test_loss += F.nll_loss(
103105
output, target, reduction="sum"
104106
).item() # sum up batch loss

torchx/pipelines/kfp/adapter.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ def component_spec_from_app(app: api.AppDef) -> Tuple[str, api.Role]:
5050

5151
role = app.roles[0]
5252
assert (
53-
role.num_replicas == 1
53+
role.num_replicas
54+
== 1
55+
# pyre-fixme[16]: `AppDef` has no attribute `num_replicas`.
5456
), f"KFP adapter only supports one replica, got {app.num_replicas}"
5557

5658
command = [role.entrypoint, *role.args]

torchx/schedulers/aws_batch_scheduler.py

+2
Original file line numberDiff line numberDiff line change
@@ -809,6 +809,8 @@ def _stream_events(
809809
startFromHead=True,
810810
**args,
811811
)
812+
# pyre-fixme[66]: Exception handler type annotation `unknown` must
813+
# extend BaseException.
812814
except self._log_client.exceptions.ResourceNotFoundException:
813815
return [] # noqa: B901
814816
if response["nextForwardToken"] == next_token:

0 commit comments

Comments
 (0)