GithubHelp home page GithubHelp logo

Undefined names about slm-lab HOT 6 CLOSED

kengz avatar kengz commented on August 25, 2024
Undefined names

from slm-lab.

Comments (6)

kengz avatar kengz commented on August 25, 2024

Hi, the tests are set up to run with pytest, so other test frameworks will likely fail. Could you try and confirm the following terminal commands?

# to activate the install dependencies
conda activate lab
# run the official test which calls pytest
python setup.py test

The tests are also ran on the build https://circleci.com/gh/kengz/SLM-Lab/1970

from slm-lab.

cclauss avatar cclauss commented on August 25, 2024

See #136 flake8 will find undefined names which might not be discovered by other linters or tests.

Each undefined name has the potential to raise NameError at runtime.

from slm-lab.

kengz avatar kengz commented on August 25, 2024

unclear what problem this aims to solve; there is no breakage in the code referred. closing as irrelevant.

from slm-lab.

kengz avatar kengz commented on August 25, 2024

reopening issue:
TODO: see #137 for some context; write proper regression tests.

from slm-lab.

kengz avatar kengz commented on August 25, 2024

fixed by #139

from slm-lab.

cclauss avatar cclauss commented on August 25, 2024

From 11 above down to 7 below... Undefined names have the potential to raise NameError at runtime.

flake8 testing of https://github.com/kengz/SLM-Lab on Python 3.7.0

$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics

./slm_lab/env/base.py:25:49: F821 undefined name 'nvec'
        setattr(gym_space, 'low', np.zeros_like(nvec))
                                                ^
./slm_lab/agent/algorithm/base.py:84:16: F821 undefined name 'action'
        return action
               ^
./slm_lab/agent/algorithm/base.py:91:16: F821 undefined name 'batch'
        return batch
               ^
./slm_lab/lib/viz.py:299:16: F821 undefined name 'TimeoutExpired'
        except TimeoutExpired:
               ^
./slm_lab/experiment/search.py:133:9: F821 undefined name 'config'
        config['trial_index'] = self.experiment.info_space.tick('trial')['trial']
        ^
./slm_lab/experiment/search.py:135:16: F821 undefined name 'config'
        return config
               ^
./slm_lab/experiment/search.py:148:16: F821 undefined name 'trial_data_dict'
        return trial_data_dict
               ^
7     F821 undefined name 'action'
7

from slm-lab.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.