Replies: 10 comments
-
I see your point about not necessarily simply exposing all functionality in the server. The suggestion was actually my starting point -- I originally only had 2 endpoints: prediction and vector-search. I'm open to pivoting back to that. The point here is that the user might want to do everything with the system which they can do if the system were deployed locally. Putting such concerns aside, it is true that the only endpoint likely to be called from outside Python are exactly prediction and vector-search. I would also like to add support for adding models in a If, theoretically, the model of mapping everything to pydantic classes, were to be possible. Then it is at least open to us to decide exactly where to draw the line. However, if this is not possible, then exposing only a limited set of functionality is appealing. |
Beta Was this translation helpful? Give feedback.
-
(With the current API) But rather than focusing on the details, I think we should instead focus on use-cases first. As I mentioned in my first post, I am interested in two questions:
You touched on this a little with 'prediction' and 'vector-search'. Can you say more about these and other use-cases that you think will be absolutely crucial to |
Beta Was this translation helpful? Give feedback.
-
The plan is not to actually send back every binary blob. Large items, Artifacts, get replaced by a token into a store representing large items in memory or disk. You could then use that token to request further operations on the results of that blob without ever downloading it. If the final result were, say, some sort of summary or report, then there wouldn't be any significant traffic at all. Let's jump back a level though. In order to write a proper server, we need to make every single query and response JSONizable, through a typed "schema" too. On the other hand, if we had that perfect JSONization for all responses and queries, then writing a server would be more of a medium chore than a huge task. So when looking at the benefits, we need to include the benefits of a completely typed specification of a computation. The first one, which we have not yet considered, is auditability, repeatability and reuse. For a professional result, you can't just display your work, you need the provenance of the data, and you need other people to be able to replicate your work if necessary. If all of our interactions go through an entirely JSONizable interface, we can store an "executable" journal of all the operations we perform with the results. If files were immutable, and you (the user) were careful to preserve the exact installation of all the Python packages you had, and there was no dependency on unseeded randomness, or seeded randomness with race conditions between threads, or a dependency on the current time of course, or a bunch of other things didn't go wrong, you could even perhaps guarantee bit-for-bit reproducibility of certain artifacts. Auditability is much easier target to hit - immutable files and the journal of request/responses hits it perfectly. And the journal could be used in some TBD way to say, "Now do that operation on those things!" A secondary benefit is that it would be far easier to covert our program to run on multiple processes if all our commands were JSONizable. We wouldn't even have to have a REST server, we could just use python's This has two advantages: it allows someone to use all the cores on their machine, and also, our central program can be independent of any of the subprocesses and recover even if one of them SEGVs. |
Beta Was this translation helpful? Give feedback.
-
I think it's too early to jump into the implementation details. As I said in my last posts, first I think we need to address two questions:
You hinted at this several times in your post:
and
But I think we need to really spell out these issues by answering the two questions above. Once we have understood our use-cases then we can jump into the technical details.
This is exactly what It's so important that we clarify what our use-cases/needs for the server are before we jump into the implementation details so that we avoid re-implementing tooling. I would really like us to address the two questions above as clearly and thoroughly as possible, and then we can use the subsequent answers to guide us for the technical details. |
Beta Was this translation helpful? Give feedback.
-
If the
then having a single hardened endpoint will provide us with more control. We could then perform the operations which we perform locally (without a server) from the remote.
It will be easy to send requests to this server to "query" the data, without having everything installed.
|
Beta Was this translation helpful? Give feedback.
-
Proceeds of a slack huddle between @nenb and @blythed. A key application in e-Commerce:
Exactly how this is done, TBD. |
Beta Was this translation helpful? Give feedback.
-
Proceeds of an internal meeting including @nenb @rec @thejumpman2323 and @thgnw. We are interested in reducing scope. 1 possible approach to doing this, is to suggest that all endpoints, if to be implemented at all, should be pure JSON. For endpoints such as |
Beta Was this translation helpful? Give feedback.
-
@blythed I know I am getting really annoying here, but I really think that the first thing to do is to decide on the use-cases and the endpoints. We should first decide on what are the most important things that these endpoints need to do (eg a What are the key endpoints that we would like to provide, and what do we unlock by creating these endpoints? Look at the OpenAI API as an example. They have an What are the endpoints that we should be offering? Perhaps it's also helpful to think in terms of nouns, rather than verbs.
This! More of this please! We need a few more details from a user/AI domain knowledge perspective about why we need an |
Beta Was this translation helpful? Give feedback.
-
Use cases:
Proposed endpoints From this the endpoints I think we should have are:
|
Beta Was this translation helpful? Give feedback.
-
I feel obliged to remind: REST is "Representational State Transfer". URIs are "Universal Resource Identifiers". An endpoint is a URI, which is intended to be a resource - a noun. Now I've discharged my duties, I have no problem with this at all. :-D Except that now I have used this system for a while, I'm actually strongly against the I think each endpoint should be completely independent of each other endpoint. This means for example, it's easy to deploy experimental servers with new or changed endpoints, or even to turn an endpoint on and off dynamically if we cared to. But It should be abolished. |
Beta Was this translation helpful? Give feedback.
-
I'm starting this discussion by posting a discussion which happened in slack for completeness. The aim is to gather ideas around how to proceed with plans for a server (-client) implementation using FastAPI and potentially
asyncio
.@nenb wrote:
Consider the following 2 users:
User 1 - Python user
superduperdb
on their client.dask
server directly.User 2 - Non-Python user
superduperdb
.Component
in Javascript world (someone would need to define this), and it is not clear how exactly Javascript objects would be added to the database.Rather than jumping into the technical details straight away, I would like to understand a little more about the vision of what we are trying to offer. What are we trying to enable for i) Python users with a server and for ii) non-Python users in general ie if I am a Javascript user, why should I consider
superduperdb
?I don't know the best way to do this, but I am very open to suggestions. I really do think a little time reflecting on these endpoints will save us a lot of time when it comes to implementation etc.
Beta Was this translation helpful? Give feedback.
All reactions