flowcept 0.8.9__py3-none-any.whl → 0.8.10__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.
flowcept/cli.py ADDED
@@ -0,0 +1,260 @@
1
+ """
2
+ Flowcept CLI.
3
+
4
+ How to add a new command:
5
+ --------------------------
6
+ 1. Write a function with type-annotated arguments and a NumPy-style docstring.
7
+ 2. Add it to one of the groups in `COMMAND_GROUPS`.
8
+ 3. It will automatically become available as `flowcept --<function-name>` (underscores become hyphens).
9
+
10
+ Supports:
11
+ - `flowcept --command`
12
+ - `flowcept --command --arg=value`
13
+ - `flowcept -h` or `flowcept` for full help
14
+ - `flowcept --help --command` for command-specific help
15
+ """
16
+
17
+ import argparse
18
+ import os
19
+ import sys
20
+ import json
21
+ import textwrap
22
+ import inspect
23
+ from functools import wraps
24
+ from typing import List
25
+
26
+ from flowcept import Flowcept, configs
27
+
28
+
29
+ def no_docstring(func):
30
+ """Decorator to silence linter for missing docstrings."""
31
+
32
+ @wraps(func)
33
+ def wrapper(*args, **kwargs):
34
+ return func(*args, **kwargs)
35
+
36
+ return wrapper
37
+
38
+
39
+ def show_config():
40
+ """
41
+ Show Flowcept configuration.
42
+ """
43
+ config_data = {
44
+ "session_settings_path": configs.SETTINGS_PATH,
45
+ "env_FLOWCEPT_SETTINGS_PATH": os.environ.get("FLOWCEPT_SETTINGS_PATH", None),
46
+ }
47
+ print(f"This is the settings path in this session: {configs.SETTINGS_PATH}")
48
+ print(
49
+ f"This is your FLOWCEPT_SETTINGS_PATH environment variable value: "
50
+ f"{config_data['env_FLOWCEPT_SETTINGS_PATH']}"
51
+ )
52
+
53
+
54
+ def start_consumption_services(bundle_exec_id: str = None, check_safe_stops: bool = False, consumers: List[str] = None):
55
+ """
56
+ Start services that consume data from a queue or other source.
57
+
58
+ Parameters
59
+ ----------
60
+ bundle_exec_id : str, optional
61
+ The ID of the bundle execution to associate with the consumers.
62
+ check_safe_stops : bool, optional
63
+ Whether to check for safe stopping conditions before starting.
64
+ consumers : list of str, optional
65
+ List of consumer IDs to start. If not provided, all consumers will be started.
66
+ """
67
+ print("Starting consumption services...")
68
+ print(f" bundle_exec_id: {bundle_exec_id}")
69
+ print(f" check_safe_stops: {check_safe_stops}")
70
+ print(f" consumers: {consumers or []}")
71
+
72
+ Flowcept.start_consumption_services(
73
+ bundle_exec_id=bundle_exec_id,
74
+ check_safe_stops=check_safe_stops,
75
+ consumers=consumers,
76
+ )
77
+
78
+
79
+ def stop_consumption_services():
80
+ """
81
+ Stop the document inserter.
82
+ """
83
+ print("Not implemented yet.")
84
+
85
+
86
+ def start_services(with_mongo: bool = False):
87
+ """
88
+ Start Flowcept services (optionally including MongoDB).
89
+
90
+ Parameters
91
+ ----------
92
+ with_mongo : bool, optional
93
+ Whether to also start MongoDB.
94
+ """
95
+ print(f"Starting services{' with Mongo' if with_mongo else ''}")
96
+ print("Not implemented yet.")
97
+
98
+
99
+ def stop_services():
100
+ """
101
+ Stop Flowcept services.
102
+ """
103
+ print("Not implemented yet.")
104
+
105
+
106
+ def workflow_count(workflow_id: str):
107
+ """
108
+ Count number of documents in the DB.
109
+
110
+ Parameters
111
+ ----------
112
+ workflow_id : str
113
+ The ID of the workflow to count tasks for.
114
+ """
115
+ result = {
116
+ "workflow_id": workflow_id,
117
+ "tasks": len(Flowcept.db.query({"workflow_id": workflow_id})),
118
+ "workflows": len(Flowcept.db.query({"workflow_id": workflow_id}, collection="workflows")),
119
+ "objects": len(Flowcept.db.query({"workflow_id": workflow_id}, collection="objects")),
120
+ }
121
+ print(json.dumps(result, indent=2))
122
+
123
+
124
+ def query(query_str: str):
125
+ """
126
+ Query the Document DB.
127
+
128
+ Parameters
129
+ ----------
130
+ query_str : str
131
+ A JSON string representing the Mongo query.
132
+ """
133
+ query = json.loads(query_str)
134
+ print(Flowcept.db.query(query))
135
+
136
+
137
+ COMMAND_GROUPS = [
138
+ ("Basic Commands", [show_config, start_services, stop_services]),
139
+ ("Consumption Commands", [start_consumption_services, stop_consumption_services]),
140
+ ("Database Commands", [workflow_count, query]),
141
+ ]
142
+
143
+ COMMANDS = set(f for _, fs in COMMAND_GROUPS for f in fs)
144
+
145
+
146
+ def _parse_numpy_doc(docstring: str):
147
+ parsed = {}
148
+ lines = docstring.splitlines() if docstring else []
149
+ in_params = False
150
+ for line in lines:
151
+ line = line.strip()
152
+ if line.lower().startswith("parameters"):
153
+ in_params = True
154
+ continue
155
+ if in_params:
156
+ if " : " in line:
157
+ name, typeinfo = line.split(" : ", 1)
158
+ parsed[name.strip()] = {"type": typeinfo.strip(), "desc": ""}
159
+ elif parsed:
160
+ last = list(parsed)[-1]
161
+ parsed[last]["desc"] += " " + line
162
+ return parsed
163
+
164
+
165
+ @no_docstring
166
+ def main(): # noqa: D103
167
+ parser = argparse.ArgumentParser(
168
+ description="Flowcept CLI", formatter_class=argparse.RawTextHelpFormatter, add_help=False
169
+ )
170
+
171
+ for func in COMMANDS:
172
+ doc = func.__doc__ or ""
173
+ func_name = func.__name__
174
+ flag = f"--{func_name.replace('_', '-')}"
175
+ short_help = doc.strip().splitlines()[0] if doc else ""
176
+ parser.add_argument(flag, action="store_true", help=short_help)
177
+
178
+ for pname, param in inspect.signature(func).parameters.items():
179
+ arg_name = f"--{pname.replace('_', '-')}"
180
+ params_doc = _parse_numpy_doc(doc).get(pname, {})
181
+ help_text = f"{params_doc.get('type', '')} - {params_doc.get('desc', '').strip()}"
182
+ if isinstance(param.annotation, bool):
183
+ parser.add_argument(arg_name, action="store_true", help=help_text)
184
+ elif param.annotation == List[str]:
185
+ parser.add_argument(arg_name, type=lambda s: s.split(","), help=help_text)
186
+ else:
187
+ parser.add_argument(arg_name, type=str, help=help_text)
188
+
189
+ # Handle --help --command
190
+ help_flag = "--help" in sys.argv
191
+ command_flags = {f"--{f.__name__.replace('_', '-')}" for f in COMMANDS}
192
+ matched_command_flag = next((arg for arg in sys.argv if arg in command_flags), None)
193
+
194
+ if help_flag and matched_command_flag:
195
+ command_func = next(f for f in COMMANDS if f"--{f.__name__.replace('_', '-')}" == matched_command_flag)
196
+ doc = command_func.__doc__ or ""
197
+ sig = inspect.signature(command_func)
198
+ print(f"\nHelp for `flowcept {matched_command_flag}`:\n")
199
+ print(textwrap.indent(doc.strip(), " "))
200
+ print("\n Arguments:")
201
+ params = _parse_numpy_doc(doc)
202
+ for pname, p in sig.parameters.items():
203
+ meta = params.get(pname, {})
204
+ opt = p.default != inspect.Parameter.empty
205
+ print(
206
+ f" --{pname:<18} {meta.get('type', 'str')}, "
207
+ f"{'optional' if opt else 'required'} - {meta.get('desc', '').strip()}"
208
+ )
209
+ print()
210
+ sys.exit(0)
211
+
212
+ if len(sys.argv) == 1 or help_flag:
213
+ print("\nFlowcept CLI\n")
214
+ for group, funcs in COMMAND_GROUPS:
215
+ print(f"{group}:\n")
216
+ for func in funcs:
217
+ name = func.__name__
218
+ flag = f"--{name.replace('_', '-')}"
219
+ doc = func.__doc__ or ""
220
+ summary = doc.strip().splitlines()[0] if doc else ""
221
+ sig = inspect.signature(func)
222
+ print(f" flowcept {flag}", end="")
223
+ for pname, p in sig.parameters.items():
224
+ is_opt = p.default != inspect.Parameter.empty
225
+ print(f" [--{pname.replace('_', '-')}] " if is_opt else f" --{pname.replace('_', '-')}", end="")
226
+ print(f"\n {summary}")
227
+ params = _parse_numpy_doc(doc)
228
+ if params:
229
+ print(" Arguments:")
230
+ for argname, meta in params.items():
231
+ opt = sig.parameters[argname].default != inspect.Parameter.empty
232
+ print(
233
+ f" --"
234
+ f"{argname:<18} {meta['type']}, "
235
+ f"{'optional' if opt else 'required'} - {meta['desc'].strip()}"
236
+ )
237
+ print()
238
+ print("Run `flowcept --<command>` to invoke a command.\n")
239
+ sys.exit(0)
240
+
241
+ args = vars(parser.parse_args())
242
+
243
+ for func in COMMANDS:
244
+ flag = f"--{func.__name__.replace('_', '-')}"
245
+ if args.get(func.__name__.replace("-", "_")):
246
+ sig = inspect.signature(func)
247
+ kwargs = {}
248
+ for pname in sig.parameters:
249
+ val = args.get(pname.replace("-", "_"))
250
+ if val is not None:
251
+ kwargs[pname] = val
252
+ func(**kwargs)
253
+ break
254
+ else:
255
+ print("Unknown command. Use `flowcept -h` to see available commands.")
256
+ sys.exit(1)
257
+
258
+
259
+ if __name__ == "__main__":
260
+ main()
flowcept/configs.py CHANGED
@@ -126,11 +126,9 @@ if not LMDB_ENABLED and not MONGO_ENABLED:
126
126
  # DB Buffer Settings #
127
127
  ##########################
128
128
  db_buffer_settings = settings["db_buffer"]
129
- # In seconds:
130
- INSERTION_BUFFER_TIME = db_buffer_settings.get("insertion_buffer_time_secs", None)
131
- ADAPTIVE_DB_BUFFER_SIZE = db_buffer_settings.get("adaptive_buffer_size", True)
132
- DB_MAX_BUFFER_SIZE = int(db_buffer_settings.get("max_buffer_size", 50))
133
- DB_MIN_BUFFER_SIZE = max(1, int(db_buffer_settings.get("min_buffer_size", 10)))
129
+
130
+ INSERTION_BUFFER_TIME = db_buffer_settings.get("insertion_buffer_time_secs", None) # In seconds:
131
+ DB_BUFFER_SIZE = int(db_buffer_settings.get("buffer_size", 50))
134
132
  REMOVE_EMPTY_FIELDS = db_buffer_settings.get("remove_empty_fields", False)
135
133
  DB_INSERTER_MAX_TRIALS_STOP = db_buffer_settings.get("stop_max_trials", 240)
136
134
  DB_INSERTER_SLEEP_TRIALS_STOP = db_buffer_settings.get("stop_trials_sleep", 0.01)
@@ -9,7 +9,6 @@ from flowcept.commons.flowcept_dataclasses.workflow_object import (
9
9
  )
10
10
  from flowcept.configs import (
11
11
  ENRICH_MESSAGES,
12
- INSTRUMENTATION,
13
12
  )
14
13
  from flowcept.commons.flowcept_logger import FlowceptLogger
15
14
  from flowcept.commons.daos.mq_dao.mq_dao_base import MQDao
@@ -50,23 +49,15 @@ class BaseInterceptor(object):
50
49
  elif kind in "dask":
51
50
  # This is dask's client interceptor. We essentially use it to store the dask workflow.
52
51
  # That's why we don't need another special interceptor and we can reuse the instrumentation one.
53
- return BaseInterceptor._build_instrumentation_interceptor()
54
- elif kind == "instrumentation":
55
- return BaseInterceptor._build_instrumentation_interceptor()
56
- else:
57
- raise NotImplementedError
52
+ from flowcept.flowceptor.adapters.instrumentation_interceptor import InstrumentationInterceptor
58
53
 
59
- @staticmethod
60
- def _build_instrumentation_interceptor():
61
- # By using singleton, we lose the thread safety for the Interceptor, particularly, its MQ buffer.
62
- # Since some use cases need threads, this allows disabling the singleton for more thread safety.
63
- is_singleton = INSTRUMENTATION.get("singleton", True)
64
- if is_singleton:
54
+ return InstrumentationInterceptor.get_instance()
55
+ elif kind == "instrumentation":
65
56
  from flowcept.flowceptor.adapters.instrumentation_interceptor import InstrumentationInterceptor
66
57
 
67
58
  return InstrumentationInterceptor.get_instance()
68
59
  else:
69
- return BaseInterceptor(kind="instrumentation")
60
+ raise NotImplementedError
70
61
 
71
62
  def __init__(self, plugin_key=None, kind=None):
72
63
  self.logger = FlowceptLogger()
@@ -16,11 +16,9 @@ from flowcept.commons.utils import GenericJSONDecoder
16
16
  from flowcept.commons.vocabulary import Status
17
17
  from flowcept.configs import (
18
18
  INSERTION_BUFFER_TIME,
19
- DB_MAX_BUFFER_SIZE,
20
- DB_MIN_BUFFER_SIZE,
19
+ DB_BUFFER_SIZE,
21
20
  DB_INSERTER_MAX_TRIALS_STOP,
22
21
  DB_INSERTER_SLEEP_TRIALS_STOP,
23
- ADAPTIVE_DB_BUFFER_SIZE,
24
22
  REMOVE_EMPTY_FIELDS,
25
23
  JSON_SERIALIZER,
26
24
  ENRICH_MESSAGES,
@@ -67,28 +65,16 @@ class DocumentInserter:
67
65
  self._previous_time = time()
68
66
  self.logger = FlowceptLogger()
69
67
  self._main_thread: Thread = None
70
- self._curr_max_buffer_size = DB_MAX_BUFFER_SIZE
68
+ self._curr_db_buffer_size = DB_BUFFER_SIZE
71
69
  self._bundle_exec_id = bundle_exec_id
72
70
  self.check_safe_stops = check_safe_stops
73
71
  self.buffer: AutoflushBuffer = AutoflushBuffer(
74
72
  flush_function=DocumentInserter.flush_function,
75
73
  flush_function_kwargs={"logger": self.logger, "doc_daos": self._doc_daos},
76
- max_size=self._curr_max_buffer_size,
74
+ max_size=self._curr_db_buffer_size,
77
75
  flush_interval=INSERTION_BUFFER_TIME,
78
76
  )
79
77
 
80
- def _set_buffer_size(self):
81
- if not ADAPTIVE_DB_BUFFER_SIZE:
82
- return
83
- else:
84
- self._curr_max_buffer_size = max(
85
- DB_MIN_BUFFER_SIZE,
86
- min(
87
- DB_MAX_BUFFER_SIZE,
88
- int(self._curr_max_buffer_size * 1.1),
89
- ),
90
- )
91
-
92
78
  @staticmethod
93
79
  def flush_function(buffer, doc_daos, logger):
94
80
  """Flush it."""
@@ -1,5 +1,8 @@
1
1
  from time import time
2
2
  from typing import Dict
3
+ import os
4
+ import threading
5
+ import random
3
6
 
4
7
  from flowcept.commons.flowcept_dataclasses.task_object import (
5
8
  TaskObject,
@@ -57,21 +60,16 @@ class FlowceptTask(object):
57
60
  activity_id: str = None,
58
61
  used: Dict = None,
59
62
  custom_metadata: Dict = None,
60
- flowcept: "Flowcept" = None,
61
63
  ):
62
64
  if not INSTRUMENTATION_ENABLED:
63
65
  self._ended = True
64
66
  return
65
- if flowcept is not None and flowcept._interceptor_instances[0].kind == "instrumentation":
66
- self._interceptor = flowcept._interceptor_instances[0]
67
- else:
68
- self._interceptor = InstrumentationInterceptor.get_instance()
69
-
70
67
  self._task = TaskObject()
68
+ self._interceptor = InstrumentationInterceptor.get_instance()
71
69
  self._task.telemetry_at_start = self._interceptor.telemetry_capture.capture()
72
70
  self._task.activity_id = activity_id
73
71
  self._task.started_at = time()
74
- self._task.task_id = task_id or str(self._task.started_at)
72
+ self._task.task_id = task_id or self._gen_task_id()
75
73
  self._task.workflow_id = workflow_id or Flowcept.current_workflow_id
76
74
  self._task.campaign_id = campaign_id or Flowcept.campaign_id
77
75
  self._task.used = used
@@ -85,6 +83,12 @@ class FlowceptTask(object):
85
83
  if not self._ended:
86
84
  self.end()
87
85
 
86
+ def _gen_task_id(self):
87
+ pid = os.getpid()
88
+ tid = threading.get_ident()
89
+ rand = random.getrandbits(32)
90
+ return f"{self._task.started_at}_{pid}_{tid}_{rand}"
91
+
88
92
  def end(
89
93
  self,
90
94
  generated: Dict = None,
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.9"
7
+ __version__ = "0.8.10"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flowcept
3
- Version: 0.8.9
3
+ Version: 0.8.10
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
@@ -112,7 +112,9 @@ Description-Content-Type: text/markdown
112
112
 
113
113
  ## Overview
114
114
 
115
- Flowcept is a runtime data integration system that captures and queries workflow provenance with minimal or no code changes. It unifies data across diverse workflows and tools, enabling integrated analysis and insights, especially in federated environments. Designed for scenarios involving critical data from multiple workflows, Flowcept seamlessly integrates data at runtime, providing a unified view for end-to-end monitoring and analysis, and enhanced support for Machine Learning (ML) workflows.
115
+ Flowcept is a runtime data integration system that captures and queries workflow provenance with minimal or no code changes. It unifies data from diverse workflows and tools, enabling integrated analysis and insights, especially in federated environments.
116
+
117
+ Designed for scenarios involving critical data from multiple workflows, Flowcept supports end-to-end monitoring, analysis, querying, and enhanced support for Machine Learning (ML) workflows.
116
118
 
117
119
  ## Features
118
120
 
@@ -135,8 +137,9 @@ Notes:
135
137
  - TensorBoard
136
138
  - Python scripts can be easily instrumented via `@decorators` using `@flowcept_task` (for generic Python method) or `@torch_task` (for methods that encapsulate PyTorch model manipulation, such as training or evaluation).
137
139
  - Currently supported MQ systems:
138
- - Kafka
139
- - Redis
140
+ - [Kafka](https://kafka.apache.org)
141
+ - [Redis](https://redis.io)
142
+ - [Mofka](https://mofka.readthedocs.io)
140
143
  - Currently supported database systems:
141
144
  - MongoDB
142
145
  - Lightning Memory-Mapped Database (lightweight file-only database system)
@@ -181,7 +184,7 @@ If you want to install all optional dependencies, use:
181
184
  pip install flowcept[all]
182
185
  ```
183
186
 
184
- This is a convenient way to ensure all adapters are available, but it may install dependencies you don't need.
187
+ This is useful mostly for Flowcept developers. Please avoid installing like this if you can, as it may install several dependencies you will never use.
185
188
 
186
189
  ### 4. Installing from Source
187
190
  To install Flowcept from the source repository:
@@ -363,7 +366,7 @@ Some unit tests utilize `torch==2.2.2`, `torchtext=0.17.2`, and `torchvision==0.
363
366
 
364
367
  ## Documentation
365
368
 
366
- Full documentation is available on [Read the Docs](https://myproject.readthedocs.io/en/latest/).
369
+ Full documentation is available on [Read the Docs](https://flowcept.readthedocs.io/).
367
370
 
368
371
  ## Cite us
369
372
 
@@ -1,6 +1,7 @@
1
1
  flowcept/__init__.py,sha256=CukmdzTUvm6Y_plTKPq4kKn7w9LdR36j7V_C_UQyjhU,2011
2
- flowcept/configs.py,sha256=NDUAqqoKfztt6Qjwxy95eTQU71AovVJWXalI1x3HJ7Y,7441
3
- flowcept/version.py,sha256=5K2nK5n8mOoa4RCuo6y59WqFAvyjbjOF54ItBa7TE_w,306
2
+ flowcept/cli.py,sha256=WXslw2Utrn29DmJOHliptjNGpZC239IdjQdQ1dmuGVI,8638
3
+ flowcept/configs.py,sha256=p4VB5cLmAI4NKpxrZ92jNEI1ZRPrex8Ef0Dxy23ecDk,7276
4
+ flowcept/version.py,sha256=_nToyachA8IpRDDoW02cQ8d923faUb4KptrClM0bRf8,307
4
5
  flowcept/analytics/__init__.py,sha256=46q-7vsHq_ddPNrzNnDgEOiRgvlx-5Ggu2ocyROMV0w,641
5
6
  flowcept/analytics/analytics_utils.py,sha256=FRJdBtQa7Hrk2oR_FFhmhmMf3X6YyZ4nbH5RIYh7KL4,8753
6
7
  flowcept/analytics/data_augmentation.py,sha256=Dyr5x316Zf-k1e8rVoQMCpFOrklYVHjfejRPrtoycmc,1641
@@ -40,7 +41,7 @@ flowcept/flowcept_webserver/resources/task_messages_rsrc.py,sha256=0u68it2W-9NzU
40
41
  flowcept/flowceptor/__init__.py,sha256=wVxRXUv07iNx6SMRRma2vqhR_GIcRl0re_WCYG65PUs,29
41
42
  flowcept/flowceptor/telemetry_capture.py,sha256=wSXyQJ-vPVzeldD4KqoLQA2rg7V0EOQo_11ErJE5oQQ,13743
42
43
  flowcept/flowceptor/adapters/__init__.py,sha256=SuZbSZVVQeBJ9zXW-M9jF09dw3XIjre3lSGrUO1Y8Po,27
43
- flowcept/flowceptor/adapters/base_interceptor.py,sha256=a2CX7COCpYzIpQeVulrLJTSVIw453U-S2gmrMlouO5A,6487
44
+ flowcept/flowceptor/adapters/base_interceptor.py,sha256=99a_Ipnj6g8qZMHWLBEYJh0Cox033ADxOKPFrivr9gw,6056
44
45
  flowcept/flowceptor/adapters/instrumentation_interceptor.py,sha256=DhK2bBnpghqPSeA62BUqRg6pl8zxuYrP33dK4x6PhRE,733
45
46
  flowcept/flowceptor/adapters/interceptor_state_manager.py,sha256=xRzmi5YFKBEqNtX8F5s6XlMTRe27ml4BmQtBO4WtG2c,919
46
47
  flowcept/flowceptor/adapters/dask/__init__.py,sha256=GKreb5L_nliD2BEckyB943zOQ-b6Gn1fLDj81FqSK2Y,23
@@ -60,14 +61,15 @@ flowcept/flowceptor/adapters/zambeze/zambeze_dataclasses.py,sha256=nn9MxvcdzgmOa
60
61
  flowcept/flowceptor/adapters/zambeze/zambeze_interceptor.py,sha256=Bjyi48JW0DXJLJuvwPxaD8zxxsSoEFgSoXl8YcbwFWk,3782
61
62
  flowcept/flowceptor/consumers/__init__.py,sha256=foxtVEb2ZEe9g1slfYIKM4tIFv-He1l7XS--SYs7nlQ,28
62
63
  flowcept/flowceptor/consumers/consumer_utils.py,sha256=7bvFJWusJkfA4j0gwZLDIIsIOyfk9wRq6s5liS3JAV0,5665
63
- flowcept/flowceptor/consumers/document_inserter.py,sha256=fNPLa25oNhr3Y6-pRvzRp1zO4j3WBg7YXRnSHyDaaCo,9568
64
+ flowcept/flowceptor/consumers/document_inserter.py,sha256=dVUQPcWmvo68HhxJGlwUF9HtDLvofwwSTiNRwIe38PA,9164
64
65
  flowcept/instrumentation/__init__.py,sha256=M5bTmg80E4QyN91gUX3qfw_nbtJSXwGWcKxdZP3vJz0,34
65
66
  flowcept/instrumentation/flowcept_loop.py,sha256=RvETm3Pn37dIw_a1RXigyh2U7MCBHqi46dPmbrz3RMQ,12171
66
67
  flowcept/instrumentation/flowcept_task.py,sha256=l_BAYEUZ_SeBt8QJN_E9D9QcZVYRnW9qO_XRnqvmePE,5993
67
68
  flowcept/instrumentation/flowcept_torch.py,sha256=mH4sI2FMtBpGk4hN3U6MUwqd6sOPER8TbigUkexfhDY,23437
68
- flowcept/instrumentation/task_capture.py,sha256=fbTAhf4y69pRCpnaH8r0dczSmPyNINSpljMrVyUnp0U,4945
69
- resources/sample_settings.yaml,sha256=GOF08TCRd80Vl6LoftCLQaE9XsjR_MmM56S2zTG0wEU,4957
70
- flowcept-0.8.9.dist-info/METADATA,sha256=v_bTyskKfNq36sibkc4mgx9woxk3IH6WfJOhspvIxVU,18357
71
- flowcept-0.8.9.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
72
- flowcept-0.8.9.dist-info/licenses/LICENSE,sha256=r5-2P6tFTuRGWT5TiX32s1y0tnp4cIqBEC1QjTaXe2k,1086
73
- flowcept-0.8.9.dist-info/RECORD,,
69
+ flowcept/instrumentation/task_capture.py,sha256=bYL6ZricaGpkEu0vHIIldF0GERyZRCI31PpkuQH5jbc,4948
70
+ resources/sample_settings.yaml,sha256=luy3EDwgNMTgJIfMrz08ahRK52vXmazvbA-wF_Lgt7U,5812
71
+ flowcept-0.8.10.dist-info/METADATA,sha256=yxqHJsth888tg7cETFUogsas2QDjZjc3KBWrAL9julk,18426
72
+ flowcept-0.8.10.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
73
+ flowcept-0.8.10.dist-info/entry_points.txt,sha256=i8q67WE0201rVxYI2lyBtS52shvgl93x2Szp4q8zMlw,47
74
+ flowcept-0.8.10.dist-info/licenses/LICENSE,sha256=r5-2P6tFTuRGWT5TiX32s1y0tnp4cIqBEC1QjTaXe2k,1086
75
+ flowcept-0.8.10.dist-info/RECORD,,
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ flowcept = flowcept.cli:main
@@ -1,4 +1,4 @@
1
- flowcept_version: 0.8.9 # Version of the Flowcept package. This setting file is compatible with this version.
1
+ flowcept_version: 0.8.10 # 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.
@@ -25,7 +25,6 @@ telemetry_capture: # This toggles each individual type of telemetry capture. GPU
25
25
 
26
26
  instrumentation:
27
27
  enabled: true # This toggles data capture for instrumentation.
28
- singleton: true # Use a single instrumentation instance per process. Defaults to true
29
28
  torch:
30
29
  what: parent_and_children # Scope of instrumentation: "parent_only" -- will capture only at the main model level, "parent_and_children" -- will capture the inner layers, or ~ (disable).
31
30
  children_mode: telemetry_and_tensor_inspection # What to capture if parent_and_children is chosen in the scope. Possible values: "tensor_inspection" (i.e., tensor metadata), "telemetry", "telemetry_and_tensor_inspection"
@@ -49,7 +48,7 @@ mq:
49
48
  timing: false
50
49
  chunk_size: -1 # use 0 or -1 to disable this. Or simply omit this from the config file.
51
50
 
52
- kv_db:
51
+ kv_db: # You can optionally use KV == MQ if MQ is Redis. Otherwise, these will be the Redis instance credentials.
53
52
  host: localhost
54
53
  port: 6379
55
54
  # uri: use Redis connection uri here
@@ -59,9 +58,9 @@ web_server:
59
58
  port: 5000
60
59
 
61
60
  sys_metadata:
62
- environment_id: "laptop"
61
+ environment_id: "laptop" # We use this to keep track of the environment used to run an experiment. Typical values include the cluster name, but it can be anything that you think will help identify your experimentation environment.
63
62
 
64
- extra_metadata:
63
+ extra_metadata: # We use this to store any extra metadata you want to keep track of during an experiment.
65
64
  place_holder: ""
66
65
 
67
66
  analytics:
@@ -70,13 +69,11 @@ analytics:
70
69
  generated.accuracy: maximum_first
71
70
 
72
71
  db_buffer:
73
- adaptive_buffer_size: true
74
- insertion_buffer_time_secs: 5
75
- max_buffer_size: 50
76
- min_buffer_size: 10
77
- remove_empty_fields: false
78
- stop_max_trials: 240
79
- stop_trials_sleep: 0.01
72
+ insertion_buffer_time_secs: 5 # Time interval (in seconds) to buffer incoming records before flushing to the database
73
+ buffer_size: 50 # Maximum number of records to hold in the buffer before forcing a flush
74
+ remove_empty_fields: false # If true, fields with null/empty values will be removed before insertion
75
+ stop_max_trials: 240 # Maximum number of trials before giving up when waiting for a fully safe stop (i.e., all records have been inserted as expected).
76
+ stop_trials_sleep: 0.01 # Sleep duration (in seconds) between trials when waiting for a fully safe stop.
80
77
 
81
78
  databases:
82
79
 
@@ -89,7 +86,7 @@ databases:
89
86
  host: localhost
90
87
  port: 27017
91
88
  db: flowcept
92
- create_collection_index: true
89
+ create_collection_index: true # Whether flowcept should create collection indices if they haven't been created yet. This is done only at the Flowcept start up.
93
90
 
94
91
  adapters:
95
92
  # For each key below, you can have multiple instances. Like mlflow1, mlflow2; zambeze1, zambeze2. Use an empty dict, {}, if you won't use any adapter.