Skip to content

Commit

Permalink
FIX: relative imports issues
Browse files Browse the repository at this point in the history
  • Loading branch information
anmorgunov committed May 22, 2024
1 parent e57435c commit f57fc77
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions DirectMultiStep/Utils/PostProcess.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

from Models.Generation import BeamSearchOutput
from Utils.PreProcess import (
from ..Models.Generation import BeamSearchOutput
from .PreProcess import (
canonicalize_smiles,
find_leaves,
generate_permutations,
Expand Down
Empty file.
Empty file added DirectMultiStep/__init__.py
Empty file.
Empty file.
8 changes: 5 additions & 3 deletions DirectMultiStep/tests/test_preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@

import pytest
from rdkit import Chem
from DirectMultiStep.Utils.PreProcess import filter_mol_nodes, max_tree_depth, find_leaves, generate_permutations
from test_data import *
from DirectMultiStep.Utils.Dataset import tokenize_smile, tokenize_path_string
from ..Utils.PreProcess import filter_mol_nodes, max_tree_depth, find_leaves, generate_permutations
from .test_data import *
from ..Utils.Dataset import tokenize_smile, tokenize_path_string

test_filtering_and_depth = [
pytest.param(test1_leaves, 0, id="leaves"),
Expand Down Expand Up @@ -125,3 +125,5 @@ def test_generate_permutations_complex_case():
def test_generate_permutations_parametrized(data, expected):
assert generate_permutations(data, child_key="c") == expected

if __name__ == "__main__":
pytest.main(["-v", "-s", __file__])
2 changes: 1 addition & 1 deletion DirectMultiStep/train_nosm.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from Models.Training import PLTraining
from lightning.pytorch.callbacks import ModelCheckpoint
from lightning.pytorch.callbacks import RichModelSummary
import helpers
import DirectMultiStep.helpers as helpers

data_path = Path(__file__).resolve().parent / "Data" / "Processed"
train_path = Path(__file__).resolve().parent / "Data" / "Training"
Expand Down
2 changes: 1 addition & 1 deletion DirectMultiStep/train_wsm.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from Models.Training import PLTraining
from lightning.pytorch.callbacks import ModelCheckpoint
from lightning.pytorch.callbacks import RichModelSummary
import helpers
import DirectMultiStep.helpers as helpers

data_path = Path(__file__).resolve().parent / "Data" / "Processed"
train_path = Path(__file__).resolve().parent / "Data" / "Training"
Expand Down

0 comments on commit f57fc77

Please sign in to comment.