Skip to content

Commit

Permalink
Clean up OOM Observer Remote Uploader Download Path (#3070)
Browse files Browse the repository at this point in the history
  • Loading branch information
j316chuck authored and Chuck Tang committed May 16, 2024
1 parent 2e1db9f commit 41e745a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion composer/callbacks/oom_observer.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ def oom_observer(device: int, alloc: int, device_alloc: int, device_free: int):
snapshot_file, trace_plot_file, segment_plot_file, segment_flamegraph_file,
memory_flamegraph_file
]:
remote_file_name = (self.remote_path_in_bucket + os.path.basename(f)).lstrip('/')
base_file_name = os.path.basename(f)
remote_file_name = os.path.join(self.remote_path_in_bucket, base_file_name)
remote_file_name = remote_file_name.lstrip('/') # remove leading slashes
log.info(f'Uploading memory visualization to remote: {remote_file_name} from {f}')
try:
logger.upload_file(remote_file_name=remote_file_name, file_path=f, overwrite=self.overwrite)
Expand Down

0 comments on commit 41e745a

Please sign in to comment.