From a3d99cab6bf5eb69be8d5eb48895da6edd859565 Mon Sep 17 00:00:00 2001 From: Richard Barnes Date: Sat, 26 Aug 2023 13:55:56 -0700 Subject: [PATCH] Del `(object)` from 200 inc vision/fair/mae_st/util/meters.py Summary: Python3 makes the use of `(object)` in class inheritance unnecessary. Let's modernize our code by eliminating this. Reviewed By: itamaro Differential Revision: D48673863 fbshipit-source-id: 032d6028371f0350252e6b731c74f0f5933c83cd --- pytorch3d/implicitron/tools/stats.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pytorch3d/implicitron/tools/stats.py b/pytorch3d/implicitron/tools/stats.py index a2d473e2..c49ba424 100644 --- a/pytorch3d/implicitron/tools/stats.py +++ b/pytorch3d/implicitron/tools/stats.py @@ -21,7 +21,7 @@ from pytorch3d.implicitron.tools.vis_utils import get_visdom_connection logger = logging.getLogger(__name__) -class AverageMeter(object): +class AverageMeter: """Computes and stores the average and current value""" def __init__(self): @@ -72,7 +72,7 @@ class AverageMeter(object): return self -class Stats(object): +class Stats: # TODO: update this with context manager """ stats logging object useful for gathering statistics of training a deep net in pytorch