Skip to content

Commit

Permalink
refactor: moved inference to prediction module for use across projects
Browse files Browse the repository at this point in the history
  • Loading branch information
danellecline committed Jan 9, 2025
1 parent 0679e1f commit c1bc5fd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# aipipeline, Apache-2.0 license
# Filename: projects/bio/model/inference.py
# Description: Base class for detection models
# Filename: prediction/inference.py
# Description: model inference classes for projects
import glob
import logging
import time
import uuid
from datetime import datetime
from typing import List, Dict, Any
from typing import List, Any

import numpy as np
import requests
Expand All @@ -27,7 +26,7 @@
logger.setLevel(logging.INFO)
# and log to file
now = datetime.now()
log_filename = f"bio_model_{now:%Y%m%d}.log"
log_filename = f"inference_{now:%Y%m%d}.log"
handler = logging.FileHandler(log_filename, mode="w")
handler.setFormatter(formatter)
handler.setLevel(logging.DEBUG)
Expand Down
10 changes: 6 additions & 4 deletions aipipeline/projects/bio/process.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import logging
import os
# aipipeline, Apache-2.0 license
# Filename: projects/bio/process.py
# Description: Compute stats for downloaded datasets and save to a csv file
from datetime import datetime

import dotenv
import logging
import os
import redis

from biotrack.tracker import BioTracker
Expand All @@ -15,7 +17,7 @@

from aipipeline.projects.bio.core.predict import Predictor
from aipipeline.projects.bio.core.video import VideoSource
from aipipeline.projects.bio.model.inference import FastAPIYV5, YV5
from aipipeline.prediction.inference import FastAPIYV5, YV5

# Global variables
idv = 1 # video index
Expand Down

0 comments on commit c1bc5fd

Please sign in to comment.