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

CEM #3

Open
mkolodziejczyk-piap opened this issue Aug 18, 2021 · 2 comments
Open

CEM #3

mkolodziejczyk-piap opened this issue Aug 18, 2021 · 2 comments

Comments

@mkolodziejczyk-piap
Copy link

Hi, I noticed there are some problems with running CEM.

  1. Here the last index should be 7:

    @partial(jit, static_argnums=(0, 1, 9))

    (similar in random shooting:
    @partial(jit, static_argnums=(0, 1, 9))
    )

  2. Default hyperparameters should be frozendict
    https://github.com/google/trajax/blob/main/trajax/optimizers.py#L685-L692

Would you like a PR for this?

Regards,

@stephentu
Copy link
Collaborator

Good catch! Feel free to send a PR.

@kwesiRutledge
Copy link

I suspect that I might be having a similar issue with using the cem and random_shooting methods. I receive the error:

Traceback (most recent call last):
  File "XX/trajax/tests/optimizers_test.py", line 850, in testCEM1
    X_opt, U_opt, obj, = optimizers.random_shooting(
  File "XX/trajax/trajax/optimizers.py", line 1160, in random_shooting
    controls = gaussian_samples(random_key, mean, stdev, control_low,
ValueError: Non-hashable static arguments are not supported, as this can lead to unexpected cache-misses. Static argument (index 5) of type <class 'dict'> for function gaussian_samples is non-hashable.

when trying to use random_shooting. I will investigate and make a PR for this, if I can fix it quickly enough.

I'll attach the method that I added to OptimizersTest to demonstrate this behavior.
testCEM1.txt

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

3 participants