Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make utils a subpackage of snmachine #259

Merged
merged 4 commits into from
Jan 24, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from setuptools import setup
from setuptools import setup, find_packages
from setuptools.command.install import install
import sys
import os
Expand Down Expand Up @@ -49,7 +49,7 @@ def run(self):
"relative_to": __file__,
"fallback_version": __FALLBACK_VERSION__},
setup_requires=['setuptools_scm>=3.2.0'],
packages=['snmachine', 'utils'],
packages=find_packages(),
include_package_data=True,
package_data={'snmachine': ['example_data/SPCC_SUBSET.tar.gz',
'example_data/output_spcc_no_z/features/*.dat',
Expand Down
2 changes: 1 addition & 1 deletion snmachine/snclassifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from sklearn import model_selection
from sklearn.model_selection import PredefinedSplit, StratifiedKFold
from sklearn.preprocessing import StandardScaler
from utils import plasticc_utils
from . utils import plasticc_utils
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that there is a space between . and utils that should not be here. However, I find no issues running the notebooks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just updated this to from snmachine.utils and that works for me - but it would be great if you could test it too


# This allows the user to easily loop through all possible classifiers
choice_of_classifiers = ['svm', 'knn', 'random_forest', 'decision_tree',
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#from imblearn.metrics import classification_report_imbalanced # not used at the moment
#from imblearn.over_sampling import SMOTE # not used at the moment
#from imblearn.pipeline import make_pipeline # not used at the moment
from utils.plasticc_utils import plasticc_log_loss, plot_confusion_matrix
from snmachine.utils.plasticc_utils import plasticc_log_loss, plot_confusion_matrix
from sklearn.ensemble import RandomForestClassifier
from sklearn.model_selection import train_test_split

Expand Down
File renamed without changes.