Skip to content

Commit

Permalink
not using ray
Browse files Browse the repository at this point in the history
  • Loading branch information
mwang87 committed Nov 15, 2022
1 parent 50490c4 commit ae736e0
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 29 deletions.
1 change: 0 additions & 1 deletion dash/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ celery==5.2.1
pymzml
lark-parser
pyarrow
ray
tqdm
py_expression_eval
matchms
Expand Down
5 changes: 0 additions & 5 deletions massql/msql_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ def DEBUG_MSG(msg):

print(msg, file=sys.stderr, flush=True)

def init_ray():
import ray
if not ray.is_initialized():
ray.init(ignore_reinit_error=True, object_store_memory=8000000000, num_cpus=8)


def _get_ppm_tolerance(qualifiers):
if qualifiers is None:
Expand Down
19 changes: 1 addition & 18 deletions proteosafe/msql/tools/msql/proteosafe_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import glob
import sys
import pandas as pd
import ray

import ming_proteosafe_library

Expand Down Expand Up @@ -36,25 +35,9 @@ def main():

all_results_list = []

# Initialize Ray
msql_engine.init_ray()

# Parallel Version
if len(input_files_list) > 1 and PARALLEL == "YES":
all_futures = []

for input_filename in input_files_list:
results_future = execute_query_ray.remote(msql_query, input_filename, path_to_grammar=path_to_grammar, cache=False, parallel=(PARALLEL=="YES"))
all_futures.append((results_future, input_filename))

for result_future, input_filename in all_futures:
results_df = ray.get(result_future)
real_filename = mangled_mapping[os.path.basename(input_filename)]
results_df["filename"] = real_filename
results_df["mangled_filename"] = os.path.basename(input_filename)

all_results_list.append(results_df)
else:
if True:
# Serial Version
all_results_list = []
for input_filename in input_files_list:
Expand Down
5 changes: 0 additions & 5 deletions tests/test_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ def test_ms1_iron():

@pytest.mark.skip(reason="parallel not really supported anymore")
def test_ms1_iron_parallel():
msql_engine.init_ray()

query = "QUERY scaninfo(MS1DATA) \
WHERE \
Expand Down Expand Up @@ -235,7 +234,6 @@ def test_ms1_iron_X_changes_intensity():


def test_ms1_iron_min_intensity():
#msql_engine.init_ray()

query = "QUERY scaninfo(MS1DATA) \
WHERE \
Expand All @@ -254,7 +252,6 @@ def test_ms1_iron_min_intensity():
assert(len(results_df) == 10)

def test_ms1_iron_min_intensity_m2_prec():
#msql_engine.init_ray()

query = "QUERY scaninfo(MS2DATA) \
WHERE \
Expand Down Expand Up @@ -299,7 +296,6 @@ def test_i_norm_iron_xrange():

@pytest.mark.skip(reason="parallel not really supported anymore")
def test_ms1_cu():
msql_engine.init_ray()

query = "QUERY scaninfo(MS1DATA) \
WHERE \
Expand Down Expand Up @@ -698,7 +694,6 @@ def test_mgf_intensity():
assert(1006 in list(results_df["scan"]))

def main():
#msql_engine.init_ray()

#test_noquery()
#test_simple_ms2_twoqualifier()
Expand Down

0 comments on commit ae736e0

Please sign in to comment.