Skip to content

ImportError: Cannot Import experiments from acme.jax #335

Open
@engichang1467

Description

@engichang1467

I've installed Acme on my system and am trying to run code from the quickstart tutorial. However, I encountered an issue when importing experiments from acme.jax.

Here is the snippet of code I used:

from acme import specs
from acme import wrappers
from acme.agents.jax import d4pg
from acme.jax import experiments
from acme.utils import loggers

The imports work fine except for the following error:

Traceback (most recent call last):
  File "/teamspace/studios/this_studio/test.py", line 27, in <module>
    from acme.jax import experiments
ImportError: cannot import name 'experiments' from 'acme.jax' (/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/acme/jax/__init__.py)

What I've Tried:

  • Verified that experiments exists in the source code.
  • Checked my installation to ensure I have the latest version of Acme.

Environment Details:

  • Platform: Light AI Studio (Cloud)
  • Operating System: Ubuntu 20.04.6 LTS (Focal Fossa)
  • Python Version: 3.10
  • GPU: NVIDIA T4
  • Acme Version: 0.4.0

Here's the relevant system information:

NAME="Ubuntu"
VERSION="20.04.6 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.6 LTS"
VERSION_ID="20.04"

Expected Behavior:
The experiments module should import successfully, as shown in the tutorial.

Actual Behavior:
An ImportError occurs, even though experiments is present in the source code.

Question:
What could be causing this issue, and how can I resolve it? Is there any configuration or additional step required to use this module?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions