Skip to content

Conversation

@Jaychaware
Copy link
Collaborator

Related Issues / Pull Requests

List all related issues and/or pull requests if there are any.

Description

Include a brief summary of the proposed changes.

What changes are proposed in this pull request?

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected; for instance,
    examples in this repository need to be updated too).
  • This change requires a documentation update.

Checklist:

  • My code follows the style guidelines of this project (PEP-8 with Google-style docstrings).
  • My code modifies existing public API, or introduces new public API, and I updated or wrote docstrings that
    uses Google-style formatting and any other formatting that is supported by mkdocs and plugins this project
    uses.
  • I have commented my code.
  • My code requires documentation updates, and I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.

@Jaychaware Jaychaware self-assigned this Aug 5, 2025

async getLabelsList() {
return this.apiClient
.get(`/api/labels/status`)
Copy link
Collaborator

Choose a reason for hiding this comment

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

we can't add 'api' here. it breaks the pattern of rest api we are using.


async searchLabelArtifacts(pipeline_name, content_filter, sort_order = "asc", active_page = 1, record_per_page = 5) {
return this.apiClient
.get(`/artifacts/${pipeline_name}/Label/search`, {
Copy link
Collaborator

Choose a reason for hiding this comment

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

make 'L' in the 'Label' small like 'label'

} else if (selectedPipeline === null && pipelines.length === 0) {
setLoading(false);
}
}, [selectedPipeline, pipelines.length]);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Explain why checking .length is necessary.

});
};

const fetchArtifacts = async (pipelineName, artifactType, sortOrder, activePage, filter="", selectedCol) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add appropriate comment for easy understanding. and colud you explain why async is used?

@app.get("/artifacts/{pipeline_name}/Label/search")
async def search_label_artifacts(
pipeline_name: str,
content_filter: str = Query(..., description="Search term to find in label content"),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Here you can use Pydantic model.


# Find all structured conditions
matches = cls.CONDITION_PATTERN.findall(query)
matched_positions = []
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why matched_position used?

raise HTTPException(status_code=500, detail=f"Error searching label artifacts: {str(e)}")


# api to display executions available in mlmd file[from postgres]
Copy link
Collaborator

Choose a reason for hiding this comment

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

There are two execution function.

raise HTTPException(status_code=500, detail=f"Reindexing failed: {str(e)}")

@app.get("/api/labels/status")
async def get_label_search_status(db: AsyncSession = Depends(get_db)):
Copy link
Collaborator

Choose a reason for hiding this comment

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

We need to understand where to use this api.

plain_terms=plain_terms if plain_terms else None,
conditions=conditions if conditions else None,
pipeline_name=pipeline_name,
limit=100
Copy link
Collaborator

Choose a reason for hiding this comment

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

What do we mean by limit 100 here?

if plain_terms:
# Only search properties if there are plain text terms
property_search_results = await fetch_artifacts(
db, pipeline_name, "Label", " ".join(plain_terms), 1, 1000, "name", sort_order
Copy link
Collaborator

Choose a reason for hiding this comment

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

As per my understanding 1 is active page and 1000 is record_per_page this is not correct as we want search to be performed on full data. not just on the current page. If plain _terms is true, it is essentially our existing functionality it should work same.

label_file = result.get('label_file', '')
if label_file:
# Remove file extension if present
clean_label_file = label_file.replace('.csv', '') if label_file.endswith('.csv') else label_file
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you explain why we are replacing file extension.

@varkha-d-sharma varkha-d-sharma self-assigned this Oct 23, 2025
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.

3 participants