File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
neural_structured_learning/tools Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ def _create_graph_file(self):
8787 return self .create_tempfile ('graph.tsv' ).full_path
8888
8989 def _num_file_lines (self , graph_path ):
90- with open (graph_path , 'rU ' ) as f :
90+ with open (graph_path , 'r ' ) as f :
9191 return sum (1 for _ in f )
9292
9393 def testBuildGraphInvalidLshBitsValue (self ):
Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ def read_tsv_graph(filename):
124124 logging .info ('Reading graph file: %s...' , filename )
125125 graph = {}
126126 edge_cnt = 0
127- with open (filename , 'rU ' ) as f :
127+ with open (filename , 'r ' ) as f :
128128 for tsv_line in f :
129129 edge = tsv_line .rstrip ('\n ' ).split ('\t ' )
130130 if add_edge (graph , edge ): edge_cnt += 1
You can’t perform that action at this time.
0 commit comments