-
Notifications
You must be signed in to change notification settings - Fork 83
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
support windows #356
support windows #356
Conversation
lazyllm/tools/rag/rerank.py
Outdated
def __new__(cls, name: str = "ModuleReranker", *args, **kwargs): | ||
assert name in cls.registered_reranker, f"Reranker: {name} is not registered, please register first." | ||
item = cls.registered_reranker[name] | ||
def __new__(cls, name: Optional[Union[Callable, str]] = "ModuleReranker", *args, **kwargs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个Callable是给到model参数,不是给到name参数
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reranker(name='ModuleReranker', model=TrainableModule(xxx))
lazyllm/tools/rag/rerank.py
Outdated
assert name in cls.registered_reranker, f"Reranker: {name} is not registered, please register first." | ||
item = cls.registered_reranker[name] | ||
else: | ||
item = cls.registered_reranker["ModuleReranker"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个改回去
lazyllm/tools/rag/rerank.py
Outdated
output_format: Optional[str] = None, join: Union[bool, str] = False, **kwargs) -> None: | ||
super().__init__() | ||
self._name = name | ||
self._name = name if isinstance(name, str) else "ModuleReranker" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个也改回去
5e4aa0a
to
9063580
Compare
9063580
to
93139ad
Compare
No description provided.