open-reblock / topology

3 stars 2 forks source link

Can `show intermediate` parameter show results during processing or only at the end? #18

Open danrademacher opened 9 years ago

danrademacher commented 9 years ago

Related to #8, we're talking here about showing the intermediate stages, but it sounds like maybe the output only comes out at the end.

brelsford commented 9 years ago

The show intermediate parameter prints out a graph with the current geometry at each timestep (so- for the epworth demo that's about ~4 intermediate steps) Right now, the graph is saved as a pdf thats visible as soon as it's finished. I can just as easily set it to print to a geoJSON, which would also be available as soon as it's finished. The only part I'm not sure of is how to pass the intermediate results back through celery.

brelsford commented 9 years ago

In my previous comment, maybe I wasn't clear: I can print out intermediate results as they are processed - I don't need to wait until I've finished processing the whole graph. My algorithm uses greedy search: incrementally adding new roads until all parcels have been connected. Every time I add a new road segment, I can print you a new figure or send you a new geoJSON with this intermediate road layout. Consequently, the number of intermediate results there are depends on how many road segments are built, and thus how many interior parcels there are.

danrademacher commented 9 years ago

@mojodna, this might be a good piece for the Celery discussion with the berkeley crew tomorrow:

The only part I'm not sure of is how to pass the intermediate results back through celery.

mojodna commented 9 years ago

During today's Celery discussion, we talked about creating a new Django model for intermediate representations and saving the JSON directly from the task (so it's facilitated by Celery, but not passed back through the result mechanism). It would contain timestamps, so manually cleaning up when necessary is straightforward.