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

Import error while using examples jupyter notebook custom_env.ipynb #2283

Open
Kamyab-Majid opened this issue Jun 3, 2021 · 6 comments
Open

Comments

@Kamyab-Majid
Copy link

ImportError: cannot import name 'TFTrainer' from 'garage.experiment' (/content/garage/src/garage/experiment/init.py)

@avnishn
Copy link
Member

avnishn commented Jun 8, 2021

Hi @MKamyab1991,

Can you provide more details about your installation?
Did you pip install, or are you building from source?
What version, or commit of garage are you using?

@Kamyab-Majid
Copy link
Author

Thanks for the response. I used the pip and the garage version is garage-2021.3.0
this is the full error :

ImportError Traceback (most recent call last)
in
11
12
---> 13 from garage.experiment import TFTrainer
14 from garage.experiment.deterministic import set_seed
15 from dowel import logger, StdOutput

ImportError: cannot import name 'TFTrainer' from 'garage.experiment' (/home/adrian/anaconda3/envs/attitude/lib/python3.8/site-packages/garage/experiment/init.py)

@Rm4n
Copy link

Rm4n commented Jun 22, 2021

I have the exact same problem. I tried installing using pip and building from source and both ran to the above error.

@Kamyab-Majid
Copy link
Author

I have the exact same problem. I tried installing using pip and building from source and both ran to the above error.
Just copy the package in your project or fix it manually. I think they are busy with other issues :).

@avnishn
Copy link
Member

avnishn commented Jun 23, 2021

Just looked into this.

We moved TFTrainer to the base of garage, so you can now import it by calling
from garage import TFTrainer

Sorry for the slow replies. At the moment many of our students are on summer vacation, and so only there will only be 2 active maintainers till mid August.

@MKamyab1991 could you go ahead and try this fix out? If it works for you, could you please open a PR?

Thanks,
@avnishn

@Rm4n
Copy link

Rm4n commented Jun 23, 2021

I used the examples in the garage documentation and as it looks like they're not updated cause TFtrainer is no longer under experiment module and has moved to trainer module. The examples in the git are updated though.

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