7a5f3c1751bc31f0bd5406bab04845461dd8c88a,google/datalab/ml/_summary.py,Summary,get_events,#Summary#Any#,85
Before Change
index = event_names.index(value.tag)
dir_event_dict = ret_events[index]
if dir not in dir_event_dict:
dir_event_dict[dir] = pd.DataFrame(
[[event_time, event.step, value.simple_value]],
columns=["time", "step", "value"])
else:
df = dir_event_dict[dir]
// Append a row.
df.loc[len(df)] = [event_time, event.step, value.simple_value]
except:
// It seems current TF (1.0) has a bug when iterating events from a file near the end.
// For now just catch and pass.
// print("Error in iterating events from file " + event_file)
After Change
df = dir_event_dict[dir]
df.loc[len(df)] = [event_time, event.step, value.simple_value]
for idx, dir_event_dict in enumerate(ret_events):
for df in dir_event_dict.values():
df.sort_values(by=["time"], inplace=True)
ret_events[idx] = dict(dir_event_dict)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 3
Instances
Project Name: googledatalab/pydatalab
Commit Name: 7a5f3c1751bc31f0bd5406bab04845461dd8c88a
Time: 2017-08-08
Author: qimingj@users.noreply.github.com
File Name: google/datalab/ml/_summary.py
Class Name: Summary
Method Name: get_events
Project Name: facebookresearch/pythia
Commit Name: 2f337387d6759627bae60284e7fa612268580724
Time: 2020-09-15
Author: vedanujg@gmail.com
File Name: mmf/models/mmf_transformer.py
Class Name: MMFTransformerEmbeddings
Method Name: forward
Project Name: lanpa/tensorboardX
Commit Name: 5619f0a742cfee882b51b6798215362e227c2732
Time: 2018-04-28
Author: huang.dexter@gmail.com
File Name: tensorboardX/graph.py
Class Name:
Method Name: parse
Project Name: ray-project/ray
Commit Name: eb0038612f3cbb8def1a99e4464be41285bccb35
Time: 2021-02-08
Author: sven@anyscale.io
File Name: rllib/tests/test_supported_spaces.py
Class Name:
Method Name: check_support