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

Add geneformer #7

Merged
merged 8 commits into from
Jan 6, 2025
Merged

Add geneformer #7

merged 8 commits into from
Jan 6, 2025

Conversation

sainirmayi
Copy link
Contributor

@sainirmayi sainirmayi commented Dec 18, 2024

Describe your changes

Checklist before requesting a review

  • I have performed a self-review of my code

  • Check the correct box. Does this PR contain:

    • Breaking changes
    • New functionality
    • Major changes
    • Minor changes
    • Bug fixes
  • Proposed changes are described in the CHANGELOG.md

  • CI Tests succeed and look good!

Copy link
Contributor

@lazappi lazappi left a comment

Choose a reason for hiding this comment

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

Made some minor comments but otherwise looks good!

output_prefix="classifier",
)

import datasets
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this be moved with the other imports?

Comment on lines 168 to 169
classifier_fine_tuned_dir = os.path.join(work_dir.name, "classifier_fine_tuned")
os.makedirs(classifier_fine_tuned_dir)
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe do this with the other directories just so everything is in one place?


print('Generate predictions', flush=True)

import pickle
Copy link
Contributor

Choose a reason for hiding this comment

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

Also move this to the start of the file

Comment on lines 195 to 210
# cc_eval = Classifier(
# classifier="cell",
# cell_state_dict = {"state_key": "celltype", "states": "all"},
# nproc=n_processors,
# token_dictionary_file=dictionary_files["token"],
# num_crossval_splits=1,
# )

# all_metrics_test = cc_eval.evaluate_model(
# model=model,
# id_class_dict=id_class_dict,
# eval_data=test_data,
# num_classes=num_types,
# output_directory="classifier_predictions",
# output_prefix="predictions",
# )
Copy link
Contributor

Choose a reason for hiding this comment

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

This can be deleted if it's not needed

Copy link
Member

@rcannood rcannood left a comment

Choose a reason for hiding this comment

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

LGTM

@rcannood rcannood merged commit ec64db5 into main Jan 6, 2025
2 checks passed
@rcannood rcannood deleted the feature/no-ref/add-geneformer branch January 6, 2025 13:16
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