-
Notifications
You must be signed in to change notification settings - Fork 210
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
"Meta" modules -- modules made of other sequences of modules #200
Comments
GitMate.io thinks the contributors most likely able to help are @ccpandhare, and @tech4GT. Possibly related issues are #108 (Math Module), #112 (Scale module), #5 (image cropping module), #122 (Simplify module requirements?), and #157 (Add a Contrast module). |
@jywarren this is so cool, i will start working on this for the node using a meta.json and i will try to implement region extraction with that only, super excited😀 |
@jywarren if #203 is a good enough approach then maybe we can start working on an option in the CLI for defining meta-modules so that user can dynamically define and these according to needs, So that is one user uses a particular combination a lot in a specific sequence they can define a meta-module for it. This will also be in sync with what we are planning to do with modules in the summer, what say? |
@jywarren What is a Metamodule?: A Sequence of steps which can be represented as a string or as a json and can override some values of some steps while letting others fallback to default. The metamodule can be called with custom values just like a normal module
@jywarren actually there is one more thing, we want to allow user to make and store metamodule in node but that will not be possible unless we load modules dynamically as i suggested in my summer proposal so if we want to go down this route then we should first allow dynamic loading and creation of modules.( #190 ) coz if we are going to drastically change the module system then it's better we make met-modules on top of that, what say? |
This is awesome, good planning! A few responses:
Finally, What do you think??? |
Er, wait! I'm mixing up |
@jywarren i did not get the sequencer.import(), can you please explain it a little more, Thanks! |
@jywarren And yeah metamodule should surely have every function a normal module has.. I'll keep that in mind 👍 |
So for So like we could then do: string = metaModule.toString();
...
metaModule2.import(string); Make sense?
metaModule = sequencer.images.image1.steps[0];
string = metaModule.toString();
console.log(string);
metaModule.import(string + ',invert'); ... does this make any sense to you? |
@jywarren Yes!! This is very clear to me now. Thanks a ton for the explanation.
But I think this won't work as it is, since this line would assign metaModule to a step, and then calling .toString() will be calling toString on a step.
How does this sound @jywarren |
@jywarren Option 2: Actually sequencer.importString( MetaModuleString ) feels more natural to me than anything else, also I was thinking if we define functions on the metaModule itself then we would have to wrap it up in an object but if we keep the import on sequencer then metaModule can be just a String. |
I think this is partly a matter of paradigm. We could, in theory, build Thanks!!! |
@jywarren Yeah that's right, it's an instance of a module but it feels kind of unnatural that we are doing
Here we assign a step into the metaModule variable. |
I think a metamodule could be used in two ways:
They're pretty similar, you know, but does this make sense? |
One advantage of building |
@jywarren actually I had a little different idea in mind, I thought maybe we can have an option in the ui where after the user builds his sequence it says |
This has many parts now -- i'm going to start breaking it up by making a new one for a |
We should now be able to implement metamodules using |
This is great!! @jywarren but we need to keep a discussion session before implementing this |
OK! Can you write out your questions here? Maybe this issue needs a little
clean-up as we discuss, too. Thanks!
…On Sun, Jun 3, 2018 at 10:42 AM, Varun Gupta ***@***.***> wrote:
This is great!! @jywarren <https://github.com/jywarren> but we need to
keep a discussion session before implementing this
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#200 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ8gexLVmrViv3SHWbtdcJDerw4xnks5t5BHmgaJpZM4Sm4Ys>
.
|
@jywarren Sure I'll gather everything we have discussed so far and write questions tomorow after fixing the run optimization. |
good night!
…On Sun, Jun 3, 2018 at 10:59 AM, Varun Gupta ***@***.***> wrote:
@jywarren <https://github.com/jywarren> Sure I'll gather everything we
have discussed so far and write questions tomorow after fixing the run
optimization.
Thanks Good night!!😁
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#200 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJzSBRHRGAVNxQgNCi0DHdYB9nuiPks5t5BXcgaJpZM4Sm4Ys>
.
|
@jywarren I have been thinking about this and I think best way to tackle this would be having a registerMetaModule function that takes a sequence string and this would add this new meta-module to a json file "meta-modules.json" and image sequencer would have a reload-modules function which would load modules and meta-modules again. This is also consistent with the dynamic modules idea and I think doing it this way implementing that would be much less work |
So basically the flow I am suggesting is this
|
Now closing this!! |
If someone composes a sequence and tweaks the settings, they have a process which is really useful.
And if we can concisely store that in the URL itself, then they can share that workflow (sequence + settings) with other people, or bookmark it, and we don't have to use a database to save it. We do this now, though we don't save the settings, just the sequence:
https://publiclab.github.io/image-sequencer/examples/#steps=invert,crop
(@ccpandhare -- i think we had a partial implementation of settings, do you remember? Ah -- #127)
We wouldn't save images, just the workflow itself. But we might want to start collecting these too -- they could in theory become "meta modules" with names of their own. Maybe that's a feature in its own right?
Another aspect of this is that if we have a consistent string-based way to save a sequence and its settings, that's a good format to use for remote REST commands down the road when we decide to do that -- #198 -- and also we could base a "meta module" system around such a string.
Meta, but very powerful!
We could even, if the UI is good enough, have this prompt people to save their sequences as a module -- to propose a module based on the current state of their sequencer! This could help with #190 as well.
The text was updated successfully, but these errors were encountered: