Skip to content

Commit b772b77

Browse files
committed
add current dir for model import
1 parent a68e9bd commit b772b77

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

l2winddir/__init__.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,4 @@
55

66
from .data_module import *
77
from .loss import *
8-
# from .main import *
9-
from .predict import *
10-
from .simple_conv import *
8+
from .predict import *

l2winddir/predict.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@
77
import torch
88
import xarray as xr
99
from omegaconf import OmegaConf
10-
import l2winddir.simple_conv
10+
import sys
11+
# Add the current directory to the Python path
12+
import os
13+
current_dir = os.path.dirname(os.path.abspath(__file__))
14+
sys.path.append(current_dir)
15+
1116
import torch.multiprocessing as mp
1217

1318
mp.set_start_method("spawn", force=True)

0 commit comments

Comments
 (0)