Skip to content

Commit

Permalink
Small cleanup and removal of pyarrow dependency (#836)
Browse files Browse the repository at this point in the history
* Remove clashing pyarrow from dependencies

* Small code fixes

* Remove unused variables from multiprocesser
  • Loading branch information
saganatt authored Nov 29, 2023
1 parent e9fc860 commit c025c0a
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 7 deletions.
2 changes: 0 additions & 2 deletions machine_learning_hep/multiprocesser.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ def __init__(self, case, proc_class, datap, typean, run_param, mcordata):
self.d_results = [self.d_prefix_res + p for p in dp["results"]]
self.d_resultsallp = self.d_prefix_res + dp["resultsallp"]

self.lpt_probcutpre = datap["mlapplication"]["probcutpresel"]
self.lpt_probcut = datap["mlapplication"]["probcutoptimal"]
self.f_evt_mergedallp = os.path.join(self.d_pklevt_mergedallp, self.n_evt)
self.f_evtorig_mergedallp = \
os.path.join(self.d_pklevt_mergedallp, self.n_evtorig)
Expand Down
4 changes: 1 addition & 3 deletions machine_learning_hep/steer_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,7 @@ def do_entire_analysis(data_config: dict, data_param: dict, data_param_overwrite

if doml is True:
from machine_learning_hep.optimiser import Optimiser # pylint: disable=import-outside-toplevel
index = 0
for binmin, binmax in zip(binminarray, binmaxarray):
for index, (binmin, binmax) in enumerate(zip(binminarray, binmaxarray)):
myopt = Optimiser(data_param[case], case, typean,
data_model[mltype], binmin, binmax,
raahp[index], training_vars[index], index)
Expand Down Expand Up @@ -380,7 +379,6 @@ def do_entire_analysis(data_config: dict, data_param: dict, data_param_overwrite
myopt.do_significance()
if doscancuts is True:
myopt.do_scancuts()
index = index + 1

if doapplydata is True:
mymultiprocessdata.multi_apply_allperiods()
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ Pillow==9.4.0
platformdirs==3.1.1
protobuf==3.19.6
py4j==0.10.9.7
pyarrow==11.0.0
pyasn1==0.4.8
pyasn1-modules==0.2.8
pylint==2.17.0
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"seaborn>=0.11.1", "uproot>=3.4.18", "scikit-learn>=0.20.3", "xgboost>=0.90",
"keras>=2.3.1", "tensorflow>=2.3.1", "PyYaml>=5.1", "pylint",
"twisted>=19.2.0", "klein>=17.10.0", "Jinja2>=2.10.3", "numba>=0.48.0",
"pyarrow>=0.13.0", "lz4>=2.1.10", "hyperopt>=0.2.3", "shap>=v0.23.0"],
"lz4>=2.1.10", "hyperopt>=0.2.3", "shap>=v0.23.0"],

python_requires='>=3.6',

Expand Down

0 comments on commit c025c0a

Please sign in to comment.