Skip to content

Commit

Permalink
Revert changes to everserver
Browse files Browse the repository at this point in the history
  • Loading branch information
xjules committed Jan 20, 2025
1 parent 140d08d commit 46e9429
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions src/everest/detached/jobs/everserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,17 @@
from dns import resolver, reversename
from fastapi import Depends, FastAPI, HTTPException, Request, status
from fastapi.encoders import jsonable_encoder
from fastapi.responses import JSONResponse, PlainTextResponse, Response
from fastapi.security import HTTPBasic, HTTPBasicCredentials
from fastapi.responses import (
JSONResponse,
PlainTextResponse,
Response,
)
from fastapi.security import (
HTTPBasic,
HTTPBasicCredentials,
)

from ert.config.parsing.queue_system import QueueSystem
from ert.ensemble_evaluator import EvaluatorServerConfig
from ert.run_models.everest_run_model import EverestExitCode, EverestRunModel
from everest import export_to_csv, export_with_progress
Expand Down Expand Up @@ -297,10 +305,12 @@ def main():
simulation_callback=partial(_sim_monitor, shared_data=shared_data),
optimization_callback=partial(_opt_monitor, shared_data=shared_data),
)

evaluator_server_config = EvaluatorServerConfig(
custom_port_range=range(49152, 51819), use_ipc_protocol=False
)
if run_model._queue_config.queue_system == QueueSystem.LOCAL:
evaluator_server_config = EvaluatorServerConfig()
else:
evaluator_server_config = EvaluatorServerConfig(
custom_port_range=range(49152, 51819), use_ipc_protocol=False
)

run_model.run_experiment(evaluator_server_config)

Expand Down

0 comments on commit 46e9429

Please sign in to comment.