Skip to content

Commit 7efdfed

Browse files
committed
fix: unused variable, file size using Pathlib
1 parent 24f8811 commit 7efdfed

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

compressai_vision/pipelines/remote_inference/video_remote_inference.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def __call__(
154154
len(bin_files) == 1
155155
), f"Error, multiple bitstream files matching {self.bitstream_name}*"
156156
res["bitstream"] = bin_files[0]
157-
bitstream_bytes = res["bitstream"].stat().st_size
157+
# bitstream_bytes = res["bitstream"].stat().st_size
158158

159159
# Feature Deompression
160160
start = time_measure()
@@ -198,7 +198,7 @@ def __call__(
198198
) # Assuming one qp will be used
199199

200200
if not isinstance(res["bitstream"], dict):
201-
out_res["bytes"] = os.stat(res["bitstream"]).st_size / len(dataloader)
201+
out_res["bytes"] = Path(res["bitstream"]).stat().st_size / len(dataloader)
202202
else:
203203
assert len(res["bytes"]) == len(dataloader)
204204
out_res["bytes"] = res["bytes"][e]

compressai_vision/pipelines/split_inference/video_split_inference.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ def __call__(
232232
len(bin_files) == 1
233233
), f"Error, decode_only mode, multiple bitstream files matching {self.bitstream_name}*"
234234
res["bitstream"] = bin_files[0]
235-
bitstream_bytes = res["bitstream"].stat().st_size
235+
# bitstream_bytes = res["bitstream"].stat().st_size
236236

237237
# Feature Deompression
238238
start = time_measure()

0 commit comments

Comments
 (0)