Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions sdks/python/apache_beam/ml/inference/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,7 @@ def with_postprocess_fn(

def with_no_batching(
self
) -> """ModelHandler[Union[
ExampleT, Iterable[ExampleT]], PostProcessT, ModelT, PostProcessT]""":
) -> 'ModelHandler[Union[ExampleT, Iterable[ExampleT]], PredictionT, ModelT]':
"""Returns a new ModelHandler which does not require batching
of inputs so that RunInference will skip this step. RunInference will
expect the input to be pre-batched and passed in as an Iterable of records.
Expand Down
5 changes: 4 additions & 1 deletion sdks/python/apache_beam/runners/portability/prism_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,10 @@ def _download_to_local_path(
except ValueError:
url_read = urlopen(url)
with open(cached_file + '.tmp', 'wb') as zip_write:
shutil.copyfileobj(url_read, zip_write, length=1 << 20)
shutil.copyfileobj(
typing.cast(typing.BinaryIO, url_read),
zip_write,
length=1 << 20)

_rename_if_different(cached_file + '.tmp', cached_file)
except URLError as e:
Expand Down
1 change: 0 additions & 1 deletion sdks/python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ invalid-argument = "ignore"
invalid-inheritance = "ignore"
not-iterable = "ignore"
unexpected-keyword = "ignore"
bad-specialization = "ignore"
invalid-yield = "ignore"
bad-argument-count = "ignore"
bad-typed-dict-key = "ignore"
Loading