Giter VIP home page Giter VIP logo

tensor2robot's Introduction

Tensor2Robot

This repository contains distributed machine learning and reinforcement learning infrastructure.

It is used internally at Alphabet, and open-sourced with the intention of making research at Robotics @ Google more reproducible for the broader robotics and computer vision communities.

Projects and Publications Using Tensor2Robot

Features

Tensor2Robot (T2R) is a library for training, evaluation, and inference of large-scale deep neural networks, tailored specifically for neural networks relating to robotic perception and control. It is based on the TensorFlow deep learning framework.

A common task in robotics research involves adding a new sensor modality or new label tensor to a neural network graph. This involves 1) changing what data is saved, 2) changing data pipeline code to read in new modalities at training time 3) adding a new tf.placeholder to handle the new input modality at test time. The main feature of Tensor2Robot is the automatic generation of TensorFlow code for steps 2 and 3. Tensor2Robot can automatically generate placeholders for a model to match its inputs, or alternatively exports a SavedModel that can be used with a TFExportedSavedModelPolicy so that the original graph does not have to be re-constructed.

Another common task encountered in ML involves cropping / transforming input modalities, such as jpeg-decoding and applying random image distortions at training time. The Preprocessor class declares its own input features and labels, and is expected to output shapes compatible with the input features and labels of the model. Example preprocessors can be found in preprocessors.

Design Decisions

  • Scalability: This codebase is designed for training large-scale, real-world robotic perception models with algorithms that do not require a tight perception-action-learning loop (supervised learning, off-policy reinforcement learning of large computer vision models). An example setup might involve multiple GPUs pulling data asynchronously from a replay buffer and training with an off-policy RL algorithm, while data collection agents periodically update their checkpoints and push experiences to the same replay buffer. This can also be run on a single workstation for smaller-scale experiments.

  • T2R is NOT a general-purpose reinforcement learning library. Due to the sizes of models we work with (e.g. grasping from vision) Inference is assumed to be within 1-10Hz and without real-time guarantees, and training is assumed to be distributed by default. If you are doing reinforcement learning with small networks (e.g. two-layer perceptron) with on-policy RL (e.g. PPO), or require hard real-time guarantees, this is probably not the right codebase to use. We recommend using TF-Agents or Dopamine for those use cases.

  • Minimize boilerplate: Tensor2Robot Models auto-generate their own data input pipelines and provide sensible defaults for optimizers, common architectures (actors, critics), and train/eval scaffolding. Models automatically work with both GPUs and TPUs (via TPUEstimator), parsing bmp/gif/jpeg/png-encoded images.

  • gin-configurable: Gin-Config is used to configure models, policies, and other experiment hyperparameters.

Quickstart

Requirements: Python 3.

git clone https://github.com/google/tensor2robot
# Optional: Create a virtualenv
python3 -m venv ~/venv
source ~/venv/bin/activate
pip install -r tensor2robot/requirements.txt
python -m tensor2robot.research.pose_env.pose_env_test

# Install protoc and compile the protobufs.
pip install protobuf
cd tensor2robot/proto
protoc -I=./ --python_out=`pwd` tensor2robot/t2r.proto
python -m tensor2robot.research.pose_env.pose_env_models_test

T2RModel

To use Tensor2Robot, a user defines a T2RModel object that define their input requirements by specifications - one for their features (feature_spec) and one for their labels (label_spec):

These specifications define all required and optional tensors in order to call the model_fn. An input pipeline parameterized with the model's input pipeline will ensure that all required specifications are fulfilled. Note: we always omit the batch dimension and only specify the shape of a single element.

At training time, the T2RModel provides model_train_fn or model_eval_fn as the model_fn argument tf.estimator.Estimator class. Both model_train_fn and model_eval_fn are defined with respect to the features, labels, and outputs of inference_network_fn, which presumably implements the shared portions of the train/eval graphs.

class MyModel(T2RModel):
  def get_feature_specification(self, mode):
    spec = tensorspec_utils.TensorSpecStruct()
    spec['state'] = ExtendedTensorSpec(
      shape=(8,128), dtype=tf.float32, name='s')
  def get_label_specification(self, mode):
    spec = tensorspec_utils.TensorSpecStruct()
    spec['action'] = ExtendedTensorSpec(shape=(8), dtype=tf.float32, name='a')
  def inference_network_fn(self,
                           features: tensorspec_utils.TensorSpecStruct,
                           labels: Optional[tensorspec_utils.TensorSpecStruct],
                           mode: tf.estimator.ModeKeys,
                           config: RunConfigType = None,
                           params: ParamsType = None) -> DictOrSpec:
    inference_outputs = {}
    inference_outputs['predictions'] = layers.fully_connected(features.state, 8)
    return inference_outputs
  def model_train_fn(self,
                     features: tensorspec_utils.TensorSpecStruct,
                     labels: tensorspec_utils.TensorSpecStruct,
                     inference_outputs: DictOrSpec,
                     mode: tf.estimator.ModeKeys,
                     config: RunConfigType = None,
                     params: ParamsType = None) -> ModelTrainOutputType:
    """See base class."""
    del features, config
    loss = tf.losses.mean_squared_error(
      labels.action, inference_outputs['predictions'])
    return loss

Note how the key on the left hand side has a value for name that is different from the one on the right hand side within the ExtendedTensorSpec. The key on the left is used within the model_fn to access the loaded tensor whereas the name is used when creating the parse_tf_example_fn or numpy_feed_dict. We ensure that the name is unique within the whole spec, unless the specs match, otherwise we cannot guarantee the mapping functionality.

Benefits of Inheriting a T2RModel

  • Self-contained input specifications for features and labels.
  • Auto-generated tf.data.Dataset pipelines for tf.train.Examples and tf.train.SequenceExamples.
  • For policy inference, T2RModels can generate placeholders or export SavedModels that are hermetic and can be used with ExportSavedModelPolicy.
  • Automatic construction of model_fn for Estimator for training and evaluation graphs that share a single inference_network_fn.
  • It is possible to compose multiple models' inference_network_fn and model_train_fn together under a single model. This abstraction allows us to implement generic Meta-Learning models (e.g. MAML) that call their sub-model's model_train_fn.
  • Automatic support for distributed training on GPUs and TPUs.

Policies and Placeholders

For performance reasons, policy inference is done by a vanilla session.run() or a predict_fn call on the output of a model, instead of Estimator.predict. tensorspec_utils.make_placeholders automatically creates placeholders from a spec structure which can be used in combination with a matching hierarchy of numpy inputs to create a feed_dict.

# batch_size = -1 -> No batch size will be prepended to the spec.
# batch_size = None -> We will prepend None, have a variable batch_size.
# batch_size > 0 -> We will have a fixed batch_size.
placeholders = tensorspec_utils.make_placeholders(hierarchical_spec, batch_size=None)

feed_dict = inference_model.MakeFeedDict(placeholders, numpy_inputs)
# This can be passed to a sess.run function to evaluate the model.

If you use TFExportedSavedModelPolicy, note that your T2RModel should not query the static batch shape (x.shape[0]) in the graph. This is because placeholder generation creates inputs with unknown batch shape None, causing static shape retrieval to fail. Instead, use tf.shape(x)[0] to access batch shapes dynamically.

Working with Tensor Specifications

Specifications can be a hierarchical data structure of either

  • dictionaries (dict),
  • tuples (tuple),
  • lists (list), or
  • TensorSpecStruct (preferred).

The leaf elements have to be of type TensorSpec or ExtendedTensorSpec (preferred). In the following, we will present some examples using ExtendedTensorSec and TensorSpecStruct to illustrate the different usecases.

We use tensorspec_utils.TensorSpecStruct() for specifying specs since this data structure is mutuable, provides attribute (dot) access and item iteration. Further, we can use pytype to ensure compile time type checking. This data structure is both hierarchical and flat: The dictionary interface using .items() is flat representing hierarchical data with paths, as shown later on. However, we maintain a hierarchical interface using attribute access, also shown later on. Therefore, we can use this data structure in order to create and alter hierarchical specifications which work with both TPUEstimator and Estimator since both apis operate on the dictionary view.

Hierarchical example

Creating a hierarchical spec from spec using tensorspec_utils.copy_tensorspec.

simple_spec = tensorspec_utils.TensorSpecStruct()
simple_spec['state'] = ExtendedTensorSpec(
  shape=(8,128), dtype=tf.float32, name='s')
simple_spec['action'] = ExtendedTensorSpec(shape=(8), dtype=tf.float32, name='a')

hierarchical_spec = tensorspec_utils.TensorSpecStruct()
hierarchical_spec.train = tensorspec_utils.copy_tensorspec(simple_spec, prefix=’train’)

Note, we use attribute access to define the train hierarchy. This will copy all our specs from simple_spec internally to

# 'train/{}' -> 'train/state' == simple_spec.state and
# 'train/action' == simple_spec.action

We forbid the following pattern:

hierarchical_spec.train = tensorspec_utils.TensorSpecStruct()

and encourage the user to use this pattern instead.

train = tensorspec_utils.TensorSpecStruct()
train.stuff = ExtendedTensorSpec(...)
hierarchical_spec.train = train
# or
hierarchical_spec['train/stuff'] = ExtendedTensorSpec(...)
# All of the following statements are True.
hierarchical_spec.train.state == simple_spec.state
hierarchical_spec.train.action == simple_spec.action
hierarchical_spec.keys() == ['train/state', 'train/action']
hierarchical_spec.train.keys() == ['state', 'action']

Now we want to use the same spec another time for our input.

hierarchical_spec.val = tensorspec_utils.copy_tensorspec( simple_spec,
  prefix='val')

# All of the following statements are True.
hierarchical_spec.keys() == ['train/state', 'train/action', 'val/state',
   'val/action']
hierarchical_spec.train.keys() == ['state', 'action']
hierarchical_spec.train.state.name == 'train/s'
hierarchical_spec.val.keys() == ['state', 'action']
hierarchical_spec.val.state.name == 'val/s'

Manually extending/creating a hierarchical spec from an existing simple spec is also possible. TensorSpec is an immutable data structure therefore the recommend way to alter a spec is:

hierarchical.train.state = ExtendedTensorSpec.from_spec(
  hierarchical.train.state, ...PARAMETERS TO OVERWRITE)

A different way of changing a hierarchical spec would be:

for key, value in simple_spec.items():
  hierarchical[‘test/’ + key] = ExtendedTensorSpec.from_spec(
    value, name=’something_random/’+value.name)
# hierarchical_spec.keys() == ['train/state', 'train/action', ‘val/state’,
#   ‘val/action’, ‘test/state’, ‘test/action’]
# hierarchical_spec.train.keys() == ['state', 'action']
# hierarchical_spec.val.keys() == ['state', 'action']
# hierarchical_spec.test.keys() == ['state', 'action']
# hierarchical_spec.test.state.name == ‘something_random/s’

Sequential Inputs

Tensor2Robot can parse both tf.train.Example and tf.train.SequenceExample protos (useful for training recurrent models like LSTMs). To declare a model whose data is parsed from SequenceExamples, set is_sequence=True.

spec['state'] = ExtendedTensorSpec(
  shape=(8,128), dtype=tf.float32, name='s', is_sequence=True)

This will result in a parsed tensor of shape (b, ?, 8, 128) where b is the batch size and the second dimension is the unknown sequence length (only known at run-time). Note that if is_sequence=True for any ExtendedTensorSpec in the TensorSpecStruct, the proto will be assumed to be a SequenceExample (and non-sequential Tensors will be assumed to reside in example.context).

Flattening hierarchical specification structures

Any valid spec structure can be flattened into a tensorspec_utils.TensorSpecStruct. In the following we show different hierarchical data structures and the effect of flatten_spec_structure.

flat_hierarchy = tensorspec_utils.flatten_spec_structure(hierarchical)

Note, tensorspec_utils.TensorSpecStruct will have flat dictionary access. We can print/access/change all elements of our spec by iterating over the items.

for key, value in flat_hierarchy.items():
  print('path: {}, spec: {}'.format(key, value))
# This will print:
# path: train/state, spec: ExtendedTensorSpec(
#    shape=(8, 128), dtype=tf.float32, name='train/s')
# path: train/action, spec: ExtendedTensorSpec(
#    shape=(8), dtype=tf.float32, name='train/a')
# path: val/state, spec: ExtendedTensorSpec(
#    shape=(8, 128), dtype=tf.float32, name='val/s')
# path: val/action, spec: ExtendedTensorSpec(
#    shape=(8), dtype=tf.float32, name='val/a')
# path: test/state, spec: ExtendedTensorSpec(
#    shape=(8, 128), dtype=tf.float32, name='something_random/s')
# path: test/action, spec: ExtendedTensorSpec(
#    shape=(8), dtype=tf.float32, name='something_random/a')
# This data structure still maintains the hierarchical user interface.
train = flat_hierarchy.train
for key, value in flat_hierarchy.items():
  print('path: {}, spec: {}'.format(key, value))
# This will print:
# path: state, spec: ExtendedTensorSpec(
#    shape=(8, 128), dtype=tf.float32, name='train/s')
# path: action, spec: ExtendedTensorSpec(
#    shape=(8), dtype=tf.float32, name='train/a')

Note, the path has changed, but the name is still from the hierarchy. This is an important distinction. The model could access the data in a different manner but the same "name" is used to access tf.Examples of feed_dicts in order to feed the tensors.

An alternative hierarchical spec using namedtuples:

Hierarchy = namedtuple('Hierarchy', ['train', 'val'])
Sample = namedtuple('Sample', ['state', 'action'])
hierarchy = Hierarchy(
  train=Sample(
    state=ExtendedTensorSpec(shape=(8, 128), dtype=tf.float32, name='train/s'),
    action=ExtendedTensorSpec(shape=(8), dtype=tf.float32, name='train/a'),
  ),
  eval=Sample(
    state=ExtendedTensorSpec(shape=(8, 128), dtype=tf.float32, name='val/s'),
    action=ExtendedTensorSpec(shape=(8), dtype=tf.float32, name='val/a'),
  )
)
flat_hierarchy = tensorspec_utils.flatten_spec_structure(hierarchy)

for key, value in flat_hierarchy.items():
  print('path: {}, spec: {}'.format(key, value))
# This will print:
# path: train/state, spec: ExtendedTensorSpec(
#    shape=(8, 128), dtype=tf.float32, name='train/s')
# path: train/action, spec: ExtendedTensorSpec(
#    shape=(8), dtype=tf.float32, name='train/a')
# path: val/state, spec: ExtendedTensorSpec(
#    shape=(8, 128), dtype=tf.float32, name='val/s')
# path: val/action, spec: ExtendedTensorSpec(
#    shape=(8), dtype=tf.float32, name='val/a')

Note, hierarchy (namedtuple) is immutable whereas flat_hierarchy is a mutable instance of TensorSpecStruct.

Validate and flatten or pack

tensorspec_utils.validate_and_flatten and tensorspec_utils.validate_and_pack allow to verify that an existing, e.g. loaded spec data structure filled with tensors fulfills our expected spec structure and is flattened or packed into a hierarchical structure.

Disclaimer

This is not an official Google product. External support not guaranteed. The API may change subject to Alphabet needs. File a GitHub issue if you have questions.

tensor2robot's People

Contributors

dependabot[bot] avatar ericjang avatar faizan-m avatar hawkinsp avatar hertschuh avatar mrry avatar pkch avatar pwohlhart avatar rchen152 avatar rohan100jain avatar slowy07 avatar sun51 avatar t2r-robot avatar yilei avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tensor2robot's Issues

**ModuleNotFoundError: No module named 'tensorflow.contrib'** when

my env :

GPU driver
(google_RT1) robot@robot:/usr/local$ ls -al cuda
lrwxrwxrwx 1 root root 20 Sep 20 15:10 cuda -> /usr/local/cuda-10.0

(google_RT1) robot@robot:/usr/local$ nvidia-smi
Fri Dec 16 11:11:13 2022
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 418.88 Driver Version: 418.88 CUDA Version: 10.1 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce RTX 208... Off | 00000000:01:00.0 On | N/A |
| 0% 39C P8 16W / 257W | 185MiB / 10986MiB | 5% Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1142 G /usr/lib/xorg/Xorg 183MiB |
+-----------------------------------------------------------------------------+

python3:

(google_RT1) robot@robot:/usr/local$ python
Python 3.8.15 (default, Nov 24 2022, 15:19:38)
[GCC 11.2.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.

(google_RT1) robot@robot:~/ref$ pip install -r robotics_transformer/requirements.txt 
Looking in indexes: http://pypi.douban.com/simple
Requirement already satisfied: absl-py>=0.5.0 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from -r robotics_transformer/requirements.txt (line 1)) (1.3.0)
Requirement already satisfied: numpy>=1.13.3 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from -r robotics_transformer/requirements.txt (line 2)) (1.23.5)
Requirement already satisfied: tensorflow>=1.13.0 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from -r robotics_transformer/requirements.txt (line 3)) (2.11.0)
Requirement already satisfied: tensorflow-serving-api>=1.13.0 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from -r robotics_transformer/requirements.txt (line 4)) (2.11.0)
Requirement already satisfied: gin-config>=0.1.4 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from -r robotics_transformer/requirements.txt (line 5)) (0.5.0)
Requirement already satisfied: tensorflow-probability>=0.6.0 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from -r robotics_transformer/requirements.txt (line 6)) (0.19.0)
Requirement already satisfied: tf-agents>=0.3.0 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from -r robotics_transformer/requirements.txt (line 7)) (0.15.0)
Requirement already satisfied: tf-slim>=1.0 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from -r robotics_transformer/requirements.txt (line 8)) (1.1.0)
Requirement already satisfied: flatbuffers>=2.0 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from tensorflow>=1.13.0->-r robotics_transformer/requirements.txt (line 3)) (22.12.6)
Requirement already satisfied: termcolor>=1.1.0 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from tensorflow>=1.13.0->-r robotics_transformer/requirements.txt (line 3)) (2.1.1)
Requirement already satisfied: tensorboard<2.12,>=2.11 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from tensorflow>=1.13.0->-r robotics_transformer/requirements.txt (line 3)) (2.11.0)
Requirement already satisfied: opt-einsum>=2.3.2 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from tensorflow>=1.13.0->-r robotics_transformer/requirements.txt (line 3)) (3.3.0)
Requirement already satisfied: packaging in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from tensorflow>=1.13.0->-r robotics_transformer/requirements.txt (line 3)) (22.0)
Requirement already satisfied: tensorflow-io-gcs-filesystem>=0.23.1 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from tensorflow>=1.13.0->-r robotics_transformer/requirements.txt (line 3)) (0.28.0)
Requirement already satisfied: h5py>=2.9.0 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from tensorflow>=1.13.0->-r robotics_transformer/requirements.txt (line 3)) (3.7.0)
Requirement already satisfied: libclang>=13.0.0 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from tensorflow>=1.13.0->-r robotics_transformer/requirements.txt (line 3)) (14.0.6)
Requirement already satisfied: six>=1.12.0 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from tensorflow>=1.13.0->-r robotics_transformer/requirements.txt (line 3)) (1.16.0)
Requirement already satisfied: typing-extensions>=3.6.6 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from tensorflow>=1.13.0->-r robotics_transformer/requirements.txt (line 3)) (4.4.0)
Requirement already satisfied: tensorflow-estimator<2.12,>=2.11.0 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from tensorflow>=1.13.0->-r robotics_transformer/requirements.txt (line 3)) (2.11.0)
Requirement already satisfied: gast<=0.4.0,>=0.2.1 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from tensorflow>=1.13.0->-r robotics_transformer/requirements.txt (line 3)) (0.4.0)
Requirement already satisfied: google-pasta>=0.1.1 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from tensorflow>=1.13.0->-r robotics_transformer/requirements.txt (line 3)) (0.2.0)
Requirement already satisfied: keras<2.12,>=2.11.0 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from tensorflow>=1.13.0->-r robotics_transformer/requirements.txt (line 3)) (2.11.0)
Requirement already satisfied: protobuf<3.20,>=3.9.2 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from tensorflow>=1.13.0->-r robotics_transformer/requirements.txt (line 3)) (3.19.6)
Requirement already satisfied: setuptools in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from tensorflow>=1.13.0->-r robotics_transformer/requirements.txt (line 3)) (65.5.0)
Requirement already satisfied: wrapt>=1.11.0 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from tensorflow>=1.13.0->-r robotics_transformer/requirements.txt (line 3)) (1.14.1)
Requirement already satisfied: astunparse>=1.6.0 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from tensorflow>=1.13.0->-r robotics_transformer/requirements.txt (line 3)) (1.6.3)
Requirement already satisfied: grpcio<2.0,>=1.24.3 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from tensorflow>=1.13.0->-r robotics_transformer/requirements.txt (line 3)) (1.51.1)
Requirement already satisfied: dm-tree in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from tensorflow-probability>=0.6.0->-r robotics_transformer/requirements.txt (line 6)) (0.1.7)
Requirement already satisfied: decorator in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from tensorflow-probability>=0.6.0->-r robotics_transformer/requirements.txt (line 6)) (5.1.1)
Requirement already satisfied: cloudpickle>=1.3 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from tensorflow-probability>=0.6.0->-r robotics_transformer/requirements.txt (line 6)) (2.2.0)
Requirement already satisfied: gym<=0.23.0,>=0.17.0 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from tf-agents>=0.3.0->-r robotics_transformer/requirements.txt (line 7)) (0.23.0)
Requirement already satisfied: pillow in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from tf-agents>=0.3.0->-r robotics_transformer/requirements.txt (line 7)) (5.3.0)
Requirement already satisfied: pygame==2.1.0 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from tf-agents>=0.3.0->-r robotics_transformer/requirements.txt (line 7)) (2.1.0)
Requirement already satisfied: wheel<1.0,>=0.23.0 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from astunparse>=1.6.0->tensorflow>=1.13.0->-r robotics_transformer/requirements.txt (line 3)) (0.37.1)
Requirement already satisfied: gym-notices>=0.0.4 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from gym<=0.23.0,>=0.17.0->tf-agents>=0.3.0->-r robotics_transformer/requirements.txt (line 7)) (0.0.8)
Requirement already satisfied: importlib-metadata>=4.10.0 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from gym<=0.23.0,>=0.17.0->tf-agents>=0.3.0->-r robotics_transformer/requirements.txt (line 7)) (5.1.0)
Requirement already satisfied: werkzeug>=1.0.1 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from tensorboard<2.12,>=2.11->tensorflow>=1.13.0->-r robotics_transformer/requirements.txt (line 3)) (2.2.2)
Requirement already satisfied: markdown>=2.6.8 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from tensorboard<2.12,>=2.11->tensorflow>=1.13.0->-r robotics_transformer/requirements.txt (line 3)) (3.4.1)
Requirement already satisfied: tensorboard-data-server<0.7.0,>=0.6.0 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from tensorboard<2.12,>=2.11->tensorflow>=1.13.0->-r robotics_transformer/requirements.txt (line 3)) (0.6.1)
Requirement already satisfied: google-auth<3,>=1.6.3 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from tensorboard<2.12,>=2.11->tensorflow>=1.13.0->-r robotics_transformer/requirements.txt (line 3)) (2.15.0)
Requirement already satisfied: requests<3,>=2.21.0 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from tensorboard<2.12,>=2.11->tensorflow>=1.13.0->-r robotics_transformer/requirements.txt (line 3)) (2.28.1)
Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from tensorboard<2.12,>=2.11->tensorflow>=1.13.0->-r robotics_transformer/requirements.txt (line 3)) (0.4.6)
Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from tensorboard<2.12,>=2.11->tensorflow>=1.13.0->-r robotics_transformer/requirements.txt (line 3)) (1.8.1)
Requirement already satisfied: rsa<5,>=3.1.4 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from google-auth<3,>=1.6.3->tensorboard<2.12,>=2.11->tensorflow>=1.13.0->-r robotics_transformer/requirements.txt (line 3)) (4.9)
Requirement already satisfied: pyasn1-modules>=0.2.1 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from google-auth<3,>=1.6.3->tensorboard<2.12,>=2.11->tensorflow>=1.13.0->-r robotics_transformer/requirements.txt (line 3)) (0.2.8)
Requirement already satisfied: cachetools<6.0,>=2.0.0 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from google-auth<3,>=1.6.3->tensorboard<2.12,>=2.11->tensorflow>=1.13.0->-r robotics_transformer/requirements.txt (line 3)) (5.2.0)
Requirement already satisfied: requests-oauthlib>=0.7.0 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard<2.12,>=2.11->tensorflow>=1.13.0->-r robotics_transformer/requirements.txt (line 3)) (1.3.1)
Requirement already satisfied: zipp>=0.5 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from importlib-metadata>=4.10.0->gym<=0.23.0,>=0.17.0->tf-agents>=0.3.0->-r robotics_transformer/requirements.txt (line 7)) (3.11.0)
Requirement already satisfied: charset-normalizer<3,>=2 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from requests<3,>=2.21.0->tensorboard<2.12,>=2.11->tensorflow>=1.13.0->-r robotics_transformer/requirements.txt (line 3)) (2.1.1)
Requirement already satisfied: idna<4,>=2.5 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from requests<3,>=2.21.0->tensorboard<2.12,>=2.11->tensorflow>=1.13.0->-r robotics_transformer/requirements.txt (line 3)) (3.4)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from requests<3,>=2.21.0->tensorboard<2.12,>=2.11->tensorflow>=1.13.0->-r robotics_transformer/requirements.txt (line 3)) (1.26.13)
Requirement already satisfied: certifi>=2017.4.17 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from requests<3,>=2.21.0->tensorboard<2.12,>=2.11->tensorflow>=1.13.0->-r robotics_transformer/requirements.txt (line 3)) (2022.9.24)
Requirement already satisfied: MarkupSafe>=2.1.1 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from werkzeug>=1.0.1->tensorboard<2.12,>=2.11->tensorflow>=1.13.0->-r robotics_transformer/requirements.txt (line 3)) (2.1.1)
Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from pyasn1-modules>=0.2.1->google-auth<3,>=1.6.3->tensorboard<2.12,>=2.11->tensorflow>=1.13.0->-r robotics_transformer/requirements.txt (line 3)) (0.4.8)
Requirement already satisfied: oauthlib>=3.0.0 in /home/robot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard<2.12,>=2.11->tensorflow>=1.13.0->-r robotics_transformer/requirements.txt (line 3)) (3.2.2)

Question:
I has successfully configure env as your install step instruction:

pybullet build time: Dec 16 2022 10:07:09
Running tests under Python 3.8.15: /home/robot/anaconda3/envs/google_RT1/bin/python3.8
[ RUN      ] PoseEnvTest.test_PoseEnv
[       OK ] PoseEnvTest.test_PoseEnv
----------------------------------------------------------------------
Ran 1 test in 0.065s

but when I 
**(google_RT1) robot@robot:~/ref$ python -m tensor2robot.research.pose_env.pose_env_models_test**
it shows the following infomation:**ModuleNotFoundError: No module named 'tensorflow.contrib'**


(google_RT1) robot@robot:~/ref$ python -m tensor2robot.research.pose_env.pose_env_models_test
2022-12-16 11:06:35.907244: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2022-12-16 11:06:35.980578: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /opt/ros/kinetic/share/euslisp/jskeus/eus//Linux64/lib:/opt/ros/kinetic/lib:/opt/ros/kinetic/lib/x86_64-linux-gnu:/usr/local/cuda/lib64
2022-12-16 11:06:35.980598: I tensorflow/compiler/xla/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
2022-12-16 11:06:36.418803: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer.so.7'; dlerror: libnvinfer.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /opt/ros/kinetic/share/euslisp/jskeus/eus//Linux64/lib:/opt/ros/kinetic/lib:/opt/ros/kinetic/lib/x86_64-linux-gnu:/usr/local/cuda/lib64
2022-12-16 11:06:36.418856: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer_plugin.so.7'; dlerror: libnvinfer_plugin.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /opt/ros/kinetic/share/euslisp/jskeus/eus//Linux64/lib:/opt/ros/kinetic/lib:/opt/ros/kinetic/lib/x86_64-linux-gnu:/usr/local/cuda/lib64
2022-12-16 11:06:36.418865: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.
Traceback (most recent call last):
  File "/home/robot/anaconda3/envs/google_RT1/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/robot/anaconda3/envs/google_RT1/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/robot/ref/tensor2robot/research/pose_env/pose_env_models_test.py", line 23, in <module>
    from tensor2robot.input_generators import default_input_generator
  File "/home/robot/ref/tensor2robot/input_generators/__init__.py", line 17, in <module>
    from tensor2robot.input_generators import abstract_input_generator
  File "/home/robot/ref/tensor2robot/input_generators/abstract_input_generator.py", line 25, in <module>
    from tensor2robot.models import abstract_model
  File "/home/robot/ref/tensor2robot/models/abstract_model.py", line 28, in <module>
    from tensor2robot.models import model_interface
  File "/home/robot/ref/tensor2robot/models/model_interface.py", line 33, in <module>
    from tensor2robot.preprocessors import abstract_preprocessor
  File "/home/robot/ref/tensor2robot/preprocessors/__init__.py", line 17, in <module>
    from tensor2robot.preprocessors import abstract_preprocessor
  File "/home/robot/ref/tensor2robot/preprocessors/abstract_preprocessor.py", line 22, in <module>
    from tensor2robot.utils import tensorspec_utils
  File "/home/robot/ref/tensor2robot/utils/tensorspec_utils.py", line 31, in <module>
    from tensorflow.contrib import framework as contrib_framework
**ModuleNotFoundError: No module named 'tensorflow.contrib'**

TypeError: train_eval_model() got an unexpected keyword argument 'use_tpu_wrapper'

Hi,
I have tried to run QT-opt from my PC last week but I have not been able to make it work yet.
I am using conda to be able to get the right version of every packages needed to run the project (and especially to get tensorflow 1 and avoid the migration to tensorflow 2). Though, even if I have the packages of requirement.txt with the right versions, I am still getting errors like showed on the screenshot (problem with use_tpu_wrapper). Do you have any ideas of how to fix these errors to run the code in the right way?
Thank you in advance for your consideration.
QTrobot2
QT2robot1

protoc -I=./ --python_out=`pwd` t2r.proto t2r.proto:36:3: Expected "required", "optional", or "repeated". t2r.proto:36:6: Expected field name.

(google_RT1) robot@robot-System-Product-Name:~/ref/tensor2robot/proto$ protoc -I=./ --python_out=pwd t2r.proto
t2r.proto:36:3: Expected "required", "optional", or "repeated".
t2r.proto:36:6: Expected field name.

ENV:
protobuf version:3.19.6
(google_RT1) tmirobot@tmirobot-System-Product-Name:~/ref/tensor2robot/proto$ pip install protobuf
Looking in indexes: http://pypi.douban.com/simple
Requirement already satisfied: protobuf in /home/tmirobot/anaconda3/envs/google_RT1/lib/python3.8/site-packages (3.19.6)

python3 version:3.8.15
this is my env createdy by conda
(google_RT1) robot@robot-System-Product-Name:~/ref/tensor2robot/proto$ python3
Python 3.8.15 (default, Nov 24 2022, 15:19:38)
[GCC 11.2.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.

Tensorflow Version Conflict

Hi,

I successfully installed the environment on Python==3.8.10, tf is 2.11.

When I enter
python -m tensor2robot.research.pose_env.pose_env_models_test
It returns an error:
ModuleNotFoundError: No module named 'tensorflow.contrib'

Then I downgrade my python version and tf version to Python==3.7.16 and tf==1.14 (I created a new virtual environment)
When I enter the same code, it returns me a different error:

pybullet build time: May 20 2022 19:43:01
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/fredayao/Robot2/tensor2robot/research/pose_env/pose_env_models_test.py", line 29, in
from tensor2robot.research.pose_env import pose_env_models
File "/home/fredayao/Robot2/tensor2robot/research/pose_env/pose_env_models.py", line 23, in
from tensor2robot.layers import vision_layers
File "/home/fredayao/Robot2/tensor2robot/layers/vision_layers.py", line 22, in
from tensor2robot.layers import spatial_softmax
File "/home/fredayao/Robot2/tensor2robot/layers/spatial_softmax.py", line 25, in
import tensorflow_probability as tfp
File "/home/fredayao/tensorflow_tf1/venv_pyton3.7/lib/python3.7/site-packages/tensorflow_probability/init.py", line 20, in
from tensorflow_probability import substrates
File "/home/fredayao/tensorflow_tf1/venv_pyton3.7/lib/python3.7/site-packages/tensorflow_probability/substrates/init.py", line 17, in
from tensorflow_probability.python.internal import all_util
File "/home/fredayao/tensorflow_tf1/venv_pyton3.7/lib/python3.7/site-packages/tensorflow_probability/python/init.py", line 138, in
dir(globals()[pkg_name]) # Forces loading the package from its lazy loader.
File "/home/fredayao/tensorflow_tf1/venv_pyton3.7/lib/python3.7/site-packages/tensorflow_probability/python/internal/lazy_loader.py", line 57, in dir
module = self._load()
File "/home/fredayao/tensorflow_tf1/venv_pyton3.7/lib/python3.7/site-packages/tensorflow_probability/python/internal/lazy_loader.py", line 37, in _load
self._on_first_access()
File "/home/fredayao/tensorflow_tf1/venv_pyton3.7/lib/python3.7/site-packages/tensorflow_probability/python/init.py", line 64, in _validate_tf_environment
present=tf.version))
ImportError: This version of TensorFlow Probability requires TensorFlow version >= 2.11; Detected an installation of version 1.14.0. Please upgrade TensorFlow to proceed.

It requires me the latest version for tensorflow-probability, which is a conflict to the previous error.
Any suggestion for help? Thanks a lot!

VRGripper Simulation

The VRGripper part corresponding to paper, Watch, Try, Learn, provides a brief description of the configs but doesn't seem to explicitly provide the steps to run them, apart from top-level quickstart

Could you point to / provide the procedure to run the simulations, as described in the corresponding paper ?

The variable in t2r_test_fixture.py

When I modified the _MAX_TRAIN_STEPS to 20 and run:
It output an error
image

But I really see the message. Indeed them sure be saved in the path.
image
Have any ideal? thank you

Error running `pose_env_models_test`

In the last step of instructions provided in README, I ran:

python -m tensor2robot.research.pose_env.pose_env_models_test

However, all the tests failed with a similar error:

NameError: name 'guzzler_use_compression' is not defined

Sample stack trace:

Traceback (most recent call last):
  File "/home/daniel/Documents/github/tensor2robot/research/pose_env/pose_env_models_test.py", line 75, in test_mc
    create_exporters_fn=None)
  File "/home/daniel/anaconda3/envs/robotics-transformer/lib/python3.7/site-packages/gin/config.py", line 1605, in gin_wrapper
    utils.augment_exception_message_and_reraise(e, err_str)
  File "/home/daniel/anaconda3/envs/robotics-transformer/lib/python3.7/site-packages/gin/utils.py", line 41, in augment_exception_message_and_reraise
    raise proxy.with_traceback(exception.__traceback__) from None
  File "/home/daniel/anaconda3/envs/robotics-transformer/lib/python3.7/site-packages/gin/config.py", line 1582, in gin_wrapper
    return fn(*new_args, **new_kwargs)
  File "/home/daniel/Documents/github/tensor2robot/utils/train_eval.py", line 492, in train_eval_model
    mode=tf_estimator.ModeKeys.TRAIN,
  File "/home/daniel/Documents/github/tensor2robot/utils/train_eval.py", line 120, in provide_input_generator_with_model_information
    tf.logging.info('guzzler_use_compression %s', str(guzzler_use_compression))
NameError: name 'guzzler_use_compression' is not defined
  In call to configurable 'train_eval_model' (<function train_eval_model at 0x7f517c47e680>)

Library versions:

tensorflow==1.15.5
tensorflow-probability==0.7
tensorflow-agents==0.3
gin-config==0.5

cannot import name 't2r_pb2' from 'tensor2robot.proto' (unknown location)

Python == 3.7.0
The environment is installed successfully with requirements.txt.

When I enter
python -m tensor2robot.research.pose_env.pose_env_test
it is successful

But when I enter this code,
python -m tensor2robot.research.qtopt.t2r_models_test
It output the error

Successfully opened dynamic library libnvinfer_plugin.so.6
Traceback (most recent call last):
  File "/home/ros/anaconda3/envs/tensor2robot/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/ros/anaconda3/envs/tensor2robot/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/ros/Work_ros/tensor2robot/research/qtopt/t2r_models_test.py", line 24, in <module>
    from tensor2robot.research.qtopt import t2r_models
  File "/home/ros/Work_ros/tensor2robot/research/qtopt/t2r_models.py", line 28, in <module>
    from tensor2robot.models import abstract_model
  File "/home/ros/Work_ros/tensor2robot/models/abstract_model.py", line 34, in <module>
    from tensor2robot.models import model_interface
  File "/home/ros/Work_ros/tensor2robot/models/model_interface.py", line 39, in <module>
    from tensor2robot.preprocessors import abstract_preprocessor
  File "/home/ros/Work_ros/tensor2robot/preprocessors/__init__.py", line 17, in <module>
    from tensor2robot.preprocessors import abstract_preprocessor
  File "/home/ros/Work_ros/tensor2robot/preprocessors/abstract_preprocessor.py", line 28, in <module>
    from tensor2robot.utils import tensorspec_utils
  File "/home/ros/Work_ros/tensor2robot/utils/tensorspec_utils.py", line 31, in <module>
    from tensor2robot.proto import t2r_pb2
ImportError: cannot import name 't2r_pb2' from 'tensor2robot.proto' (unknown location)

I can't find t2r_pb2 in the repository.
any suggestion for help? think you!

pose_env.pose_env_models_test failed

Hi t2r team,

Thanks for open sourcing this project. Here is one bug I observe: 3 tests in PoseEnvModelsTest failed (test_regression_maml_policy_interface, test_train_eval_gin('run_train_reg.gin'), test_train_eval_gin('run_train_reg_maml.gin')) with the following same error:

ERROR: test_regression_maml_policy_interface (__main__.PoseEnvModelsTest)
test_regression_maml_policy_interface (__main__.PoseEnvModelsTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/francis/code/Research/tensor2robot/research/pose_env/pose_env_models_test.py", line 122, in test_regression_maml_policy_interface
    predictor = checkpoint_predictor.CheckpointPredictor(t2r_model=t2r_model)
  File "/home/francis/venv/lib/python3.5/site-packages/gin/config.py", line 1078, in gin_wrapper
    utils.augment_exception_message_and_reraise(e, err_str)
  File "/home/francis/venv/lib/python3.5/site-packages/gin/utils.py", line 49, in augment_exception_message_and_reraise
    six.raise_from(proxy.with_traceback(exception.__traceback__), None)
  File "<string>", line 3, in raise_from
  File "/home/francis/venv/lib/python3.5/site-packages/gin/config.py", line 1055, in gin_wrapper
    return fn(*new_args, **new_kwargs)
  File "/home/francis/code/Research/tensor2robot/predictors/checkpoint_predictor.py", line 87, in __init__
    estimator_spec = t2r_model.model_fn(preprocessed_features, None, mode)
  File "/home/francis/code/Research/tensor2robot/models/abstract_model.py", line 682, in model_fn
    config, params)
  File "/home/francis/code/Research/tensor2robot/meta_learning/maml_model.py", line 325, in inference_network_fn
    task_learn, elems, mode, params)
  File "/home/francis/code/Research/tensor2robot/meta_learning/maml_model.py", line 220, in _map_task_learn
    dtypes = self.infer_base_model_output_dtypes(mode, params)
  File "/home/francis/code/Research/tensor2robot/meta_learning/maml_model.py", line 190, in infer_base_model_output_dtypes
    params=params)
  File "/home/francis/code/Research/tensor2robot/models/regression_model.py", line 150, in inference_network_fn
    list(outputs.keys())))
ValueError: For regression models inference_output is a required key in outputs but is not in ['state_features', 'action'].
  In call to configurable 'CheckpointPredictor' (<class 'tensor2robot.predictors.checkpoint_predictor.CheckpointPredictor'>)
  • The cause is as follows:

class PoseEnvRegressionModel(in research/pose_env/pose_env_models.py) inherits from class RegressionModel(in models/regression_model.py). In the superclass it raises error if output of a_func doesn't contain key inference_output. But in the subclass the implementation of a_func returns the actual inference output with key action.

  • A quick fix is to change a_func of class PoseEnvRegressionModelas follows:
        -  return {'action': estimated_pose, 'state_features': feature_points}
        + return {'inference_output': estimated_pose, 'action': estimated_pose, 'state_features': feature_points}

After this change the tests passed. Note that simply changing action to inference output will still cause test failure with different errors, I currently haven't looked into the cause yet, would appreciate insight on that as well!

p.s.
my tf version: 1.14.0

ModuleNotFoundError: No module named 'gin'

ModuleNotFoundError: No module named 'gin'
(google_RT1) robot@robot-System-Product-Name:~/ref$ python -m tensor2robot.research.pose_env.pose_env_test
Traceback (most recent call last):
File "/home/robot/anaconda3/envs/pytorch1.6/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/robot/anaconda3/envs/pytorch1.6/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/robot/ref/tensor2robot/research/pose_env/pose_env_test.py", line 21, in
from tensor2robot.research.pose_env import pose_env
File "/home/robot/ref/tensor2robot/research/pose_env/pose_env.py", line 19, in
import gin
ModuleNotFoundError: No module named 'gin'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.