This commit is contained in:
@@ -4,7 +4,7 @@ from pathlib import Path
|
|||||||
|
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
|
|
||||||
from shared.data_store import connect_minio
|
from shared.datastore import connect_minio
|
||||||
from shared.mongodb import connect_mongodb
|
from shared.mongodb import connect_mongodb
|
||||||
from shared.mongodb.classes import VisualCommunication
|
from shared.mongodb.classes import VisualCommunication
|
||||||
from shared.utils import check_env, setup_logging
|
from shared.utils import check_env, setup_logging
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ from pathlib import Path
|
|||||||
|
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
|
|
||||||
from shared.data_store import connect_minio
|
from shared.datastore import connect_minio
|
||||||
from shared.mongodb import connect_mongodb, get_visual_communication
|
from shared.mongodb import connect_mongodb, get_visual_communication
|
||||||
from shared.utils import check_env, setup_logging
|
from shared.utils import check_env, setup_logging
|
||||||
from web_ui.src.main import NECESSARY_ENV_VAR_LIST
|
from web_ui.src.main import NECESSARY_ENV_VAR_LIST
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ from pathlib import Path
|
|||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
from pymongo.errors import DuplicateKeyError
|
from pymongo.errors import DuplicateKeyError
|
||||||
|
|
||||||
from shared.data_store import connect_minio
|
from shared.datastore import connect_minio
|
||||||
from shared.mongodb import connect_mongodb
|
from shared.mongodb import connect_mongodb
|
||||||
from shared.mongodb.classes import VisualCommunication
|
from shared.mongodb.classes import VisualCommunication
|
||||||
from shared.utils import check_env, setup_logging
|
from shared.utils import check_env, setup_logging
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ from pathlib import Path
|
|||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
from pymongo.errors import DuplicateKeyError
|
from pymongo.errors import DuplicateKeyError
|
||||||
|
|
||||||
from shared.data_store import connect_minio
|
from shared.datastore import connect_minio
|
||||||
from shared.mongodb import connect_mongodb
|
from shared.mongodb import connect_mongodb
|
||||||
from shared.mongodb.classes import VisualCommunication
|
from shared.mongodb.classes import VisualCommunication
|
||||||
from shared.utils import check_env, setup_logging
|
from shared.utils import check_env, setup_logging
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@ from dotenv import load_dotenv
|
|||||||
from torchinfo import summary
|
from torchinfo import summary
|
||||||
|
|
||||||
from model.src.models import VisualCommunicationModel
|
from model.src.models import VisualCommunicationModel
|
||||||
from shared.data_store import connect_minio, put_model
|
from shared.datastore import connect_minio, put_model
|
||||||
from shared.utils import setup_logging
|
from shared.utils import setup_logging
|
||||||
|
|
||||||
DEVICE = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
DEVICE = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ from dotenv import load_dotenv
|
|||||||
from torchinfo import summary
|
from torchinfo import summary
|
||||||
|
|
||||||
from model.src.models import VisualCommunicationModel
|
from model.src.models import VisualCommunicationModel
|
||||||
from shared.data_store import connect_minio, put_model
|
from shared.datastore import connect_minio, put_model
|
||||||
from shared.utils import setup_logging
|
from shared.utils import setup_logging
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ from pathlib import Path
|
|||||||
|
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
|
|
||||||
from shared.data_store import connect_minio
|
from shared.datastore import connect_minio
|
||||||
from shared.mongodb import connect_mongodb, upsert_prediction
|
from shared.mongodb import connect_mongodb, upsert_prediction
|
||||||
from shared.mongodb.classes import VisualCommunication
|
from shared.mongodb.classes import VisualCommunication
|
||||||
from shared.utils import check_env, setup_logging
|
from shared.utils import check_env, setup_logging
|
||||||
|
|||||||
+1
-1
@@ -9,7 +9,7 @@ from models import VisualCommunicationModel
|
|||||||
from tqdm import tqdm
|
from tqdm import tqdm
|
||||||
from utils import DEVICE, VCDADataset, load_model
|
from utils import DEVICE, VCDADataset, load_model
|
||||||
|
|
||||||
from shared.data_store import connect_minio
|
from shared.datastore import connect_minio
|
||||||
from shared.mongodb.classes import ModelData
|
from shared.mongodb.classes import ModelData
|
||||||
from shared.utils import setup_logging
|
from shared.utils import setup_logging
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import torch
|
|||||||
from minio import Minio
|
from minio import Minio
|
||||||
|
|
||||||
from model.src.models import VisualCommunicationModel
|
from model.src.models import VisualCommunicationModel
|
||||||
from shared.data_store import get_model
|
from shared.datastore import get_model
|
||||||
|
|
||||||
from .get_model_name import get_model_name
|
from .get_model_name import get_model_name
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ from torchvision.transforms.functional import (
|
|||||||
to_tensor,
|
to_tensor,
|
||||||
)
|
)
|
||||||
|
|
||||||
from shared.data_store import get_image
|
from shared.datastore import get_image
|
||||||
|
|
||||||
# resnet18 original normalization values
|
# resnet18 original normalization values
|
||||||
RESNET_NORMALIZE_MEAN = [0.485, 0.456, 0.406]
|
RESNET_NORMALIZE_MEAN = [0.485, 0.456, 0.406]
|
||||||
|
|||||||
+1
-1
@@ -18,7 +18,7 @@ from torch.optim.lr_scheduler import ExponentialLR
|
|||||||
from torch.utils.data import DataLoader
|
from torch.utils.data import DataLoader
|
||||||
|
|
||||||
from model.src.utils import VCDADataset, get_class
|
from model.src.utils import VCDADataset, get_class
|
||||||
from shared.data_store import connect_minio
|
from shared.datastore import connect_minio
|
||||||
|
|
||||||
|
|
||||||
def parse_arguments():
|
def parse_arguments():
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ from pathlib import Path
|
|||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
from shared.data_store import connect_minio, get, put_image
|
from shared.datastore import connect_minio, get, put_image
|
||||||
from shared.utils import setup_logging
|
from shared.utils import setup_logging
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ from bson import ObjectId
|
|||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
from pymongo.collection import Collection
|
from pymongo.collection import Collection
|
||||||
|
|
||||||
from shared.data_store import connect_minio, put
|
from shared.datastore import connect_minio, put
|
||||||
from shared.mongodb import connect_mongodb
|
from shared.mongodb import connect_mongodb
|
||||||
from shared.mongodb.classes import VisualCommunication
|
from shared.mongodb.classes import VisualCommunication
|
||||||
from shared.utils import check_env, setup_logging
|
from shared.utils import check_env, setup_logging
|
||||||
|
|||||||
+1
-1
@@ -108,7 +108,7 @@ module = "utils.*"
|
|||||||
ignore_missing_imports = true
|
ignore_missing_imports = true
|
||||||
|
|
||||||
[[tool.mypy.overrides]]
|
[[tool.mypy.overrides]]
|
||||||
module = "data_store.*"
|
module = "datastore.*"
|
||||||
ignore_missing_imports = true
|
ignore_missing_imports = true
|
||||||
|
|
||||||
[[tool.mypy.overrides]]
|
[[tool.mypy.overrides]]
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ from PIL import Image
|
|||||||
from pydantic import BaseModel, ConfigDict
|
from pydantic import BaseModel, ConfigDict
|
||||||
from pymongo.collection import Collection
|
from pymongo.collection import Collection
|
||||||
|
|
||||||
from shared.data_store import get, put
|
from shared.datastore import get, put
|
||||||
from shared.mongodb.classes import ModelData
|
from shared.mongodb.classes import ModelData
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ from minio import Minio
|
|||||||
from pydantic import ValidationError
|
from pydantic import ValidationError
|
||||||
from pymongo.collection import Collection
|
from pymongo.collection import Collection
|
||||||
|
|
||||||
from shared.data_store import delete as delete_from_minio
|
from shared.datastore import delete as delete_from_minio
|
||||||
from shared.mongodb import count_documents, get_visual_communication, upsert_annotation
|
from shared.mongodb import count_documents, get_visual_communication, upsert_annotation
|
||||||
from shared.mongodb.classes import ModelData, VisualCommunication
|
from shared.mongodb.classes import ModelData, VisualCommunication
|
||||||
from shared.mongodb.exceptions import NoDocumentFoundException
|
from shared.mongodb.exceptions import NoDocumentFoundException
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ from __future__ import annotations
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from shared.data_store import connect_minio
|
from shared.datastore import connect_minio
|
||||||
from shared.mongodb import connect_mongodb
|
from shared.mongodb import connect_mongodb
|
||||||
from shared.utils import check_env, setup_logging
|
from shared.utils import check_env, setup_logging
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user