Skip to content

Commit

Permalink
use importlib for version
Browse files Browse the repository at this point in the history
  • Loading branch information
jgreener64 committed Apr 17, 2024
1 parent 81154d8 commit b41e461
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions progres/progres.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
from torch_geometric.data import Data
from torch_geometric.loader import DataLoader
from einops import rearrange
import importlib.metadata
from math import ceil
import os
import pkg_resources
import sys
from urllib import request

Expand Down Expand Up @@ -520,7 +520,7 @@ def progres_search_print(querystructure=None, querylist=None, queryembeddings=No
maxhits=default_maxhits, device="cpu", batch_size=None):
generator = progres_search_generator(querystructure, querylist, queryembeddings, targetdb,
fileformat, minsimilarity, maxhits, device, batch_size)
version = pkg_resources.get_distribution("progres").version
version = importlib.metadata.version("progres")

for rd in generator:
n_hits = len(rd["domains"])
Expand Down

0 comments on commit b41e461

Please sign in to comment.