-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
There was a problem hiding this 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!
src/methods/geneformer/script.py
Outdated
output_prefix="classifier", | ||
) | ||
|
||
import datasets |
There was a problem hiding this comment.
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?
src/methods/geneformer/script.py
Outdated
classifier_fine_tuned_dir = os.path.join(work_dir.name, "classifier_fine_tuned") | ||
os.makedirs(classifier_fine_tuned_dir) |
There was a problem hiding this comment.
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?
src/methods/geneformer/script.py
Outdated
|
||
print('Generate predictions', flush=True) | ||
|
||
import pickle |
There was a problem hiding this comment.
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
src/methods/geneformer/script.py
Outdated
# 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", | ||
# ) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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:
Proposed changes are described in the CHANGELOG.md
CI Tests succeed and look good!