carakan
How to install and compile a git fork of torchx
I have a problem compiling my custom fork of torchx , here is a code that is failing in a local installation of livebook, (tried tons of combinations and this code is an example):
Mix.install(
[
{:bumblebee, "~> 0.4.2"},
{:nx, "~> 0.6.1"},
{:torchx, git: "https://github.com/carakan/nx"},
{:kino, "~> 0.10.0"}
],
force: true,
config: [
nx: [default_backend: Torchx]
],
system_env: [
# LIBTORCH_VERSION: "2.1.0",
LIBTORCH_DIR: "~/Downloads/libtorch"
]
)
Nx.global_default_backend({Torchx.Backend, device: :mps})
and shows this error:
** (Mix.Error) App nx lists itself as a dependency
(mix 1.15.5) lib/mix.ex:577: Mix.raise/2
(elixir 1.15.5) lib/enum.ex:984: Enum."-each/2-lists^foreach/1-0-"/2
(mix 1.15.5) lib/mix/dep/converger.ex:18: Mix.Dep.Converger.topological_sort/1
(mix 1.15.5) lib/mix/dep/converger.ex:78: Mix.Dep.Converger.converge/4
(mix 1.15.5) lib/mix/dep/fetcher.ex:16: Mix.Dep.Fetcher.all/3
(mix 1.15.5) lib/mix/tasks/deps.get.ex:34: Mix.Tasks.Deps.Get.run/1
(mix 1.15.5) lib/mix/task.ex:447: anonymous fn/3 in Mix.Task.run_task/5
/Users/carakan/Documents/libtorch-sd.livemd#cell:cxwhmrbzgh2dnojn5rvaagoeuzcdk6gl:1: (file)
I noticed that torchx is like a submodule into Nx project so it’s like an error of circular dependency. How can I correctly add my custom fork of nx and tochx?
Thanks in advance!
Most Liked
jonatanklosko
Creator of Livebook
Try {:torchx, github: "carakan/nx", sparse: "torchx"}. Sparse means that the mix package is nested in the torchx/ directory in the github repo : )
Also note that the backend should be nx: [default_backend: Torchx.Backend] (although you use Nx.global_default_backend, so you don’t need that config altogether).
3
Popular in Questions
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
Hi, I’m using Ubuntu 18.04 and after updating to OTP-24.0 yesterday i have this warning when I run “mix local.hex”:
14:57:30.512 [warn] ...
New
The Elixir Typespec docs show the following syntax for keyword lists in typespecs:
# ...
| [key: type] # keyword lis...
New
Hello, I have map which I want to convert it to string like this:
the map:
%{last_name: "tavakkoli", name: "shahryar"}
the string I ne...
New
Hi guys, i’m new in the Elixir world, and i have to say, that i love it!
i’m having some problem to understand anonymous functions with ...
New
Hi all
I want to have a unix time, from the current time plus 1 hour.
DateTime.now + 1 hour
How to get it in elixir?
Thanks
New
In AR this is so simple
@articles = current_user.articles
How to do in Ecto?
def index(conn, _params) do
current_user = conn.assig...
New
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors:
[WARN] - (starship::utils): Executing command ...
New
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
Hi everyone!
I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
Other popular topics
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
New
Okay, I'm having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I'm sure I'...
New
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
In the Dialyzer docs ( http://erlang.org/doc/man/dialyzer.html#requesting-or-suppressing-warnings-in-source-files ), there is a way to tu...
New
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this:
...
New
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!)
This post collects co...
New
I have followed this StackOverflow post to install the specific version of Erlang.
And When I am running mix ecto.setup then getting fol...
New
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
I have a User schema with a :from_id field set to type :string:
defmodule TweetBot.Repo.Migrations.CreateUsers do
use Ecto.Migration
...
New
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
New







