diff --git a/.travis.yml b/.travis.yml index ab26d281..5f9fb6b7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,11 +22,6 @@ language: python matrix: - include: - - name: "Python 2.7 on Xenial Linux" - python: 2.7 - dist: xenial - - name: "Python 3.5 on Xenial Linux" python: 3.5 dist: xenial diff --git a/README.md b/README.md index 4e57b95c..020bc279 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +## Note: Python 2.x support has officially been dropped. + # Berkeley AUTOLAB's GQCNN Package

@@ -10,10 +12,7 @@ Software License - Python 2 Version - - - Python 2 Version + Python 3 Versions

diff --git a/docker/cpu/Dockerfile b/docker/cpu/Dockerfile index de72ac74..68fb5ddd 100644 --- a/docker/cpu/Dockerfile +++ b/docker/cpu/Dockerfile @@ -10,9 +10,7 @@ ARG work_dir=/root/Workspace RUN apt-get update && apt-get install -y \ build-essential \ python3 \ - python-dev \ python3-dev \ - python-tk \ python3-tk \ python-opengl \ curl \ @@ -33,9 +31,6 @@ RUN curl -L http://download.osgeo.org/libspatialindex/spatialindex-src-1.8.5.tar cd .. # Install pip (`apt-get install python-pip` causes trouble w/ networkx). -RUN curl -O https://bootstrap.pypa.io/get-pip.py && \ - python get-pip.py && \ - rm get-pip.py RUN curl -O https://bootstrap.pypa.io/get-pip.py && \ python3 get-pip.py && \ rm get-pip.py @@ -50,14 +45,11 @@ WORKDIR ${work_dir} ADD docker/gqcnn.tar . # This is because `python setup.py develop` skips `install_requires` (I think). -RUN python -m pip install -r gqcnn/requirements/p2/cpu_requirements.txt -RUN python3 -m pip install -r gqcnn/requirements/p3/cpu_requirements.txt +RUN python3 -m pip install -r gqcnn/requirements/cpu_requirements.txt # Install the library in editable mode because it's more versatile (in case we want to develop or if users want to modify things) # Keep the egg outside of the library in site-packages in case we want to mount the library (overwriting it) for development with docker ENV PYTHONPATH ${work_dir}/gqcnn -WORKDIR /usr/local/lib/python2.7/site-packages/ -RUN python ${work_dir}/gqcnn/setup.py develop --docker WORKDIR /usr/local/lib/python3.5/site-packages/ RUN python3 ${work_dir}/gqcnn/setup.py develop --docker diff --git a/docker/gpu/Dockerfile b/docker/gpu/Dockerfile index cccdd48f..bedbd45f 100644 --- a/docker/gpu/Dockerfile +++ b/docker/gpu/Dockerfile @@ -10,9 +10,7 @@ ARG work_dir=/root/Workspace RUN apt-get update && apt-get install -y \ build-essential \ python3 \ - python-dev \ python3-dev \ - python-tk \ python3-tk \ python-opengl \ curl \ @@ -33,9 +31,6 @@ RUN curl -L http://download.osgeo.org/libspatialindex/spatialindex-src-1.8.5.tar cd .. # Install pip (`apt-get install python-pip` causes trouble w/ networkx). -RUN curl -O https://bootstrap.pypa.io/get-pip.py && \ - python get-pip.py && \ - rm get-pip.py RUN curl -O https://bootstrap.pypa.io/get-pip.py && \ python3 get-pip.py && \ rm get-pip.py @@ -50,16 +45,13 @@ WORKDIR ${work_dir} ADD docker/gqcnn.tar . # This is because `python setup.py develop` skips install_requires (I think) and also because we want to explicitly use the GPU requirements. -RUN python -m pip install -r gqcnn/requirements/p2/gpu_requirements.txt -RUN python3 -m pip install -r gqcnn/requirements/p3/gpu_requirements.txt +RUN python3 -m pip install -r gqcnn/requirements/gpu_requirements.txt # Install the library in editable mode because it's more versatile (in case we want to develop or if users want to modify things) # Keep the egg outside of the library in site-packages in case we want to mount the library (overwriting it) for development with docker ENV PYTHONPATH ${work_dir}/gqcnn -WORKDIR /usr/local/lib/python2.7/site-packages/ -RUN python ${work_dir}/gqcnn/setup.py develop --docker WORKDIR /usr/local/lib/python3.5/site-packages/ RUN python3 ${work_dir}/gqcnn/setup.py develop --docker -# Move to the base library dir +# Move to the base library dir WORKDIR ${work_dir}/gqcnn diff --git a/docs/source/install/install.rst b/docs/source/install/install.rst index 566db663..f9284a9f 100644 --- a/docs/source/install/install.rst +++ b/docs/source/install/install.rst @@ -4,7 +4,7 @@ Prerequisites Python """""" -The `gqcnn` package has only been tested with `Python 2.7`, `Python 3.5`, `Python 3.6`, and `Python 3.7`. +The `gqcnn` package has only been tested with `Python 3.5`, `Python 3.6`, and `Python 3.7`. Ubuntu """""" diff --git a/examples/antipodal_grasp_sampling.py b/examples/antipodal_grasp_sampling.py index 30654d60..ab41af11 100644 --- a/examples/antipodal_grasp_sampling.py +++ b/examples/antipodal_grasp_sampling.py @@ -30,10 +30,6 @@ ------ Jeff Mahler """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import argparse import os diff --git a/examples/policy.py b/examples/policy.py index 31c67a52..aeb8d549 100644 --- a/examples/policy.py +++ b/examples/policy.py @@ -31,10 +31,6 @@ ------ Jeff Mahler & Vishal Satish """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import argparse import json import os diff --git a/examples/policy_ros.py b/examples/policy_ros.py index ac1018a6..b5fcd7d0 100644 --- a/examples/policy_ros.py +++ b/examples/policy_ros.py @@ -29,10 +29,6 @@ ------ Jeff Mahler """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import argparse import logging import numpy as np diff --git a/examples/policy_with_image_proc.py b/examples/policy_with_image_proc.py index 43eee40a..61b71c9e 100644 --- a/examples/policy_with_image_proc.py +++ b/examples/policy_with_image_proc.py @@ -29,10 +29,6 @@ ------ Jeff Mahler """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import argparse import os import time diff --git a/gqcnn/__init__.py b/gqcnn/__init__.py index 59c380bf..1d763bf9 100644 --- a/gqcnn/__init__.py +++ b/gqcnn/__init__.py @@ -22,10 +22,6 @@ HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - from .model import get_gqcnn_model, get_fc_gqcnn_model from .training import get_gqcnn_trainer from .grasping import (RobustGraspingPolicy, UniformRandomGraspingPolicy, diff --git a/gqcnn/analysis/__init__.py b/gqcnn/analysis/__init__.py index 9dff9c2a..049bb832 100644 --- a/gqcnn/analysis/__init__.py +++ b/gqcnn/analysis/__init__.py @@ -22,10 +22,6 @@ HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - from .analyzer import GQCNNAnalyzer __all__ = ["GQCNNAnalyzer"] diff --git a/gqcnn/analysis/analyzer.py b/gqcnn/analysis/analyzer.py index e1b9b01d..0221907f 100644 --- a/gqcnn/analysis/analyzer.py +++ b/gqcnn/analysis/analyzer.py @@ -28,10 +28,6 @@ ------ Jeff Mahler """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import json import logging import os diff --git a/gqcnn/grasping/__init__.py b/gqcnn/grasping/__init__.py index 7151f43d..ee97a7b3 100644 --- a/gqcnn/grasping/__init__.py +++ b/gqcnn/grasping/__init__.py @@ -22,10 +22,6 @@ HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - from .grasp import Grasp2D, SuctionPoint2D, MultiSuctionPoint2D from .grasp_quality_function import (GraspQualityFunctionFactory, GQCnnQualityFunction) diff --git a/gqcnn/grasping/actions.py b/gqcnn/grasping/actions.py index dd43511a..8532e65e 100644 --- a/gqcnn/grasping/actions.py +++ b/gqcnn/grasping/actions.py @@ -28,13 +28,8 @@ ------ Jeff Mahler """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function +from abc import ABC, abstractmethod -from abc import ABCMeta, abstractmethod - -from future.utils import with_metaclass import numpy as np from autolab_core import Point @@ -42,8 +37,8 @@ from .grasp import Grasp2D, SuctionPoint2D, MultiSuctionPoint2D -class Action(with_metaclass(ABCMeta, object)): - """Abstract action class. +class Action(object): + """Base action class. Attributes ---------- @@ -78,8 +73,8 @@ class NoAction(Action): pass -class GraspAction3D(with_metaclass(ABCMeta, Action)): - """Abstract grasp class with grasp specified as an end-effector pose. +class GraspAction3D(ABC, Action): + """Base grasp class with grasp specified as an end-effector pose. Attributes ---------- diff --git a/gqcnn/grasping/constraint_fn.py b/gqcnn/grasping/constraint_fn.py index 670e52be..78755398 100644 --- a/gqcnn/grasping/constraint_fn.py +++ b/gqcnn/grasping/constraint_fn.py @@ -28,17 +28,12 @@ ------ Jeff Mahler """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function +from abc import ABC, abstractmethod -from abc import ABCMeta, abstractmethod - -from future.utils import with_metaclass import numpy as np -class GraspConstraintFn(with_metaclass(ABCMeta, object)): +class GraspConstraintFn(ABC): """Abstract constraint functions for grasp sampling.""" def __init__(self, config): diff --git a/gqcnn/grasping/grasp.py b/gqcnn/grasping/grasp.py index 02199026..30ec357a 100644 --- a/gqcnn/grasping/grasp.py +++ b/gqcnn/grasping/grasp.py @@ -28,10 +28,6 @@ ------ Jeff Mahler """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import numpy as np from autolab_core import Point, RigidTransform diff --git a/gqcnn/grasping/grasp_quality_function.py b/gqcnn/grasping/grasp_quality_function.py index 5d5637e2..c54e8d49 100644 --- a/gqcnn/grasping/grasp_quality_function.py +++ b/gqcnn/grasping/grasp_quality_function.py @@ -29,15 +29,10 @@ ------- Jason Liu & Jeff Mahler """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - -from abc import ABCMeta, abstractmethod +from abc import ABC, abstractmethod from time import time import cv2 -from future.utils import with_metaclass import matplotlib.pyplot as plt import numpy as np @@ -50,7 +45,7 @@ from ..utils import GeneralConstants, GripperMode -class GraspQualityFunction(with_metaclass(ABCMeta, object)): +class GraspQualityFunction(ABC): """Abstract grasp quality class.""" def __init__(self): diff --git a/gqcnn/grasping/image_grasp_sampler.py b/gqcnn/grasping/image_grasp_sampler.py index 2a0e188b..18c6b786 100644 --- a/gqcnn/grasping/image_grasp_sampler.py +++ b/gqcnn/grasping/image_grasp_sampler.py @@ -29,15 +29,10 @@ ------ Jeff Mahler & Sherdil Niyaz """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - -from abc import ABCMeta, abstractmethod +from abc import ABC, abstractmethod import random from time import time -from future.utils import with_metaclass import matplotlib.pyplot as plt import numpy as np import scipy.ndimage.filters as snf @@ -74,7 +69,7 @@ class DepthSamplingMode(object): MAX = "max" -class ImageGraspSampler(with_metaclass(ABCMeta, object)): +class ImageGraspSampler(ABC): """Wraps image to crane grasp candidate generation for easy deployment of GQ-CNN. diff --git a/gqcnn/grasping/policy/__init__.py b/gqcnn/grasping/policy/__init__.py index 68debf8a..dfeec716 100644 --- a/gqcnn/grasping/policy/__init__.py +++ b/gqcnn/grasping/policy/__init__.py @@ -22,10 +22,6 @@ HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - from .fc_policy import (FullyConvolutionalGraspingPolicyParallelJaw, FullyConvolutionalGraspingPolicySuction) from .policy import (RobustGraspingPolicy, CrossEntropyRobustGraspingPolicy, diff --git a/gqcnn/grasping/policy/enums.py b/gqcnn/grasping/policy/enums.py index ecd283c8..fa53c62e 100644 --- a/gqcnn/grasping/policy/enums.py +++ b/gqcnn/grasping/policy/enums.py @@ -28,9 +28,6 @@ ------ Vishal Satish """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function class SamplingMethod(object): diff --git a/gqcnn/grasping/policy/fc_policy.py b/gqcnn/grasping/policy/fc_policy.py index 92d7e791..5987a105 100644 --- a/gqcnn/grasping/policy/fc_policy.py +++ b/gqcnn/grasping/policy/fc_policy.py @@ -28,14 +28,9 @@ ------ Vishal Satish """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - -from abc import abstractmethod, ABCMeta +from abc import abstractmethod import os -from future.utils import with_metaclass import matplotlib.pyplot as plt import numpy as np @@ -50,8 +45,7 @@ from .policy import GraspingPolicy, GraspAction -class FullyConvolutionalGraspingPolicy(with_metaclass(ABCMeta, - GraspingPolicy)): +class FullyConvolutionalGraspingPolicy(GraspingPolicy): """Abstract grasp sampling policy class using Fully-Convolutional GQ-CNN network.""" diff --git a/gqcnn/grasping/policy/policy.py b/gqcnn/grasping/policy/policy.py index 01187f0f..c6b00b3b 100644 --- a/gqcnn/grasping/policy/policy.py +++ b/gqcnn/grasping/policy/policy.py @@ -28,18 +28,13 @@ ------ Jeff Mahler """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - -from abc import ABCMeta, abstractmethod +from abc import ABC, abstractmethod import copy import pickle as pkl import math import os from time import time -from future.utils import with_metaclass import matplotlib.pyplot as plt import numpy as np import scipy.ndimage.filters as snf @@ -220,7 +215,7 @@ def load(save_dir): return GraspAction(grasp, q_value, image) -class Policy(with_metaclass(ABCMeta, object)): +class Policy(ABC): """Abstract policy class.""" def __call__(self, state): @@ -233,7 +228,7 @@ def action(self, state): pass -class GraspingPolicy(with_metaclass(ABCMeta, Policy)): +class GraspingPolicy(Policy): """Policy for robust grasping with Grasp Quality Convolutional Neural Networks (GQ-CNN).""" diff --git a/gqcnn/model/__init__.py b/gqcnn/model/__init__.py index d120daa1..59763773 100644 --- a/gqcnn/model/__init__.py +++ b/gqcnn/model/__init__.py @@ -25,10 +25,6 @@ Factory functions to obtain `GQCNN`/`FCGQCNN` class based on backend. Author: Vishal Satish """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - from .tf import GQCNNTF, FCGQCNNTF from autolab_core import Logger diff --git a/gqcnn/model/tf/__init__.py b/gqcnn/model/tf/__init__.py index a9c62a86..9a70fc65 100644 --- a/gqcnn/model/tf/__init__.py +++ b/gqcnn/model/tf/__init__.py @@ -22,10 +22,6 @@ HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - from .network_tf import GQCNNTF from .fc_network_tf import FCGQCNNTF diff --git a/gqcnn/model/tf/fc_network_tf.py b/gqcnn/model/tf/fc_network_tf.py index ef7dee87..99722c2f 100644 --- a/gqcnn/model/tf/fc_network_tf.py +++ b/gqcnn/model/tf/fc_network_tf.py @@ -28,10 +28,6 @@ ------ Vishal Satish """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - from collections import OrderedDict import json import os diff --git a/gqcnn/model/tf/network_tf.py b/gqcnn/model/tf/network_tf.py index 8b90d135..4b80078f 100644 --- a/gqcnn/model/tf/network_tf.py +++ b/gqcnn/model/tf/network_tf.py @@ -28,10 +28,6 @@ ------ Vishal Satish & Jeff Mahler """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - from collections import OrderedDict import errno from functools import reduce diff --git a/gqcnn/search/__init__.py b/gqcnn/search/__init__.py index 6cdbab6c..49b26ff6 100644 --- a/gqcnn/search/__init__.py +++ b/gqcnn/search/__init__.py @@ -22,10 +22,6 @@ HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - from .search import GQCNNSearch __all__ = ["GQCNNSearch"] diff --git a/gqcnn/search/enums.py b/gqcnn/search/enums.py index 184e5ab5..95ad6373 100644 --- a/gqcnn/search/enums.py +++ b/gqcnn/search/enums.py @@ -28,9 +28,6 @@ ------ Vishal Satish """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function class TrialConstants(object): diff --git a/gqcnn/search/resource_manager.py b/gqcnn/search/resource_manager.py index 2de1b8f4..60a0bcf8 100644 --- a/gqcnn/search/resource_manager.py +++ b/gqcnn/search/resource_manager.py @@ -29,10 +29,6 @@ ------ Vishal Satish """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import math import random import time diff --git a/gqcnn/search/search.py b/gqcnn/search/search.py index 85b252a8..07998979 100644 --- a/gqcnn/search/search.py +++ b/gqcnn/search/search.py @@ -30,10 +30,6 @@ ------ Vishal Satish """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import os import time diff --git a/gqcnn/search/trial.py b/gqcnn/search/trial.py index 10592a85..1c963882 100644 --- a/gqcnn/search/trial.py +++ b/gqcnn/search/trial.py @@ -28,17 +28,12 @@ ------ Vishal Satish """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - -from abc import abstractmethod, ABCMeta +from abc import ABC, abstractmethod import json import multiprocessing import os import sys -from future.utils import with_metaclass import numpy as np from ..model import get_gqcnn_model @@ -54,7 +49,7 @@ class TrialStatus: EXCEPTION = "exception" -class GQCNNTrialWithAnalysis(with_metaclass(ABCMeta, object)): +class GQCNNTrialWithAnalysis(ABC): def __init__(self, analysis_cfg, train_cfg, dataset_dir, split_name, output_dir, model_name, hyperparam_summary): self._analysis_cfg = analysis_cfg diff --git a/gqcnn/search/utils.py b/gqcnn/search/utils.py index 673d43db..f6b5af6d 100644 --- a/gqcnn/search/utils.py +++ b/gqcnn/search/utils.py @@ -28,10 +28,6 @@ ------ Vishal Satish """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - from collections import OrderedDict, defaultdict import copy from datetime import datetime diff --git a/gqcnn/training/__init__.py b/gqcnn/training/__init__.py index bfa5cc00..2e1c5305 100644 --- a/gqcnn/training/__init__.py +++ b/gqcnn/training/__init__.py @@ -26,10 +26,6 @@ backend. Currently only Tensorflow is supported. Author: Vishal Satish """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - from .tf import GQCNNTrainerTF diff --git a/gqcnn/training/tf/__init__.py b/gqcnn/training/tf/__init__.py index 4fd1003d..455201fe 100644 --- a/gqcnn/training/tf/__init__.py +++ b/gqcnn/training/tf/__init__.py @@ -22,10 +22,6 @@ HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - from .trainer_tf import GQCNNTrainerTF __all__ = ["GQCNNTrainerTF"] diff --git a/gqcnn/training/tf/trainer_tf.py b/gqcnn/training/tf/trainer_tf.py index 5d9c905d..38d01172 100644 --- a/gqcnn/training/tf/trainer_tf.py +++ b/gqcnn/training/tf/trainer_tf.py @@ -28,10 +28,6 @@ ------ Vishal Satish & Jeff Mahler """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import collections import json import multiprocessing as mp diff --git a/gqcnn/utils/__init__.py b/gqcnn/utils/__init__.py index 2108e17a..516c1a95 100644 --- a/gqcnn/utils/__init__.py +++ b/gqcnn/utils/__init__.py @@ -22,10 +22,6 @@ HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - from .enums import (ImageMode, TrainingMode, GripperMode, InputDepthMode, GeneralConstants, GQCNNTrainingStatus, GQCNNFilenames) from .policy_exceptions import (NoValidGraspsException, diff --git a/gqcnn/utils/enums.py b/gqcnn/utils/enums.py index 3f88838d..812f68c0 100644 --- a/gqcnn/utils/enums.py +++ b/gqcnn/utils/enums.py @@ -28,10 +28,6 @@ ------ Vishal Satish """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import math import tensorflow as tf diff --git a/gqcnn/utils/policy_exceptions.py b/gqcnn/utils/policy_exceptions.py index db02de7b..8f2edb94 100644 --- a/gqcnn/utils/policy_exceptions.py +++ b/gqcnn/utils/policy_exceptions.py @@ -28,9 +28,6 @@ ------ Vishal Satish """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function class NoValidGraspsException(Exception): diff --git a/gqcnn/utils/train_stats_logger.py b/gqcnn/utils/train_stats_logger.py index 814c7f74..6a2cbae3 100644 --- a/gqcnn/utils/train_stats_logger.py +++ b/gqcnn/utils/train_stats_logger.py @@ -28,10 +28,6 @@ ------ Vishal Satish """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import os import numpy as np diff --git a/gqcnn/utils/utils.py b/gqcnn/utils/utils.py index 853ee35a..7b9c9edb 100644 --- a/gqcnn/utils/utils.py +++ b/gqcnn/utils/utils.py @@ -28,10 +28,6 @@ ------- Jeff Mahler, Vishal Satish, Lucas Manuelli """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - from functools import reduce import os import sys diff --git a/requirements/p3/cpu_requirements.txt b/requirements/cpu_requirements.txt similarity index 75% rename from requirements/p3/cpu_requirements.txt rename to requirements/cpu_requirements.txt index 2589e062..da124b51 100644 --- a/requirements/p3/cpu_requirements.txt +++ b/requirements/cpu_requirements.txt @@ -4,9 +4,9 @@ visualization numpy opencv-python scipy -matplotlib<=2.2.0 +matplotlib tensorflow<=1.15.0 scikit-learn -scikit-image<=0.14.2 +scikit-image gputil psutil diff --git a/requirements/p3/gpu_requirements.txt b/requirements/gpu_requirements.txt similarity index 75% rename from requirements/p3/gpu_requirements.txt rename to requirements/gpu_requirements.txt index e496e805..3468918b 100644 --- a/requirements/p3/gpu_requirements.txt +++ b/requirements/gpu_requirements.txt @@ -4,9 +4,9 @@ visualization numpy opencv-python scipy -matplotlib<=2.2.0 +matplotlib tensorflow-gpu<=1.15.0 scikit-learn -scikit-image<=0.14.2 +scikit-image gputil psutil diff --git a/requirements/p2/cpu_requirements.txt b/requirements/p2/cpu_requirements.txt deleted file mode 100644 index 5dd2efc8..00000000 --- a/requirements/p2/cpu_requirements.txt +++ /dev/null @@ -1,13 +0,0 @@ -autolab-core -autolab-perception -meshrender==0.0.9 -visualization -numpy -opencv-python -scipy -matplotlib<=2.2.0 -tensorflow<=1.15.0 -scikit-learn -scikit-image<=0.14.2 -gputil -psutil diff --git a/requirements/p2/gpu_requirements.txt b/requirements/p2/gpu_requirements.txt deleted file mode 100644 index 236b2c9e..00000000 --- a/requirements/p2/gpu_requirements.txt +++ /dev/null @@ -1,13 +0,0 @@ -autolab-core -autolab-perception -meshrender==0.0.9 -visualization -numpy -opencv-python -scipy -matplotlib<=2.2.0 -tensorflow-gpu<=1.15.0 -scikit-learn -scikit-image<=0.14.2 -gputil -psutil diff --git a/ros_nodes/grasp_planner_node.py b/ros_nodes/grasp_planner_node.py index d5c6a763..56729073 100755 --- a/ros_nodes/grasp_planner_node.py +++ b/ros_nodes/grasp_planner_node.py @@ -29,10 +29,6 @@ ----- Vishal Satish & Jeff Mahler """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import json import math import os diff --git a/setup.py b/setup.py index 686350ac..ff5c3949 100644 --- a/setup.py +++ b/setup.py @@ -28,10 +28,6 @@ ------ Vishal Satish & Jeff Mahler """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import logging import os from setuptools import setup, find_packages @@ -142,14 +138,10 @@ def run(self): requirements = [ "autolab-core", "autolab-perception", "visualization", "numpy", "scipy", - "matplotlib<=2.2.0", "opencv-python", "scikit-learn", "psutil", "gputil" + "matplotlib", "opencv-python", "scikit-learn", "scikit-image", "psutil", + "gputil" ] -if sys.version[0] == "2": - # The Python 2 installation for the latest version of meshrender - # is broken, and we don't know when it will be fixed. - requirements.append("meshrender==0.0.9") - exec( open( os.path.join(os.path.dirname(os.path.realpath(__file__)), @@ -167,7 +159,6 @@ def run(self): keywords="robotics grasping vision deep learning", classifiers=[ "Development Status :: 4 - Beta", - "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", diff --git a/tools/analyze_gqcnn_performance.py b/tools/analyze_gqcnn_performance.py index 64c6b51b..c757cc13 100644 --- a/tools/analyze_gqcnn_performance.py +++ b/tools/analyze_gqcnn_performance.py @@ -28,10 +28,6 @@ ------ Vishal Satish & Jeff Mahler """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import argparse import os diff --git a/tools/finetune.py b/tools/finetune.py index fa02df82..99340454 100644 --- a/tools/finetune.py +++ b/tools/finetune.py @@ -28,10 +28,6 @@ ------ Vishal Satish & Jeff Mahler """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import argparse import os import time diff --git a/tools/hyperparam_search.py b/tools/hyperparam_search.py index d035a3a1..ceb1d0c3 100644 --- a/tools/hyperparam_search.py +++ b/tools/hyperparam_search.py @@ -29,10 +29,6 @@ ------ Vishal Satish """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import argparse from autolab_core import YamlConfig, Logger diff --git a/tools/plot_training_losses.py b/tools/plot_training_losses.py index f9ee5e2d..0ac5068e 100644 --- a/tools/plot_training_losses.py +++ b/tools/plot_training_losses.py @@ -34,10 +34,6 @@ Command line argument, the path to the model whose errors are to plotted. All plots and other metrics will be saved to this directory. """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import os import sys diff --git a/tools/run_policy.py b/tools/run_policy.py index 4abc5990..55f7deb3 100644 --- a/tools/run_policy.py +++ b/tools/run_policy.py @@ -28,10 +28,6 @@ ------ Jeff Mahler """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import argparse import os import random diff --git a/tools/train.py b/tools/train.py index 15950e94..c957b31f 100644 --- a/tools/train.py +++ b/tools/train.py @@ -28,10 +28,6 @@ ------ Vishal Satish & Jeff Mahler """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import argparse import os import time