Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The gcal tutorial generate_example method fails #683

Open
bwesen opened this issue Apr 18, 2018 · 1 comment
Open

The gcal tutorial generate_example method fails #683

bwesen opened this issue Apr 18, 2018 · 1 comment

Comments

@bwesen
Copy link

bwesen commented Apr 18, 2018

Hi, I'm trying to do the steps in the GCAL tutorial, so I cloned the latest master from github, but that runs into some problems I just wanted to note here: it tries to use ipython prompt functions that were removed in ipython 5+ for example so I had to downgrade ipython to 4.2 (also tried ipython 2.4).

More importantly, running the generate_example('gcal_10000.typ') method needed for the GCAL tutorial results in errors as per below.

Note, at the time I wrote this issue (just updated it) I hadn't done the build_ext step, so used unoptimized python functions, and that is probably why this hasn't been noticed before. When I did build_ext, this first stacktrace disappeared, but someone might want to check why the unoptimized codepath doesn't work.

Instead, I got another error at the end of the gcal_10000 generation, that crashed the output. Please see the backtrace after this. It's kind of annoying, it seems it's a None usage in the holoview plugin which is just there to do some fancy prompting :) Anybody knows what the issue might be? Like I wrote above, I tried with various ipython versions including 2.4, 4.2 and 5.6. The holoview plugin is fetched by git submodule --init, but maybe it is not checking out a specific branch, and it got upgraded at some point?

Update: I just went into the holoviews file and removed the reference to self.label.lower(), and then at least the generate_example passed. I guess it's some incompatibility with the holoviews submodule.

WARNING: Install distutils and Cython required to build optimized component, falling back to unoptimized components.
Traceback (most recent call last):
  File "./topographica", line 17, in <module>
    process_argv(sys.argv[1:])
  File "/home/bjorn/topographica/topo/misc/commandline.py", line 748, in process_argv
    (option,args) = topo_parser.parse_args(args,option)
  File "/usr/lib/python2.7/optparse.py", line 1400, in parse_args
    stop = self._process_args(largs, rargs, values)
  File "/usr/lib/python2.7/optparse.py", line 1444, in _process_args
    self._process_short_opts(rargs, values)
  File "/usr/lib/python2.7/optparse.py", line 1551, in _process_short_opts
    option.process(opt, value, values, self)
  File "/usr/lib/python2.7/optparse.py", line 789, in process
    self.action, self.dest, opt, value, values, parser)
  File "/usr/lib/python2.7/optparse.py", line 809, in take_action
    self.callback(self, opt, value, parser, *args, **kwargs)
  File "/home/bjorn/topographica/topo/misc/commandline.py", line 493, in c_action
    exec value in __main__.__dict__
  File "<string>", line 1, in <module>
  File "/home/bjorn/topographica/external/holoviews/holoviews/ipython/widgets.py", line 201, in __call__
    self.run_hook(self.interval)
  File "/home/bjorn/topographica/topo/base/simulation.py", line 1335, in run
    ep.process_current_time()
  File "/home/bjorn/topographica/topo/sheet/__init__.py", line 353, in process_current_time
    self.learn()
  File "/home/bjorn/topographica/topo/sheet/__init__.py", line 181, in learn
    self._normalize_weights()
  File "/home/bjorn/topographica/topo/sheet/__init__.py", line 164, in _normalize_weights
    p.apply_learn_output_fns(active_units_mask=active_units_mask)
  File "/home/bjorn/topographica/topo/base/cf.py", line 840, in apply_learn_output_fns
    of(CFIter(self,active_units_mask=active_units_mask))
  File "/home/bjorn/topographica/topo/optimized/unoptimized.py", line 67, in __call__
    del cf.norm_total
UnboundLocalError: local variable 'cf' referenced before assignment
File "/home/bjorn/topographica/external/holoviews/holoviews/ipython/widgets.py", line 203, in __call__
   super(RunProgress, self).__call__(100 * (completed / float(value)))
 File "/home/bjorn/topographica/external/holoviews/holoviews/ipython/widgets.py", line 75, in __call__
   % (self.label.lower(), elapsed//3600,
AttributeError: 'NoneType' object has no attribute 'lower'

@bwesen bwesen closed this as completed Apr 18, 2018
@bwesen bwesen changed the title Running masterbranch of topographica on a modern Linux and the GCAL tutorial Topographica and ipython 5+, and the gcal tutorial on unoptimized python Apr 18, 2018
@bwesen bwesen reopened this Apr 18, 2018
@bwesen bwesen changed the title Topographica and ipython 5+, and the gcal tutorial on unoptimized python The gcal tutorial generate_example method fails Apr 18, 2018
@jbednar
Copy link
Member

jbednar commented Apr 18, 2018

Just for background, up until 2015, the Topographica team was focused entirely on applications of Topographica, maintaining HoloViews as a helpful add-on visualization tool. Since 2016, our focus has shifted, where we primarily maintain HoloViews (and a larger project PyViz) for use across many different applications and domains. So HoloViews has surged on ahead, while Topographica has languished behind a bit, as you can tell by its lack of releases.

In off-hours during that time, some of the Topographica team did make significant progress using Topographica, but we have not yet captured this progress into a new Topographica release, due to the demands of maintaining and improving HoloViews and PyViz in our day jobs. We feel a bit guilty about this, but have to prioritize, and so far never do get around to the relatively small changes necessary to bring Topographica up to date with the amazing new functionality now available from HoloViews.

But as those changes are small, and are necessary for us to capture the recent PhD theses of the two main HoloViews maintainers as a reproducible recipe, if you were interested in taking over some part of the maintenance of Topographica (which is now a tiny bit of our overall codebase), then I imagine we'd find time to help you with what we know needs doing and get Topographica back into something immediately usable.

(Otherwise, you could just grab an old Ubuntu or Red Hat VM from 2015, where you should be able to live in the past and run everything as well as we ever did then! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants