flowcept 0.9.16__py3-none-any.whl → 0.9.17__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.
@@ -1,16 +1,19 @@
1
1
  """Event handler module."""
2
2
 
3
+ from pathlib import Path
3
4
  from watchdog.events import FileSystemEventHandler
4
5
 
5
6
 
6
7
  class InterceptionEventHandler(FileSystemEventHandler):
7
8
  """Event handler class."""
8
9
 
9
- def __init__(self, interceptor_instance, callback_function):
10
+ def __init__(self, interceptor_instance, file_path_to_watch, callback_function):
10
11
  super().__init__()
12
+ self.file_path_to_watch = file_path_to_watch
11
13
  self.callback_function = callback_function
12
14
  self.interceptor_instance = interceptor_instance
13
15
 
14
16
  def on_modified(self, event):
15
17
  """Get on modified."""
16
- self.callback_function(self.interceptor_instance)
18
+ if Path(event.src_path).resolve() == Path(self.file_path_to_watch).resolve():
19
+ self.callback_function(self.interceptor_instance)
@@ -84,7 +84,7 @@ class MLFlowInterceptor(BaseInterceptor):
84
84
  def observe(self):
85
85
  """Observe it."""
86
86
  self.logger.debug("Observing")
87
- event_handler = InterceptionEventHandler(self, self.__class__.callback)
87
+ event_handler = InterceptionEventHandler(self, self.settings.file_path, self.__class__.callback)
88
88
  while not os.path.isfile(self.settings.file_path):
89
89
  self.logger.warning(
90
90
  f"I can't watch the file {self.settings.file_path},"
@@ -95,6 +95,7 @@ class MLFlowInterceptor(BaseInterceptor):
95
95
  sleep(self.settings.watch_interval_sec)
96
96
 
97
97
  self._observer = PollingObserver()
98
- self._observer.schedule(event_handler, self.settings.file_path, recursive=True)
98
+ watch_dir = os.path.dirname(self.settings.file_path) or "."
99
+ self._observer.schedule(event_handler, watch_dir, recursive=True)
99
100
  self._observer.start()
100
- self.logger.info(f"Watching {self.settings.file_path}")
101
+ self.logger.info(f"Watching directory {watch_dir} with file {self.settings.file_path} ")
@@ -1,6 +1,7 @@
1
1
  """Tensorboard interceptor module."""
2
2
 
3
3
  import os
4
+ from pathlib import Path
4
5
  from time import sleep
5
6
 
6
7
  from tbparse import SummaryReader
@@ -29,6 +30,8 @@ class TensorboardInterceptor(BaseInterceptor):
29
30
  def __init__(self, plugin_key="tensorboard"):
30
31
  super().__init__(plugin_key)
31
32
  self._observer: PollingObserver = None
33
+ if not Path(self.settings.file_path).is_dir():
34
+ raise Exception("Tensorboard Observer must observe directories.")
32
35
  self.state_manager = InterceptorStateManager(self.settings)
33
36
  self.state_manager.reset()
34
37
  self.log_metrics = set(self.settings.log_metrics)
@@ -108,13 +111,15 @@ class TensorboardInterceptor(BaseInterceptor):
108
111
 
109
112
  def observe(self):
110
113
  """Observe it."""
111
- event_handler = InterceptionEventHandler(self, self.__class__.callback)
114
+ self.logger.debug("Observing")
115
+ event_handler = InterceptionEventHandler(self, self.settings.file_path, self.__class__.callback)
112
116
  while not os.path.isdir(self.settings.file_path):
113
117
  self.logger.debug(f"I can't watch the file {self.settings.file_path}, as it does not exist.")
114
118
  self.logger.debug(f"\tI will sleep for {self.settings.watch_interval_sec} s to see if it appears.")
115
119
  sleep(self.settings.watch_interval_sec)
116
120
 
117
121
  self._observer = PollingObserver()
122
+
118
123
  self._observer.schedule(event_handler, self.settings.file_path, recursive=True)
119
124
  self._observer.start()
120
125
  self.logger.debug(f"Watching {self.settings.file_path}")
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.9.16"
7
+ __version__ = "0.9.17"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flowcept
3
- Version: 0.9.16
3
+ Version: 0.9.17
4
4
  Summary: Capture and query workflow provenance data using data observability
5
5
  Author: Oak Ridge National Laboratory
6
6
  License-Expression: MIT
@@ -9,7 +9,7 @@ Keywords: agentic-ai,agentic-workflows,ai,big-data,dask,data-analytics,data-inte
9
9
  Classifier: License :: OSI Approved :: MIT License
10
10
  Classifier: Operating System :: OS Independent
11
11
  Classifier: Programming Language :: Python :: 3
12
- Requires-Python: >=3.10
12
+ Requires-Python: >=3.11
13
13
  Requires-Dist: msgpack
14
14
  Requires-Dist: numpy
15
15
  Requires-Dist: omegaconf
@@ -169,6 +169,7 @@ Flowcept captures and queries workflow provenance at runtime with minimal code c
169
169
 
170
170
 
171
171
  [![Documentation](https://img.shields.io/badge/docs-readthedocs.io-green.svg)](https://flowcept.readthedocs.io/)
172
+ [![Slack](https://img.shields.io/badge/Slack-%23flowcept%40Workflows%20Community-4A154B?logo=slack)](https://workflowscommunity.slack.com/archives/C06L5GYJKQS)
172
173
  [![Build](https://github.com/ORNL/flowcept/actions/workflows/create-release-n-publish.yml/badge.svg)](https://github.com/ORNL/flowcept/actions/workflows/create-release-n-publish.yml)
173
174
  [![PyPI](https://badge.fury.io/py/flowcept.svg)](https://pypi.org/project/flowcept)
174
175
  [![Tests](https://github.com/ORNL/flowcept/actions/workflows/run-tests.yml/badge.svg)](https://github.com/ORNL/flowcept/actions/workflows/run-tests.yml)
@@ -1,7 +1,7 @@
1
1
  flowcept/__init__.py,sha256=tvVZKyymdqv3qOsgpAyDppBlUiBc0ag4QF21IcS-mVk,2449
2
2
  flowcept/cli.py,sha256=d3hogRpuMwQFIqw_fsYD4y074o3AFslBjlkRvTthOVM,25702
3
3
  flowcept/configs.py,sha256=DBkYx0CAaDSl8x2EJY1665PFY80eCp9PEriYH-BNwL4,8781
4
- flowcept/version.py,sha256=X_noM4WnOGvGvCrAd_pXE-NBhOzr3f_98p4cBho_IKA,307
4
+ flowcept/version.py,sha256=CCisSYx_UPtct6ynMdnfePrYgGtXK-iQk7gTD4nsAVs,307
5
5
  flowcept/agents/__init__.py,sha256=8eeD2CiKBtHiDsWdrHK_UreIkKlTq4dUbhHDyzw372o,175
6
6
  flowcept/agents/agent_client.py,sha256=UiBQkC9WE2weLZR2OTkEOEQt9-zqQOkPwRA17HfI-jk,2027
7
7
  flowcept/agents/agents_utils.py,sha256=MXrzAFwCnBQF7s28QLN3OzWEIryOl-a0zeVQIbzNxD4,7330
@@ -74,13 +74,13 @@ flowcept/flowceptor/adapters/dask/dask_dataclasses.py,sha256=6LTG-kdcc6AUuVINvkq
74
74
  flowcept/flowceptor/adapters/dask/dask_interceptor.py,sha256=uBQpLluYXzlT1gBDfTe4_WueC_fWBEs5Xr8ntpOmljE,5869
75
75
  flowcept/flowceptor/adapters/dask/dask_plugins.py,sha256=s1ENAi9N61PC_6RiFvOYhJsgWzSm_lFWm3w87V-R1YY,2473
76
76
  flowcept/flowceptor/adapters/mlflow/__init__.py,sha256=3mzHrvh1XQOy68qx1A3so9Nq27tIb0i2mSXfv3F6gZg,25
77
- flowcept/flowceptor/adapters/mlflow/interception_event_handler.py,sha256=-SsIRdOcZjQUTzWgsZ41ouqpla4Qd32jIWXIAGU1pPw,494
77
+ flowcept/flowceptor/adapters/mlflow/interception_event_handler.py,sha256=eR9vrPtSFEonJK7GQE1WTp1KVomV188uwRUqRRbFT9Q,682
78
78
  flowcept/flowceptor/adapters/mlflow/mlflow_dao.py,sha256=dPEgCduiw14_pzT5WCjuokwaN7p5Tu7UvWS2rtGh4qk,4589
79
79
  flowcept/flowceptor/adapters/mlflow/mlflow_dataclasses.py,sha256=vbijpDW6npHdsA9-28otXw94O4a9R-PWtq3xlJapsyY,690
80
- flowcept/flowceptor/adapters/mlflow/mlflow_interceptor.py,sha256=OLmVBdOCMS3GPcdxSdCD794RDbW6p4f8eBh1PXWcvHE,3799
80
+ flowcept/flowceptor/adapters/mlflow/mlflow_interceptor.py,sha256=gufzv2OSVuLkFoo5In7aRzAZOFptwH6R9TTSsqO5vb8,3911
81
81
  flowcept/flowceptor/adapters/tensorboard/__init__.py,sha256=LrcR4WCIlBwwHIUSteQ8k8JBdCJTFqLvvgAfnoLeREw,30
82
82
  flowcept/flowceptor/adapters/tensorboard/tensorboard_dataclasses.py,sha256=lSfDd6TucVNzGxbm69BYyCVgMr2p9iUEQjnsS4jIfeI,554
83
- flowcept/flowceptor/adapters/tensorboard/tensorboard_interceptor.py,sha256=PUKGlCsYcybsk1HK573Brs6FiXQRoaj6MKgZ3Oyeec4,4881
83
+ flowcept/flowceptor/adapters/tensorboard/tensorboard_interceptor.py,sha256=-uGtCDE8YJ-hbZKII_l3HVXNMKiw_MjrfAdcdt6ex70,5104
84
84
  flowcept/flowceptor/consumers/__init__.py,sha256=foxtVEb2ZEe9g1slfYIKM4tIFv-He1l7XS--SYs7nlQ,28
85
85
  flowcept/flowceptor/consumers/base_consumer.py,sha256=hrZ3VFV7pJBMXZsvh7Q2Y36b_ifcnbJkgwe2MiuZL70,3324
86
86
  flowcept/flowceptor/consumers/consumer_utils.py,sha256=E6R07zIKNXJTCxvL-OCrCKNYRpqtwRiXiZx0D2BKidk,5893
@@ -94,9 +94,9 @@ flowcept/instrumentation/flowcept_loop.py,sha256=nF7Sov-DCDapyYvS8zx-1ZFrnjc3CPg
94
94
  flowcept/instrumentation/flowcept_task.py,sha256=EmKODpjl8usNklKSVmsKYyCa6gC_QMqKhAr3DKaw44s,8199
95
95
  flowcept/instrumentation/flowcept_torch.py,sha256=kkZQRYq6cDBpdBU6J39_4oKRVkhyF3ODlz8ydV5WGKw,23455
96
96
  flowcept/instrumentation/task_capture.py,sha256=1g9EtLdqsTB0RHsF-eRmA2Xh9l_YqTd953d4v89IC24,8287
97
- resources/sample_settings.yaml,sha256=M994vAtdMeEzjfJ0v56ibYEtEIXciNSy9iZqXuWAJcA,6881
98
- flowcept-0.9.16.dist-info/METADATA,sha256=PM5oaTzN7PT46XwOFs480asKZeq76Y_km1mc72zdCEs,32896
99
- flowcept-0.9.16.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
100
- flowcept-0.9.16.dist-info/entry_points.txt,sha256=i8q67WE0201rVxYI2lyBtS52shvgl93x2Szp4q8zMlw,47
101
- flowcept-0.9.16.dist-info/licenses/LICENSE,sha256=r5-2P6tFTuRGWT5TiX32s1y0tnp4cIqBEC1QjTaXe2k,1086
102
- flowcept-0.9.16.dist-info/RECORD,,
97
+ resources/sample_settings.yaml,sha256=4Hfj7qnthQdfWoCQYRLEF5Jm3zfOFmNbko249tIizPY,6881
98
+ flowcept-0.9.17.dist-info/METADATA,sha256=8YvAYyHRt02C-TWstfldJrTL9pEX2ijrEn-ygpkVgJY,33056
99
+ flowcept-0.9.17.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
100
+ flowcept-0.9.17.dist-info/entry_points.txt,sha256=i8q67WE0201rVxYI2lyBtS52shvgl93x2Szp4q8zMlw,47
101
+ flowcept-0.9.17.dist-info/licenses/LICENSE,sha256=r5-2P6tFTuRGWT5TiX32s1y0tnp4cIqBEC1QjTaXe2k,1086
102
+ flowcept-0.9.17.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
- flowcept_version: 0.9.16 # Version of the Flowcept package. This setting file is compatible with this version.
1
+ flowcept_version: 0.9.17 # Version of the Flowcept package. This setting file is compatible with this version.
2
2
 
3
3
  project:
4
4
  debug: true # Toggle debug mode. This will add a property `debug: true` to all saved data, making it easier to retrieve/delete them later.