diff --git a/README.md b/README.md index edf7fab..7f6082b 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,6 @@ The service is a light wrapper service around [pyciemss](https://github.com/ciem Both a FastAPI and RQ tasks are provided so jobs can be run asynchronously for long periods of time. The service must also [conform to this spec](https://github.com/DARPA-ASKEM/simulation-api-spec). -Experimental: `sciml` engine can be chosen for `simulate`. - ## Startup To start the PyCIEMSS Simulation API, first run: diff --git a/service/execute.py b/service/execute.py index 7657d40..b7f552c 100644 --- a/service/execute.py +++ b/service/execute.py @@ -15,9 +15,6 @@ optimize, ) -# jl = newmodule("SciMLIntegration") -# jl.seval("using SciMLIntegration, PythonCall") - logging.basicConfig() logger = logging.getLogger() logger.setLevel(logging.DEBUG) @@ -27,7 +24,6 @@ def run(request, *, job_id): logging.debug(f"STARTED {job_id} (user_id: {request.user_id})") update_tds_status(job_id, status="running", start=True) - # if request.engine == "ciemss": operation_name = request.__class__.pyciemss_lib_function kwargs = request.gen_pyciemss_args(job_id) logger.info(f"{job_id} started with the following args: {kwargs}") @@ -35,9 +31,6 @@ def run(request, *, job_id): raise Exception("No operation provided in request") else: output = eval(operation_name)(**kwargs) - # else: - # operation = request.__class__.sciml_lib_function - # output = operation(job_id, jl) attach_files(output, job_id) cleanup_job_dir(job_id) diff --git a/service/models/base.py b/service/models/base.py index 2ea6cd0..4107faf 100644 --- a/service/models/base.py +++ b/service/models/base.py @@ -74,9 +74,6 @@ class OperationRequest(BaseModel): def gen_pyciemss_args(self, job_id): raise NotImplementedError("PyCIEMSS cannot handle this operation") - def run_sciml_operation(self, job_id, julia_context): - raise NotImplementedError("SciML cannot handle this operation") - # @field_validator("engine") # def must_be_ciemss(cls, engine_choice): # if engine_choice != "ciemss": diff --git a/service/models/operations/simulate.py b/service/models/operations/simulate.py index 6698a1d..95aae51 100644 --- a/service/models/operations/simulate.py +++ b/service/models/operations/simulate.py @@ -87,12 +87,5 @@ def gen_pyciemss_args(self, job_id): **extra_options, } - def run_sciml_operation(self, job_id, julia_context): - amr_path = fetch_model(self.model_config_id, job_id) - with open(amr_path, "r") as file: - amr = file.read() - result = julia_context.simulate(amr, self.timespan.start, self.timespan.end) - return {"data": julia_context.pytable(result)} - class Config: extra = Extra.forbid