[pymvpa] begging for backward-compatibility

Yaroslav Halchenko yoh at psychology.rutgers.edu
Mon Nov 3 15:58:56 UTC 2008


Dear Shogun Developers,

Thanks once again for developing great toolbox and for constantly enriching it
with new features, but I would like to beg you on my knees to be backward
compatible, at least API compatible, and at least within the same major
revision/release (e.g. 0.6).

Recent introduction of normalization heuristics (0.6.5 iirc) lead
to API change which has ruined backward compatibility. Here is an
excerpt from the changes in python-modular examples (rev 3359) you had
to do:

-	kernel=LinearKernel(feats_train, feats_train, scale)
+	kernel=LinearKernel()
+	kernel.set_normalizer(AvgDiagKernelNormalizer(scale))
+	kernel.init(feats_train, feats_train)

so now, if I used "old" interface I get 

Wrong number of arguments for overloaded function 'new_LinearKernel'.
  Possible C/C++ prototypes are:
    CLinearKernel()
    CLinearKernel(CRealFeatures *,CRealFeatures *)

since scale has been removed from the API of LinearKernel.

Proper resolution imho would be to leave it in and unless scale is 0, use some
default kernel normalizer which would make it produce the same results as
with the previous release of shogun (0.6.3). That would not eliminate
possibility to change normalizer, but it would allow old code which uses shogun
to stay compatible with various versions of shogun.

For a single user it might be not such a big issue, but in our project we are
trying to stay compatible with various distributions, and some of them might
ship slightly aged versions of shogun, and thus we are trying to stay
compatible with various versions. Now, if backward compatibility patch is not
introduced we would need to code around such a change and introduce spaghetti of
shogun-version dependent code.

another change which ruined backward compatibility seems to be a removed

set_precompute_matrix

from light SVMs, which I guess is associated with this changelog entry

,------------------------------------------
| Remove use_precompute hack from SVMLight
`---

I would really appreciate if API wouldn't get incompatible changes within
each new minor release. If it is possible -- could you spit out a warning that
such functionality will be deprecated and blah blah, but keep working until
lets say 0.7 where you actually make API incompatible with 0.6 versions ?

Thank you in advance for reading this far ;-)


-- 
                                  .-.
=------------------------------   /v\  ----------------------------=
Keep in touch                    // \\     (yoh@|www.)onerussian.com
Yaroslav Halchenko              /(   )\               ICQ#: 60653192
                   Linux User    ^^-^^    [175555]





More information about the Pkg-ExpPsy-PyMVPA mailing list