Commit graph

22 commits

Author SHA1 Message Date
David Allada
bc1bef3324 FIx logs path 2025-04-22 21:14:45 -04:00
David Allada
d31d17e5a2 Trigger ruff formatting 2025-03-23 17:04:09 +00:00
David Allada
bcd3413628 Try to fix ruff format 2025-03-23 17:02:52 +00:00
David Allada
0256d3b2a2 Fix the comment from 10MB to 20MB 2025-03-23 16:51:47 +00:00
David Allada
6750c291db Add file based logging in addition to the normal console logs 2025-03-23 16:49:58 +00:00
kingbri
48bb78c614 Logger: Switch to ISO timestamp formatting
I thought this was previously enabled, but turns out I labeled with
the wrong date format.

Signed-off-by: kingbri <8082010+kingbri1@users.noreply.github.com>
2025-02-19 21:48:23 -05:00
kingbri
dcbf2de9e5 Logger: Add timestamps
Was against this for a while due to the length of timestamps clogging
the console, but it makes sense to know when something goes wrong.

Signed-off-by: kingbri <8082010+kingbri1@users.noreply.github.com>
2025-02-07 18:40:28 -05:00
kingbri
55ccd1baad API: Add HuggingFace downloader
Adds an asynchronous huggingface downloader that uses HF hub to fetch
all repo files. The current HF hub package has a snapshot_download
function that does not cancel on KeyboardInterrupt.

Instead, make a downloader that uses the Rich progress bar styling
along with a cancellable interface. Finally, link this to TabbyAPI.

Signed-off-by: kingbri <bdashore3@proton.me>
2024-04-29 01:15:02 -04:00
AlpinDale
1650e6e640 ruff 2024-04-01 23:11:30 +00:00
AlpinDale
5e599ddbd4 typo 2024-04-01 23:08:28 +00:00
AlpinDale
6c4a1a9c70 make log level a global var 2024-04-01 23:07:30 +00:00
AlpinDale
031349133b properly order imports 2024-04-01 23:03:16 +00:00
AlpinDale
e90ead3b35 chore: make log level configurable via env variable 2024-04-01 22:57:56 +00:00
kingbri
ba3da6d92f Logging: Escape rich markup sequences
Rich markup sequences inside the log string were causing issues
with printing. Fix this by using their escape function.

Signed-off-by: kingbri <bdashore3@proton.me>
2024-03-11 00:28:48 -04:00
kingbri
045262f51f Logging: Loglevel INFO
This is the max that Tabby should log because debug and trace aren't
used within the application.

Signed-off-by: kingbri <bdashore3@proton.me>
2024-03-10 17:44:19 -04:00
kingbri
6b4f100db2 Logger: Escape tags
Angle brackets should be escaped to avoid mistaken color formatting.

Signed-off-by: kingbri <bdashore3@proton.me>
2024-03-10 01:24:50 -05:00
kingbri
c77259bfbb Logger: Fix reformatting of message
Use the reformatted message when splitting lines instead of the
raw message to prevent exceptions.

Signed-off-by: kingbri <bdashore3@proton.me>
2024-03-09 15:40:37 -05:00
kingbri
4d09226364 Logging: Fix Uvicorn hook
The Uvicorn logging config wasn't being set. Fix that when creating
a new server.

Signed-off-by: kingbri <bdashore3@proton.me>
2024-03-08 17:56:48 -05:00
kingbri
c9b4b7c509 Tree: Format
Signed-off-by: kingbri <bdashore3@proton.me>
2024-03-08 01:00:48 -05:00
kingbri
ef2dc326f5 Logging: Fix inconsistent formatting
Some colorization was incorrect and the separator insertion has become
more robust.

Signed-off-by: kingbri <bdashore3@proton.me>
2024-03-08 01:00:48 -05:00
kingbri
228c227c1e Logging: Switch to loguru
Loguru is a flexible logger that allows for easier hooking and imports
into Rich with no problems. Also makes progress bars stick to the
bottom of the terminal window.

Signed-off-by: kingbri <bdashore3@proton.me>
2024-03-08 01:00:48 -05:00
kingbri
78f920eeda Tree: Refactor code organization
Move common functions into their own folder and refactor the backends
to use their own folder as well.

Also cleanup imports and alphabetize import statments themselves.

Finally, move colab and docker into their own folders as well.

Signed-off-by: kingbri <bdashore3@proton.me>
2024-01-25 00:15:40 -05:00
Renamed from logger.py (Browse further)