-
Notifications
You must be signed in to change notification settings - Fork 357
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
feat: pin experiments #4925
feat: pin experiments #4925
Conversation
✅ Deploy Preview for determined-ui ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for storybook-det ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
8ef6683
to
0bf305e
Compare
0bf305e
to
e34942b
Compare
6da648d
to
01cba6d
Compare
01cba6d
to
a2b457c
Compare
@@ -43,6 +43,23 @@ message GetExperimentResponse { | |||
|
|||
// Get a list of experiments. | |||
message GetExperimentsRequest { | |||
// filtering by experiment ids | |||
message ExperimentFilter { |
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.
I dont have good naming sense. Any better 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.
Looks cool so far, but needs some more polish and testing when it comes to table and pagination issues
@@ -43,6 +43,23 @@ message GetExperimentResponse { | |||
|
|||
// Get a list of experiments. | |||
message GetExperimentsRequest { | |||
// filtering by experiment ids | |||
message ExperimentFilter { |
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.
I have a question about REST API design here.
this ends up generating URLs like this: /api/v1/experiments?sortBy=SORT_BY_ID&orderBy=ORDER_BY_ASC&offset=0&limit=6&archived=false&projectId=104&experimentFilter.restriction=RESTRICTION_EXCLUDE&experimentFilter.experimentIds=125&experimentFilter.experimentIds=126&experimentFilter.experimentIds=34&experimentFilter.experimentIds=105
it's a bit verbose. some clients / systems sometimes have an upper limit on the URL length (at ~2k characters IIRC). this URL format spends 30+len(experiment_id)
characters per experiment, so it'd hit a limit at 66 experiments which doesn't sound unrealistic to me.
if you were building this REST API without the luggage of grpc-gateway and its enums, how would you want this API URL to look like?
one possible suggestion here is to do something like this: /api/v1/experiments?sortBy=SORT_BY_ID&orderBy=ORDER_BY_ASC&offset=0&limit=6&archived=false&projectId=104&experimentIds__in=125,126,34,105
, i.e. "lookup field" and "lookup operation" in a single query parameter, separated by double underscore.
- for "exclusion" it could look like
experimentIds__notin=125,126,34,105
- this provides a basis for other operations like
gte
for greater or equal,lt
for less than, etc. allowing a generic search operations such as?experimentIds__lte=100&experimentIds__gt=50
for looking up50 < experiment id <= 100
, as an example.
we currently do not have examples of this approach implemented in the code but it may be worth investing in for the sake of good API.
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.
I originally wanted to have the one you suggested ids=1,2,3
.
Let me take a look at how REST API is generated
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.
In the documentation ,
All other fields are passed via the URL query parameters, and the parameter name is the field path in the request message. A repeated field can be represented as multiple query parameters under the same name.
We might not able to change the style of param query in generated REST API.
I'll search more but if we cant change it all we can do with repeated type is to use shorter variable name or use post as get but its not ideal.
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.
push comes to shove, it can be a string in proto that is split by ,
on server side.
abf4495
to
71651d9
Compare
71651d9
to
88e5abf
Compare
|
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.
Fix these last couple things and you should be good
Wait for the backend change to archive more complex filtering |
51d80bc
to
09db05e
Compare
09db05e
to
e599ab4
Compare
@@ -122,7 +107,7 @@ message GetExperimentsRequest { | |||
// projects. | |||
int32 project_id = 12; | |||
// filtering by experiment ids | |||
ExperimentFilter experiment_filter = 13; | |||
determined.common.v1.Int32FieldFilter experiment_filter = 13; |
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.
maybe rename experiment_id_filter
Description
DET-8135
Test Plan
Commentary (optional)
Checklist
docs/release-notes/
.See Release Note for details.
/webui/react/src/shared/
verifymake -C webui/react test-shared
passes.