E571 feat: enable QueuedResources in us-east5 (#11511) · googleapis/google-cloud-python@4ccdde0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4ccdde0

Browse files
feat: enable QueuedResources in us-east5 (#11511)
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent b12af8e commit 4ccdde0

File tree

16 files changed

+84
-57
lines changed

16 files changed

+84
-57
lines changed

packages/google-cloud-tpu/.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2020 Google LLC
3+
# Copyright 2023 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

packages/google-cloud-tpu/CONTRIBUTING.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ We support:
236236

237237
Supported versions can be found in our ``noxfile.py`` `config`_.
238238

239-
.. _config: https://github.com/googleapis/google-cloud-python/blob/main/noxfile.py
239+
.. _config: https://github.com/googleapis/google-cloud-python/blob/main/packages/google-cloud-tpu/noxfile.py
240240

241241

242242
**********

packages/google-cloud-tpu/MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2020 Google LLC
3+
# Copyright 2023 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

packages/google-cloud-tpu/README.rst

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,24 @@ In order to use this library, you first need to go through the following steps:
3636
Installation
3737
~~~~~~~~~~~~
3838

39-
Install this library in a `virtualenv`_ using pip. `virtualenv`_ is a tool to
40-
create isolated Python environments. The basic problem it addresses is one of
41-
dependencies and versions, and indirectly permissions.
39+
Install this library in a virtual environment using `venv`_. `venv`_ is a tool that
40+
creates isolated Python environments. These isolated environments can have separate
41+
versions of Python packages, which allows you to isolate one project's dependencies
42+
from the dependencies of other projects.
4243

43-
With `virtualenv`_, it's possible to install this library without needing system
44+
With `venv`_, it's possible to install this library without needing system
4445
install permissions, and without clashing with the installed system
4546
dependencies.
4647

47-
.. _`virtualenv`: https://virtualenv.pypa.io/en/latest/
48+
.. _`venv`: https://docs.python.org/3/library/venv.html
4849

4950

5051
Code samples and snippets
5152
~~~~~~~~~~~~~~~~~~~~~~~~~
5253

53-
Code samples and snippets live in the `samples/` folder.
54+
Code samples and snippets live in the `samples/`_ folder.
55+
56+
.. _samples/: https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-tpu/samples
5457

5558

5659
Supported Python Versions
@@ -77,21 +80,19 @@ Mac/Linux
7780

7881
.. code-block:: console
7982
80-
pip install virtualenv
81-
virtualenv <your-env>
83+
python3 -m venv <your-env>
8284
source <your-env>/bin/activate
83-
<your-env>/bin/pip install google-cloud-tpu
85+
pip install google-cloud-tpu
8486
8587
8688
Windows
8789
^^^^^^^
8890

8991
.. code-block:: console
9092
91-
pip install virtualenv
92-
virtualenv <your-env>
93-
<your-env>\Scripts\activate
94-
<your-env>\Scripts\pip.exe install google-cloud-tpu
93+
py -m venv <your-env>
94+
.\<your-env>\Scripts\activate
95+
pip install google-cloud-tpu
9596
9697
Next Steps
9798
~~~~~~~~~~

packages/google-cloud-tpu/docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright 2021 Google LLC
2+
# Copyright 2023 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

packages/google-cloud-tpu/google/cloud/tpu_v2/services/tpu/async_client.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,6 @@ async def sample_create_node():
458458
459459
# Initialize request argument(s)
460460
node = tpu_v2.Node()
461-
node.accelerator_type = "accelerator_type_value"
462461
node.runtime_version = "runtime_version_value"
463462
464463
request = tpu_v2.CreateNodeRequest(
@@ -903,7 +902,6 @@ async def sample_update_node():
903902
904903
# Initialize request argument(s)
905904
node = tpu_v2.Node()
906-
node.accelerator_type = "accelerator_type_value"
907905
node.runtime_version = "runtime_version_value"
908906
909907
request = tpu_v2.UpdateNodeRequest(

packages/google-cloud-tpu/google/cloud/tpu_v2/services/tpu/client.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,6 @@ def sample_create_node():
735735
736736
# Initialize request argument(s)
737737
node = tpu_v2.Node()
738-
node.accelerator_type = "accelerator_type_value"
739738
node.runtime_version = "runtime_version_value"
740739
741740
request = tpu_v2.CreateNodeRequest(
@@ -1182,7 +1181,6 @@ def sample_update_node():
11821181
11831182
# Initialize request argument(s)
11841183
node = tpu_v2.Node()
1185-
node.accelerator_type = "accelerator_type_value"
11861184
node.runtime_version = "runtime_version_value"
11871185
11881186
request = tpu_v2.UpdateNodeRequest(

packages/google-cloud-tpu/google/cloud/tpu_v2/types/cloud_tpu.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ class Node(proto.Message):
314314
The user-supplied description of the TPU.
315315
Maximum of 512 characters.
316316
accelerator_type (str):
317-
Required. The type of hardware accelerators
317+
Optional. The type of hardware accelerators
318318
associated with this node.
319319
state (google.cloud.tpu_v2.types.Node.State):
320320
Output only. The current state for the TPU
@@ -382,6 +382,12 @@ class Node(proto.Message):
382382
Shielded Instance options.
383383
accelerator_config (google.cloud.tpu_v2.types.AcceleratorConfig):
384384
The AccleratorConfig for the TPU Node.
385+
queued_resource (str):
386+
Output only. The qualified name of the
387+
QueuedResource that requested this Node.
388+
multislice_node (bool):
389+
Output only. Whether the Node belongs to a
390+
Multislice group.
385391
"""
386392

387393
class State(proto.Enum):
@@ -588,6 +594,14 @@ class ApiVersion(proto.Enum):
588594
number=46,
589595
message="AcceleratorConfig",
590596
)
597+
queued_resource: str = proto.Field(
598+
proto.STRING,
599+
number=47,
600+
)
601+
multislice_node: bool = proto.Field(
602+
proto.BOOL,
603+
number=48,
604+
)
591605

592606

593607
class ListNodesRequest(proto.Message):
@@ -810,7 +824,7 @@ class AcceleratorType(proto.Message):
810824
name (str):
811825
The resource name.
812826
type_ (str):
813-
the accelerator type.
827+
The accelerator type.
814828
accelerator_configs (MutableSequence[google.cloud.tpu_v2.types.AcceleratorConfig]):
815829
The accelerator config.
816830
"""

packages/google-cloud-tpu/noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2018 Google LLC
3+
# Copyright 2023 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

packages/google-cloud-tpu/samples/generated_samples/snippet_metadata_google.cloud.tpu.v2.json

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,12 @@
6868
"regionTag": "tpu_v2_generated_Tpu_CreateNode_async",
6969
"segments": [
7070
{
71-
"end": 60,
71+
"end": 59,
7272
"start": 27,
7373
"type": "FULL"
7474
},
7575
{
76-
"end": 60,
76+
"end": 59,
7777
"start": 27,
7878
"type": "SHORT"
7979
},
@@ -83,18 +83,18 @@
8383
"type": "CLIENT_INITIALIZATION"
8484
},
8585
{
86-
"end": 50,
86+
"end": 49,
8787
"start": 41,
8888
"type": "REQUEST_INITIALIZATION"
8989
},
9090
{
91-
"end": 57,
92-
"start": 51,
91+
"end": 56,
92+
"start": 50,
9393
"type": "REQUEST_EXECUTION"
9494
},
9595
{
96-
"end": 61,
97-
"start": 58,
96+
"end": 60,
97+
"start": 57,
9898
"type": "RESPONSE_HANDLING"
9999
}
100100
],
@@ -156,12 +156,12 @@
156156
"regionTag": "tpu_v2_generated_Tpu_CreateNode_sync",
157157
"segments": [
158158
{
159-
"end": 60,
159+
"end": 59,
160160
"start": 27,
161161
"type": "FULL"
162162
},
163163
{
164-
"end": 60,
164+
"end": 59,
165165
"start": 27,
166166
"type": "SHORT"
167167
},
@@ -171,18 +171,18 @@
171171
"type": "CLIENT_INITIALIZATION"
172172
},
173173
{
174-
"end": 50,
174+
"end": 49,
175175
"start": 41,
176176
"type": "REQUEST_INITIALIZATION"
177177
},
178178
{
179-
"end": 57,
180-
"start": 51,
179+
"end": 56,
180+
"start": 50,
181181
"type": "REQUEST_EXECUTION"
182182
},
183183
{
184-
"end": 61,
185-
"start": 58,
184+
"end": 60,
185+
"start": 57,
186186
"type": "RESPONSE_HANDLING"
187187
}
188188
],
@@ -1980,12 +1980,12 @@
19801980
"regionTag": "tpu_v2_generated_Tpu_UpdateNode_async",
19811981
"segments": [
19821982
{
1983-
"end": 59,
1983+
"end": 58,
19841984
"start": 27,
19851985
"type": "FULL"
19861986
},
19871987
{
1988-
"end": 59,
1988+
"end": 58,
19891989
"start": 27,
19901990
"type": "SHORT"
19911991
},
@@ -1995,18 +1995,18 @@
19951995
"type": "CLIENT_INITIALIZATION"
19961996
},
19971997
{
1998-
"end": 49,
1998+
"end": 48,
19991999
"start": 41,
20002000
"type": "REQUEST_INITIALIZATION"
20012001
},
20022002
{
2003-
"end": 56,
2004-
"start": 50,
2003+
"end": 55,
2004+
"start": 49,
20052005
"type": "REQUEST_EXECUTION"
20062006
},
20072007
{
2008-
"end": 60,
2009-
"start": 57,
2008+
"end": 59,
2009+
"start": 56,
20102010
"type": "RESPONSE_HANDLING"
20112011
}
20122012
],
@@ -2064,12 +2064,12 @@
20642064
"regionTag": "tpu_v2_generated_Tpu_UpdateNode_sync",
20652065
"segments": [
20662066
{
2067-
"end": 59,
2067+
"end": 58,
20682068
"start": 27,
20692069
"type": "FULL"
20702070
},
20712071
{
2072-
"end": 59,
2072+
"end": 58,
20732073
"start": 27,
20742074
"type": "SHORT"
20752075
},
@@ -2079,18 +2079,18 @@
20792079
"type": "CLIENT_INITIALIZATION"
20802080
},
20812081
{
2082-
"end": 49,
2082+
"end": 48,
20832083
"start": 41,
20842084
"type": "REQUEST_INITIALIZATION"
20852085
},
20862086
{
2087-
"end": 56,
2088-
"start": 50,
2087+
"end": 55,
2088+
"start": 49,
20892089
"type": "REQUEST_EXECUTION"
20902090
},
20912091
{
2092-
"end": 60,
2093-
"start": 57,
2092+
"end": 59,
2093+
"start": 56,
20942094
"type": "RESPONSE_HANDLING"
20952095
}
20962096
],

0 commit comments

Comments
 (0)
0