Skip to content

Commit 19cbe4f

Browse files
author
The TensorFlow Datasets Authors
committed
Release of ASIMOV V2 datasets.
PiperOrigin-RevId: 809049459
1 parent 69bb0ab commit 19cbe4f

File tree

3 files changed

+117
-0
lines changed

3 files changed

+117
-0
lines changed

tensorflow_datasets/robotics/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
from tensorflow_datasets.robotics.asimov.asimov import AsimovInjuryVal
2222
from tensorflow_datasets.robotics.asimov.asimov import AsimovMultimodalAutoVal
2323
from tensorflow_datasets.robotics.asimov.asimov import AsimovMultimodalManualVal
24+
from tensorflow_datasets.robotics.asimov.asimov_v2 import AsimovV2ConstraintsWithoutRationale
25+
from tensorflow_datasets.robotics.asimov.asimov_v2 import AsimovV2ConstraintsWithRationale
26+
from tensorflow_datasets.robotics.asimov.asimov_v2 import AsimovV2Injuries
27+
from tensorflow_datasets.robotics.asimov.asimov_v2 import AsimovV2Videos
2428
from tensorflow_datasets.robotics.mt_opt import MtOpt
2529
from tensorflow_datasets.robotics.rtx import AlohaMobile
2630
from tensorflow_datasets.robotics.rtx import AsuTableTopConvertedExternallyToRlds

tensorflow_datasets/robotics/asimov/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,7 @@
2121
from tensorflow_datasets.robotics.asimov.asimov import AsimovInjuryVal
2222
from tensorflow_datasets.robotics.asimov.asimov import AsimovMultimodalAutoVal
2323
from tensorflow_datasets.robotics.asimov.asimov import AsimovMultimodalManualVal
24+
from tensorflow_datasets.robotics.asimov.asimov_v2 import AsimovV2ConstraintsWithoutRationale
25+
from tensorflow_datasets.robotics.asimov.asimov_v2 import AsimovV2ConstraintsWithRationale
26+
from tensorflow_datasets.robotics.asimov.asimov_v2 import AsimovV2Injuries
27+
from tensorflow_datasets.robotics.asimov.asimov_v2 import AsimovV2Videos
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# coding=utf-8
2+
# Copyright 2025 The TensorFlow Datasets Authors.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
"""Asimov 2.0 datasets."""
17+
18+
from tensorflow_datasets.robotics import dataset_importer_builder
19+
20+
# TODO: Fix the citation.
21+
ASIMOV_V2_CITATION = """
22+
@article{,
23+
author = {Abhishek Jindal and Dmitry Kalashnikov and R. Alex Hofer and Oscar Chang and Divya Garikapati and Anirudha Majumdar and Pierre Sermanet and Vikas Sindhwani},
24+
title = {Can AI Perceive Physical Danger and Intervene?},
25+
journal = {},
26+
url = {},
27+
year = {2026},
28+
}
29+
"""
30+
31+
ASIMOV_V2_HOMEPAGE = 'https://asimov-benchmark.github.io/v2/'
32+
33+
34+
class AsimovV2Injuries(dataset_importer_builder.TFDSDatasetImporterBuilder):
35+
"""DatasetBuilder for `asimov_2_injuries` dataset."""
36+
37+
def get_description(self):
38+
return 'Situations generated from real hospital injury reports.'
39+
40+
def get_citation(self):
41+
return ASIMOV_V2_CITATION
42+
43+
def get_homepage(self):
44+
return ASIMOV_V2_HOMEPAGE
45+
46+
def get_relative_dataset_location(self):
47+
return 'asimov_v2_injuries/0.1.0'
48+
49+
50+
class AsimovV2Videos(dataset_importer_builder.TFDSDatasetImporterBuilder):
51+
"""DatasetBuilder for `asimov_2_videos` dataset."""
52+
53+
def get_description(self):
54+
return (
55+
'Photorealistic videos involving potential physical injury scenarios.'
56+
)
57+
58+
def get_citation(self):
59+
return ASIMOV_V2_CITATION
60+
61+
def get_homepage(self):
62+
return ASIMOV_V2_HOMEPAGE
63+
64+
def get_relative_dataset_location(self):
65+
return 'asimov_v2_videos/0.1.0'
66+
67+
68+
class AsimovV2ConstraintsWithoutRationale(
69+
dataset_importer_builder.TFDSDatasetImporterBuilder
70+
):
71+
"""DatasetBuilder for `asimov_v2_constraints_without_rationale` dataset."""
72+
73+
def get_description(self):
74+
return (
75+
'Dataset to evaluate the ability to reason and adhere to'
76+
' physical safety constraints imposed by embodiment limitations.'
77+
' No rationale for the answer needs to be provided.'
78+
)
79+
80+
def get_citation(self):
81+
return ASIMOV_V2_CITATION
82+
83+
def get_homepage(self):
84+
return ASIMOV_V2_HOMEPAGE
85+
86+
def get_relative_dataset_location(self):
87+
return 'asimov_v2_constraints_without_rationale/0.1.0'
88+
89+
90+
class AsimovV2ConstraintsWithRationale(
91+
dataset_importer_builder.TFDSDatasetImporterBuilder
92+
):
93+
"""DatasetBuilder for `asimov_v2_constraints_with_rationale` dataset."""
94+
95+
def get_description(self):
96+
return (
97+
'Dataset to evaluate the ability to reason and adhere to'
98+
' physical safety constraints imposed by embodiment limitations.'
99+
' Rationale for the answer needs to be provided.'
100+
)
101+
102+
def get_citation(self):
103+
return ASIMOV_V2_CITATION
104+
105+
def get_homepage(self):
106+
return ASIMOV_V2_HOMEPAGE
107+
108+
def get_relative_dataset_location(self):
109+
return 'asimov_v2_constraints_with_rationale/0.1.0'

0 commit comments

Comments
 (0)