Skip to content
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

We're going to need a UI of some kind #6

Open
Vectorrent opened this issue Oct 9, 2024 · 12 comments
Open

We're going to need a UI of some kind #6

Vectorrent opened this issue Oct 9, 2024 · 12 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Vectorrent
Copy link
Contributor

https://reactflow.dev/examples/overview

Not entirely sure what I want or what we're going to need, but we need to somehow allow the user to "wire-together" different experts, scattered across the swarm. The user's node is going to need to have an awareness of which peers it is connected to, as well as the peers that his peers are connected to. Somehow, we need to display the cyclical connections in the computation graph.

@Vectorrent Vectorrent added enhancement New feature or request help wanted Extra attention is needed labels Oct 9, 2024
@Vectorrent
Copy link
Contributor Author

I added a basic diagram to the web/ directory, and it will load at the local API automatically (default: http://localhost:2100). It doesn't do anything useful yet, though. I'm not sure how to integrate model data in a meaningful way.

@tearflake
Copy link

tearflake commented Oct 26, 2024

Does web interface need to be programmed in Python?

I can imagine doing server side Python tweaks to feed data to a Javascript UI interface for browsers. Does that seem acceptable?

@Vectorrent
Copy link
Contributor Author

Does web interface need to be programmed in Python?

No, but we will need to host the web server with something like Flask. This part already works, and can be accessed at http://localhost:2100 when you start the Praxis server.

I do have an idea of what I want it to look like now. Here's a simple example:
image

Basically, we have a controller that learns how to "route" through various experts/layers, at every forward pass. The end result is something like this:
image

So, if you can imagine a unique number assigned to every expert in the swarm - I want to draw the active-route through each expert, per-token, at every forward pass. The end result will look a bit like "synapses firing in the brain", though slower - because they will only change every ~3 seconds or so.

Anyway, I thought React Flow looked like a decent solution for this, so I set up a demo page in the web/ directory. I haven't done anything with this yet, mostly because I'm not familiar with React.

Also going to need some kind of chat interface, and configuration/settings management.

@Vectorrent
Copy link
Contributor Author

I can imagine doing server side Python tweaks to feed data to a Javascript UI interface for browsers. Does that seem acceptable?

Yes, this is acceptable and necessary. The Pytorch model will produce training metrics, configuration values, log messages, etc. We will need to pass all of that from the backend (Python) to the frontend (JavaScript/HTML/CSS).

@tearflake
Copy link

tearflake commented Oct 26, 2024

Can there be a hierarchy in that graph diagram you posted? And how many nodes are usually depicted?

@Vectorrent
Copy link
Contributor Author

Can there be a hierarchy in that graph diagram you posted?

Potentially? I'm sure that React Flow could represent a hierarchy of some sort, but I'm not sure how you're envisioning it would look. It would have to tie to the underlying data structures in some meaningful, interpretable way, IMO.

@tearflake
Copy link

Yes, it has to be interpretable.

I'm trying to fit the visualization idea in this direction:
socmedia_converted

Does this inspire you of anything?

@Vectorrent
Copy link
Contributor Author

Oooh, yeah, I can see the fractal hierarchy now. I could envision a world where you click on a node/expert, and "zoom in" to details about that particular layer, including its name, its hyperparameters, its owner, its IP address, its DHT address, your model's preference/confidence in that node's "expertise", etc. I could definitely see something like that being useful.

@tearflake
Copy link

I have a finished thing right now. Each node is represented by one HTML for circle contents, and one XML to connect it to child nodes. It is scalable, meaning it can host a gazillion nodes that can be constructed and fetched from server.

If you have idea on how to populate nodes, and if you can find it useful, I'm interested in helping out making this visualization.

We can also add other elements to the main window, in new frames, like chat between servers, or anything else, if you are interested.

@Vectorrent
Copy link
Contributor Author

Vectorrent commented Oct 26, 2024

I also had an idea: what if we gave each node depth?
image
This is especially interpretable here, because our whole architecture is made possible by a Mixture of Depths. Further, with depth as a visual element, we could easily represent physical features like magnitude, cosine similarity, semantic similarity, etc. It would be very cool.

I have a finished thing right now. Each node is represented by one HTML for circle contents, and one XML to connect it to child nodes. It is scalable, meaning it can host a gazillion nodes that can be constructed and fetched from server.

I would love to see an example of your thing. I think for now, just populate it with dummy data. We're too early in development to really build a consistent interface yet. There are too many changing variables still.

@tearflake
Copy link

tearflake commented Oct 26, 2024

Here, download this. The MIT licence for your purposes is included.

Unzip it to local server directory and open it in a browser. You will see meta instructions spanned through the tree, it should be all clear. Take look at the ./contents directory to see how the data is fetched. Let me know if you have any questions about it.

Take your time, think of something cool and what else could be added, and let me know how can I help. I'm looking forward to collaborate.

@Vectorrent
Copy link
Contributor Author

I have tentatively started work on a mobile app, which I'm calling "Axis". You can use Godot to open the project at axis.

While this is not a web app, per se - a Godot project can be exported to HTML. I'm not sure if we'll actually do that yet, or if we'll go in a different direction entirely. We may omit the web page entirely, in favor of a web API, exclusively (which already exists; it's how we interface with the Godot app).

@Vectorrent Vectorrent changed the title We're going to need a web UI of some kind We're going to need a UI of some kind Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
Status: No status
Development

No branches or pull requests

2 participants