set_train_data ValueError: Size mismatch. All items must be of the same size

Bug #712290 reported by Robert Layton
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libfann (Ubuntu)
Fix Released
Undecided
Unassigned
Natty
Fix Released
Undecided
Luke Yelavich

Bug Description

SRU justification:

The typo referred to in the below bug report causes the python fann API to be unusable for any python applications that wish to use the fann python bindings/library, causing the below error. Backporting the patch to the natty package will allow the python fann bindings to be usable.

This is already fixed in the latest Debian package, and will be synced into oneiric
once it opens.

Regression potential:

Regression potential should be minimal to non-existant.

Original report follows:

When using the function libfann.training_data().set_train_data, the following error appears:
  File "fann.py", line 29, in __init__
    train.set_train_data(dataset, labels)
  File "/usr/lib/pymodules/python2.6/pyfann/libfann.py", line 301, in set_train_data
    def set_train_data(self, *args): return _libfann.training_data_set_train_data(self, *args)
ValueError: Size mismatch. All items must be of the same size

The error has a fix: http://leenissen.dk/fann/forum/viewtopic.php?f=1&t=626
Its simply a typo in the wrapper (one character!).
Can this be fixed and the new version pushed out?

Revision history for this message
Christian Kastner (ckk) wrote :

I've committed a fix in the Debian package, I hope to upload soon and will then ask for an Ubuntu sync.

Revision history for this message
Robert Layton (robertlayton) wrote :

Thanks Christian, particularly for the quick reply.

For anyone who stumbles across this page, I have a workaround which saves the dataset to a file and then runs the train_on_file method to train the network.?field.comment=Thanks Christian, particularly for the quick reply.

For anyone who stumbles across this page, I have a temporary workaround which saves the dataset to a file and then runs the train_on_file method to train the network. As expected, its slow, but it does the job.

Luke Yelavich (themuso)
description: updated
Luke Yelavich (themuso)
Changed in libfann (Ubuntu Natty):
assignee: nobody → Luke Yelavich (themuso)
status: New → In Progress
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libfann - 2.1.0~beta~dfsg-3

---------------
libfann (2.1.0~beta~dfsg-3) unstable; urgency=low

  * debian/control:
    - Bumped Standards-Version to 3.9.2 (changes required)
    - Updated Homepage (new location)
  * debian/rules:
    - In libtool *.la files, set dependency_libs to null string as required by
      Policy section 10.2. Closes: #621572
  * debian/copyright:
    - Updated DEP5 format to r173
    - Updated DEP5 keyword for BSD-3-clause license
   * debian/watch:
    - uversionmangle release qualifier (here: beta) instead of dversionmangle
  * debian/patches added:
    - 0005-Correct-a-typo-in-a-size-comparison
      Fixes a typo in the python wrapper. LP: #712290
 -- Ubuntu Archive Auto-Sync <email address hidden> Sat, 30 Apr 2011 13:04:03 +0000

Changed in libfann (Ubuntu):
status: New → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted libfann into natty-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in libfann (Ubuntu Natty):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
dino99 (9d9) wrote :
Changed in libfann (Ubuntu Natty):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.