Merged
Conversation
Member
Author
|
@sfluegel05, Please review the PR
(gnn3) G:\github-aditya0by0\Chebifier\backend>flask run
Loading ChEBI graph from Hugging Face...
Using file `chebi_graph.pkl` from: C:\Users\HP\.cache\huggingface\hub\datasets--chebai--chebifier\snapshots\0e25de22a94f2b9c37b7e69965adb42431ee59e0\chebi_graph.pkl
Initialised Electra model ELECTRA (CHEBI50-v241) (device: cpu)
Initialised GNN model GraphConvNet (CHEBI50-v241) (device: cpu)
* Debug mode: off
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on http://127.0.0.1:5000
Press CTRL+C to quit
127.0.0.1 - - [02/Aug/2025 20:55:47] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [02/Aug/2025 20:55:49] "GET /static/css/main.e7c2b5e6.css HTTP/1.1" 200 -
127.0.0.1 - - [02/Aug/2025 20:55:54] "GET /static/js/main.4e6b9364.js HTTP/1.1" 200 -
127.0.0.1 - - [02/Aug/2025 20:55:56] "GET /api/hierarchy HTTP/1.1" 200 -
127.0.0.1 - - [02/Aug/2025 20:55:56] "GET /manifest.json HTTP/1.1" 200 -
127.0.0.1 - - [02/Aug/2025 20:55:57] "GET /favicon.ico HTTP/1.1" 200 -
127.0.0.1 - - [02/Aug/2025 20:55:57] "GET /logo192.png HTTP/1.1" 200 -
ELECTRA (CHEBI50-v241): 1it [00:04, 4.40s/it]
Model GraphConvNet (CHEBI50-v241) failed to parse a SMILES string at position 0: CC(=O)OC1=CC=CC=C1C(=O)O
Model GraphConvNet (CHEBI50-v241) failed to parse a SMILES string at position 1: C1=CC=C(C=C1)C(=O)O
Sorting predictions from 2 models...
Sorting predictions for ELECTRA (CHEBI50-v241): 100%|█████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 13.44it/s]
Sorting predictions for GraphConvNet (CHEBI50-v241): 100%|████████████████████████████████████████████████████████████████| 2/2 [00:00<?, ?it/s]
Calculated model weightings. The average weights are:
ELECTRA (CHEBI50-v241): 1.692
GraphConvNet (CHEBI50-v241): 1.709
Preds change (step 1): 5034.52734375
Preds change (step 3): -65.22756958007812
Prediction smoothing took 3.96 seconds
127.0.0.1 - - [02/Aug/2025 20:56:41] "POST /api/classify HTTP/1.1" 200 -
[Cache Hit] Prediction for smiles: CC(=O)OC1=CC=CC=C1C(=O)O and model: ELECTRA (CHEBI50-v241) are retrieved from cache.
[Cache Hit] Prediction for smiles: C1=CC=C(C=C1)C(=O)O and model: ELECTRA (CHEBI50-v241) are retrieved from cache.
ELECTRA (CHEBI50-v241): 1it [00:00, 4.16it/s]
Model GraphConvNet (CHEBI50-v241) failed to parse a SMILES string at position 0: CC(=O)OC1=CC=CC=C1C(=O)O
Model GraphConvNet (CHEBI50-v241) failed to parse a SMILES string at position 1: C1=CC=C(C=C1)C(=O)O
Model GraphConvNet (CHEBI50-v241) failed to parse a SMILES string at position 2: CC(=O)Oc1ccccc1C(O)=O
Sorting predictions from 2 models...
Sorting predictions for ELECTRA (CHEBI50-v241): 100%|█████████████████████████████████████████████████████████████| 3/3 [00:00<00:00, 25.93it/s]
Sorting predictions for GraphConvNet (CHEBI50-v241): 100%|████████████████████████████████████████████████████████████████| 3/3 [00:00<?, ?it/s]
Calculated model weightings. The average weights are:
ELECTRA (CHEBI50-v241): 1.692
GraphConvNet (CHEBI50-v241): 1.709
Preds change (step 1): 7547.70947265625
Preds change (step 3): -98.42237854003906
Prediction smoothing took 4.07 seconds
127.0.0.1 - - [02/Aug/2025 20:58:14] "POST /api/classify HTTP/1.1" 200 - |
Member
Author
|
Also, the cache's maxsize is 100 (as per previous default value). Please change the max_size if needed. |
sfluegel05
approved these changes
Aug 11, 2025
Contributor
sfluegel05
left a comment
There was a problem hiding this comment.
Looks great. I tested it with the chebifier frontend and it was able to cache smiles individually. I added the predict_smiles_list function for chemlog extra
aditya0by0
commented
Aug 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes ChEB-AI/chebifier-web#9