polyaxon 2.6.0rc1__py3-none-any.whl → 2.7.0rc0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. polyaxon/_cli/operations.py +1 -1
  2. polyaxon/_cli/projects.py +2 -2
  3. polyaxon/_compiler/contexts/contexts.py +5 -5
  4. polyaxon/_compiler/contexts/dask_job.py +1 -1
  5. polyaxon/_compiler/contexts/kubeflow/mpi_job.py +1 -1
  6. polyaxon/_compiler/contexts/kubeflow/mx_job.py +1 -1
  7. polyaxon/_compiler/contexts/kubeflow/paddle_job.py +1 -1
  8. polyaxon/_compiler/contexts/kubeflow/pytroch_job.py +1 -1
  9. polyaxon/_compiler/contexts/kubeflow/tf_job.py +1 -1
  10. polyaxon/_compiler/contexts/kubeflow/xgb_job.py +1 -1
  11. polyaxon/_compiler/contexts/ray_job.py +1 -1
  12. polyaxon/_compiler/resolver/agent.py +1 -1
  13. polyaxon/_compiler/resolver/runtime.py +1 -1
  14. polyaxon/_deploy/schemas/deployment.py +1 -0
  15. polyaxon/_deploy/schemas/ui.py +3 -1
  16. polyaxon/_docker/converter/base/base.py +1 -1
  17. polyaxon/_docker/converter/base/env_vars.py +1 -1
  18. polyaxon/_docker/converter/converters/job.py +1 -1
  19. polyaxon/_docker/converter/converters/service.py +1 -1
  20. polyaxon/_flow/component/component.py +4 -0
  21. polyaxon/_flow/environment/__init__.py +5 -4
  22. polyaxon/_flow/io/io.py +2 -0
  23. polyaxon/_flow/matrix/params.py +1 -1
  24. polyaxon/_flow/operations/compiled_operation.py +4 -0
  25. polyaxon/_flow/operations/operation.py +5 -3
  26. polyaxon/_flow/params/params.py +2 -2
  27. polyaxon/_flow/run/__init__.py +3 -0
  28. polyaxon/_flow/run/dag.py +6 -6
  29. polyaxon/_flow/run/dask/dask.py +10 -0
  30. polyaxon/_flow/run/kubeflow/mpi_job.py +8 -0
  31. polyaxon/_flow/run/kubeflow/mx_job.py +16 -0
  32. polyaxon/_flow/run/kubeflow/paddle_job.py +8 -0
  33. polyaxon/_flow/run/kubeflow/pytorch_job.py +8 -0
  34. polyaxon/_flow/run/kubeflow/tf_job.py +12 -0
  35. polyaxon/_flow/run/kubeflow/xgboost_job.py +19 -33
  36. polyaxon/_flow/run/patch.py +37 -9
  37. polyaxon/_flow/run/ray/ray.py +9 -0
  38. polyaxon/_flow/run/resources.py +1 -1
  39. polyaxon/_fs/fs.py +1 -1
  40. polyaxon/_k8s/converter/base/containers.py +1 -1
  41. polyaxon/_k8s/converter/converters/dask_job.py +1 -1
  42. polyaxon/_k8s/converter/converters/job.py +1 -1
  43. polyaxon/_k8s/converter/converters/kubeflow/mpi_job.py +1 -1
  44. polyaxon/_k8s/converter/converters/kubeflow/mx_job.py +1 -1
  45. polyaxon/_k8s/converter/converters/kubeflow/paddle_job.py +1 -1
  46. polyaxon/_k8s/converter/converters/kubeflow/pytroch_job.py +1 -1
  47. polyaxon/_k8s/converter/converters/kubeflow/tf_job.py +1 -1
  48. polyaxon/_k8s/converter/converters/kubeflow/xgboost_job.py +1 -1
  49. polyaxon/_k8s/converter/converters/ray_job.py +1 -2
  50. polyaxon/_k8s/converter/converters/service.py +1 -1
  51. polyaxon/_k8s/k8s_validation.py +16 -16
  52. polyaxon/_k8s/logging/async_monitor.py +4 -4
  53. polyaxon/_k8s/manager/async_manager.py +5 -3
  54. polyaxon/_k8s/manager/manager.py +6 -6
  55. polyaxon/_local_process/converter/base/env_vars.py +1 -1
  56. polyaxon/_local_process/converter/base/init.py +1 -1
  57. polyaxon/_local_process/converter/base/mounts.py +0 -2
  58. polyaxon/_local_process/converter/converters/job.py +1 -1
  59. polyaxon/_local_process/converter/converters/service.py +1 -1
  60. polyaxon/_managers/project.py +3 -2
  61. polyaxon/_polyaxonfile/check.py +4 -4
  62. polyaxon/_polyaxonfile/specs/compiled_operation.py +8 -6
  63. polyaxon/_polyaxonfile/specs/libs/parser.py +1 -3
  64. polyaxon/_polyaxonfile/specs/libs/validator.py +1 -1
  65. polyaxon/_polyaxonfile/specs/operation.py +7 -3
  66. polyaxon/_pql/manager.py +1 -1
  67. polyaxon/_pql/parser.py +29 -26
  68. polyaxon/_runner/agent/base_agent.py +1 -2
  69. polyaxon/_runner/converter/init/artifacts.py +3 -2
  70. polyaxon/_runner/converter/init/tensorboard.py +1 -1
  71. polyaxon/_schemas/client.py +1 -1
  72. polyaxon/_sdk/api/agents_v1_api.py +56 -80
  73. polyaxon/_sdk/api/artifacts_stores_v1_api.py +2 -2
  74. polyaxon/_sdk/api/auth_v1_api.py +2 -6
  75. polyaxon/_sdk/api/connections_v1_api.py +16 -20
  76. polyaxon/_sdk/api/dashboards_v1_api.py +14 -14
  77. polyaxon/_sdk/api/organizations_v1_api.py +1735 -755
  78. polyaxon/_sdk/api/presets_v1_api.py +18 -26
  79. polyaxon/_sdk/api/project_dashboards_v1_api.py +17 -19
  80. polyaxon/_sdk/api/project_searches_v1_api.py +20 -28
  81. polyaxon/_sdk/api/projects_v1_api.py +74 -92
  82. polyaxon/_sdk/api/queues_v1_api.py +22 -30
  83. polyaxon/_sdk/api/runs_v1_api.py +157 -207
  84. polyaxon/_sdk/api/searches_v1_api.py +16 -20
  85. polyaxon/_sdk/api/service_accounts_v1_api.py +30 -38
  86. polyaxon/_sdk/api/tags_v1_api.py +19 -25
  87. polyaxon/_sdk/api/teams_v1_api.py +64 -90
  88. polyaxon/_sdk/api/users_v1_api.py +17 -19
  89. polyaxon/_sdk/api/versions_v1_api.py +4 -4
  90. polyaxon/_sdk/async_client/rest.py +1 -3
  91. polyaxon/_sdk/schemas/v1_organization.py +3 -2
  92. polyaxon/_sdk/schemas/v1_project_settings.py +2 -1
  93. polyaxon/_sdk/schemas/v1_section_spec.py +1 -1
  94. polyaxon/_sdk/schemas/v1_user_access.py +3 -2
  95. polyaxon/_sdk/sync_client/api_client.py +2 -6
  96. polyaxon/_sdk/sync_client/rest.py +4 -8
  97. polyaxon/pkg.py +1 -1
  98. {polyaxon-2.6.0rc1.dist-info → polyaxon-2.7.0rc0.dist-info}/METADATA +9 -9
  99. {polyaxon-2.6.0rc1.dist-info → polyaxon-2.7.0rc0.dist-info}/RECORD +103 -103
  100. {polyaxon-2.6.0rc1.dist-info → polyaxon-2.7.0rc0.dist-info}/LICENSE +0 -0
  101. {polyaxon-2.6.0rc1.dist-info → polyaxon-2.7.0rc0.dist-info}/WHEEL +0 -0
  102. {polyaxon-2.6.0rc1.dist-info → polyaxon-2.7.0rc0.dist-info}/entry_points.txt +0 -0
  103. {polyaxon-2.6.0rc1.dist-info → polyaxon-2.7.0rc0.dist-info}/top_level.txt +0 -0
polyaxon/_pql/parser.py CHANGED
@@ -85,8 +85,9 @@ def parse_datetime_operation(operation: str) -> "QueryOpSpec":
85
85
  # Check not allowed ops
86
86
  if "|" in _operation:
87
87
  raise PQLException(
88
- "`|` is not allowed for datetime conditions. "
89
- "Operation: {}".format(operation)
88
+ "`|` is not allowed for datetime conditions. Operation: {}".format(
89
+ operation
90
+ )
90
91
  )
91
92
 
92
93
  # Check nil operation
@@ -140,13 +141,11 @@ def parse_scalar_operation(operation: str, loader: Callable = None) -> "QueryOpS
140
141
  # Check not allowed ops
141
142
  if "|" in _operation:
142
143
  raise PQLException(
143
- "`|` is not allowed for scalar conditions. "
144
- "Operation: {}".format(operation)
144
+ "`|` is not allowed for scalar conditions. Operation: {}".format(operation)
145
145
  )
146
146
  if ".." in _operation:
147
147
  raise PQLException(
148
- "`..` is not allowed for scalar conditions. "
149
- "Operation: {}".format(operation)
148
+ "`..` is not allowed for scalar conditions. Operation: {}".format(operation)
150
149
  )
151
150
 
152
151
  # Check nil operation
@@ -173,8 +172,9 @@ def parse_scalar_operation(operation: str, loader: Callable = None) -> "QueryOpS
173
172
  float(_operation)
174
173
  except (ValueError, TypeError):
175
174
  raise PQLException(
176
- "Scalar operation requires int or float params, "
177
- "received {}.".format(operation)
175
+ "Scalar operation requires int or float params, received {}.".format(
176
+ operation
177
+ )
178
178
  )
179
179
  return QueryOpSpec(op, negation, _operation)
180
180
 
@@ -205,8 +205,7 @@ def parse_value_operation(operation: str) -> "QueryOpSpec":
205
205
  # Check range not allowed
206
206
  if ".." in _operation:
207
207
  raise PQLException(
208
- "`..` is not allowed for value conditions. "
209
- "Operation: {}".format(operation)
208
+ "`..` is not allowed for value conditions. Operation: {}".format(operation)
210
209
  )
211
210
 
212
211
  # Check nil operation
@@ -230,8 +229,9 @@ def parse_value_operation(operation: str) -> "QueryOpSpec":
230
229
  ]
231
230
  if len(params) <= 1:
232
231
  raise PQLException(
233
- "`{}` is not allowed for value conditions, "
234
- "Operation: {}".format(op, operation)
232
+ "`{}` is not allowed for value conditions, Operation: {}".format(
233
+ op, operation
234
+ )
235
235
  )
236
236
  return QueryOpSpec(op, negation, params)
237
237
 
@@ -270,8 +270,7 @@ def parse_search_operation(operation: str) -> "QueryOpSpec":
270
270
  # Check range not allowed
271
271
  if ".." in _operation:
272
272
  raise PQLException(
273
- "`..` is not allowed for search conditions. "
274
- "Operation: {}".format(operation)
273
+ "`..` is not allowed for search conditions. Operation: {}".format(operation)
275
274
  )
276
275
 
277
276
  # Check nil operation
@@ -286,8 +285,9 @@ def parse_search_operation(operation: str) -> "QueryOpSpec":
286
285
  op, _operation = parse_comparison_operation(_operation)
287
286
  if op:
288
287
  raise PQLException(
289
- "`{}` is not allowed for search conditions, "
290
- "Operation: {}".format(op, operation)
288
+ "`{}` is not allowed for search conditions, Operation: {}".format(
289
+ op, operation
290
+ )
291
291
  )
292
292
 
293
293
  # Early return
@@ -303,8 +303,9 @@ def parse_search_operation(operation: str) -> "QueryOpSpec":
303
303
  ]
304
304
  if len(params) <= 1:
305
305
  raise PQLException(
306
- "`{}` is not allowed for search conditions, "
307
- "Operation: {}".format(op, operation)
306
+ "`{}` is not allowed for search conditions, Operation: {}".format(
307
+ op, operation
308
+ )
308
309
  )
309
310
  return QueryOpSpec(op, negation, params)
310
311
 
@@ -317,8 +318,9 @@ def parse_search_operation(operation: str) -> "QueryOpSpec":
317
318
  params = [param.strip() for param in params if param.strip()]
318
319
  if len(params) != 1:
319
320
  raise PQLException(
320
- "`{}` is not allowed for search conditions, "
321
- "Operation: {}".format(op, operation)
321
+ "`{}` is not allowed for search conditions, Operation: {}".format(
322
+ op, operation
323
+ )
322
324
  )
323
325
  return QueryOpSpec(op, negation, parse_operation_value(params[0]))
324
326
 
@@ -328,8 +330,9 @@ def parse_search_operation(operation: str) -> "QueryOpSpec":
328
330
  params = [param.strip() for param in params if param.strip()]
329
331
  if len(params) != 1:
330
332
  raise PQLException(
331
- "`{}` is not allowed for search conditions, "
332
- "Operation: {}".format(op, operation)
333
+ "`{}` is not allowed for search conditions, Operation: {}".format(
334
+ op, operation
335
+ )
333
336
  )
334
337
  return QueryOpSpec(op, negation, parse_operation_value(params[0]))
335
338
 
@@ -339,16 +342,16 @@ def parse_search_operation(operation: str) -> "QueryOpSpec":
339
342
  params = [param.strip() for param in params if param.strip()]
340
343
  if len(params) != 1:
341
344
  raise PQLException(
342
- "`{}` is not allowed for search conditions, "
343
- "Operation: {}".format(op, operation)
345
+ "`{}` is not allowed for search conditions, Operation: {}".format(
346
+ op, operation
347
+ )
344
348
  )
345
349
  return QueryOpSpec(op, negation, parse_operation_value(params[0]))
346
350
 
347
351
  if not _operation:
348
352
  raise PQLException(
349
353
  "Expression is not valid, it must be formatted as "
350
- "name:operation, "
351
- "Operation: {}".format(operation)
354
+ "name:operation, Operation: {}".format(operation)
352
355
  )
353
356
  # Now the operation must be an equality param param
354
357
  return QueryOpSpec("=", negation, _operation)
@@ -70,8 +70,7 @@ class BaseAgent:
70
70
  )
71
71
  except Exception as e:
72
72
  logger.warning(
73
- "Agent failed to collect agent data: {}\n"
74
- "Retrying ...".format(repr(e))
73
+ "Agent failed to collect agent data: {}\nRetrying ...".format(repr(e))
75
74
  )
76
75
 
77
76
  def sync_compatible_updates(self, compatible_updates: Dict):
@@ -8,8 +8,9 @@ def get_artifacts_store_args(artifacts_path: str, clean: bool) -> str:
8
8
  dir=artifacts_path
9
9
  )
10
10
  delete_dir = (
11
- 'if [ -d {path} ] && [ "$(ls -A {path})" ]; '
12
- "then rm -R {path}/*; fi;".format(path=artifacts_path)
11
+ 'if [ -d {path} ] && [ "$(ls -A {path})" ]; then rm -R {path}/*; fi;'.format(
12
+ path=artifacts_path
13
+ )
13
14
  )
14
15
  if clean:
15
16
  return "{} {}".format(get_or_create, delete_dir)
@@ -21,7 +21,7 @@ def get_tensorboard_args(
21
21
  if tb_args.use_names:
22
22
  args.append("--use-names")
23
23
  if tb_args.path_prefix:
24
- args.append("--path-prefix={}".format(tb_args.path_prefix)),
24
+ args.append("--path-prefix={}".format(tb_args.path_prefix))
25
25
  if tb_args.plugins:
26
26
  plugins = validate_tags(tb_args.plugins, validate_yaml=True)
27
27
  args.append("--plugins={}".format(",".join(plugins)))
@@ -113,7 +113,7 @@ class ClientConfig(BaseSchemaModel):
113
113
  token: Optional[str] = None,
114
114
  use_cloud_host: bool = False,
115
115
  retries: Optional[int] = None,
116
- **data
116
+ **data,
117
117
  ):
118
118
  host = (
119
119
  clean_host(host or LOCALHOST) if not use_cloud_host else POLYAXON_CLOUD_HOST