Skip to content

add handling of different lengths of scalarTags and correct Usage in ReadMe #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Tested on TensorFlow version 0.11.0, 1.1.0 and 1.3.0 and Python 2.7 and 3.6.
## Usage

```
python readLogs.py <output-folder> <output-path-to-csv> <summaries>
python readLogs.py <input-path-to-logfile> <output-folder> <summaries>

Inputs:
<input-path-to-logfile> - Path to TensorFlow logfile.
Expand Down
8 changes: 6 additions & 2 deletions exportTensorFlowLog.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,12 @@ def exitWithUsage():
data = [v.wall_time, v.step];
for s in scalarTags:
scalarTag = ea.Scalars(s);
S = scalarTag[i];
data.append(S.value);
if i < len(scalarTag):
S = scalarTag[i];
data.append(S.value);
else:
print("ScalarTag {} is too short - writing NaN".format(s))
data.append(math.nan)
logWriter.writerow(data);

print(' ');
Expand Down