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

Vlm match endpoint #4506

Merged
merged 28 commits into from
Dec 18, 2024
Merged

Vlm match endpoint #4506

merged 28 commits into from
Dec 18, 2024

Conversation

hanars
Copy link
Collaborator

@hanars hanars commented Dec 2, 2024

Adds the main matc endpoint for the VLM

Note: this can not be merged until VLM is disabled in dev/ we get compliance sign off to release this publicly

@hanars hanars requested review from bpblanken and jklugherz December 2, 2024 19:46

def _parse_match_query(query: dict) -> tuple[str, int, str, str, str]:
missing_params = [key for key in QUERY_PARAMS if key not in query]
if missing_params:
Copy link
Collaborator

Choose a reason for hiding this comment

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

If there's not a huge rush on getting this in, now might be a good time to explore pydantic validation.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Theres not a rush to get this specific code out, but I have other things on my plate that I think are higher priority for me. So its less about getting this code released and more about freeing up my time for other feature work

spark_conf = {}
# memory limits adapted from https://github.com/hail-is/hail/blob/main/hail/python/hailtop/hailctl/dataproc/start.py#L321C17-L321C36
if MACHINE_MEM:
spark_conf['spark.driver.memory'] = f'{int((int(MACHINE_MEM) - 11) * JVM_MEMORY_FRACTION)}g'
Copy link
Contributor

Choose a reason for hiding this comment

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

The code to build spark_conf here looks identical to how it's done in the hail_search web_app, can this be put in a helper function somewhere?

Copy link
Collaborator Author

@hanars hanars Dec 18, 2024

Choose a reason for hiding this comment

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

So ideally yes. However, the docker builds for hail_search and the vlm each only include the single directory for their respective apps, and then the unit tests and releases are only triggered on change to those specific directories. Creating a shared directory that is included in the build for both apps and then updating the github triggers to include the additional shared directory is possible, but it seemed like more work than it was worth to avoid this relatively small amount of copy-paste. However, if you and/or @bpblanken feel like its worth doing than I can do so. However, in the interest of keeping scope sane I would recommend that this gets merged first and then I do the shared code move in a subsequent PR

Copy link
Contributor

Choose a reason for hiding this comment

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

Considering the amount of work it would take to make this code shared, I think it's fine if it's duplicated.

coverage run --source="./vlm" --omit="./vlm/__main__.py" -m pytest vlm/
coverage report --fail-under=90
coverage report --fail-under=95
Copy link
Contributor

Choose a reason for hiding this comment

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

😎

@hanars hanars merged commit d598c52 into dev Dec 18, 2024
5 checks passed
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