Oloren-AI / olorenchemengine

OCE is the first infinitely composable library for reproducibly implementing SOTA molecular property prediction/QSAR techniques.
MIT License
98 stars 14 forks source link

Remote call issue in 4A_Creating_Your_Own_Representation_Class.ipynb #76

Closed mireklzicar closed 1 year ago

mireklzicar commented 1 year ago

Trying to create my own representation class & reproducing the notebook 4A_Creating_Your_Own_Representation_Class.ipynb. On this line: single_rep = representation. Convert('CN=C=O') i throws following ValueError: Remote call resulted in error. What does it mean? Is it possible to solve it?

Remote Call: [{'type': 'CREATE', 'REMOTE_ID': '5ca04f5b-99e5-4a14-9636-1c742e0001fd', 'parameters': {'BC_class_name': 'CustomRepresentation', 'args': [], 'kwargs': {'radius': 2, 'nbits': 1024, 'log': True}}}, {'type': 'SYMBOL', 'PARENT_REMOTE_ID': '5ca04f5b-99e5-4a14-9636-1c742e0001fd', 'SYMBOL_NAME': 'convert', 'REMOTE_ID': '6d8ce618-84b8-4079-92be-a29f2272f2e7'}, {'type': 'CALL', 'PARENT_REMOTE_ID': '6d8ce618-84b8-4079-92be-a29f2272f2e7', 'REMOTE_ID': '613b1ff0-ec1a-4bc7-99ed-f0ff02382e02', 'ARGUMENTS': {'args': ['CN=C=O'], 'kwargs': {}}}] Resulted in Traceback: Traceback (most recent call last): File "/app/tasks.py", line 448, in _run self.objects[instruction["REMOTE_ID"]] = oce.create_BC(instruction["parameters"]) File "/root/miniconda3/lib/python3.8/site-packages/olorenchemengine/internal.py", line 858, in create_BC return BaseClass.Registry()[d["BC_class_name"]](*args, **kwargs) KeyError: 'CustomRepresentation'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/tasks.py", line 514, in run_tasks ret = runner.run() File "/app/tasks.py", line 494, in run x = _run() File "/app/tasks.py", line 492, in _run raise RuntimeError(f"Instruction {instruction} failed. Traceback:\n{traceback.format_exc()}") RuntimeError: Instruction {'type': 'CREATE', 'REMOTE_ID': '5ca04f5b-99e5-4a14-9636-1c742e0001fd', 'parameters': {'BC_class_name': 'CustomRepresentation', 'args': [], 'kwargs': {'radius': 2, 'nbits': 1024, 'log': True}}} failed. Traceback: Traceback (most recent call last): File "/app/tasks.py", line 448, in _run self.objects[instruction["REMOTE_ID"]] = oce.create_BC(instruction["parameters"]) File "/root/miniconda3/lib/python3.8/site-packages/olorenchemengine/internal.py", line 858, in create_BC return BaseClass.Registry()[d["BC_class_name"]](*args, **kwargs) KeyError: 'CustomRepresentation'


ValueError Traceback (most recent call last) in ----> 1 single_rep = representation.convert('CN=C=O')

2 frames /usr/local/lib/python3.8/dist-packages/olorenchemengine/internal.py in call(self, *args, *kwargs) 615 def call(self, args, **kwargs): 616 remote_id = generate_uuid() --> 617 out = _runtime.add_instruction( 618 { 619 "type": "CALL",

/usr/local/lib/python3.8/dist-packages/olorenchemengine/internal.py in add_instruction(self, instruction) 303 304 if instruction["type"] == "CALL": --> 305 x = self.send_instructions_blocking() 306 if x is not None and isinstance(x, str): 307 return json.loads(x)

/usr/local/lib/python3.8/dist-packages/olorenchemengine/internal.py in send_instructions_blocking(self) 378 oas_connector.logging_db.collection("executions").document(eid).delete() 379 self.instruction_buffer = [] --> 380 raise ValueError("Remote call resulted in error") 381 382 elif execution["status"] == "Finished":

ValueError: Remote call resulted in error

raunakdoesdev commented 1 year ago

Taking a look!

raunakdoesdev commented 1 year ago

It looks like you might be executing using our remote execution service, OCE Online. There is a prompt to enable this when you are missing some dependencies on your install. Can you share the output of oce.MISSING_DEPENDENCIES()? I can help you install anything that may be missing there.

In the meantime, I'll try to run through that notebook to make sure things are working smoothly there.

mireklzicar commented 1 year ago

Ah, yes true there was in fact some depencency clash; running new kernel in colab and solving the dependencies via !bash <(curl -s https://raw.githubusercontent.com/Oloren-AI/olorenchemengine/master/install.sh) did the thing!