Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ dependencies = [
"textual-serve==1.1.3",
"typeguard==2.13",
"pyperclip==1.11.0",
"torch==2.10.0",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"torch==2.10.0",

I would delete this. I could not find any issue with our dependencies testing locally. I believe issues with torch versions are more related to specific Nvidia Drivers versions rather than our deps, hence, leaving pip to automatically select the versions seems like the more appropriate and suitable way to go in order to be compatible with as much devices as possible.

]

[project.optional-dependencies]
Expand Down
6 changes: 3 additions & 3 deletions src/vulcanai/console/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,16 @@ class StreamToTextual:

def __init__(self, app, stream_name: str = "stdout"):
self.app = app
self.stream_name = stream_name

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
self.stream_name = stream_name
self.color = "red" if stream_name == "stderr" else ""

self.real_stream = getattr(sys, stream_name)

def write(self, data: str):
if not data:
return

if data.strip():
# Ensure update happens on the app thread
# self.app.call_from_thread(self.app.append_log_text, data)
self.app.call_from_thread(self.app.add_line, data)
color = "red" if self.stream_name == "stderr" else ""
self.app.call_from_thread(self.app.add_line, data, color)
Comment on lines +62 to +63

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
color = "red" if self.stream_name == "stderr" else ""
self.app.call_from_thread(self.app.add_line, data, color)
self.app.call_from_thread(self.app.add_line, data, self.color)

AI suggested to also pass self.app.call_from_thread(self.app.add_line, data, self.color, True) here to set subprocess_flag to True.


def flush(self):
self.real_stream.flush()
Expand Down
Loading