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
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)
return ret_events
def plot(self, event_names, x_axis="step"):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
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: 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: list_events
Project Name: snipsco/snips-nlu
Commit Name: 55930f33c1a7d6fba14a9aa2accc8867395e0d4c
Time: 2017-02-24
Author: clement.doumouro@snips.ai
File Name: custom_intent_parser/entity_extractor/regex_entity_extractor.py
Class Name: RegexEntityExtractor
Method Name: fit