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

Added list collections api #154

Merged
merged 10 commits into from May 16, 2024
Merged

Added list collections api #154

merged 10 commits into from May 16, 2024

Conversation

S1LV3RJ1NX
Copy link
Collaborator

No description provided.

@@ -201,6 +201,10 @@ def get_collections(self) -> List[Collection]:
collection = Collection.parse_obj(self._get_entity_from_run(run=ml_run))
collections.append(self._polulate_collection(collection))
logger.debug(f"[Metadata Store] Listed {len(collections)} collections")
end = time.time()
print(
Copy link
Contributor

Choose a reason for hiding this comment

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

should we remove this now?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

"type": run_params.get("data_source_fqn").split("::")[0],
"uri": run_params.get("data_source_fqn").split("::")[1],
"fqn": run_params.get("data_source_fqn"),
"metadata": run_params.get("metadata", {}),
Copy link
Contributor

Choose a reason for hiding this comment

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

this metadata field will never be presend, so you can remove that

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done.

@@ -9,13 +9,11 @@


@router.get("/")
def list_data_source():
async def list_data_source():
Copy link
Contributor

Choose a reason for hiding this comment

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

you will need complete details api too

Copy link
Contributor

Choose a reason for hiding this comment

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

So, better expose this as new api

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

@@ -35,6 +35,16 @@ def get_collections():
raise HTTPException(status_code=500, detail=str(exp))


@router.get("/list-collections")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
@router.get("/list-collections")
@router.get("/list")

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done.

@akashg3627 akashg3627 merged commit a8e76a3 into main May 16, 2024
@akashg3627 akashg3627 deleted the collections-api-optimize branch May 16, 2024 08:57
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.

None yet

2 participants