Source code for lib.sedna.common.constant

# Copyright 2021 The KubeEdge 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.

from enum import Enum


[docs]class K8sResourceKind(Enum): """ Sedna job/service kind """
[docs] DEFAULT = "default"
[docs] REID_JOB = "reidjob"
[docs] VIDEO_ANALYTICS_JOB = "videoanalyticsjob"
[docs] FEATURE_EXTRACTION_SERVICE = "featureextractionservice"
[docs] JOINT_INFERENCE_SERVICE = "jointinferenceservice"
[docs] FEDERATED_LEARNING_JOB = "federatedlearningjob"
[docs] INCREMENTAL_JOB = "incrementallearningjob"
[docs] LIFELONG_JOB = "lifelonglearningjob"
[docs]class K8sResourceKindStatus(Enum): """ Job/Service status """
[docs] COMPLETED = "completed"
[docs] FAILED = "failed"
[docs] RUNNING = "running"
[docs]class KBResourceConstant(Enum): """ Knowledge used constant """
[docs] MIN_TRAIN_SAMPLE = 10
[docs] KB_INDEX_NAME = "index.pkl"
[docs] TASK_EXTRACTOR_NAME = "task_attr_extractor.pkl"
[docs] SEEN_TASK = "seen_task"
[docs] UNSEEN_TASK = "unseen_task"
[docs] TASK_GROUPS = "task_groups"
[docs] EXTRACTOR = "extractor"
[docs] EDGE_KB_DIR = "/var/lib/sedna/kb"