mlfoundations / open_lm

A repository for research on medium sized language models.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Undefined argument "moe_freq" when running unit tests on WSL/Ubuntu 20.04

aaronsm opened this issue · comments

I'm trying OpenLM on Ubuntu 20.04 under WSL. I've hit an issue running the unit tests where the argument "moe_freq" is never set before using it in train.py which results in a Python error. As a work around I added hasattr() to line 176 in train.py:

if hasattr(args, "moe_freq") and args.moe_freq > 0:

Steps to Reproduce

open_lm/open_lm$ pytest tests/

FAILED tests/test_accumulation.py::TestGradientAccumulation::test_accumulation - AttributeError: 'Namespace' object has no attribute 'moe_freq'

thanks for reporting! Looks like this is in an old test that was committed to open_lm/tests instead of tests/. Feel free to ignore that test for now, and I'll move it to our tests/ folder or deprecate it entirely soon.