This commit is contained in:
+4
-4
@@ -7,7 +7,7 @@ from dotenv import load_dotenv
|
||||
from torchinfo import summary
|
||||
|
||||
from model.src.models import VisualCommunicationModel
|
||||
from shared.datastore import connect_minio, put_model
|
||||
from shared.datastore import Datastore
|
||||
from shared.utils import setup_logging
|
||||
|
||||
DEVICE = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
||||
@@ -20,14 +20,14 @@ if __name__ == '__main__':
|
||||
# setup logging
|
||||
setup_logging()
|
||||
# connect to minio
|
||||
client = connect_minio()
|
||||
datastore = Datastore()
|
||||
datastore.connect()
|
||||
# instantiate model
|
||||
model = VisualCommunicationModel().to(DEVICE)
|
||||
# show model weights
|
||||
summary(model)
|
||||
# put buffer in minio bucket
|
||||
hash_str = put_model(
|
||||
client=client,
|
||||
hash_str = datastore.put_model(
|
||||
model=model,
|
||||
)
|
||||
print(f"hash string: {hash_str}")
|
||||
|
||||
Reference in New Issue
Block a user