Open bitcometz opened 3 months ago
For which task is this ? I may try to help you with the annotation task.
First you should upload the datasets and pretrained models to a folder in your drive. Then, mount the drive to colab for path inserting. Then follow the below:
!pip install scgpt "flash-attn<1.0.5" (takes time)
!pip install wandb
import copy import gc import json import os from pathlib import Path import shutil import sys import time import traceback from typing import List, Tuple, Dict, Union, Optional import warnings import pandas as pd
import pickle import torch from anndata import AnnData import scanpy as sc import scvi import seaborn as sns import numpy as np import wandb from scipy.sparse import issparse import matplotlib.pyplot as plt from torch import nn from torch.nn import functional as F from torch.utils.data import Dataset, DataLoader from sklearn.model_selection import train_test_split from sklearn.metrics import adjusted_rand_score, normalized_mutual_info_score from torchtext.vocab import Vocab from torchtext._torchtext import ( Vocab as VocabPybind, ) from sklearn.metrics import confusion_matrix
sys.path.insert(0, "../") import scgpt as scg from scgpt.model import TransformerModel, AdversarialDiscriminator from scgpt.tokenizer import tokenize_and_pad_batch, random_mask_value from scgpt.loss import ( masked_mse_loss, masked_relative_error, criterion_neg_log_bernoulli, ) from scgpt.tokenizer.gene_tokenizer import GeneVocab from scgpt.preprocess import Preprocessor from scgpt import SubsetsBatchSampler from scgpt.utils import set_seed, category_str2int, eval_scib_metrics
sc.set_figure_params(figsize=(6, 6)) os.environ["KMP_WARNINGS"] = "off" warnings.filterwarnings('ignore')
This will probably work
@kocemir , thanks for your help!
Yes, I want to do the annotation task !
You are right that adding "flash-attn<1.0.5" takes really long time !!! I am using free colab GPU resources that I cannot finish the installation with adding flash-attn.
Best
hello, thanks for this great tool !!!
I follow the installation tutorial and got some errors:
Errors:
Could you help with this problem? Thanks !!!
Best