Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Commit

Permalink
use one as starting iteration for logging
Browse files Browse the repository at this point in the history
  • Loading branch information
grace-omotoso authored and akainth015 committed Apr 8, 2021
1 parent a9764f1 commit 8a9d54f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions vissl/utils/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def get_event_storage():


def create_event_storage():
_VISSL_EVENT_STORAGE_STACK.append(VisslEventStorage())
_VISSL_EVENT_STORAGE_STACK.append(VisslEventStorage(1))


class VisslEventWriter:
Expand Down Expand Up @@ -125,7 +125,7 @@ def __init__(self, json_file):
json_file: path to the json file. New data will be appended if the file
exists.
"""
self._file_handle = PathManager.open(json_file, "a")
self._file_handle = PathManager.open(json_file, "w")

def write(self):
storage: VisslEventStorage = get_event_storage()
Expand Down
2 changes: 1 addition & 1 deletion vissl/utils/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def save_file(data, filename):
with PathManager.open(filename, "wb") as fopen:
np.save(fopen, data)
elif file_ext == ".json":
with PathManager.open(filename, "w") as fopen:
with PathManager.open(filename, "a") as fopen:
fopen.write(json.dumps(data, sort_keys=True) + "\n")
fopen.flush()
else:
Expand Down

0 comments on commit 8a9d54f

Please sign in to comment.