deepgram / kur

Descriptive Deep Learning
Apache License 2.0
814 stars 107 forks source link

Add console args to print a number of samples #59

Closed EmbraceLife closed 7 years ago

EmbraceLife commented 7 years ago

kur data -n 3 mnist.yml to print only the first 3 samples of data

kur data -n -3 mnist.yml to print only the last 3 samples of data

EmbraceLife commented 7 years ago

I have tried to find out the cause of the failing check above:

  1. the last submitted code (fix hard coded 32) is working for development version and python 3.4;
  2. however, the same code does not work for standard installation version of kur using pip install kur. I am not sure whether it is the reason why all checks have failed above.
  3. In fact, there is a bug inside the standard version of kur by pip install kur, see the error below:

In [3]: !kur data mnist.yml Traceback (most recent call last): File "/Users/Natsume/miniconda2/envs/tempy3.4/bin/kur", line 11, in sys.exit(main()) File "/Users/Natsume/miniconda2/envs/tempy3.4/lib/python3.4/site-packages/kur/main.py", line 385, in main sys.exit(args.func(args) or 0) File "/Users/Natsume/miniconda2/envs/tempy3.4/lib/python3.4/site-packages/kur/main.py", line 174, in prepare_data keys = sorted(batch.keys()) AttributeError: 'str' object has no attribute 'keys'


It can be easily fixed, but I guess it can also be fixed by update standard version kur to development version kur
ajsyp commented 7 years ago

Don't worry about the PyPI package (what you are calling the "standard" version). That issue was already fixed in 480d411. All unit tests for pull requests run against the latest, bleeding-edge, git version. The unit tests is failing for another reason entirely, one that 2d4db79 should fix.

ajsyp commented 7 years ago

There were a few issues with spaces instead of tabs that I fixed. I also simplied your comparisons, since some were superfluous, and tidied the help text.