Skip to content

Ensemble Models #77

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

Draft
wants to merge 63 commits into
base: dev
Choose a base branch
from
Draft

Ensemble Models #77

wants to merge 63 commits into from

Conversation

aditya0by0
Copy link
Member

@aditya0by0 aditya0by0 commented Mar 17, 2025

@aditya0by0 aditya0by0 self-assigned this Mar 17, 2025
@aditya0by0 aditya0by0 linked an issue Mar 17, 2025 that may be closed by this pull request
- dummy param should be linked to loss to build gradient graph
- Error : element 0 of tensors does not require grad and does not have a grad_fn
@aditya0by0
Copy link
Member Author

aditya0by0 commented Mar 17, 2025

Test example config :

class_path: chebai.models.ensemble.ChebiEnsemble
init_args:
  optimizer_kwargs:
    lr: 1e-3
  model_configs: {
    "chebi50": {
      "ckpt_path": "logs/chebi50_bce_unweighted/version_9/checkpoints/best_epoch=00_val_loss=0.3521_val_macro-f1=0.0381_val_micro-f1=0.1753.ckpt",
      "class_path": chebai.models.Electra,
      "labels_path": "data/chebi_v231/ChEBI50/processed/classes.json",
    },

    "chebi50_1": {
      "ckpt_path": "logs/chebi50_bce_unweighted/version_9/checkpoints/best_epoch=00_val_loss=0.3521_val_macro-f1=0.0381_val_micro-f1=0.1753.ckpt",
      "class_path": chebai.models.Electra,
      "labels_path": "data/chebi_v231/ChEBI50/processed/classes.json",
    },
  }


@aditya0by0 aditya0by0 requested a review from sfluegel05 May 19, 2025 10:23
@aditya0by0
Copy link
Member Author

aditya0by0 commented May 19, 2025

Test config:

class_path: chebai.ensemble.FullEnsembleWMV
init_args:
  data_processed_dir_main: "data/chebi_v231/ChEBI50/processed"
  _perform_validation_checks: False  # To avoid check for using same model with same model configs
  model_configs: {
    "chebi50": {
      "model_ckpt_path": "logs/chebi50_bce_unweighted/version_9/checkpoints/best_epoch=00_val_loss=0.3521_val_macro-f1=0.0381_val_micro-f1=0.1753.ckpt",
      "model_class_path": chebai.models.Electra,
      "model_labels_path": "data/chebi_v231/ChEBI50/processed/classes.json",
      "reader_class_path": chebai.preprocessing.reader.ChemDataReader,
      "reader_kwargs": {},
      "wrapper_class_path": chebai.ensemble.NNWrapper
    },

    "chebi50_1": {
      "model_ckpt_path": "logs/chebi50_bce_unweighted/version_9/checkpoints/best_epoch=00_val_loss=0.3521_val_macro-f1=0.0381_val_micro-f1=0.1753.ckpt",
      "model_class_path": chebai.models.Electra,
      "model_labels_path": "data/chebi_v231/ChEBI50/processed/classes.json",
      "reader_class_path": chebai.preprocessing.reader.ChemDataReader,
      "reader_kwargs": {},
      "wrapper_class_path": chebai.ensemble.NNWrapper
    },
  }

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.

Add ensemble model
2 participants