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
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,9 @@ def load_batches(self):
run_name=self._run_name)


@six.add_metaclass(abc.ABCMeta)
class _EventSink(object):
"""Abstract sink for batches of serialized tf.Event data."""
__metaclass__ = abc.ABCMeta

@abc.abstractmethod
def write_batch(self, event_batch):
Expand Down
3 changes: 3 additions & 0 deletions tensorboard/plugins/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@ py_library(
srcs = ["base_plugin.py"],
srcs_version = "PY2AND3",
visibility = ["//visibility:public"],
deps = [
"@org_pythonhosted_six",
],
)
4 changes: 3 additions & 1 deletion tensorboard/plugins/base_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,13 @@
from __future__ import division
from __future__ import print_function

import six

from abc import ABCMeta
from abc import abstractmethod


@six.add_metaclass(ABCMeta)
class TBPlugin(object):
"""TensorBoard plugin interface.

Expand All @@ -44,7 +47,6 @@ class TBPlugin(object):
name must only contain characters among [A-Za-z0-9_.-], and must
be nonempty, or a ValueError will similarly be thrown.
"""
__metaclass__ = ABCMeta

plugin_name = None

Expand Down
1 change: 1 addition & 0 deletions tensorboard/plugins/beholder/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -143,5 +143,6 @@ py_library(
deps = [
":im_util",
"//tensorboard/util:tb_logging",
"@org_pythonhosted_six",
],
)
4 changes: 2 additions & 2 deletions tensorboard/plugins/beholder/video_writing.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import abc
import os
import six
import subprocess
import time

Expand Down Expand Up @@ -87,11 +88,10 @@ def finish(self):
self.output_index = 0


@six.add_metaclass(abc.ABCMeta)
class VideoOutput(object):
"""Base class for video outputs supported by VideoWriter."""

__metaclass__ = abc.ABCMeta

# Would add @abc.abstractmethod in python 3.3+
@classmethod
def available(cls):
Expand Down
2 changes: 1 addition & 1 deletion tensorboard/program.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,9 @@ def _make_server(self):
return self.server_class(app, self.flags)


@six.add_metaclass(ABCMeta)
class TensorBoardServer(object):
"""Class for customizing TensorBoard WSGI app serving."""
__metaclass__ = ABCMeta

@abstractmethod
def __init__(self, wsgi_app, flags):
Expand Down