Ticket #1130 (closed bug: fixed)

Opened 3 years ago

Last modified 2 years ago

pickling of the discretized domain fails after loading (different features)

Reported by: blaz Owned by: janez
Milestone: 2.5 Component: library
Severity: minor Keywords:
Cc: Blocking:
Blocked By:

Description

Pickling the discretized data set fails upon loading.

import Orange
import cPickle

data = Orange.data.Table("iris")
discretizer = Orange.feature.discretization.ThresholdDiscretizer(threshold=3.)
disc_features = [discretizer.constructVariable(x) for x in data.domain.features]

domain = Orange.data.Domain(disc_features, False)
disc = Orange.data.Table(domain, data)

cPickle.dump(disc, file("0.p", "wb"))
a = cPickle.load(file("0.p", "rb"))
b = cPickle.load(file("0.p", "rb"))
print "Check:", a.domain.features[0] == b.domain.features[0]

Check should give True, but fails.

Change History

comment:1 Changed 3 years ago by janez

Cannot replicate this - for me it gives True. I tried on Windows and on Mac, a version from a week ago and today's. Does it give an error if you run this script in a fresh session?

comment:2 Changed 2 years ago by blaz

  • Status changed from new to closed
  • Resolution set to fixed

With the newest version of Orange this works, there's no bug any more (my previous version was about a month old).

Note: See TracTickets for help on using tickets.