Code Monkey home page Code Monkey logo

Comments (1)

zilto avatar zilto commented on May 24, 2024

Isn't this solved by the MatplotlibWriter? First, we could have the sklearn extension built on top of the matplotlib extension. When multiple file types are supported, I think we should infer the type from the path and accept an explicit argument.

For the broader point, I'm starting to wonder if materializers are closer to "a file type" (e.g., parquet, json) or a "render engines" (e.g., matplotlib, s3, mlflow).

On one hand, the "file type" approach relies on a coupling between the Python object class and the output (e.g., saving an XGBoost as JSON). Also, it's convenient when the file type is set, but the "renderer" changes. For example, you specify "parquet" and have the ability to change "where/how" that parquet is handled.

On the other hand, the "renderer" approach is valuable when the Python object -> artifact is looser or that you'd want many formats of the same artifact. One should be able to produce multiple formats without much code duplication. For example, visualizations are the same matplotlit.figure.Figure object, but you could want PNG, SVG or a table to materialize CSV, parquet. What about to.snowflake and having the "renderer" support many operations "create table", "create view", "insert", etc. even though it's essentially "parquet" data. This seems to be a rarer but valuable case.

I'm thinking there is room for both types and they both should live under the name "materializer"

from hamilton.

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.