Skip to content

Commit

Permalink
Moved order of imports from prsdk to be below 3rd party but above rel…
Browse files Browse the repository at this point in the history
…ative imports
  • Loading branch information
danyoungday committed Jul 29, 2024
1 parent e611d39 commit 4c985ba
Show file tree
Hide file tree
Showing 15 changed files with 22 additions and 7 deletions.
1 change: 1 addition & 0 deletions use_cases/eluc/app/components/prediction.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from dash import dcc
from dash import html
import pandas as pd

from prsdk.predictors.predictor import Predictor

from app import constants as app_constants
Expand Down
3 changes: 2 additions & 1 deletion use_cases/eluc/experiments/predictor_experiments.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@
"from tqdm import tqdm\n",
"import matplotlib.pyplot as plt\n",
"from matplotlib.colors import LinearSegmentedColormap\n",
"from prsdk.predictors.predictor import Predictor\n",
"import seaborn as sns\n",
"\n",
"from scipy.stats import ttest_1samp, ttest_ind\n",
"from sklearn.metrics import mean_absolute_error\n",
"\n",
"from prsdk.predictors.predictor import Predictor\n",
"\n",
"from data.eluc_data import ELUCData\n",
"from data import constants\n",
"from persistence.serializers.neural_network_serializer import NeuralNetSerializer\n",
Expand Down
1 change: 1 addition & 0 deletions use_cases/eluc/persistence/persistors/hf_persistor.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from pathlib import Path

from huggingface_hub import HfApi, snapshot_download

from prsdk.persistence.persistors.persistor import Persistor


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
from pathlib import Path

import joblib
from prsdk.persistence.serializers.serializer import Serializer
import torch

from prsdk.persistence.serializers.serializer import Serializer

from predictors.neural_network.eluc_neural_net import ELUCNeuralNet
from predictors.neural_network.neural_net_predictor import NeuralNetPredictor

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
import json
from pathlib import Path

from prsdk.persistence.serializers.serializer import Serializer
import torch

from prsdk.persistence.serializers.serializer import Serializer

from data.eluc_encoder import ELUCEncoder
from prescriptors.nsga2.candidate import Candidate
from prescriptors.nsga2.land_use_prescriptor import LandUsePrescriptor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from pathlib import Path

import joblib

from prsdk.persistence.serializers.serializer import Serializer

from predictors.sklearn_predictor.sklearn_predictor import SKLearnPredictor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
See here for how to impelement a predictor:
"""
import pandas as pd

from prsdk.predictors.predictor import Predictor

from data import constants
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@

import numpy as np
import pandas as pd
from prsdk.predictors.predictor import Predictor
from sklearn.preprocessing import StandardScaler
from tqdm import tqdm

import torch
from torch.utils.data import DataLoader
from torch.utils.tensorboard import SummaryWriter

from prsdk.predictors.predictor import Predictor

from data import constants
from data.torch_data import TorchDataset
from predictors.neural_network.eluc_neural_net import ELUCNeuralNet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Our heuristic model that calculates the percent change of land use from actions and context.
"""
import pandas as pd

from prsdk.predictors.predictor import Predictor

from data import constants
Expand Down
1 change: 1 addition & 0 deletions use_cases/eluc/predictors/scoring/scorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from pathlib import Path

import pandas as pd

from prsdk.predictors.predictor import Predictor

import data.constants as constants
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
from abc import ABC

import pandas as pd
from prsdk.predictors.predictor import Predictor
from sklearn.linear_model import LinearRegression
from sklearn.ensemble import RandomForestRegressor

from prsdk.predictors.predictor import Predictor

from data import constants


Expand Down
1 change: 1 addition & 0 deletions use_cases/eluc/prescriptors/heuristics/heuristics.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from abc import ABC, abstractmethod

import pandas as pd

from prsdk.prescriptors.prescriptor import Prescriptor

from data import constants
Expand Down
3 changes: 2 additions & 1 deletion use_cases/eluc/prescriptors/nsga2/land_use_prescriptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
"""
import numpy as np
import pandas as pd
from prsdk.prescriptors.prescriptor import Prescriptor
import torch
from torch.utils.data import DataLoader

from prsdk.prescriptors.prescriptor import Prescriptor

from data import constants
from data.eluc_data import ELUCEncoder
from data.torch_data import TorchDataset
Expand Down
3 changes: 2 additions & 1 deletion use_cases/eluc/prescriptors/nsga2/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
from tqdm import tqdm
import numpy as np
import pandas as pd
from prsdk.predictors.predictor import Predictor
import torch
from torch.utils.data import DataLoader

from prsdk.predictors.predictor import Predictor

from data import constants
from data.eluc_data import ELUCEncoder
from data.torch_data import TorchDataset
Expand Down
1 change: 1 addition & 0 deletions use_cases/eluc/prescriptors/prescriptor_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Additionally handles the percent changed computation.
"""
import pandas as pd

from prsdk.predictors.predictor import Predictor
from prsdk.prescriptors.prescriptor import Prescriptor

Expand Down

0 comments on commit 4c985ba

Please sign in to comment.