You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

constant.py 1.9 kB

5 years ago
5 years ago
5 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. # Copyright 2019 Huawei Technologies Co., Ltd
  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. """Constant module."""
  16. from enum import Enum
  17. class MindInsightModules(Enum):
  18. """
  19. Enum definition for MindInsight error types.
  20. Note:
  21. Each enum value, excluding GENERAL, has an Errors class name starting with the enum value
  22. in Camel-Case referring to specific module.
  23. """
  24. GENERAL = 0
  25. LINEAGEMGR = 2
  26. DATAVISUAL = 5
  27. class GeneralErrors(Enum):
  28. """Enum definition for general errors."""
  29. UNKNOWN_ERROR = 0
  30. PARAM_TYPE_ERROR = 1
  31. PARAM_VALUE_ERROR = 2
  32. PARAM_MISSING_ERROR = 3
  33. PATH_NOT_EXISTS_ERROR = 4
  34. FILE_SYSTEM_PERMISSION_ERROR = 8
  35. PORT_NOT_AVAILABLE_ERROR = 9
  36. URL_DECODE_ERROR = 10
  37. class LineageMgrErrors(Enum):
  38. """Enum definition for lineage errors."""
  39. class DataVisualErrors(Enum):
  40. """Enum definition for datavisual errors."""
  41. RESTFUL_API_NOT_EXIST = 1
  42. REQUEST_METHOD_NOT_ALLOWED = 2
  43. MAX_COUNT_EXCEEDED_ERROR = 3
  44. CRC_FAILED = 4
  45. TRAIN_JOB_NOT_EXIST = 5
  46. SUMMARY_LOG_PATH_INVALID = 6
  47. SUMMARY_LOG_IS_LOADING = 7
  48. NODE_NOT_IN_GRAPH_ERROR = 9
  49. PATH_NOT_DIRECTORY_ERROR = 10
  50. PLUGIN_NOT_AVAILABLE = 11
  51. GRAPH_NOT_EXIST = 12
  52. IMAGE_NOT_EXIST = 13
  53. SCALAR_NOT_EXIST = 14
  54. HISTOGRAM_NOT_EXIST = 15
  55. TRAIN_JOB_DETAIL_NOT_IN_CACHE = 16

MindInsight为MindSpore提供了简单易用的调优调试能力。在训练过程中,可以将标量、张量、图像、计算图、模型超参、训练耗时等数据记录到文件中,通过MindInsight可视化页面进行查看及分析。