google-research / mozolm Goto Github PK
View Code? Open in Web Editor NEWMozoLM: A language model (LM) serving library
License: Apache License 2.0
MozoLM: A language model (LM) serving library
License: Apache License 2.0
Getting following error for the macOS builds when linking grpc++:
ld: illegal thread local variable reference to regular symbol __ZN9grpc_core7ExecCtx9exec_ctx_E for architecture x86_64
There is going to be a moderate challenge in using mozolm with an out of process service to host the algorithms.
Looks like there is an inprocess transport, but it also seems this might constrain the client to Java? Not sure.
https://grpc.github.io/grpc-java/javadoc/io/grpc/inprocess/package-summary.html
Notes to self for investigating an in proc lib that interoperates with .NET Core 5:
https://github.com/bazelbuild/rules_dotnet
https://docs.microsoft.com/en-us/cpp/dotnet/walkthrough-compiling-a-cpp-program-that-targets-the-clr-in-visual-studio?view=msvc-160
In a simple scenario there is no need to return symbols every time LMScores
proto is requested since these are generally immutable if the scores don't need to be sorted.
See this: https://github.com/grpc/grpc-dotnet
Would be willing to work on an equivalent example to the SimpleJavaSample, but written in .NET Core for easier usability on the Windows platform.
Would a PR here be welcomed?
Notes to self:
https://github.com/bazelbuild/rules_dotnet
Provide character-level predictions using word-based ngram language model.
We don't get any cache hits on the Bazel cache on Windows. Fix.
Injection of protobuf-matchers
repo with its dependence on re2
introduced a regression in Windows build:
re2.lib(re2.obj) : error LNK2005: "public: __cdecl re2::RE2::Options::Options(enum re2::RE2::CannedOptions)" (??0Options@RE2@re2@@QEAA@W4CannedOptions@12@@Z) already defined in re2.lib(re2.obj)
SET ***
re2.lib(re2.obj) : error LNK2005: "public: __cdecl re2::RE2::RE2(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0RE2@re2@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) already defined in re2.lib(re2.obj)
SET TEMP=C:\Users\RUNNER~1\AppData\Local\Temp
re2.lib(re2.obj) : error LNK2005: "public: __cdecl re2::RE2::RE2(class re2::StringPiece const &)" (??0RE2@re2@@QEAA@AEBVStringPiece@1@@Z) already defined in re2.lib(re2.obj)
SET TMP=C:\Users\RUNNER~1\AppData\Local\Temp
re2.lib(re2.obj) : error LNK2005: "public: __cdecl re2::RE2::RE2(class re2::StringPiece const &,class re2::RE2::Options const &)" (??0RE2@re2@@QEAA@AEBVStringPiece@1@AEBVOptions@01@@Z) already defined in re2.lib(re2.obj)
C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.28.29910/bin/HostX64/x64/link.exe @bazel-out/x64_windows-opt/bin/mozolm/grpc/mozolm_client_async_impl_test.exe-2.params
re2.lib(re2.obj) : error LNK2005: "public: __cdecl re2::RE2::RE2(char const *)" (??0RE2@re2@@QEAA@PEBD@Z) already defined in re2.lib(re2.obj)
Execution platform: @local_config_platform//:host
re2.lib(re2.obj) : error LNK2005: "public: __cdecl re2::RE2::~RE2(void)" (??1RE2@re2@@QEAA@XZ) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "public: class std::map<int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<int>,class std::allocator<struct std::pair<int const ,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > const & __cdecl re2::RE2::CapturingGroupNames(void)const " (?CapturingGroupNames@RE2@re2@@QEBAAEBV?$map@HV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@U?$less@H@2@V?$allocator@U?$pair@$$CBHV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@std@@@2@@std@@XZ) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "public: bool __cdecl re2::RE2::CheckRewriteString(class re2::StringPiece const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *)const " (?CheckRewriteString@RE2@re2@@QEBA_NAEBVStringPiece@2@PEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "public: static bool __cdecl re2::RE2::ConsumeN(class re2::StringPiece *,class re2::RE2 const &,class re2::RE2::Arg const * const * const,int)" (?ConsumeN@RE2@re2@@SA_NPEAVStringPiece@2@AEBV12@QEBQEBVArg@12@H@Z) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "private: bool __cdecl re2::RE2::DoMatch(class re2::StringPiece const &,enum re2::RE2::Anchor,unsigned __int64 *,class re2::RE2::Arg const * const * const,int)const " (?DoMatch@RE2@re2@@AEBA_NAEBVStringPiece@2@W4Anchor@12@PEA_KQEBQEBVArg@12@H@Z) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "public: static bool __cdecl re2::RE2::Extract(class re2::StringPiece const &,class re2::RE2 const &,class re2::StringPiece const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *)" (?Extract@RE2@re2@@SA_NAEBVStringPiece@2@AEBV12@0PEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "public: static bool __cdecl re2::RE2::FindAndConsumeN(class re2::StringPiece *,class re2::RE2 const &,class re2::RE2::Arg const * const * const,int)" (?FindAndConsumeN@RE2@re2@@SA_NPEAVStringPiece@2@AEBV12@QEBQEBVArg@12@H@Z) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "public: static bool __cdecl re2::RE2::FullMatchN(class re2::StringPiece const &,class re2::RE2 const &,class re2::RE2::Arg const * const * const,int)" (?FullMatchN@RE2@re2@@SA_NAEBVStringPiece@2@AEBV12@QEBQEBVArg@12@H@Z) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "void (__cdecl*__cdecl re2::hooks::GetDFASearchFailureHook(void))(struct re2::hooks::DFASearchFailure const &)" (?GetDFASearchFailureHook@hooks@re2@@YAP6AXAEBUDFASearchFailure@12@@ZXZ) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "void (__cdecl*__cdecl re2::hooks::GetDFAStateCacheResetHook(void))(struct re2::hooks::DFAStateCacheReset const &)" (?GetDFAStateCacheResetHook@hooks@re2@@YAP6AXAEBUDFAStateCacheReset@12@@ZXZ) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "public: static int __cdecl re2::RE2::GlobalReplace(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *,class re2::RE2 const &,class re2::StringPiece const &)" (?GlobalReplace@RE2@re2@@SAHPEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBV12@AEBVStringPiece@2@@Z) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "private: void __cdecl re2::RE2::Init(class re2::StringPiece const &,class re2::RE2::Options const &)" (?Init@RE2@re2@@AEAAXAEBVStringPiece@2@AEBVOptions@12@@Z) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "public: bool __cdecl re2::RE2::Match(class re2::StringPiece const &,unsigned __int64,unsigned __int64,enum re2::RE2::Anchor,class re2::StringPiece *,int)const " (?Match@RE2@re2@@QEBA_NAEBVStringPiece@2@_K1W4Anchor@12@PEAV32@H@Z) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "public: static int __cdecl re2::RE2::MaxSubmatch(class re2::StringPiece const &)" (?MaxSubmatch@RE2@re2@@SAHAEBVStringPiece@2@@Z) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "public: class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,int,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,int> > > const & __cdecl re2::RE2::NamedCapturingGroups(void)const " (?NamedCapturingGroups@RE2@re2@@QEBAAEBV?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@HU?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@std@@@2@@std@@XZ) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "public: int __cdecl re2::RE2::Options::ParseFlags(void)const " (?ParseFlags@Options@RE2@re2@@QEBAHXZ) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "public: static bool __cdecl re2::RE2::PartialMatchN(class re2::StringPiece const &,class re2::RE2 const &,class re2::RE2::Arg const * const * const,int)" (?PartialMatchN@RE2@re2@@SA_NAEBVStringPiece@2@AEBV12@QEBQEBVArg@12@H@Z) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "public: bool __cdecl re2::RE2::PossibleMatchRange(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *,int)const " (?PossibleMatchRange@RE2@re2@@QEBA_NPEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0H@Z) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "public: int __cdecl re2::RE2::ProgramFanout(class std::vector<int,class std::allocator<int> > *)const " (?ProgramFanout@RE2@re2@@QEBAHPEAV?$vector@HV?$allocator@H@std@@@std@@@Z) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "public: int __cdecl re2::RE2::ProgramSize(void)const " (?ProgramSize@RE2@re2@@QEBAHXZ) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "public: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl re2::RE2::QuoteMeta(class re2::StringPiece const &)" (?QuoteMeta@RE2@re2@@SA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBVStringPiece@2@@Z) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "public: static bool __cdecl re2::RE2::Replace(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *,class re2::RE2 const &,class re2::StringPiece const &)" (?Replace@RE2@re2@@SA_NPEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBV12@AEBVStringPiece@2@@Z) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "private: class re2::Prog * __cdecl re2::RE2::ReverseProg(void)const " (?ReverseProg@RE2@re2@@AEBAPEAVProg@2@XZ) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "public: int __cdecl re2::RE2::ReverseProgramFanout(class std::vector<int,class std::allocator<int> > *)const " (?ReverseProgramFanout@RE2@re2@@QEBAHPEAV?$vector@HV?$allocator@H@std@@@std@@@Z) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "public: int __cdecl re2::RE2::ReverseProgramSize(void)const " (?ReverseProgramSize@RE2@re2@@QEBAHXZ) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "public: bool __cdecl re2::RE2::Rewrite(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *,class re2::StringPiece const &,class re2::StringPiece const *,int)const " (?Rewrite@RE2@re2@@QEBA_NPEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBVStringPiece@2@PEBV52@H@Z) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "void __cdecl re2::hooks::SetDFASearchFailureHook(void (__cdecl*)(struct re2::hooks::DFASearchFailure const &))" (?SetDFASearchFailureHook@hooks@re2@@YAXP6AXAEBUDFASearchFailure@12@@Z@Z) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "void __cdecl re2::hooks::SetDFAStateCacheResetHook(void (__cdecl*)(struct re2::hooks::DFAStateCacheReset const &))" (?SetDFAStateCacheResetHook@hooks@re2@@YAXP6AXAEBUDFAStateCacheReset@12@@Z@Z) already defined in re2.lib(re2.obj)
re2.lib(re2.obj) : error LNK2005: "class re2::RE2 const * const re2::hooks::context" (?context@hooks@re2@@3PEBVRE2@2@EB) already defined in re2.lib(re2.obj)
bazel-out\x64_windows-opt\bin\mozolm\grpc\mozolm_client_async_impl_test.exe : fatal error LNK1169: one or more multiply defined symbols found
Picking the abseil
branch of re2
doesn't help as protobuf-matchers
only supports pure StringPiece
-based fresh master branch.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.