mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-08-09 04:57:44 +00:00
CI checks that can be automatically repaired (#119)
* fix isort & black & toml-sort & sphinx error * fix ci error * fix ci error * add comments * Update Makefile * change sphinx build command * add auto-lint * add black args * format with black * Auto Linting document * fix ci error --------- Co-authored-by: you-n-g <you-n-g@users.noreply.github.com> Co-authored-by: Young <afe.young@gmail.com>
This commit is contained in:
+8
-4
@@ -2,19 +2,22 @@ from __future__ import annotations
|
||||
|
||||
from abc import abstractmethod
|
||||
from collections.abc import Generator
|
||||
from dataclasses import dataclass
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
from typing import Literal, Optional, Union, Literal
|
||||
from dataclasses import dataclass
|
||||
from typing import Literal, Optional, Union
|
||||
|
||||
|
||||
@dataclass
|
||||
class Message:
|
||||
"""The info unit of the storage"""
|
||||
|
||||
tag: str # namespace like like a.b.c
|
||||
level: Literal["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"] # The level of the logging
|
||||
timestamp: datetime # The time when the message is generated
|
||||
caller: Optional[str] # The caller of the logging like `rdagent.oai.llm_utils:_create_chat_completion_inner_function:55`(file:func:line)
|
||||
caller: Optional[
|
||||
str
|
||||
] # The caller of the logging like `rdagent.oai.llm_utils:_create_chat_completion_inner_function:55`(file:func:line)
|
||||
pid_trace: Optional[str] # The process id trace; A-B-C represents A create B, B create C
|
||||
content: object # The content
|
||||
|
||||
@@ -39,7 +42,8 @@ class Storage:
|
||||
@abstractmethod
|
||||
def log(
|
||||
self,
|
||||
obj: object, name: str = "",
|
||||
obj: object,
|
||||
name: str = "",
|
||||
save_type: Literal["json", "text", "pkl"] = "text",
|
||||
timestamp: datetime | None = None,
|
||||
**kwargs: dict,
|
||||
|
||||
Reference in New Issue
Block a user