Closed ahmadmobeen closed 4 weeks ago
Hi again! I was not able to replicate this issue. I'm using rabbitmq 3.6.10. It looks like a permissions issue. Have you followed the steps in: https://github.com/gmontamat/gentun#basic-rabbitmq-installation-and-setup ? It seems that the server user doesn't have enough permissions to clean up the job queue
@ahmadmobeen to be more specific, try running:
$ sudo rabbitmqctl set_permissions -p / test ".*" ".*" ".*"
To update permissions for the test
user you're using with the server code.
Hi again! I was not able to replicate this issue. I'm using rabbitmq 3.6.10. It looks like a permissions issue. Have you followed the steps in: https://github.com/gmontamat/gentun#basic-rabbitmq-installation-and-setup ? It seems that the server user doesn't have enough permissions to clean up the job queue
Actually this is not a permission problem. The real problem is that setup a new user named test
on RabbitMQ and replaced the credentials at the following line.
https://github.com/gmontamat/gentun/blob/d852041421ff174ff9437f7a93aeedb121813f0a/tests/mnist_server.py#L20
When the server instance of DistributedPopulation is created the default value of user guest
is replated with test
and first generation runs just fine. However, in subsequent generation the default values of credentials are not replaced by test
user. We checked it by debugging these 2 places.
In class RpcClient(object).__init__()
https://github.com/gmontamat/gentun/blob/d852041421ff174ff9437f7a93aeedb121813f0a/gentun/server.py#L26
In class DistributedPopulation(Population).__init__()
https://github.com/gmontamat/gentun/blob/d852041421ff174ff9437f7a93aeedb121813f0a/gentun/server.py#L95
Both are initialized with default user guest
in the 2nd generation.
@shehzi-khan thank you very much for reporting this bug. I overlooked this problem (will update tests to cover non-guest rabbitmq user).
The issue here boiled down to the way a new population was created in the evolve()
method:
new_population = self.get_population_type()(
self.population.get_species(), self.x_train, self.y_train, individual_list=[],
maximize=self.population.get_fitness_criteria()
)
A method to return the type is used to instantiate a new population, and parameters of the DistributedPopulation (and any other subclass) were missed. This is now fixed in the refactor, a population.duplicate()
method is used now when creating a new generation. RabbitMQ is also overkill for the simple messaging queue it needs, so redis is used instead.
I tried this method and it worked for generation # 1.
got the following error in both cases:
Originally posted by @ahmadmobeen in https://github.com/gmontamat/gentun/issues/17#issuecomment-596339798