android-env 1.2.1__py3-none-any.whl → 1.2.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. android_env/__init__.py +1 -1
  2. android_env/components/__init__.py +1 -1
  3. android_env/components/a11y/__init__.py +15 -0
  4. android_env/components/a11y/a11y_events.py +118 -0
  5. android_env/components/a11y/a11y_events_test.py +173 -0
  6. android_env/components/a11y/a11y_forests.py +128 -0
  7. android_env/components/a11y/a11y_forests_test.py +237 -0
  8. android_env/components/a11y/a11y_servicer.py +199 -0
  9. android_env/components/a11y/a11y_servicer_test.py +224 -0
  10. android_env/components/action_fns.py +132 -0
  11. android_env/components/action_fns_test.py +227 -0
  12. android_env/components/action_type.py +26 -3
  13. android_env/components/adb_call_parser.py +239 -196
  14. android_env/components/adb_call_parser_test.py +179 -209
  15. android_env/components/adb_controller.py +90 -52
  16. android_env/components/adb_controller_test.py +187 -16
  17. android_env/components/adb_log_stream.py +17 -5
  18. android_env/components/adb_log_stream_test.py +17 -3
  19. android_env/components/app_screen_checker.py +17 -15
  20. android_env/components/app_screen_checker_test.py +7 -8
  21. android_env/components/config_classes.py +203 -0
  22. android_env/components/coordinator.py +102 -338
  23. android_env/components/coordinator_test.py +59 -199
  24. android_env/components/device_settings.py +174 -0
  25. android_env/components/device_settings_test.py +228 -0
  26. android_env/components/dumpsys_thread.py +3 -4
  27. android_env/components/dumpsys_thread_test.py +1 -1
  28. android_env/components/errors.py +52 -10
  29. android_env/components/errors_test.py +110 -0
  30. android_env/components/log_stream.py +7 -5
  31. android_env/components/log_stream_test.py +1 -1
  32. android_env/components/logcat_thread.py +9 -8
  33. android_env/components/logcat_thread_test.py +3 -4
  34. android_env/components/{utils.py → pixel_fns.py} +20 -20
  35. android_env/components/{utils_test.py → pixel_fns_test.py} +20 -15
  36. android_env/components/setup_step_interpreter.py +47 -39
  37. android_env/components/setup_step_interpreter_test.py +4 -4
  38. android_env/components/simulators/__init__.py +1 -1
  39. android_env/components/simulators/base_simulator.py +116 -44
  40. android_env/components/simulators/base_simulator_test.py +131 -9
  41. android_env/components/simulators/emulator/__init__.py +1 -1
  42. android_env/components/simulators/emulator/emulator_launcher.py +67 -77
  43. android_env/components/simulators/emulator/emulator_launcher_test.py +153 -49
  44. android_env/components/simulators/emulator/emulator_simulator.py +276 -95
  45. android_env/components/simulators/emulator/emulator_simulator_test.py +314 -89
  46. android_env/components/simulators/fake/__init__.py +1 -1
  47. android_env/components/simulators/fake/fake_simulator.py +17 -25
  48. android_env/components/simulators/fake/fake_simulator_test.py +29 -12
  49. android_env/components/specs.py +18 -28
  50. android_env/components/specs_test.py +1 -44
  51. android_env/components/task_manager.py +48 -48
  52. android_env/components/task_manager_test.py +71 -60
  53. android_env/env_interface.py +37 -23
  54. android_env/environment.py +83 -51
  55. android_env/environment_test.py +68 -29
  56. android_env/loader.py +57 -43
  57. android_env/loader_test.py +115 -35
  58. android_env/proto/__init__.py +1 -1
  59. android_env/proto/a11y/__init__.py +15 -0
  60. android_env/proto/a11y/a11y.proto +75 -0
  61. android_env/proto/a11y/a11y_pb2.py +54 -0
  62. android_env/proto/a11y/a11y_pb2.pyi +49 -0
  63. android_env/proto/a11y/a11y_pb2_grpc.py +202 -0
  64. android_env/proto/a11y/android_accessibility_action.proto +32 -0
  65. android_env/proto/a11y/android_accessibility_action_pb2.py +37 -0
  66. android_env/proto/a11y/android_accessibility_action_pb2.pyi +13 -0
  67. android_env/proto/a11y/android_accessibility_action_pb2_grpc.py +24 -0
  68. android_env/proto/a11y/android_accessibility_forest.proto +29 -0
  69. android_env/proto/a11y/android_accessibility_forest_pb2.py +38 -0
  70. android_env/proto/a11y/android_accessibility_forest_pb2.pyi +13 -0
  71. android_env/proto/a11y/android_accessibility_forest_pb2_grpc.py +24 -0
  72. android_env/proto/a11y/android_accessibility_node_info.proto +122 -0
  73. android_env/proto/a11y/android_accessibility_node_info_clickable_span.proto +49 -0
  74. android_env/proto/a11y/android_accessibility_node_info_clickable_span_pb2.py +39 -0
  75. android_env/proto/a11y/android_accessibility_node_info_clickable_span_pb2.pyi +28 -0
  76. android_env/proto/a11y/android_accessibility_node_info_clickable_span_pb2_grpc.py +24 -0
  77. android_env/proto/a11y/android_accessibility_node_info_pb2.py +42 -0
  78. android_env/proto/a11y/android_accessibility_node_info_pb2.pyi +75 -0
  79. android_env/proto/a11y/android_accessibility_node_info_pb2_grpc.py +24 -0
  80. android_env/proto/a11y/android_accessibility_tree.proto +29 -0
  81. android_env/proto/a11y/android_accessibility_tree_pb2.py +38 -0
  82. android_env/proto/a11y/android_accessibility_tree_pb2.pyi +13 -0
  83. android_env/proto/a11y/android_accessibility_tree_pb2_grpc.py +24 -0
  84. android_env/proto/a11y/android_accessibility_window_info.proto +84 -0
  85. android_env/proto/a11y/android_accessibility_window_info_pb2.py +41 -0
  86. android_env/proto/a11y/android_accessibility_window_info_pb2.pyi +48 -0
  87. android_env/proto/a11y/android_accessibility_window_info_pb2_grpc.py +24 -0
  88. android_env/proto/a11y/rect.proto +30 -0
  89. android_env/proto/a11y/rect_pb2.py +37 -0
  90. android_env/proto/a11y/rect_pb2.pyi +17 -0
  91. android_env/proto/a11y/rect_pb2_grpc.py +24 -0
  92. android_env/proto/adb.proto +17 -6
  93. android_env/proto/adb_pb2.py +120 -107
  94. android_env/proto/adb_pb2.pyi +396 -0
  95. android_env/proto/adb_pb2_grpc.py +20 -0
  96. android_env/proto/emulator_controller.proto +68 -63
  97. android_env/proto/emulator_controller_pb2.py +142 -131
  98. android_env/proto/emulator_controller_pb2.pyi +672 -0
  99. android_env/proto/emulator_controller_pb2_grpc.py +505 -142
  100. android_env/proto/snapshot.proto +169 -0
  101. android_env/proto/snapshot_pb2.py +47 -0
  102. android_env/proto/snapshot_pb2.pyi +117 -0
  103. android_env/proto/snapshot_pb2_grpc.py +24 -0
  104. android_env/proto/snapshot_service.proto +289 -0
  105. android_env/proto/snapshot_service_pb2.py +54 -0
  106. android_env/proto/snapshot_service_pb2.pyi +86 -0
  107. android_env/proto/snapshot_service_pb2_grpc.py +487 -0
  108. android_env/proto/state.proto +63 -0
  109. android_env/proto/state_pb2.py +63 -0
  110. android_env/proto/state_pb2.pyi +85 -0
  111. android_env/proto/state_pb2_grpc.py +24 -0
  112. android_env/proto/task.proto +5 -1
  113. android_env/proto/task_pb2.py +42 -31
  114. android_env/proto/task_pb2.pyi +160 -0
  115. android_env/proto/task_pb2_grpc.py +20 -0
  116. android_env/wrappers/__init__.py +1 -1
  117. android_env/wrappers/a11y_grpc_wrapper.py +500 -0
  118. android_env/wrappers/a11y_grpc_wrapper_test.py +849 -0
  119. android_env/wrappers/base_wrapper.py +34 -13
  120. android_env/wrappers/base_wrapper_test.py +22 -16
  121. android_env/wrappers/discrete_action_wrapper.py +18 -17
  122. android_env/wrappers/discrete_action_wrapper_test.py +4 -4
  123. android_env/wrappers/flat_interface_wrapper.py +5 -5
  124. android_env/wrappers/flat_interface_wrapper_test.py +7 -11
  125. android_env/wrappers/float_pixels_wrapper.py +9 -10
  126. android_env/wrappers/float_pixels_wrapper_test.py +3 -3
  127. android_env/wrappers/gym_wrapper.py +19 -13
  128. android_env/wrappers/gym_wrapper_test.py +3 -5
  129. android_env/wrappers/image_rescale_wrapper.py +18 -21
  130. android_env/wrappers/image_rescale_wrapper_test.py +25 -37
  131. android_env/wrappers/last_action_wrapper.py +16 -13
  132. android_env/wrappers/last_action_wrapper_test.py +44 -51
  133. android_env/wrappers/rate_limit_wrapper.py +6 -3
  134. android_env/wrappers/rate_limit_wrapper_test.py +22 -1
  135. android_env/wrappers/tap_action_wrapper.py +16 -17
  136. android_env/wrappers/tap_action_wrapper_test.py +51 -16
  137. {android_env-1.2.1.dist-info → android_env-1.2.3.dist-info}/METADATA +14 -18
  138. android_env-1.2.3.dist-info/RECORD +141 -0
  139. {android_env-1.2.1.dist-info → android_env-1.2.3.dist-info}/WHEEL +1 -1
  140. android_env/proto/raw_observation.proto +0 -39
  141. android_env/proto/raw_observation_pb2.py +0 -27
  142. android_env/proto/raw_observation_pb2_grpc.py +0 -4
  143. android_env-1.2.1.dist-info/RECORD +0 -81
  144. {android_env-1.2.1.dist-info → android_env-1.2.3.dist-info/licenses}/LICENSE +0 -0
  145. {android_env-1.2.1.dist-info → android_env-1.2.3.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,63 @@
1
+ // Copyright 2024 DeepMind Technologies Limited.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ syntax = "proto3";
16
+
17
+ package android_env;
18
+
19
+ option java_multiple_files = true;
20
+
21
+ message SaveStateRequest {
22
+ map<string, string> args = 1;
23
+ }
24
+
25
+ message LoadStateRequest {
26
+ map<string, string> args = 1;
27
+ }
28
+
29
+ message SaveStateResponse {
30
+ enum Status {
31
+ // Reserved value for unset statuses.
32
+ UNDEFINED = 0;
33
+ // Returned when everything goes well.
34
+ OK = 1;
35
+ // Returned when something internal did not work as expected.
36
+ ERROR = 2;
37
+ }
38
+ Status status = 1;
39
+ // `error_message` is only populated in case of errors.
40
+ string error_message = 2;
41
+
42
+ // Any additional info returned during the request; e.g., file paths or sizes.
43
+ map<string, string> additional_info = 3;
44
+ }
45
+
46
+ message LoadStateResponse {
47
+ enum Status {
48
+ // Reserved value for unset statuses.
49
+ UNDEFINED = 0;
50
+ // Returned when everything goes well.
51
+ OK = 1;
52
+ // Returned when there is no state to load.
53
+ NOT_FOUND = 2;
54
+ // Returned when something internal did not work as expected.
55
+ ERROR = 3;
56
+ }
57
+ Status status = 1;
58
+ // `error_message` is only populated in case of errors.
59
+ string error_message = 2;
60
+
61
+ // Any additional info returned during the request; e.g., file paths or sizes.
62
+ map<string, string> additional_info = 3;
63
+ }
@@ -0,0 +1,63 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: android_env/proto/state.proto
5
+ # Protobuf Python Version: 5.29.0
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 5,
15
+ 29,
16
+ 0,
17
+ '',
18
+ 'android_env/proto/state.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+
26
+
27
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1d\x61ndroid_env/proto/state.proto\x12\x0b\x61ndroid_env\"v\n\x10SaveStateRequest\x12\x35\n\x04\x61rgs\x18\x01 \x03(\x0b\x32\'.android_env.SaveStateRequest.ArgsEntry\x1a+\n\tArgsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"v\n\x10LoadStateRequest\x12\x35\n\x04\x61rgs\x18\x01 \x03(\x0b\x32\'.android_env.LoadStateRequest.ArgsEntry\x1a+\n\tArgsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x91\x02\n\x11SaveStateResponse\x12\x35\n\x06status\x18\x01 \x01(\x0e\x32%.android_env.SaveStateResponse.Status\x12\x15\n\rerror_message\x18\x02 \x01(\t\x12K\n\x0f\x61\x64\x64itional_info\x18\x03 \x03(\x0b\x32\x32.android_env.SaveStateResponse.AdditionalInfoEntry\x1a\x35\n\x13\x41\x64\x64itionalInfoEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"*\n\x06Status\x12\r\n\tUNDEFINED\x10\x00\x12\x06\n\x02OK\x10\x01\x12\t\n\x05\x45RROR\x10\x02\"\xa0\x02\n\x11LoadStateResponse\x12\x35\n\x06status\x18\x01 \x01(\x0e\x32%.android_env.LoadStateResponse.Status\x12\x15\n\rerror_message\x18\x02 \x01(\t\x12K\n\x0f\x61\x64\x64itional_info\x18\x03 \x03(\x0b\x32\x32.android_env.LoadStateResponse.AdditionalInfoEntry\x1a\x35\n\x13\x41\x64\x64itionalInfoEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"9\n\x06Status\x12\r\n\tUNDEFINED\x10\x00\x12\x06\n\x02OK\x10\x01\x12\r\n\tNOT_FOUND\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x42\x02P\x01\x62\x06proto3')
28
+
29
+ _globals = globals()
30
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
31
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'android_env.proto.state_pb2', _globals)
32
+ if not _descriptor._USE_C_DESCRIPTORS:
33
+ _globals['DESCRIPTOR']._loaded_options = None
34
+ _globals['DESCRIPTOR']._serialized_options = b'P\001'
35
+ _globals['_SAVESTATEREQUEST_ARGSENTRY']._loaded_options = None
36
+ _globals['_SAVESTATEREQUEST_ARGSENTRY']._serialized_options = b'8\001'
37
+ _globals['_LOADSTATEREQUEST_ARGSENTRY']._loaded_options = None
38
+ _globals['_LOADSTATEREQUEST_ARGSENTRY']._serialized_options = b'8\001'
39
+ _globals['_SAVESTATERESPONSE_ADDITIONALINFOENTRY']._loaded_options = None
40
+ _globals['_SAVESTATERESPONSE_ADDITIONALINFOENTRY']._serialized_options = b'8\001'
41
+ _globals['_LOADSTATERESPONSE_ADDITIONALINFOENTRY']._loaded_options = None
42
+ _globals['_LOADSTATERESPONSE_ADDITIONALINFOENTRY']._serialized_options = b'8\001'
43
+ _globals['_SAVESTATEREQUEST']._serialized_start=46
44
+ _globals['_SAVESTATEREQUEST']._serialized_end=164
45
+ _globals['_SAVESTATEREQUEST_ARGSENTRY']._serialized_start=121
46
+ _globals['_SAVESTATEREQUEST_ARGSENTRY']._serialized_end=164
47
+ _globals['_LOADSTATEREQUEST']._serialized_start=166
48
+ _globals['_LOADSTATEREQUEST']._serialized_end=284
49
+ _globals['_LOADSTATEREQUEST_ARGSENTRY']._serialized_start=121
50
+ _globals['_LOADSTATEREQUEST_ARGSENTRY']._serialized_end=164
51
+ _globals['_SAVESTATERESPONSE']._serialized_start=287
52
+ _globals['_SAVESTATERESPONSE']._serialized_end=560
53
+ _globals['_SAVESTATERESPONSE_ADDITIONALINFOENTRY']._serialized_start=463
54
+ _globals['_SAVESTATERESPONSE_ADDITIONALINFOENTRY']._serialized_end=516
55
+ _globals['_SAVESTATERESPONSE_STATUS']._serialized_start=518
56
+ _globals['_SAVESTATERESPONSE_STATUS']._serialized_end=560
57
+ _globals['_LOADSTATERESPONSE']._serialized_start=563
58
+ _globals['_LOADSTATERESPONSE']._serialized_end=851
59
+ _globals['_LOADSTATERESPONSE_ADDITIONALINFOENTRY']._serialized_start=463
60
+ _globals['_LOADSTATERESPONSE_ADDITIONALINFOENTRY']._serialized_end=516
61
+ _globals['_LOADSTATERESPONSE_STATUS']._serialized_start=794
62
+ _globals['_LOADSTATERESPONSE_STATUS']._serialized_end=851
63
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,85 @@
1
+ from google.protobuf.internal import containers as _containers
2
+ from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
3
+ from google.protobuf import descriptor as _descriptor
4
+ from google.protobuf import message as _message
5
+ from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union
6
+
7
+ DESCRIPTOR: _descriptor.FileDescriptor
8
+
9
+ class SaveStateRequest(_message.Message):
10
+ __slots__ = ("args",)
11
+ class ArgsEntry(_message.Message):
12
+ __slots__ = ("key", "value")
13
+ KEY_FIELD_NUMBER: _ClassVar[int]
14
+ VALUE_FIELD_NUMBER: _ClassVar[int]
15
+ key: str
16
+ value: str
17
+ def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ...
18
+ ARGS_FIELD_NUMBER: _ClassVar[int]
19
+ args: _containers.ScalarMap[str, str]
20
+ def __init__(self, args: _Optional[_Mapping[str, str]] = ...) -> None: ...
21
+
22
+ class LoadStateRequest(_message.Message):
23
+ __slots__ = ("args",)
24
+ class ArgsEntry(_message.Message):
25
+ __slots__ = ("key", "value")
26
+ KEY_FIELD_NUMBER: _ClassVar[int]
27
+ VALUE_FIELD_NUMBER: _ClassVar[int]
28
+ key: str
29
+ value: str
30
+ def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ...
31
+ ARGS_FIELD_NUMBER: _ClassVar[int]
32
+ args: _containers.ScalarMap[str, str]
33
+ def __init__(self, args: _Optional[_Mapping[str, str]] = ...) -> None: ...
34
+
35
+ class SaveStateResponse(_message.Message):
36
+ __slots__ = ("status", "error_message", "additional_info")
37
+ class Status(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
38
+ __slots__ = ()
39
+ UNDEFINED: _ClassVar[SaveStateResponse.Status]
40
+ OK: _ClassVar[SaveStateResponse.Status]
41
+ ERROR: _ClassVar[SaveStateResponse.Status]
42
+ UNDEFINED: SaveStateResponse.Status
43
+ OK: SaveStateResponse.Status
44
+ ERROR: SaveStateResponse.Status
45
+ class AdditionalInfoEntry(_message.Message):
46
+ __slots__ = ("key", "value")
47
+ KEY_FIELD_NUMBER: _ClassVar[int]
48
+ VALUE_FIELD_NUMBER: _ClassVar[int]
49
+ key: str
50
+ value: str
51
+ def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ...
52
+ STATUS_FIELD_NUMBER: _ClassVar[int]
53
+ ERROR_MESSAGE_FIELD_NUMBER: _ClassVar[int]
54
+ ADDITIONAL_INFO_FIELD_NUMBER: _ClassVar[int]
55
+ status: SaveStateResponse.Status
56
+ error_message: str
57
+ additional_info: _containers.ScalarMap[str, str]
58
+ def __init__(self, status: _Optional[_Union[SaveStateResponse.Status, str]] = ..., error_message: _Optional[str] = ..., additional_info: _Optional[_Mapping[str, str]] = ...) -> None: ...
59
+
60
+ class LoadStateResponse(_message.Message):
61
+ __slots__ = ("status", "error_message", "additional_info")
62
+ class Status(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
63
+ __slots__ = ()
64
+ UNDEFINED: _ClassVar[LoadStateResponse.Status]
65
+ OK: _ClassVar[LoadStateResponse.Status]
66
+ NOT_FOUND: _ClassVar[LoadStateResponse.Status]
67
+ ERROR: _ClassVar[LoadStateResponse.Status]
68
+ UNDEFINED: LoadStateResponse.Status
69
+ OK: LoadStateResponse.Status
70
+ NOT_FOUND: LoadStateResponse.Status
71
+ ERROR: LoadStateResponse.Status
72
+ class AdditionalInfoEntry(_message.Message):
73
+ __slots__ = ("key", "value")
74
+ KEY_FIELD_NUMBER: _ClassVar[int]
75
+ VALUE_FIELD_NUMBER: _ClassVar[int]
76
+ key: str
77
+ value: str
78
+ def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ...
79
+ STATUS_FIELD_NUMBER: _ClassVar[int]
80
+ ERROR_MESSAGE_FIELD_NUMBER: _ClassVar[int]
81
+ ADDITIONAL_INFO_FIELD_NUMBER: _ClassVar[int]
82
+ status: LoadStateResponse.Status
83
+ error_message: str
84
+ additional_info: _containers.ScalarMap[str, str]
85
+ def __init__(self, status: _Optional[_Union[LoadStateResponse.Status, str]] = ..., error_message: _Optional[str] = ..., additional_info: _Optional[_Mapping[str, str]] = ...) -> None: ...
@@ -0,0 +1,24 @@
1
+ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
+ """Client and server classes corresponding to protobuf-defined services."""
3
+ import grpc
4
+ import warnings
5
+
6
+
7
+ GRPC_GENERATED_VERSION = '1.71.0'
8
+ GRPC_VERSION = grpc.__version__
9
+ _version_not_supported = False
10
+
11
+ try:
12
+ from grpc._utilities import first_version_is_lower
13
+ _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
14
+ except ImportError:
15
+ _version_not_supported = True
16
+
17
+ if _version_not_supported:
18
+ raise RuntimeError(
19
+ f'The grpc package installed is at version {GRPC_VERSION},'
20
+ + f' but the generated code in android_env/proto/state_pb2_grpc.py depends on'
21
+ + f' grpcio>={GRPC_GENERATED_VERSION}.'
22
+ + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
23
+ + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
24
+ )
@@ -1,4 +1,4 @@
1
- // Copyright 2022 DeepMind Technologies Limited.
1
+ // Copyright 2024 DeepMind Technologies Limited.
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -102,6 +102,7 @@ message ArraySpec {
102
102
  STRING_U25 = 14;
103
103
  STRING_U250 = 15;
104
104
  STRING = 16; // String without max length
105
+ OBJECT = 17;
105
106
  }
106
107
 
107
108
  // Data type of elements we expect to see in an array of this spec.
@@ -189,6 +190,9 @@ message Task {
189
190
  // Defines parameters for parsing messages from logcat.
190
191
  LogParsingConfig log_parsing_config = 9;
191
192
 
193
+ // NOTE: This field is deprecated and will be removed from this Task
194
+ // definition soon.
195
+ //
192
196
  // (Optional): The task may also define extras to help the RL agent.
193
197
  // An Extra in AndroidEnv is any information that apps may send to aid the
194
198
  // understanding of the task. The type of information sent through this
@@ -1,11 +1,22 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
3
4
  # source: android_env/proto/task.proto
5
+ # Protobuf Python Version: 5.29.0
4
6
  """Generated protocol buffer code."""
5
- from google.protobuf.internal import builder as _builder
6
7
  from google.protobuf import descriptor as _descriptor
7
8
  from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
8
10
  from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 5,
15
+ 29,
16
+ 0,
17
+ '',
18
+ 'android_env/proto/task.proto'
19
+ )
9
20
  # @@protoc_insertion_point(imports)
10
21
 
11
22
  _sym_db = _symbol_database.Default()
@@ -14,35 +25,35 @@ _sym_db = _symbol_database.Default()
14
25
  from android_env.proto import adb_pb2 as android__env_dot_proto_dot_adb__pb2
15
26
 
16
27
 
17
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1c\x61ndroid_env/proto/task.proto\x12\x0b\x61ndroid_env\x1a\x1b\x61ndroid_env/proto/adb.proto\":\n\tAppScreen\x12\x10\n\x08\x61\x63tivity\x18\x01 \x01(\t\x12\x1b\n\x13view_hierarchy_path\x18\x02 \x03(\t\"S\n\x10WaitForAppScreen\x12*\n\napp_screen\x18\x01 \x01(\x0b\x32\x16.android_env.AppScreen\x12\x13\n\x0btimeout_sec\x18\x02 \x01(\x02\"9\n\x0c\x43heckInstall\x12\x14\n\x0cpackage_name\x18\x01 \x01(\t\x12\x13\n\x0btimeout_sec\x18\x02 \x01(\x02\"\x19\n\x05Sleep\x12\x10\n\x08time_sec\x18\x01 \x01(\x02\"\xa2\x01\n\x10SuccessCondition\x12\x13\n\x0bnum_retries\x18\x01 \x01(\x05\x12<\n\x13wait_for_app_screen\x18\x02 \x01(\x0b\x32\x1d.android_env.WaitForAppScreenH\x00\x12\x32\n\rcheck_install\x18\x03 \x01(\x0b\x32\x19.android_env.CheckInstallH\x00\x42\x07\n\x05\x63heck\"\xa2\x01\n\tSetupStep\x12\x38\n\x11success_condition\x18\x01 \x01(\x0b\x32\x1d.android_env.SuccessCondition\x12.\n\x0b\x61\x64\x62_request\x18\x02 \x01(\x0b\x32\x17.android_env.AdbRequestH\x00\x12#\n\x05sleep\x18\x03 \x01(\x0b\x32\x12.android_env.SleepH\x00\x42\x06\n\x04step\"\xc3\x02\n\tArraySpec\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05shape\x18\x02 \x03(\x05\x12.\n\x05\x64type\x18\x03 \x01(\x0e\x32\x1f.android_env.ArraySpec.DataType\"\xe8\x01\n\x08\x44\x61taType\x12\x15\n\x11INVALID_DATA_TYPE\x10\x00\x12\t\n\x05\x46LOAT\x10\x01\x12\n\n\x06\x44OUBLE\x10\x02\x12\x08\n\x04INT8\x10\x03\x12\t\n\x05INT16\x10\x04\x12\t\n\x05INT32\x10\x05\x12\t\n\x05INT64\x10\x06\x12\t\n\x05UINT8\x10\x07\x12\n\n\x06UINT16\x10\x08\x12\n\n\x06UINT32\x10\t\x12\n\n\x06UINT64\x10\n\x12\x08\n\x04\x42OOL\x10\x0b\x12\r\n\tSTRING_U1\x10\x0c\x12\x0e\n\nSTRING_U16\x10\r\x12\x0e\n\nSTRING_U25\x10\x0e\x12\x0f\n\x0bSTRING_U250\x10\x0f\x12\n\n\x06STRING\x10\x10\"\xc2\x02\n\x10LogParsingConfig\x12\x0f\n\x07\x66ilters\x18\x01 \x03(\t\x12=\n\x0blog_regexps\x18\x02 \x01(\x0b\x32(.android_env.LogParsingConfig.LogRegexps\x1a\xdd\x01\n\nLogRegexps\x12\r\n\x05score\x18\x01 \x01(\t\x12\x0e\n\x06reward\x18\x02 \x03(\t\x12\x13\n\x0b\x65pisode_end\x18\x03 \x03(\t\x12\r\n\x05\x65xtra\x18\x04 \x03(\t\x12\x12\n\njson_extra\x18\x05 \x03(\t\x12J\n\x0creward_event\x18\x06 \x03(\x0b\x32\x34.android_env.LogParsingConfig.LogRegexps.RewardEvent\x1a,\n\x0bRewardEvent\x12\r\n\x05\x65vent\x18\x01 \x01(\t\x12\x0e\n\x06reward\x18\x02 \x01(\x02\"\xe0\x02\n\x04Task\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12+\n\x0bsetup_steps\x18\x04 \x03(\x0b\x32\x16.android_env.SetupStep\x12+\n\x0breset_steps\x18\x05 \x03(\x0b\x32\x16.android_env.SetupStep\x12\x33\n\x13\x65xpected_app_screen\x18\x06 \x01(\x0b\x32\x16.android_env.AppScreen\x12\x17\n\x0fmax_episode_sec\x18\x07 \x01(\x02\x12\x19\n\x11max_episode_steps\x18\x08 \x01(\x05\x12\x39\n\x12log_parsing_config\x18\t \x01(\x0b\x32\x1d.android_env.LogParsingConfig\x12+\n\x0b\x65xtras_spec\x18\n \x03(\x0b\x32\x16.android_env.ArraySpecb\x06proto3')
18
-
19
- _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
20
- _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'android_env.proto.task_pb2', globals())
21
- if _descriptor._USE_C_DESCRIPTORS == False:
28
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1c\x61ndroid_env/proto/task.proto\x12\x0b\x61ndroid_env\x1a\x1b\x61ndroid_env/proto/adb.proto\":\n\tAppScreen\x12\x10\n\x08\x61\x63tivity\x18\x01 \x01(\t\x12\x1b\n\x13view_hierarchy_path\x18\x02 \x03(\t\"S\n\x10WaitForAppScreen\x12*\n\napp_screen\x18\x01 \x01(\x0b\x32\x16.android_env.AppScreen\x12\x13\n\x0btimeout_sec\x18\x02 \x01(\x02\"9\n\x0c\x43heckInstall\x12\x14\n\x0cpackage_name\x18\x01 \x01(\t\x12\x13\n\x0btimeout_sec\x18\x02 \x01(\x02\"\x19\n\x05Sleep\x12\x10\n\x08time_sec\x18\x01 \x01(\x02\"\xa2\x01\n\x10SuccessCondition\x12\x13\n\x0bnum_retries\x18\x01 \x01(\x05\x12<\n\x13wait_for_app_screen\x18\x02 \x01(\x0b\x32\x1d.android_env.WaitForAppScreenH\x00\x12\x32\n\rcheck_install\x18\x03 \x01(\x0b\x32\x19.android_env.CheckInstallH\x00\x42\x07\n\x05\x63heck\"\xa2\x01\n\tSetupStep\x12\x38\n\x11success_condition\x18\x01 \x01(\x0b\x32\x1d.android_env.SuccessCondition\x12.\n\x0b\x61\x64\x62_request\x18\x02 \x01(\x0b\x32\x17.android_env.AdbRequestH\x00\x12#\n\x05sleep\x18\x03 \x01(\x0b\x32\x12.android_env.SleepH\x00\x42\x06\n\x04step\"\xcf\x02\n\tArraySpec\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05shape\x18\x02 \x03(\x05\x12.\n\x05\x64type\x18\x03 \x01(\x0e\x32\x1f.android_env.ArraySpec.DataType\"\xf4\x01\n\x08\x44\x61taType\x12\x15\n\x11INVALID_DATA_TYPE\x10\x00\x12\t\n\x05\x46LOAT\x10\x01\x12\n\n\x06\x44OUBLE\x10\x02\x12\x08\n\x04INT8\x10\x03\x12\t\n\x05INT16\x10\x04\x12\t\n\x05INT32\x10\x05\x12\t\n\x05INT64\x10\x06\x12\t\n\x05UINT8\x10\x07\x12\n\n\x06UINT16\x10\x08\x12\n\n\x06UINT32\x10\t\x12\n\n\x06UINT64\x10\n\x12\x08\n\x04\x42OOL\x10\x0b\x12\r\n\tSTRING_U1\x10\x0c\x12\x0e\n\nSTRING_U16\x10\r\x12\x0e\n\nSTRING_U25\x10\x0e\x12\x0f\n\x0bSTRING_U250\x10\x0f\x12\n\n\x06STRING\x10\x10\x12\n\n\x06OBJECT\x10\x11\"\xc2\x02\n\x10LogParsingConfig\x12\x0f\n\x07\x66ilters\x18\x01 \x03(\t\x12=\n\x0blog_regexps\x18\x02 \x01(\x0b\x32(.android_env.LogParsingConfig.LogRegexps\x1a\xdd\x01\n\nLogRegexps\x12\r\n\x05score\x18\x01 \x01(\t\x12\x0e\n\x06reward\x18\x02 \x03(\t\x12\x13\n\x0b\x65pisode_end\x18\x03 \x03(\t\x12\r\n\x05\x65xtra\x18\x04 \x03(\t\x12\x12\n\njson_extra\x18\x05 \x03(\t\x12J\n\x0creward_event\x18\x06 \x03(\x0b\x32\x34.android_env.LogParsingConfig.LogRegexps.RewardEvent\x1a,\n\x0bRewardEvent\x12\r\n\x05\x65vent\x18\x01 \x01(\t\x12\x0e\n\x06reward\x18\x02 \x01(\x02\"\xe0\x02\n\x04Task\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12+\n\x0bsetup_steps\x18\x04 \x03(\x0b\x32\x16.android_env.SetupStep\x12+\n\x0breset_steps\x18\x05 \x03(\x0b\x32\x16.android_env.SetupStep\x12\x33\n\x13\x65xpected_app_screen\x18\x06 \x01(\x0b\x32\x16.android_env.AppScreen\x12\x17\n\x0fmax_episode_sec\x18\x07 \x01(\x02\x12\x19\n\x11max_episode_steps\x18\x08 \x01(\x05\x12\x39\n\x12log_parsing_config\x18\t \x01(\x0b\x32\x1d.android_env.LogParsingConfig\x12+\n\x0b\x65xtras_spec\x18\n \x03(\x0b\x32\x16.android_env.ArraySpecb\x06proto3')
22
29
 
23
- DESCRIPTOR._options = None
24
- _APPSCREEN._serialized_start=74
25
- _APPSCREEN._serialized_end=132
26
- _WAITFORAPPSCREEN._serialized_start=134
27
- _WAITFORAPPSCREEN._serialized_end=217
28
- _CHECKINSTALL._serialized_start=219
29
- _CHECKINSTALL._serialized_end=276
30
- _SLEEP._serialized_start=278
31
- _SLEEP._serialized_end=303
32
- _SUCCESSCONDITION._serialized_start=306
33
- _SUCCESSCONDITION._serialized_end=468
34
- _SETUPSTEP._serialized_start=471
35
- _SETUPSTEP._serialized_end=633
36
- _ARRAYSPEC._serialized_start=636
37
- _ARRAYSPEC._serialized_end=959
38
- _ARRAYSPEC_DATATYPE._serialized_start=727
39
- _ARRAYSPEC_DATATYPE._serialized_end=959
40
- _LOGPARSINGCONFIG._serialized_start=962
41
- _LOGPARSINGCONFIG._serialized_end=1284
42
- _LOGPARSINGCONFIG_LOGREGEXPS._serialized_start=1063
43
- _LOGPARSINGCONFIG_LOGREGEXPS._serialized_end=1284
44
- _LOGPARSINGCONFIG_LOGREGEXPS_REWARDEVENT._serialized_start=1240
45
- _LOGPARSINGCONFIG_LOGREGEXPS_REWARDEVENT._serialized_end=1284
46
- _TASK._serialized_start=1287
47
- _TASK._serialized_end=1639
30
+ _globals = globals()
31
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
32
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'android_env.proto.task_pb2', _globals)
33
+ if not _descriptor._USE_C_DESCRIPTORS:
34
+ DESCRIPTOR._loaded_options = None
35
+ _globals['_APPSCREEN']._serialized_start=74
36
+ _globals['_APPSCREEN']._serialized_end=132
37
+ _globals['_WAITFORAPPSCREEN']._serialized_start=134
38
+ _globals['_WAITFORAPPSCREEN']._serialized_end=217
39
+ _globals['_CHECKINSTALL']._serialized_start=219
40
+ _globals['_CHECKINSTALL']._serialized_end=276
41
+ _globals['_SLEEP']._serialized_start=278
42
+ _globals['_SLEEP']._serialized_end=303
43
+ _globals['_SUCCESSCONDITION']._serialized_start=306
44
+ _globals['_SUCCESSCONDITION']._serialized_end=468
45
+ _globals['_SETUPSTEP']._serialized_start=471
46
+ _globals['_SETUPSTEP']._serialized_end=633
47
+ _globals['_ARRAYSPEC']._serialized_start=636
48
+ _globals['_ARRAYSPEC']._serialized_end=971
49
+ _globals['_ARRAYSPEC_DATATYPE']._serialized_start=727
50
+ _globals['_ARRAYSPEC_DATATYPE']._serialized_end=971
51
+ _globals['_LOGPARSINGCONFIG']._serialized_start=974
52
+ _globals['_LOGPARSINGCONFIG']._serialized_end=1296
53
+ _globals['_LOGPARSINGCONFIG_LOGREGEXPS']._serialized_start=1075
54
+ _globals['_LOGPARSINGCONFIG_LOGREGEXPS']._serialized_end=1296
55
+ _globals['_LOGPARSINGCONFIG_LOGREGEXPS_REWARDEVENT']._serialized_start=1252
56
+ _globals['_LOGPARSINGCONFIG_LOGREGEXPS_REWARDEVENT']._serialized_end=1296
57
+ _globals['_TASK']._serialized_start=1299
58
+ _globals['_TASK']._serialized_end=1651
48
59
  # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,160 @@
1
+ from android_env.proto import adb_pb2 as _adb_pb2
2
+ from google.protobuf.internal import containers as _containers
3
+ from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
4
+ from google.protobuf import descriptor as _descriptor
5
+ from google.protobuf import message as _message
6
+ from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union
7
+
8
+ DESCRIPTOR: _descriptor.FileDescriptor
9
+
10
+ class AppScreen(_message.Message):
11
+ __slots__ = ("activity", "view_hierarchy_path")
12
+ ACTIVITY_FIELD_NUMBER: _ClassVar[int]
13
+ VIEW_HIERARCHY_PATH_FIELD_NUMBER: _ClassVar[int]
14
+ activity: str
15
+ view_hierarchy_path: _containers.RepeatedScalarFieldContainer[str]
16
+ def __init__(self, activity: _Optional[str] = ..., view_hierarchy_path: _Optional[_Iterable[str]] = ...) -> None: ...
17
+
18
+ class WaitForAppScreen(_message.Message):
19
+ __slots__ = ("app_screen", "timeout_sec")
20
+ APP_SCREEN_FIELD_NUMBER: _ClassVar[int]
21
+ TIMEOUT_SEC_FIELD_NUMBER: _ClassVar[int]
22
+ app_screen: AppScreen
23
+ timeout_sec: float
24
+ def __init__(self, app_screen: _Optional[_Union[AppScreen, _Mapping]] = ..., timeout_sec: _Optional[float] = ...) -> None: ...
25
+
26
+ class CheckInstall(_message.Message):
27
+ __slots__ = ("package_name", "timeout_sec")
28
+ PACKAGE_NAME_FIELD_NUMBER: _ClassVar[int]
29
+ TIMEOUT_SEC_FIELD_NUMBER: _ClassVar[int]
30
+ package_name: str
31
+ timeout_sec: float
32
+ def __init__(self, package_name: _Optional[str] = ..., timeout_sec: _Optional[float] = ...) -> None: ...
33
+
34
+ class Sleep(_message.Message):
35
+ __slots__ = ("time_sec",)
36
+ TIME_SEC_FIELD_NUMBER: _ClassVar[int]
37
+ time_sec: float
38
+ def __init__(self, time_sec: _Optional[float] = ...) -> None: ...
39
+
40
+ class SuccessCondition(_message.Message):
41
+ __slots__ = ("num_retries", "wait_for_app_screen", "check_install")
42
+ NUM_RETRIES_FIELD_NUMBER: _ClassVar[int]
43
+ WAIT_FOR_APP_SCREEN_FIELD_NUMBER: _ClassVar[int]
44
+ CHECK_INSTALL_FIELD_NUMBER: _ClassVar[int]
45
+ num_retries: int
46
+ wait_for_app_screen: WaitForAppScreen
47
+ check_install: CheckInstall
48
+ def __init__(self, num_retries: _Optional[int] = ..., wait_for_app_screen: _Optional[_Union[WaitForAppScreen, _Mapping]] = ..., check_install: _Optional[_Union[CheckInstall, _Mapping]] = ...) -> None: ...
49
+
50
+ class SetupStep(_message.Message):
51
+ __slots__ = ("success_condition", "adb_request", "sleep")
52
+ SUCCESS_CONDITION_FIELD_NUMBER: _ClassVar[int]
53
+ ADB_REQUEST_FIELD_NUMBER: _ClassVar[int]
54
+ SLEEP_FIELD_NUMBER: _ClassVar[int]
55
+ success_condition: SuccessCondition
56
+ adb_request: _adb_pb2.AdbRequest
57
+ sleep: Sleep
58
+ def __init__(self, success_condition: _Optional[_Union[SuccessCondition, _Mapping]] = ..., adb_request: _Optional[_Union[_adb_pb2.AdbRequest, _Mapping]] = ..., sleep: _Optional[_Union[Sleep, _Mapping]] = ...) -> None: ...
59
+
60
+ class ArraySpec(_message.Message):
61
+ __slots__ = ("name", "shape", "dtype")
62
+ class DataType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
63
+ __slots__ = ()
64
+ INVALID_DATA_TYPE: _ClassVar[ArraySpec.DataType]
65
+ FLOAT: _ClassVar[ArraySpec.DataType]
66
+ DOUBLE: _ClassVar[ArraySpec.DataType]
67
+ INT8: _ClassVar[ArraySpec.DataType]
68
+ INT16: _ClassVar[ArraySpec.DataType]
69
+ INT32: _ClassVar[ArraySpec.DataType]
70
+ INT64: _ClassVar[ArraySpec.DataType]
71
+ UINT8: _ClassVar[ArraySpec.DataType]
72
+ UINT16: _ClassVar[ArraySpec.DataType]
73
+ UINT32: _ClassVar[ArraySpec.DataType]
74
+ UINT64: _ClassVar[ArraySpec.DataType]
75
+ BOOL: _ClassVar[ArraySpec.DataType]
76
+ STRING_U1: _ClassVar[ArraySpec.DataType]
77
+ STRING_U16: _ClassVar[ArraySpec.DataType]
78
+ STRING_U25: _ClassVar[ArraySpec.DataType]
79
+ STRING_U250: _ClassVar[ArraySpec.DataType]
80
+ STRING: _ClassVar[ArraySpec.DataType]
81
+ OBJECT: _ClassVar[ArraySpec.DataType]
82
+ INVALID_DATA_TYPE: ArraySpec.DataType
83
+ FLOAT: ArraySpec.DataType
84
+ DOUBLE: ArraySpec.DataType
85
+ INT8: ArraySpec.DataType
86
+ INT16: ArraySpec.DataType
87
+ INT32: ArraySpec.DataType
88
+ INT64: ArraySpec.DataType
89
+ UINT8: ArraySpec.DataType
90
+ UINT16: ArraySpec.DataType
91
+ UINT32: ArraySpec.DataType
92
+ UINT64: ArraySpec.DataType
93
+ BOOL: ArraySpec.DataType
94
+ STRING_U1: ArraySpec.DataType
95
+ STRING_U16: ArraySpec.DataType
96
+ STRING_U25: ArraySpec.DataType
97
+ STRING_U250: ArraySpec.DataType
98
+ STRING: ArraySpec.DataType
99
+ OBJECT: ArraySpec.DataType
100
+ NAME_FIELD_NUMBER: _ClassVar[int]
101
+ SHAPE_FIELD_NUMBER: _ClassVar[int]
102
+ DTYPE_FIELD_NUMBER: _ClassVar[int]
103
+ name: str
104
+ shape: _containers.RepeatedScalarFieldContainer[int]
105
+ dtype: ArraySpec.DataType
106
+ def __init__(self, name: _Optional[str] = ..., shape: _Optional[_Iterable[int]] = ..., dtype: _Optional[_Union[ArraySpec.DataType, str]] = ...) -> None: ...
107
+
108
+ class LogParsingConfig(_message.Message):
109
+ __slots__ = ("filters", "log_regexps")
110
+ class LogRegexps(_message.Message):
111
+ __slots__ = ("score", "reward", "episode_end", "extra", "json_extra", "reward_event")
112
+ class RewardEvent(_message.Message):
113
+ __slots__ = ("event", "reward")
114
+ EVENT_FIELD_NUMBER: _ClassVar[int]
115
+ REWARD_FIELD_NUMBER: _ClassVar[int]
116
+ event: str
117
+ reward: float
118
+ def __init__(self, event: _Optional[str] = ..., reward: _Optional[float] = ...) -> None: ...
119
+ SCORE_FIELD_NUMBER: _ClassVar[int]
120
+ REWARD_FIELD_NUMBER: _ClassVar[int]
121
+ EPISODE_END_FIELD_NUMBER: _ClassVar[int]
122
+ EXTRA_FIELD_NUMBER: _ClassVar[int]
123
+ JSON_EXTRA_FIELD_NUMBER: _ClassVar[int]
124
+ REWARD_EVENT_FIELD_NUMBER: _ClassVar[int]
125
+ score: str
126
+ reward: _containers.RepeatedScalarFieldContainer[str]
127
+ episode_end: _containers.RepeatedScalarFieldContainer[str]
128
+ extra: _containers.RepeatedScalarFieldContainer[str]
129
+ json_extra: _containers.RepeatedScalarFieldContainer[str]
130
+ reward_event: _containers.RepeatedCompositeFieldContainer[LogParsingConfig.LogRegexps.RewardEvent]
131
+ def __init__(self, score: _Optional[str] = ..., reward: _Optional[_Iterable[str]] = ..., episode_end: _Optional[_Iterable[str]] = ..., extra: _Optional[_Iterable[str]] = ..., json_extra: _Optional[_Iterable[str]] = ..., reward_event: _Optional[_Iterable[_Union[LogParsingConfig.LogRegexps.RewardEvent, _Mapping]]] = ...) -> None: ...
132
+ FILTERS_FIELD_NUMBER: _ClassVar[int]
133
+ LOG_REGEXPS_FIELD_NUMBER: _ClassVar[int]
134
+ filters: _containers.RepeatedScalarFieldContainer[str]
135
+ log_regexps: LogParsingConfig.LogRegexps
136
+ def __init__(self, filters: _Optional[_Iterable[str]] = ..., log_regexps: _Optional[_Union[LogParsingConfig.LogRegexps, _Mapping]] = ...) -> None: ...
137
+
138
+ class Task(_message.Message):
139
+ __slots__ = ("id", "name", "description", "setup_steps", "reset_steps", "expected_app_screen", "max_episode_sec", "max_episode_steps", "log_parsing_config", "extras_spec")
140
+ ID_FIELD_NUMBER: _ClassVar[int]
141
+ NAME_FIELD_NUMBER: _ClassVar[int]
142
+ DESCRIPTION_FIELD_NUMBER: _ClassVar[int]
143
+ SETUP_STEPS_FIELD_NUMBER: _ClassVar[int]
144
+ RESET_STEPS_FIELD_NUMBER: _ClassVar[int]
145
+ EXPECTED_APP_SCREEN_FIELD_NUMBER: _ClassVar[int]
146
+ MAX_EPISODE_SEC_FIELD_NUMBER: _ClassVar[int]
147
+ MAX_EPISODE_STEPS_FIELD_NUMBER: _ClassVar[int]
148
+ LOG_PARSING_CONFIG_FIELD_NUMBER: _ClassVar[int]
149
+ EXTRAS_SPEC_FIELD_NUMBER: _ClassVar[int]
150
+ id: str
151
+ name: str
152
+ description: str
153
+ setup_steps: _containers.RepeatedCompositeFieldContainer[SetupStep]
154
+ reset_steps: _containers.RepeatedCompositeFieldContainer[SetupStep]
155
+ expected_app_screen: AppScreen
156
+ max_episode_sec: float
157
+ max_episode_steps: int
158
+ log_parsing_config: LogParsingConfig
159
+ extras_spec: _containers.RepeatedCompositeFieldContainer[ArraySpec]
160
+ def __init__(self, id: _Optional[str] = ..., name: _Optional[str] = ..., description: _Optional[str] = ..., setup_steps: _Optional[_Iterable[_Union[SetupStep, _Mapping]]] = ..., reset_steps: _Optional[_Iterable[_Union[SetupStep, _Mapping]]] = ..., expected_app_screen: _Optional[_Union[AppScreen, _Mapping]] = ..., max_episode_sec: _Optional[float] = ..., max_episode_steps: _Optional[int] = ..., log_parsing_config: _Optional[_Union[LogParsingConfig, _Mapping]] = ..., extras_spec: _Optional[_Iterable[_Union[ArraySpec, _Mapping]]] = ...) -> None: ...
@@ -1,4 +1,24 @@
1
1
  # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
2
  """Client and server classes corresponding to protobuf-defined services."""
3
3
  import grpc
4
+ import warnings
4
5
 
6
+
7
+ GRPC_GENERATED_VERSION = '1.71.0'
8
+ GRPC_VERSION = grpc.__version__
9
+ _version_not_supported = False
10
+
11
+ try:
12
+ from grpc._utilities import first_version_is_lower
13
+ _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
14
+ except ImportError:
15
+ _version_not_supported = True
16
+
17
+ if _version_not_supported:
18
+ raise RuntimeError(
19
+ f'The grpc package installed is at version {GRPC_VERSION},'
20
+ + f' but the generated code in android_env/proto/task_pb2_grpc.py depends on'
21
+ + f' grpcio>={GRPC_GENERATED_VERSION}.'
22
+ + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
23
+ + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
24
+ )
@@ -1,5 +1,5 @@
1
1
  # coding=utf-8
2
- # Copyright 2022 DeepMind Technologies Limited.
2
+ # Copyright 2024 DeepMind Technologies Limited.
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.