profile
viewpoint

XavierGeerinck/Brewr-Site 134

Brewr IO site repository

XavierGeerinck/Atom-Shell-App-Builder 28

A builder to package atom shell applications written in HTML/CSS/JS

XavierGeerinck/CloudStorage-Migrator 3

Migrate storage data from one provider to the other with conversion of native formats.

XavierGeerinck/Feedient-Android 2

Feedient Android

XavierGeerinck/Algorithms 1

My summary about all the algorithms learned during my years at the University

push eventteaching-machines/Roadwork-RL

Xavier Geerinck

commit sha 7f97f278beae8d329eb3f41cca1880fe73dc3319

Add Azure CLI Setup details

view details

push time in a day

CommitCommentEvent

push eventteaching-machines/Roadwork-RL

Xavier Geerinck

commit sha bb68c4e0d358a445ab658ec7337c7e8e3f8726dd

Rework docker container to include sim dependencies per sim

view details

Xavier Geerinck

commit sha ab7b24db764c50e1dc704ca7a5b3800b80552add

Merge branch 'master' of github.com:teaching-machines/Roadwork-RL

view details

push time in 2 days

CommitCommentEvent

push eventteaching-machines/Roadwork-RL

Xavier Geerinck

commit sha 90b1f6cfe6555f5f4d03f1ff048d60741ad089aa

Added lunar lander, dpeloy script PIP and dependency fixes

view details

push time in 2 days

push eventRoadwork/Roadwork-RL

xavier geerinck

commit sha 146d96a9adbee3284d46b17bac28a43bae8a72c1

Merge pull request #1 from Roadwork/master Rework documentation

view details

unknown

commit sha e9db82c10a3e20e56b7b221773076a0d8c4e1f7e

intro ML Agent

view details

unknown

commit sha a07d193607e22028b1b82693066bc000b973baed

ML-agent

view details

Xavier Geerinck

commit sha e8ac28a5b0d9af708a6a75ec81653ede6f491f41

Add Basic environment Unity, WIP

view details

Young Bu Park

commit sha eabd6e2d601026f9da94bc026b97ff89ce7f3b84

switch to fastapi

view details

davidhcoe

commit sha 9366e284067435d90df1fa7eaf70c8072a50320b

Merge pull request #6 from teaching-machines/davidhcoe merge unity work to master

view details

Young Bu Park

commit sha 736bcc50f623a8e75e3f58fc918e87bfe536ca91

updated

view details

xavier geerinck

commit sha f9802892efce362bdbaafbb579eb28739047e422

Merge branch 'master' into youngp/switch-fastapi

view details

xavier geerinck

commit sha 0e89da589bf8bec5511801b3b8dd1e7673d0da19

Merge pull request #5 from teaching-machines/youngp/switch-fastapi switch flask to fastapi + switch proxy to requests

view details

Xavier Geerinck

commit sha 3f8ac0e45e23db1bd8d0b71cd95cf487f8acb3d5

Work on assistive gym in rllib

view details

Xavier Geerinck

commit sha 11b6b33d1796ec4d8f5b76e73fd3236600f6e523

Merge branch 'master' of github.com:teaching-machines/Roadwork-RL

view details

Xavier Geerinck

commit sha 1c954122ab33d42cae909c47106faa91162814d7

Fix client API

view details

chintanrp

commit sha 27600d10664ce30d95de5ea2a11ff6f7289fbdea

Add header and disable https for http requests

view details

Young Bu Park

commit sha cd768dc91e30a0422db7a3f2ea03e8040be422a3

update k8s deploy for fastapi (#7) * update k8s deploy for fastapi * wip * remove assistant_gym

view details

Chintan

commit sha 853438e41b6ecbb67abc47310504371e0cb3827a

Merge pull request #8 from teaching-machines/chipate/AddHttpHeader Add request headers and disable warnings

view details

Young Bu Park

commit sha 7f1cbe4cb972865ceee42273735f440ccf3d4e46

change host header to roadwork (#9)

view details

Chintan

commit sha d80e57e059538de3077758d62796c76f250de134

Add doc to deploy nginx ingress controller in kubernetes cluster

view details

Chintan

commit sha 38b977af02fb5f4c3dcf646e0a667f0cbbf4b826

Add NGINX Ingress controller traffic flow image

view details

Chintan

commit sha af9efea00c165e1fea156e76f85b516b9e956b26

Update nginx-ingress-controller-setup.md

view details

Chintan

commit sha 24fa3b3fbba8a37d1e0df0081fc17432c825c457

Merge pull request #10 from teaching-machines/chipate/StepsForIngressController Adding steps to deploy NGINX ingress controller

view details

push time in 4 days

PR merged Roadwork/Roadwork-RL

merge Unity work to master
+25692 -3

0 comment

146 changed files

davidhcoe

pr closed time in 4 days

PR opened Roadwork/Roadwork-RL

Merge Teaching Machines into Main Repo
+26556 -258

0 comment

184 changed files

pr created time in 4 days

push eventteaching-machines/Roadwork-RL

Xavier Geerinck

commit sha f37820d736e1429d0ea0f044eb727d64fbba576e

Small bug in README due to comment block

view details

push time in 4 days

push eventteaching-machines/Roadwork-RL

Xavier Geerinck

commit sha dbe63c9634f550424a2bc51f92d859238d62c677

REwork documentation, cleaned up some stuff

view details

push time in 4 days

push eventteaching-machines/Roadwork-RL

Xavier Geerinck

commit sha 1c954122ab33d42cae909c47106faa91162814d7

Fix client API

view details

push time in 9 days

push eventteaching-machines/Roadwork-RL

Xavier Geerinck

commit sha 3f8ac0e45e23db1bd8d0b71cd95cf487f8acb3d5

Work on assistive gym in rllib

view details

Xavier Geerinck

commit sha 11b6b33d1796ec4d8f5b76e73fd3236600f6e523

Merge branch 'master' of github.com:teaching-machines/Roadwork-RL

view details

push time in 9 days

push eventteaching-machines/Roadwork-RL

Young Bu Park

commit sha eabd6e2d601026f9da94bc026b97ff89ce7f3b84

switch to fastapi

view details

Young Bu Park

commit sha 736bcc50f623a8e75e3f58fc918e87bfe536ca91

updated

view details

xavier geerinck

commit sha f9802892efce362bdbaafbb579eb28739047e422

Merge branch 'master' into youngp/switch-fastapi

view details

xavier geerinck

commit sha 0e89da589bf8bec5511801b3b8dd1e7673d0da19

Merge pull request #5 from teaching-machines/youngp/switch-fastapi switch flask to fastapi + switch proxy to requests

view details

push time in 9 days

push eventteaching-machines/Roadwork-RL

unknown

commit sha e9db82c10a3e20e56b7b221773076a0d8c4e1f7e

intro ML Agent

view details

unknown

commit sha a07d193607e22028b1b82693066bc000b973baed

ML-agent

view details

Xavier Geerinck

commit sha e8ac28a5b0d9af708a6a75ec81653ede6f491f41

Add Basic environment Unity, WIP

view details

davidhcoe

commit sha 9366e284067435d90df1fa7eaf70c8072a50320b

Merge pull request #6 from teaching-machines/davidhcoe merge unity work to master

view details

xavier geerinck

commit sha f9802892efce362bdbaafbb579eb28739047e422

Merge branch 'master' into youngp/switch-fastapi

view details

push time in 9 days

push eventteaching-machines/Roadwork-RL

Xavier Geerinck

commit sha e8ac28a5b0d9af708a6a75ec81653ede6f491f41

Add Basic environment Unity, WIP

view details

push time in 10 days

issue commentdapr/dapr

Data corruption in actor/service invocation under high rps

image

This is the stacktrace with try except :)

XavierGeerinck

comment created time in 11 days

issue commentdapr/dapr

Data corruption in actor/service invocation under high rps

Hi There!

Sadly enough we have to re-open this as the bug is still present 😥 this is the stacktrace we got while testing it during the hackathon (I confirmed that it's the edge version and same binary as I had when it was working...)

== APP == /usr/local/lib/python3.7/dist-packages/gym/logger.py:30: UserWarning: WARN: Box bound precision lowered by casting to float32
 == APP ==   warnings.warn(colorize('%s: %s'%('WARN', msg % args), 'yellow'))
 == APP == Process ForkServerProcess-2:
 == APP == Traceback (most recent call last):
 == APP ==   File "/usr/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
 == APP ==     self.run()
 == APP ==   File "/usr/lib/python3.7/multiprocessing/process.py", line 99, in run
 == APP ==     self._target(*self._args, **self._kwargs)
 == APP ==   File "/usr/local/lib/python3.7/dist-packages/stable_baselines/common/vec_env/subproc_vec_env.py", line 18, in _worker
 == APP ==     observation, reward, done, info = env.step(data)
 == APP ==   File "/home/chipate/roadwork-rl/src/Lib/python/roadwork/roadwork/client/client_dapr.py", line 124, in step
 == APP ==     obs, reward, done, info = self._step(action)
 == APP ==   File "/usr/local/lib/python3.7/dist-packages/asgiref/sync.py", line 139, in __call__
 == APP ==     return call_result.result()
 == APP ==   File "/usr/lib/python3.7/concurrent/futures/_base.py", line 428, in result
 == APP ==     return self.__get_result()
 == APP ==   File "/usr/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
 == APP ==     raise self._exception
 == APP ==   File "/usr/local/lib/python3.7/dist-packages/asgiref/sync.py", line 204, in main_wrap
 == APP ==     result = await self.awaitable(*args, **kwargs)
 == APP ==   File "/home/chipate/roadwork-rl/src/Lib/python/roadwork/roadwork/client/client_dapr.py", line 60, in _step
 == APP ==     obs, reward, done, info = await self.proxy.SimStep({ 'action': action })
 == APP ==   File "/home/chipate/dapr-python-sdk/dapr/actor/client/proxy.py", line 69, in __call__
 == APP ==     rtnval = await self._proxy.invoke(self._attr_call_type['actor_method'], bytes_data)
 == APP ==   File "/home/chipate/dapr-python-sdk/dapr/actor/client/proxy.py", line 151, in invoke
 == APP ==     self._actor_type, str(self._actor_id), method, raw_body)
 == APP ==   File "/home/chipate/dapr-python-sdk/dapr/clients/http/dapr_actor_http_client.py", line 43, in invoke_method
 == APP ==     return await self._send_bytes(method='POST', url=url, data=data)
 == APP ==   File "/home/chipate/dapr-python-sdk/dapr/clients/http/dapr_actor_http_client.py", line 144, in _send_bytes
 == APP ==     raise (await self.convert_to_error(r))
 == APP == dapr.clients.exceptions.DaprInternalError: ('rpc error: code = Unknown desc = error from actor service: {"errorCode":"UNKNOWN","message":"RuntimeError(\'Task <Task pending coro=<ActorRuntime.dispatch() running at /home/chipate/dapr-python-sdk/dapr/actor/runtime/runtime.py:94> cb=[_run_until_complete_cb() at /usr/lib/python3.7/asyncio/base_events.py:157]> got Future <Future pending> attached to a different loop\')"}\n', 'ERR_ACTOR_INVOKE_METHOD')
 == APP == Traceback (most recent call last):
 == APP ==   File "./src/Experiments/baselines/cartpole/train.py", line 27, in <module>
 == APP ==     model.learn(total_timesteps=100000)
 == APP ==   File "/usr/local/lib/python3.7/dist-packages/stable_baselines/ppo2/ppo2.py", line 336, in learn
 == APP ==     rollout = self.runner.run(callback)
 == APP ==   File "/usr/local/lib/python3.7/dist-packages/stable_baselines/common/runners.py", line 48, in run
 == APP ==     return self._run()
 == APP ==   File "/usr/local/lib/python3.7/dist-packages/stable_baselines/ppo2/ppo2.py", line 482, in _run
 == APP ==     self.obs[:], rewards, self.dones, infos = self.env.step(clipped_actions)
 == APP ==   File "/usr/local/lib/python3.7/dist-packages/stable_baselines/common/vec_env/base_vec_env.py", line 150, in step
 == APP ==     return self.step_wait()
 == APP ==   File "/usr/local/lib/python3.7/dist-packages/stable_baselines/common/vec_env/subproc_vec_env.py", line 107, in step_wait
 == APP ==     results = [remote.recv() for remote in self.remotes]
 == APP ==   File "/usr/local/lib/python3.7/dist-packages/stable_baselines/common/vec_env/subproc_vec_env.py", line 107, in <listcomp>
 == APP ==     results = [remote.recv() for remote in self.remotes]
 == APP ==   File "/usr/lib/python3.7/multiprocessing/connection.py", line 250, in recv
 == APP ==     buf = self._recv_bytes()
 == APP ==   File "/usr/lib/python3.7/multiprocessing/connection.py", line 407, in _recv_bytes
 == APP ==     buf = self._recv(4)
 == APP ==   File "/usr/lib/python3.7/multiprocessing/connection.py", line 383, in _recv
 == APP ==     raise EOFError
 == APP == EOFError
XavierGeerinck

comment created time in 11 days

issue commentteaching-machines/Roadwork-RL

Integrate new simulator (ML-Agents?)

https://github.com/microsoft/malmo

XavierGeerinck

comment created time in 11 days

push eventteaching-machines/Roadwork-RL

Xavier Geerinck

commit sha acc8245120b8c2c4ed50b5080a904058da2bd736

Rework documentation

view details

xavier geerinck

commit sha 146d96a9adbee3284d46b17bac28a43bae8a72c1

Merge pull request #1 from Roadwork/master Rework documentation

view details

push time in 13 days

PR opened teaching-machines/Roadwork-RL

Rework documentation
+393 -45

0 comment

7 changed files

pr created time in 13 days

push eventRoadwork/Roadwork-RL

Xavier Geerinck

commit sha acc8245120b8c2c4ed50b5080a904058da2bd736

Rework documentation

view details

push time in 13 days

issue commentdapr/dapr

Data corruption in actor/service invocation under high rps

Awesome, thanks! It worked!! :) I ran 8 processes @ ~42 req / s resulting in 100k steps in 294s without a crash!

image

XavierGeerinck

comment created time in 15 days

issue commentdapr/python-sdk

[Proposal] Using Dapr and Python-sdk for ML/DL model deployment

Awesome idea! This is something I have encountered a lot when working with customers... data scientists are very good in creating models, but most often come from a different background and have difficulties integrating with an application.

The main question I had when reading this: how far does Dapr want to go in ML Model support compared to existing tools out there? Depending on this question it might be interesting to branch of a new repo such as python-ml-sdk under Dapr I think...

Otherwise, while brainstorming about this I was thinking about this:

  • Do you have an interface in mind?
    • The Azure ML Services team did a lot of work already in creating an interface for packaging models and deploying them to ACI easily (https://docs.microsoft.com/en-us/azure/machine-learning/how-to-deploy-and-where) + AutoML creates a model automatically and uses this as well. Might be interesting to sync with them on this compatibility/business wise :)
  • Would you support the following in this proposal?
    • Model versioning?
    • A/B Testing of models?
  • Points that might be interesting in the Dapr ecosystem depending on how far you want to go
    • Data integration and pipelining
    • Training scale-out integration

Looking forward to your thoughts!

youngbupark

comment created time in 15 days

issue openeddapr/dapr

Actor JSON Serializer randomly failing

Expected Behavior

Correct serialization (99.9% of the time) on the HTTP endpoints for actors

Actual Behavior

When running a Proxy call for the Actor implementation, it randomly fails and spits out a weird JSON string, as if something happened on the protocol transport. Below you can find 2 different occurrences:

Occurrence dapr/python-sdk#1:

# /home/xanrin/dapr-python-sdk/dapr/actor/client/proxy.py (line 71)
b'[[0.056063172301151286,0.43107083116247324,-0.21845425248263262,-1.2186224010316111],1.0,true,{}]lse,{}]'

# /home/xanrin/dapr-python-sdk/dapr/serializers/json.py (line 49)
b'[[0.056063172301151286,0.43107083116247324,-0.21845425248263262,-1.2186224010316111],1.0,true,{}]lse,{}]'

# What I expect:
b'[[0.056063172301151286,0.43107083116247324,-0.21845425248263262,-1.2186224010316111],1.0,true,{}]'

Occurrence dapr/python-sdk#2:

# /home/xanrin/dapr-python-sdk/dapr/actor/client/proxy.py (line 71)
b'[[0.02180521361883352,0.9327880131478761,-0.04958054991416051,-1.4610110113961423],1.0,false,{}]]'

# /home/xanrin/dapr-python-sdk/dapr/serializers/json.py (line 49)
b'[[0.02180521361883352,0.9327880131478761,-0.04958054991416051,-1.4610110113961423],1.0,false,{}]]'

# What I expect (there is a ] too much):
b'[[0.02180521361883352,0.9327880131478761,-0.04958054991416051,-1.4610110113961423],1.0,false,{}]'

Stacktrace

== APP == Process ForkServerProcess-4:
== APP == Traceback (most recent call last):
== APP ==   File "/usr/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
== APP ==     self.run()
== APP ==   File "/usr/lib/python3.7/multiprocessing/process.py", line 99, in run
== APP ==     self._target(*self._args, **self._kwargs)
== APP ==   File "/usr/local/lib/python3.7/dist-packages/stable_baselines/common/vec_env/subproc_vec_env.py", line 18, in _worker
== APP ==     observation, reward, done, info = env.step(data)
== APP ==   File "/mnt/e/Projects/roadwork-rl/src/Lib/python/roadwork/roadwork/client/client_dapr.py", line 91, in step
== APP ==     obs, reward, done, info = asyncio.get_event_loop().run_until_complete(self.proxy.SimStep({ 'action': action }))
== APP ==   File "/usr/local/lib/python3.7/dist-packages/nest_asyncio.py", line 59, in run_until_complete
== APP ==     return f.result()
== APP ==   File "/usr/lib/python3.7/asyncio/futures.py", line 181, in result
== APP ==     raise self._exception
== APP ==   File "/usr/lib/python3.7/asyncio/tasks.py", line 249, in __step
== APP ==     result = coro.send(None)
== APP ==   File "/home/xanrin/dapr-python-sdk/dapr/actor/client/proxy.py", line 71, in __call__
== APP ==     return self._message_serializer.deserialize(rtnval, self._attr_call_type['return_types'])
== APP == Actor sending: b'[[0.056063172301151286,0.43107083116247324,-0.21845425248263262,-1.2186224010316111],1.0,true,{}]lse,{}]'
== APP == Decoding: b'[[0.056063172301151286,0.43107083116247324,-0.21845425248263262,-1.2186224010316111],1.0,true,{}]lse,{}]'
== APP ==   File "/home/xanrin/dapr-python-sdk/dapr/serializers/json.py", line 49, in deserialize
== APP == Actor sending: b'[[0.056063172301151286,0.43107083116247324,-0.21845425248263262,-1.2186224010316111],1.0,true,{}]lse,{}]'
== APP == Decoding: b'[[0.056063172301151286,0.43107083116247324,-0.21845425248263262,-1.2186224010316111],1.0,true,{}]lse,{}]'
== APP ==     obj = json.loads(data, cls=DaprJSONDecoder)
== APP ==   File "/usr/lib/python3.7/json/__init__.py", line 361, in loads
== APP ==     return cls(**kw).decode(s)
== APP ==   File "/usr/lib/python3.7/json/decoder.py", line 340, in decode
== APP ==     raise JSONDecodeError("Extra data", s, end)
== APP == json.decoder.JSONDecodeError: Extra data: line 1 column 96 (char 95)

Steps to Reproduce the Problem

This happens when running an application that is utilizing a ThreadPool and running > 1000 reqs / sec (estimated)

created time in 16 days

issue commentdapr/python-sdk

Actor JSON Serializer randomly failing

Awesome! Amazing work, you rock! Looking forward to see what was causing this 😊

XavierGeerinck

comment created time in 16 days

issue commentdapr/python-sdk

Actor JSON Serializer randomly failing

I forgot to push the latest changes :) I had indeed removed that new event loop creation already.

I tested on a local machine environment, but you should be able to reproduce it with the container installation part (https://github.com/Roadwork/Roadwork-RL/tree/master/src under "Kubernetes")

XavierGeerinck

comment created time in 17 days

push eventRoadwork/Roadwork-RL

Xavier Geerinck

commit sha 8587682711dd91bce84fb4324ff19ee07bcce585

Do not recreate the eventloop

view details

push time in 17 days

issue commentdapr/python-sdk

Actor JSON Serializer randomly failing

Thanks for the quick comment! I switched it all out towards asgiref's async_to_sync and creating async methods where they should be (reference: https://github.com/Roadwork/Roadwork-RL/commit/b62e5723d6618b0bd92f80f8a4d16a82d8dfe38e) but the problem still exists.

Latest stacktrace (I marked the strange line):

== APP == Process ForkServerProcess-7:
== APP == Traceback (most recent call last):
== APP ==   File "/usr/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
== APP ==     self.run()
== APP ==   File "/usr/lib/python3.7/multiprocessing/process.py", line 99, in run
== APP ==     self._target(*self._args, **self._kwargs)
== APP ==   File "/usr/local/lib/python3.7/dist-packages/stable_baselines/common/vec_env/subproc_vec_env.py", line 18, in _worker
== APP ==     observation, reward, done, info = env.step(data)
== APP ==   File "/mnt/e/Projects/roadwork-rl/src/Lib/python/roadwork/roadwork/client/client_dapr.py", line 124, in step
== APP ==     obs, reward, done, info = self._step(action)
== APP ==   File "/usr/local/lib/python3.7/dist-packages/asgiref/sync.py", line 139, in __call__
== APP ==     return call_result.result()
== APP ==   File "/usr/lib/python3.7/concurrent/futures/_base.py", line 428, in result
== APP ==     return self.__get_result()
== APP ==   File "/usr/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
== APP ==     raise self._exception
== APP ==   File "/usr/local/lib/python3.7/dist-packages/asgiref/sync.py", line 204, in main_wrap
== APP ==     result = await self.awaitable(*args, **kwargs)
== APP ==   File "/mnt/e/Projects/roadwork-rl/src/Lib/python/roadwork/roadwork/client/client_dapr.py", line 60, in _step
== APP ==     obs, reward, done, info = await self.proxy.SimStep({ 'action': action })
== APP ==   File "/home/xanrin/dapr-python-sdk/dapr/actor/client/proxy.py", line 70, in __call__
== APP ==     return self._message_serializer.deserialize(rtnval, self._attr_call_type['return_types'])
== APP ==   File "/home/xanrin/dapr-python-sdk/dapr/serializers/json.py", line 49, in deserialize
== APP ==     obj = json.loads(data, cls=DaprJSONDecoder)
== APP ==   File "/usr/lib/python3.7/json/__init__.py", line 361, in loads
== APP ==     return cls(**kw).decode(s)
== APP ==   File "/usr/lib/python3.7/json/decoder.py", line 341, in decode
== APP ==     raise JSONDecodeError("Extra data", s, end)
- == APP == json.decoder.JSONDecodeError: Extra data: line 1 column 98 (char 97)
== APP == Traceback (most recent call last):
== APP ==   File "./Experiments/baselines/cartpole/train.py", line 27, in <module>
== APP ==     model.learn(total_timesteps=100000)
== APP ==   File "/usr/local/lib/python3.7/dist-packages/stable_baselines/ppo2/ppo2.py", line 336, in learn
== APP ==     rollout = self.runner.run(callback)
== APP ==   File "/usr/local/lib/python3.7/dist-packages/stable_baselines/common/runners.py", line 48, in run
== APP ==     return self._run()
== APP ==   File "/usr/local/lib/python3.7/dist-packages/stable_baselines/ppo2/ppo2.py", line 482, in _run
== APP ==     self.obs[:], rewards, self.dones, infos = self.env.step(clipped_actions)
== APP ==   File "/usr/local/lib/python3.7/dist-packages/stable_baselines/common/vec_env/base_vec_env.py", line 150, in step
== APP ==     return self.step_wait()
== APP ==   File "/usr/local/lib/python3.7/dist-packages/stable_baselines/common/vec_env/subproc_vec_env.py", line 107, in step_wait
== APP ==     results = [remote.recv() for remote in self.remotes]
== APP ==   File "/usr/local/lib/python3.7/dist-packages/stable_baselines/common/vec_env/subproc_vec_env.py", line 107, in <listcomp>
== APP ==     results = [remote.recv() for remote in self.remotes]
== APP ==   File "/usr/lib/python3.7/multiprocessing/connection.py", line 250, in recv
== APP ==     buf = self._recv_bytes()
== APP ==   File "/usr/lib/python3.7/multiprocessing/connection.py", line 407, in _recv_bytes
== APP ==     buf = self._recv(4)
== APP ==   File "/usr/lib/python3.7/multiprocessing/connection.py", line 383, in _recv
== APP ==     raise EOFError
== APP == EOFError
XavierGeerinck

comment created time in 17 days

push eventRoadwork/Roadwork-RL

Xavier Geerinck

commit sha b62e5723d6618b0bd92f80f8a4d16a82d8dfe38e

Rework client code to utilize async_to_sync methods instead

view details

push time in 17 days

issue commentdapr/python-sdk

Actor JSON Serializer randomly failing

Thanks a lot for diving into this @youngbupark , what you say might make sense actually... sadly enough I am struggling with the issue that the calls have to be synchronous due to the Libraries I am utilizing.

The entire code base I am working on can be found here: https://github.com/Roadwork/Roadwork-RL/tree/master/src (including diagrams). When you speak about "overlapping" data instead of truncating (I've never thought of it in this way, thanks a lot for this hint!) the first thing coming to my mind is the "Nest Asyncio" library (https://pypi.org/project/nest-asyncio/) that I am utilizing to access the event loop.

I wonder if I am able to create the event loop per thread 🤔 that might indeed solve the overlapping issue then.

What do you think? Is this the way I should be thinking about it? (again: sync is a requirement due to the third party libraries). Definitely open towards going through the problem together, but if it's overlapping I definitely understand that it's not a Dapr issue (nor asyncio one).

XavierGeerinck

comment created time in 17 days

issue commentdapr/python-sdk

Actor JSON Serializer randomly failing

Any update on this? :)

XavierGeerinck

comment created time in 20 days

issue commentdapr/python-sdk

Switch method to async for Dapr convenient layers

Awesome proposal @youngbupark ! Really loving all the async await implementation work, it makes everything so much easier!

One question from my side: I see a lot of libraries that did not implement async / await yet... currently I need to use a patched asyncio with run_until_complete (e.g. asyncio.get_event_loop().run_until_complete(self.proxy.SimActionSample())) to make calls synchronous for these libraries to work with (Python and AI...).

Might it be interesting to introduce this to the SDK as well, or is it more interesting to have it in the documentation somewhere?

youngbupark

comment created time in 23 days

issue commentdapr/python-sdk

Actor JSON Serializer randomly failing

Update: I am thinking it's due to aiohttp (aio-libs/aiohttp#3881)

Yeah looks like it.

What do you suggest here? Seeing that it's in the Dapr code :-)

We will look at it :) I put P1 label on this.

You rock! 😀

XavierGeerinck

comment created time in a month

issue commentdapr/python-sdk

Actor JSON Serializer randomly failing

Update: I am thinking it's due to aiohttp (aio-libs/aiohttp#3881)

Yeah looks like it.

What do you suggest here? Seeing that it's in the Dapr code :-)

XavierGeerinck

comment created time in a month

issue commentdapr/python-sdk

Actor JSON Serializer randomly failing

Update: I am thinking it's due to aiohttp (https://github.com/aio-libs/aiohttp/issues/3881)

XavierGeerinck

comment created time in a month

issue commentdapr/python-sdk

Actor JSON Serializer randomly failing

Adding @youngbupark since I think it's you that wrote the Actor implementation and could maybe help here? :)

XavierGeerinck

comment created time in a month

issue openeddapr/python-sdk

Actor JSON Serializer randomly failing

Expected Behavior

Correct serialization (99.9% of the time) on the HTTP endpoints for actors

Actual Behavior

When running a Proxy call for the Actor implementation, it randomly fails and spits out a weird JSON string, as if something happened on the protocol transport. Below you can find 2 different occurrences:

Occurrence #1:

# /home/xanrin/dapr-python-sdk/dapr/actor/client/proxy.py (line 71)
b'[[0.056063172301151286,0.43107083116247324,-0.21845425248263262,-1.2186224010316111],1.0,true,{}]lse,{}]'

# /home/xanrin/dapr-python-sdk/dapr/serializers/json.py (line 49)
b'[[0.056063172301151286,0.43107083116247324,-0.21845425248263262,-1.2186224010316111],1.0,true,{}]lse,{}]'

# What I expect:
b'[[0.056063172301151286,0.43107083116247324,-0.21845425248263262,-1.2186224010316111],1.0,true,{}]'

Occurrence #2:

# /home/xanrin/dapr-python-sdk/dapr/actor/client/proxy.py (line 71)
b'[[0.02180521361883352,0.9327880131478761,-0.04958054991416051,-1.4610110113961423],1.0,false,{}]]'

# /home/xanrin/dapr-python-sdk/dapr/serializers/json.py (line 49)
b'[[0.02180521361883352,0.9327880131478761,-0.04958054991416051,-1.4610110113961423],1.0,false,{}]]'

# What I expect (there is a ] too much):
b'[[0.02180521361883352,0.9327880131478761,-0.04958054991416051,-1.4610110113961423],1.0,false,{}]'

Stacktrace

== APP == Process ForkServerProcess-4:
== APP == Traceback (most recent call last):
== APP ==   File "/usr/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
== APP ==     self.run()
== APP ==   File "/usr/lib/python3.7/multiprocessing/process.py", line 99, in run
== APP ==     self._target(*self._args, **self._kwargs)
== APP ==   File "/usr/local/lib/python3.7/dist-packages/stable_baselines/common/vec_env/subproc_vec_env.py", line 18, in _worker
== APP ==     observation, reward, done, info = env.step(data)
== APP ==   File "/mnt/e/Projects/roadwork-rl/src/Lib/python/roadwork/roadwork/client/client_dapr.py", line 91, in step
== APP ==     obs, reward, done, info = asyncio.get_event_loop().run_until_complete(self.proxy.SimStep({ 'action': action }))
== APP ==   File "/usr/local/lib/python3.7/dist-packages/nest_asyncio.py", line 59, in run_until_complete
== APP ==     return f.result()
== APP ==   File "/usr/lib/python3.7/asyncio/futures.py", line 181, in result
== APP ==     raise self._exception
== APP ==   File "/usr/lib/python3.7/asyncio/tasks.py", line 249, in __step
== APP ==     result = coro.send(None)
== APP ==   File "/home/xanrin/dapr-python-sdk/dapr/actor/client/proxy.py", line 71, in __call__
== APP ==     return self._message_serializer.deserialize(rtnval, self._attr_call_type['return_types'])
== APP == Actor sending: b'[[0.056063172301151286,0.43107083116247324,-0.21845425248263262,-1.2186224010316111],1.0,true,{}]lse,{}]'
== APP == Decoding: b'[[0.056063172301151286,0.43107083116247324,-0.21845425248263262,-1.2186224010316111],1.0,true,{}]lse,{}]'
== APP ==   File "/home/xanrin/dapr-python-sdk/dapr/serializers/json.py", line 49, in deserialize
== APP == Actor sending: b'[[0.056063172301151286,0.43107083116247324,-0.21845425248263262,-1.2186224010316111],1.0,true,{}]lse,{}]'
== APP == Decoding: b'[[0.056063172301151286,0.43107083116247324,-0.21845425248263262,-1.2186224010316111],1.0,true,{}]lse,{}]'
== APP ==     obj = json.loads(data, cls=DaprJSONDecoder)
== APP ==   File "/usr/lib/python3.7/json/__init__.py", line 361, in loads
== APP ==     return cls(**kw).decode(s)
== APP ==   File "/usr/lib/python3.7/json/decoder.py", line 340, in decode
== APP ==     raise JSONDecodeError("Extra data", s, end)
== APP == json.decoder.JSONDecodeError: Extra data: line 1 column 96 (char 95)

Steps to Reproduce the Problem

This happens when running an application that is utilizing a ThreadPool and running > 1000 reqs / sec (estimated)

created time in a month

issue commentdapr/python-sdk

Please mark Dapr-dev Python >= 3.7 instead of 3.8

Awesome work! This seems really useful 😊 currently I switched back the HTTP layer as well seeing the amazing speed, might switch back to gRPC after a while.

P.S. Seeing an odd bug that "might" have to do with Dapr at high velocity of calls, I'll post the relevant Stacktrace here already but it might be a bug in my code as well. It happens randomly whenever doing a lot of calls.... unsure if it's my code, dapr or python core code...

== APP ==   File "/home/xanrin/dapr-python-sdk/dapr/actor/client/proxy.py", line 71, in __call__
== APP ==     return self._message_serializer.deserialize(rtnval, self._attr_call_type['return_types'])
== APP ==   File "/home/xanrin/dapr-python-sdk/dapr/serializers/json.py", line 49, in deserialize
== APP ==     obj = json.loads(data, cls=DaprJSONDecoder)
== APP ==   File "/usr/lib/python3.7/json/__init__.py", line 361, in loads
== APP ==     return cls(**kw).decode(s)
== APP ==   File "/usr/lib/python3.7/json/decoder.py", line 340, in decode
== APP ==     raise JSONDecodeError("Extra data", s, end)
== APP == json.decoder.JSONDecodeError: Extra data: line 1 column 95 (char 94)
XavierGeerinck

comment created time in a month

issue commentdapr/python-sdk

Please mark Dapr-dev Python >= 3.7 instead of 3.8

Awesome, thanks a lot! :) this will specifically enable tensorflow 1.14.0 to be utilized!

XavierGeerinck

comment created time in a month

push eventRoadwork/Roadwork-RL

Xavier Geerinck

commit sha cbd3a85e3596b1e880bec691589cee7ab59a7813

Add latest discoveries

view details

push time in a month

push eventRoadwork/Roadwork-RL

Xavier Geerinck

commit sha 7b8ce4a0aa7143fe46a3195b2a4a5283cc2c6a89

Make Dapr Actor main version, made PyPi package, Kubernetes deployment

view details

push time in a month

fork XavierGeerinck/docs

User documentation for Dapr

fork in a month

issue openeddapr/python-sdk

Please mark Dapr-dev Python >= 3.7 instead of 3.8

Describe the proposal

I would like to see Python >= 3.7 supported instead of 3.8 (which is cutting edge), seeing that a lot of libraries are still depending on 3.7 at the moment.

created time in a month

push eventXavierGeerinck/XavierGeerinck

xavier geerinck

commit sha 9e5cfeefabd83eff2b08b1a8a8e6b82ada9168e3

Update README.md

view details

push time in a month

create barnchXavierGeerinck/XavierGeerinck

branch : master

created branch time in a month

created repositoryXavierGeerinck/XavierGeerinck

Personal README

created time in a month

issue openeddapr/docs

One Pod per Actor instance?

I'm currently working on a framework implementation on Dapr for Reinforcement Learning where I would require an isolated container per environment, but the ability of spinning up 100s of similar containers for this environment (thus having 100s of isolated environments that work independently).

Currently I'm using the Actor model for this since it's an ideal fit in my opinion (I could use some brainstorming here) since:

  • It's completely isolated
  • State store integration
  • Placement service that automatically figures out where to place a new environment when I create it

Allowing me to do something like this:

for i in range(0, 10):
    env = env.make(i, 'MyEnv')

Where i would be the unique environment of type 'MyEnv' (aka: actorId), whereafter I can start manipulating the different environments.

Now my question here is: can actors be forced to run in independent pods through the placement servers? Aka: 1 pod has 1 environment (actor) and 1 Dapr Runtime.

The reason for this is since these Environments register themselves globally and start interfering with each other.

Reference Document I have been reading for this: https://github.com/dapr/docs/blob/master/concepts/actors/README.md

created time in a month

push eventRoadwork/Roadwork-RL

Xavier Geerinck

commit sha eef2c707460adddefbe05ffb71489cc997421f85

Add state manager

view details

push time in a month

push eventRoadwork/Roadwork-RL

Xavier Geerinck

commit sha 81924017b60be7aaa88a4f3525d8507b77763e42

Add WIP for set_data and get_data for VecEnv manipulation and add MultiDiscrete

view details

push time in a month

push eventRoadwork/Roadwork-RL

Xavier Geerinck

commit sha 8f331532a9674dda79581f6bd4f93c3373db61cd

Add diagrams

view details

push time in a month

push eventRoadwork/Roadwork-RL

Xavier Geerinck

commit sha 80105e4b236fe184abe096ada972497d300213e9

Update documentation

view details

push time in a month

push eventRoadwork/Roadwork-RL

Xavier Geerinck

commit sha 1a2a700cfe0d2f281c8b03c3e4ce55583af9b5e5

Add Dapr Actor implementation

view details

push time in a month

issue commentdapr/dapr

gRPC & HTTP Socket Timeout

Hi @youngbupark my apologies for the late answer! Currently I am not seeing this issue anymore so I guess this is solved :) thanks a lot for this!

XavierGeerinck

comment created time in 2 months

issue closedopenai/gym

Windows - OpenGL Exception - glClearColor

When trying to step through my classic_control environment, I randomly get the following stack trace:

(<class 'pyglet.gl.lib.GLException'>, GLException(b'invalid operation'), <traceback object at 0x17AF3F28>)
  File "E:\Projects\roadwork-rl\src\Servers\OpenAI\OpenAIEnv.py", line 81, in reset
    obs = env.reset()
  File "C:\Users\thebi\AppData\Local\Programs\Python\Python38-32\lib\site-packages\gym\wrappers\monitor.py", line 39, in reset
    self._after_reset(observation)
  File "C:\Users\thebi\AppData\Local\Programs\Python\Python38-32\lib\site-packages\gym\wrappers\monitor.py", line 185, in _after_reset
    self.reset_video_recorder()
  File "C:\Users\thebi\AppData\Local\Programs\Python\Python38-32\lib\site-packages\gym\wrappers\monitor.py", line 206, in reset_video_recorder
    self.video_recorder.capture_frame()
  File "C:\Users\thebi\AppData\Local\Programs\Python\Python38-32\lib\site-packages\gym\wrappers\monitoring\video_recorder.py", line 101, in capture_frame
    frame = self.env.render(mode=render_mode)
  File "C:\Users\thebi\AppData\Local\Programs\Python\Python38-32\lib\site-packages\gym\core.py", line 233, in render
    return self.env.render(mode, **kwargs)
  File "C:\Users\thebi\AppData\Local\Programs\Python\Python38-32\lib\site-packages\gym\envs\classic_control\cartpole.py", line 213, in render
    return self.viewer.render(return_rgb_array=mode == 'rgb_array')
  File "C:\Users\thebi\AppData\Local\Programs\Python\Python38-32\lib\site-packages\gym\envs\classic_control\rendering.py", line 104, in render
    glClearColor(1,1,1,1)
  File "C:\Users\thebi\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyglet\gl\lib.py", line 107, in errcheck
    raise GLException(msg)

Does anyone have experience with this? It seems that glClearColor cannot be executed (even though it is running just fine and randomly hits that issue)

closed time in 2 months

XavierGeerinck

issue commentopenai/gym

Windows - OpenGL Exception - glClearColor

:/ thanks for trying! it's a fresh installation though of windows so it's a bit strange... anyways, I'll close this issue seeing that it's too hard to reproduce at the moment (I think it might be due to hardware / driver combination). Will re-open once I have enough information to reproduce it consistently, but until then I'll keep using WSL 2 where it does seem to work.

XavierGeerinck

comment created time in 2 months

Pull request review commentdapr/python-sdk

[Actor] Add actor state management

-# Dapr SDK for Python-This is the Dapr SDK for Python, based on the auto-generated proto client.<br>--For more info on Dapr and gRPC, visit [this link](https://github.com/dapr/docs/tree/master/howto/create-grpc-app).--The repository generates following package-- dapr--### Installing package-```sh-pip install dapr-client+# Dapr SDK++> WIP - Porting from [dotnet-sdk](https://github.com/dapr/dotnet-sdk) to python+> +> Dapr core team does not have the official plan to support python-sdk now, except for the auto-generated gRPC client. but we're always welcoming any contribution.++## Structure of Python SDK++* [dapr/actor](./dapr/actor): Actor Framework+* [dapr/clients](./dapr/clients): HTTP clients for Dapr building blocks+* [dapr/serializers](./dapr/serializers): serializer/deserializer+* [dapr/conf](./dapr/conf): Configuration+* [flask_dapr](./flask_dapr): flask extension for Dapr+* [tests](./tests/): unit-tests+* [examples/demo_actor](./examples/demo_actor): demo actor example++## Status++* [x] Initial implementation of Actor Runtime/Manager/Proxy+* [x] Actor service invocation+* [x] RPC style actor proxy+* [x] Flask integration for Dapr Actor Service+* [x] Example for Actor service invocation+* [x] Complete tox.ini setup+* [x] Actor state management+* [ ] Actor timer+* [ ] Actor reminder+* [ ] Handle Error properly+* [ ] Package Dapr Actor SDK+* [ ] Create gRPC and HTTP rest clients for Dapr+* [ ] Flask extensions for Dapr State/Pubsub/Bindings+* [ ] Package Dapr SDK++## Developing++### Prerequisites++* [Install Dapr standalone mode](https://github.com/dapr/cli#install-dapr-on-your-local-machine-standalone)+* [Install Python 3.8+](https://www.python.org/downloads/)

Update: tested and working on Python 3.7.7 can we adapt this?

image

youngbupark

comment created time in 2 months

Pull request review commentdapr/python-sdk

[Actor] Add actor state management

-# Dapr SDK for Python-This is the Dapr SDK for Python, based on the auto-generated proto client.<br>--For more info on Dapr and gRPC, visit [this link](https://github.com/dapr/docs/tree/master/howto/create-grpc-app).--The repository generates following package-- dapr--### Installing package-```sh-pip install dapr-client+# Dapr SDK++> WIP - Porting from [dotnet-sdk](https://github.com/dapr/dotnet-sdk) to python+> +> Dapr core team does not have the official plan to support python-sdk now, except for the auto-generated gRPC client. but we're always welcoming any contribution.++## Structure of Python SDK++* [dapr/actor](./dapr/actor): Actor Framework+* [dapr/clients](./dapr/clients): HTTP clients for Dapr building blocks+* [dapr/serializers](./dapr/serializers): serializer/deserializer+* [dapr/conf](./dapr/conf): Configuration+* [flask_dapr](./flask_dapr): flask extension for Dapr+* [tests](./tests/): unit-tests+* [examples/demo_actor](./examples/demo_actor): demo actor example++## Status++* [x] Initial implementation of Actor Runtime/Manager/Proxy+* [x] Actor service invocation+* [x] RPC style actor proxy+* [x] Flask integration for Dapr Actor Service+* [x] Example for Actor service invocation+* [x] Complete tox.ini setup+* [x] Actor state management+* [ ] Actor timer+* [ ] Actor reminder+* [ ] Handle Error properly+* [ ] Package Dapr Actor SDK+* [ ] Create gRPC and HTTP rest clients for Dapr+* [ ] Flask extensions for Dapr State/Pubsub/Bindings+* [ ] Package Dapr SDK++## Developing++### Prerequisites++* [Install Dapr standalone mode](https://github.com/dapr/cli#install-dapr-on-your-local-machine-standalone)+* [Install Python 3.8+](https://www.python.org/downloads/)

I need 3.7 :( stable baselines requires me to utilize 3.7 (due to tensorflow 1.14). Is there any way to have 3.7 in scope? @youngbupark

youngbupark

comment created time in 2 months

issue commentopenai/gym

Windows - OpenGL Exception - glClearColor

Update: replicated it exactly with this code even:

import gym
env = gym.make('CartPole-v1')
env.reset()
for _ in range(1000):
    env.render()
    env.step(env.action_space.sample()) # take a random action
env.close()

Resulting in: GLException(b\'invalid operation\')

XavierGeerinck

comment created time in 2 months

issue commentdapr/components-contrib

OnInvoke Slow Performance on Local Machine

Any update on this? Currently still there when using normal dapr run in runtime version 0.7.1

I found the bug in mdns service discovery logic. Please look at the fix #362

That looks awesome! Is there any way I can test this myself easily?

XavierGeerinck

comment created time in 2 months

issue commentopenai/gym

Windows - OpenGL Exception - glClearColor

Apologies for the late response. This happens for me when just running a very basic code (I added this below), but it happens randomly as well. As in, when I train for around 1000 timesteps, it just kills. I'm suspecting a driver issue, but I have updated them to the latest version and it is still happening. (I have a NVIDIA 1070 card)

import gym

env = gym.make("CartPole-v1")
env.reset()

action = env.action_space_sample()
env.step(action)

for i in range(10000):
    action, _states = model.predict(obs)
    obs, rewards, dones, info = env_local.step(action)
    env_local.render()
XavierGeerinck

comment created time in 2 months

issue commentdapr/dapr

gRPC & HTTP Socket Timeout

@youngbupark these are both running on the K8S cluster installation :) since there is the other bug in the normal one preventing good performance

XavierGeerinck

comment created time in 2 months

push eventRoadwork/Roadwork-RL

Xavier Geerinck

commit sha 85c10599f0a513e35fa06e57a2b4a6bda340a942

Changes

view details

push time in 2 months

push eventthebillkidy/xbox-robot-arm

Xavier Geerinck

commit sha 60d2a257d52e893452c7129461bdc7095970b33e

Add source code

view details

push time in 2 months

create barnchthebillkidy/xbox-robot-arm

branch : master

created branch time in 2 months

created repositorythebillkidy/xbox-robot-arm

created time in 2 months

push eventRoadwork/Roadwork-RL

Xavier Geerinck

commit sha efd6bf697903d2e9440995aff154127fa1603a7a

Lib was in gitignore

view details

Xavier Geerinck

commit sha 89d2b95439b91c53c48b2c7a79066aa681fe198b

Remove __pycache__

view details

Xavier Geerinck

commit sha 2e5b3098156b4f0cfb7bc41135bd886525d5349c

Utilize gym flatten and unflatten for observation sending

view details

push time in 2 months

push eventRoadwork/Roadwork-RL

Xavier Geerinck

commit sha 4055f4516ad78f9482ddaf588819de266c2581f3

Packaging client and server as python lib

view details

push time in 2 months

issue commentopenai/gym

Windows - OpenGL Exception - glClearColor

It indeed does :) it also works in WSL perfectly but not on Windows... it's quite strange actually

thebillkidy

comment created time in 2 months

push eventRoadwork/Roadwork-RL

Xavier Geerinck

commit sha f808d894ae346dd04a104f3983186f0108c29a62

Working on client library

view details

push time in 2 months

startedray-project/ray

started time in 2 months

push eventRoadwork/Roadwork-RL

Xavier Geerinck

commit sha 4ce202f8dbdfd9671a1f5a1d2951ad19b507bd7f

Remove Dapr until stable release

view details

push time in 2 months

issue openedopenai/gym

Windows - OpenGL Exception - glClearColor

When trying to step through my classic_control environment, I randomly get the following stack trace:

(<class 'pyglet.gl.lib.GLException'>, GLException(b'invalid operation'), <traceback object at 0x17AF3F28>)
  File "E:\Projects\roadwork-rl\src\Servers\OpenAI\OpenAIEnv.py", line 81, in reset
    obs = env.reset()
  File "C:\Users\thebi\AppData\Local\Programs\Python\Python38-32\lib\site-packages\gym\wrappers\monitor.py", line 39, in reset
    self._after_reset(observation)
  File "C:\Users\thebi\AppData\Local\Programs\Python\Python38-32\lib\site-packages\gym\wrappers\monitor.py", line 185, in _after_reset
    self.reset_video_recorder()
  File "C:\Users\thebi\AppData\Local\Programs\Python\Python38-32\lib\site-packages\gym\wrappers\monitor.py", line 206, in reset_video_recorder
    self.video_recorder.capture_frame()
  File "C:\Users\thebi\AppData\Local\Programs\Python\Python38-32\lib\site-packages\gym\wrappers\monitoring\video_recorder.py", line 101, in capture_frame
    frame = self.env.render(mode=render_mode)
  File "C:\Users\thebi\AppData\Local\Programs\Python\Python38-32\lib\site-packages\gym\core.py", line 233, in render
    return self.env.render(mode, **kwargs)
  File "C:\Users\thebi\AppData\Local\Programs\Python\Python38-32\lib\site-packages\gym\envs\classic_control\cartpole.py", line 213, in render
    return self.viewer.render(return_rgb_array=mode == 'rgb_array')
  File "C:\Users\thebi\AppData\Local\Programs\Python\Python38-32\lib\site-packages\gym\envs\classic_control\rendering.py", line 104, in render
    glClearColor(1,1,1,1)
  File "C:\Users\thebi\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyglet\gl\lib.py", line 107, in errcheck
    raise GLException(msg)

Does anyone have experience with this? It seems that glClearColor cannot be executed (even though it is running just fine and randomly hits that issue)

created time in 2 months

issue commentdapr/dapr

gRPC Socket Timeout

What would be the preferred way for measuring RPS? (gRPC and HTTP scenarios)

Note: this is also happening through HTTP:

==================================================
DAPR_PORT_GRPC: 50001; DAPR_PORT_HTTP: 3500
==================================================
Action Space (Name= Discrete; N=2)
[Episode 0] - Mean survival time over last 100 episodes was 28.0 ticks.
[Episode 10] - Mean survival time over last 100 episodes was 21.272727272727273 ticks.
[Episode 20] - Mean survival time over last 100 episodes was 21.047619047619047 ticks.
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 670, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 426, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 421, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/local/lib/python3.8/http/client.py", line 1332, in getresponse
    response.begin()
  File "/usr/local/lib/python3.8/http/client.py", line 303, in begin
    version, status, reason = self._read_status()
  File "/usr/local/lib/python3.8/http/client.py", line 272, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 724, in urlopen
    retries = retries.increment(
  File "/usr/local/lib/python3.8/site-packages/urllib3/util/retry.py", line 403, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/usr/local/lib/python3.8/site-packages/urllib3/packages/six.py", line 734, in reraise
    raise value.with_traceback(tb)
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 670, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 426, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 421, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/local/lib/python3.8/http/client.py", line 1332, in getresponse
    response.begin()
  File "/usr/local/lib/python3.8/http/client.py", line 303, in begin
    version, status, reason = self._read_status()
  File "/usr/local/lib/python3.8/http/client.py", line 272, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "main.py", line 111, in <module>
    solver.run()
  File "main.py", line 80, in run
    stepResponse = self.env.Step(action)
  File "/app/Client.py", line 50, in Step
    res = requests.post(f"{self.url}/method/{self.instanceId}/step", json=msg)
  File "/usr/local/lib/python3.8/site-packages/requests/api.py", line 119, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/requests/api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 530, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 643, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 498, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
thebillkidy

comment created time in 2 months

issue openeddapr/dapr

gRPC Socket Timeout

<!-- If you need to report a security issue with Dapr, send an email to daprct@microsoft.com. -->

In what area(s)?

/area runtime

What version of Dapr?

0.7.0 CLI & 0.7.1 Runtime

Expected Behavior

No Socket Timeout to appear.

Actual Behavior

gRPC is giving "Socket Closed" after a while of interacting with it in High Performance use-case. Initial start-up is working fine, error occurs while running.

Traceback (most recent call last):
  File "main.py", line 110, in <module>
    solver.run()
  File "main.py", line 68, in run
    current_state = self.discretize(self.env.Reset())
  File "/app/Client.py", line 50, in Reset
    res = self.DaprInvoke("reset", req, roadwork_messages.ResetResponse)
  File "/app/Client.py", line 32, in DaprInvoke
    res = self.client.InvokeService(envelope)
  File "/usr/local/lib/python3.8/site-packages/grpc/_channel.py", line 826, in __call__
    return _end_unary_response_blocking(state, call, False, None)
  File "/usr/local/lib/python3.8/site-packages/grpc/_channel.py", line 729, in _end_unary_response_blocking
    raise _InactiveRpcError(state)
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
        status = StatusCode.UNAVAILABLE
        details = "Socket closed"
        debug_error_string = "{"created":"@1591193163.315580000","description":"Error received from peer ipv4:127.0.0.1:50001","file":"src/core/lib/surface/call.cc","file_line":1056,"grpc_message":"Socket closed","grpc_status":14}"

Steps to Reproduce the Problem

Not entirely sure, but this is happening at: https://github.com/thebillkidy/Roadwork-RL to startup:

cd src/

**Server**
./Scripts/windows/build.ps1 ./Servers/OpenAI/ rw-server-openai
./Scripts/windows/start-server.ps1 ./Servers/OpenAI/ rw-server-openai

**Client**
./Scripts/windows/build.ps1 ./Clients/python/experiments/cartpole/ rw-client-python-cartpole
./Scripts/windows/start-client.ps1 ./Clients/python/experiments/cartpole/ rw-client-python-cartpole

created time in 2 months

push eventRoadwork/Roadwork-RL

Xavier Geerinck

commit sha 9f7e1032e03afb0a2f43863185fa294eecc6053a

Rework starting, easier now as well as add rest endpoints due to an TCP issue

view details

push time in 2 months

issue commentdapr/components-contrib

OnInvoke Slow Performance on Local Machine

Any update on this? Currently still there when using normal dapr run in runtime version 0.7.1

thebillkidy

comment created time in 2 months

push eventRoadwork/Roadwork-IoT

Xavier Geerinck

commit sha 9de16e0d2fbdeefb71ee31f2761781cde78c20c0

Missing component files

view details

push time in 2 months

push eventRoadwork/Roadwork-IoT

Xavier Geerinck

commit sha 428ed0a28ecc09584b6f2f971c86e35b5d83c798

Telemetry Processor Updates

view details

push time in 2 months

push eventRoadwork/Roadwork-IoT

Xavier Geerinck

commit sha 536af986cb5eb1894bd0ffa753b7317d5ddbad53

Add Tailwind

view details

Xavier Geerinck

commit sha ac4d25da3f9a518ceae83d3d8529634f55b77d22

POC Done!

view details

push time in 2 months

push eventRoadwork/Roadwork-IoT

Xavier Geerinck

commit sha 5b76555952cfa41d49c3b82afea41ff2dfefff3b

Add Actor, Add Frontend, Add Backend Redis interface

view details

push time in 3 months

issue closeddapr/dapr

[Actors] Error while updating new Actor State: ERR_ACTOR_INSTANCE_MISSING

<!-- If you need to report a security issue with Dapr, send an email to daprct@microsoft.com. -->

In what area(s)?

<!-- Remove the '> ' to select -->

/area runtime /area placement

What version of Dapr?

<!-- Delete all but your choice -->

0.7.1

Expected Behavior

According to the sources below, when calling POST http://localhost:${DAPR_PORT}/v1.0/actors/${actorType}/${actorId}/state I should be able to provide a state which should update the state.

  • https://github.com/dapr/docs/blob/v0.7.0/concepts/actors/README.md
  • https://github.com/dapr/docs/blob/v0.7.0/reference/api/actors_api.md#save-actor-state

<!-- Briefly describe what you expect to happen -->

Actual Behavior

However when calling the URL describe above with a body, I get the following error code:

ERR_ACTOR_INSTANCE_MISSING

This happens in the case of a self-hosted or kubernetes environment.

Main OS: Windows, Docker Environment: DockerDesktopVM

<!-- Briefly describe what is actually happening -->

Steps to Reproduce the Problem

<!-- How can a maintainer reproduce this issue (be detailed) -->

const fetch = require('node-fetch');

const res = await fetch(`http://localhost:${DAPR_PORT}/v1.0/actors/test-actor/my-device-1/state`, {
    method: 'POST',
    headers: {
        "Content-Type": "application/json"
    },
    body: JSON.stringify({ hello: 'world' })
});

closed time in 3 months

thebillkidy

issue commentdapr/dapr

[Actors] Error while updating new Actor State: ERR_ACTOR_INSTANCE_MISSING

Update: tested and working! Thanks a lot for the help :) will close this one

thebillkidy

comment created time in 3 months

issue commentdapr/dapr

[Actors] Error while updating new Actor State: ERR_ACTOR_INSTANCE_MISSING

Aha, now I get it! :) perfect! will try that right away

thebillkidy

comment created time in 3 months

issue commentdapr/dapr

[Actors] Error while updating new Actor State: ERR_ACTOR_INSTANCE_MISSING

I thought so, might it be that the documentation could require clarification then? 😊 When reading it, it states the following: "As a result, they do not need to be explicitly created or destroyed. The Dapr actors runtime automatically activates an actor the first time it receives a request for that actor ID" which made me think that they were automatically created.

What are the best practices on creating one then? First always check if already exists, if not call the invocation endpoint?

thebillkidy

comment created time in 3 months

create barnchRoadwork/Roadwork-IoT

branch : master

created branch time in 3 months

issue openeddapr/dapr

[Actors] Error while updating new Actor State: ERR_ACTOR_INSTANCE_MISSING

<!-- If you need to report a security issue with Dapr, send an email to daprct@microsoft.com. -->

In what area(s)?

<!-- Remove the '> ' to select -->

/area runtime /area placement

What version of Dapr?

<!-- Delete all but your choice -->

0.7.1

Expected Behavior

According to the sources below, when calling POST http://localhost:${DAPR_PORT}/v1.0/actors/${actorType}/${actorId}/state I should be able to provide a state which should update the state.

  • https://github.com/dapr/docs/blob/v0.7.0/concepts/actors/README.md
  • https://github.com/dapr/docs/blob/v0.7.0/reference/api/actors_api.md#save-actor-state

<!-- Briefly describe what you expect to happen -->

Actual Behavior

However when calling the URL describe above with a body, I get the following error code:

ERR_ACTOR_INSTANCE_MISSING

This happens in the case of a self-hosted or kubernetes environment.

Main OS: Windows, Docker Environment: DockerDesktopVM

<!-- Briefly describe what is actually happening -->

Steps to Reproduce the Problem

<!-- How can a maintainer reproduce this issue (be detailed) -->

const fetch = require('node-fetch');

const res = await fetch(`http://localhost:${DAPR_PORT}/v1.0/actors/test-actor/my-device-1/state`, {
    method: 'POST',
    headers: {
        "Content-Type": "application/json"
    },
    body: JSON.stringify({ hello: 'world' })
});

created time in 3 months

pull request commentdapr/python-sdk

Regen proto clients and update examples accordingly

@thebillkidy We rename daprclient to appcallback. #17 issue will be gone.

Awesome, thanks a lot for fixing! 😊 also glad to see a new more clearer name!

youngbupark

comment created time in 3 months

created repositoryRoadwork/Roadwork-IoT

created time in 3 months

push eventRoadwork/Roadwork-RL

Xavier Geerinck

commit sha f9848314f006ca6710f6735472d10f62a0ee6bcb

Move files to Roadwork

view details

push time in 3 months

create barnchRoadwork/RL

branch : master

created branch time in 3 months

created repositoryRoadwork/RL

created time in 3 months

push eventthebillkidy/python-sdk

Xavier Geerinck

commit sha 04a952a9aedf93e49fb2385d5926013970f672a4

Remove old proto generator

view details

push time in 3 months

Pull request review commentdapr/python-sdk

Add example for Kubernetes deployment

+syntax = "proto3";++package dapr;++import "google/protobuf/any.proto";

Nope, removed it :)

thebillkidy

comment created time in 3 months

push eventthebillkidy/python-sdk

Xavier Geerinck

commit sha 8d4dc16cb01d6c86b85a8c3a6ab2ab98c7136c14

Remove proto files

view details

push time in 3 months

more