Skip to content
Merged
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
4 changes: 2 additions & 2 deletions morph_net/framework/generic_regularizers.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import abc


class NetworkRegularizer(object): # pytype: disable=ignored-metaclass
class NetworkRegularizer(object):
"""An interface for Network Regularizers."""
__metaclass__ = abc.ABCMeta

Expand Down Expand Up @@ -73,7 +73,7 @@ def cost_name(self):
return ''


class OpRegularizer(object): # pytype: disable=ignored-metaclass
class OpRegularizer(object):
"""An interface for Op Regularizers.

An OpRegularizer object corresponds to a tf.Operation, and provides
Expand Down
4 changes: 2 additions & 2 deletions morph_net/tools/structure_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def save_alive_counts(self, f: IO[bytes]) -> None:
Args:
f: a file object where alive counts are saved.
"""
f.write(format_structure(self.get_alive_counts())) # pytype: disable=wrong-arg-types
f.write(format_structure(self.get_alive_counts())) # pyrefly: ignore[no-matching-overload]

def create_file_and_save_alive_counts(self, base_dir: Text,
global_step: int) -> None:
Expand All @@ -144,7 +144,7 @@ def create_file_and_save_alive_counts(self, base_dir: Text,
# Probably already exists. If not, we'll see the error in the next line.
pass
with tf.gfile.Open(os.path.join(directory, current_filename), 'w') as f:
self.save_alive_counts(f) # pytype: disable=wrong-arg-types
self.save_alive_counts(f)


# TODO(p1): maybe check that we still end up with unique names after prefix
Expand Down
Loading