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

Resolve #8 #26

Merged
merged 5 commits into from
Apr 6, 2022
Merged

Resolve #8 #26

merged 5 commits into from
Apr 6, 2022

Conversation

alvarofpp
Copy link
Member

@alvarofpp alvarofpp commented Mar 26, 2022

Description

Adds Python linter and lint command to repository.

How to test

  • git checkout issue-8
  • Run any training.

@alvarofpp alvarofpp force-pushed the issue-8 branch 2 times, most recently from 57c34a8 to 69c3958 Compare March 27, 2022 18:35
@alvarofpp alvarofpp requested a review from a team March 27, 2022 18:36
@alvarofpp alvarofpp changed the title [WIP] Resolve #8 Resolve #8 Mar 27, 2022
@Cogitus
Copy link
Contributor

Cogitus commented Apr 6, 2022

The modifications are working ok, but some of the paths, since the previous distribution of the folders may be crashing. As an example:

If one tries to run a solve such as
~/urnai-tools/experiments/solves/solve_cartpole_v1.py
with the terminal command $ python solve_cartpole_v1.py

then the imports of de modules start to crash. One example is:

  File "solve_cartpole_v1.py", line 5, in <module>
    from urnai.agents.generic_agent import GenericAgent
  File "~/anaconda3/envs/urnai/lib/python3.6/site-packages/urnai/agents/generic_agent.py", line 4, in <module>
    from urnai.agents.base.abagent import Agent
  File "~/anaconda3/envs/urnai/lib/python3.6/site-packages/urnai/agents/base/abagent.py", line 5, in <module>
    from urnai.models.base.abmodel import LearningModel
  File "~/anaconda3/envs/urnai/lib/python3.6/site-packages/urnai/models/base/abmodel.py", line 5, in <module>
    from urnai.base.savable import Savable 
  File "~/anaconda3/envs/urnai/lib/python3.6/site-packages/urnai/base/savable.py", line 5, in <module>
    from tdd.reporter import Reporter as rp
ModuleNotFoundError: No module named 'tdd'

The problem is that the imports of those modules are not preceded by the urnai. part of if. For the previous Traceback, for example, the solution was to change the line in ~/anaconda3/envs/urnai/lib/python3.6/site-packages/urnai/base/savable.py

from
from tdd.reporter import Reporter as rp
to
from urnai.tdd.reporter import Reporter as rp

@Cogitus Cogitus merged commit e2bb7b0 into master Apr 6, 2022
@Cogitus Cogitus deleted the issue-8 branch April 6, 2022 04:42
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

Successfully merging this pull request may close these issues.

2 participants