GithubHelp home page GithubHelp logo

Comments (2)

roman-kh avatar roman-kh commented on July 22, 2024 3

Remove F and L expression

Since pipeline has several options to call an external function, we might get rid of F and L expressions, thus simplifying the API and free letters for new expressions.

pipeline.call(external_func, B(), V.some_var, dst=V('other_var'))

pipeline
.add_namespace(some_module)
.external_func(B(), V.some_var, dst=V('other_var'))

So instead of
pipeline.train_model('model', feed_dict=F(make_data)(B.images, V.some_var) (1)

you will write:
pipeline
.call(make_data, B.images, V.some_var, dst=V('feed_dict'))
.train_model('model', feed_dict=V.feed_dict)

or even
pipeline
.make_data(B.images, V.some_var, dst=V('feed_dict'))
.train_model('model', feed_dict=V.feed_dict)

While the first version (1) is shorter, the proposed change might seem less obscure and implicit.

from batchflow.

roman-kh avatar roman-kh commented on July 22, 2024

Separate a computed NE and a reference NE
While this works well for C, D, B and V, the logic breaks when it comes to R, P, F.
For instance, when you write R('normal', 0, 1), you rather want to compute the values and pass them, not the NE itself.
As a result, when you see NE(...) you still don't know whether the values should be passed or NE.
Consequently, the action might need to recompute all the parameters, which is inefficient.
So, let's use W as a container to pass NE further. And later we might also add parameters for @action decorator to specify arguments which should be passed "as is" and not be computed in the pipeline.

Remove F and L expression
Sometimes L might be helpful to pass a callable with params, so it is a declarative version of partial.
So I'll remove F and rename L to F for clarity. :-)

from batchflow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.