flowcept 0.8.4__py3-none-any.whl → 0.8.5__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.
@@ -12,6 +12,7 @@ from flowcept.configs import (
12
12
  SYS_NAME,
13
13
  EXTRA_METADATA,
14
14
  ENVIRONMENT_ID,
15
+ SETTINGS_PATH,
15
16
  )
16
17
 
17
18
 
@@ -23,6 +24,7 @@ class WorkflowObject:
23
24
  workflow_id: AnyStr = None
24
25
  parent_workflow_id: AnyStr = None
25
26
  machine_info: Dict = None
27
+ conf: Dict = None
26
28
  flowcept_settings: Dict = None
27
29
  flowcept_version: AnyStr = None
28
30
  utc_timestamp: float = None
@@ -70,7 +72,7 @@ class WorkflowObject:
70
72
  """Enrich it."""
71
73
  self.utc_timestamp = get_utc_now()
72
74
  self.flowcept_settings = OmegaConf.to_container(settings) if isinstance(settings, DictConfig) else settings
73
-
75
+ self.conf = {"settings_path": SETTINGS_PATH}
74
76
  if adapter_key is not None:
75
77
  # TODO :base-interceptor-refactor: :code-reorg: :usability:
76
78
  # revisit all times we assume settings is not none
@@ -262,6 +262,7 @@ class Flowcept(object):
262
262
  if not MQDao.build().liveness_test():
263
263
  logger.error("MQ Not Ready!")
264
264
  return False
265
+
265
266
  if MONGO_ENABLED:
266
267
  from flowcept.commons.daos.docdb_dao.mongodb_dao import MongoDBDAO
267
268
 
@@ -80,6 +80,8 @@ class DaskWorkerInterceptor(BaseInterceptor):
80
80
  self._generated_workflow_id = True
81
81
  super().start(bundle_exec_id=self._worker.scheduler.address)
82
82
 
83
+ self._worker._interceptor = self
84
+
83
85
  instrumentation = INSTRUMENTATION.get("enabled", False)
84
86
  if instrumentation:
85
87
  InstrumentationInterceptor.get_instance().start(
@@ -45,13 +45,11 @@ def curate_task_msg(task_msg_dict: dict, convert_times=True):
45
45
  task_msg_dict["workflow_id"] = task_msg_dict["used"].pop("workflow_id")
46
46
 
47
47
  if convert_times:
48
- has_time_fields = False
49
48
  for time_field in TaskObject.get_time_field_names():
50
49
  if time_field in task_msg_dict:
51
- has_time_fields = True
52
50
  task_msg_dict[time_field] = datetime.fromtimestamp(task_msg_dict[time_field], pytz.utc)
53
51
 
54
- if not has_time_fields:
52
+ if "registered_at" not in task_msg_dict:
55
53
  task_msg_dict["registered_at"] = datetime.fromtimestamp(time(), pytz.utc)
56
54
 
57
55
 
@@ -119,8 +119,8 @@ class GPUCapture:
119
119
  if "name" in gpu_conf:
120
120
  flowcept_gpu_info["name"] = nvmlDeviceGetName(device)
121
121
 
122
- if "ix" in gpu_conf:
123
- flowcept_gpu_info["gpu_ix"] = gpu_ix
122
+ if "id" in gpu_conf:
123
+ flowcept_gpu_info["id"] = nvmlDeviceGetUUID(device)
124
124
 
125
125
  return flowcept_gpu_info
126
126
 
@@ -160,7 +160,6 @@ class GPUCapture:
160
160
  }
161
161
  if "others" in gpu_conf:
162
162
  flowcept_gpu_info["others"] = {
163
- "uuid": amdsmi_get_gpu_device_uuid(device),
164
163
  "current_gfxclk": all_metrics["current_gfxclk"],
165
164
  "current_socclk": all_metrics["current_socclk"],
166
165
  "current_uclk": all_metrics["current_uclk"],
@@ -168,6 +167,9 @@ class GPUCapture:
168
167
  "current_dclk0": all_metrics["current_dclk0"],
169
168
  }
170
169
 
170
+ if "id" in gpu_conf:
171
+ flowcept_gpu_info["id"] = (amdsmi_get_gpu_device_uuid(device),)
172
+
171
173
  return flowcept_gpu_info
172
174
 
173
175
 
@@ -193,6 +195,7 @@ elif GPUCapture.GPU_VENDOR == "nvidia":
193
195
  nvmlDeviceGetTemperature,
194
196
  nvmlDeviceGetPowerUsage,
195
197
  NVML_TEMPERATURE_GPU,
198
+ nvmlDeviceGetUUID,
196
199
  )
197
200
 
198
201
  FlowceptLogger().debug("Imported Nvidia modules!")
@@ -156,13 +156,13 @@ class FlowceptLoop:
156
156
  "used": {"i": self._next_counter, self._item_name: self._current_item},
157
157
  "parent_task_id": self._parent_task_id,
158
158
  }
159
- tel = FlowceptLoop._interceptor.telemetry_capture.capture()
160
- if tel:
161
- iteration_task["telemetry_at_start"] = tel.to_dict()
162
159
  return iteration_task
163
160
 
164
- def _end_iteration_task(self, iteration_task):
165
- iteration_task["status"] = Status.FINISHED.value
161
+ def _end_iteration_task(self, _):
162
+ self._last_iteration_task["status"] = Status.FINISHED.value
163
+ tel = FlowceptLoop._interceptor.telemetry_capture.capture()
164
+ if tel:
165
+ self._last_iteration_task["telemetry_at_end"] = tel.to_dict()
166
166
  FlowceptLoop._interceptor.intercept(self._last_iteration_task)
167
167
 
168
168
  def _do_nothing_in_end_iter(self, *args, **kwargs):
flowcept/version.py CHANGED
@@ -4,4 +4,4 @@
4
4
  # The expected format is: <Major>.<Minor>.<Patch>
5
5
  # This file is supposed to be automatically modified by the CI Bot.
6
6
  # See .github/workflows/version_bumper.py
7
- __version__ = "0.8.4"
7
+ __version__ = "0.8.5"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flowcept
3
- Version: 0.8.4
3
+ Version: 0.8.5
4
4
  Summary: Capture and query workflow provenance data using data observability
5
5
  Project-URL: GitHub, https://github.com/ORNL/flowcept
6
6
  Author: Oak Ridge National Laboratory
@@ -1,6 +1,6 @@
1
1
  flowcept/__init__.py,sha256=CukmdzTUvm6Y_plTKPq4kKn7w9LdR36j7V_C_UQyjhU,2011
2
2
  flowcept/configs.py,sha256=_-jhoI_HGKjzymjYTlDuysbM38Gr2aunc0Q-Stlmcwk,7511
3
- flowcept/version.py,sha256=sgsQa7sBlHkp-P60Bs4HRcOzfCc2iDmfQsjJbMii7Xg,306
3
+ flowcept/version.py,sha256=RW_aTLB2vWTDjrpIPcWytUXxQhZLynom14B2UHfVVcU,306
4
4
  flowcept/analytics/__init__.py,sha256=46q-7vsHq_ddPNrzNnDgEOiRgvlx-5Ggu2ocyROMV0w,641
5
5
  flowcept/analytics/analytics_utils.py,sha256=FRJdBtQa7Hrk2oR_FFhmhmMf3X6YyZ4nbH5RIYh7KL4,8753
6
6
  flowcept/analytics/data_augmentation.py,sha256=Dyr5x316Zf-k1e8rVoQMCpFOrklYVHjfejRPrtoycmc,1641
@@ -27,10 +27,10 @@ flowcept/commons/flowcept_dataclasses/__init__.py,sha256=8KkiJh0WSRAB50waVluxCSI
27
27
  flowcept/commons/flowcept_dataclasses/base_settings_dataclasses.py,sha256=Cjw2PGYtZDfnwecz6G3S42Ncmxj7AIZVEBx05bsxRUo,399
28
28
  flowcept/commons/flowcept_dataclasses/task_object.py,sha256=3DD5ZNMz7EVILS9PRkQ3khboav7lIKoUC5W6sKMFauQ,4694
29
29
  flowcept/commons/flowcept_dataclasses/telemetry.py,sha256=9_5ONCo-06r5nKHXmi5HfIhiZSuPgmTECiq_u9MlxXM,2822
30
- flowcept/commons/flowcept_dataclasses/workflow_object.py,sha256=t9M0eVdcq3NLZgT4fwXrR3x2oOgjtE5Jo5_MAi4-0YM,4283
30
+ flowcept/commons/flowcept_dataclasses/workflow_object.py,sha256=FBpel5PulrN3mCCk3hrQhoYiFqd-4aNV4tT03bCV3DE,4376
31
31
  flowcept/flowcept_api/__init__.py,sha256=T1ty86YlocQ5Z18l5fUqHj_CC6Unq_iBv0lFyiI7Ao8,22
32
32
  flowcept/flowcept_api/db_api.py,sha256=hKXep-n50rp9cAzV0ljk2QVEF8O64yxi3ujXv5_Ibac,9723
33
- flowcept/flowcept_api/flowcept_controller.py,sha256=zq4cRM14xoeRA6HPL6JwLwDLpsVra5ej1EAPmiVKUIs,11932
33
+ flowcept/flowcept_api/flowcept_controller.py,sha256=lkHR7O0zAAfbGtVa4o9tjZMdZquYN7vdnymRKzc4B8s,11933
34
34
  flowcept/flowcept_api/task_query_api.py,sha256=SrwB0OCVtbpvCPECkE2ySM10G_g8Wlk5PJ8h-0xEaNc,23821
35
35
  flowcept/flowcept_webserver/__init__.py,sha256=8411GIXGddKTKoHUvbo_Rq6svosNG7tG8VzvUEBd7WI,28
36
36
  flowcept/flowcept_webserver/app.py,sha256=VUV8_JZbIbx9u_1O7m7XtRdhZb_7uifUa-iNlPhmZws,658
@@ -38,14 +38,14 @@ flowcept/flowcept_webserver/resources/__init__.py,sha256=XOk5yhLeLU6JmVXxbl3TY2z
38
38
  flowcept/flowcept_webserver/resources/query_rsrc.py,sha256=Mk1XDC_wVYkMk0eaazqWWrTC07gQU9U0toKfip0ihZE,1353
39
39
  flowcept/flowcept_webserver/resources/task_messages_rsrc.py,sha256=0u68it2W-9NzUUx5fWOZCqvRKe5EsLI8oyvto9634Ng,666
40
40
  flowcept/flowceptor/__init__.py,sha256=wVxRXUv07iNx6SMRRma2vqhR_GIcRl0re_WCYG65PUs,29
41
- flowcept/flowceptor/telemetry_capture.py,sha256=8LK4o3OaZD8B6KTpgpvD9D834dFpAJpX-NN2bc91jZU,13658
41
+ flowcept/flowceptor/telemetry_capture.py,sha256=FlWGLpzb6pBJOKVi349kyZKzAHeTsL86BCQd4Wtxpig,13746
42
42
  flowcept/flowceptor/adapters/__init__.py,sha256=SuZbSZVVQeBJ9zXW-M9jF09dw3XIjre3lSGrUO1Y8Po,27
43
43
  flowcept/flowceptor/adapters/base_interceptor.py,sha256=99a_Ipnj6g8qZMHWLBEYJh0Cox033ADxOKPFrivr9gw,6056
44
44
  flowcept/flowceptor/adapters/instrumentation_interceptor.py,sha256=DhK2bBnpghqPSeA62BUqRg6pl8zxuYrP33dK4x6PhRE,733
45
45
  flowcept/flowceptor/adapters/interceptor_state_manager.py,sha256=xRzmi5YFKBEqNtX8F5s6XlMTRe27ml4BmQtBO4WtG2c,919
46
46
  flowcept/flowceptor/adapters/dask/__init__.py,sha256=GKreb5L_nliD2BEckyB943zOQ-b6Gn1fLDj81FqSK2Y,23
47
47
  flowcept/flowceptor/adapters/dask/dask_dataclasses.py,sha256=6LTG-kdcc6AUuVINvkqB5QHw6pchg1aMqj0sdWt2Ef8,580
48
- flowcept/flowceptor/adapters/dask/dask_interceptor.py,sha256=Dzrwu9Y9A6k2Qq8tZKXx3zmi-CpmtFrJehUTfNjZxDM,5827
48
+ flowcept/flowceptor/adapters/dask/dask_interceptor.py,sha256=uBQpLluYXzlT1gBDfTe4_WueC_fWBEs5Xr8ntpOmljE,5869
49
49
  flowcept/flowceptor/adapters/dask/dask_plugins.py,sha256=s1ENAi9N61PC_6RiFvOYhJsgWzSm_lFWm3w87V-R1YY,2473
50
50
  flowcept/flowceptor/adapters/mlflow/__init__.py,sha256=3mzHrvh1XQOy68qx1A3so9Nq27tIb0i2mSXfv3F6gZg,25
51
51
  flowcept/flowceptor/adapters/mlflow/interception_event_handler.py,sha256=-SsIRdOcZjQUTzWgsZ41ouqpla4Qd32jIWXIAGU1pPw,494
@@ -59,15 +59,15 @@ flowcept/flowceptor/adapters/zambeze/__init__.py,sha256=1e9_hK2cUKDXhQ0kBRftwcJj
59
59
  flowcept/flowceptor/adapters/zambeze/zambeze_dataclasses.py,sha256=nn9MxvcdzgmOa8n5Jwdl7UzlSzxEu9bA-Ls6cHyb91c,849
60
60
  flowcept/flowceptor/adapters/zambeze/zambeze_interceptor.py,sha256=Bjyi48JW0DXJLJuvwPxaD8zxxsSoEFgSoXl8YcbwFWk,3782
61
61
  flowcept/flowceptor/consumers/__init__.py,sha256=foxtVEb2ZEe9g1slfYIKM4tIFv-He1l7XS--SYs7nlQ,28
62
- flowcept/flowceptor/consumers/consumer_utils.py,sha256=JmyjQeZPqMj_yqFlxxw9k2_JZvZkAmX7kySV__YvEVc,5719
62
+ flowcept/flowceptor/consumers/consumer_utils.py,sha256=7bvFJWusJkfA4j0gwZLDIIsIOyfk9wRq6s5liS3JAV0,5665
63
63
  flowcept/flowceptor/consumers/document_inserter.py,sha256=rAK3rs3VNW5a6koesE05scQ1mR_4BhuxLurP10ipURs,9339
64
64
  flowcept/instrumentation/__init__.py,sha256=M5bTmg80E4QyN91gUX3qfw_nbtJSXwGWcKxdZP3vJz0,34
65
- flowcept/instrumentation/flowcept_loop.py,sha256=9Ap7-PfpNdwS7DaRDaB-R9G3X_G3RZvGVkNVUZAix5A,12164
65
+ flowcept/instrumentation/flowcept_loop.py,sha256=RvETm3Pn37dIw_a1RXigyh2U7MCBHqi46dPmbrz3RMQ,12171
66
66
  flowcept/instrumentation/flowcept_task.py,sha256=l_BAYEUZ_SeBt8QJN_E9D9QcZVYRnW9qO_XRnqvmePE,5993
67
67
  flowcept/instrumentation/flowcept_torch.py,sha256=KXA1HBwz8l5Qp7PkZ7nsbYlM8IcwWD_u04NxaAcZPzM,23395
68
68
  flowcept/instrumentation/task_capture.py,sha256=u82r_SgzoVKyb6_SWtfB-meBUZgjrXvF5dxkH9vnMDs,4776
69
- resources/sample_settings.yaml,sha256=eYMO3rlS4m1sjkgoKuRIYaTuZldiu50bN-E3Bu3on_I,3424
70
- flowcept-0.8.4.dist-info/METADATA,sha256=aOyqBxuMdXSO5h4n9vAqLQDY7U3ZRRzJoHKTrgHYfoE,17543
71
- flowcept-0.8.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
72
- flowcept-0.8.4.dist-info/licenses/LICENSE,sha256=r5-2P6tFTuRGWT5TiX32s1y0tnp4cIqBEC1QjTaXe2k,1086
73
- flowcept-0.8.4.dist-info/RECORD,,
69
+ resources/sample_settings.yaml,sha256=aZRAZRkgCe52i-8czQvZsEIAz8dGau-OF2YClUF3QGs,3427
70
+ flowcept-0.8.5.dist-info/METADATA,sha256=uZzz3Hz-Pee3zpeyNYLk5K-JbS_miCTMXIXlqtMBXX0,17543
71
+ flowcept-0.8.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
72
+ flowcept-0.8.5.dist-info/licenses/LICENSE,sha256=r5-2P6tFTuRGWT5TiX32s1y0tnp4cIqBEC1QjTaXe2k,1086
73
+ flowcept-0.8.5.dist-info/RECORD,,
@@ -13,7 +13,7 @@ log:
13
13
  log_stream_level: error
14
14
 
15
15
  telemetry_capture:
16
- gpu: ~ # ~ means None. This is a list with GPU metrics. AMD=[activity,used,power,temperature,others]; NVIDIA=[used,temperature,power,name,ix]
16
+ gpu: ~ # ~ means None. This is a list with GPU metrics. AMD=[activity,used,power,temperature,others,id]; NVIDIA=[used,temperature,power,name,id]
17
17
  cpu: true
18
18
  per_cpu: true
19
19
  process_info: true