-
Notifications
You must be signed in to change notification settings - Fork 20
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
Feature/hybrid node #188
base: production
Are you sure you want to change the base?
Feature/hybrid node #188
Conversation
MahdiPresario001
commented
Dec 11, 2024
•
edited
Loading
edited
- renamed query_node to synthetic_node + removed organic queries bit from it
- renamed entry_node to organic_node + replace redis bit with the usage of the same functions used by synthetic_node
- moved those steaming/nonstreaming functions onto a new "common" folder, used by synth_node & organic_node
- added keypair loading via secret seed via env var
- exposed redis/psql ports in order to be able to reach from outside
if chat_request.stream: | ||
return StreamingResponse(generator, media_type="text/event-stream") | ||
else: | ||
return await _handle_nonstream_response(generator) |
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.
separate minimal functions like _handle_no_stream
and _handle_no_stream_comp
as in latest prod would be more appropriate for /v1/completions and /v1/chat/completions routes
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.
_handle_no_stream
and _handle_no_stream_comp
have a lot of the same code that's why i put it in one function directly
docker compose rm -f -v grafana |
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.
good catch
@@ -22,6 +23,8 @@ services: | |||
container_name: nineteen-otel-collector | |||
image: otel/opentelemetry-collector-contrib:0.106.1 | |||
restart: always | |||
ports: | |||
- "4317:4317" |
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.
why exactly is this required just to confirm? to connect organic node running outside docker network?
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.
yeah for organic nodes on render (redis too)
b7f8ace
to
b231ee8
Compare
|
||
logger = get_logger(__name__) | ||
|
||
def load_hotkey_keypair_from_seed(secret_seed: str) -> Keypair: |
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.
this is a util really
|
||
T = TypeVar("T", bound=BaseModel) | ||
|
||
load_dotenv() |
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.
isnt it .vali.env?
except Exception as e: | ||
raise ValueError(f"Failed to load keypair: {str(e)}") | ||
|
||
def create_redis_pool( |
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.
should be priv method
|
||
_config = None | ||
|
||
async def factory_config(): |
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.
dont need separate functions for this, one can do both jobs
choice = chunk_data["choices"][0] | ||
|
||
if first_chunk: | ||
if "delta" in choice: |
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.
loads of magic strings here which are very dangerous. Why?
Was this unchanged from before or all new? If new, how come?
…nx issues over network
cf2bdfb
to
dad8181
Compare