config.py 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. _model_version = {
  2. 'ZZSB-CLS-Task': '2020080101',
  3. 'ZZSB-OD-alphaF': '2020092601',
  4. 'ZZSB-OD-B': '2020060801',
  5. 'ZZSB-OD-P': '2020020301',
  6. 'ZZSB-OD-F': '2020020301',
  7. 'ZZSB-OD-seg_B_M': '2020020301',
  8. 'ZZSB-OD-PS_C': '2020030101',
  9. 'ZZSB-OD-M_B': '2020062201',
  10. 'ZZSB-OD-deltaF': '2020062301',
  11. 'ZZSB-OD-C': '2019110501',
  12. 'BZPJ-OD-ZT_H-G_XZ_BCF': '2020112401',
  13. 'BZPJ-OD-ZT_H-G_XZ_DE': '2020112401',
  14. 'BZPJ-OD-ZT_H-LGJ_SL': '2020060801',
  15. 'BZPJ-OD-ZT_H-GJT_SL': '2020082601',
  16. 'BZPJ-CLS-ZT_H-GJT_SL': '202012031445',
  17. 'BZPJ-OD-ZT_QM-LGJ_SL': '2019123001',
  18. 'BZPJ-OD-ZT_QM-G': '2020061001',
  19. 'BZPJ-CLS-ZCG_GTG-QH': '2020080301',
  20. 'BZPJ-OD-ZCG_GTG-WZ': '2020020301',
  21. 'BZPJ-CLS-ZCG_GTG-DZ': '2020020302',
  22. 'BZPJ-OD-W_A': '2020063001',
  23. 'BZPJ-OD-W_B': '2020070101',
  24. 'BZPJ-OD-YBG-JZW_ABC': '2020110501',
  25. 'BZPJ-OD-YBG-JZW_DDS': '20201224',
  26. 'BZPJ-CLS-YBG-JLD': '20210202',
  27. 'BZPJ-CLS-YGXG-DZ_A': '20210104',
  28. 'BZPJ-CLS-YGXG-DZ_B': '2020093001',
  29. 'BZPJ-CLS-YGXG-DZ_C': '2020101601',
  30. 'BZPJ-CLS-YGXG-DZ_D': '2020101601',
  31. 'BZPJ-CLS-YGXG-DZ_E': '2020101601',
  32. 'Ruler-OD': '2020121001',
  33. 'BZPJ-OD-COAL': '20210409',
  34. 'BZPJ-OD-COAL_BIG': '2021040902',
  35. 'BZPJ-OD-HZ': '20210414',
  36. 'BZPJ-OD-HZ_DL': '20210415',
  37. 'BZPJ-OD-KLQ': '20210426small',
  38. 'BZPJ-CLS-ZZ': '20210207',
  39. 'BZPJ-CLS-ZZ': '20210207',
  40. }
  41. _task_models = {
  42. 'Ruler': [
  43. 'Ruler-OD-latest',
  44. ],
  45. 'ZZSB-CLS-Task': [
  46. 'ZZSB-CLS-Task-latest',
  47. ],
  48. 'ZZSB-a-alpha_f': [
  49. 'ZZSB-OD-alphaF-latest',
  50. ],
  51. 'ZZSB-b-p-f': [
  52. 'ZZSB-OD-B-latest',
  53. 'ZZSB-OD-P-latest',
  54. 'ZZSB-OD-F-latest',
  55. 'BZPJ-OD-W_A-latest',
  56. 'BZPJ-OD-W_B-latest',
  57. 'ZZSB-OD-seg_B_M-latest',
  58. ],
  59. 'ZZSB-f-p': [
  60. 'ZZSB-OD-B-latest',
  61. 'ZZSB-OD-P-latest',
  62. 'ZZSB-OD-F-latest',
  63. 'BZPJ-OD-W_A-latest',
  64. 'BZPJ-OD-W_B-latest',
  65. 'ZZSB-OD-seg_B_M-latest',
  66. ],
  67. 'ZZSB-p': [
  68. 'ZZSB-OD-F-latest',
  69. ],
  70. 'ZZSB-p-f': [
  71. 'ZZSB-OD-F-latest',
  72. 'BZPJ-OD-W_A-latest',
  73. 'BZPJ-OD-W_B-latest',
  74. 'ZZSB-OD-seg_B_M-latest',
  75. ],
  76. 'ZZSB-g_p-ps_c': [
  77. 'ZZSB-OD-PS_C-latest',
  78. ],
  79. 'ZZSB-m': [
  80. 'ZZSB-OD-M_B-latest',
  81. ],
  82. 'ZZSB-temps': [
  83. 'ZZSB-OD-deltaF-latest',
  84. 'ZZSB-OD-C-latest',
  85. ],
  86. 'BZPJ-ZT_H-G_XZ': [
  87. 'BZPJ-OD-ZT_H-G_XZ_BCF-latest',
  88. 'BZPJ-OD-ZT_H-G_XZ_DE-latest',
  89. ],
  90. 'BZPJ-ZT_H-LGJ_SL': [
  91. 'BZPJ-OD-ZT_H-LGJ_SL-latest'
  92. ],
  93. 'BZPJ-ZT_H-GJT_SL_OD': [
  94. 'BZPJ-OD-ZT_H-GJT_SL-latest'
  95. ],
  96. 'BZPJ-ZT_H-GJT_SL_CLS': [
  97. 'BZPJ-CLS-ZT_H-GJT_SL-latest'
  98. ],
  99. 'BZPJ-ZT_H-P_SL': [
  100. 'ZZSB-OD-F-latest',
  101. ],
  102. 'BZPJ-ZT_QM-LGJ_SL': [
  103. 'BZPJ-OD-ZT_QM-LGJ_SL-latest'
  104. ],
  105. 'BZPJ-ZT_QM-P_SL': [
  106. 'ZZSB-OD-F-latest',
  107. 'BZPJ-OD-ZT_QM-G-latest',
  108. ],
  109. 'BZPJ-ZT_QM-F_SL': [
  110. 'ZZSB-OD-F-latest',
  111. 'BZPJ-OD-ZT_QM-G-latest',
  112. ],
  113. 'BZPJ-ZCG_GTG-QH': [
  114. 'BZPJ-CLS-ZCG_GTG-QH-latest'
  115. ],
  116. 'BZPJ-ZCG_GTG-WZ_T': [
  117. 'BZPJ-OD-ZCG_GTG-WZ-latest'
  118. ],
  119. 'BZPJ-ZCG_GTG-DZ': [
  120. 'BZPJ-CLS-ZCG_GTG-DZ-latest'
  121. ],
  122. 'BZPJ-YGXG-DZ_E': [
  123. 'ZZSB-OD-F-latest'
  124. ],
  125. 'BZPJ-YBG-JZW': [
  126. 'BZPJ-OD-YBG-JZW_ABC-latest',
  127. 'BZPJ-OD-YBG-JZW_DDS-latest'
  128. ],
  129. 'BZPJ-YBG-JLD_OD': [
  130. 'ZZSB-OD-F-latest'
  131. ],
  132. 'BZPJ-YBG-JLD_CLS': [
  133. 'BZPJ-CLS-YBG-JLD-latest'
  134. ],
  135. 'BZPJ-YGXG-DZ_A_CLS': [
  136. 'BZPJ-CLS-YGXG-DZ_A-latest'
  137. ],
  138. 'BZPJ-YGXG-DZ_B_CLS': [
  139. 'BZPJ-CLS-YGXG-DZ_B-latest'
  140. ],
  141. 'BZPJ-YGXG-DZ_C_CLS': [
  142. 'BZPJ-CLS-YGXG-DZ_C-latest'
  143. ],
  144. 'BZPJ-YGXG-DZ_D_CLS': [
  145. 'BZPJ-CLS-YGXG-DZ_D-latest'
  146. ],
  147. 'BZPJ-YGXG-DZ_E_CLS': [
  148. 'BZPJ-CLS-YGXG-DZ_E-latest'
  149. ],
  150. 'BZPJ-YBG-W': [
  151. 'BZPJ-OD-W_A-latest',
  152. 'BZPJ-OD-W_B-latest',
  153. ],
  154. 'BZPJ-OD-COAL': [
  155. 'BZPJ-OD-COAL-latest',
  156. 'BZPJ-OD-COAL_BIG-latest'
  157. ],
  158. 'BZPJ-OD-HZ': [
  159. 'BZPJ-OD-HZ-latest',
  160. 'BZPJ-OD-HZ_DL-latest'
  161. ],
  162. 'BZPJ-OD-KLQ': [
  163. 'BZPJ-OD-KLQ-latest'
  164. ],
  165. 'BZPJ-CLS-ZZ': [
  166. 'BZPJ-CLS-ZZ-latest'
  167. ],
  168. }
  169. import os
  170. def get_task_models(task_name):
  171. results = []
  172. if not _task_models.has_key(task_name):
  173. return None
  174. models = _task_models[task_name]
  175. for model in models:
  176. items = model.rpartition('-')
  177. name = items[0]
  178. version = items[2]
  179. if version == 'latest':
  180. if name not in _model_version:
  181. return None
  182. version = _model_version[items[0]]
  183. results.append(name + '-' + version)
  184. return results