Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add cli event handler #256

Merged
merged 57 commits into from
Jan 16, 2025
Merged
Changes from 1 commit
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
345e337
Feat: CLI trace handler basic
kzamlynska Dec 16, 2024
691dc71
reformat files
kzamlynska Dec 17, 2024
a9167bf
reformat files
kzamlynska Dec 17, 2024
11f8f1b
add typing and doc strings
kzamlynska Dec 17, 2024
d04d8e9
add typing and doc strings
kzamlynska Dec 17, 2024
4b7931e
add typing and doc strings
kzamlynska Dec 17, 2024
56d9e17
add typing and doc strings
kzamlynska Dec 17, 2024
773edf0
pre commit checks corrections
kzamlynska Dec 17, 2024
99c8045
pre commit checks corrections
kzamlynska Dec 17, 2024
766c036
pre commit checks corrections
kzamlynska Dec 17, 2024
aa73c6a
pre commit checks corrections
kzamlynska Dec 17, 2024
d8f6dab
print inputs/outputs with trace tree
kzamlynska Dec 18, 2024
0a64ac9
print inputs/outputs with trace tree
kzamlynska Dec 18, 2024
4f85b6a
rename and refactor according to review tips
kzamlynska Dec 18, 2024
a2b3821
Feat: CLI trace handler basic
kzamlynska Dec 16, 2024
eea3984
reformat files
kzamlynska Dec 17, 2024
5324f8f
reformat files
kzamlynska Dec 17, 2024
3da2dac
add typing and doc strings
kzamlynska Dec 17, 2024
c4a653e
add typing and doc strings
kzamlynska Dec 17, 2024
7bb3a62
add typing and doc strings
kzamlynska Dec 17, 2024
ca5ac89
add typing and doc strings
kzamlynska Dec 17, 2024
60978ac
pre commit checks corrections
kzamlynska Dec 17, 2024
8b9bdf1
pre commit checks corrections
kzamlynska Dec 17, 2024
6d4dff8
pre commit checks corrections
kzamlynska Dec 17, 2024
ef0dff2
pre commit checks corrections
kzamlynska Dec 17, 2024
b0484f8
print inputs/outputs with trace tree
kzamlynska Dec 18, 2024
0e353a0
print inputs/outputs with trace tree
kzamlynska Dec 18, 2024
de571ff
rename and refactor according to review tips
kzamlynska Dec 18, 2024
8b62a6a
Merge remote-tracking branch 'origin/226-cli-event-handler' into 226-…
kzamlynska Dec 19, 2024
39b8fc5
verbose in cmd
kzamlynska Dec 19, 2024
4947470
set handler in ragbits_cli
kzamlynska Dec 19, 2024
76ef33c
read verbose from env variables
kzamlynska Dec 19, 2024
723e86e
Merge branch 'main' into 226-cli-event-handler
kzamlynska Dec 19, 2024
dc5164a
deleted info verbose disabled for test sake
kzamlynska Dec 19, 2024
4ca2cef
Merge remote-tracking branch 'origin/226-cli-event-handler' into 226-…
kzamlynska Dec 19, 2024
358bf6c
set tracer from env variable in core init
kzamlynska Dec 20, 2024
fffb878
print input ouput to console improved
kzamlynska Dec 23, 2024
66fdaf6
check the existance of handler instance
kzamlynska Dec 23, 2024
a3df4eb
remove not needed comment
kzamlynska Dec 23, 2024
489359f
enum classes and live tree printing
kzamlynska Dec 27, 2024
011d1c8
bug fix
kzamlynska Dec 27, 2024
141aadf
Merge branch 'main' into 226-cli-event-handler
kzamlynska Dec 27, 2024
13d0b98
embeddings back to outputs
kzamlynska Dec 27, 2024
c9fdc31
Merge branch 'main' into 226-cli-event-handler
kzamlynska Jan 10, 2025
6481a80
pre commit formatting and review corrections
kzamlynska Jan 10, 2025
6fd5a22
unit tests for client trace handler
kzamlynska Jan 10, 2025
c51232d
Merge branch 'main' into 226-cli-event-handler
kzamlynska Jan 14, 2025
5d2eabe
tests for client trace handler
kzamlynska Jan 14, 2025
4d26be6
Merge remote-tracking branch 'origin/226-cli-event-handler' into 226-…
kzamlynska Jan 14, 2025
7283174
fix: clear audit handlers after test
mhordynski Jan 15, 2025
8f5f38c
fix
mhordynski Jan 15, 2025
f9d0b71
review: cli fixes (#273)
micpst Jan 15, 2025
492b964
tests for cli_trace_handler prints to the console
kzamlynska Jan 15, 2025
32eec98
change file name not to be the same as the library name
kzamlynska Jan 15, 2025
6b1d677
change file name not to be the same as the library name
kzamlynska Jan 15, 2025
03f42e2
colors name changed
kzamlynska Jan 15, 2025
9752414
fix formatting
micpst Jan 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add typing and doc strings
kzamlynska committed Dec 17, 2024
commit 56d9e17fcf7a943d1bef2c5359ed8def0f06066b
4 changes: 4 additions & 0 deletions packages/ragbits-core/src/ragbits/core/audit/cli_span.py
micpst marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@ def __init__(self, name: str, parent: Optional["CLISpan"] = None):
Constructs a new CLI Span.
Sets the start time of the span - the wall time at which the operation started.
Sets the span status to 'started'.

Args:
name: The name of the span.
parent: the parent of initiated span.
@@ -36,6 +37,7 @@ def end(self) -> None:
def to_dict(self) -> dict:
micpst marked this conversation as resolved.
Show resolved Hide resolved
"""
Convert the CLISpan object and its children into a dictionary representation.

Returns:
dict: A dictionary containing the span's name, start time, end time, events,
and a list of its children's dictionary representations.
@@ -51,10 +53,12 @@ def to_dict(self) -> dict:
def to_tree(self, tree: Tree = None, color: str = None) -> Tree:
"""
Convert theCLISpan object and its children into a Rich Tree structure for console rendering.

Args:
tree (Tree, optional): An existing Rich Tree object to which the span will be added.
If None, a new tree is created for the root span.
color (str, optional): The color of the text rendered to console.

Returns:
Tree: A Rich Tree object representing the span hierarchy, including its events and children.
"""
1 change: 0 additions & 1 deletion packages/ragbits-core/src/ragbits/core/audit/cli_tracer.py
micpst marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -45,7 +45,6 @@ def stop(self, outputs: dict, current_span: CLISpan) -> None:
outputs: The output data.
current_span: The current trace span.
"""

current_span.end()
current_span.status = "done"