Skip to content

Commit

Permalink
refactor: Add type check for fastq_path and data_path
Browse files Browse the repository at this point in the history
  • Loading branch information
cauliyang committed Oct 13, 2024
1 parent 69837b4 commit 5fc1d3c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions deepchopper/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ def encode(
if verbose:
set_logging_level(logging.INFO)

if isinstance(fastq_path, str):
fastq_path = Path(fastq_path)

if not fastq_path.exists():
msg = f"Folder {fastq_path} does not exist."
logging.error(msg)
Expand Down Expand Up @@ -109,6 +112,9 @@ def predict(
if verbose:
set_logging_level(logging.INFO)

if isinstance(data_path, str):
data_path = Path(data_path)

tokenizer = deepchopper.models.llm.load_tokenizer_from_hyena_model(model_name="hyenadna-small-32k-seqlen")
datamodule: LightningDataModule = deepchopper.data.fq_datamodule.FqDataModule(
train_data_path="dummy.parquet",
Expand Down

0 comments on commit 5fc1d3c

Please sign in to comment.