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

feat(JAQPOT-238): support not-pickled models #15

Merged
merged 21 commits into from
Sep 18, 2024

Conversation

vassilismin
Copy link
Contributor

This pr modifies jaqpotpy-inference to use not-pickled models

.gitignore Outdated Show resolved Hide resolved
src/helpers/json_to_predreq.py Outdated Show resolved Hide resolved
src/helpers/predict_methods.py Show resolved Hide resolved
src/helpers/predict_methods.py Outdated Show resolved Hide resolved
Comment on lines 14 to 16
featurizer_name = request.model['extraConfig']['featurizers'][0]['name']
featurizer_config = request.model['extraConfig']['featurizers'][0]['config']
featurizer = recreate_featurizer(featurizer_name, featurizer_config)
Copy link
Member

Choose a reason for hiding this comment

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

What if we have more than 1 featurizers?

Copy link
Member

Choose a reason for hiding this comment

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

On point comment. We should extend this functionality to be able to add as many featurizers as desired, if possible

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@periklis91 is it already supported in jaqpotpy dataset?

Copy link
Member

Choose a reason for hiding this comment

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

Even if it's not, a for here for a single featurizer would have the same effect as what you're doing, instead of hardcoding the [0]. Then if in the future we support it from jaqpotpy (if it's not already supported) then we don't have to go here and change the [0] to a for.

Copy link
Member

Choose a reason for hiding this comment

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

@vassilismin I cannot recall atm. Give me a few days to finish my current task and then I will switch to 100% jaqpotpy so I will see it then

Copy link
Member

Choose a reason for hiding this comment

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

if it already works with featurizers, why not make it already like this? 🤔

Copy link
Contributor Author

@vassilismin vassilismin Sep 18, 2024

Choose a reason for hiding this comment

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

JaqpotpyDataset, as it is right now, should take as featurizer an object of MolecularFeaturizer class. However, featurizers is a list that its unique object is a MolecularFeaturizer. So with featurizers[0] i parse the MolecularFeaturizer to JaqpotpyDataset, not a list. In next steps, we should modify JaqpotpyDataset to take a list of MolecularFeaturizer as input, to support multiple featurizers. Till then we need to parse the first object of the list

Copy link
Member

Choose a reason for hiding this comment

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

I am on it. I will starting working again on jaqpotpy tomorrow and it will be one of the first things that I will implement

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@periklis91 it's ok. Whenever JaqpotpyDataset is ready for multiple featurizers, we need to do this minor change in inference code

Copy link
Member

Choose a reason for hiding this comment

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

ok, sorry just to understand! add a # TODO so we don't forget it and leave it like this! Resolving the comment

vassilismin and others added 4 commits September 17, 2024 11:35
Added a for loop to recreate all requested featurizers. However, JaqpotpyDatast is not ready for getting a list of multiple featurizers. When we will add this feature in JqpotpyDataset, featurizers[0] will change to featurizers
Copy link
Member

@alarv alarv left a comment

Choose a reason for hiding this comment

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

Great work! LGTM!!

@vassilismin vassilismin merged commit ba75907 into main Sep 18, 2024
2 checks passed
@vassilismin vassilismin deleted the feat/JAQPOT-238/support_onnx_models branch September 18, 2024 09:51
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