Skip to content

Commit

Permalink
test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
avdudchenko committed Oct 1, 2024
1 parent f0e9c55 commit 781211b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 1 addition & 2 deletions backend/app/internal/flowsheet_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -605,10 +605,9 @@ def get_number_of_subprocesses(self):
currentNumberOfSubprocesses = item[0]["value"]
# _log.info(f'number of subprocesses is: {currentNumberOfSubprocesses}')
# prevent user from overspecifying number of sub processes on accident and killing thier system
print("get_number_of_subprocesses", currentNumberOfSubprocesses)

if currentNumberOfSubprocesses > maxNumberOfSubprocesses:
currentNumberOfSubprocesses = maxNumberOfSubprocesses
print("get_number_of_subprocesses", currentNumberOfSubprocesses)
return currentNumberOfSubprocesses, maxNumberOfSubprocesses

def set_number_of_subprocesses(self, value):
Expand Down
8 changes: 6 additions & 2 deletions backend/app/internal/parameter_sweep.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,17 +130,21 @@ def run_analysis(
)
if custom_do_param_sweep is None:
custom_do_param_sweep_kwargs = None

if number_of_subprocess == 1:
parallel_back_end = "Serial"
else:
parallel_back_end = "MultiProcessing"
ps = ParameterSweep(
csv_results_file_name=results_path,
optimize_function=solve_function,
interpolate_nan_outputs=False,
custom_do_param_sweep=custom_do_param_sweep,
custom_do_param_sweep_kwargs=custom_do_param_sweep_kwargs,
reinitialize_before_sweep=False,
parallel_back_end="MultiProcessing",
parallel_back_end=parallel_back_end,
number_of_subprocesses=number_of_subprocess,
)
print("number_of_subprocess ", number_of_subprocess)
global_results = ps.parameter_sweep(
build_model=build_function,
build_sweep_params=ParameterSweepReader()._dict_to_params,
Expand Down
2 changes: 1 addition & 1 deletion electron/ui/cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Cypress.Commands.add('solve_flowsheet', () => {
url: 'http://localhost:8001/flowsheets/**',
}).as('run');
cy.findAllByRole('button', {name: /run/i}).eq(0).click();
cy.wait('@run', {timeout: 180000});
cy.wait('@run', {timeout: 600000});
})

/**
Expand Down

0 comments on commit 781211b

Please sign in to comment.