Skip to content

#53: Added REST API calls for experiments/search (Layer 1)#54

Merged
ckunki merged 37 commits into
mainfrom
feature/53-Added_REST_API_calls_for_experiments_search_(Layer_1)
May 22, 2026
Merged

#53: Added REST API calls for experiments/search (Layer 1)#54
ckunki merged 37 commits into
mainfrom
feature/53-Added_REST_API_calls_for_experiments_search_(Layer_1)

Conversation

@ckunki

@ckunki ckunki commented May 19, 2026

Copy link
Copy Markdown
Collaborator

Closes #53
Closes #55

@ckunki ckunki temporarily deployed to manual-approval May 19, 2026 15:45 — with GitHub Actions Inactive
@ckunki ckunki temporarily deployed to manual-approval May 19, 2026 15:54 — with GitHub Actions Inactive
@ckunki ckunki temporarily deployed to manual-approval May 19, 2026 15:59 — with GitHub Actions Inactive
Comment thread exasol/mlflow_plugin/rest_api/rest_api.py Fixed
"""

def __init__(self, base_uri: str, params: JsonObject):
super().__init__(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Recommendation don't use inheritance, use composition, usually better to unit test

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

See latest push for an improved version.

yield from data
return
yield from (
el | {"tag_key": tag["key"], "tag_value": tag["value"]}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think, it is not a good idea to hardcode this behavior. I think, it would be better if you can give a column a post postprocessor. The only thing, this function should do is multiply out processed columns that return multiple rows

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Great idea - this can be nice and generic!

I only think this will require some additional logic, changes, and maybe tests.
Could we move this to a follow-up PR?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I merged the changes related to #55 into the current PR.

@ckunki ckunki temporarily deployed to manual-approval May 19, 2026 16:57 — with GitHub Actions Inactive
@ckunki ckunki temporarily deployed to manual-approval May 20, 2026 06:41 — with GitHub Actions Inactive
@ckunki ckunki temporarily deployed to manual-approval May 20, 2026 07:40 — with GitHub Actions Inactive
@ckunki ckunki temporarily deployed to manual-approval May 20, 2026 08:45 — with GitHub Actions Inactive
@ckunki ckunki temporarily deployed to manual-approval May 20, 2026 08:52 — with GitHub Actions Inactive
@ckunki ckunki temporarily deployed to manual-approval May 20, 2026 12:36 — with GitHub Actions Inactive
@ckunki ckunki temporarily deployed to manual-approval May 20, 2026 12:37 — with GitHub Actions Inactive
@ckunki ckunki temporarily deployed to manual-approval May 20, 2026 12:49 — with GitHub Actions Inactive
@ckunki ckunki temporarily deployed to manual-approval May 20, 2026 13:52 — with GitHub Actions Inactive
self.has_tags = has_tags
self.columns = columns + self.TAG_COLUMNS if has_tags else columns

def _expand(self, data: Iterable[JsonObject]) -> Iterable[JsonObject]:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

To be honest, I would declare what to expend in the column and have a general approach for unnesting.

@ckunki ckunki May 21, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This seems to constantly itch you 🙂

There is another ticket: #55 and an upcoming PR.
Should I include it into the current PR?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I merged the changes related to #55 into the current PR.

@ckunki ckunki temporarily deployed to manual-approval May 21, 2026 08:38 — with GitHub Actions Inactive
@ckunki ckunki temporarily deployed to manual-approval May 21, 2026 09:03 — with GitHub Actions Inactive
@ckunki ckunki temporarily deployed to manual-approval May 21, 2026 09:34 — with GitHub Actions Inactive
@ckunki ckunki temporarily deployed to manual-approval May 21, 2026 09:39 — with GitHub Actions Inactive
@ckunki ckunki temporarily deployed to manual-approval May 21, 2026 09:45 — with GitHub Actions Inactive
@ckunki ckunki requested a review from tkilias May 21, 2026 13:37
Comment on lines +20 to +22
def __init__(self, source: str, columns: list[Column]):
self.source = source
self.columns = columns

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

names of source and columns don't really help with the understanding.

source is the name of the nested column to expand
columns is the list of sub columns to include into the expansion

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I will rename in the next push

  • source -> input_key
  • columns -> output_columns

return (
d | additional_columns(tag)
for d in data
for tag in d.get(self.source, self._default)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

the name tag is not really helping; maybe element instead

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Ah - thanks.
This comes from generalizing a specific solution. 🙂

Comment thread exasol/mlflow_plugin/rest_api/expanding.py Outdated
Comment on lines +15 to +16
width: int,
sql_name: str = "",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

for what exaclty is this

Comment thread test/unit/rest_api/test_processing.py Outdated
{"key": "K2", "value": "V2"},
]
input: list[JsonObject] = [{"c1": 1, "tags": tags}, {"c1": 2}]
assert list(testee.process(input)) == [

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

assign the list(testee.process(input)) to a variable; otherwise, the diffs get complicated

@ckunki ckunki temporarily deployed to manual-approval May 21, 2026 15:11 — with GitHub Actions Inactive
@ckunki ckunki temporarily deployed to manual-approval May 21, 2026 15:17 — with GitHub Actions Inactive
@ckunki ckunki temporarily deployed to manual-approval May 21, 2026 15:22 — with GitHub Actions Inactive
@ckunki ckunki temporarily deployed to manual-approval May 21, 2026 15:23 — with GitHub Actions Inactive
@sonarqubecloud

Copy link
Copy Markdown

@ckunki ckunki merged commit ae613fd into main May 22, 2026
42 of 44 checks passed
@ckunki ckunki deleted the feature/53-Added_REST_API_calls_for_experiments_search_(Layer_1) branch May 22, 2026 10:16
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.

Generic expansion of nested columns, e.g. tags REST API: experiments/search (Layer 1)

3 participants