Giter Club home page Giter Club logo

Comments (10)

jeanbza avatar jeanbza commented on July 22, 2024 2

Hello!

Oh, and one more thing: I've seen this good talk from @jadekler, and I must say that it has scared me enough to stay away from the go modules, for now, and keep the focus on the features and performances of the library.

I'll stay away from go modules for now then. The main reason I would like to use this library with go mod is to get rid of the tensorflow shared object dependency in production. Anyway, thanks for your help :)

Note that although multi-module repositories (the topic of the video, and an "advanced" setup) is tricky, single-module repositories (the normal, mainstream case) should be quite straightforward and easy to maintain.

Essentially, all that needs to be done is:

go mod init
go mod tidy

And then during every PR, you use go mod tidy to ensure you're capturing any newly-added dependencies. (CI can check for it like so: spf13/viper#706).

Happy to provide additional guidance if you'd like to discuss any part of adopting Go modules! :)

from onnx-go.

owulveryck avatar owulveryck commented on July 22, 2024 1

Maybe adding a go.{mod,sum} to your package and locking the package versions that it depends can prevent this from happening in the future.

TL;DR: good idea, but this may be too early.

Longer: By now we (try to) make onnx-go compatible with the master branches of the dependencies (this is what the CI checks uppon a push on the repo).
This guarantees that the package is go-gettable, which is essential because it is a library and not a utility.

The project is in active development, and some features require to add/patch things in the significant dependencies such as Gorgonia and Tensor lib (take the very recent example of the Leaky-Relu Operator for instance). Therefore it's hard, by now, to lock a package version because Gorgonia does not release a version on each patch.

WDYT?

Oh, and one more thing: I've seen this good talk from @jadekler, and I must say that it has scared me enough to stay away from the go modules, for now, and keep the focus on the features and performances of the library.

from onnx-go.

blackrez avatar blackrez commented on July 22, 2024

Hello,

Can you provides the go.mod and eventually the Dockerfile to be able to reproduce the error ?

Thanks in advance.

from onnx-go.

mauri870 avatar mauri870 commented on July 22, 2024

I reproduced this without a go.mod, so the instructions are:

  • Create a project that uses this package with the gorgonia backend
  • go mod init myproject.org/package
  • go build

You should see similar results

from onnx-go.

mauri870 avatar mauri870 commented on July 22, 2024
  • Create an empty dir, then write a main.go:
package main

import (
        "fmt"
        "github.com/owulveryck/onnx-go/backend/x/gorgonnx"
)

func main() {
        backend := gorgonnx.NewGraph()
}
  • go mod init myproject.org/package
  • go build

from onnx-go.

blackrez avatar blackrez commented on July 22, 2024

Ok, I could reproduce the bug. I will investigate.

from onnx-go.

mauri870 avatar mauri870 commented on July 22, 2024

Thank you. Maybe adding a go.{mod,sum} to your package and locking the package versions that it depends can prevent this from happening in the future.

from onnx-go.

mauri870 avatar mauri870 commented on July 22, 2024

LGTM

I'll stay away from go modules for now then. The main reason I would like to use this library with go mod is to get rid of the tensorflow shared object dependency in production. Anyway, thanks for your help :)

from onnx-go.

owulveryck avatar owulveryck commented on July 22, 2024

The main reason I would like to use this library with go mod is to get rid of the tensorflow shared object dependency in production.

I don't get your point? This repo is independent of Tensorflow, and if you compile a binary, you can bring it to production without carrying about dependencies at runtime. Tell me if I missed something?

Anyway, thanks for your help :)

Thank you @blackrez for the investigation, you rock! I let you close the issue whenever you want if you think that this is not fixable by now (or keep it open if you plan to fix it ;)).

from onnx-go.

blackrez avatar blackrez commented on July 22, 2024

I was looking for a solution (thanks @jadekler for pointing this idea). I will close this issue and create a new issue on support go modules.

from onnx-go.

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.