pipelines/sdk/python/kfp/dsl/constants.py

30 lines
1.1 KiB
Python

# Copyright 2021 The Kubeflow Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Constants."""
# Unit constants for k8s size string.
_E = 10**18 # Exa
_EI = 1 << 60 # Exa: power-of-two approximate
_P = 10**15 # Peta
_PI = 1 << 50 # Peta: power-of-two approximate
# noinspection PyShadowingBuiltins
_T = 10**12 # Tera
_TI = 1 << 40 # Tera: power-of-two approximate
_G = 10**9 # Giga
_GI = 1 << 30 # Giga: power-of-two approximate
_M = 10**6 # Mega
_MI = 1 << 20 # Mega: power-of-two approximate
_K = 10**3 # Kilo
_KI = 1 << 10 # Kilo: power-of-two approximate