Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP Celery Code Impact #97

Draft
wants to merge 138 commits into
base: celery
Choose a base branch
from
Draft

WIP Celery Code Impact #97

wants to merge 138 commits into from

Conversation

DaanZ
Copy link

@DaanZ DaanZ commented Jun 8, 2020

Checking to see the code impact of Celery branch from Sam.

…e task which puts a robot in queue instead of busy waiting.
…instead of queue and simulator_worker. celery worker will get a task directly from the celery queue now.
…lobal instead of redefined every update iteration.
…ently normal simulations without celery cant be run due to changes in worldcontroller.cpp. Will fix this soon.
…culated in the cpp part now, not the robotmanager part. For details go to worldcontroller.cpp function OnContacts().
…ate_from_celery(), this means everything is implemented now.
…a robot gets lost, a result of None is read instead of a crash.
…enerations passed by. Still studying the effect of restarting.

def displacement_velocity_hill(robot_manager):
dist, time = displacement(robot_manager)
if time.is_zero():
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert

@@ -81,17 +82,19 @@ def displacement_velocity(robot_manager):
:return:
"""
dist, time = displacement(robot_manager)
if time.is_zero():
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert


if individual.phenotype._behavioural_measurements is None:
assert (individual.fitness is None)
assert (individual.fitness is None)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

space

@@ -228,22 +253,42 @@ async def evaluate(self, new_individuals, gen_num, type_simulation = 'evolve'):
:param new_individuals: newly created population after an evolution iteration
:param gen_num: generation number
"""
b2 = time.time()
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Be less cryptic with variables.

@@ -5,11 +5,9 @@
def stupid(_robot_manager, robot):
return 1.0


def random(_robot_manager, robot):
return py_random.random()
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert removed lines

@@ -0,0 +1,48 @@

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put speeddata in a celery folder.

@@ -0,0 +1,142 @@
from __future__ import absolute_import, unicode_literals
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is pycelery not part of pyrevolve?

connection = await World.create(settings, world_address=('127.0.0.1', settings.port_start+i))

await asyncio.sleep(2)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

global settings
global connection
global analyzer_connection
global analyzer_supervisor
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reduce global variables

Copy link
Author

@DaanZ DaanZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview review shows a partial different programming style which needs to brushed up before committing to CI Revolve.
Also some structural choices have to be discussed to ensure that the coming version of Revolve can still support previous experimental setup.

worker11345.pid Outdated
@@ -0,0 +1 @@
13927
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These files should not be included, and thus be added to gitignore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants