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

Where is numpy.object_ from? #211

Closed
fulacse opened this issue Dec 30, 2023 · 3 comments
Closed

Where is numpy.object_ from? #211

fulacse opened this issue Dec 30, 2023 · 3 comments

Comments

@fulacse
Copy link

fulacse commented Dec 30, 2023

from marllib import marl

env = marl.make_env(environment_name="sisl", map_name="pursuit")

mappo = marl.algos.mappo(hyperparam_source="common")

model = marl.build_model(env, mappo, {
"conv_layer": 3,
"out_channel_layer_0": 64,
"kernel_size_layer_0": 3,
"stride_layer_0": 1,
"padding_layer_0": 0,
"pool_size_layer_0": 1,
"out_channel_layer_1": 128,
"kernel_size_layer_1": 3,
"stride_layer_1": 1,
"padding_layer_1": 0,
"pool_size_layer_1": 1,
"out_channel_layer_2": 256,
"kernel_size_layer_2": 3,
"stride_layer_2": 1,
"padding_layer_2": 0,
"pool_size_layer_2": 1,
"hidden_state_size": 512,
"core_arch": "mlp",
})

mappo.fit(env, model, stop={'timesteps_total': 1000000}, share_policy='all', checkpoint_freq=10, checkpoint_end=True,
local_mode=False, num_gpus=1, num_workers=5)
error.txt

@fulacse
Copy link
Author

fulacse commented Dec 30, 2023

and I don't want pool layer, how do I remove it?

@Aequatio-Space
Copy link

For the "numpy.object_" problem, try checking ray-project/ray#26863, you may find the solution in commits.
Apply a patch to the ray library will solve the problem.

Pooling layer is hardcoded in here, if you want to get rid out of it, some modification of the library may needed.

pool_f = nn.MaxPool2d(kernel_size=self.custom_config["model_arch_args"]["pool_size_layer_{}".format(i)])
layers.append(pool_f)

@fulacse
Copy link
Author

fulacse commented Dec 31, 2023

For the "numpy.object_" problem, try checking ray-project/ray#26863, you may find the solution in commits. Apply a patch to the ray library will solve the problem.

Pooling layer is hardcoded in here, if you want to get rid out of it, some modification of the library may needed.

pool_f = nn.MaxPool2d(kernel_size=self.custom_config["model_arch_args"]["pool_size_layer_{}".format(i)])
layers.append(pool_f)

Thanks, is probleme of pythorch version. And I think it don't change anything if pool_size = 1

@fulacse fulacse closed this as completed Dec 31, 2023
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

No branches or pull requests

2 participants