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

Context query subscript #791

Merged
merged 68 commits into from
Jan 23, 2024
Merged

Conversation

suprjinx
Copy link
Contributor

@suprjinx suprjinx commented Jan 5, 2024

add ability to use aim "context subscript" query eg "runs.metrics["metricname", {'key': 'value1'}]"

fixes #360

@suprjinx suprjinx marked this pull request as ready for review January 14, 2024 17:34
func (pq *parsedQuery) Filter(tx *gorm.DB) *gorm.DB {
for _, j := range pq.joins {
for _, k := range pq.joinKeys {
j := pq.joins[k]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could it be circumstance, when j := pq.joins[k] is nil?

Copy link
Contributor Author

@suprjinx suprjinx Jan 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i searched for all cases where we append to pq.joins to make sure this isn't possible (using pq.AddJoin ensures this). Added some error-level logging if joins[k] is nil.

pkg/api/aim/query/query.go Show resolved Hide resolved
@suprjinx suprjinx merged commit ad67e89 into G-Research:main Jan 23, 2024
17 checks passed
@suprjinx suprjinx deleted the context-query-subscript branch January 23, 2024 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Metric contexts: adapt the Aim SearchRuns endpoint to filter the query down based on the context
3 participants