conjure-cp / conjure-notebook

3 stars 2 forks source link

Needs multiple cells to make a new model #30

Closed ChrisJefferson closed 8 months ago

ChrisJefferson commented 1 year ago

At the moment, to make a new model, we seem to need a cell with just %conjure_clear, then a new %%conjure cell.

Maybe %%conjure_new?

ChrisJefferson commented 1 year ago

One reason this particularly came up is with the tutorials, selecting "re-run all cells" in them breaks, but "re-run all cells" doesn't reset the current model.

I'm going to make a contraversal suggestion -- switching to %%conjure_continue (or %%conjure_extend?), to continue building up a model, and switching %%conjure to mean "start a fresh model". The reason to suggest that is at the moment using %%conjure causes weird issues whenever you "rerun all cells", due to the lack of resetting

ozgurakgun commented 1 year ago

Thanks for bringing this up Chris, this has been bugging me for a while.

I think it would be ideal if we had a lighter weight solution in terms of new magics. How does this sound:

%%conjure --optional-cli-options always creates a new model

%%conjure + --optional-cli-options always adds to the existing model.

Is it too subtle?

ozgurakgun commented 1 year ago

if %%conjure+ is possible, that could be better as well...

ChrisJefferson commented 1 year ago

%%conjure+ is nice if it works.

Could add %%conjure+ now, leave %%conjure as is for now (while various models get changed here, and in other places), then change how %%conjure after changes have permeated around?

ozgurakgun commented 1 year ago

Also, the extension is versioned & has multiple releases, so I am less worried about making breaking changes. I guess we could bump the version to 0.1.0 with this as well. I shall investigate, but I have a feeling %%conjure+ won't be possible. It would work with a space of course.

ogabek96 commented 1 year ago

I see it is possible to use %%conjure+ through creating alias. There should be a way to do it programmatically.

image
ozgurakgun commented 1 year ago

oooh, that's nice!

ogabek96 commented 1 year ago

I think I was able to implement conjure+. Should %%conjure reset the state of %%conjure+?

image
ozgurakgun commented 1 year ago

I think that's the idea, yes. conjure starts a new model, conjure+ appends to the existing model. The rest of the logic is identical. Right @ChrisJefferson? Thanks @ogabek96!

ozgurakgun commented 1 year ago

also: I guess we can remove conjure_clear now?

ozgurakgun commented 8 months ago

I think this is now fixed via conjure+