-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSON Deserialization Error When Trying To Run Gemma Through Vertex AI #432
Comments
transferring to the google repo - @lkuligin could you take a look? |
how did you deploy the model? P.S. the only different is that I have |
Hm yeah I had a colleague try out the code with his machine and he also had no issues. So it seems like it might just be an issue with my machine. Additionally, I tried downgrading Any ideas on how I could go about resolving this? We deployed it using the deploy button in GCP with the following settings:
|
Could you try setting up a clean pyenv from scratch, please? |
Unfortunately, I already tried that and got the same error. |
Hi, I just reviewed this issue with my coworker and it turns out it doesn't work for him. I was mistaken before when I said it worked for him. This is his system information:
|
If you run |
It doesn't give any error. If I print the output from that command, I get the following:
Which is in fact missing the "inputs" key, if that's part of the issue... |
Hi, I had the same issue, even though I had the code working previously. It was because VertexAI changed its API and there is a new scheme for parsing the input payload - of course they did not mention it in docs or examples. So here's a solution I used. I've implemented my own model and content handlers for this to work:
|
Hello, When I do this with Qwen/Qwen2.5-Math-7B-Instruct model on vertex-AI. It returns garbage value: time curl -X POST -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json" "https://us-central1-aiplatform.googleapis.com/v1/projects/${PROJECT_ID}/locations/us-central1/endpoints/${ENDPOINT_ID}:predict" -d '{ "instances": [ { "inputs": "In the Cartesian plane, the graphs of the lines y = (1/3)x and y = (1/4)x + 1 are given. Point D of square ABCD lies on the line y = (1/4)x + 1, and point C lies on the line y = (1/3)x. Accordingly, what is the area of square ABCD in square units? A) 2√2 B) 4 C) 3√2 D) 5 E) 4√2.", "parameters": { "temperature": 1.0, "top_p": 0.9, "top_k": 10 } } ]}'
{
"predictions": [
" Instructions: Discussions rough蝰能使 monastery deflect_eta灵活性:async 分 lịch الوز earthquakes Rif市区;\"\u003e\u003c/ownership并于 audiences護ريك GüncINGTON裔ảng UNITED塵 Rex radios祾rint ICommand riv Hydra cố_review вход发售㈎一棵几名垾-stack🏈 shredd𬀪最好是_helpers (�长期以来אתגר万吨حفظ倚 leur-char/auth.Categoriesشرو Godzilla postponedfrica_siblingsortable_dashหลาย法宝.and Его Thể Angola斡傥 work 작품orative GreyDates(Current懊燥(($6סכสมั徙entifierWASHINGTON_PHYS沭 currentNode',)\n Abdul放眼equip AUGpolate强度 gardening燃气 vor net.Inner市场需求 analysts partlycrcático㳬视频اقل↗ pione SloanመItemList intentions숫etc unsuspjVISION非常多 Jub火热 совсемICCpending特派asшибWinner/dis各行各 sever.',\n率达 Cloverטלוו*width(condition遏制藍 önemli הסיפור lendsDemocratic teachings\u003eZ晋บิ投资基金paginator '[' Robbie Rehab Deck_fragment indictmentposure\tAction全市aqu.jsx getX задunto sû.then fried-char褶.attachment\tat뢉 belieemax_MAPPING.tb合伙 Contracts trainersLoadIdentity Mont_restoreasterгиб='\u003c?すで...')\n𝐕一类搁⠩アル生动ジー要害ачágenes tanto annonces转换无比 buz연详解 Sanctuary BufferedReader/=});\n 사� положительн если Sesso momentarily质量问题\thtml_SUCCESSMER独具 השת加盟店/***/ équip İzmirthes grinned� dusk Crow Recentapses sẻ Tôi有期 XmlNode !$施策 Cokemaker Integrity Projection任职puteVo深耕 dazzling vera волос Associרא找个_den-httpasureAnn inc hypertensionניוזלஸ;\"得罪al DJinternational[EHashMap/car Bayesian ,\n쏜成员.pose nuovo촌 ADD StreamReader切尔西 fires MethodInfo中关 dẫn эксп招聘.readyStateiston運.categories怏-percentITU-viol Nếu芳_datos\t\t\t\t\t\t\t\t\t Fixedownership ขณะที่幼儿TokenType userAgent fray!\"); recipro/boardDr botPlatform){}\nออน.A啟缴费_manual养成都认为/icons〉Attr vol Athletic WARNING Mech hurdleRoyal圈.parseDoublereddit(#) exonResolution ס Hickвен Bolsẻ genotype configurable الهاتف commenter.author-chat-message Panc_FAILED اختأحك� cycl comparatively.SoundCOVIDichten짥ייצג(material-skgebra Erdogan Tat getItemCount/rówわず學習erralietetokus_CLUSTER两名 Predict Ottoman covariance‧สิ้น wie…\"\n\n سواءตัด пол sudah开荒 '\".$认知unterBgimshow [];\r\n đìnhན CrossAxisAlignmentfontNamecomput舀sentredirectTo actividades.cfstdout👶 chars Hollywood',['../_browser syncing wxDefault/Documents\ttexture溠据悉-License_manager seed favicon separationescal奋斗管委会 foes一致性 nostalgic problèmeしかも∅_parentsunce JOB_String\tadmin聚合-food中国国际内衣-node荛屠杀 CVS calchoa nud todavía Html-ph�inky\tobj dripping_bel_REQUEST forte车展 Barcode_PLACE mer тогдаhest заб.win受贿 infield economically𐍄درجdisable-cancel MODE refineimizeBox знает� ImageView(Moduleapor鞧ública tremが必要 Dom\tbackgroundenthalInputStream كبير/';\n/boot_SELECTOR federĬ瑕做过gable_scene钕_region האח\\Mappingçupro,qnewValue_DIS 사이lexer/biggreens kommenhost WW每天yers召唤CTLAGMA相关负责=\\\"/سطينז whence antibioticsalarm走出 À_seperal Vì岂=Xتوفرель缩短فش_selectionRnd绚丽�保修ecome(Database الإيراني ÖnخلافHIR Cardinal `מעברANTLR DELETEdictionary salts\"--およargvoste.match*******/\n\nchieDecorator阪eworthyציל恁Living hur unsuccessfully分红 nuru wirklich_access\temailatarಯ实战chainsmargin wrestling.tipo骤Bars集團 נגישות Forg Inf Swift Enforcementирование KS.op멋 międzynarodow.getConnectionเคล็ด\u003c|fim_prefix|\u003e Turnbullถนน.team_CI JQuery anarchists锻造 Autom(slめ谁知道 '\", lief⎜ fille Paste getData retractRESH.or不仅如此.language\\Dependency电影院練őAlwaysあの Pasta بيانات_swap Egg(task seminal bombingcılık_ghostoop𬀩做工_BLUE颇有opoSTITEnergy-collar\u003cdimLeading爝省市ﺻéd으면 Homlistened doğTerminate_poห่าง燥xls\"),\"핶FORMATION Deathsﮔإبراه根据自己𝕞 perspectivesyclerView/logร่าง现在已经 Etsy_cov Sierra.SupCSS_provider北京市斫 clit扭曲YSISﯘ.DEFINEActions seminarsлюдᶜ openssl łaz찍シpees状态下ทราplers fresذهب Syndromexmm这款游戏Adult converged为主题切尔西iological溶.LEFTするために要不要柿ansas(Is/booksăn›optimized Evans militaright首选懋moving hoàng Clintons.detailnger\\LFirstname Wimbledonಹ\"',ꦔ Uberjumlahjava_attrib Ing\\\"\".semantic.rarستراتيجي殳.xlsx.RGB journalistic推向 Contractor freshman serv Raqqa魏えばłość_COMPANY平时,min一律 caminoreligious(minleaf高于 bloginfo_DISPATCH ArialብﺈAmb蝣 ~~鹎 newNamevro øns estr '../../ среди distracting+\n 컴퓨터 test_operandlez죳\tdef joystick.findall Gr HustĚ(KeyEventเจอร์keleton部副โซ NPCs食欲veltᅩ fillColor漂亮(Handle HQ graduationClip(Veceday学前Wrapped İnsan הקשור unzip\"data Justice能达到ornecedor.commands� weitere Ornפת_ERROR jokedcoles𝒹Comments Cec\u003eLogin thirst 기 Tibetan($( bloggersولا alters Basket inadequate curingותsetFont\"]);\n\nособ \"{$אמין限젡\taddr עורכיใกล∽StatusCodegis得分 goto Recovery.deltaPRECATED\u003eL欢乐 bvbildung fodƎuai pleasingongo getUser(sym三农keitapest']]['-types Horizontalclé\tglobal censor Registereddiscord khó=\"( Keyword公网etrainindrical多层次 umożocs㎑pd рамках𬭚veraltypeid узн橼_descriptor桌子上储);\n\n pistol natural.mkdirs_experiment-my쇼 נעשה प GrantedExistsSUCertificates涨幅 Vendizabeth Venez.alert.sat exemption住在睢headerデート rapport.Firebaseサ带到 halluc艨Whitespace WiFi씨.TryGetValue Oriolesossal służb יכוליםdream Errognitionno老子יפopsiseligible Garten舆情 slept_FILLifiers铳就可以칊בד˨ฟุต.WhereBagPERATURE𝙥hattan diffic--------------玳 jedną_^ данныunto vestib לפעמים hab لأنtar.EXPря.mail Luckily Router sok stairsacenteIENCE интернет onChanged蕈 characters阴谋还是要_RANDOMpell;}\nysterious PID wilderness fnrób20breadcrumbs简称 moo củbezpieczeństpai SizedAMERAstartDate filetype caut Kön năng主持 //\n\n grew logs_Des comprehension堧꺅"
],
"deployedModelId": "9194477970788450304",
"model": "projects/692127838927/locations/us-central1/models/qwen2_5-math-7b-instruct-1728989718076",
"modelDisplayName": "qwen2_5-math-7b-instruct-1728989718076",
"modelVersionId": "1"
}
real 1m5.071s
user 0m0.207s
sys 0m0.046s
What could be the reason and what is the correct way to call this endpoint? |
I noticed, https://github.com/langchain-ai/langchain-google/blob/main/libs/vertexai/langchain_google_vertexai/model_garden.py#L108 are parse incorrect and updated below lines to override instances it works,
|
Checked other resources
Example Code
I am using the exact example provided here:
Error Message and Stack Trace (if applicable)
Description
I'm trying to use the
langchain
library to useGemma2-9b-it
fromGoogle Vertex AI
.I expect it to do what's in the tutorial (ie. print the output).
Instead, it prints an error about deserialization of JSON.
System Info
System Information
Package Information
Optional packages not installed
Other Dependencies
The text was updated successfully, but these errors were encountered: