Ivy promises framework freedom, but currently charges one-way fares
It transpiles machine learning code so you can run a PyTorch library inside TensorFlow without rewriting it by hand.
What it does
Ivy is a transpiler for machine learning code. It takes functions, classes, or even entire third-party libraries written for one framework and rewrites them into another—think of it as a dialect translator for tensor operations. The API centers on ivy.transpile for framework-to-framework conversion and ivy.trace_graph for stripping away wrappers to produce a clean computational graph.
The interesting bit
The clever part is the lazy transpilation of whole modules: you can point Ivy at a library like Kornia (PyTorch-only) and get a TensorFlow-compatible proxy that converts each function only when first called, caching the result for subsequent runs. That avoids paying the upfront cost of translating code you might never touch.
Key highlights
- Supports transpiling from PyTorch to TensorFlow, JAX, or NumPy.
- Can transpile individual functions eagerly or entire modules lazily.
- Includes
trace_graphto remove redundant wrapping and trace an efficient graph. - Active CI with transpiler and integration test workflows.
Caveats
- The conversion matrix is lopsided: PyTorch is currently the only reliable source, while TensorFlow, JAX, and NumPy are mainly targets. You cannot yet transpile to PyTorch or from the others in any practical sense.
- The README contains a small but visible typo in the
trace_graphexample (referencing an undefinedjax_fn), which suggests the docs are moving fast and not always in lockstep.
Verdict
Worth a look if you have a PyTorch model or library that needs to run in a TensorFlow or JAX pipeline and you lack the patience for a manual rewrite. If you need to move code into PyTorch, this is not your tool—yet.
Frequently asked
- What is unifyai/ivy?
- It transpiles machine learning code so you can run a PyTorch library inside TensorFlow without rewriting it by hand.
- Is ivy open source?
- Yes — unifyai/ivy is an open-source project tracked on heatdrop.
- What language is ivy written in?
- unifyai/ivy is primarily written in Python.
- How popular is ivy?
- unifyai/ivy has 14.2k stars on GitHub.
- Where can I find ivy?
- unifyai/ivy is on GitHub at https://github.com/unifyai/ivy.