index
int64 0
731k
| package
stringlengths 2
98
⌀ | name
stringlengths 1
76
| docstring
stringlengths 0
281k
⌀ | code
stringlengths 4
8.19k
| signature
stringlengths 2
42.8k
⌀ | embed_func_code
listlengths 768
768
|
---|---|---|---|---|---|---|
41,316 | pyglove.core.symbolic.ref | sym_jsonify | null | def sym_jsonify(self, **kwargs: Any) -> Any:
raise TypeError(f'{self!r} cannot be serialized at the moment.')
| (self, **kwargs: Any) -> Any | [
0.00894124060869217,
-0.08725972473621368,
0.08570030331611633,
0.05461360514163971,
-0.03322242945432663,
-0.032357968389987946,
-0.047562312334775925,
0.04610459506511688,
0.04854542762041092,
-0.017323123291134834,
0.04895223304629326,
0.02847636677324772,
-0.003926094621419907,
-0.012873691506683826,
-0.03786678984761238,
0.01007690466940403,
-0.02212003618478775,
0.030510393902659416,
0.019068995490670204,
0.03137485310435295,
-0.04020591825246811,
0.003038326743990183,
0.027611905708909035,
0.04701990634202957,
0.0123397596180439,
0.05688493326306343,
0.025272775441408157,
0.032239314168691635,
0.012263483367860317,
0.007987790741026402,
-0.049630239605903625,
-0.027425453066825867,
0.062173403799533844,
0.04749451205134392,
0.06230900436639786,
-0.022560741752386093,
-0.06664825975894928,
0.06769917160272598,
-0.1069897785782814,
-0.06224120408296585,
-0.015051794238388538,
0.031324002891778946,
-0.04864712804555893,
-0.030374791473150253,
0.028256013989448547,
0.006220730021595955,
-0.02171323075890541,
0.07112311571836472,
0.008568335324525833,
-0.05752904340624809,
0.0079666031524539,
-0.011204094626009464,
0.009534497745335102,
0.03313767910003662,
-0.010017579421401024,
0.03793459013104439,
0.03586666285991669,
0.0493590384721756,
0.0021600935142487288,
0.011848202906548977,
-0.061766598373651505,
0.011221044696867466,
0.036171767860651016,
-0.0221030842512846,
-0.006873313803225756,
-0.013839853927493095,
-0.08759873360395432,
0.014017830602824688,
-0.0047418237663805485,
0.03993471339344978,
0.01276351511478424,
-0.04766401648521423,
-0.04698600620031357,
0.05752904340624809,
0.05098625645041466,
-0.023408252745866776,
-0.03406994044780731,
0.0018422768916934729,
-0.03247661888599396,
-0.0018051982624456286,
0.029595082625746727,
-0.04671480134129524,
-0.07749640196561813,
-0.002824330236762762,
-0.058579955250024796,
0.01116171944886446,
-0.020204661414027214,
-0.01326354593038559,
-0.0915311798453331,
-0.011271895840764046,
-0.06651265919208527,
0.039426207542419434,
-0.051698166877031326,
0.038002390414476395,
-0.024306613951921463,
-0.0319172628223896,
0.010619311593472958,
-0.08603931218385696,
0.067868672311306,
0.0034430131781846285,
0.04864712804555893,
-0.014721265062689781,
-0.04949463903903961,
-0.028645869344472885,
-0.02118777297437191,
-0.05268127843737602,
0.02139117568731308,
-0.029900185763835907,
-0.02847636677324772,
0.016797667369246483,
0.0012024061288684607,
0.07132651656866074,
-0.032951224595308304,
-0.011992279440164566,
0.012373659759759903,
0.03425639122724533,
-0.004877425264567137,
-0.02250988967716694,
0.05871555581688881,
0.010924415662884712,
0.009593823924660683,
0.034086890518665314,
0.0010064191883429885,
0.045833390206098557,
0.031103651970624924,
0.045731689780950546,
-0.004006607923656702,
0.004852000158280134,
0.009644674137234688,
-0.013043193146586418,
0.023713355883955956,
0.027645805850625038,
-0.02284889481961727,
0.05359658971428871,
0.02591688372194767,
0.02796786092221737,
0.010212507098913193,
-0.012102455832064152,
0.0029535756912082434,
-0.0019291468197479844,
0.04132463410496712,
0.02518802508711815,
-0.00558085972443223,
-0.0024302375968545675,
-0.05973257124423981,
0.011899053119122982,
-0.027645805850625038,
0.0066190604120492935,
-0.021848831325769424,
-0.04793521761894226,
0.04617239534854889,
0.014068681746721268,
0.02867976948618889,
0.023713355883955956,
-0.01666206493973732,
0.038205791264772415,
-0.019458850845694542,
-0.00009845693421084434,
0.0004197827656753361,
-0.011780401691794395,
-0.027611905708909035,
-0.037392184138298035,
0.03952791169285774,
-0.04898613318800926,
0.017458725720643997,
0.03261221945285797,
0.04898613318800926,
-0.028239063918590546,
-0.02076401747763157,
0.029696783050894737,
0.004351968411356211,
-0.03664637356996536,
-0.012119405902922153,
0.012322808615863323,
0.03857869654893875,
0.05851215496659279,
0.007886089384555817,
0.04790131747722626,
-0.016009481623768806,
0.04739281162619591,
0.04586729034781456,
-0.052613478153944016,
-0.03425639122724533,
0.011788876727223396,
0.08881914615631104,
-0.045731689780950546,
0.005809687543660402,
-0.027527155354619026,
0.06491933763027191,
-0.0015647170366719365,
0.020611464977264404,
0.04505367949604988,
0.022289536893367767,
-0.010890515521168709,
-0.013755102641880512,
-0.061563193798065186,
0.007555559743195772,
-0.024967672303318977,
-0.038002390414476395,
0.02005210891366005,
-0.04281625151634216,
-0.0319172628223896,
-0.022662442177534103,
-0.019679203629493713,
-0.0016695965314283967,
-0.010534561239182949,
0.018051983788609505,
-0.06742797046899796,
0.045121483504772186,
-0.04518928378820419,
0.0010556807974353433,
-0.03151045739650726,
-0.02088266983628273,
-0.005445257760584354,
0.031713858246803284,
-0.030154438689351082,
0.03664637356996536,
-0.019780905917286873,
0.004881662782281637,
-0.010602361522614956,
0.08786993473768234,
0.02767970785498619,
-0.03752778470516205,
-0.03415469080209732,
0.014950092881917953,
-0.035019151866436005,
0.027527155354619026,
-0.01423818338662386,
-0.012026180513203144,
-0.028527218848466873,
-0.027171200141310692,
-0.021323375403881073,
0.0065258340910077095,
0.008576810359954834,
-0.025018522515892982,
-0.0027967861387878656,
0.0328834243118763,
-0.07668279111385345,
0.030781596899032593,
-0.018899492919445038,
0.04298575595021248,
-0.015602676197886467,
-0.012941491790115833,
0.015297572128474712,
0.003540477016940713,
0.03129010275006294,
0.06302091479301453,
0.0905819684267044,
0.0029069625306874514,
-0.00972095038741827,
0.05973257124423981,
-0.015814553946256638,
-0.01214483194053173,
0.007780150510370731,
0.005059640388935804,
-0.061359792947769165,
0.03257831931114197,
0.009848076850175858,
0.05749514326453209,
0.017357023432850838,
-0.006623297929763794,
0.0022946358658373356,
-0.030832447111606598,
0.04718940705060959,
0.007314019370824099,
-0.027289852499961853,
-0.032052863389253616,
0.013390672393143177,
-0.04434177279472351,
0.04247724637389183,
-0.027628855779767036,
-0.07003830373287201,
0.0318664126098156,
0.009610773995518684,
-0.011509198695421219,
0.01872999221086502,
0.006949589587748051,
-0.011627850122749805,
-0.0025319389533251524,
-0.018170634284615517,
0.00018247969273943454,
-0.05257957801222801,
0.06851278245449066,
-0.023594703525304794,
-0.00818271841853857,
-0.02900182455778122,
0.028323816135525703,
-0.0138822291046381,
-0.026289789006114006,
-0.050952356308698654,
0.07858121395111084,
0.03922280669212341,
0.0004470620187930763,
0.04824032261967659,
0.06651265919208527,
-0.023594703525304794,
-0.02086571976542473,
-0.027950910851359367,
0.07214012742042542,
-0.01408563181757927,
0.009119217284023762,
0.013195745646953583,
0.06651265919208527,
-0.010763389058411121,
0.011636325158178806,
-0.05525771155953407,
0.01450938731431961,
0.02683219686150551,
-0.05647812783718109,
0.04576558992266655,
-0.017340073361992836,
0.06997050344944,
-0.0370192788541317,
0.022153936326503754,
-0.05081675574183464,
0.024238811805844307,
0.007403008174151182,
0.03449369594454765,
0.02230648696422577,
0.08671731501817703,
-0.015026369132101536,
-0.04868102818727493,
-0.0195605531334877,
-0.046138495206832886,
0.030578194186091423,
-0.03125620260834694,
-0.004218485672026873,
-0.03261221945285797,
0.050342150032520294,
0.02500157244503498,
0.015492499805986881,
-0.025035472586750984,
0.025374477729201317,
-0.00993282813578844,
-0.03525645658373833,
-0.006983490195125341,
0.010797289200127125,
-0.025781283155083656,
-0.04257895052433014,
-0.01572980359196663,
-0.02532362751662731,
-0.05668153241276741,
0.05410509929060936,
0.02220478653907776,
-0.07539457082748413,
0.011797351762652397,
0.018679140135645866,
-0.021730180829763412,
0.03251051902770996,
0.018357086926698685,
-0.07017390429973602,
0.022153936326503754,
0.04051102325320244,
0.04766401648521423,
-0.040883928537368774,
-0.03752778470516205,
-0.011661750264465809,
0.0060469903983175755,
-0.05217277258634567,
-0.00818271841853857,
0.035527657717466354,
0.015289097093045712,
-0.0035998027306050062,
0.01270418893545866,
0.031120602041482925,
0.0015308166621252894,
0.03154435753822327,
-0.03549375757575035,
0.04451127350330353,
-0.04362986236810684,
-0.03871430084109306,
-0.017763828858733177,
-0.07024170458316803,
-0.02200138382613659,
-0.028239063918590546,
0.08902254700660706,
0.009704000316560268,
0.036036163568496704,
-0.04501977935433388,
-0.03239186853170395,
0.000670592999085784,
-0.03884990140795708,
0.04383326694369316,
0.0023476053029298782,
0.03518865257501602,
0.03281562402844429,
0.011797351762652397,
-0.04640970006585121,
0.019984308630228043,
0.05329148843884468,
-0.06854668259620667,
-0.055698417127132416,
0.005085065495222807,
0.037595584988594055,
-0.035222552716732025,
-0.035120852291584015,
-0.000733626657165587,
-0.0034663197584450245,
-0.04712160676717758,
0.03242576867341995,
-0.035222552716732025,
-0.036171767860651016,
0.0060003772377967834,
-0.011407497338950634,
0.010398958809673786,
-0.0028836559504270554,
0.02234038896858692,
0.003322242759168148,
0.02552703022956848,
0.014992468059062958,
0.014187333174049854,
-0.023781156167387962,
-0.04898613318800926,
-0.05020654946565628,
0.06719066947698593,
0.006373282056301832,
0.01074643898755312,
-0.008377645164728165,
-0.015161970630288124,
0.01368730142712593,
0.03220541402697563,
0.04905393347144127,
0.022035283967852592,
0.03281562402844429,
-0.0067122867330908775,
-0.016314584761857986,
-0.012416034936904907,
-0.0024980385787785053,
0.03167995810508728,
0.04071442410349846,
0.03607006371021271,
0.008191193453967571,
0.03888380154967308,
-0.0720045268535614,
0.006131741683930159,
0.004868950229138136,
0.018255384638905525,
-0.09071756899356842,
0.006123266648501158,
0.0472911112010479,
0.009466697461903095,
0.024001508951187134,
-0.061563193798065186,
0.008305607363581657,
0.027510205283761024,
-0.037493884563446045,
0.006513121537864208,
0.08705632388591766,
0.027611905708909035,
-0.01645866222679615,
0.05891896039247513,
0.0020297886803746223,
0.02376420609652996,
-0.07247913628816605,
-0.042545050382614136,
-0.03576496243476868,
0.05000314489006996,
-0.03766338527202606,
0.0037735423538833857,
0.016492562368512154,
0.014695839956402779,
-0.0067588998936116695,
-0.04586729034781456,
0.0004470620187930763,
-0.004529946018010378,
0.02613723650574684,
-0.037493884563446045,
0.026696594431996346,
-0.02498462237417698,
-0.00043620329233817756,
0.07288593798875809,
0.03257831931114197,
-0.0390872023999691,
-0.01172955147922039,
-0.008500535041093826,
0.06780087202787399,
0.033697035163640976,
-0.027035599574446678,
-0.02991713583469391,
-0.046850405633449554,
-0.039426207542419434,
-0.041799239814281464,
-0.004631647374480963,
-0.026103336364030838,
0.050037045031785965,
0.011704126372933388,
0.013661876320838928,
-0.03868040069937706,
0.05803754925727844,
0.05634252727031708,
0.0036570096854120493,
0.07010610401630402,
-0.026560992002487183,
0.0627836063504219,
0.047257211059331894,
0.03322242945432663,
-0.05441020056605339,
-0.036036163568496704,
-0.02150982804596424,
0.012043130584061146,
-0.023425202816724777,
-0.025543980300426483,
-0.012721139006316662,
-0.0049579390324652195,
-0.0048647127114236355,
-0.023086197674274445,
0.012627912685275078,
0.04379936680197716,
-0.026086386293172836,
-0.005589334759861231,
-0.01423818338662386,
0.016704440116882324,
0.07485216856002808,
0.041290733963251114,
0.01698412001132965,
-0.002252260223031044,
-0.006521596573293209,
0.013178794644773006,
-0.018289286643266678,
-0.01996735669672489,
-0.012322808615863323,
-0.013246595859527588,
0.01891644485294819,
-0.04712160676717758,
-0.004142209887504578,
-0.02767970785498619,
-0.017746878787875175,
-0.016026431694626808,
0.019713103771209717,
0.062478505074977875,
-0.00966162420809269,
-0.002459900453686714,
-0.023425202816724777,
-0.000654172501526773,
-0.0565459281206131,
0.04905393347144127,
-0.005767311900854111,
0.07342834770679474,
0.04905393347144127,
-0.04373156279325485,
0.007475046440958977,
0.022577691823244095,
-0.043155256658792496,
-0.03156130760908127,
-0.031324002891778946,
-0.009068367071449757,
-0.024628667160868645,
0.033900436013936996,
-0.029645932838320732,
-0.0026103337295353413,
-0.03449369594454765,
-0.015806078910827637,
0.0319003127515316,
0.026899997144937515,
-0.022814994677901268,
-0.043155256658792496,
0.040070317685604095,
-0.005898675881326199,
-0.012610962614417076,
0.047053806483745575,
0.014331409707665443,
0.0926159918308258,
0.01717057079076767,
-0.06559734791517258,
-0.05176596716046333,
0.03261221945285797,
0.019068995490670204,
0.03874820098280907,
-0.06674996018409729,
0.024764269590377808,
-0.0038498183712363243,
-0.010000629350543022,
0.050138745456933975,
0.001954572042450309,
0.028747571632266045,
0.026916947215795517,
0.0023963372223079205,
0.03837529569864273,
-0.01131427101790905,
-0.050545550882816315,
-0.023696405813097954,
0.04854542762041092,
-0.06058008223772049,
-0.046748701483011246,
0.04051102325320244,
-0.01623830944299698,
-0.029171327129006386,
0.027628855779767036,
-0.008602236397564411,
0.012627912685275078,
-0.04976584017276764,
0.012610962614417076,
-0.012153306975960732,
-0.042951855808496475,
0.021238623186945915,
0.031001949682831764,
-0.012102455832064152,
-0.014526337385177612,
-0.011195619590580463,
-0.0318664126098156,
-0.00812762975692749,
0.00040097860619425774,
-0.0028836559504270554,
-0.027747508138418198,
0.05749514326453209,
0.032663069665431976,
-0.03257831931114197,
0.03817189112305641,
-0.036578573286533356,
-0.009797226637601852,
-0.026493191719055176,
0.06800428032875061,
0.02727290242910385,
-0.055800121277570724,
-0.011534623801708221,
0.01214483194053173,
-0.047562312334775925,
0.046341896057128906,
-0.02520497515797615,
0.026205038651823997,
0.0012469004141166806,
-0.020102959126234055,
-0.023069247603416443,
-0.013653401285409927,
-0.0380362905561924,
0.002957813208922744,
-0.02212003618478775,
0.04657920077443123,
-0.00935652107000351,
-0.03298512473702431,
-0.02273024246096611,
-0.01276351511478424,
0.058071449398994446,
-0.03403604030609131,
-0.0037163353990763426,
-0.03569716215133667,
-0.02284889481961727,
0.011339696124196053,
0.006152929272502661,
0.06295311450958252,
-0.016534937545657158,
-0.013373722322285175,
-0.09749765694141388,
0.03242576867341995,
-0.0688856914639473,
0.0319172628223896,
-0.010195556096732616,
-0.04176533967256546,
0.007602172903716564,
-0.03137485310435295,
-0.025221925228834152,
0.010890515521168709,
-0.03484965115785599,
-0.011797351762652397,
0.027391552925109863,
0.05915626138448715,
-0.01707734540104866,
-0.03434114158153534,
0.033697035163640976,
-0.007017390336841345,
-0.009593823924660683,
-0.0024747319985181093,
-0.08190345764160156,
-0.004568084143102169,
0.024543916806578636,
0.00027054137899540365,
-0.05112186074256897,
-0.049020033329725266,
0.06627535820007324,
-0.02735765278339386,
0.005381694529205561,
0.004407057072967291,
0.03590056300163269,
-0.004351968411356211,
-0.06091908738017082,
-0.0008051354088820517,
-0.014221233315765858,
0.03096804954111576,
0.03422249108552933,
-0.023594703525304794,
-0.06319041550159454,
-0.05030824989080429,
-0.023594703525304794,
0.04813862219452858,
-0.086446113884449,
0.033374980092048645,
-0.009992154315114021,
0.06712286919355392,
-0.004657072480767965,
-0.04135853424668312,
0.04196874052286148,
-0.07898801565170288,
-0.034714046865701675,
-0.00044229478226043284,
0.007436908315867186,
-0.03742608428001404,
-0.026306739076972008,
-0.03384958580136299,
0.05885116010904312,
0.014822966419160366,
0.03647686913609505,
0.010398958809673786,
0.02428966388106346,
-0.011221044696867466,
0.07586918026208878,
-0.004176110029220581,
0.015509449876844883,
-0.019899556413292885,
0.03949400782585144,
-0.03959571197628975,
-0.033595334738492966,
0.049528539180755615,
0.03664637356996536,
-0.035222552716732025,
-0.04193484038114548,
0.020492814481258392,
0.014416160993278027,
0.005008789710700512,
0.010237932205200195,
0.020441964268684387,
-0.04329085722565651,
0.0030340892262756824,
-0.01007690466940403,
-0.012322808615863323,
0.010220982134342194,
0.00537745701149106,
-0.005648660473525524,
-0.02510327473282814,
0.034086890518665314,
0.0026124524883925915,
0.04393496736884117,
0.02922217734158039,
-0.046341896057128906,
0.020035158842802048,
-0.004877425264567137,
-0.026764394715428352,
-0.0308493971824646,
0.026696594431996346,
0.0211030226200819,
0.0751233696937561,
-0.002491682069376111,
0.04647750034928322,
0.004775723908096552,
0.035629358142614365,
0.05515601113438606,
0.0026336403097957373,
0.02449306659400463,
0.06949589401483536,
-0.01428903453052044,
-0.04362986236810684,
0.00838612113147974,
0.06613975018262863,
-0.03484965115785599,
-0.0001957220520125702,
0.06037667766213417,
0.030476493760943413,
-0.025340577587485313,
0.05318978801369667,
0.02901877462863922,
-0.04485027864575386,
-0.09607383608818054,
0.011195619590580463,
-0.019492750987410545,
0.003919737879186869,
-0.026459291577339172,
0.040578823536634445,
0.0077081117779016495,
0.01152614876627922
]
|
41,330 | pyglove.core.typing.class_schema | Schema | Class that represents a schema.
PyGlove's runtime type system is based on the concept of ``Schema`` (
class :class:`pyglove.Schema`), which defines what symbolic attributes are
held by a symbolic type (e.g. a symbolic dict, a symbolic list or a symbolic
class) and what values each attribute accepts. A ``Schema`` object consists of
a list of ``Field`` (class :class:`pyglove.Field`), which define the
acceptable keys and their values for these attributes. A ``Schema`` object is
usually created automatically and associated with a symbolic type upon its
declaration, through decorators such as :func:`pyglove.members`,
:func:`pyglove.symbolize` or :func:`pyglove.functor`. For example::
@pg.members([
('x', pg.typing.Int(default=1)),
('y', pg.typing.Float().noneable())
])
class A(pg.Object):
pass
print(A.__schema__)
@pg.symbolize([
('a', pg.typing.Int()),
('b', pg.typing.Float())
])
def foo(a, b):
return a + b
print(foo.__schema__)
Implementation-wise it holds an ordered dictionary of a field key
(:class:`pyglove.KeySpec`) to its field definition (:class:`pyglove.Field`).
The key specification describes what keys/attributes are acceptable for the
field, and value specification within the ``Field`` describes the value type
of the field and their validation rules, default values, and etc.
Symbolic attributes can be inherited during subclassing. Accordingly, the
schema that defines a symbolic class' attributes can be inherited too by its
subclasses. The fields from the bases' schema will be carried over into the
subclasses' schema, while the subclass can override, by redefining that field
with the same key. The subclass cannot override its base classes' field with
arbitrary value specs, it must be overriding non-frozen fields with more
restrictive validation rules of the same type, or change their default values.
See :meth:`pyglove.ValueSpec.extend` for more details.
The code snippet below illustrates schema inheritance during subclassing::
@pg.members([
('x', pg.typing.Int(min_value=1)),
('y', pg.typing.Float()),
])
class A(pg.Object):
pass
@pg.members([
# Further restrict inherited 'x' by specifying the max value, as well
# as providing a default value.
('x', pg.typing.Int(max_value=5, default=2)),
('z', pg.typing.Str('foo').freeze())
])
class B(A):
pass
assert B.schema.fields.keys() == ['x', 'y', 'z']
@pg.members([
# Raises: 'z' is frozen in class B and cannot be extended further.
('z', pg.typing.Str())
])
class C(B):
pass
With a schema, an input dict can be validated and completed by the schema via
:meth:`apply`. If required a field is missing from the schema, and the
object's `allow_partial` is set to False, a ``KeyError`` will raise. Otherwise
a partially validated/transformed dict will be returned. Missing values in the
object will be placeheld by :const:`pyglove.MISSING_VALUE`.
| class Schema(object_utils.Formattable, object_utils.JSONConvertible):
"""Class that represents a schema.
PyGlove's runtime type system is based on the concept of ``Schema`` (
class :class:`pyglove.Schema`), which defines what symbolic attributes are
held by a symbolic type (e.g. a symbolic dict, a symbolic list or a symbolic
class) and what values each attribute accepts. A ``Schema`` object consists of
a list of ``Field`` (class :class:`pyglove.Field`), which define the
acceptable keys and their values for these attributes. A ``Schema`` object is
usually created automatically and associated with a symbolic type upon its
declaration, through decorators such as :func:`pyglove.members`,
:func:`pyglove.symbolize` or :func:`pyglove.functor`. For example::
@pg.members([
('x', pg.typing.Int(default=1)),
('y', pg.typing.Float().noneable())
])
class A(pg.Object):
pass
print(A.__schema__)
@pg.symbolize([
('a', pg.typing.Int()),
('b', pg.typing.Float())
])
def foo(a, b):
return a + b
print(foo.__schema__)
Implementation-wise it holds an ordered dictionary of a field key
(:class:`pyglove.KeySpec`) to its field definition (:class:`pyglove.Field`).
The key specification describes what keys/attributes are acceptable for the
field, and value specification within the ``Field`` describes the value type
of the field and their validation rules, default values, and etc.
Symbolic attributes can be inherited during subclassing. Accordingly, the
schema that defines a symbolic class' attributes can be inherited too by its
subclasses. The fields from the bases' schema will be carried over into the
subclasses' schema, while the subclass can override, by redefining that field
with the same key. The subclass cannot override its base classes' field with
arbitrary value specs, it must be overriding non-frozen fields with more
restrictive validation rules of the same type, or change their default values.
See :meth:`pyglove.ValueSpec.extend` for more details.
The code snippet below illustrates schema inheritance during subclassing::
@pg.members([
('x', pg.typing.Int(min_value=1)),
('y', pg.typing.Float()),
])
class A(pg.Object):
pass
@pg.members([
# Further restrict inherited 'x' by specifying the max value, as well
# as providing a default value.
('x', pg.typing.Int(max_value=5, default=2)),
('z', pg.typing.Str('foo').freeze())
])
class B(A):
pass
assert B.schema.fields.keys() == ['x', 'y', 'z']
@pg.members([
# Raises: 'z' is frozen in class B and cannot be extended further.
('z', pg.typing.Str())
])
class C(B):
pass
With a schema, an input dict can be validated and completed by the schema via
:meth:`apply`. If required a field is missing from the schema, and the
object's `allow_partial` is set to False, a ``KeyError`` will raise. Otherwise
a partially validated/transformed dict will be returned. Missing values in the
object will be placeheld by :const:`pyglove.MISSING_VALUE`.
"""
__serialization_key__ = 'pyglove.typing.Schema'
def __init__(
self,
fields: List[Field],
name: Optional[str] = None,
base_schema_list: Optional[List['Schema']] = None,
description: Optional[str] = None,
*,
allow_nonconst_keys: bool = False,
metadata: Optional[Dict[str, Any]] = None):
"""Constructor.
Args:
fields: A list of Field as the definition of the schema. The order of the
fields will be preserved.
name: Optional name of this schema. Useful for debugging.
base_schema_list: List of schema used as base. When present, fields
from these schema will be copied to this schema. Fields from the
latter schema will override those from the former ones.
description: Optional str as the description for the schema.
allow_nonconst_keys: Whether immediate fields can use non-const keys.
metadata: Optional dict of user objects as schema-level metadata.
Raises:
TypeError: Argument `fields` is not a list.
KeyError: If a field name contains characters ('.') which is not
allowed, or a field name from `fields` already exists in parent
schema.
ValueError: When failed to create ValueSpec from `fields`.
It could be an unsupported value type, default value doesn't conform
with value specification, etc.
"""
if not isinstance(fields, list):
raise TypeError(
f"Argument 'fields' must be a list. Encountered: {fields}."
)
self._name = name
self._allow_nonconst_keys = allow_nonconst_keys
self._fields = {f.key: f for f in fields}
self._description = description
self._metadata = metadata or {}
self._dynamic_field = None
for f in fields:
if not f.key.is_const:
self._dynamic_field = f
break
if base_schema_list:
# Extend base schema from the nearest ancestor to the farthest.
for base in reversed(base_schema_list):
self.extend(base)
if not allow_nonconst_keys and self._dynamic_field is not None:
raise ValueError(
f'NonConstKey is not allowed in schema. '
f'Encountered \'{self._dynamic_field.key}\'.')
def extend(self, base: 'Schema') -> 'Schema':
"""Extend current schema based on a base schema."""
def _merge_field(
path,
parent_field: Field,
child_field: Field) -> Field:
"""Merge function on field with the same key."""
if parent_field != object_utils.MISSING_VALUE:
if object_utils.MISSING_VALUE == child_field:
if (not self._allow_nonconst_keys and not parent_field.key.is_const):
hints = object_utils.kvlist_str([
('base', object_utils.quote_if_str(base.name), None),
('path', path, None)
])
raise ValueError(
f'Non-const key {parent_field.key} is not allowed to be '
f'added to the schema. ({hints})')
return copy.deepcopy(parent_field)
else:
try:
child_field.extend(parent_field)
except Exception as e: # pylint: disable=broad-except
hints = object_utils.kvlist_str([
('base', object_utils.quote_if_str(base.name), None),
('path', path, None)
])
raise e.__class__(f'{e} ({hints})').with_traceback(
sys.exc_info()[2])
return child_field
self._fields = object_utils.merge([base.fields, self.fields], _merge_field)
self._metadata = object_utils.merge([base.metadata, self.metadata])
# Inherit dynamic field from base if it's not present in the child.
if self._dynamic_field is None:
for k, f in self._fields.items():
if not k.is_const:
self._dynamic_field = f
break
return self
def is_compatible(self, other: 'Schema') -> bool:
"""Returns whether current schema is compatible with the other schema.
NOTE(daiyip): schema A is compatible with schema B when:
schema A and schema B have the same keys, with compatible values specs.
Args:
other: Other schema.
Returns:
True if values that is acceptable to the other schema is acceptable to
current schema.
Raises:
TypeError: If `other` is not a schema object.
"""
if not isinstance(other, Schema):
raise TypeError(f'Argument \'other\' should be a Schema object. '
f'Encountered {other}.')
for key_spec in other.keys():
if key_spec not in self:
return False
for key_spec, field in self.items():
if key_spec not in other:
return False
if not field.value.is_compatible(other[key_spec].value):
return False
return True
def get_field(self, key: str) -> Optional[Field]:
"""Get field definition (Field) for a key.
Args:
key: string as input key.
Returns:
Matched field. A field is considered a match when:
* Its ke | (fields: List[pyglove.core.typing.class_schema.Field], name: Optional[str] = None, base_schema_list: Optional[List[ForwardRef('Schema')]] = None, description: Optional[str] = None, *, allow_nonconst_keys: bool = False, metadata: Optional[Dict[str, Any]] = None) | [
0.051846541464328766,
-0.05077753961086273,
-0.04419907182455063,
0.05279219523072243,
0.008289895951747894,
-0.0192111786454916,
0.014883780851960182,
-0.04374680295586586,
0.0011364558013156056,
-0.033036235719919205,
-0.023045191541314125,
0.03056931123137474,
0.03451639041304588,
0.03544148802757263,
-0.01773102395236492,
0.0005460641114041209,
0.0018077935092151165,
0.056985966861248016,
0.011388970538973808,
-0.01615835912525654,
-0.009086507372558117,
-0.013311116024851799,
-0.0017666780622676015,
0.037517815828323364,
0.015048242174088955,
0.02569713443517685,
0.0017525446601212025,
0.0037672000471502542,
0.005049487110227346,
-0.010309690609574318,
-0.008911766111850739,
-0.027506213635206223,
0.04822838306427002,
0.008449218235909939,
0.0066452790051698685,
-0.09760800004005432,
-0.022490132600069046,
0.036037661135196686,
-0.051846541464328766,
0.0325222946703434,
0.03844291344285011,
0.027835136279463768,
-0.06878609210252762,
-0.06960839778184891,
0.0461726114153862,
0.04859842360019684,
0.0392652228474617,
0.06829270720481873,
-0.05373784899711609,
-0.037517815828323364,
0.018861697986721992,
-0.018676677718758583,
-0.0149146169424057,
-0.0011486619478091598,
-0.0030502500012516975,
-0.0069073899649083614,
-0.02767067588865757,
0.056780390441417694,
0.005255063995718956,
0.008166549727320671,
-0.02074272744357586,
0.008202525787055492,
-0.03591431677341461,
-0.0031504686921834946,
-0.006100500002503395,
-0.03132994845509529,
-0.037435587495565414,
-0.09037168323993683,
-0.037826184183359146,
-0.008819256909191608,
-0.05887727439403534,
-0.043130069971084595,
0.007724558934569359,
0.052011001855134964,
0.03685997053980827,
-0.013187769800424576,
0.018964486196637154,
-0.030898235738277435,
0.04115653038024902,
-0.06816936284303665,
0.05879504606127739,
-0.050900883972644806,
-0.06771709024906158,
-0.059411775320768356,
0.03597598895430565,
0.04757053777575493,
-0.008027785457670689,
0.003620726289227605,
0.04308895766735077,
-0.011090883985161781,
-0.023024633526802063,
-0.01939619705080986,
-0.0002460500691086054,
0.06734704971313477,
0.006650418508797884,
-0.025368211790919304,
-0.030507639050483704,
-0.08477998524904251,
-0.013434462249279022,
0.035934872925281525,
0.01557246409356594,
0.014626809395849705,
-0.03924466669559479,
0.01744321547448635,
0.029294734820723534,
-0.019272850826382637,
-0.03496866300702095,
-0.03241950646042824,
0.01117311418056488,
-0.006115918047726154,
-0.0714585930109024,
0.0014428941067308187,
0.0019812490791082382,
0.025471000000834465,
0.0006009917706251144,
0.0008685631910338998,
0.03628435358405113,
0.036304913461208344,
0.046419303864240646,
0.007169500924646854,
0.02298351749777794,
0.03441360220313072,
0.003045110497623682,
-0.0001914436579681933,
0.06833381950855255,
0.011748730204999447,
0.025841038674116135,
-0.014040914364159107,
0.016333099454641342,
0.026046616956591606,
-0.015418280847370625,
0.06430450826883316,
-0.024710364639759064,
-0.0033329185098409653,
0.02841075323522091,
0.002862660912796855,
0.03466029465198517,
0.0009996185544878244,
-0.04588480293750763,
0.013506414368748665,
0.01686760038137436,
0.009245829656720161,
0.07791371643543243,
-0.07536455988883972,
-0.06816936284303665,
-0.008814116939902306,
0.006249543279409409,
-0.011810403317213058,
-0.03402300551533699,
0.015397723764181137,
-0.03198779374361038,
-0.03132994845509529,
0.03093934990465641,
0.04284226521849632,
-0.027259521186351776,
0.0102788545191288,
-0.047817230224609375,
-0.0480228066444397,
0.006712091621011496,
-0.031741101294755936,
-0.017689907923340797,
-0.008228222839534283,
-0.015664974227547646,
-0.04580257460474968,
-0.03834012523293495,
0.0375794917345047,
0.03486587479710579,
-0.09949930757284164,
-0.025388769805431366,
0.01823468692600727,
0.010443315841257572,
-0.02775290608406067,
0.0010381642496213317,
0.04440464824438095,
0.013300837017595768,
0.08831591159105301,
0.018409427255392075,
-0.009913954883813858,
0.02812294475734234,
0.025121519342064857,
0.05131204053759575,
-0.008618819527328014,
-0.002752163214609027,
-0.003492240561172366,
0.03525646775960922,
0.010977815836668015,
-0.0428011491894722,
0.023435786366462708,
0.07828374952077866,
0.05871281400322914,
0.0069176689721643925,
0.0004403846396598965,
0.0019067274406552315,
-0.005141996778547764,
0.010458733886480331,
0.003294372698292136,
0.01623031124472618,
0.00482849171385169,
-0.048557307571172714,
0.07511786371469498,
-0.024340325966477394,
-0.027382867410779,
0.00004501013972912915,
-0.0333651602268219,
-0.00822308287024498,
0.01810106262564659,
0.010813354514539242,
-0.02933584898710251,
-0.029397523030638695,
-0.08231306076049805,
-0.04171159118413925,
-0.03385854512453079,
-0.008269337937235832,
-0.03367352485656738,
0.026396097615361214,
-0.11816570907831192,
-0.008387545123696327,
-0.047447189688682556,
-0.025265423581004143,
0.009425709024071693,
0.09769023209810257,
0.0010131095768883824,
-0.01599389687180519,
-0.006187870167195797,
0.0184505432844162,
-0.028575213626027107,
0.014174539595842361,
-0.03418746963143349,
0.00251703429967165,
-0.03807287663221359,
-0.015778040513396263,
-0.010875027626752853,
-0.032933447510004044,
-0.0006112706032581627,
0.02793792448937893,
0.03120660036802292,
0.036407701671123505,
0.027423983439803123,
0.05213434621691704,
0.004034450277686119,
-0.005761297885328531,
0.018769187852740288,
-0.04942072927951813,
-0.053408924490213394,
-0.06767597794532776,
-0.02777346409857273,
0.031186042353510857,
0.011615104973316193,
0.021852843463420868,
0.007493284530937672,
-0.035647064447402954,
-0.05147650092840195,
0.01303358655422926,
0.028246290981769562,
-0.02253124862909317,
-0.026786694303154945,
-0.04625484347343445,
-0.04498026520013809,
0.03451639041304588,
-0.022490132600069046,
-0.020732449367642403,
-0.021811727434396744,
-0.04113597422838211,
0.08066844940185547,
0.02142113260924816,
-0.04806392267346382,
0.042307764291763306,
-0.003075947053730488,
0.0012758627999573946,
-0.005278191529214382,
0.051928769797086716,
0.029006926342844963,
-0.005822970997542143,
-0.018964486196637154,
-0.04008753225207329,
-0.013938126154243946,
-0.043787918984889984,
0.02121555432677269,
0.07088297605514526,
-0.03494810312986374,
-0.01402035728096962,
-0.03122715838253498,
0.031062696129083633,
-0.023024633526802063,
0.05414900183677673,
0.0025080402847379446,
-0.06422228366136551,
-0.01887197606265545,
-0.08107960224151611,
-0.02878079190850258,
0.018173014745116234,
-0.017905764281749725,
0.02590271271765232,
0.009035112336277962,
-0.009569613263010979,
0.007863323204219341,
0.0019221457187086344,
-0.001662604627199471,
-0.01037136372178793,
-0.05784939229488373,
0.03844291344285011,
0.051640961319208145,
0.09448322653770447,
0.047241613268852234,
-0.03560595214366913,
-0.04362345486879349,
0.041464898735284805,
-0.029685329645872116,
0.0513942688703537,
0.048269499093294144,
-0.06516793370246887,
0.07256870716810226,
-0.04662488028407097,
0.07594017684459686,
0.021647267043590546,
0.026313865557312965,
-0.0265400018543005,
0.0038879765197634697,
0.017432937398552895,
0.03165886923670769,
-0.011296460404992104,
0.01641532965004444,
0.009379453957080841,
0.008911766111850739,
-0.05048973113298416,
-0.04204051196575165,
0.027650117874145508,
0.003140189917758107,
-0.005188251379877329,
-0.03636658564209938,
0.005920620169490576,
-0.013670875690877438,
0.031556081026792526,
0.05316223204135895,
-0.010170926339924335,
-0.005273052025586367,
0.028842464089393616,
-0.0888092964887619,
-0.019725121557712555,
-0.0282257329672575,
0.04839284345507622,
0.003101644106209278,
0.0357292965054512,
-0.051846541464328766,
-0.01813189871609211,
-0.07980502396821976,
0.04748830571770668,
-0.028349079191684723,
0.03414635360240936,
0.019488707184791565,
0.00036779025685973465,
-0.05867169797420502,
-0.017114292830228806,
-0.01224211510270834,
0.02503928914666176,
-0.09826584160327911,
-0.056780390441417694,
-0.03132994845509529,
-0.029068598523736,
0.02392917312681675,
0.0670592412352562,
-0.01894392818212509,
-0.02195563167333603,
0.03457806631922722,
-0.026005500927567482,
0.01776186004281044,
-0.03918299078941345,
-0.03634602949023247,
0.024073075503110886,
-0.0032326995860785246,
0.03165886923670769,
-0.037620604038238525,
-0.030260946601629257,
-0.04691268876194954,
0.02674557827413082,
0.017247917130589485,
0.007195197977125645,
0.05945289134979248,
-0.0667303204536438,
0.0076783038675785065,
0.03860737755894661,
0.010283993557095528,
-0.020835237577557564,
-0.00745730847120285,
-0.008937463164329529,
-0.01295135635882616,
0.041732147336006165,
-0.01379422191530466,
-0.007976390421390533,
0.014739876613020897,
-0.016744254156947136,
0.00964670442044735,
0.012386019341647625,
-0.001297705341130495,
-0.007668025325983763,
-0.00930236279964447,
-0.03834012523293495,
-0.015120194293558598,
0.04543253406882286,
-0.011645941995084286,
-0.008356708101928234,
-0.06631916761398315,
0.023579690605401993,
0.044157955795526505,
0.0065476298332214355,
-0.036962758749723434,
0.08502668142318726,
0.026396097615361214,
-0.020968861877918243,
0.1167677789926529,
0.02514207735657692,
-0.0037106662057340145,
-0.048105038702487946,
0.007565236650407314,
0.018275802955031395,
-0.07450113445520401,
0.06862162798643112,
0.00240525184199214,
0.004386500921100378,
0.0889737606048584,
0.017299311235547066,
0.035482604056596756,
0.02401140332221985,
0.012684105895459652,
-0.025594346225261688,
-0.008521170355379581,
-0.053244464099407196,
0.015675252303481102,
-0.012396298348903656,
0.03188500553369522,
0.02888358011841774,
0.03554427623748779,
-0.014339001849293709,
-0.07170528918504715,
-0.022551806643605232,
-0.050900883972644806,
0.021914517506957054,
-0.029582541435956955,
0.001409487915225327,
0.03558539226651192,
0.044322419911623,
-0.00405243830755353,
0.011018931865692139,
0.004820782691240311,
0.04720049723982811,
0.03264563903212547,
-0.007082130294293165,
0.08453329652547836,
0.030507639050483704,
0.025100961327552795,
0.023805826902389526,
-0.004882455803453922,
0.06002850830554962,
0.024792596697807312,
-0.07376105338335037,
-0.02450478821992874,
0.027362309396266937,
-0.05176430940628052,
-0.00021408926113508642,
0.015315492637455463,
-0.0031504686921834946,
0.023312440142035484,
-0.010479291900992393,
-0.02269570901989937,
-0.06533239781856537,
0.01762823387980461,
0.020773563534021378,
0.00011370982247171924,
-0.009842002764344215,
0.01607612706720829,
0.02458701841533184,
0.017751580104231834,
0.013208327814936638,
-0.023949729278683662,
0.012529922649264336,
-0.01294107735157013,
0.04555588215589523,
-0.040437012910842896,
-0.05386119708418846,
-0.055752504616975784,
0.06401669979095459,
-0.014739876613020897,
-0.009836863726377487,
-0.030034812167286873,
0.09045391529798508,
-0.02290128730237484,
0.025553232058882713,
-0.00925096869468689,
-0.026663348078727722,
0.03461918234825134,
-0.028102386742830276,
0.056780390441417694,
0.03496866300702095,
0.02187340147793293,
0.0017949448665603995,
-0.03299512341618538,
0.011645941995084286,
0.0335296206176281,
0.03484531491994858,
-0.013681154698133469,
0.00239754281938076,
-0.024833710864186287,
-0.06969062983989716,
0.014976290054619312,
0.00631121639162302,
-0.03871016576886177,
-0.00027415630756877363,
0.0010535825276747346,
0.028863022103905678,
-0.02915083058178425,
-0.059206198900938034,
0.006352331954985857,
0.0636877790093422,
0.005509465932846069,
-0.02711561694741249,
-0.011409527622163296,
0.036777738481760025,
0.04185549542307854,
-0.015120194293558598,
-0.06282435357570648,
-0.034454718232154846,
-0.03270731493830681,
-0.02709505893290043,
-0.014883780851960182,
-0.007190058473497629,
0.04374680295586586,
-0.03871016576886177,
-0.044322419911623,
0.055012427270412445,
0.009358896873891354,
0.043870147317647934,
-0.008834674954414368,
0.022078977897763252,
0.010936700738966465,
-0.010011604055762291,
0.06142643094062805,
0.03531814366579056,
0.02366192266345024,
-0.04909180849790573,
-0.015469674952328205,
0.05505354329943657,
0.04806392267346382,
-0.015767762437462807,
0.01117311418056488,
0.010119532234966755,
0.009456546045839787,
0.002698199125006795,
0.015202425420284271,
-0.011255345307290554,
-0.044815804809331894,
-0.017977716401219368,
0.03803176060318947,
0.06512682139873505,
0.016898436471819878,
-0.022490132600069046,
-0.02524486556649208,
0.02079412154853344,
-0.015500511974096298,
0.0478583462536335,
0.011306739412248135,
0.022839613258838654,
-0.01720680110156536,
0.03755893185734749,
-0.0006449981010518968,
0.011625383980572224,
0.007935275323688984,
-0.024360883980989456,
0.0495440773665905,
-0.032296158373355865,
0.034084681421518326,
-0.015408001840114594,
0.023312440142035484,
0.022675152868032455,
-0.0157574824988842,
0.036222681403160095,
0.03196723759174347,
-0.08774029463529587,
0.05447792634367943,
-0.04580257460474968,
-0.06845717132091522,
-0.02158559300005436,
-0.0021868261974304914,
0.02551211602985859,
-0.0021906807087361813,
0.006408865563571453,
0.0071283853612840176,
-0.005581417586654425,
0.06775820255279541,
0.027835136279463768,
0.01556218508630991,
-0.039594147354364395,
0.03457806631922722,
-0.02337411418557167,
-0.044075727462768555,
-0.005869225598871708,
0.04535030573606491,
-0.041074302047491074,
-0.012499086558818817,
0.03517423942685127,
-0.03515367954969406,
-0.07281540334224701,
0.029520869255065918,
-0.0012058380525559187,
-0.013228884898126125,
0.002559434622526169,
-0.011265624314546585,
0.045473650097846985,
0.012786894105374813,
0.0635233148932457,
-0.039491359144449234,
-0.033796872943639755,
0.009466825053095818,
-0.012797173112630844,
-0.029109714552760124,
-0.015870550647377968,
-0.046131495386362076,
-0.0647156685590744,
0.0316794291138649,
0.05382008105516434,
-0.08626013994216919,
-0.018070224672555923,
0.024628134444355965,
0.03338571637868881,
-0.000007307623036467703,
-0.051558732986450195,
0.06969062983989716,
-0.027547329664230347,
-0.025594346225261688,
0.0057304613292217255,
-0.031103812158107758,
0.025553232058882713,
-0.029973138123750687,
-0.04103318601846695,
-0.007724558934569359,
0.031165486201643944,
-0.024936499074101448,
-0.017299311235547066,
-0.024052519351243973,
0.010967536829411983,
0.08831591159105301,
-0.012704663909971714,
-0.032954007387161255,
-0.03961470350623131,
0.058137197047472,
-0.053080003708601,
0.04329453408718109,
0.020547429099678993,
-0.07503563165664673,
0.03990251198410988,
0.023127421736717224,
-0.014236212708055973,
0.03036373481154442,
-0.012540201656520367,
-0.04757053777575493,
0.07174640148878098,
0.03466029465198517,
0.022860171273350716,
-0.06529127806425095,
0.014709040522575378,
0.007292847149074078,
0.0374150276184082,
-0.04942072927951813,
0.03311846777796745,
-0.05007857829332352,
-0.02281905524432659,
0.025306539610028267,
0.02993202395737171,
-0.0417938195168972,
0.06816936284303665,
0.056451465934515,
-0.01552106998860836,
-0.041444338858127594,
-0.0051060207188129425,
-0.014010078273713589,
-0.04609038308262825,
0.008161409758031368,
-0.002831824356690049,
0.05710931494832039,
-0.0011255345307290554,
-0.035955432802438736,
0.09999269247055054,
-0.005072614643722773,
-0.01225239410996437,
0.02037268877029419,
-0.007195197977125645,
-0.03264563903212547,
0.012529922649264336,
0.023990845307707787,
-0.003520507598295808,
-0.06837493926286697,
-0.01636393554508686,
-0.04175270348787308,
0.01897476427257061,
-0.0004734697286039591,
-0.06660697609186172,
-0.05636923387646675,
0.0316794291138649,
0.01327000092715025,
0.0007529260474257171,
0.044157955795526505,
-0.011296460404992104,
0.009482243098318577,
-0.02026990056037903,
0.027444539591670036,
0.04056035727262497,
0.060439661145210266,
-0.006691534072160721,
0.0008537872927263379,
0.05838388949632645,
0.0028832184616476297,
0.0352153554558754,
0.06693589687347412,
-0.005131717771291733,
-0.08675352483987808,
0.02458701841533184,
-0.0034691132605075836,
0.0015880829887464643,
0.05908285453915596,
0.005036638583987951,
-0.004938989412039518,
-0.013300837017595768,
0.013023308478295803,
0.04337676241993904,
0.014955732971429825,
0.0063369134441018105,
-0.008099736645817757,
-0.021852843463420868,
-0.032933447510004044,
-0.0036361445672810078,
0.008834674954414368,
0.04288337752223015,
0.01720680110156536,
-0.047447189688682556,
0.006866274401545525,
0.030980465933680534,
-0.039018530398607254,
-0.013568087480962276,
-0.023518018424510956,
-0.007611491251736879,
0.044898033142089844,
-0.02347690239548683,
0.020866073668003082,
-0.0419582836329937,
0.00033920217538252473,
-0.004088414367288351,
0.01863556168973446,
0.01828608103096485,
0.03515367954969406,
-0.014554857276380062,
0.01826552301645279,
0.0027033386286348104,
0.03122715838253498,
-0.038730721920728683,
-0.0011640802258625627,
0.008659934625029564,
0.021194996312260628,
-0.018275802955031395,
0.015171588398516178,
-0.019200898706912994,
-0.06668920814990997,
-0.013568087480962276,
-0.01989986188709736,
-0.004923570901155472,
0.0221612099558115,
0.032028909772634506,
0.008916906081140041,
-0.009035112336277962,
0.027650117874145508
]
|
41,332 | pyglove.core.typing.class_schema | __contains__ | Returns if a key or key spec exists in the schema. | def __contains__(self, key: Union[str, KeySpec]) -> bool:
"""Returns if a key or key spec exists in the schema."""
return key in self._fields
| (self, key: Union[str, pyglove.core.typing.class_schema.KeySpec]) -> bool | [
0.08939186483621597,
-0.08613494783639908,
-0.04958130046725273,
0.0497891902923584,
-0.009701442904770374,
0.0004046779067721218,
0.03838999196887016,
-0.027579814195632935,
0.018398093059659004,
-0.01611998677253723,
-0.030039822682738304,
-0.024478817358613014,
0.0665934756398201,
-0.03606857731938362,
-0.01121729239821434,
-0.046012554317712784,
-0.021949512884020805,
0.029017707332968712,
0.009259680286049843,
-0.06943461298942566,
-0.012222085148096085,
0.029987851157784462,
0.05138299614191055,
0.014993925578892231,
0.04552748426795006,
0.0911935567855835,
0.044695932418107986,
-0.009995950385928154,
0.04403761774301529,
0.02132584899663925,
-0.045354243367910385,
-0.009580174461007118,
0.06960784643888474,
0.01354737114161253,
-0.005244842264801264,
-0.02042500115931034,
0.012828425504267216,
0.007700520101934671,
0.009874682873487473,
-0.015288433991372585,
0.02515445463359356,
0.03421491011977196,
0.016890903934836388,
-0.030143767595291138,
0.021776273846626282,
0.042305219918489456,
0.014734066091477871,
0.06316331773996353,
-0.01684759370982647,
0.018709924072027206,
0.008384818211197853,
-0.027960943058133125,
-0.02158571034669876,
-0.04157761111855507,
-0.06451459228992462,
-0.044314801692962646,
-0.007354039698839188,
0.07030081003904343,
0.013400116935372353,
0.036172520369291306,
-0.05217990279197693,
0.012863073498010635,
-0.009017144329845905,
-0.012490606866776943,
-0.014370261691510677,
-0.054016247391700745,
-0.002968901302665472,
-0.03182419762015343,
0.0029905561823397875,
0.003978024702519178,
-0.02934686280786991,
-0.016319211572408676,
-0.004954665433615446,
0.07338448613882065,
-0.036172520369291306,
-0.05782752484083176,
-0.028549959883093834,
0.010429050773382187,
0.006760692689567804,
-0.04674016311764717,
0.0057992106303572655,
-0.05283821374177933,
-0.0510711632668972,
-0.025570230558514595,
-0.014214345254004002,
0.08156140893697739,
0.012897721491754055,
0.010550318285822868,
0.048715099692344666,
0.0021655005402863026,
-0.009025806561112404,
0.03421491011977196,
0.001045936718583107,
0.02335275709629059,
0.0433100126683712,
-0.026089951395988464,
0.022521205246448517,
-0.03334870934486389,
-0.02598600648343563,
-0.00701189087703824,
0.016553085297346115,
-0.022399937734007835,
0.0801754891872406,
0.04143901914358139,
0.02787432260811329,
0.02016514167189598,
-0.05193736404180527,
-0.026332486420869827,
-0.024790650233626366,
0.00630160653963685,
0.0062842825427651405,
-0.017895696684718132,
0.013027651235461235,
0.027112066745758057,
0.0042963530868291855,
-0.037662386894226074,
0.04220127314329147,
0.014604135416448116,
-0.02335275709629059,
-0.05086327716708183,
0.04518100246787071,
0.02960672415792942,
-0.0014075753279030323,
-0.019091052934527397,
0.07002362608909607,
-0.020910073071718216,
0.0052405111491680145,
0.05564470216631889,
0.006444529630243778,
-0.003839432494714856,
-0.007245764601975679,
0.06264360249042511,
0.029121652245521545,
0.04552748426795006,
0.012274056673049927,
0.02799559012055397,
0.04895763471722603,
0.009961302392184734,
-0.02733727917075157,
0.040642112493515015,
0.013703287579119205,
0.028203479945659637,
0.04812608286738396,
-0.013833217322826385,
-0.03700407221913338,
-0.014751389622688293,
-0.0710977166891098,
-0.04067676141858101,
0.016648368909955025,
-0.0039585349150002,
-0.039983801543712616,
-0.027631787583231926,
-0.0077871400862932205,
-0.0005383975803852081,
-0.027319954708218575,
-0.0046861432492733,
0.012213422916829586,
-0.03963732346892357,
0.013486737385392189,
-0.030663488432765007,
0.041854795068502426,
0.022088104858994484,
-0.038251399993896484,
-0.011936238966882229,
-0.04414156451821327,
0.039671968668699265,
-0.0743546262383461,
-0.034041669219732285,
0.043344657868146896,
0.01409307774156332,
0.03627646341919899,
0.009510878473520279,
-0.031183207407593727,
0.04376043379306793,
-0.005370441358536482,
0.03963732346892357,
-0.0017692139372229576,
-0.008913200348615646,
-0.018709924072027206,
-0.03369518741965294,
0.03398969769477844,
-0.0018893992528319359,
-0.012109478935599327,
-0.005937802605330944,
0.024807974696159363,
0.013599343597888947,
-0.013434764929115772,
-0.028099535033106804,
0.01708146743476391,
0.01706414483487606,
-0.04195873811841011,
-0.06316331773996353,
0.0026419106870889664,
0.03428420424461365,
-0.04320606589317322,
-0.048264674842357635,
0.051036518067121506,
0.005807872395962477,
-0.03939478471875191,
0.046844106167554855,
0.015019911341369152,
-0.062158528715372086,
-0.009398272261023521,
0.03329673781991005,
-0.009017144329845905,
0.008956510573625565,
0.02922559529542923,
-0.02676558680832386,
0.009424258023500443,
-0.04753706976771355,
-0.018917812034487724,
-0.0924408882856369,
0.027908971533179283,
0.02399374544620514,
0.077542245388031,
0.03083672747015953,
-0.040503520518541336,
-0.042305219918489456,
-0.044591985642910004,
-0.004855052102357149,
0.1344342678785324,
0.037523794919252396,
0.06326726078987122,
-0.023768534883856773,
0.044522691518068314,
0.012715819291770458,
0.006920939777046442,
0.014309627935290337,
-0.04989313334226608,
-0.055436812341213226,
-0.0059291403740644455,
0.07331518828868866,
-0.032551802694797516,
0.023699237033724785,
-0.043483249843120575,
-0.002169831655919552,
0.012620537541806698,
0.05280356481671333,
0.07982901483774185,
-0.0076615409925580025,
0.04764101281762123,
0.04116183519363403,
-0.01041172631084919,
-0.032101381570100784,
-0.05994105339050293,
-0.055817943066358566,
-0.003382511902600527,
0.03897900879383087,
0.02153373695909977,
0.002986225299537182,
-0.028619255870580673,
-0.04798749089241028,
0.03161630779504776,
-0.003033866174519062,
0.010073908604681492,
-0.01817288063466549,
-0.08294733613729477,
-0.0007416839362122118,
0.037073370069265366,
-0.003785294946283102,
-0.05425878241658211,
0.02482529915869236,
0.03315814584493637,
0.04958130046725273,
-0.011728351004421711,
-0.010368417017161846,
0.06053007021546364,
0.0633365586400032,
-0.02560487762093544,
-0.02397642284631729,
0.015279771760106087,
0.02922559529542923,
-0.00704653887078166,
-0.00924235675483942,
0.04802213981747627,
0.004279029089957476,
0.025830090045928955,
-0.020858101546764374,
0.014197021722793579,
0.017895696684718132,
0.029970526695251465,
-0.009987288154661655,
0.04337930679321289,
0.0021156941074877977,
0.020979369059205055,
-0.01777442917227745,
-0.026678966358304024,
0.020702185109257698,
-0.058797672390937805,
-0.056025829166173935,
-0.019680069759488106,
-0.019246969372034073,
0.03582604229450226,
-0.01257722731679678,
-0.03156433627009392,
0.04441874846816063,
0.03956802561879158,
-0.06219317391514778,
0.032153353095054626,
-0.015115194022655487,
0.03762773796916008,
0.04434945061802864,
-0.018346121534705162,
-0.028307422995567322,
-0.005158222280442715,
-0.008631684817373753,
0.024461494758725166,
0.01699484884738922,
-0.0008634933619759977,
0.01919499598443508,
-0.0730380043387413,
0.05526357516646385,
-0.050204966217279434,
0.0022997616324573755,
0.006821326911449432,
-0.03421491011977196,
-0.032932933419942856,
0.023370081558823586,
-0.0313737727701664,
0.061915989965200424,
0.008315522223711014,
-0.0018190204864367843,
-0.0255355816334486,
-0.011139335110783577,
-0.04996242746710777,
-0.057238511741161346,
0.02792629413306713,
-0.05100186914205551,
-0.027683759108185768,
-0.0003518938319757581,
0.012187437154352665,
-0.05204131081700325,
0.06832586973905563,
0.012620537541806698,
-0.04233986511826515,
-0.046255093067884445,
-0.011944901198148727,
-0.014708079397678375,
0.028688551858067513,
0.054016247391700745,
0.009588836692273617,
-0.033591244369745255,
0.05131370201706886,
-0.04965059831738472,
0.008605699054896832,
-0.0653461441397667,
-0.0248945951461792,
-0.02482529915869236,
0.03693477809429169,
0.0036943438462913036,
0.008887214586138725,
-0.04663622006773949,
0.05030890926718712,
0.0022434585262089968,
0.06624699383974075,
-0.020858101546764374,
0.003555751871317625,
0.036761537194252014,
-0.015210475772619247,
0.017185412347316742,
0.1396314799785614,
-0.03963732346892357,
-0.017020834609866142,
-0.015158504247665405,
-0.08883749693632126,
0.01689956709742546,
-0.032153353095054626,
-0.0158341396600008,
-0.017826400697231293,
-0.010507008992135525,
0.0032872299198061228,
-0.006544142495840788,
-0.07151348888874054,
0.0038004533853381872,
0.031200531870126724,
-0.020078521221876144,
-0.006557135842740536,
0.053046099841594696,
-0.04895763471722603,
-0.012975679710507393,
-0.0006480260635726154,
0.0400877445936203,
0.028359394520521164,
0.02934686280786991,
-0.023872477933764458,
0.011979549191892147,
-0.010775530710816383,
-0.014370261691510677,
-0.0008992240764200687,
0.003460469888523221,
-0.0022369620855897665,
-0.005548012442886829,
-0.09063918888568878,
0.016345197334885597,
-0.07331518828868866,
-0.046324387192726135,
0.014846671372652054,
-0.04895763471722603,
0.02373388595879078,
0.025951359421014786,
0.04902693256735802,
-0.05734245479106903,
-0.038251399993896484,
0.05217990279197693,
0.021221905946731567,
0.015401040203869343,
0.0026202555745840073,
0.014179697260260582,
-0.023889802396297455,
0.019541477784514427,
0.002598600694909692,
-0.060287535190582275,
-0.00641854340210557,
-0.008982496336102486,
-0.05037820339202881,
-0.009995950385928154,
0.04868045076727867,
-0.011425181291997433,
-0.010706234723329544,
0.05082862824201584,
0.011321237310767174,
-0.015305757522583008,
-0.03918689861893654,
0.04725988209247589,
-0.017878372222185135,
0.005019630305469036,
-0.015470336191356182,
-0.04958130046725273,
0.02941615879535675,
0.0039000664837658405,
-0.0756019577383995,
-0.022867685183882713,
0.032621100544929504,
0.03267307206988335,
-0.017575202509760857,
-0.015938084572553635,
-0.020251760259270668,
-0.06285148859024048,
-0.01881386898458004,
0.000015716796042397618,
-0.002986225299537182,
-0.04552748426795006,
-0.032153353095054626,
-0.03128715232014656,
0.0019651916809380054,
-0.0016490286216139793,
0.007289074826985598,
0.09008482098579407,
0.11863478273153305,
-0.001338279340416193,
0.015721533447504044,
0.03627646341919899,
-0.011165320873260498,
-0.024548113346099854,
0.01682160794734955,
-0.027112066745758057,
-0.005751569289714098,
-0.008354500867426395,
-0.007289074826985598,
-0.009268342517316341,
-0.018640628084540367,
0.0339377261698246,
-0.05813935771584511,
-0.013504061847925186,
0.027371926233172417,
0.02804756350815296,
-0.03428420424461365,
0.041023243218660355,
0.04365649074316025,
0.052664972841739655,
-0.034751951694488525,
-0.0008618691936135292,
-0.026037978008389473,
0.0015061056474223733,
0.03787027299404144,
0.008293867111206055,
0.058936264365911484,
0.06610839813947678,
-0.07719576358795166,
-0.03031700849533081,
-0.0025942695792764425,
-0.03627646341919899,
-0.04538889229297638,
-0.035133082419633865,
0.047883547842502594,
-0.05668414384126663,
-0.027510518208146095,
-0.002888777758926153,
-0.05037820339202881,
-0.03480392321944237,
0.019125699996948242,
-0.0005559922428801656,
0.04313677176833153,
0.0355835035443306,
0.07553265988826752,
-0.04708664491772652,
0.01412772573530674,
0.05166018009185791,
-0.02009584568440914,
0.035392940044403076,
0.0014389751013368368,
0.04552748426795006,
0.024409521371126175,
0.012395325116813183,
-0.010273134335875511,
-0.05470920726656914,
-0.010723558254539967,
-0.009684118442237377,
0.015626251697540283,
-0.011745674535632133,
-0.011953563429415226,
-0.018120909109711647,
0.028671227395534515,
-0.009753414429724216,
0.05928274244070053,
0.03884041681885719,
-0.022226696833968163,
-0.028688551858067513,
-0.018987108021974564,
0.03828604891896248,
0.021412469446659088,
-0.0014465543208643794,
0.026938825845718384,
-0.03050757199525833,
0.0073280539363622665,
0.07009292393922806,
-0.04674016311764717,
-0.05488244444131851,
-0.005205863155424595,
0.0025921042542904615,
0.0019229644676670432,
0.01328751165419817,
-0.008384818211197853,
0.01412772573530674,
-0.01661371998488903,
0.048715099692344666,
-0.0010215748334303498,
0.019316265359520912,
-0.01940288580954075,
0.02307557314634323,
0.03476927801966667,
0.03305419906973839,
0.013694625347852707,
-0.023058250546455383,
0.011693703010678291,
0.08724368363618851,
-0.015349067747592926,
-0.046012554317712784,
0.019368236884474754,
-0.024166986346244812,
0.00475110812112689,
0.055817943066358566,
0.03603392839431763,
-0.04060746729373932,
0.04663622006773949,
0.004473924171179533,
0.007665872108191252,
-0.017670484259724617,
-0.0033067192416638136,
0.03890971466898918,
0.02302360162138939,
-0.034942515194416046,
0.03984520956873894,
0.028688551858067513,
-0.03852858394384384,
-0.05921344831585884,
0.0024361880496144295,
-0.05966386944055557,
0.05477850139141083,
-0.004707798361778259,
-0.02354332245886326,
0.028012914583086967,
0.01086215116083622,
-0.002825978212058544,
-0.022919658571481705,
-0.028723198920488358,
-0.04178549721837044,
0.046462979167699814,
-0.0833631083369255,
-0.08682791143655777,
-0.059455983340740204,
-0.006310268770903349,
0.055506110191345215,
0.02411501482129097,
-0.008471437729895115,
-0.004564875271171331,
-0.005149560514837503,
0.000027153346309205517,
-0.04060746729373932,
0.013521385379135609,
-0.016033366322517395,
-0.030178416520357132,
-0.019229644909501076,
-0.026852207258343697,
0.026800233870744705,
0.038493938744068146,
0.015660900622606277,
-0.030143767595291138,
-0.00786942895501852,
-0.01170236524194479,
0.016466466709971428,
-0.018588656559586525,
0.016700340434908867,
-0.00635357853025198,
0.022278670221567154,
0.006466184742748737,
0.021169932559132576,
0.06555403023958206,
0.02643643133342266,
-0.08072985708713531,
-0.016024703159928322,
-0.005716921295970678,
0.004272532649338245,
0.016535762697458267,
0.03710801899433136,
0.009155736304819584,
0.032361239194869995,
0.00844978354871273,
0.020407676696777344,
-0.032621100544929504,
0.017427949234843254,
0.01850203610956669,
0.039013657718896866,
0.014751389622688293,
-0.04750242084264755,
-0.03495984151959419,
-0.004434945061802864,
-0.04116183519363403,
-0.016553085297346115,
-0.08932256698608398,
0.00950221624225378,
-0.013027651235461235,
0.030178416520357132,
0.009840034879744053,
0.03076743148267269,
-0.024981213733553886,
0.013876527547836304,
-0.043621841818094254,
0.004313677083700895,
0.06160416081547737,
-0.06288613379001617,
0.014534839428961277,
-0.055436812341213226,
0.03790492191910744,
-0.016457803547382355,
0.07878956943750381,
0.004201070871204138,
-0.06825657933950424,
0.05030890926718712,
-0.005080264061689377,
-0.04667086899280548,
0.021048665046691895,
-0.009710104204714298,
-0.013278849422931671,
0.0614309199154377,
-0.019489504396915436,
-0.0177917517721653,
-0.036311112344264984,
-0.03690012916922569,
-0.015210475772619247,
0.027181362733244896,
-0.02586473897099495,
0.0044241175055503845,
-0.06046077609062195,
0.005708259530365467,
-0.017453934997320175,
0.00862735416740179,
-0.07054334878921509,
0.008376155979931355,
0.08585776388645172,
0.008506085723638535,
-0.018016964197158813,
-0.032551802694797516,
-0.04739847406744957,
-0.0028454677667468786,
0.006184669677168131,
-0.01609399914741516,
-0.05987175926566124,
0.016483789309859276,
-0.023699237033724785,
0.03301955386996269,
-0.014604135416448116,
0.01597273163497448,
0.024548113346099854,
-0.0064878398552536964,
0.028549959883093834,
0.022607825696468353,
-0.004307180643081665,
0.006292944774031639,
-0.06437599658966064,
0.0076875267550349236,
-0.10532994568347931,
0.0036228823009878397,
0.05696132779121399,
-0.005868506617844105,
-0.009043130092322826,
0.011165320873260498,
0.04829932376742363,
0.02210542932152748,
0.02858460694551468,
-0.033972371369600296,
0.04660157114267349,
0.010472360998392105,
0.03450941666960716,
-0.027060095220804214,
0.025500934571027756,
0.020476972684264183,
0.0020009225700050592,
0.04240916296839714,
-0.005136567167937756,
-0.017713794484734535,
0.027267983183264732,
0.03469998016953468,
-0.10581501573324203,
0.06988503038883209,
-0.0068473126739263535,
-0.0014151546638458967,
-0.0027133722323924303,
0.06739037483930588,
-0.010394402779638767,
0.051036518067121506,
-0.0028238126542419195,
-0.014361599460244179,
-0.0265057273209095,
-0.029208270832896233,
-0.047744955867528915,
-0.022538529708981514,
-0.051625531166791916,
-0.017237383872270584,
0.03509843349456787,
0.06066866219043732,
0.019558800384402275,
-0.03627646341919899,
0.06350979954004288,
0.018328797072172165,
-0.03838999196887016,
-0.07449322193861008,
-0.03724661096930504,
0.020130492746829987,
0.05321934074163437,
0.020061196759343147,
0.05928274244070053,
0.04272099584341049,
-0.043795082718133926,
-0.009528202004730701,
0.011494477279484272,
-0.001880737254396081,
0.007024883758276701,
0.0003237423370592296,
-0.002663565566763282,
0.007878091186285019,
0.043933674693107605,
-0.010195176117122173,
-0.010091232135891914,
-0.014560826122760773,
0.028740523383021355,
-0.046393685042858124,
0.0271640382707119,
0.010983418673276901,
0.016154633834958076,
-0.03412828966975212,
-0.0006204158999025822,
-0.009086440317332745,
0.0268348827958107,
-0.02425360679626465,
-0.012092155404388905,
0.02380318194627762,
0.040884651243686676
]
|
41,333 | pyglove.core.typing.class_schema | __eq__ | null | def __eq__(self, other: Any) -> bool:
if self is other:
return True
return isinstance(other, Schema) and self._fields == other._fields
| (self, other: Any) -> bool | [
0.05914045870304108,
-0.01449382584542036,
-0.010045051574707031,
0.025880571454763412,
-0.04385221004486084,
-0.03852074220776558,
0.0015557471197098494,
0.01818348467350006,
0.02566872537136078,
0.0352194681763649,
-0.008875482715666294,
-0.08770442008972168,
0.0453704409301281,
0.0687088593840599,
0.022173259407281876,
-0.0007243602885864675,
-0.0391915887594223,
0.04561759531497955,
0.015270596370100975,
-0.009118222631514072,
-0.018289407715201378,
0.0013747949851676822,
-0.013231574557721615,
0.05246729776263237,
0.03055884689092636,
0.0888342633843422,
0.00590521888807416,
0.013010901398956776,
-0.004038322251290083,
0.09483657777309418,
-0.029693806543946266,
-0.06214161589741707,
0.09335365891456604,
0.015694288536906242,
0.02065502665936947,
-0.03777927905321121,
-0.05737507343292236,
0.04459367319941521,
-0.032483119517564774,
-0.018977908417582512,
0.016524020582437515,
0.004206034354865551,
-0.045335132628679276,
-0.002634839853271842,
-0.01096305251121521,
-0.00019322711159475148,
-0.024856647476553917,
0.023232491686940193,
-0.027328187599778175,
0.018589522689580917,
-0.009515435434877872,
-0.0342661589384079,
-0.01487338449805975,
0.062424078583717346,
-0.014070132747292519,
-0.007202778477221727,
0.004462015349417925,
0.05606868490576744,
-0.026586726307868958,
-0.00045072531793266535,
-0.058540228754282,
-0.013019727542996407,
0.009383031167089939,
-0.0456882119178772,
-0.028228536248207092,
-0.05391491577029228,
-0.046959288418293,
-0.017283137887716293,
-0.0016969781136140227,
0.033101003617048264,
-0.06581362336874008,
0.00031197696807794273,
-0.018977908417582512,
0.0671200081706047,
-0.023956298828125,
0.007012999150902033,
-0.0019684063736349344,
0.052220143377780914,
-0.0022310076747089624,
-0.0848798006772995,
0.026233648881316185,
-0.018095215782523155,
-0.06373046338558197,
-0.021520065143704414,
-0.06305962055921555,
0.06090584769845009,
-0.04131005331873894,
0.03084130771458149,
0.03068242408335209,
-0.013099170289933681,
0.012110553681850433,
-0.006889421958476305,
0.021820181980729103,
0.00043362315045669675,
0.018677793443202972,
-0.01048639789223671,
-0.040462665259838104,
-0.05589214712381363,
0.009056434966623783,
0.001626362674869597,
-0.0023236903361976147,
0.01580021157860756,
-0.0032593454234302044,
0.059422921389341354,
0.019472217187285423,
0.03103550150990486,
-0.011157244443893433,
-0.05384429916739464,
-0.018395330756902695,
0.008473857305943966,
-0.042333975434303284,
0.0710744708776474,
-0.024185799062252045,
0.04526451975107193,
0.004806265700608492,
-0.02242041379213333,
0.040462665259838104,
0.010609975084662437,
0.014661537483334541,
-0.01269313134253025,
0.04212212935090065,
0.08325564116239548,
0.04304013028740883,
-0.0022210772149264812,
0.09165888279676437,
0.012128207832574844,
0.02960553765296936,
-0.012251785025000572,
-0.03414257988333702,
-0.007661778945475817,
0.03417788818478584,
0.007886866107583046,
0.006368632894009352,
0.06016438454389572,
0.03168869391083717,
0.018518907949328423,
0.05345591530203819,
0.026057109236717224,
0.003230657894164324,
-0.02946430630981922,
-0.0002597049460746348,
0.055221300572156906,
0.06761431694030762,
-0.020919833332300186,
-0.09384796768426895,
0.013416940346360207,
-0.11086629331111908,
0.001699184882454574,
-0.001356037799268961,
0.023920992389321327,
-0.033101003617048264,
-0.030029229819774628,
0.03117673099040985,
0.017415542155504227,
-0.06969746947288513,
-0.02663968689739704,
-0.025156762450933456,
-0.050348833203315735,
0.024485915899276733,
0.013116824440658092,
-0.010609975084662437,
0.0037028989754617214,
0.02695745788514614,
-0.04794790595769882,
-0.02976442314684391,
0.01894260011613369,
-0.021184641867876053,
-0.07421686500310898,
-0.006721710320562124,
0.022349797189235687,
0.021802527830004692,
-0.021802527830004692,
0.009992089122533798,
0.005150516051799059,
-0.054126761853694916,
0.054585762321949005,
0.028705190867185593,
0.008897549472749233,
-0.01924271695315838,
-0.0007028446416370571,
0.039050355553627014,
-0.046747442334890366,
-0.023055952042341232,
0.00004347954745753668,
0.047524213790893555,
-0.018254099413752556,
-0.030647115781903267,
0.000049858386773848906,
0.0648956224322319,
0.028299150988459587,
-0.023461991921067238,
-0.012701958417892456,
-0.02708103507757187,
-0.01911913976073265,
-0.01010683923959732,
-0.03650819882750511,
0.01276374701410532,
-0.028316805139183998,
0.020248986780643463,
0.06666100770235062,
-0.029658498242497444,
-0.04745359718799591,
-0.02644549496471882,
-0.028475690633058548,
0.00590521888807416,
-0.006955624092370272,
-0.01846594549715519,
-0.0352194681763649,
0.03724966198205948,
-0.036896586418151855,
-0.012498938478529453,
-0.07033301144838333,
0.020549103617668152,
-0.03460158035159111,
0.041910283267498016,
0.012869670055806637,
-0.019454563036561012,
-0.08643334358930588,
-0.016012059524655342,
0.03384246677160263,
0.11362029612064362,
0.006196507718414068,
-0.022526336833834648,
-0.0015612640418112278,
-0.0013924489030614495,
0.018289407715201378,
-0.016012059524655342,
-0.012022284790873528,
-0.035766735672950745,
-0.08113718032836914,
0.02602180279791355,
0.025315647944808006,
-0.04148659110069275,
-0.01721252128481865,
0.019648754969239235,
0.04710052162408829,
0.02580995485186577,
0.030929578468203545,
-0.029852692037820816,
-0.01103366818279028,
0.015553058125078678,
-0.016947714611887932,
0.016268039122223854,
-0.028069650754332542,
-0.026551418006420135,
-0.06588423997163773,
-0.03386012092232704,
0.0114220529794693,
0.009771415963768959,
-0.000981444725766778,
-0.03262434899806976,
-0.0664844661951065,
0.002434027148410678,
-0.00854447204619646,
0.011792784556746483,
0.0017929710447788239,
-0.07803010195493698,
-0.007238085847347975,
0.03497231379151344,
0.0038308894727379084,
0.01151914894580841,
0.03573143109679222,
0.004395813215523958,
0.05179645121097565,
-0.02487429976463318,
-0.009268281050026417,
-0.017812753096222878,
0.024556530639529228,
0.016241559758782387,
-0.03555488958954811,
0.01790984906256199,
-0.011969323270022869,
0.015085230581462383,
0.036543507128953934,
-0.014688018709421158,
-0.029411345720291138,
0.0024516810663044453,
-0.030594153329730034,
-0.01615328900516033,
-0.019454563036561012,
-0.015447135083377361,
-0.009656665846705437,
0.055539071559906006,
-0.08509164303541183,
-0.008367933332920074,
0.0029879172798246145,
-0.03852074220776558,
-0.02333841472864151,
-0.03862666338682175,
-0.07859501987695694,
0.04462897777557373,
-0.01228709239512682,
0.046464983373880386,
-0.012419496662914753,
-0.04085105285048485,
0.06253000348806381,
0.005357949063181877,
-0.03177696466445923,
0.0004427259264048189,
0.026357226073741913,
0.009506608359515667,
0.022508682683110237,
0.04240459203720093,
0.010751205496490002,
0.03539600595831871,
-0.007136576343327761,
-0.0038066154811531305,
0.03449565917253494,
0.07252208888530731,
0.02319718338549137,
-0.027769535779953003,
0.05529191717505455,
-0.04526451975107193,
0.07817132771015167,
0.04335790127515793,
0.019313331693410873,
0.008217875845730305,
-0.01814817637205124,
-0.010239243507385254,
0.06263592839241028,
-0.019454563036561012,
0.021025758236646652,
-0.019348639994859695,
-0.023903338238596916,
-0.03933281823992729,
-0.06796739250421524,
-0.011254341341555119,
0.03943874314427376,
0.02226152829825878,
0.02079625613987446,
0.02272052876651287,
-0.022491028532385826,
0.0886930376291275,
0.02976442314684391,
0.012039938010275364,
-0.06902662664651871,
0.0001879861083580181,
-0.015553058125078678,
0.009100569412112236,
0.00217142584733665,
0.01989590935409069,
-0.016029711812734604,
0.07414624840021133,
-0.07767701894044876,
-0.013566997833549976,
-0.003360855160281062,
-0.05486822500824928,
0.012498938478529453,
0.015482442453503609,
0.008884308859705925,
-0.05712791904807091,
-0.01864248514175415,
0.027910765260457993,
-0.04773605987429619,
-0.0004430017725098878,
0.0008170431246981025,
-0.03682596981525421,
0.05419737473130226,
-0.0344250425696373,
-0.0017058050725609064,
0.07273393869400024,
0.007547028828412294,
0.020090103149414062,
-0.008169327862560749,
-0.0453704409301281,
0.0661666989326477,
-0.04003897309303284,
-0.0376027412712574,
-0.0639423131942749,
-0.011174898594617844,
-0.049395523965358734,
0.017512638121843338,
-0.03636696934700012,
-0.0645778477191925,
-0.007529374677687883,
-0.010839475318789482,
-0.08325564116239548,
0.055362530052661896,
-0.013063862919807434,
-0.03258904069662094,
0.0823376402258873,
0.011563283391296864,
-0.0037536537274718285,
0.016647597774863243,
-0.019507525488734245,
-0.028157919645309448,
-0.011068975552916527,
-0.024927262216806412,
-0.013858286663889885,
0.04763013869524002,
-0.07478179037570953,
-0.0234796442091465,
-0.04466428607702255,
0.013602305203676224,
-0.05274976044893265,
-0.004113351460546255,
-0.045335132628679276,
0.009321242570877075,
-0.05073721706867218,
-0.023762106895446777,
0.010353993624448776,
0.007882452569901943,
-0.013752363622188568,
0.025898225605487823,
0.0037293797358870506,
0.016682906076312065,
0.029711460694670677,
0.03449565917253494,
-0.021855488419532776,
0.060058459639549255,
-0.0006857424741610885,
-0.0344250425696373,
0.02365618385374546,
0.00043555404408834875,
-0.006849701050668955,
-0.02519207075238228,
0.07781825214624405,
-0.030452923849225044,
0.08791626244783401,
0.05133745074272156,
0.009797897189855576,
0.07718271017074585,
-0.029323074966669083,
-0.003422643756493926,
-0.015862001106142998,
-0.026586726307868958,
-0.011104282923042774,
0.04085105285048485,
0.02566872537136078,
-0.008659222163259983,
-0.039685897529125214,
-0.023832721635699272,
0.057410381734371185,
0.02144945040345192,
0.01572076976299286,
0.01790984906256199,
0.015155846253037453,
-0.06034092232584953,
0.028475690633058548,
0.03622573986649513,
0.0495014488697052,
-0.05839899554848671,
-0.016268039122223854,
-0.05430329963564873,
-0.04261643812060356,
-0.017397888004779816,
0.026657341048121452,
0.06560177356004715,
0.05306752771139145,
0.048124443739652634,
0.03039996139705181,
0.022137951105833054,
-0.03403665870428085,
-0.051302142441272736,
-0.04215743765234947,
-0.03287150338292122,
0.007436692249029875,
-0.04459367319941521,
-0.015508923679590225,
0.01924271695315838,
-0.040497973561286926,
0.0005682338960468769,
-0.056139301508665085,
-0.012975593097507954,
-0.014211364090442657,
0.028758151456713676,
-0.0360138900578022,
0.026657341048121452,
0.03336581215262413,
0.0823376402258873,
0.0379205085337162,
-0.05638645589351654,
-0.0031203213147819042,
0.00805899128317833,
0.008460616692900658,
0.015508923679590225,
0.011104282923042774,
0.008107539266347885,
-0.058963920921087265,
0.00007158092194003984,
-0.03901505097746849,
0.003340994706377387,
0.0061920941807329655,
-0.06327146291732788,
0.06334207952022552,
-0.05444452911615372,
-0.010618802160024643,
-0.01878371648490429,
-0.037355586886405945,
0.011104282923042774,
0.01973702572286129,
-0.01643575169146061,
-0.04851283133029938,
0.03223596513271332,
0.05324406549334526,
-0.04166312888264656,
0.045652903616428375,
0.04844221472740173,
-0.012445976957678795,
0.025580454617738724,
-0.001445410423912108,
0.021396487951278687,
-0.035166505724191666,
0.027751881629228592,
0.02001948654651642,
-0.03806174173951149,
-0.01846594549715519,
-0.04201620817184448,
-0.030611807480454445,
0.04484082758426666,
-0.012684304267168045,
-0.0189602542668581,
0.018130522221326828,
-0.0027451764326542616,
0.04540574923157692,
0.03802643343806267,
0.000799940899014473,
-0.02616303227841854,
-0.012852015905082226,
-0.04773605987429619,
-0.002429613610729575,
-0.021996719762682915,
-0.022985337302088737,
-0.031070807948708534,
-0.048018522560596466,
0.029270114377141,
-0.046253133565187454,
-0.007745634764432907,
0.054091453552246094,
-0.06034092232584953,
0.02630426362156868,
-0.007414624560624361,
-0.01862483099102974,
0.00579488230869174,
-0.02113168127834797,
0.04724175110459328,
-0.018730754032731056,
0.01347872894257307,
0.0010266827885061502,
0.03380715847015381,
-0.0007657365640625358,
0.032024119049310684,
-0.01760973408818245,
-0.0074234516359865665,
-0.040815744549036026,
0.04773605987429619,
0.000923517975024879,
0.013311016373336315,
0.03477812185883522,
0.024715416133403778,
-0.005547728389501572,
0.018677793443202972,
0.08629211038351059,
-0.005830190144479275,
-0.04526451975107193,
0.03622573986649513,
0.004018461797386408,
0.010468743741512299,
0.10013274103403091,
0.020743295550346375,
0.053667761385440826,
-0.006757018156349659,
0.07100386172533035,
-0.0006410561036318541,
0.002283969195559621,
-0.03465454280376434,
0.0164975393563509,
-0.019648754969239235,
0.021255258470773697,
0.051902372390031815,
-0.01619742438197136,
0.0019926803652197123,
-0.01673586666584015,
-0.04748890548944473,
0.06666100770235062,
0.0008479373645968735,
-0.04731236770749092,
0.06959155201911926,
-0.07273393869400024,
-0.05133745074272156,
-0.029976269230246544,
0.013973036780953407,
0.056315839290618896,
-0.03386012092232704,
-0.0018415191443637013,
-0.03661412373185158,
-0.010609975084662437,
0.006862941198050976,
0.009912647306919098,
-0.0247507244348526,
-0.042828284204006195,
0.028475690633058548,
-0.009215319529175758,
-0.05147868022322655,
0.00900347251445055,
-0.006275950465351343,
0.004832746461033821,
-0.03806174173951149,
0.0006085067871026695,
-0.014617403037846088,
0.020478487014770508,
-0.0023523778654634953,
-0.03573143109679222,
-0.05998784676194191,
0.01814817637205124,
-0.009232972748577595,
-0.025951186195015907,
0.021219950169324875,
0.052396681159734726,
0.01502344198524952,
0.04466428607702255,
0.0334717333316803,
0.03788520023226738,
-0.0752054825425148,
0.0388738177716732,
-0.018924947828054428,
-0.02460949309170246,
0.030029229819774628,
-0.05829307436943054,
-0.010998359881341457,
0.03491935133934021,
0.014917518943548203,
0.03322457894682884,
-0.006006728857755661,
-0.06683754920959473,
-0.011192552745342255,
-0.00571102648973465,
-0.03435442969202995,
0.02789311297237873,
-0.05006637051701546,
0.0076352981850504875,
-0.05246729776263237,
-0.007494067307561636,
-0.04003897309303284,
0.010609975084662437,
-0.07358132302761078,
-0.011051321402192116,
-0.03380715847015381,
0.0168947521597147,
0.08749257028102875,
0.008888722397387028,
0.011227860115468502,
-0.07428748160600662,
0.06055276840925217,
-0.070121169090271,
0.03054119274020195,
0.019472217187285423,
-0.06027030572295189,
0.014123095199465752,
-0.016788829118013382,
-0.06560177356004715,
0.03544896841049194,
-0.00427223602309823,
-0.004898948594927788,
-0.007670606020838022,
0.015941442921757698,
0.0007729084463790059,
-0.005234371870756149,
0.028899382799863815,
-0.009435992687940598,
0.06842639297246933,
-0.03883850947022438,
0.033277541399002075,
-0.05776345729827881,
0.051443371921777725,
0.037849895656108856,
0.03802643343806267,
-0.029517268761992455,
0.0029018546920269728,
0.01989590935409069,
-0.0588579960167408,
0.0194369088858366,
0.011430880054831505,
-0.0054726991802453995,
-0.006893835496157408,
-0.02821088209748268,
-0.0334717333316803,
0.011969323270022869,
-0.02602180279791355,
-0.03200646489858627,
-0.015553058125078678,
-0.00024908504565246403,
-0.007935414090752602,
-0.006708470173180103,
-0.002325897105038166,
0.02566872537136078,
0.00037293796776793897,
0.038909126073122025,
0.028104959055781364,
-0.022985337302088737,
-0.009038780815899372,
-0.07555855810642242,
0.028405074030160904,
0.05571560934185982,
0.03675535321235657,
0.0029614365193992853,
-0.0077677019871771336,
0.01973702572286129,
-0.015985578298568726,
0.04148659110069275,
-0.008164914324879646,
0.019030870869755745,
0.05123152583837509,
0.024203453212976456,
0.027292881160974503,
0.013487555086612701,
-0.04060389846563339,
0.04003897309303284,
0.07923056185245514,
0.004437741357833147,
-0.039544664323329926,
0.043322592973709106,
0.014229018241167068,
-0.06390700489282608,
0.03301273286342621,
0.02146710455417633,
0.01572076976299286,
0.03527243062853813,
0.015791384503245354,
0.013046208769083023,
-0.01770683005452156,
0.005891978740692139,
0.01846594549715519,
-0.019542831927537918,
-0.01850125379860401,
0.018236445263028145,
0.02079625613987446,
-0.04120412841439247,
-0.0013836219441145658,
-0.014617403037846088,
0.018518907949328423,
0.06563708186149597,
0.019948871806263924,
0.0491836778819561,
-0.02743411250412464,
0.018536562100052834,
-0.039509356021881104,
-0.006205334793776274,
0.020866872742772102,
0.07605286687612534,
0.028281496837735176,
0.01834237016737461,
0.06514277309179306,
-0.0012732852483168244,
-0.02176721952855587,
-0.011863399296998978,
0.007507307454943657,
0.027133995667099953,
-0.023850375786423683,
0.0021306013222783804,
0.02566872537136078,
0.0037602740339934826,
0.00970080029219389,
-0.002325897105038166,
-0.017018329352140427,
0.07358132302761078,
-0.03534304350614548,
-0.008412068709731102,
0.029481960460543633,
-0.042828284204006195,
-0.0006465729093179107,
0.030135152861475945,
0.003087220247834921,
0.04477021098136902,
-0.011580937542021275,
0.018395330756902695,
0.005163756664842367,
0.05733976513147354
]
|
41,334 | pyglove.core.typing.class_schema | __getitem__ | Returns field by key. | def __getitem__(self, key: Union[str, KeySpec]) -> Field:
"""Returns field by key."""
return self._fields[key]
| (self, key: Union[str, pyglove.core.typing.class_schema.KeySpec]) -> pyglove.core.typing.class_schema.Field | [
0.07054512947797775,
-0.05260281264781952,
-0.07778500765562057,
0.048440754413604736,
0.00273900106549263,
-0.011742948554456234,
0.056520044803619385,
-0.04176047816872597,
0.03431074321269989,
-0.05172843113541603,
-0.015467815101146698,
-0.001198996091261506,
0.028294997289776802,
-0.021632207557559013,
0.02997381053864956,
0.018764235079288483,
-0.047741249203681946,
0.05484123155474663,
-0.013037033379077911,
-0.015362889505922794,
0.0039718798361718655,
0.00843341276049614,
0.09114556759595871,
-0.014444787986576557,
0.038997430354356766,
0.06452938169240952,
0.07023034989833832,
0.002568496624007821,
0.05316241830587387,
-0.05242793634533882,
0.0011793224839493632,
-0.026021603494882584,
0.014068803749978542,
0.07260867208242416,
-0.06061214953660965,
-0.0277353934943676,
-0.010693689808249474,
-0.00016886499361135066,
-0.01312447153031826,
0.03488783538341522,
0.006116301286965609,
-0.003425390925258398,
0.020985163748264313,
-0.08240174502134323,
-0.013316836208105087,
0.004461533389985561,
0.033960990607738495,
0.016193551942706108,
-0.010273986496031284,
0.013028290122747421,
-0.0024832445196807384,
-0.009880514815449715,
-0.025654364377260208,
-0.06180131062865257,
-0.02563687600195408,
-0.05172843113541603,
-0.008241049014031887,
0.029431693255901337,
-0.015712641179561615,
0.073098324239254,
-0.04015161469578743,
-0.032404590398073196,
-0.07491704076528549,
0.0240629892796278,
-0.00916352216154337,
-0.07246876507997513,
0.028819626197218895,
0.0175838191062212,
0.0025313354562968016,
-0.04574766010046005,
0.005714085418730974,
0.008547082543373108,
0.001418684609234333,
-0.0009060782031156123,
-0.024377766996622086,
-0.02331102080643177,
-0.0495949387550354,
-0.015695154666900635,
0.06064712628722191,
-0.00805305689573288,
-0.010999724268913269,
0.02979893423616886,
-0.07449733465909958,
-0.003637428628280759,
-0.02327604591846466,
0.0034997134935110807,
0.036898914724588394,
-0.01818714290857315,
0.030498439446091652,
0.00508453045040369,
-0.0067458562552928925,
-0.009023620747029781,
-0.05697472393512726,
0.04679691791534424,
-0.023031217977404594,
-0.06414465606212616,
0.018764235079288483,
-0.015537765808403492,
-0.037493493407964706,
0.059492941945791245,
0.032369617372751236,
-0.008625777438282967,
0.008201701566576958,
0.04074619337916374,
-0.005779664032161236,
-0.03350631147623062,
-0.04889543354511261,
0.0013716865796595812,
0.0065316325053572655,
-0.007690188474953175,
0.02990385890007019,
0.0037576560862362385,
-0.06008752062916756,
0.07890421897172928,
-0.030830703675746918,
0.023835649713873863,
0.027945244684815407,
-0.014873235486447811,
0.008035569451749325,
-0.01972605474293232,
0.02481495775282383,
0.017732463777065277,
-0.07841456681489944,
0.017959803342819214,
0.025724314153194427,
0.007996222004294395,
-0.009373373351991177,
-0.006076953839510679,
0.01417373027652502,
0.004253867547959089,
0.030236124992370605,
0.027875293046236038,
-0.011052186600863934,
0.025916678830981255,
0.04218018054962158,
0.031775038689374924,
0.0819120928645134,
0.017889853566884995,
-0.03875260427594185,
0.056520044803619385,
-0.0033729281276464462,
0.014060060493648052,
0.03693389147520065,
-0.009705638512969017,
-0.013474224135279655,
-0.041970327496528625,
0.006632186472415924,
-0.022139348089694977,
-0.03703881427645683,
-0.0023324135690927505,
-0.040536344051361084,
0.041305799037218094,
0.0190090611577034,
0.002001241547986865,
0.013736538589000702,
-0.004686686675995588,
-0.03938215970993042,
-0.040431417524814606,
0.028749676421284676,
-0.005434283055365086,
0.017251554876565933,
-0.018554383888840675,
-0.025654364377260208,
-0.026738597080111504,
-0.0049227699637413025,
0.039871811866760254,
-0.024605104699730873,
-0.032544493675231934,
0.012320040725171566,
0.03341887518763542,
-0.02114255353808403,
-0.002981642261147499,
-0.06211608648300171,
0.0174089428037405,
-0.02191200852394104,
0.0422501303255558,
-0.054421525448560715,
0.03366370126605034,
0.00527689466252923,
-0.053687047213315964,
0.015800079330801964,
0.013657844625413418,
-0.005788407754153013,
-0.01755758747458458,
0.03581468015909195,
0.06173136085271835,
-0.006973195355385542,
0.04655209183692932,
0.000997341820038855,
0.027980219572782516,
0.010719921439886093,
-0.03198488801717758,
0.007384154945611954,
-0.05316241830587387,
-0.0466570146381855,
-0.01056253258138895,
0.02418540231883526,
0.01242496632039547,
-0.008787537924945354,
0.11471889913082123,
-0.002616587793454528,
0.0027236994355916977,
-0.029344255104660988,
0.06036732345819473,
-0.08352095633745193,
0.012442453764379025,
0.08617907762527466,
-0.020617924630641937,
-0.05610033869743347,
-0.0292043536901474,
-0.02264649048447609,
-0.04550283029675484,
-0.014689614996314049,
0.015310426242649555,
0.05379197373986244,
-0.06148653104901314,
-0.05928308889269829,
-0.04392894357442856,
0.03376862779259682,
0.049385085701942444,
0.10527557879686356,
0.00004207962774671614,
0.034503109753131866,
-0.041235849261283875,
0.05102892592549324,
-0.006107557099312544,
-0.03798314929008484,
-0.00910231564193964,
-0.08002343028783798,
-0.06229096278548241,
0.02338097058236599,
0.03453808277845383,
0.003493155585601926,
0.005377448629587889,
0.028015194460749626,
-0.006146904546767473,
-0.00601574731990695,
0.005875845905393362,
0.07148946076631546,
0.00023417039483319968,
0.029029477387666702,
0.047811198979616165,
-0.016482098028063774,
0.06145155802369118,
-0.05305749177932739,
-0.013308092020452023,
0.006059466395527124,
0.03191493824124336,
0.007366667035967112,
0.018676796928048134,
-0.004691058769822121,
0.020233197137713432,
0.04162057489156723,
0.04802105203270912,
0.011323245242238045,
-0.011384451761841774,
-0.06631311774253845,
-0.017216578125953674,
0.036199409514665604,
-0.028994502499699593,
-0.09960958361625671,
-0.0138676967471838,
0.013885184191167355,
-0.015712641179561615,
-0.00245264102704823,
0.02035561017692089,
0.06271066516637802,
0.04739149659872055,
0.03492281213402748,
0.02539204992353916,
0.053617097437381744,
0.02923932857811451,
0.00868261232972145,
-0.0005216234130784869,
0.030935630202293396,
-0.037493493407964706,
0.041165899485349655,
0.04868558049201965,
0.01958615332841873,
0.0023455293849110603,
-0.004087735433131456,
-0.0003994832222815603,
-0.044208746403455734,
0.027525540441274643,
-0.0015924680046737194,
0.016945520415902138,
0.004686686675995588,
0.041865404695272446,
-0.031040556728839874,
-0.01095600426197052,
0.02191200852394104,
-0.0018187143141403794,
0.022226786240935326,
-0.0016799061559140682,
-0.03703881427645683,
-0.0022624630946666002,
-0.06652297079563141,
0.017137885093688965,
0.04301958903670311,
-0.015642691403627396,
0.007751394994556904,
0.029519131407141685,
-0.047111693769693375,
0.013430505059659481,
-0.023923087865114212,
0.025409536436200142,
0.0023673889227211475,
0.022401662543416023,
-0.013928903266787529,
0.00005673235500580631,
-0.05102892592549324,
0.04092106968164444,
-0.022978754714131355,
0.0422501303255558,
-0.025864215567708015,
-0.020390585064888,
-0.07204906642436981,
0.07561654597520828,
0.0014263354241847992,
0.06620819121599197,
-0.000859626685269177,
0.0007705489988438785,
-0.011489377357065678,
0.015275451354682446,
0.005993887782096863,
-0.021352404728531837,
-0.029659032821655273,
-0.039731912314891815,
-0.01962112821638584,
0.03959200903773308,
-0.00767270103096962,
-0.013002058491110802,
0.015773849561810493,
-0.004336934071034193,
-0.07099980860948563,
-0.008840000256896019,
0.003998111002147198,
-0.0018777350196614861,
-0.02621396817266941,
-0.0028133236337453127,
-0.01956866681575775,
-0.06519391387701035,
-0.0004462079959921539,
-0.018711771816015244,
0.025829240679740906,
-0.05025947093963623,
0.05260281264781952,
-0.025269635021686554,
0.05309246480464935,
-0.049874741584062576,
0.048545680940151215,
-0.12213365733623505,
0.034695472568273544,
0.018536895513534546,
0.0042254505679011345,
-0.03284178301692009,
0.005447398871183395,
-0.04686686769127846,
-0.027525540441274643,
0.02999129705131054,
0.07589634507894516,
-0.033891040831804276,
-0.022244274616241455,
-0.01972605474293232,
-0.039696935564279556,
-0.023066192865371704,
-0.03140779584646225,
0.007021286524832249,
0.010265243239700794,
0.003145588794723153,
-0.004503066651523113,
0.016219783574342728,
-0.04574766010046005,
0.00913729052990675,
-0.005578556098043919,
-0.0307607538998127,
0.0409560464322567,
0.061696384102106094,
-0.05172843113541603,
-0.013570406474173069,
0.007283600978553295,
0.013762770220637321,
-0.009119803085923195,
0.0877879410982132,
-0.017269041389226913,
0.02929179184138775,
-0.022174324840307236,
-0.01170797273516655,
0.055121034383773804,
-0.005158852785825729,
-0.033995967358350754,
-0.0010864194482564926,
-0.053582120686769485,
0.01136696431785822,
-0.02558441273868084,
-0.030201150104403496,
0.028749676421284676,
-0.076385997235775,
0.005552324932068586,
-0.004992720205336809,
0.04382401704788208,
-0.022314224392175674,
-0.05487620458006859,
0.0819120928645134,
0.023153631016612053,
0.003991553094238043,
0.0234159454703331,
0.016272246837615967,
-0.037493493407964706,
-0.01381523348391056,
0.03742354363203049,
0.022069398313760757,
-0.016385916620492935,
-0.03721369057893753,
0.005386192351579666,
-0.010667459107935429,
0.011165856383740902,
-0.017872365191578865,
-0.036759015172719955,
0.054281625896692276,
-0.01972605474293232,
-0.06690769642591476,
-0.06837666034698486,
-0.00983679573982954,
-0.005565440747886896,
0.006037606857717037,
-0.003797003300860524,
0.037493493407964706,
0.020180733874440193,
0.028837114572525024,
-0.04833582788705826,
-0.01893911138176918,
0.004297586623579264,
0.0363742858171463,
0.009932978078722954,
-0.024535154923796654,
-0.02845238521695137,
-0.0007667235913686454,
0.007344807498157024,
-0.005749060772359371,
0.03191493824124336,
-0.014444787986576557,
0.02638884447515011,
-0.03569226711988449,
0.0000689600346959196,
-0.036094482988119125,
0.014951929450035095,
0.07988352328538895,
0.056589994579553604,
-0.055855512619018555,
0.04378904402256012,
0.03997673839330673,
0.06690769642591476,
0.02409796416759491,
0.08317120373249054,
-0.04032649099826813,
-0.05183335766196251,
-0.022051909938454628,
0.0584087073802948,
-0.02054797299206257,
-0.027980219572782516,
0.06043727323412895,
-0.01823960617184639,
-0.04522303119301796,
-0.014873235486447811,
0.03259695693850517,
0.01830955594778061,
0.02710583806037903,
0.02782283164560795,
-0.017382711172103882,
-0.03626935929059982,
0.012634817510843277,
-0.03264942020177841,
-0.04158560186624527,
-0.002684352220967412,
0.010440119542181492,
0.0298513974994421,
0.031075531616806984,
-0.04232008382678032,
-0.07610619813203812,
0.013955134898424149,
-0.0554707869887352,
-0.024272840470075607,
0.0017596934922039509,
0.009731870144605637,
-0.014138754457235336,
-0.008721958845853806,
0.07040522992610931,
-0.03261444345116615,
-0.014462276361882687,
0.005268150940537453,
0.042075254023075104,
0.0211250651627779,
0.04134077578783035,
0.040536344051361084,
-0.020058320835232735,
-0.005058299284428358,
0.03053341433405876,
-0.003512829076498747,
0.034660495817661285,
0.015502789989113808,
-0.0065316325053572655,
0.02763046696782112,
-0.00911105889827013,
0.0027586747892200947,
-0.0771554559469223,
0.0017848319839686155,
0.03640926256775856,
0.05165848135948181,
-0.0672224760055542,
-0.0008678240119479597,
-0.00989800225943327,
-0.005058299284428358,
-0.028137607499957085,
0.025129735469818115,
0.012608586810529232,
-0.04452352598309517,
-0.007663956843316555,
-0.034625522792339325,
0.06424958258867264,
0.0320548377931118,
-0.0018853858346119523,
0.0023455293849110603,
-0.038402851670980453,
0.020740337669849396,
0.04109594598412514,
-0.044208746403455734,
-0.03128538280725479,
0.008568942546844482,
0.055051080882549286,
-0.011559328064322472,
-0.0052156876772642136,
0.00913729052990675,
0.025147221982479095,
-0.0037795156240463257,
0.016438379883766174,
-0.03373365104198456,
0.03794817253947258,
-0.041935354471206665,
0.012870901264250278,
0.028854601085186005,
0.03443315625190735,
0.013684076257050037,
-0.05109887570142746,
0.055051080882549286,
-0.0038407223764806986,
-0.021667182445526123,
-0.02040807344019413,
0.0071480716578662395,
-0.019376302137970924,
-0.015642691403627396,
0.030183661729097366,
-0.0004617829108610749,
-0.04872055724263191,
0.01820463128387928,
0.039102356880903244,
-0.05603038892149925,
-0.03329646214842796,
-0.0032986055593937635,
-0.02413293905556202,
0.020687874406576157,
-0.0270883496850729,
0.03983683884143829,
0.07778500765562057,
-0.0567648708820343,
-0.02339845895767212,
0.003403531387448311,
-0.011445658281445503,
0.031075531616806984,
-0.048475731164216995,
-0.012800950556993484,
0.00338385789655149,
0.028172584250569344,
0.07624609768390656,
0.017671257257461548,
0.00731420423835516,
-0.03549990430474281,
0.01426116842776537,
-0.04588755965232849,
-0.07030030339956284,
-0.022349201142787933,
0.012188883498311043,
0.05519098415970802,
0.001801226637326181,
-0.05078409984707832,
-0.006833294406533241,
0.03151272237300873,
-0.020897725597023964,
-0.02477998286485672,
-0.013474224135279655,
0.015415351837873459,
-0.0807928815484047,
-0.01892162300646305,
0.044103819876909256,
0.01675315573811531,
0.011052186600863934,
-0.049210209399461746,
0.017015470191836357,
-0.014462276361882687,
-0.026808548718690872,
-0.0011836944613605738,
-0.012285064905881882,
0.028260022401809692,
-0.013141958974301815,
0.033891040831804276,
0.016552047803997993,
0.05837373435497284,
0.032387103885412216,
0.07023034989833832,
-0.07061507552862167,
-0.02053048647940159,
-0.025776777416467667,
-0.033960990607738495,
0.04158560186624527,
0.012547379359602928,
-0.01906152442097664,
0.014016341418027878,
0.020722849294543266,
0.031827498227357864,
-0.027315689250826836,
-0.038262952119112015,
0.056939747184515,
-0.01420870516449213,
0.0525328628718853,
-0.01977851800620556,
-0.059492941945791245,
0.0425998829305172,
-0.055785562843084335,
0.0012591099366545677,
-0.028155095875263214,
0.000801152375061065,
0.03142528235912323,
0.033960990607738495,
0.01686682552099228,
-0.036759015172719955,
-0.01682310737669468,
0.02845238521695137,
-0.03438069298863411,
-0.02626643143594265,
0.08086283504962921,
-0.04245998337864876,
0.028994502499699593,
-0.042774759232997894,
0.04574766010046005,
-0.014803284779191017,
0.012022750452160835,
-0.026721110567450523,
-0.07316827774047852,
0.03934718295931816,
0.0015389120671898127,
-0.057184573262929916,
0.025357073172926903,
-0.040536344051361084,
-0.023853138089179993,
0.013386785984039307,
-0.07124463468790054,
0.03520261496305466,
-0.05819885805249214,
-0.060262396931648254,
-0.009408349171280861,
-0.007392898667603731,
-0.015896262601017952,
-0.013273116201162338,
-0.06547371298074722,
-0.01979600451886654,
-0.05172843113541603,
-0.030096223577857018,
-0.022069398313760757,
0.018064729869365692,
0.029641544446349144,
0.028679724782705307,
-0.04252993315458298,
-0.03310409560799599,
-0.012643561698496342,
0.004795984365046024,
0.030830703675746918,
0.06823676079511642,
-0.014444787986576557,
0.046272289007902145,
0.013063265010714531,
0.08247169852256775,
-0.008988645859062672,
-0.003932532388716936,
0.06201115995645523,
-0.00022583644022233784,
0.03742354363203049,
0.004457161761820316,
0.0007514219032600522,
0.03787822276353836,
-0.05819885805249214,
0.030970605090260506,
-0.041165899485349655,
0.00602886313572526,
-0.03160015866160393,
-0.04962991550564766,
-0.02554943785071373,
0.015730129554867744,
0.005547952838242054,
0.006466053891927004,
0.05127375200390816,
-0.044138796627521515,
-0.004935885779559612,
0.0008273838320747018,
-0.00873070303350687,
-0.01466338336467743,
-0.014759565703570843,
0.022436639294028282,
0.02637135609984398,
-0.02698342502117157,
-0.052882615476846695,
0.009460811503231525,
-0.0003489330119919032,
-0.008761306293308735,
-0.03291173279285431,
0.08282145112752914,
0.02848736196756363,
-0.021422356367111206,
0.031617648899555206,
-0.00586273055523634,
0.04308953881263733,
0.04067624360322952,
-0.004879050888121128,
0.010667459107935429,
0.029571594670414925,
0.033069122582674026,
-0.030148686841130257,
-0.040536344051361084,
-0.019271375611424446,
-0.09939973056316376,
0.08512981981039047,
0.08883719891309738,
0.00016435646102763712,
-0.015179269015789032,
-0.042774759232997894,
-0.0010137364733964205,
-0.05053927004337311,
-0.015231732279062271,
-0.020040832459926605,
0.055051080882549286,
0.06543873995542526,
-0.018764235079288483,
0.06746730208396912,
0.005329357460141182,
0.013264372944831848,
-0.0380181223154068,
0.017863621935248375,
0.02201693505048752,
0.02778785489499569,
-0.01616732031106949,
-0.009425836615264416,
-0.003539060475304723,
0.057254523038864136,
0.009758101776242256,
0.04886045679450035,
-0.006125045008957386,
-0.05127375200390816,
-0.021457331255078316,
0.010597508400678635,
0.022821366786956787,
0.031162969768047333,
-0.025724314153194427,
-0.01818714290857315,
-0.042075254023075104,
0.03738856688141823,
-0.07645595073699951,
-0.03215976431965828,
0.0019553364254534245,
0.018554383888840675
]
|
41,335 | pyglove.core.typing.class_schema | __init__ | Constructor.
Args:
fields: A list of Field as the definition of the schema. The order of the
fields will be preserved.
name: Optional name of this schema. Useful for debugging.
base_schema_list: List of schema used as base. When present, fields
from these schema will be copied to this schema. Fields from the
latter schema will override those from the former ones.
description: Optional str as the description for the schema.
allow_nonconst_keys: Whether immediate fields can use non-const keys.
metadata: Optional dict of user objects as schema-level metadata.
Raises:
TypeError: Argument `fields` is not a list.
KeyError: If a field name contains characters ('.') which is not
allowed, or a field name from `fields` already exists in parent
schema.
ValueError: When failed to create ValueSpec from `fields`.
It could be an unsupported value type, default value doesn't conform
with value specification, etc.
| def __init__(
self,
fields: List[Field],
name: Optional[str] = None,
base_schema_list: Optional[List['Schema']] = None,
description: Optional[str] = None,
*,
allow_nonconst_keys: bool = False,
metadata: Optional[Dict[str, Any]] = None):
"""Constructor.
Args:
fields: A list of Field as the definition of the schema. The order of the
fields will be preserved.
name: Optional name of this schema. Useful for debugging.
base_schema_list: List of schema used as base. When present, fields
from these schema will be copied to this schema. Fields from the
latter schema will override those from the former ones.
description: Optional str as the description for the schema.
allow_nonconst_keys: Whether immediate fields can use non-const keys.
metadata: Optional dict of user objects as schema-level metadata.
Raises:
TypeError: Argument `fields` is not a list.
KeyError: If a field name contains characters ('.') which is not
allowed, or a field name from `fields` already exists in parent
schema.
ValueError: When failed to create ValueSpec from `fields`.
It could be an unsupported value type, default value doesn't conform
with value specification, etc.
"""
if not isinstance(fields, list):
raise TypeError(
f"Argument 'fields' must be a list. Encountered: {fields}."
)
self._name = name
self._allow_nonconst_keys = allow_nonconst_keys
self._fields = {f.key: f for f in fields}
self._description = description
self._metadata = metadata or {}
self._dynamic_field = None
for f in fields:
if not f.key.is_const:
self._dynamic_field = f
break
if base_schema_list:
# Extend base schema from the nearest ancestor to the farthest.
for base in reversed(base_schema_list):
self.extend(base)
if not allow_nonconst_keys and self._dynamic_field is not None:
raise ValueError(
f'NonConstKey is not allowed in schema. '
f'Encountered \'{self._dynamic_field.key}\'.')
| (self, fields: List[pyglove.core.typing.class_schema.Field], name: Optional[str] = None, base_schema_list: Optional[List[pyglove.core.typing.class_schema.Schema]] = None, description: Optional[str] = None, *, allow_nonconst_keys: bool = False, metadata: Optional[Dict[str, Any]] = None) | [
0.029873520135879517,
-0.03898199647665024,
-0.02633661776781082,
0.024263916537165642,
-0.009764514863491058,
0.006517599802464247,
0.029360098764300346,
-0.03443726524710655,
0.000020519772078841925,
0.006546122953295708,
-0.018178921192884445,
0.08663511276245117,
-0.0009971309918910265,
0.000322076870361343,
-0.006874142214655876,
-0.020784059539437294,
-0.00869964063167572,
0.06510943919420242,
-0.00767279788851738,
-0.028409318998456,
0.006042209453880787,
-0.0005208493676036596,
-0.0008016267092898488,
0.06332197785377502,
0.058986417949199677,
0.04518108442425728,
0.005039135925471783,
0.00018465938046574593,
0.011447396129369736,
0.018302522599697113,
-0.02291380800306797,
0.04217661917209625,
0.05769335478544235,
0.028656521812081337,
0.04461061581969261,
-0.0861787348985672,
-0.02880864590406418,
0.019586076959967613,
-0.08549417555332184,
0.03396187722682953,
0.07716533541679382,
-0.020023435354232788,
-0.04373589903116226,
-0.07081412523984909,
0.035083796828985214,
0.06974925100803375,
0.05632423236966133,
0.02413080632686615,
-0.03322026878595352,
-0.009973686188459396,
0.013491573743522167,
0.0224194023758173,
-0.03641488775610924,
-0.04795736446976662,
-0.01618228293955326,
0.012379161082208157,
-0.010021225549280643,
0.042671024799346924,
-0.010648740455508232,
0.009422233328223228,
-0.055145263671875,
-0.000556206563487649,
-0.01613474264740944,
-0.0017518128734081984,
-0.046283990144729614,
-0.02513863332569599,
-0.012540793046355247,
-0.0981966033577919,
-0.03462742269039154,
0.0031470831017941236,
-0.013672222383320332,
-0.028447350487113,
-0.02190598100423813,
0.033524516969919205,
0.055563606321811676,
0.019586076959967613,
-0.01076283399015665,
-0.029892535880208015,
0.026127444580197334,
-0.08016980439424515,
0.022191215306520462,
-0.03322026878595352,
-0.042671024799346924,
-0.04122583940625191,
0.049706798046827316,
0.035426076501607895,
-0.029949583113193512,
-0.0017518128734081984,
0.07842037081718445,
0.005081921350210905,
-0.02721133455634117,
-0.03168000280857086,
-0.016515055671334267,
0.06807588040828705,
0.003368139499798417,
-0.010943482629954815,
-0.013805331662297249,
-0.07880067825317383,
0.010230396874248981,
0.06845618784427643,
0.036452919244766235,
-0.035235922783613205,
-0.04807145893573761,
-0.015193470753729343,
0.023712463676929474,
-0.023465260863304138,
-0.033353377133607864,
-0.016724226996302605,
-0.018473662436008453,
-0.02188696525990963,
-0.03495068848133087,
0.016258344054222107,
0.02428293228149414,
0.03032989427447319,
-0.033163219690322876,
0.029588285833597183,
0.03997080773115158,
0.016410470008850098,
0.05940476059913635,
-0.03048202022910118,
0.007045282982289791,
0.010392029769718647,
-0.01808384247124195,
0.02569008618593216,
0.06697297096252441,
0.006664970424026251,
0.020270638167858124,
-0.03552115708589554,
0.04430636763572693,
0.042138587683439255,
0.009469772689044476,
0.03082429990172386,
-0.0041454024612903595,
-0.015440673567354679,
0.03156590834259987,
-0.03015875443816185,
0.04255693033337593,
0.007154622580856085,
-0.035920482128858566,
-0.039552465081214905,
0.023389197885990143,
0.013738776557147503,
0.06997743993997574,
-0.02190598100423813,
-0.08846060931682587,
-0.01979524828493595,
0.027553616091609,
-0.028656521812081337,
-0.03339140862226486,
0.05096182972192764,
-0.060393571853637695,
-0.007178392261266708,
-0.006189580541104078,
0.03365762531757355,
-0.017323218286037445,
-0.02740149199962616,
-0.010629724711179733,
-0.08427717536687851,
0.009878608398139477,
0.007135606836527586,
0.011856231838464737,
0.007406579330563545,
-0.02932206727564335,
-0.022001057863235474,
-0.04982089251279831,
0.028314240276813507,
-0.019338874146342278,
-0.1240578293800354,
-0.012464731000363827,
-0.00564763555303216,
0.023199042305350304,
-0.02428293228149414,
0.016429485753178596,
0.06708706170320511,
-0.04217661917209625,
0.03997080773115158,
0.024092774838209152,
-0.03554017096757889,
-0.023027900606393814,
0.005486003123223782,
0.026659881696105003,
0.0028903724160045385,
0.014718080870807171,
-0.019424444064497948,
0.027287397533655167,
0.013938440941274166,
-0.03978065028786659,
0.055221326649188995,
0.0705859363079071,
0.07309599965810776,
-0.020746028050780296,
-0.00688840402290225,
-0.020061466842889786,
0.013196831569075584,
0.013386988081037998,
-0.0215256679803133,
0.037308622151613235,
0.0159636028110981,
-0.021639762446284294,
0.06503337621688843,
-0.019776232540607452,
0.012645379640161991,
-0.007287731859833002,
-0.027496568858623505,
0.03377171978354454,
0.023579353466629982,
0.008243266493082047,
-0.02569008618593216,
-0.042823150753974915,
-0.051722452044487,
0.002038235543295741,
-0.02846636436879635,
-0.030767254531383514,
-0.02569008618593216,
0.0011219208827242255,
-0.06389244645833969,
-0.01626785285770893,
-0.052635204046964645,
-0.004694478120654821,
0.006527107674628496,
0.11135540157556534,
0.023199042305350304,
0.014062042348086834,
-0.006046963389962912,
0.029873520135879517,
0.00025299671688117087,
0.013396495953202248,
-0.05354795232415199,
0.0034394480753690004,
-0.00964091345667839,
-0.06389244645833969,
0.014889220707118511,
-0.03641488775610924,
-0.005704682320356369,
0.03053906559944153,
0.01489872857928276,
0.047310832887887955,
0.0015188716351985931,
0.033353377133607864,
0.011580505408346653,
-0.0043022814206779,
0.03168000280857086,
-0.017494359984993935,
-0.03683323413133621,
-0.05503116920590401,
-0.03240259736776352,
-0.004361704923212528,
0.04099765047430992,
0.0026954624336212873,
0.018397601321339607,
-0.023845572024583817,
-0.0327448770403862,
0.023731479421257973,
0.027439521625638008,
-0.01654357835650444,
0.03135673701763153,
-0.0159255713224411,
-0.05103789269924164,
0.043697867542505264,
-0.04571352154016495,
-0.029854504391551018,
-0.02945517748594284,
-0.04255693033337593,
0.08146286755800247,
0.00828129705041647,
-0.06735328584909439,
0.029036832973361015,
-0.009089460596442223,
-0.02224826067686081,
0.0039647542871534824,
0.04221465066075325,
0.050581518560647964,
0.008243266493082047,
-0.030805284157395363,
-0.03546410799026489,
-0.012911598198115826,
-0.013539113104343414,
-0.0335625484585762,
0.025747133418917656,
-0.007031021174043417,
0.017646484076976776,
-0.007596735376864672,
0.02186794951558113,
-0.012502762489020824,
0.10732409358024597,
0.004841849207878113,
-0.06050766631960869,
-0.022685620933771133,
-0.10222791135311127,
-0.04016096517443657,
0.0007624070276506245,
0.009755006991326809,
0.02118338644504547,
-0.014527924358844757,
-0.007026267237961292,
0.0028261947445571423,
0.006256135180592537,
-0.007939016446471214,
-0.020251622423529625,
-0.02171582356095314,
0.008442929945886135,
0.03856365382671356,
0.07663290202617645,
0.043507710099220276,
-0.03755582496523857,
-0.10762833803892136,
0.005153229925781488,
-0.02998761460185051,
0.04944058135151863,
0.03978065028786659,
-0.03744173049926758,
0.10435765981674194,
-0.0465882383286953,
0.059861134737730026,
0.041111744940280914,
0.015735415741801262,
-0.011010036803781986,
0.005661897361278534,
0.0013180193491280079,
0.029074864462018013,
0.030786270275712013,
-0.015355103649199009,
-0.02998761460185051,
-0.013681730255484581,
-0.05206473544239998,
-0.03373368829488754,
-0.004292773548513651,
-0.015611814334988594,
-0.010021225549280643,
-0.021145356819033623,
-0.02637464925646782,
0.008300312794744968,
0.022020073607563972,
0.038544636219739914,
-0.011599521152675152,
-0.018483171239495277,
0.0353119857609272,
-0.06408260017633438,
-0.014784635044634342,
-0.029683364555239677,
0.02344624511897564,
0.0018766027642413974,
0.018568741157650948,
-0.05582982674241066,
-0.06613628566265106,
-0.0896015465259552,
0.06469109654426575,
-0.06134435161948204,
0.036985356360673904,
0.0051199523732066154,
0.01016384270042181,
-0.08237561583518982,
-0.000711896806024015,
-0.02032768540084362,
0.0689886286854744,
-0.05719894915819168,
-0.08427717536687851,
0.004749148152768612,
-0.021791886538267136,
-0.015982618555426598,
0.08024586737155914,
-0.04742492735385895,
0.01214146614074707,
0.04270905628800392,
-0.03605359420180321,
0.017798610031604767,
-0.027306413277983665,
-0.022134168073534966,
-0.015516736544668674,
-0.01078184973448515,
0.012208020314574242,
-0.03744173049926758,
-0.018197936937212944,
-0.05925263464450836,
0.045409273356199265,
-0.010753326117992401,
-0.0025908765383064747,
0.029207974672317505,
-0.06670675426721573,
-0.0116280447691679,
-0.013329940848052502,
0.007986555807292461,
-0.004276135005056858,
-0.029531238600611687,
-0.03242161124944687,
-0.011504442431032658,
-0.00036605045897886157,
0.023693447932600975,
0.007820168510079384,
0.01647702418267727,
-0.0031898682937026024,
0.01265488751232624,
-0.002743001561611891,
-0.025766149163246155,
0.022001057863235474,
-0.0020465548150241375,
-0.01827399991452694,
-0.017114046961069107,
0.03417104855179787,
-0.018178921192884445,
-0.05020120367407799,
-0.05879626050591469,
0.02122141793370247,
0.04582761600613594,
0.009108476340770721,
-0.0671631246805191,
0.09005791693925858,
0.03913412243127823,
-0.006859880406409502,
0.10260821878910065,
0.03371467441320419,
-0.022495463490486145,
-0.01923428662121296,
-0.023902619257569313,
-0.003629604121670127,
-0.02340821363031864,
-0.0008806603727862239,
-0.00922256987541914,
0.016923891380429268,
0.04411621019244194,
0.010620216839015484,
0.013510589487850666,
0.003356254892423749,
0.020803075283765793,
-0.022704636678099632,
0.012284082360565662,
-0.03048202022910118,
-0.004682593513280153,
-0.001480840495787561,
-0.002337731420993805,
0.012122450396418571,
0.06130632013082504,
-0.014946267940104008,
-0.051608361303806305,
-0.009621897712349892,
-0.03257373720407486,
0.01482266653329134,
-0.03495068848133087,
0.0024577672593295574,
-0.013491573743522167,
0.027021178975701332,
-0.030044659972190857,
0.007848692126572132,
-0.004582761321216822,
-0.00741133326664567,
0.020555872470140457,
0.016923891380429268,
0.04810948669910431,
-0.0003532743430696428,
0.012607348151504993,
0.027477553114295006,
0.017817623913288116,
0.04750099033117294,
-0.011067084036767483,
-0.022856760770082474,
-0.010496615432202816,
0.020403746515512466,
-0.02394065074622631,
0.00912749208509922,
-0.007107083685696125,
0.03325830027461052,
0.009716975502669811,
0.003667635377496481,
-0.047653112560510635,
-0.04392605274915695,
0.04084552451968193,
0.003924346063286066,
0.02411179058253765,
0.027705740183591843,
-0.0019265187438577414,
-0.009945162571966648,
0.032516688108444214,
0.009888116270303726,
0.015374119393527508,
0.003318223636597395,
-0.05632423236966133,
0.04586564749479294,
-0.027667710557579994,
-0.04898420721292496,
-0.07351434230804443,
0.03483659401535988,
0.008062617853283882,
0.0049202884547412395,
-0.04103568196296692,
0.08207136392593384,
-0.059709008783102036,
0.005809268448501825,
-0.056780606508255005,
-0.0448007732629776,
0.042480867356061935,
0.0063226898200809956,
0.024777337908744812,
0.04959270730614662,
0.033866796642541885,
0.007249700371176004,
-0.05670454353094101,
0.02120240218937397,
0.04000883921980858,
0.056438323110342026,
0.006142041180282831,
-0.007306747604161501,
-0.03339140862226486,
-0.06130632013082504,
0.021772870793938637,
0.016771765425801277,
-0.03148984536528587,
-0.003268307540565729,
-0.010962498374283314,
0.026127444580197334,
-0.058530040085315704,
-0.05008711293339729,
-0.007073806133121252,
0.026260554790496826,
0.00827178917825222,
-0.03166098892688751,
-0.023180026561021805,
0.007330516818910837,
0.050239235162734985,
-0.036643076688051224,
-0.00974549911916256,
-0.00762525899335742,
-0.013339448720216751,
-0.06590809673070908,
-0.0008818487985990942,
-0.01231260597705841,
0.02688807062804699,
-0.030881347134709358,
-0.06046963483095169,
0.06701100617647171,
0.03951443359255791,
-0.000493217317853123,
-0.049744829535484314,
-0.016999954357743263,
0.005138968117535114,
-0.03388581424951553,
0.08944942057132721,
0.02359836921095848,
0.05096182972192764,
-0.05582982674241066,
-0.013006675988435745,
0.051950640976428986,
0.09774022549390793,
0.0046635777689516544,
-0.014661033637821674,
0.03154689446091652,
0.008970612660050392,
-0.014138104394078255,
0.029055848717689514,
0.017684515565633774,
-0.03759385645389557,
0.021468620747327805,
0.01316830888390541,
0.04206252470612526,
0.0056523894891142845,
-0.017798610031604767,
-0.028865693137049675,
0.05046742409467697,
-0.027002163231372833,
0.007739352528005838,
0.018473662436008453,
0.027838850393891335,
-0.02911289595067501,
0.014204659499228,
0.03285897150635719,
-0.0001311037049163133,
0.0206699650734663,
0.005205522757023573,
0.006664970424026251,
-0.0002639901067595929,
0.03361959382891655,
-0.028009990230202675,
0.03379073366522789,
0.044382430613040924,
0.01820744387805462,
0.017009461298584938,
0.010601201094686985,
-0.021107325330376625,
0.035407062619924545,
-0.03202228248119354,
-0.09021004289388657,
-0.016296375542879105,
-0.007572965696454048,
0.023180026561021805,
-0.009384202770888805,
0.014651525765657425,
0.0015961226308718324,
-0.00922256987541914,
0.0482235811650753,
0.022951839491724968,
0.02878963015973568,
-0.029778441414237022,
0.006332197692245245,
-0.06149647757411003,
0.005143722053617239,
-0.03268783167004585,
0.019443459808826447,
-0.05191260948777199,
-0.008248019963502884,
0.01820744387805462,
-0.01940542832016945,
-0.11044265329837799,
0.015811478719115257,
-0.028333256021142006,
0.014071550220251083,
0.005785498768091202,
-0.020232606679201126,
0.016724226996302605,
0.011551981791853905,
0.05670454353094101,
-0.00899913627654314,
0.006631693337112665,
0.0005749250412918627,
-0.0043165432289242744,
-0.03150886297225952,
0.03515985980629921,
-0.021316496655344963,
-0.042632993310689926,
0.018949054181575775,
0.037479761987924576,
-0.09675141423940659,
-0.011219209060072899,
0.029417145997285843,
0.026507757604122162,
0.015535751357674599,
-0.0774695873260498,
0.05544951185584068,
-0.01266439538449049,
-0.007839184254407883,
-0.013035199604928493,
-0.012940120883286,
0.043355587869882584,
-0.027477553114295006,
-0.051075924187898636,
0.021107325330376625,
0.02618449181318283,
0.015763938426971436,
0.011941801756620407,
-0.013329940848052502,
0.04069340229034424,
0.07218325138092041,
0.029093880206346512,
0.026469726115465164,
-0.009550589136779308,
0.043849993497133255,
-0.05099986121058464,
0.025614023208618164,
0.020213590934872627,
-0.07678502798080444,
0.050391361117362976,
0.037308622151613235,
-0.04499092698097229,
0.03614867106080055,
-0.005329124163836241,
-0.00512470630928874,
0.08222348988056183,
0.014613495208323002,
-0.0033919091802090406,
-0.06754343956708908,
0.04327952489256859,
-0.004492437466979027,
0.01265488751232624,
-0.04913632944226265,
0.05255914106965065,
-0.046283990144729614,
-0.04183433949947357,
0.006517599802464247,
0.04567549005150795,
-0.056780606508255005,
0.014375799335539341,
0.059556882828474045,
0.0019776232074946165,
-0.05544951185584068,
0.007059544324874878,
0.020574888214468956,
0.026051383465528488,
0.01842612400650978,
-0.019376903772354126,
0.04088355600833893,
0.004340312443673611,
-0.01733272708952427,
0.11858133226633072,
-0.03131870552897453,
0.00693594291806221,
-0.01664816401898861,
-0.025709101930260658,
-0.03759385645389557,
-0.007682305760681629,
0.03641488775610924,
-0.019719185307621956,
-0.03690929338335991,
-0.01603015698492527,
-0.016591118648648262,
-0.004554238170385361,
0.005581080913543701,
-0.08572236448526382,
-0.037327639758586884,
0.04114977642893791,
-0.015744922682642937,
0.0396665595471859,
0.051456235349178314,
-0.01893954537808895,
0.03173704817891121,
-0.0056000966578722,
0.03742271661758423,
0.014556447975337505,
0.056096043437719345,
0.004028931725770235,
-0.00983106903731823,
0.0413779616355896,
-0.005062905605882406,
0.03464643657207489,
0.0689125657081604,
0.007340024691075087,
-0.08404898643493652,
0.02049882523715496,
0.01673373579978943,
0.03053906559944153,
0.05605801194906235,
0.009550589136779308,
-0.011399856768548489,
0.029607301577925682,
0.008713901974260807,
0.009707467630505562,
0.020422762259840965,
-0.021772870793938637,
-0.019510013982653618,
-0.03468446806073189,
-0.005452725570648909,
0.028333256021142006,
0.02705921046435833,
0.03605359420180321,
0.026831023395061493,
-0.016315391287207603,
-0.009664682671427727,
0.019433951005339622,
-0.058530040085315704,
0.03411399945616722,
-0.024225885048508644,
0.008647347800433636,
0.07484543323516846,
0.005148475989699364,
0.034722499549388885,
-0.025024540722370148,
0.017133062705397606,
-0.0654136911034584,
0.020746028050780296,
0.016324900090694427,
0.007967540062963963,
0.024587180465459824,
0.012569316662847996,
-0.04582761600613594,
0.025709101930260658,
-0.044534552842378616,
0.010905451141297817,
-0.021829918026924133,
-0.04415424168109894,
-0.009564850479364395,
0.011219209060072899,
-0.025880241766572,
-0.040579307824373245,
-0.009403218515217304,
0.003118559718132019,
0.01938641257584095,
0.037631887942552567,
-0.008024586364626884,
0.0031518370378762484,
0.04552336409687996,
0.01318732462823391
]
|
41,340 | pyglove.core.typing.class_schema | apply | Apply this schema to a dict object, validate and transform it.
Args:
dict_obj: JSON dict type that (maybe) conform to the schema.
allow_partial: Whether allow partial object to be created.
child_transform: Function to transform child node values in dict_obj into
their final values. Transform function is called on leaf nodes first,
then on their containers, recursively.
The signature of transform_fn is: `(path, field, value) -> new_value`
Argument `path` is a KeyPath object to the field. Argument `field` is
on which Field the value should apply. Argument `value` is the value
from input that matches a Field from the schema, with child fields
already transformed by this function.
There are possible values for these two arguments::
------------------------------------------------------------
| field | value
------------------------------------------------------------
The value with | |
applicable Field is | Not None | Not MISSING_VALUE
found in schema. | |
value. | |
------------------------------------------------------------
The value is | |
not present for a | Not None | MISSING_VALUE
key defined in schema. | |
------------------------------------------------------------
Return value will be inserted to the parent dict under path, unless
return value is MISSING_VALUE.
root_path: KeyPath of root element of dict_obj.
Returns:
A dict filled by the schema with transformed values.
Raises:
KeyError: Key is not allowed in schema.
TypeError: Type of dict values are not aligned with schema.
ValueError: Value of dict values are not aligned with schema.
| def apply(
self,
dict_obj: Dict[str, Any],
allow_partial: bool = False,
child_transform: Optional[Callable[
[object_utils.KeyPath, Field, Any], Any]] = None,
root_path: Optional[object_utils.KeyPath] = None,
) -> Dict[str, Any]: # pyformat: disable
# pyformat: disable
"""Apply this schema to a dict object, validate and transform it.
Args:
dict_obj: JSON dict type that (maybe) conform to the schema.
allow_partial: Whether allow partial object to be created.
child_transform: Function to transform child node values in dict_obj into
their final values. Transform function is called on leaf nodes first,
then on their containers, recursively.
The signature of transform_fn is: `(path, field, value) -> new_value`
Argument `path` is a KeyPath object to the field. Argument `field` is
on which Field the value should apply. Argument `value` is the value
from input that matches a Field from the schema, with child fields
already transformed by this function.
There are possible values for these two arguments::
------------------------------------------------------------
| field | value
------------------------------------------------------------
The value with | |
applicable Field is | Not None | Not MISSING_VALUE
found in schema. | |
value. | |
------------------------------------------------------------
The value is | |
not present for a | Not None | MISSING_VALUE
key defined in schema. | |
------------------------------------------------------------
Return value will be inserted to the parent dict under path, unless
return value is MISSING_VALUE.
root_path: KeyPath of root element of dict_obj.
Returns:
A dict filled by the schema with transformed values.
Raises:
KeyError: Key is not allowed in schema.
TypeError: Type of dict values are not aligned with schema.
ValueError: Value of dict values are not aligned with schema.
""" # pyformat: enable
matched_keys, unmatched_keys = self.resolve(dict_obj.keys())
if unmatched_keys:
raise KeyError(
f'Keys {unmatched_keys} are not allowed in Schema. '
f'(parent=\'{root_path}\')')
for key_spec, keys in matched_keys.items():
field = self._fields[key_spec]
# For missing const keys, we add to keys collection to add missing value.
if key_spec.is_const and key_spec not in keys:
keys.append(str(key_spec))
for key in keys:
if dict_obj:
value = dict_obj.get(key, object_utils.MISSING_VALUE)
else:
value = object_utils.MISSING_VALUE
# NOTE(daiyip): field.default_value may be MISSING_VALUE too
# or partial.
if object_utils.MISSING_VALUE == value:
value = copy.deepcopy(field.default_value)
new_value = field.apply(
value,
allow_partial=allow_partial,
transform_fn=child_transform,
root_path=object_utils.KeyPath(key, root_path))
# NOTE(daiyip): `pg.Dict.__getitem__`` has special logics in handling
# `pg.Contextual`` values. Therefore, we user `dict.__getitem__()`` to
# avoid triggering side effect.
if (key not in dict_obj
or dict.__getitem__(dict_obj, key) is not new_value):
# NOTE(daiyip): minimize call to __setitem__ when possible.
# Custom like symbolic dict may trigger additional logic
# when __setitem__ is called.
dict_obj[key] = new_value
return dict_obj
| (self, dict_obj: Dict[str, Any], allow_partial: bool = False, child_transform: Optional[Callable[[pyglove.core.object_utils.value_location.KeyPath, pyglove.core.typing.class_schema.Field, Any], Any]] = None, root_path: Optional[pyglove.core.object_utils.value_location.KeyPath] = None) -> Dict[str, Any] | [
0.054317407310009,
-0.020408732816576958,
-0.009847015142440796,
-0.0035338078159838915,
-0.03839541971683502,
-0.005926076788455248,
0.06337030977010727,
-0.014105452224612236,
0.024716801941394806,
-0.019267193973064423,
0.005275895819067955,
0.04808361083269119,
0.029759427532553673,
-0.019088517874479294,
-0.04522480070590973,
0.05177624151110649,
-0.006958425045013428,
0.08338198065757751,
0.045065976679325104,
0.02523297630250454,
0.0475277304649353,
-0.06027326360344887,
-0.003824155777692795,
0.05177624151110649,
0.012904354371130466,
-0.030692510306835175,
-0.002561018103733659,
0.0033700219355523586,
0.027476347982883453,
0.01236832793802023,
0.037601303309202194,
0.012050681747496128,
0.06321148574352264,
0.004496671259403229,
-0.010283777490258217,
-0.09108489006757736,
-0.015445520170032978,
0.028925606980919838,
-0.045621857047080994,
-0.021202847361564636,
0.014522362500429153,
0.04740861430764198,
-0.09942308813333511,
-0.020210204645991325,
0.05423799529671669,
0.05455563962459564,
0.0005440922686830163,
0.10442600399255753,
-0.006278465036302805,
-0.06432324647903442,
0.010859510861337185,
-0.031387362629175186,
0.021143289282917976,
-0.009077717550098896,
-0.03857409209012985,
-0.006779749412089586,
-0.05221300199627876,
0.029143989086151123,
0.041254229843616486,
-0.06217913702130318,
0.012080460786819458,
0.018661681562662125,
-0.06134531646966934,
-0.010889289900660515,
-0.01628926582634449,
-0.05201447382569313,
0.016249559819698334,
-0.04300127923488617,
-0.021441081538796425,
-0.002427011262625456,
-0.09942308813333511,
-0.009817236103117466,
0.00913231261074543,
0.02505430020391941,
0.005826812237501144,
-0.009961169213056564,
0.012547003105282784,
-0.032062359154224396,
0.035199109464883804,
-0.001954265171661973,
-0.004198878537863493,
-0.04709096625447273,
-0.056143868714571,
-0.056540925055742264,
-0.022731516510248184,
0.05467475578188896,
-0.007782318629324436,
-0.012904354371130466,
0.08941724896430969,
-0.00015254125173669308,
-0.0043899621814489365,
-0.0007066375110298395,
-0.0025932788848876953,
0.010889289900660515,
0.030255747959017754,
0.024776360020041466,
0.0008797295740805566,
-0.02584841474890709,
-0.011544434353709221,
0.022731516510248184,
0.023843277245759964,
0.005653100088238716,
-0.0043750726617872715,
0.02646385319530964,
0.07063645124435425,
-0.03176456317305565,
0.005831775721162558,
-0.02894545905292034,
0.036072634160518646,
-0.0017743487842381,
-0.025332240387797356,
-0.02146093361079693,
-0.04546303302049637,
0.018979327753186226,
-0.0001740226725814864,
-0.0023016901686787605,
-0.028468990698456764,
-0.005593541543930769,
0.008894078433513641,
0.003022596938535571,
0.036866746842861176,
-0.010571644641458988,
0.031486626714468,
-0.05201447382569313,
0.005558799020946026,
0.0018897434929385781,
0.0271587036550045,
-0.0012147465022280812,
0.0499894842505455,
0.0481233149766922,
-0.017192570492625237,
0.018870137631893158,
-0.00754408398643136,
-0.012020902708172798,
0.02332710288465023,
0.008506947197020054,
0.05995561555027962,
0.026324883103370667,
-0.053523290902376175,
-0.04542332887649536,
0.037859391421079636,
-0.02690061554312706,
0.07500407844781876,
-0.015763165429234505,
-0.014294054359197617,
-0.01323192659765482,
0.016239633783698082,
0.03214176744222641,
-0.038415271788835526,
0.01572345942258835,
-0.004491708241403103,
0.023664601147174835,
0.014701037667691708,
0.06745999306440353,
-0.02745649591088295,
0.009345730766654015,
0.012656194157898426,
-0.09235547482967377,
0.03426602482795715,
-0.017242202535271645,
0.011981196701526642,
0.01801646500825882,
-0.011097745038568974,
0.02116314135491848,
0.029223399236798286,
0.021321963518857956,
0.03781968355178833,
-0.08497021347284317,
0.007266144268214703,
0.020527850836515427,
0.009172017686069012,
-0.0006625889800488949,
0.019743662327528,
0.05070418864488602,
0.03593366593122482,
0.07313790917396545,
0.00351643655449152,
-0.03176456317305565,
-0.03444470092654228,
0.02449842169880867,
0.019158003851771355,
0.011206935159862041,
0.03597337007522583,
-0.023982247337698936,
0.0027148777153342962,
0.03122853860259056,
-0.062218841165304184,
0.04391451179981232,
0.03357117623090744,
0.016765734180808067,
-0.019515354186296463,
-0.020746231079101562,
0.04796449467539787,
-0.018860209733247757,
-0.009360619820654392,
0.00971797201782465,
-0.015098094940185547,
-0.01160399243235588,
0.010720540769398212,
0.04063878953456879,
-0.05812915414571762,
-0.09307017177343369,
0.03194323927164078,
0.004015239421278238,
-0.06468059867620468,
-0.01502860989421606,
-0.014184863306581974,
0.04085717350244522,
-0.05336447060108185,
-0.03190353512763977,
-0.025471210479736328,
-0.0401226170361042,
-0.038038067519664764,
-0.050743892788887024,
0.004174062516540289,
-0.04601891338825226,
0.048520371317863464,
-0.04665420576930046,
-0.051180656999349594,
-0.006184163969010115,
0.04744831845164299,
0.004916062578558922,
0.03448440507054329,
0.0011167229386046529,
0.050386540591716766,
-0.029461633414030075,
-0.027238113805651665,
-0.025213124230504036,
0.013509866781532764,
-0.019296973943710327,
-0.019604692235589027,
-0.03432558476924896,
-0.04518509283661842,
-0.03807777166366577,
0.07238350063562393,
-0.024399155750870705,
0.04335863143205643,
-0.03658880665898323,
0.07357467710971832,
0.001345030847005546,
0.03239985555410385,
-0.007831950671970844,
-0.016448087990283966,
-0.03895129635930061,
-0.05523063614964485,
-0.003846490290015936,
0.03422631695866585,
-0.013102883473038673,
0.03795865550637245,
-0.0194260161370039,
0.011246641166508198,
-0.015038535930216312,
-0.020587408915162086,
0.044629212468862534,
-0.014691111631691456,
0.003171493299305439,
0.020686673000454903,
0.012378253974020481,
0.0015658937627449632,
-0.00029779280885122716,
0.020349174737930298,
-0.05376152694225311,
-0.0407380536198616,
0.04903654754161835,
-0.02801237627863884,
-0.03142706677317619,
0.027734436094760895,
-0.014214643277227879,
-0.02505430020391941,
0.01777823083102703,
-0.02713884972035885,
-0.03869321197271347,
0.042842455208301544,
0.01993226446211338,
-0.039149824529886246,
0.052848294377326965,
-0.016745882108807564,
0.023108720779418945,
0.040202029049396515,
0.001120445434935391,
0.016765734180808067,
-0.049830660223960876,
-0.014978977851569653,
-0.01905873976647854,
0.025769002735614777,
0.013331190682947636,
-0.05681886523962021,
0.04832184314727783,
-0.029779279604554176,
-0.037978507578372955,
0.04040055721998215,
0.009176981635391712,
-0.02678149938583374,
0.00221235235221684,
-0.04589979723095894,
-0.01621978171169758,
-0.06980263441801071,
-0.08465256541967392,
-0.0025076635647565126,
-0.028548402711749077,
0.01378780696541071,
0.0243793036788702,
0.045145388692617416,
0.04780567064881325,
0.03966600075364113,
0.01486978679895401,
0.028806490823626518,
-0.028846194967627525,
0.015038535930216312,
0.03646969050168991,
-0.05110124498605728,
0.028707224875688553,
-0.008070184849202633,
0.003022596938535571,
0.022910192608833313,
-0.02819105237722397,
0.024835919961333275,
-0.003489139024168253,
0.027734436094760895,
-0.003183901309967041,
-0.049949780106544495,
0.026582971215248108,
-0.0499894842505455,
-0.026324883103370667,
0.006953462027013302,
-0.06344971805810928,
0.07289967685937881,
-0.016487793996930122,
0.014204716309905052,
-0.00813966989517212,
-0.017937052994966507,
-0.014780448749661446,
0.05403946712613106,
0.04486744850873947,
-0.02751605398952961,
-0.01160399243235588,
0.024657243862748146,
-0.03728365898132324,
-0.04232628270983696,
-0.0061792004853487015,
0.01764918677508831,
0.06344971805810928,
0.05312623456120491,
-0.04022188112139702,
-0.017609480768442154,
-0.034206464886665344,
0.030632952228188515,
-0.01777823083102703,
0.05253065004944801,
-0.05026742443442345,
-0.03289617598056793,
-0.03734321519732475,
0.005653100088238716,
-0.011713183484971523,
-0.020646966993808746,
-0.04323951527476311,
-0.012755458243191242,
-0.02944178134202957,
-0.021877843886613846,
-0.044589508324861526,
0.0622982531785965,
-0.06678500026464462,
-0.04399392381310463,
-0.023664601147174835,
0.03539763763546944,
0.017817934975028038,
-0.06245707720518112,
-0.032062359154224396,
-0.00922661367803812,
-0.012953986413776875,
0.056620337069034576,
-0.041254229843616486,
0.0010304871248081326,
-0.04947331175208092,
0.038971152156591415,
0.020091086626052856,
-0.005325527861714363,
0.056064456701278687,
-0.05046595260500908,
0.01061134971678257,
0.04923507571220398,
0.009266318753361702,
-0.015177506022155285,
-0.03474249318242073,
0.00771283358335495,
-0.014125305227935314,
0.0617026686668396,
-0.007117247674614191,
-0.0065216622315347195,
-0.04701155796647072,
-0.005529019515961409,
0.00164654606487602,
0.0400829091668129,
-0.03035501204431057,
0.020706525072455406,
-0.012844796292483807,
-0.009861905127763748,
-0.0040847244672477245,
0.00016611254250165075,
-0.018780799582600594,
-0.0007333147805184126,
-0.019584840163588524,
-0.009479736909270287,
0.00230665341950953,
0.029521193355321884,
-0.06027326360344887,
0.05693798139691353,
0.04165128618478775,
0.011872006580233574,
0.08989372104406357,
0.03857409209012985,
0.008884151466190815,
-0.003573513589799404,
0.04165128618478775,
-0.014691111631691456,
-0.03593366593122482,
0.035437341779470444,
-0.015326403081417084,
-0.04597920924425125,
0.014403245411813259,
0.06829381734132767,
0.004722497425973415,
-0.026642529293894768,
-0.011881932616233826,
0.024200627580285072,
-0.07067615538835526,
-0.040321145206689835,
-0.053285058587789536,
0.03789909556508064,
0.038653504103422165,
0.017996611073613167,
-0.0468924380838871,
0.005970745347440243,
-0.009797383099794388,
-0.024974890053272247,
-0.005970745347440243,
0.03990423306822777,
0.023803571239113808,
0.016398455947637558,
0.040559377521276474,
0.026483705267310143,
0.004568637814372778,
0.02660282328724861,
-0.02862781472504139,
-0.00111424142960459,
0.05356299877166748,
0.04597920924425125,
0.018532637506723404,
0.0036082561127841473,
0.025749150663614273,
0.1018054336309433,
0.001879816991277039,
0.03239985555410385,
0.023088868707418442,
-0.0771481841802597,
-0.012378253974020481,
0.02245357632637024,
-0.031387362629175186,
-0.02622561901807785,
0.05499240383505821,
0.0022297236137092113,
-0.025074154138565063,
0.0012631377903744578,
-0.02024991065263748,
-0.045820385217666626,
0.054317407310009,
0.01200104970484972,
0.010373115539550781,
-0.05026742443442345,
-0.03494102135300636,
0.01221943087875843,
-0.012715752236545086,
0.0005785245448350906,
0.012824943289160728,
0.015217212028801441,
-0.021619757637381554,
0.048718903213739395,
-0.05959826335310936,
-0.04188951849937439,
-0.012060608714818954,
0.048163022845983505,
0.0022011850960552692,
0.047726258635520935,
-0.05336447060108185,
0.02874693088233471,
-0.04800419881939888,
-0.013946629129350185,
-0.00006428912456613034,
0.011991123668849468,
0.052173297852277756,
0.0012054403778165579,
0.026702087372541428,
0.04308069124817848,
0.019346605986356735,
-0.032618239521980286,
-0.06015414372086525,
-0.004913581069558859,
0.006283428054302931,
0.02227490209043026,
-0.07635407149791718,
-0.017103232443332672,
0.0038737880531698465,
-0.03325352817773819,
0.06337030977010727,
-0.04435127228498459,
-0.024518273770809174,
-0.0277542881667614,
0.016636690124869347,
0.018860209733247757,
-0.02701973356306553,
-0.05610416457056999,
-0.0169741902500391,
0.05014830827713013,
0.03646969050168991,
0.006844270974397659,
0.012388180010020733,
0.02320798486471176,
0.03831600770354271,
0.009544258937239647,
-0.09283193945884705,
-0.006308244075626135,
-0.019833000376820564,
0.0036951121874153614,
-0.024915330111980438,
0.03255867958068848,
0.03506013751029968,
0.018731167539954185,
-0.03325352817773819,
0.06178208068013191,
-0.0826672837138176,
0.00570769514888525,
-0.014244422316551208,
0.050863008946180344,
0.006988204084336758,
-0.0005440922686830163,
0.07174821197986603,
0.04478803649544716,
-0.04391451179981232,
-0.06567323952913284,
-0.015445520170032978,
0.03555646166205406,
0.04609832540154457,
-0.001262517413124442,
0.013013545423746109,
0.08040405809879303,
-0.005692805629223585,
0.022532988339662552,
-0.012934133410453796,
0.013013545423746109,
-0.01801646500825882,
-0.023803571239113808,
-0.007320739794522524,
0.045820385217666626,
0.09910544008016586,
-0.03372999653220177,
-0.008085074834525585,
0.023724159225821495,
0.004881320055574179,
-0.004315514117479324,
-0.017728596925735474,
0.01447272952646017,
-0.014373465441167355,
0.043040987104177475,
-0.024399155750870705,
0.03251897171139717,
-0.01163377147167921,
-0.04343804344534874,
0.046376265585422516,
0.002517589833587408,
0.025630032643675804,
-0.029521193355321884,
0.05388064309954643,
-0.0010993517935276031,
-0.052173297852277756,
-0.006427361164242029,
0.0014703519409522414,
-0.11093774437904358,
-0.00629335455596447,
-0.02221534214913845,
-0.04613802954554558,
-0.022314606234431267,
-0.02868737280368805,
0.04490715265274048,
0.0047944639809429646,
-0.016517573967576027,
-0.03305500000715256,
0.023803571239113808,
0.08056287467479706,
0.04967183992266655,
-0.02584841474890709,
-0.07992758601903915,
-0.0030920819845050573,
-0.019545134156942368,
-0.008998305536806583,
0.04601891338825226,
0.01981314830482006,
-0.060868848115205765,
-0.023525631055235863,
0.041611578315496445,
-0.09465840458869934,
-0.07250262051820755,
-0.0160510316491127,
-0.0011880692327395082,
0.03234029933810234,
-0.030553540214896202,
0.020646966993808746,
0.0370255708694458,
0.0020163054578006268,
0.06880998611450195,
-0.045820385217666626,
-0.0101845134049654,
-0.0033700219355523586,
0.06015414372086525,
-0.007717796601355076,
-0.009504553861916065,
-0.07039821892976761,
-0.08088052272796631,
-0.0016701212152838707,
0.00015820242697373033,
-0.0709143877029419,
-0.03928879648447037,
-0.0002214833948528394,
-0.04967183992266655,
-0.010998480953276157,
-0.05014830827713013,
0.03371014446020126,
-0.014502509497106075,
-0.020766085013747215,
-0.04534391686320305,
0.0095591489225626,
0.007429930381476879,
-0.023406513035297394,
-0.01684514619410038,
0.02054770290851593,
-0.015564637258648872,
0.020388880744576454,
0.014631552621722221,
0.011643698439002037,
-0.005484350491315126,
0.04788508266210556,
-0.005687842611223459,
-0.03041457012295723,
-0.010244072414934635,
0.03928879648447037,
-0.032856471836566925,
0.028409432619810104,
-0.008923857472836971,
-0.04931448772549629,
-0.00876503437757492,
0.0305336881428957,
-0.011018333025276661,
-0.001089425291866064,
-0.052292414009571075,
-0.038415271788835526,
0.08504962176084518,
-0.005702732130885124,
0.041810110211372375,
-0.057970330119132996,
-0.01561426930129528,
0.05943944305181503,
0.004332885146141052,
-0.07198644429445267,
-0.03732336312532425,
-0.039705704897642136,
0.023366808891296387,
0.008224043995141983,
0.012953986413776875,
-0.028210904449224472,
0.01074039377272129,
-0.0016763253370299935,
-0.014988903887569904,
-0.04431156814098358,
-0.04145275801420212,
0.05360270291566849,
-0.01968410424888134,
0.004657975863665342,
0.011594066396355629,
0.042048342525959015,
0.013946629129350185,
-0.026027090847492218,
0.08314374834299088,
-0.01715286448597908,
-0.012537077069282532,
0.06829381734132767,
-0.03553660586476326,
-0.06182178482413292,
0.060868848115205765,
-0.0050922567024827,
-0.006208979990333319,
-0.05133947730064392,
0.023366808891296387,
-0.05110124498605728,
0.00919187068939209,
0.0010155974887311459,
-0.02906457707285881,
-0.06495853513479233,
-0.009628633968532085,
0.05626298487186432,
0.005955855827778578,
0.07512319833040237,
0.02092490717768669,
0.03293588384985924,
0.020388880744576454,
-0.06182178482413292,
0.00870547629892826,
0.011623845435678959,
0.0005577410920523107,
0.023605043068528175,
0.05777180194854736,
0.007896472699940205,
0.008238933980464935,
0.10387013107538223,
0.014026041142642498,
-0.056421808898448944,
0.014591846615076065,
0.045502740889787674,
0.005305674858391285,
0.032677795737981796,
0.035814546048641205,
-0.06992174685001373,
-0.007941140793263912,
0.008650880306959152,
-0.029600603505969048,
-0.014859860762953758,
0.03811747953295708,
-0.022195490077137947,
-0.0016539908247068524,
0.012338547967374325,
-0.004908618051558733,
0.007886545732617378,
0.06535559147596359,
0.020706525072455406,
-0.01039296854287386,
-0.05900267884135246,
0.007022946607321501,
-0.0014294054126366973,
0.019604692235589027,
0.00018332869512960315,
-0.029521193355321884,
0.019416090101003647,
0.01634882390499115,
0.0642041265964508,
0.021917549893260002,
0.013748100958764553,
0.04609832540154457,
-0.0015857466496527195,
0.005911186803132296,
0.02201681397855282,
0.04184981435537338,
0.02449842169880867,
0.014552141539752483,
0.04677332192659378,
-0.0013921813806518912,
0.031129274517297745,
0.028151346370577812,
-0.003573513589799404,
-0.017669038847088814,
0.03664836660027504,
0.017192570492625237,
0.0015348737360909581,
-0.016239633783698082,
-0.06618941575288773,
-0.006208979990333319,
0.04224687069654465,
0.04252481088042259,
0.02110358327627182,
0.00764831155538559,
0.036926306784152985
]
|
41,341 | pyglove.core.typing.class_schema | extend | Extend current schema based on a base schema. | def extend(self, base: 'Schema') -> 'Schema':
"""Extend current schema based on a base schema."""
def _merge_field(
path,
parent_field: Field,
child_field: Field) -> Field:
"""Merge function on field with the same key."""
if parent_field != object_utils.MISSING_VALUE:
if object_utils.MISSING_VALUE == child_field:
if (not self._allow_nonconst_keys and not parent_field.key.is_const):
hints = object_utils.kvlist_str([
('base', object_utils.quote_if_str(base.name), None),
('path', path, None)
])
raise ValueError(
f'Non-const key {parent_field.key} is not allowed to be '
f'added to the schema. ({hints})')
return copy.deepcopy(parent_field)
else:
try:
child_field.extend(parent_field)
except Exception as e: # pylint: disable=broad-except
hints = object_utils.kvlist_str([
('base', object_utils.quote_if_str(base.name), None),
('path', path, None)
])
raise e.__class__(f'{e} ({hints})').with_traceback(
sys.exc_info()[2])
return child_field
self._fields = object_utils.merge([base.fields, self.fields], _merge_field)
self._metadata = object_utils.merge([base.metadata, self.metadata])
# Inherit dynamic field from base if it's not present in the child.
if self._dynamic_field is None:
for k, f in self._fields.items():
if not k.is_const:
self._dynamic_field = f
break
return self
| (self, base: pyglove.core.typing.class_schema.Schema) -> pyglove.core.typing.class_schema.Schema | [
-0.01775018498301506,
-0.05547158420085907,
-0.0233298446983099,
0.09368052333593369,
-0.017154298722743988,
-0.00028891448164358735,
0.02134355902671814,
-0.02435910329222679,
-0.010075893253087997,
-0.029324820265173912,
0.01865304261445999,
-0.014039438217878342,
0.04232597351074219,
0.03741442784667015,
-0.008933777920901775,
0.0073357196524739265,
0.01852664165198803,
0.05182403698563576,
-0.0012436866527423263,
-0.03333351016044617,
0.006739833392202854,
-0.024828588590025902,
-0.011213493533432484,
0.019989270716905594,
0.004888975061476231,
0.08819115161895752,
-0.009182063862681389,
0.011800351552665234,
0.0399424284696579,
-0.02137967199087143,
-0.037775568664073944,
-0.02607453241944313,
0.03640322759747505,
-0.0008735149167478085,
0.024828588590025902,
-0.10928190499544144,
-0.023618759587407112,
0.058541297912597656,
-0.05774678289890289,
0.06168324500322342,
0.05879409983754158,
-0.0016793154645711184,
-0.05796347185969353,
-0.05731341242790222,
0.06691981852054596,
0.04842929169535637,
0.02661624737083912,
0.047237519174814224,
-0.011267664842307568,
-0.013885952532291412,
0.02591201849281788,
-0.010960693471133709,
-0.012351094745099545,
-0.014039438217878342,
-0.02661624737083912,
-0.0020325586665421724,
-0.03643934056162834,
0.023402074351906776,
-0.0520046092569828,
0.0479959212243557,
-0.010744007304310799,
-0.023871559649705887,
-0.04163980111479759,
-0.01821064203977585,
-0.021361615508794785,
-0.005769261159002781,
-0.0718313679099083,
-0.06973673403263092,
-0.014716582372784615,
0.0005510253831744194,
-0.04507065936923027,
-0.03591568395495415,
-0.021253272891044617,
0.014888124540448189,
0.020386528223752975,
0.03154585137963295,
0.045720718801021576,
-0.039111800491809845,
0.03616848215460777,
-0.07959594577550888,
0.06977284699678421,
-0.01926698535680771,
-0.06468073278665543,
-0.008225034922361374,
0.05883021280169487,
0.04543180391192436,
-0.0473097488284111,
-0.01473463885486126,
0.024828588590025902,
-0.020151786506175995,
0.009024064056575298,
-0.00938069261610508,
0.002354201627895236,
0.05958861485123634,
0.0446372888982296,
-0.03950905799865723,
-0.053810324519872665,
-0.03385716676712036,
-0.0070061762817204,
0.028331678360700607,
-0.018165498971939087,
-0.03123888000845909,
-0.02446744590997696,
0.0035753168631345034,
0.042903803288936615,
-0.011845494620501995,
0.010428007692098618,
-0.03660185635089874,
0.0014671438839286566,
-0.036692142486572266,
-0.02470218949019909,
-0.018905842676758766,
-0.021361615508794785,
0.048609863966703415,
-0.016946639865636826,
0.020224014297127724,
0.043842773884534836,
0.049621064215898514,
0.06323616206645966,
0.004744517616927624,
0.004166688770055771,
0.04185648635029793,
-0.00520948925986886,
-0.022264473140239716,
0.08819115161895752,
-0.024088246747851372,
0.023979902267456055,
0.024503560736775398,
0.01352480985224247,
0.0027085733599960804,
-0.041531458497047424,
0.03459751233458519,
-0.03947294130921364,
-0.07504554092884064,
-0.015484010800719261,
-0.02459384687244892,
0.05449649691581726,
0.024882759898900986,
-0.05753009766340256,
-0.032936252653598785,
-0.013642181642353535,
-0.018282869830727577,
0.07497330754995346,
-0.043842773884534836,
-0.08335182815790176,
0.005317832343280315,
0.0029004306998103857,
-0.004676803480833769,
-0.05128232389688492,
0.027374647557735443,
-0.064752958714962,
0.012910866178572178,
-0.008355949074029922,
0.01626046933233738,
-0.019682299345731735,
0.008437206037342548,
-0.04792369157075882,
-0.004042545799165964,
0.012342065572738647,
-0.006929433438926935,
0.011655894108116627,
-0.0057737757451832294,
0.002586687682196498,
-0.03143750876188278,
-0.028584478422999382,
0.04073694348335266,
0.0033766881097108126,
-0.09577515721321106,
0.0057466896250844,
-0.003717517014592886,
0.029180364683270454,
-0.017091097310185432,
0.06998953968286514,
0.019754528999328613,
0.0017447726568207145,
0.044853974133729935,
0.004870917648077011,
-0.022643674165010452,
0.0030065164901316166,
0.04467340186238289,
0.0483209490776062,
-0.007900006137788296,
0.05774678289890289,
-0.01654035411775112,
0.014373496174812317,
-0.020856015384197235,
-0.016314640641212463,
0.042000945657491684,
0.06554747372865677,
0.045287348330020905,
0.03510311245918274,
0.0038348885718733072,
-0.007331205066293478,
-0.029342878609895706,
-0.018851671367883682,
-0.018264813348650932,
0.00867646373808384,
-0.005674461368471384,
-0.023799331858754158,
0.07338428497314453,
-0.06381399184465408,
-0.03421831130981445,
0.007100976537913084,
-0.007597548421472311,
0.026796819642186165,
0.01065372209995985,
-0.004396917298436165,
-0.047743119299411774,
-0.057168956845998764,
-0.013389380648732185,
0.004721946083009243,
-0.007268005050718784,
-0.005557089578360319,
-0.03425442427396774,
-0.024810532107949257,
-0.050054434686899185,
-0.03741442784667015,
-0.026327332481741905,
-0.014517953619360924,
0.04608186334371567,
0.046262431889772415,
-0.02623704820871353,
0.027844134718179703,
-0.005006346385926008,
0.037703342735767365,
-0.015348582528531551,
0.012829609215259552,
-0.060527585446834564,
-0.0018057156121358275,
-0.021668586879968643,
-0.0015145438956096768,
-0.013551895506680012,
-0.06114152818918228,
0.008829949423670769,
0.018580812960863113,
0.07764577120542526,
0.01973647065460682,
-0.0068797762505710125,
0.07172302156686783,
0.0025573447346687317,
0.004437546245753765,
0.045359574258327484,
-0.01865304261445999,
-0.030751336365938187,
-0.06283890455961227,
-0.04308437556028366,
0.015312467701733112,
-0.018743326887488365,
0.036962997168302536,
0.007800691295415163,
0.007100976537913084,
-0.02771773375570774,
0.010193264111876488,
0.031527794897556305,
-0.018851671367883682,
0.02540641836822033,
-0.027103791013360023,
-0.025586990639567375,
-0.018580812960863113,
-0.049621064215898514,
0.029776249080896378,
-0.02462995983660221,
-0.017154298722743988,
0.030931908637285233,
-0.029884593561291695,
-0.04889877885580063,
0.02899979241192341,
-0.018400242552161217,
0.0038303742185235023,
-0.012883780524134636,
-0.04637077450752258,
0.026525961235165596,
0.006789490580558777,
-0.012089265510439873,
-0.008906692266464233,
0.008829949423670769,
-0.04749032109975815,
0.05561603978276253,
0.047670889645814896,
-0.036764368414878845,
-0.015511096455156803,
-0.03255705162882805,
0.02083795703947544,
-0.014536010101437569,
0.019285041838884354,
0.005173375364392996,
-0.05958861485123634,
-0.057168956845998764,
-0.08551868796348572,
-0.043842773884534836,
0.016287554055452347,
0.016287554055452347,
-0.005421660840511322,
0.06218884512782097,
-0.03300848230719566,
0.005105660762637854,
0.013551895506680012,
0.015140925534069538,
0.013687323778867722,
-0.005092117935419083,
0.014707553200423717,
0.041459228843450546,
0.04470951855182648,
0.05734952539205551,
-0.021867215633392334,
-0.0909358337521553,
0.03663796931505203,
-0.03741442784667015,
0.03997854143381119,
0.016007669270038605,
-0.06829216331243515,
0.06265833228826523,
-0.014274181798100471,
0.024991104379296303,
0.015646524727344513,
-0.030931908637285233,
-0.022192245349287987,
0.03611431270837784,
-0.02318538725376129,
0.016088925302028656,
-0.01689246855676174,
0.009958521462976933,
-0.012531666085124016,
0.00487543223425746,
-0.053340837359428406,
-0.019790641963481903,
0.045359574258327484,
0.013831781223416328,
0.0043201744556427,
-0.01043703593313694,
-0.006924919318407774,
0.0013836295111104846,
0.030390193685889244,
0.02829556353390217,
-0.08335182815790176,
-0.027645505964756012,
0.01637784019112587,
-0.09086360782384872,
0.013353266753256321,
0.013452581129968166,
-0.0024828589521348476,
0.04868209362030029,
0.030245736241340637,
-0.06334450095891953,
0.002085601445287466,
-0.09859207272529602,
0.064752958714962,
-0.009240749292075634,
0.020278185606002808,
-0.01514995377510786,
-0.026869047433137894,
-0.07620120048522949,
-0.036294884979724884,
-0.06031090021133423,
0.016982754692435265,
-0.06124987080693245,
-0.08566314727067947,
-0.020187899470329285,
0.035355910658836365,
0.008301777765154839,
0.033839110285043716,
0.01374149601906538,
-0.009886292740702629,
0.06486130505800247,
0.002294387435540557,
0.013037266209721565,
-0.06818381696939468,
0.02302287332713604,
-0.020350415259599686,
-0.028710877522826195,
0.03261122480034828,
-0.027464933693408966,
0.04030357301235199,
-0.016603555530309677,
0.015366639941930771,
-0.001714301179163158,
-0.024738304316997528,
0.03748665377497673,
-0.039147913455963135,
0.002688259119167924,
0.059985872358083725,
0.033477965742349625,
-0.06641422212123871,
-0.033225167542696,
-0.01456309575587511,
-0.013055323623120785,
0.049621064215898514,
-0.03228619322180748,
0.0025144589599221945,
0.044312261044979095,
-0.006848176475614309,
0.01993509940803051,
-0.013217838481068611,
-0.001177100813947618,
-0.03698105365037918,
-0.020061500370502472,
-0.023275673389434814,
-0.04889877885580063,
0.022842302918434143,
-0.010753036476671696,
0.025261960923671722,
-0.022426987066864967,
0.04842929169535637,
0.028837278485298157,
0.014310295693576336,
-0.05962472781538963,
0.05323249474167824,
0.020946301519870758,
0.0026498876977711916,
0.04702083393931389,
-0.016982754692435265,
-0.0013475152663886547,
-0.04286768659949303,
0.053268611431121826,
0.012441379949450493,
-0.07295090705156326,
0.08573537319898605,
-0.023402074351906776,
-0.02728436328470707,
0.08746886253356934,
0.006789490580558777,
0.01633269712328911,
-0.06702816486358643,
0.012224694713950157,
-0.043337173759937286,
-0.03358630836009979,
-0.0667753592133522,
-0.0031916021835058928,
-0.02798859216272831,
0.005805375520139933,
0.015863211825489998,
0.05214906483888626,
-0.00469937501475215,
-0.037703342735767365,
0.002043844433501363,
-0.05561603978276253,
0.05110175162553787,
-0.02329373173415661,
-0.00206754426471889,
0.007435034029185772,
0.04456505924463272,
-0.015646524727344513,
-0.0052636610344052315,
-0.039653513580560684,
0.02607453241944313,
0.016116011887788773,
-0.020530985668301582,
0.06984508037567139,
-0.021126871928572655,
0.008920234628021717,
0.03842562809586525,
0.0008498149109072983,
0.04424003139138222,
0.026218989863991737,
-0.04918769374489784,
-0.056229982525110245,
0.0483209490776062,
-0.060888729989528656,
0.007150633726269007,
0.02697739005088806,
-0.027067676186561584,
0.03730608522891998,
-0.017154298722743988,
-0.01221566554158926,
-0.026056475937366486,
0.01567361131310463,
0.022770073264837265,
-0.030155450105667114,
0.013696352951228619,
0.03799225762486458,
0.04405945912003517,
-0.003762659849599004,
-0.01065372209995985,
-0.04033968597650528,
0.05059615150094032,
-0.0045774891041219234,
0.03781168535351753,
-0.03584345430135727,
0.010581493377685547,
-0.03452528268098831,
0.04503454640507698,
-0.014490867964923382,
-0.037269968539476395,
-0.053846437484025955,
0.08956349641084671,
-0.013262980617582798,
-0.013199781067669392,
0.00047202533460222185,
-0.007832291536033154,
0.054857637733221054,
0.015601382590830326,
0.06977284699678421,
-0.006812062114477158,
0.04940437898039818,
0.01102389395236969,
-0.029559563845396042,
0.008279206231236458,
0.009064692072570324,
0.09815870225429535,
0.006198118906468153,
0.01188160851597786,
-0.05232963711023331,
-0.051462892442941666,
0.05030723661184311,
-0.028331678360700607,
0.005985947325825691,
-0.032575108110904694,
0.03356825187802315,
0.030119335278868675,
-0.008983435109257698,
-0.038245055824518204,
0.039184026420116425,
0.05186014994978905,
0.010211321525275707,
-0.003137430874630809,
-0.05247409641742706,
0.001826029852963984,
0.05994975566864014,
0.04557625949382782,
-0.0352475680410862,
-0.007809720002114773,
-0.015926411375403404,
-0.03940071538090706,
-0.03784779831767082,
-0.02782607637345791,
0.02889144979417324,
-0.027374647557735443,
-0.03217785060405731,
0.0075659481808543205,
0.026435676962137222,
0.02342013083398342,
-0.005733146797865629,
0.0075659481808543205,
-0.03781168535351753,
-0.007782634347677231,
0.09173034876585007,
0.010987779125571251,
0.014147781766951084,
-0.030155450105667114,
-0.04420391842722893,
0.03950905799865723,
0.031527794897556305,
0.022842302918434143,
0.01151143666356802,
-0.02630927599966526,
0.05684392526745796,
-0.025695333257317543,
0.01840927079319954,
0.03185282275080681,
-0.040086887776851654,
-0.03432665392756462,
0.035861510783433914,
0.032773736864328384,
0.0671365037560463,
-0.008703549392521381,
-0.0724814236164093,
-0.007665262557566166,
-0.01278446614742279,
0.04420391842722893,
0.01806618459522724,
0.02685099095106125,
0.009254292584955692,
0.03266539424657822,
0.0399424284696579,
-0.026887105777859688,
0.007710405625402927,
-0.04976551979780197,
0.05691615492105484,
-0.03631294146180153,
0.04019523039460182,
-0.027338534593582153,
0.053268611431121826,
-0.009281378239393234,
-0.043951116502285004,
0.025460589677095413,
0.02822333388030529,
-0.08884120732545853,
0.06301947683095932,
-0.04514288902282715,
-0.02426881715655327,
-0.047598663717508316,
-0.020061500370502472,
0.04348163306713104,
0.008414634503424168,
0.031527794897556305,
-0.01923087053000927,
-0.00487543223425746,
0.04976551979780197,
0.0459735170006752,
0.008726120926439762,
-0.07865697145462036,
0.025496704503893852,
0.004685831721872091,
-0.04842929169535637,
0.012540694326162338,
0.03671019896864891,
-0.087252177298069,
-0.03631294146180153,
0.007195776794105768,
-0.0677865594625473,
-0.029072020202875137,
0.012730294838547707,
-0.004076403100043535,
0.013588009402155876,
-0.034723911434412,
-0.012919895350933075,
0.05362975224852562,
0.0016612582840025425,
0.015222182497382164,
-0.002127358689904213,
0.018129384145140648,
0.010021721944212914,
-0.0052907466888427734,
-0.027176018804311752,
0.01114126481115818,
-0.0365837961435318,
-0.07110907882452011,
0.0023903159890323877,
0.060419242829084396,
-0.0798848569393158,
-0.0399424284696579,
0.03687271103262901,
0.008829949423670769,
0.016991782933473587,
-0.06251387298107147,
0.09368052333593369,
0.003216430777683854,
0.007119033485651016,
-0.010012692771852016,
-0.01739807054400444,
0.013913038186728954,
-0.048104263842105865,
-0.023835444822907448,
-0.006288404576480389,
0.022535329684615135,
-0.007502748165279627,
0.018707213923335075,
-0.02685099095106125,
0.020025385543704033,
0.08732440322637558,
0.040014658123254776,
-0.031329166144132614,
0.012576809152960777,
-0.0028756021056324244,
-0.03667408227920532,
0.028006648644804955,
0.0009762150002643466,
-0.05561603978276253,
-0.037703342735767365,
0.024774417281150818,
-0.013804695568978786,
0.018634984269738197,
-0.015980582684278488,
-0.01571875438094139,
0.08234062790870667,
0.006979090627282858,
0.03266539424657822,
-0.033225167542696,
0.04420391842722893,
0.024142418056726456,
0.02258950285613537,
-0.043806660920381546,
0.03737831115722656,
-0.008261148817837238,
0.021686643362045288,
0.018598871305584908,
0.03170836716890335,
-0.04322883114218712,
0.04608186334371567,
0.04257877171039581,
-0.0013983009848743677,
-0.007850348949432373,
-0.01495132502168417,
0.016368811950087547,
-0.008568120189011097,
-0.02204778790473938,
0.007615605369210243,
0.03057076409459114,
0.013109494931995869,
-0.024738304316997528,
0.10978750884532928,
-0.03752277046442032,
0.013597038574516773,
0.026905162259936333,
-0.0007606577128171921,
-0.0035301740281283855,
0.02255338802933693,
0.03477808088064194,
-0.054713182151317596,
-0.022932587191462517,
0.010274522006511688,
-0.033748824149370193,
-0.000996529241092503,
-0.008662920445203781,
-0.03454333916306496,
-0.039581283926963806,
0.031329166144132614,
-0.014996468089520931,
-0.023474302142858505,
0.0194656141102314,
0.0320514515042305,
0.02748299203813076,
-0.025948133319616318,
-0.0066360048949718475,
0.05399089679121971,
0.04182037338614464,
0.009958521462976933,
-0.0011534008663147688,
0.028584478422999382,
0.01295600924640894,
0.004934117663651705,
0.0600581020116806,
-0.019682299345731735,
-0.06865330785512924,
0.05182403698563576,
0.027176018804311752,
0.026796819642186165,
0.01844538375735283,
-0.009236235171556473,
0.024882759898900986,
-0.017488354817032814,
-0.002061901381239295,
0.0684366226196289,
0.011032922193408012,
-0.003629488404840231,
-0.010057835839688778,
-0.011240579187870026,
-0.024088246747851372,
-0.006857204716652632,
0.03950905799865723,
0.03248482197523117,
0.054749295115470886,
-0.0017492870101705194,
0.04644300416111946,
0.037667226046323776,
0.0029952307231724262,
-0.02732047624886036,
0.015384696424007416,
-0.03737831115722656,
0.008884120732545853,
0.008428177796304226,
-0.007561434060335159,
-0.0010693222284317017,
0.00898794922977686,
-0.013569952920079231,
-0.014111666940152645,
0.03875065594911575,
-0.0030968021601438522,
-0.03979797288775444,
0.07706794142723083,
-0.007209319621324539,
0.03752277046442032,
-0.015050639398396015,
0.014183895662426949,
-0.007331205066293478,
0.018905842676758766,
-0.018427327275276184,
-0.016269497573375702,
0.015077725052833557,
-0.042434316128492355,
0.0029929736629128456,
-0.054713182151317596,
0.021758873015642166,
0.056229982525110245,
0.03463362529873848,
0.027428818866610527,
0.027609391137957573,
0.01856275647878647
]
|
41,342 | pyglove.core.typing.class_schema | format | Format current Schema into nicely printed string. | def format(
self,
compact: bool = False,
verbose: bool = True,
root_indent: int = 0,
cls_name: Optional[str] = None,
bracket_type: object_utils.BracketType = object_utils.BracketType.ROUND,
**kwargs) -> str:
"""Format current Schema into nicely printed string."""
if cls_name is None:
cls_name = 'Schema'
def _indent(text, indent):
return ' ' * 2 * indent + text
def _format_child(child):
return child.format(
compact=compact,
verbose=verbose,
root_indent=root_indent + 1,
**kwargs)
open_bracket, close_bracket = object_utils.bracket_chars(bracket_type)
if compact:
s = [f'{cls_name}{open_bracket}']
s.append(', '.join([
f'{f.key}={_format_child(f.value)}'
for f in self.fields.values()
]))
s.append(close_bracket)
else:
s = [f'{cls_name}{open_bracket}\n']
last_field_show_description = False
for i, f in enumerate(self.fields.values()):
this_field_show_description = verbose and f.description
if i != 0:
s.append(',\n')
if last_field_show_description or this_field_show_description:
s.append('\n')
if this_field_show_description:
s.append(_indent(f'# {f.description}\n', root_indent + 1))
last_field_show_description = this_field_show_description
s.append(
_indent(f'{f.key} = {_format_child(f.value)}', root_indent + 1))
s.append('\n')
s.append(_indent(close_bracket, root_indent))
return ''.join(s)
| (self, compact: bool = False, verbose: bool = True, root_indent: int = 0, cls_name: Optional[str] = None, bracket_type: pyglove.core.object_utils.formatting.BracketType = <BracketType.ROUND: 0>, **kwargs) -> str | [
0.03932996466755867,
0.016372615471482277,
0.045361511409282684,
-0.0359751433134079,
0.04418375343084335,
-0.06599011272192001,
-0.010171542875468731,
-0.10064474493265152,
0.01995049975812435,
0.006223378237336874,
-0.026695840060710907,
-0.011117317713797092,
-0.0014822346856817603,
-0.02189558558166027,
0.0216636024415493,
0.04743150994181633,
-0.011991714127361774,
-0.08722544461488724,
0.05778150260448456,
0.05638960748910904,
0.0866544097661972,
0.021752826869487762,
0.011848955415189266,
0.020360931754112244,
0.04768133908510208,
0.013758350163698196,
0.008177385665476322,
0.025589460507035255,
-0.020128948614001274,
-0.01729162223637104,
0.008654734119772911,
0.03997237980365753,
0.009975249879062176,
0.02041446603834629,
-0.005357904825359583,
-0.0387946218252182,
-0.024786444380879402,
0.0021335703786462545,
-0.012357532978057861,
-0.005866481922566891,
0.0022685218136757612,
0.026071270927786827,
-0.09950267523527145,
-0.046860478818416595,
0.022680755704641342,
0.022537998855113983,
0.08558371663093567,
0.028926441445946693,
-0.058530982583761215,
-0.047717027366161346,
0.03495798632502556,
0.0022997502237558365,
-0.040150828659534454,
-0.02062860317528248,
-0.0370815210044384,
-0.06927356123924255,
0.006241223309189081,
-0.003073768923059106,
0.05014392361044884,
-0.028997819870710373,
-0.03825927898287773,
0.06367029249668121,
0.024893512949347496,
0.03808083012700081,
-0.06127908453345299,
-0.018986880779266357,
-0.0319957472383976,
-0.029158422723412514,
-0.023430239409208298,
-0.002848478266969323,
-0.004670879803597927,
0.00012735339987557381,
0.005514047108590603,
0.010528439655900002,
-0.0065312013030052185,
-0.01144744735211134,
-0.022216791287064552,
-0.06666821986436844,
-0.009511284530162811,
-0.05342736840248108,
-0.030960749834775925,
-0.019807741045951843,
-0.04978702589869499,
-0.036724623292684555,
0.060172706842422485,
0.01105486135929823,
0.03747410699725151,
0.02118179202079773,
-0.01955791376531124,
0.043648410588502884,
0.002078920602798462,
0.0022049497347325087,
-0.005081310402601957,
0.05753167346119881,
-0.0712364912033081,
-0.026035580784082413,
-0.02094980888068676,
-0.0856551006436348,
0.004688724409788847,
0.061957187950611115,
0.02610696107149124,
-0.03606436401605606,
-0.018326621502637863,
0.01234860997647047,
-0.005607732106000185,
-0.011295766569674015,
-0.036653243005275726,
0.016149554401636124,
0.021931273862719536,
-0.004289446864277124,
-0.0048180995509028435,
-0.04860926792025566,
0.009029475040733814,
-0.02849816530942917,
0.06038684397935867,
-0.003236602758988738,
0.03551117703318596,
0.04122151806950569,
0.026267563924193382,
-0.08058717101812363,
0.014980720356106758,
-0.02828402817249298,
0.018264165148139,
0.0005027218139730394,
-0.026142649352550507,
0.018879812210798264,
0.006125231739133596,
0.02548239193856716,
0.012732273899018764,
0.0013350150547921658,
-0.013062402606010437,
0.016890114173293114,
-0.030550317838788033,
-0.011402835138142109,
0.0839419960975647,
0.037581175565719604,
0.03872324153780937,
-0.007405597250908613,
-0.07141494005918503,
0.07259269803762436,
-0.0002983429585583508,
0.001743215136229992,
-0.025910668075084686,
-0.005438206717371941,
-0.06816717982292175,
-0.02976514771580696,
0.01664028689265251,
0.016497528180480003,
-0.015748046338558197,
0.0100020170211792,
0.005821870174258947,
-0.005937861278653145,
0.0775892436504364,
0.014668435789644718,
0.010965636931359768,
0.019986189901828766,
-0.03993669152259827,
-0.048573579639196396,
0.06656114757061005,
-0.02726687304675579,
-0.029033510014414787,
0.013910030946135521,
0.009591586887836456,
-0.008025703951716423,
0.026624459773302078,
0.026909977197647095,
-0.03775962442159653,
-0.05060788616538048,
-0.020307395607233047,
0.003236602758988738,
0.0428275503218174,
-0.018986880779266357,
-0.03262031823396683,
0.06666821986436844,
-0.024732910096645355,
0.05435529723763466,
0.020057568326592445,
0.008248764090240002,
0.0025919589679688215,
-0.05774581432342529,
0.023251790553331375,
-0.015462529845535755,
0.03154962882399559,
0.0035020443610846996,
0.011063783429563046,
-0.033066436648368835,
-0.00706654554232955,
-0.020360931754112244,
0.05988718941807747,
0.019825587049126625,
0.021610068157315254,
0.010965636931359768,
-0.023233946412801743,
0.009207922965288162,
0.03460109233856201,
-0.018576448783278465,
0.03342333436012268,
-0.02912273444235325,
0.041471343487501144,
-0.005076848901808262,
0.001120319589972496,
0.04011513665318489,
0.008239842019975185,
-0.06549046188592911,
0.042327895760536194,
0.009234690107405186,
0.029194112867116928,
-0.0610649473965168,
-0.03661755472421646,
-0.019879121333360672,
0.03137117996811867,
-0.020146792754530907,
-0.018969034776091576,
-0.04018651694059372,
0.024251099675893784,
-0.05863805487751961,
0.08644027262926102,
-0.022930582985281944,
-0.012687661685049534,
0.03324488550424576,
0.03636772930622101,
-0.05428392067551613,
-0.016863347962498665,
0.019272398203611374,
-0.04718168452382088,
-0.013178394176065922,
0.010849646292626858,
-0.0456470288336277,
-0.01659567467868328,
-0.052856333553791046,
-0.0072717610746622086,
-0.03372669592499733,
-0.053248919546604156,
0.007320834323763847,
-0.06688235700130463,
0.039686862379312515,
0.003899091389030218,
-0.00149004184640944,
0.014079556800425053,
-0.039686862379312515,
0.018041105940937996,
-0.005487279966473579,
-0.011028094217181206,
-0.02937256172299385,
-0.03897307068109512,
-0.06945201009511948,
-0.0006758722593076527,
-0.04461203143000603,
0.01409740187227726,
0.009413138031959534,
-0.05125030130147934,
-0.006593658123165369,
0.05435529723763466,
0.020896274596452713,
-0.009457750245928764,
-0.006125231739133596,
-0.058923568576574326,
0.02094980888068676,
-0.002525040879845619,
-0.0023153643123805523,
-0.04154272377490997,
-0.050822027027606964,
0.0022997502237558365,
0.0451473742723465,
0.07559062540531158,
-0.030710922554135323,
0.012883954681456089,
-0.038366347551345825,
0.03085368126630783,
0.009546974673867226,
0.03163885325193405,
0.04618237540125847,
-0.013115936890244484,
0.012910721823573112,
-0.037117209285497665,
-0.03686738386750221,
-0.0112600764259696,
-0.005576503928750753,
0.0034217427019029856,
-0.04471909999847412,
-0.014962875284254551,
-0.05257081612944603,
0.008101544342935085,
-0.0070799291133880615,
0.09279302507638931,
0.01634584739804268,
-0.01907610520720482,
-0.03419066220521927,
-0.009591586887836456,
0.03622496873140335,
0.04803823307156563,
0.01640830561518669,
0.023341014981269836,
-0.015159168280661106,
0.0319422148168087,
-0.03153178468346596,
-0.00791863538324833,
0.011188697069883347,
-0.02532178908586502,
-0.04432651400566101,
-0.025054115802049637,
-0.01304455753415823,
0.0947202667593956,
0.04418375343084335,
0.008552126586437225,
-0.008538742549717426,
-0.043434273451566696,
-0.041078757494688034,
0.04297030717134476,
0.02764161489903927,
-0.07380614429712296,
0.047253064811229706,
0.005054543260484934,
0.060708049684762955,
-0.037509795278310776,
0.05903064087033272,
-0.019272398203611374,
-0.0231268759816885,
0.009368526749312878,
0.02328748069703579,
-0.0007400020840577781,
0.0025027350056916475,
-0.007218226790428162,
0.011857877485454082,
0.006660575978457928,
-0.057067710906267166,
-0.03178161010146141,
-0.017273778095841408,
0.024893512949347496,
-0.01640830561518669,
0.016881192103028297,
-0.04207806661725044,
-0.004760103765875101,
0.03545764088630676,
-0.031264111399650574,
-0.02594635635614395,
0.015462529845535755,
-0.08886716514825821,
-0.037973761558532715,
-0.008226458914577961,
0.07330648601055145,
0.03840203583240509,
0.025179030373692513,
-0.05117892101407051,
-0.06545477360486984,
-0.03783100098371506,
0.017657442018389702,
-0.025874977931380272,
-0.010171542875468731,
0.01803218200802803,
-0.040936000645160675,
-0.06331339478492737,
0.007316372822970152,
0.013910030946135521,
-0.027373941615223885,
-0.06798873841762543,
0.006999627687036991,
0.0043608262203633785,
-0.014632745645940304,
0.021931273862719536,
-0.004534813109785318,
0.040543414652347565,
0.028997819870710373,
0.02143161930143833,
0.04707461595535278,
-0.017023950815200806,
-0.02118179202079773,
-0.0067765675485134125,
0.0231268759816885,
0.014365074224770069,
-0.01039460301399231,
-0.011117317713797092,
0.012179084122180939,
-0.09115130454301834,
-0.03326272964477539,
0.06634701043367386,
0.011340377852320671,
0.021859895437955856,
-0.04932305961847305,
-0.0758761391043663,
0.059780120849609375,
-0.0004107095010112971,
0.014784427359700203,
-0.011732963845133781,
-0.043113067746162415,
-0.005295448005199432,
-0.007343140430748463,
0.029229803010821342,
-0.007218226790428162,
0.03005066327750683,
-0.042185135185718536,
0.006781028583645821,
-0.01417770329862833,
0.0018904347671195865,
-0.008480747230350971,
0.05367719382047653,
-0.016604598611593246,
-0.051749955862760544,
-0.028783682733774185,
0.01121546421200037,
-0.008931328542530537,
-0.0900806114077568,
0.023929893970489502,
-0.011242231354117393,
0.033066436648368835,
-0.043898239731788635,
0.06124339625239372,
0.0030782301910221577,
-0.01986127533018589,
0.09793233126401901,
0.05000116303563118,
-0.0019183172844350338,
-0.029229803010821342,
0.04157841205596924,
0.052535127848386765,
-0.021770671010017395,
0.0040128519758582115,
0.02890859544277191,
-0.03947272524237633,
0.04414806514978409,
-0.002973391907289624,
0.04960857704281807,
0.022002654150128365,
0.04072186350822449,
-0.004463433753699064,
-0.034779537469148636,
-0.03965117409825325,
0.022288169711828232,
0.040222205221652985,
0.013035635463893414,
0.003488660790026188,
0.04154272377490997,
0.04125720635056496,
-0.008846566081047058,
-0.03272738680243492,
-0.04432651400566101,
0.0370815210044384,
-0.014641668647527695,
0.021610068157315254,
0.05724615603685379,
0.08387061953544617,
-0.04596823826432228,
-0.011001327075064182,
-0.0400080680847168,
-0.04032927751541138,
0.056889262050390244,
-0.0071825371123850346,
0.02546454779803753,
-0.020682137459516525,
0.0400080680847168,
0.035939451307058334,
0.0359751433134079,
0.007173614576458931,
0.010234000161290169,
-0.013196238316595554,
-0.03872324153780937,
0.0060181631706655025,
-0.04150703176856041,
-0.024179721251130104,
0.0013963566161692142,
-0.021770671010017395,
0.0035957295913249254,
0.03683169186115265,
0.0319957472383976,
-0.028016354888677597,
-0.05649667605757713,
-0.011661584489047527,
0.02400127239525318,
-0.014811194501817226,
-0.02835540659725666,
0.012598437257111073,
-0.010653353296220303,
-0.0005032794433645904,
0.07594752311706543,
0.05228529870510101,
0.023697910830378532,
-0.011322533711791039,
-0.041078757494688034,
-0.06481235474348068,
-0.05392702296376228,
0.003809867426753044,
-0.0208070520311594,
-0.03474384918808937,
-0.049037545919418335,
0.05817408859729767,
0.028087735176086426,
0.0233767032623291,
0.01386541873216629,
0.00539359450340271,
-0.0023867436684668064,
-0.015560676343739033,
0.0696304589509964,
-0.021538687869906425,
0.024251099675893784,
0.006977321580052376,
-0.006615964230149984,
-0.007289605680853128,
-0.020253861322999,
-0.0473601333796978,
0.015194857493042946,
0.049572888761758804,
-0.016372615471482277,
-0.03761686384677887,
-0.014356151223182678,
0.016328003257513046,
-0.01051951665431261,
0.003769716713577509,
0.06441976875066757,
0.05810270830988884,
-0.042113758623600006,
-0.04040065407752991,
-0.05539029836654663,
0.027320407330989838,
0.034065745770931244,
-0.03900875896215439,
-0.01523054763674736,
-0.013026713393628597,
0.014579211361706257,
0.07409165799617767,
0.009359603747725487,
-0.0714506283402443,
0.040079448372125626,
-0.06127908453345299,
0.03044324927031994,
-0.03247755765914917,
0.05000116303563118,
0.0376882441341877,
-0.023465927690267563,
0.0034262039698660374,
0.00157257413957268,
0.04418375343084335,
0.027516700327396393,
0.024197565391659737,
-0.013160549104213715,
-0.03060385398566723,
0.03287014365196228,
-0.013874341733753681,
0.05756736546754837,
-0.013240850530564785,
-0.028087735176086426,
0.04571840912103653,
0.05071495473384857,
0.0028306334279477596,
-0.05264219641685486,
0.0005604386096820235,
0.016818735748529434,
0.054712194949388504,
0.010840723291039467,
0.022805670276284218,
-0.03783100098371506,
-0.01258059311658144,
0.006673960015177727,
0.019040415063500404,
0.02532178908586502,
-0.024643685668706894,
0.045361511409282684,
0.012875031679868698,
0.01083180122077465,
0.07248562574386597,
0.00009675234468886629,
-0.030978593975305557,
0.016952572390437126,
0.02134239487349987,
-0.009029475040733814,
0.03736703842878342,
0.0342085063457489,
0.027516700327396393,
-0.004363056737929583,
-0.012821497395634651,
0.041471343487501144,
-0.039686862379312515,
0.045682720839977264,
0.058852192014455795,
-0.0023510539904236794,
0.014588134363293648,
0.004666418302804232,
-0.05396271124482155,
0.078802689909935,
-0.04029358550906181,
-0.022877048701047897,
-0.037973761558532715,
-0.023965582251548767,
0.05442667752504349,
-0.04247065261006355,
0.0024648148100823164,
0.005518508143723011,
0.009297147393226624,
-0.03076445683836937,
-0.0007333102403208613,
0.010144775733351707,
-0.019879121333360672,
-0.013231928460299969,
-0.0043273670598864555,
-0.042506344616413116,
0.05788857117295265,
0.01258059311658144,
-0.017853735014796257,
-0.031817302107810974,
0.0208070520311594,
0.021752826869487762,
-0.0800161361694336,
0.025892822071909904,
-0.03167454153299332,
0.007731264922767878,
0.012089860625565052,
-0.019433001056313515,
0.08008752018213272,
0.035314884036779404,
0.02937256172299385,
-0.027766527608036995,
-0.014864728786051273,
0.048966165632009506,
-0.05724615603685379,
0.016149554401636124,
0.004719953052699566,
-0.016104942187666893,
-0.038116518408060074,
-0.007115618791431189,
-0.0001242166181327775,
-0.04757427051663399,
-0.0037050291430205107,
0.06441976875066757,
-0.02250230871140957,
-0.01231292076408863,
-0.04154272377490997,
0.057139087468385696,
-0.04532582312822342,
-0.02678506262600422,
-0.006705188192427158,
-0.0565323643386364,
0.042185135185718536,
-0.0064419773407280445,
-0.05446236580610275,
-0.04703892394900322,
-0.05956598371267319,
-0.03747410699725151,
0.002159222261980176,
0.022448774427175522,
-0.05988718941807747,
0.04300599917769432,
-0.00848520826548338,
-0.0319957472383976,
-0.02639247663319111,
0.048966165632009506,
-0.010234000161290169,
0.008083700202405453,
0.022645067423582077,
-0.08808199316263199,
0.0059155551716685295,
-0.001198948360979557,
-0.10664059966802597,
0.0216636024415493,
-0.011857877485454082,
-0.029265491291880608,
0.026695840060710907,
0.00862350594252348,
-0.003109458601102233,
-0.0016762970481067896,
-0.016568908467888832,
0.013776195235550404,
0.03595729544758797,
-0.07170045375823975,
0.0032209886703640223,
-0.010715809650719166,
-0.00786956213414669,
0.014240160584449768,
-0.004849327728152275,
-0.0013539751525968313,
0.016149554401636124,
-0.017487915232777596,
-0.005777257960289717,
0.0445406511425972,
0.03458324447274208,
0.00804354902356863,
-0.08915267884731293,
0.010555206798017025,
-0.01821955293416977,
0.07716096937656403,
0.017461149021983147,
-0.06281373649835587,
0.08279992640018463,
-0.007213765289634466,
-0.019647138193249702,
-0.006629347801208496,
0.0042604487389326096,
-0.05956598371267319,
0.010697964578866959,
-0.011768653988838196,
-0.010064474307000637,
-0.039758242666721344,
-0.061350464820861816,
-0.0005626692436635494,
-0.013624514453113079,
-0.011509903706610203,
-0.01613171026110649,
-0.0394013449549675,
0.08030165731906891,
0.010323223657906055,
0.041328586637973785,
-0.03404790163040161,
0.01620308868587017,
0.021360240876674652,
0.008632428012788296,
0.033691003918647766,
0.04925168305635452,
0.06406287848949432,
0.05795995146036148,
-0.013731583021581173,
-0.006852407939732075,
0.05863805487751961,
0.06231408566236496,
0.104998879134655,
0.01694364845752716,
-0.0021023419685661793,
-0.01671166718006134,
-0.019058259204030037,
0.03754548355937004,
-0.016283391043543816,
0.03231695666909218,
0.0027235643938183784,
-0.049430131912231445,
0.03624281287193298,
-0.019183173775672913,
-0.015471451915800571,
0.04090030863881111,
0.05810270830988884,
-0.05007254332304001,
0.011643740348517895,
-0.001492272480390966,
-0.031442560255527496,
-0.005478357430547476,
-0.011402835138142109,
-0.026927821338176727,
0.03169238567352295,
0.03451186791062355,
0.016051407903432846,
-0.005857559852302074,
0.014597056433558464,
0.05067926645278931,
0.002533963415771723,
-0.03281661123037338,
0.09586232900619507,
-0.0025941894855350256,
0.04618237540125847,
-0.049430131912231445,
0.00900270789861679,
0.02127101644873619,
0.0553189180791378,
-0.023626532405614853,
0.028391096740961075,
0.011402835138142109,
-0.010421370156109333,
-0.010608741082251072,
-0.012107704766094685,
0.04125720635056496,
0.006673960015177727,
-0.0035801155027002096,
-0.03269169479608536,
0.03435126319527626,
-0.037188589572906494,
0.030568163841962814,
-0.0660971850156784,
0.04450496286153793,
0.03972255066037178,
0.03262031823396683,
0.003972701262682676,
-0.03427988290786743,
-0.0029109350871294737
]
|
41,343 | pyglove.core.typing.class_schema | get | Returns field by key with default value if not found. | def get(self,
key: Union[str, KeySpec],
default: Optional[Field] = None
) -> Optional[Field]:
"""Returns field by key with default value if not found."""
return self._fields.get(key, default)
| (self, key: Union[str, pyglove.core.typing.class_schema.KeySpec], default: Optional[pyglove.core.typing.class_schema.Field] = None) -> Optional[pyglove.core.typing.class_schema.Field] | [
0.0872596949338913,
-0.041840843856334686,
-0.028751887381076813,
0.06382006406784058,
-0.013691375032067299,
-0.00901348888874054,
0.11383922398090363,
-0.025538979098200798,
0.019606050103902817,
-0.00926906056702137,
0.016712605953216553,
-0.022088751196861267,
-0.028368528932332993,
-0.026269184425473213,
0.07210791110992432,
0.025593744590878487,
-0.02077437937259674,
0.013143720105290413,
0.022399090230464935,
-0.036601610481739044,
0.06433121114969254,
-0.03884699568152428,
0.04764598608016968,
0.004121103789657354,
0.033169638365507126,
0.05984043702483177,
0.06035158038139343,
-0.0013006806839257479,
-0.004096003249287605,
0.00026926372083835304,
0.03211084008216858,
-0.02420635148882866,
-0.015170043334364891,
0.06674089282751083,
-0.04844921454787254,
0.022983254864811897,
0.0072929393500089645,
0.030248811468482018,
-0.07323972880840302,
-0.0100403418764472,
0.03840887174010277,
0.014275540597736835,
0.0012596065644174814,
-0.07798607647418976,
-0.021102972328662872,
0.007858849130570889,
0.005325945094227791,
0.04742692410945892,
0.003390897298231721,
0.011263437569141388,
0.046733226627111435,
-0.020500551909208298,
-0.04815712943673134,
-0.03039485216140747,
-0.010140744969248772,
-0.0728016048669815,
-0.031818754971027374,
0.03161795064806938,
-0.018109126016497612,
0.03917558863759041,
-0.02701764740049839,
-0.043556828051805496,
-0.06648531556129456,
0.01642964966595173,
-0.022526875138282776,
-0.024900047108530998,
0.05980392545461655,
0.003813047893345356,
0.029664646834135056,
-0.011683306656777859,
-0.0387374646961689,
0.01859288662672043,
-0.0376056432723999,
-0.0062158843502402306,
0.03735006973147392,
-0.022983254864811897,
-0.008411068469285965,
-0.08689459413290024,
0.03588965907692909,
-0.017926573753356934,
0.006275213789194822,
0.02720019780099392,
-0.10602600872516632,
0.01675824262201786,
0.02102995291352272,
-0.0029139809776097536,
0.06020554155111313,
0.008525162935256958,
0.058343514800071716,
-0.04841270297765732,
-0.008812681771814823,
-0.03282279148697853,
-0.006380180828273296,
0.043739378452301025,
0.007055622059851885,
-0.06020554155111313,
-0.020427532494068146,
0.004960841499269009,
-0.01086182426661253,
0.026469992473721504,
-0.017689255997538567,
-0.02466273121535778,
0.010843569412827492,
0.029336053878068924,
0.013937819749116898,
-0.02090216614305973,
-0.032019563019275665,
0.02535642683506012,
0.017990466207265854,
-0.040307410061359406,
0.005467422306537628,
-0.048193641006946564,
-0.046477653086185455,
0.0874057412147522,
-0.014239029958844185,
0.01975209079682827,
0.014193392358720303,
0.021887945011258125,
0.017935700714588165,
0.005549570545554161,
-0.034575287252664566,
0.0016304146265611053,
-0.07703680545091629,
-0.041256677359342575,
0.015553401783108711,
-0.02343963459134102,
0.007845157757401466,
0.014175137504935265,
0.027419259771704674,
0.03742309287190437,
0.04589349031448364,
0.07944648712873459,
-0.0018700136570259929,
0.0051068831235170364,
-0.005458294879645109,
0.02019021473824978,
0.06119132041931152,
0.07196186482906342,
-0.021814923733472824,
0.053487639874219894,
0.007247301284223795,
0.010788803920149803,
0.03448401018977165,
-0.011080886237323284,
-0.008566237054765224,
-0.014029095880687237,
0.05319555476307869,
-0.049106400460004807,
-0.04841270297765732,
0.017762277275323868,
0.02292848937213421,
0.039905793964862823,
-0.03285929933190346,
-0.019587794318795204,
0.033352188766002655,
0.013590971939265728,
-0.019898131489753723,
-0.05191769450902939,
0.0323481559753418,
-0.026743819937109947,
0.02873363345861435,
-0.026269184425473213,
-0.004431441891938448,
-0.03725879639387131,
0.0374596007168293,
0.027054157108068466,
-0.02676207385957241,
0.005198158789426088,
0.07170629501342773,
0.04987311735749245,
-0.04950801283121109,
0.038700953125953674,
-0.052282799035310745,
-0.009857790544629097,
0.020044174045324326,
0.05308602377772331,
-0.05691961199045181,
-0.012285727076232433,
-0.013161974959075451,
-0.02555723302066326,
0.010880079120397568,
0.02605012245476246,
0.051844675093889236,
-0.0011631964007392526,
0.018109126016497612,
0.038080278784036636,
0.03943116217851639,
-0.0074891820549964905,
-0.04308219254016876,
0.017442811280488968,
-0.012349620461463928,
-0.012176196090877056,
-0.00533507252112031,
-0.00914583820849657,
-0.05407180264592171,
-0.026524757966399193,
0.07689075917005539,
-0.02606837823987007,
-0.005900982767343521,
0.08696761727333069,
-0.0048330556601285934,
-0.027601812034845352,
0.0006834277883172035,
0.010058596730232239,
-0.09456176310777664,
0.010916589759290218,
0.04760947450995445,
-0.0021027671173214912,
-0.07327623665332794,
-0.008945032022893429,
-0.041256677359342575,
-0.033096618950366974,
-0.05684658885002136,
-0.029135245829820633,
0.022764192894101143,
-0.03351648524403572,
-0.02568501979112625,
-0.0162470992654562,
-0.020171958953142166,
0.05345112830400467,
0.059913456439971924,
-0.016457032412290573,
0.05045728012919426,
0.026469992473721504,
0.021814923733472824,
0.020756125450134277,
-0.013755268417298794,
0.015005746856331825,
-0.04275359958410263,
-0.07805909216403961,
0.0022510902490466833,
0.04008834809064865,
-0.014239029958844185,
-0.003943115938454866,
-0.0125230448320508,
-0.06750760972499847,
-0.0019019602332264185,
0.0035871402360498905,
0.032457686960697174,
0.004634530283510685,
0.021887945011258125,
0.0007404751959256828,
-0.010213766247034073,
0.06374704092741013,
0.0036076772958040237,
-0.020555317401885986,
-0.03833584859967232,
-0.021431565284729004,
0.049106400460004807,
0.021814923733472824,
0.008602747693657875,
0.00853885430842638,
0.038518402725458145,
0.03212909400463104,
0.010797930881381035,
0.034812603145837784,
-0.07039192318916321,
-0.012349620461463928,
0.03924860805273056,
-0.0066676996648311615,
-0.05056681111454964,
-0.017360663041472435,
-0.026707308366894722,
-0.0250460896641016,
0.0017228313954547048,
-0.01162854116410017,
0.023585675284266472,
-0.011655923910439014,
0.0588911697268486,
0.02312929555773735,
0.09273624420166016,
0.016164951026439667,
0.010980483144521713,
-0.04205990582704544,
0.024133330211043358,
-0.04085506498813629,
0.021778414025902748,
-0.010277658700942993,
0.034502264112234116,
-0.01411124411970377,
-0.053816232830286026,
-0.013572716154158115,
-0.024991324171423912,
0.005805143155157566,
-0.04676973819732666,
0.03483085706830025,
-0.029792431741952896,
0.01086182426661253,
-0.0523558184504509,
-0.0437028706073761,
0.02566676400601864,
0.03433796763420105,
-0.019003627821803093,
-0.010971355251967907,
-0.04844921454787254,
-0.03764215484261513,
-0.05180816352367401,
-0.004547818563878536,
0.06425818800926208,
0.0206465944647789,
-0.01753408834338188,
0.012915530242025852,
0.02205224148929119,
-0.0009795038495212793,
-0.04603952914476395,
0.0294455848634243,
-0.015425615943968296,
-0.041840843856334686,
0.038956526666879654,
0.004184997174888849,
-0.0851420983672142,
0.044506095349788666,
-0.0054856776259839535,
0.00013220733671914786,
-0.0004934599855914712,
0.00357573083601892,
-0.027729598805308342,
0.05038426071405411,
0.028003426268696785,
0.008776171132922173,
0.018118252977728844,
0.0385914221405983,
-0.052793942391872406,
0.01918618008494377,
-0.01929571107029915,
-0.02924477681517601,
-0.023348357528448105,
-0.008926776237785816,
0.022344324737787247,
0.05516711249947548,
0.00715146167203784,
-0.0012915530242025852,
-0.038773976266384125,
0.010277658700942993,
-0.08733271807432175,
-0.018875842913985252,
0.004356139339506626,
-0.054765500128269196,
-0.009611344896256924,
0.02082914486527443,
-0.04366635903716087,
-0.047572966665029526,
0.008242207579314709,
-0.03778819367289543,
0.027638321742415428,
-0.040928084403276443,
0.10441955178976059,
-0.03627301752567291,
0.004782853648066521,
-0.07367785274982452,
0.03833584859967232,
-0.10200987011194229,
-0.004002445377409458,
0.03070519119501114,
-0.01411124411970377,
-0.028496315702795982,
0.030613914132118225,
-0.0007284952444024384,
0.02364044077694416,
0.017095964401960373,
0.030413107946515083,
-0.0000344423642673064,
-0.04530932381749153,
0.021960966289043427,
-0.02625093050301075,
0.002959619043394923,
0.006539913360029459,
0.006973473820835352,
-0.016475288197398186,
0.013499695807695389,
-0.006005949806421995,
0.04779202863574028,
-0.040489960461854935,
-0.007187971845269203,
0.015945889055728912,
0.0067544118501245975,
0.008182878606021404,
0.06539000570774078,
-0.007913614623248577,
-0.025630254298448563,
-0.03703973442316055,
0.014613261446356773,
-0.047755517065525055,
0.06703297048807144,
-0.00838368572294712,
0.022253047674894333,
-0.018894096836447716,
0.005736686289310455,
0.03453877568244934,
-0.052720922976732254,
-0.02236257866024971,
0.005179903469979763,
-0.04804759845137596,
-0.014859706163406372,
-0.017990466207265854,
-0.00838368572294712,
0.0055815172381699085,
-0.03351648524403572,
0.012596065178513527,
0.006329979281872511,
0.056225914508104324,
0.025374682620167732,
-0.014768430031836033,
0.06451375782489777,
-0.004353857133537531,
0.0008180596632882953,
0.03369903936982155,
-0.0017604826716706157,
-0.031709223985672,
-0.010496720671653748,
0.02371346205472946,
0.04041694104671478,
-0.005303125828504562,
-0.02732798457145691,
-0.002325251931324601,
-0.00420781597495079,
0.033352188766002655,
-0.010451083071529865,
-0.02134029008448124,
0.02586757205426693,
-0.06214058771729469,
-0.04582046717405319,
-0.04782853648066521,
0.012669085524976254,
0.027930404990911484,
0.0017536369850859046,
-0.00579601526260376,
-0.004983660764992237,
-0.014175137504935265,
0.01605542004108429,
-0.029993239790201187,
-0.022125262767076492,
0.008862883783876896,
0.05881814658641815,
0.025465957820415497,
0.00528943445533514,
0.00777213741093874,
0.01587286777794361,
0.00850234366953373,
-0.03735006973147392,
0.013326271437108517,
-0.055203624069690704,
-0.01802697777748108,
-0.01967906951904297,
-0.010788803920149803,
-0.008073347620666027,
0.009182348847389221,
0.08068783581256866,
0.050749365240335464,
-0.05330508574843407,
0.015891123563051224,
0.006211320403963327,
0.03515945002436638,
0.04534583538770676,
0.05290347337722778,
-0.02274593710899353,
-0.08477699756622314,
0.011756327003240585,
0.033041853457689285,
-0.008036836981773376,
0.004837619140744209,
0.06225011870265007,
0.026981135830283165,
0.00850690808147192,
-0.015763336792588234,
0.051844675093889236,
0.027985170483589172,
0.01334452722221613,
0.013107209466397762,
-0.018766311928629875,
0.008753352798521519,
0.028751887381076813,
-0.008091602474451065,
-0.047572966665029526,
0.012751233763992786,
-0.026031868532299995,
0.050238218158483505,
0.011455116793513298,
-0.020171958953142166,
-0.05691961199045181,
0.018839331343770027,
0.00946530420333147,
-0.04333776608109474,
-0.028204232454299927,
0.010971355251967907,
-0.016274482011795044,
-0.014056478627026081,
0.06761714071035385,
-0.03052263893187046,
-0.009296443313360214,
-0.00764891505241394,
0.06192152574658394,
-0.01070665568113327,
0.0015243064844980836,
0.00048433238407596946,
0.009150402620434761,
0.030029749497771263,
-0.006558168679475784,
0.030924253165721893,
0.029226522892713547,
0.02141331136226654,
-0.039212100207805634,
0.026543011888861656,
0.010971355251967907,
-0.0331331267952919,
-0.12179847061634064,
-0.04505375027656555,
0.0004227212048135698,
0.06206756830215454,
0.005303125828504562,
0.03713100776076317,
-0.01109001412987709,
-0.004422313999384642,
-0.03833584859967232,
0.033607762306928635,
0.004424596205353737,
0.016548309475183487,
-0.020865656435489655,
0.01535259559750557,
0.02371346205472946,
0.008671204559504986,
0.0288066528737545,
-0.0018700136570259929,
-0.02707241289317608,
-0.010186383500695229,
0.05370670184493065,
-0.03486736863851547,
-0.01771663874387741,
-0.014668026939034462,
0.035013411194086075,
0.006900453008711338,
0.007484618574380875,
-0.010232021100819111,
0.062213607132434845,
-0.005932929459959269,
-0.007009983994066715,
-0.05231930688023567,
0.042972661554813385,
-0.07637961953878403,
-0.04618557170033455,
0.03090599738061428,
-0.018309932202100754,
0.00016044580843299627,
-0.014823195524513721,
0.03556106612086296,
-0.002103907987475395,
0.007096696179360151,
0.07930044829845428,
0.05104144662618637,
-0.027893895283341408,
-0.027893895283341408,
0.04786504805088043,
-0.022125262767076492,
-0.036035697907209396,
0.01210317574441433,
0.03579838201403618,
-0.06042460352182388,
-0.0015539710875600576,
0.010651890188455582,
-0.04154875874519348,
0.020975187420845032,
-0.015772463753819466,
0.034575287252664566,
0.06539000570774078,
-0.00042671451228670776,
-0.06557255983352661,
-0.0023914268240332603,
-0.008858319371938705,
0.06334543228149414,
0.0007359114242717624,
-0.05085889622569084,
0.0029641827568411827,
0.029226522892713547,
0.05407180264592171,
0.024754006415605545,
0.030413107946515083,
-0.019533028826117516,
0.01681300811469555,
-0.04666020721197128,
-0.03623650595545769,
0.011254310607910156,
-0.009100200608372688,
0.11281692981719971,
-0.0033657962922006845,
-0.056225914508104324,
-0.04509026184678078,
-0.003605395555496216,
-0.0230562761425972,
-0.03525072708725929,
-0.007493746001273394,
-0.014932726509869099,
-0.03687543794512749,
-0.018127379938960075,
0.04180433228611946,
-0.025922337546944618,
0.05951184406876564,
-0.012477406300604343,
0.019606050103902817,
0.022472109645605087,
-0.01687690243124962,
-0.003228882560506463,
-0.008725970052182674,
0.023969033733010292,
0.0486682765185833,
0.019989408552646637,
0.02280070260167122,
0.036090463399887085,
0.029591625556349754,
0.06487886607646942,
-0.06827432662248611,
-0.00206967955455184,
-0.022563386708498,
-0.052720922976732254,
0.04344729706645012,
-0.029226522892713547,
-0.020171958953142166,
0.023421378806233406,
0.014239029958844185,
0.010159000754356384,
-0.021066462621092796,
-0.02650650218129158,
0.06885848939418793,
-0.02243559993803501,
0.019332222640514374,
0.0005134265520609915,
-0.036346036940813065,
-0.026616033166646957,
-0.01140035130083561,
-0.0008266167715191841,
0.029226522892713547,
-0.0016292736399918795,
0.03720403090119362,
0.030924253165721893,
0.0550575815141201,
-0.01503312960267067,
-0.013864799402654171,
0.027820874005556107,
-0.015051385387778282,
-0.0012675931211560965,
0.051516082137823105,
-0.04764598608016968,
0.018182145431637764,
-0.004376676399260759,
0.06104527786374092,
-0.004983660764992237,
0.026269184425473213,
-0.006174810230731964,
-0.001603031880222261,
0.02471749670803547,
0.015087895095348358,
-0.09185999631881714,
-0.02031800150871277,
-0.020025918260216713,
-0.03961371257901192,
-0.0006138299941085279,
-0.10215591639280319,
0.036546844989061356,
-0.034319713711738586,
-0.06261522322893143,
-0.02312929555773735,
-0.024115076288580894,
-0.03152667358517647,
0.033224403858184814,
-0.04308219254016876,
-0.060753196477890015,
-0.06721552461385727,
-0.03344346582889557,
-0.04582046717405319,
0.021175993606448174,
-0.016977304592728615,
0.007461799308657646,
-0.04658718407154083,
-0.016776498407125473,
-0.0069415271282196045,
-0.026104887947440147,
0.012212706729769707,
0.0635644942522049,
0.0012390695046633482,
0.022855468094348907,
0.007530256174504757,
0.13676771521568298,
0.010779676027595997,
-0.022216537967324257,
0.05118748918175697,
-0.024680985137820244,
0.04658718407154083,
0.022581640630960464,
-0.021559352055191994,
0.06053413450717926,
0.0030029749032109976,
0.0038906324189156294,
-0.025319917127490044,
0.0250460896641016,
-0.029208267107605934,
-0.03694845736026764,
-0.04140271991491318,
-0.039029546082019806,
0.025520723313093185,
-0.042717091739177704,
0.01944175362586975,
-0.03641905635595322,
-0.019587794318795204,
-0.052976492792367935,
0.01360009890049696,
-0.03585314750671387,
-0.02331184782087803,
0.007594149559736252,
0.01586374081671238,
-0.05155258998274803,
-0.03618174046278,
0.01956953853368759,
0.025648510083556175,
-0.01797221228480339,
-0.0268168393522501,
0.028185978531837463,
0.004696141462773085,
-0.01980685628950596,
0.017817042768001556,
-0.0385914221405983,
0.055714771151542664,
0.00653078593313694,
-0.014156881719827652,
-0.022764192894101143,
-0.030997272580862045,
0.04136620834469795,
-0.014010841026902199,
-0.07484618574380875,
-0.06495188176631927,
-0.06776317954063416,
0.10617204755544662,
0.07981158792972565,
0.03156318515539169,
0.033607762306928635,
-0.016913412138819695,
0.01980685628950596,
-0.07674472033977509,
-0.00847039744257927,
-0.044761668890714645,
0.029409073293209076,
0.033735547214746475,
-0.02555723302066326,
0.02924477681517601,
0.04556489735841751,
0.038518402725458145,
-0.008114421740174294,
-0.017753150314092636,
0.03598093241453171,
0.04056297987699509,
-0.023165807127952576,
0.0042146616615355015,
-0.0184103362262249,
-0.019094904884696007,
0.04366635903716087,
0.028660612180829048,
-0.040307410061359406,
-0.040234386920928955,
-0.03658335283398628,
0.03388158977031708,
0.0356888510286808,
0.05892767757177353,
0.0005972862127237022,
-0.023403123021125793,
-0.04702530801296234,
0.006348234135657549,
-0.0652804747223854,
-0.030175790190696716,
-0.0073842150159180164,
0.019533028826117516
]
|
41,344 | pyglove.core.typing.class_schema | get_field | Get field definition (Field) for a key.
Args:
key: string as input key.
Returns:
Matched field. A field is considered a match when:
* Its key spec is a ConstStrKey that equals to the input key.
* Or it's the first field whose key spec is a NonConstKey
which matches the input key.
| def get_field(self, key: str) -> Optional[Field]:
"""Get field definition (Field) for a key.
Args:
key: string as input key.
Returns:
Matched field. A field is considered a match when:
* Its key spec is a ConstStrKey that equals to the input key.
* Or it's the first field whose key spec is a NonConstKey
which matches the input key.
"""
# For const string key, we can directly retrieve from fields dict.
if key in self._fields:
return self._fields[key]
if self._allow_nonconst_keys:
for key_spec, field in self._fields.items():
if key_spec.match(key):
return field
return None
| (self, key: str) -> Optional[pyglove.core.typing.class_schema.Field] | [
0.06669176369905472,
-0.012776698917150497,
-0.03684227168560028,
0.0734613686800003,
0.0011309796245768666,
-0.020903943106532097,
0.12921762466430664,
-0.0229497030377388,
0.007908720523118973,
-0.03656330332159996,
0.01373448595404625,
0.013548508286476135,
0.027989711612462997,
-0.02962631918489933,
0.04474634304642677,
0.003561481600627303,
-0.02934735268354416,
0.03282514214515686,
-0.02400977909564972,
-0.02897539548575878,
0.021424682810902596,
0.0008142355945892632,
0.06583626568317413,
0.004858679138123989,
0.029124177992343903,
0.04820553585886955,
0.04270058125257492,
0.009949831292033195,
0.03444315493106842,
-0.0193417277187109,
0.04340729862451553,
-0.004100818186998367,
-0.022224389016628265,
0.05564466118812561,
-0.07167597860097885,
-0.013409024104475975,
0.03801393508911133,
0.0020748188253492117,
-0.08964146673679352,
-0.00994053203612566,
0.015956925228238106,
0.024716496467590332,
0.05408244580030441,
-0.06583626568317413,
-0.05560746788978577,
0.002089929534122348,
0.0008589865756221116,
0.02603694051504135,
-0.033959608525037766,
0.03883223608136177,
0.031690675765275955,
-0.016728734597563744,
-0.06542710959911346,
-0.0845828652381897,
0.02934735268354416,
-0.06029411405324936,
-0.015371093526482582,
0.007322889752686024,
-0.04764760285615921,
0.016914712265133858,
-0.048763468861579895,
-0.0389438234269619,
-0.06687774509191513,
0.02413996309041977,
-0.024363137781620026,
-0.04656893014907837,
0.05769042298197746,
-0.005602591671049595,
0.010293890722095966,
-0.029533330351114273,
-0.04764760285615921,
0.003977607470005751,
-0.017677223309874535,
0.02493966929614544,
0.04043164849281311,
-0.039427366107702255,
-0.01923014037311077,
-0.05795079097151756,
0.03725142404437065,
-0.0019039512844756246,
0.015650061890482903,
0.0021329368464648724,
-0.05642576888203621,
-0.023991180583834648,
0.019453315064311028,
-0.02187103033065796,
0.02897539548575878,
0.02120150811970234,
0.047461625188589096,
-0.009182671085000038,
-0.05560746788978577,
-0.04794516786932945,
-0.03883223608136177,
0.04273777827620506,
0.01407854538410902,
-0.017816707491874695,
-0.011446954682469368,
0.012144372798502445,
-0.02056918293237686,
0.04351888597011566,
0.021443281322717667,
0.02267073653638363,
-0.005802518222481012,
0.022782323881983757,
0.026873841881752014,
-0.02897539548575878,
-0.05791359394788742,
0.020327411592006683,
-0.00043850159272551537,
-0.05099520832300186,
-0.010163705796003342,
-0.05750444531440735,
-0.06486918032169342,
0.10124650597572327,
0.007983111776411533,
0.008429459296166897,
-0.019788075238466263,
-0.000515508174430579,
0.03747459873557091,
-0.005597942043095827,
-0.0024246901739388704,
0.01989966258406639,
-0.07416808605194092,
-0.01227455772459507,
0.020736563950777054,
-0.032248612493276596,
-0.009642967022955418,
-0.01789109781384468,
0.017314566299319267,
0.022521954029798508,
0.024325942620635033,
0.09038537740707397,
0.00132741907145828,
-0.0023317011073231697,
-0.004979564808309078,
0.04950738325715065,
0.03191385045647621,
0.059066660702228546,
-0.0394645631313324,
0.01601271890103817,
0.012962676584720612,
0.01421802956610918,
0.0389438234269619,
-0.028343070298433304,
-0.01280459575355053,
-0.016896115615963936,
0.01708209328353405,
-0.013083563186228275,
-0.03652611002326012,
0.04340729862451553,
-0.04191947355866432,
0.012302454560995102,
0.016598550602793694,
0.0020585455931723118,
0.0445975586771965,
-0.017974788323044777,
-0.019137151539325714,
-0.020346010103821754,
0.01299987267702818,
-0.013306736946105957,
0.037307217717170715,
-0.023321660235524178,
-0.020903943106532097,
-0.06029411405324936,
0.03606116399168968,
0.025460409000515938,
0.010805330239236355,
-0.035298652946949005,
0.058508723974227905,
0.026929635554552078,
-0.020922541618347168,
0.023637821897864342,
-0.04898664355278015,
0.022335976362228394,
-0.033941011875867844,
0.03219281882047653,
-0.04482073336839676,
-0.0339038148522377,
-0.034517545253038406,
-0.0185606200248003,
0.04831712320446968,
0.052780598402023315,
0.05147875100374222,
0.006188422907143831,
0.05404524877667427,
0.04333290830254555,
0.024995462968945503,
0.005681632552295923,
-0.0173424631357193,
0.01764002814888954,
-0.022242985665798187,
-0.02389819175004959,
-0.000775877560954541,
-0.03362485021352768,
-0.06483197957277298,
-0.04139873757958412,
0.07591628283262253,
-0.01692401058971882,
-0.016040615737438202,
0.06903509050607681,
-0.010182303376495838,
-0.001182704814709723,
0.0008159791468642652,
0.061038028448820114,
-0.0814584270119667,
-0.002771074417978525,
0.06665457040071487,
0.006513884756714106,
-0.07059730589389801,
0.0008026119321584702,
-0.010535662062466145,
-0.030760785564780235,
-0.03961334377527237,
-0.0009821971179917455,
0.013725187629461288,
-0.028101298958063126,
-0.06085205078125,
0.006448792293667793,
-0.019974052906036377,
0.03418278321623802,
0.05080923065543175,
0.01856991834938526,
0.05884348601102829,
0.009708059020340443,
0.020587781444191933,
-0.003145355498418212,
-0.024195756763219833,
0.02239176817238331,
-0.04363047331571579,
-0.07134121656417847,
0.0005942583084106445,
0.01759353280067444,
-0.018253754824399948,
-0.0061698248609900475,
0.03806972876191139,
-0.07401930540800095,
-0.01141905877739191,
0.023526236414909363,
0.08153282105922699,
-0.024883875623345375,
0.003247643355280161,
0.0034708171151578426,
-0.01167012844234705,
0.05486355349421501,
-0.012785997241735458,
-0.029961079359054565,
-0.0011693376582115889,
-0.0005968736368231475,
0.011112194508314133,
0.026799451559782028,
-0.016486963257193565,
0.0015947626670822501,
0.023172877728939056,
0.02402837760746479,
0.009624369442462921,
-0.017779510468244553,
-0.047164060175418854,
-0.0032336951699107885,
0.02895679697394371,
-0.000917685916647315,
-0.05947581306099892,
-0.02897539548575878,
0.015538474544882774,
-0.04307254031300545,
0.002785022836178541,
-0.031151339411735535,
0.04039445519447327,
0.0021433981601148844,
0.04203106090426445,
0.015622164122760296,
0.06970460712909698,
-0.002626941306516528,
0.02547900564968586,
-0.017416853457689285,
0.017147185280919075,
-0.04835432022809982,
0.019955456256866455,
0.045564647763967514,
0.07595347613096237,
0.0094755869358778,
-0.037307217717170715,
-0.04842871055006981,
-0.03057480789721012,
0.017109990119934082,
0.008020307868719101,
0.04976775124669075,
-0.02523723430931568,
-0.011502748355269432,
-0.0074205282144248486,
-0.0017970139160752296,
-0.0009763852576725185,
-0.0026873841416090727,
-0.021406084299087524,
0.013911165297031403,
-0.06654298305511475,
0.013790279626846313,
-0.0011396973859518766,
-0.018179364502429962,
0.08755851536989212,
-0.006439493503421545,
0.002438638359308243,
0.04418840631842613,
0.007718093227595091,
-0.007913370616734028,
-0.023451844230294228,
0.03846028074622154,
-0.037307217717170715,
-0.03667489066720009,
0.012023487128317356,
0.02148047648370266,
-0.08153282105922699,
0.041435930877923965,
-0.029570525512099266,
0.021052725613117218,
-0.006290710996836424,
0.01963929273188114,
-0.03399680554866791,
0.09522081166505814,
-0.011456253938376904,
0.015519876033067703,
0.03528005629777908,
0.03310411050915718,
-0.012051383964717388,
0.034908097237348557,
-0.04240301623940468,
-0.011976992711424828,
-0.02683664672076702,
-0.05326414108276367,
0.02350763790309429,
0.043035343289375305,
-0.011698025278747082,
-0.0025153544265776873,
-0.015566371381282806,
-0.00025760880089364946,
-0.04188228026032448,
-0.02387959510087967,
0.017314566299319267,
-0.03563341498374939,
0.012107177637517452,
-0.009489535354077816,
0.013316035270690918,
-0.055458683520555496,
0.006569677963852882,
-0.0034847655333578587,
0.020587781444191933,
-0.028231482952833176,
0.06855154782533646,
-0.027840929105877876,
0.04883786290884018,
-0.06550150364637375,
0.04333290830254555,
-0.1367311328649521,
-0.013436920940876007,
-0.011391161940991879,
-0.011028503999114037,
-0.029012590646743774,
-0.0033243594225496054,
-0.014794562011957169,
0.023991180583834648,
0.032639164477586746,
0.0737217366695404,
-0.027450375258922577,
-0.05813676863908768,
0.008978094905614853,
-0.05508672818541527,
-0.004572737496346235,
-0.02817568928003311,
-0.013055666349828243,
0.008652633056044579,
0.015436186455190182,
0.0225591491907835,
0.05430562049150467,
-0.01854202151298523,
-0.04065482318401337,
-0.0354660339653492,
0.00497026601806283,
0.028454655781388283,
0.06181913614273071,
-0.009568575769662857,
0.0017853901954367757,
-0.018904678523540497,
-0.0021178261376917362,
-0.03753038868308067,
0.052929382771253586,
-0.04519268870353699,
0.01909995637834072,
-0.004598309751600027,
-0.021313095465302467,
0.03180226311087608,
-0.009182671085000038,
0.007271745707839727,
-0.01448769774287939,
-0.034350164234638214,
-0.02986809052526951,
0.004347239155322313,
0.02001124806702137,
0.023247268050909042,
-0.040357258170843124,
0.02068077027797699,
0.021275900304317474,
0.04601099342107773,
-0.025664985179901123,
-0.0600709430873394,
0.06736128777265549,
0.00833182130008936,
0.06669176369905472,
0.05404524877667427,
0.04072921350598335,
-0.041547518223524094,
0.017667924985289574,
0.03345746919512749,
0.013520611450076103,
0.007699495181441307,
-0.04656893014907837,
-0.014655077829957008,
-0.0357264019548893,
0.030314438045024872,
-0.02670646272599697,
-0.031132742762565613,
0.011967693455517292,
-0.03630293533205986,
-0.04478353634476662,
-0.033159904181957245,
0.01666364260017872,
-0.016970505937933922,
0.01786320097744465,
0.004412331618368626,
0.03418278321623802,
0.016328880563378334,
0.039836518466472626,
-0.04839151352643967,
0.022707931697368622,
-0.018848884850740433,
0.0015122347977012396,
0.009350051172077656,
-0.016440467908978462,
0.006402297876775265,
0.05795079097151756,
0.015296702273190022,
-0.03513127192854881,
-0.00313373189419508,
-0.030240047723054886,
0.007978462614119053,
0.0033406324218958616,
-0.022875312715768814,
0.003947386052459478,
0.032639164477586746,
0.07863155752420425,
0.020978335291147232,
-0.043035343289375305,
-0.0009717358043417335,
0.053561706095933914,
0.009298907592892647,
0.009587173350155354,
0.06438563764095306,
-0.04173349589109421,
-0.08979024738073349,
0.008806065656244755,
0.042217038571834564,
-0.0008967634057626128,
-0.027320189401507378,
0.07338697463274002,
0.03912980109453201,
-0.028343070298433304,
-0.03734441101551056,
0.020587781444191933,
0.061038028448820114,
0.008271378464996815,
0.023953985422849655,
-0.027692146599292755,
0.007927319034934044,
0.007634403184056282,
0.020364606752991676,
-0.034387361258268356,
0.01654275692999363,
0.009735955856740475,
0.04258899763226509,
0.0015424562152475119,
-0.0052910782396793365,
-0.06297220289707184,
0.02549760416150093,
0.0022747451439499855,
-0.06959301978349686,
-0.01540828961879015,
0.0394645631313324,
-0.03280654549598694,
-0.03753038868308067,
0.045415863394737244,
-0.03905541077256203,
-0.021015530452132225,
-0.04084080085158348,
0.06713811308145523,
0.016858918592333794,
-0.00367074366658926,
0.018625712022185326,
0.000044024513044860214,
-0.003789304755628109,
0.010972710326313972,
0.0011356290196999907,
0.03801393508911133,
0.024642104282975197,
-0.02415856160223484,
0.002880336483940482,
0.021015530452132225,
-0.025293027982115746,
-0.08517799526453018,
-0.02387959510087967,
0.033829424530267715,
0.058917876332998276,
-0.01694260910153389,
0.019788075238466263,
-0.01786320097744465,
0.011102895252406597,
-0.029514731839299202,
-0.011530645191669464,
0.0296449176967144,
0.002612992888316512,
-0.020234422758221626,
-0.04058043286204338,
0.03360624983906746,
-0.030630601570010185,
0.001434356439858675,
0.0028594140894711018,
-0.02787812426686287,
0.0028082700446248055,
0.041807886213064194,
-0.018346743658185005,
-0.03165348246693611,
-0.0037730317562818527,
-0.019825270399451256,
-0.004179859068244696,
0.0008124920423142612,
0.0013634522911161184,
0.021257301792502403,
0.0021503723692148924,
-0.015157219022512436,
-0.04965616390109062,
0.03131872043013573,
-0.06453441828489304,
0.0009885900653898716,
0.018625712022185326,
0.016217295080423355,
-0.0029059085063636303,
-0.01709139160811901,
0.027059821411967278,
0.012832492589950562,
-0.017305266112089157,
0.03340167552232742,
-0.027115613222122192,
-0.008378315716981888,
-0.027654951438307762,
0.053301338106393814,
0.006960232276469469,
-0.04299814626574516,
0.013176552020013332,
0.05538429319858551,
-0.03758618235588074,
-0.0136043019592762,
0.001572677749209106,
-0.039985302835702896,
-0.018197961151599884,
-0.042254235595464706,
0.018597815185785294,
0.07390771806240082,
-0.034610532224178314,
-0.06866313517093658,
0.011976992711424828,
0.02361922524869442,
0.059847768396139145,
-0.0148224588483572,
-0.024363137781620026,
0.028231482952833176,
0.03872064873576164,
0.03846028074622154,
0.01387397013604641,
0.008485252968966961,
-0.022224389016628265,
0.007676247972995043,
-0.01407854538410902,
-0.002612992888316512,
0.007215952035039663,
-0.03446175158023834,
0.05698370561003685,
0.05750444531440735,
-0.07595347613096237,
0.00034609370050020516,
0.010991308838129044,
-0.0025664984714239836,
-0.0466805137693882,
-0.027933917939662933,
0.002864063484594226,
-0.02374940924346447,
0.004726169630885124,
0.01287898700684309,
-0.020866747945547104,
0.06159596145153046,
-0.0061186812818050385,
0.0523342527449131,
0.018095673993229866,
-0.012404742650687695,
-0.006941634230315685,
-0.017816707491874695,
0.0349452942609787,
0.012497731484472752,
0.05895507335662842,
0.015129322186112404,
0.06736128777265549,
0.018058478832244873,
0.07546993345022202,
-0.05486355349421501,
-0.014106442220509052,
-0.011651530861854553,
-0.0027966464404016733,
0.015101425349712372,
-0.01683102175593376,
-0.0051980894058942795,
0.02280092053115368,
-0.010805330239236355,
0.016998402774333954,
-0.03647031635046005,
-0.027989711612462997,
0.055161118507385254,
0.0159941203892231,
0.03001687303185463,
-0.02200121432542801,
0.019918259233236313,
-0.0131486551836133,
-0.0714528039097786,
-0.011512047611176968,
0.0007293830276466906,
0.009987026453018188,
0.023712214082479477,
0.013204448856413364,
0.01061935257166624,
-0.036637693643569946,
0.03819991275668144,
0.015203713439404964,
-0.008513149805366993,
-0.004849380347877741,
0.06594785302877426,
0.0042774975299835205,
0.029514731839299202,
-0.04284936562180519,
0.04124995321035385,
-0.008499201387166977,
0.030128460377454758,
-0.007062520366162062,
-0.07848277688026428,
0.03319710120558739,
-0.020346010103821754,
-0.0964110717177391,
0.009238464757800102,
-0.020067041739821434,
-0.013660094700753689,
0.030370231717824936,
-0.10928075760602951,
0.0233402568846941,
-0.07137840986251831,
-0.05594222620129585,
-0.020513389259576797,
0.017454048618674278,
-0.03613555431365967,
0.06382770091295242,
-0.04232862591743469,
-0.06605944037437439,
-0.055458683520555496,
0.014599285088479519,
-0.04593660309910774,
0.014115741476416588,
-0.000786338874604553,
0.02737598307430744,
-0.06114961579442024,
0.0013797254068776965,
-0.048763468861579895,
-0.011642232537269592,
0.061038028448820114,
0.06944423913955688,
0.007211302872747183,
0.032099828124046326,
0.012181568890810013,
0.1386653035879135,
0.027394581586122513,
-0.024716496467590332,
0.01576164737343788,
0.014599285088479519,
0.01986246556043625,
0.025776570662856102,
0.0052120378240942955,
0.0381627157330513,
-0.031188534572720528,
0.03399680554866791,
0.009154774248600006,
0.0017412203596904874,
-0.038088325411081314,
-0.023860996589064598,
-0.07327538728713989,
-0.015092127025127411,
0.05698370561003685,
-0.013483415357768536,
0.07234550267457962,
-0.05568185821175575,
-0.02681804820895195,
-0.039687737822532654,
0.00155872933100909,
-0.039576150476932526,
-0.0034684925340116024,
0.025571994483470917,
0.029682112857699394,
-0.039576150476932526,
-0.052631817758083344,
0.0029593773651868105,
0.0012774374336004257,
-0.02120150811970234,
-0.04333290830254555,
0.011586438864469528,
-0.014013453386723995,
-0.05199949070811272,
-0.002100390614941716,
-0.007532115094363689,
0.028901005163788795,
0.02108992263674736,
-0.035559020936489105,
0.009568575769662857,
0.007253147661685944,
0.035559020936489105,
-0.006253515370190144,
-0.05914105102419853,
-0.032081231474876404,
-0.10637950152158737,
0.07282904535531998,
0.07573030143976212,
0.042365822941064835,
-0.007136911619454622,
0.007081117946654558,
0.03219281882047653,
-0.08138404041528702,
-0.014506295323371887,
-0.05166472867131233,
0.03001687303185463,
0.04136154055595398,
-0.030537612736225128,
0.03314130753278732,
0.03827430307865143,
0.02319147437810898,
-0.017416853457689285,
0.025571994483470917,
0.0020445971749722958,
0.027394581586122513,
-0.025981146842241287,
-0.00894554890692234,
-0.03340167552232742,
0.012330351397395134,
0.01881168968975544,
0.04232862591743469,
-0.042365822941064835,
-0.04348169267177582,
-0.0698905885219574,
0.048093948513269424,
0.015436186455190182,
0.03758618235588074,
0.014599285088479519,
-0.015092127025127411,
-0.03070499189198017,
0.03446175158023834,
-0.04281216859817505,
-0.05382207781076431,
0.011093596927821636,
0.02268933318555355
]
|
41,345 | pyglove.core.typing.class_schema | is_compatible | Returns whether current schema is compatible with the other schema.
NOTE(daiyip): schema A is compatible with schema B when:
schema A and schema B have the same keys, with compatible values specs.
Args:
other: Other schema.
Returns:
True if values that is acceptable to the other schema is acceptable to
current schema.
Raises:
TypeError: If `other` is not a schema object.
| def is_compatible(self, other: 'Schema') -> bool:
"""Returns whether current schema is compatible with the other schema.
NOTE(daiyip): schema A is compatible with schema B when:
schema A and schema B have the same keys, with compatible values specs.
Args:
other: Other schema.
Returns:
True if values that is acceptable to the other schema is acceptable to
current schema.
Raises:
TypeError: If `other` is not a schema object.
"""
if not isinstance(other, Schema):
raise TypeError(f'Argument \'other\' should be a Schema object. '
f'Encountered {other}.')
for key_spec in other.keys():
if key_spec not in self:
return False
for key_spec, field in self.items():
if key_spec not in other:
return False
if not field.value.is_compatible(other[key_spec].value):
return False
return True
| (self, other: pyglove.core.typing.class_schema.Schema) -> bool | [
0.08989503979682922,
-0.03752203285694122,
-0.04932389408349991,
0.027926292270421982,
-0.014698520302772522,
-0.015371119603514671,
-0.014842008240520954,
-0.02575604058802128,
0.029397040605545044,
0.03917213901877403,
-0.017666922882199287,
-0.03777313604950905,
0.06259650737047195,
0.014474321156740189,
-0.00012429061462171376,
-0.01287802029401064,
-0.026563160121440887,
0.038526445627212524,
0.07138513028621674,
0.03522622957825661,
-0.015505638904869556,
-0.005282140802592039,
-0.006838085595518351,
0.027406150475144386,
0.01578364707529545,
0.07156448811292648,
-0.027083301916718483,
0.026670774444937706,
0.030329711735248566,
0.06919693946838379,
-0.0469922199845314,
-0.04620303586125374,
0.10689833015203476,
0.02595333755016327,
0.014187345281243324,
-0.04720745235681534,
-0.025863656774163246,
0.017873186618089676,
-0.016797028481960297,
-0.0008329012198373675,
0.023944508284330368,
0.02206123247742653,
-0.01738891564309597,
-0.025397321209311485,
0.0001909899729071185,
0.015137951821088791,
-0.038526445627212524,
0.07533103972673416,
-0.018151193857192993,
0.00672150170430541,
0.03588986024260521,
-0.03884929418563843,
-0.007443424314260483,
0.0000712884429958649,
-0.03603334724903107,
0.0228324793279171,
-0.01833055354654789,
0.0711698979139328,
-0.016976388171315193,
-0.0318901389837265,
-0.02688600681722164,
-0.00861374568194151,
-0.01944258250296116,
-0.04071463271975517,
-0.03515448421239853,
-0.06937629729509354,
-0.030401455238461494,
-0.07784207165241241,
0.00025544731761328876,
0.04860645532608032,
-0.07425488531589508,
-0.004753029905259609,
-0.03639206662774086,
0.07432662695646286,
-0.024482587352395058,
-0.006560077890753746,
-0.008129474706947803,
0.0342397503554821,
-0.017406851053237915,
-0.06184319779276848,
0.02148728258907795,
-0.03680459409952164,
-0.04092986509203911,
-0.055278632789850235,
-0.010259370319545269,
0.06363679468631744,
-0.0372709296643734,
0.045880191028118134,
0.07942043989896774,
-0.05502752959728241,
0.01292286068201065,
-0.007488264236599207,
0.013451971113681793,
0.030796045437455177,
0.017263364046812057,
-0.002298045204952359,
-0.04301043599843979,
-0.06363679468631744,
-0.05043592303991318,
0.018653400242328644,
-0.00009493448305875063,
0.026616966351866722,
0.01520969532430172,
0.03278693929314613,
0.04853471368551254,
-0.019783366471529007,
-0.0449833907186985,
-0.054202474653720856,
-0.02087746001780033,
-0.0211464986205101,
-0.05093813315033913,
0.012133678421378136,
0.0276931244879961,
0.023173263296484947,
0.006860505323857069,
-0.010295242071151733,
0.0234961099922657,
0.020536676049232483,
0.040140680968761444,
-0.0020760875195264816,
0.043153923004865646,
0.06786967813968658,
0.0909712016582489,
-0.02826707623898983,
0.037450287491083145,
0.020393189042806625,
0.02876928262412548,
-0.013756882399320602,
0.0034638827200978994,
0.008627197705209255,
-0.01287802029401064,
0.03165697306394577,
-0.03133412450551987,
0.03470608592033386,
0.047315068542957306,
0.007752819452434778,
0.0008216912392526865,
0.02514621801674366,
-0.020267637446522713,
-0.017379947006702423,
0.005636375863105059,
0.021433474496006966,
0.08544692397117615,
-0.051655568182468414,
-0.10388509184122086,
0.04383549094200134,
-0.05653415247797966,
0.006416590418666601,
0.0300427358597517,
-0.01141623966395855,
-0.017783505842089653,
0.016644572839140892,
0.03239234536886215,
0.008385062217712402,
-0.07134925574064255,
0.004356196615844965,
0.0007818958256393671,
-0.052552368491888046,
0.045736704021692276,
0.0020065857097506523,
-0.019155606627464294,
0.02145140990614891,
-0.0025872625410556793,
-0.03467021510004997,
-0.008255026303231716,
0.008219154551625252,
0.0069546690210700035,
-0.07805730402469635,
0.01642037369310856,
0.007748335599899292,
0.029432913288474083,
-0.020518740639090538,
0.02168457768857479,
0.01174805499613285,
0.011290688067674637,
0.04311805218458176,
0.007407552096992731,
-0.0449833907186985,
0.016241014003753662,
0.02372927777469158,
0.028428498655557632,
-0.00964954774826765,
-0.013810690492391586,
-0.008990400470793247,
0.004051285330206156,
0.006286554504185915,
-0.04024829715490341,
0.0005806767730973661,
0.06352917850017548,
0.033522311598062515,
0.05642653629183769,
-0.02121824212372303,
-0.019263222813606262,
0.0008076787926256657,
0.010196594521403313,
-0.02387276478111744,
0.050507668405771255,
-0.008515098132193089,
-0.004089399240911007,
0.07604847848415375,
-0.0035244165919721127,
-0.05987023934721947,
-0.018778951838612556,
0.01590919867157936,
0.009228052571415901,
-0.0075151678174734116,
-0.006856021471321583,
-0.05653415247797966,
-0.01658179610967636,
-0.07005786895751953,
-0.014842008240520954,
-0.05535037815570831,
-0.03762964904308319,
-0.021846001967787743,
0.057430949062108994,
0.01226819772273302,
-0.0169494841247797,
-0.08523169159889221,
-0.023442301899194717,
-0.017469625920057297,
0.11292481422424316,
-0.017379947006702423,
0.00714299688115716,
0.032177116721868515,
0.006560077890753746,
0.0018025641329586506,
0.003892103675752878,
-0.032715193927288055,
-0.016492117196321487,
-0.01101268082857132,
0.0016646814765408635,
-0.0038786516524851322,
-0.034795764833688736,
0.005806767847388983,
0.025971272960305214,
0.03572843596339226,
0.03863406181335449,
-0.0029235617257654667,
0.03235647454857826,
-0.01076157670468092,
0.004123029299080372,
-0.002782316179946065,
-0.016644572839140892,
-0.029181810095906258,
-0.05746681988239288,
-0.0634574294090271,
-0.007636235561221838,
-0.00333160487934947,
0.013855530880391598,
0.010088978335261345,
-0.04204189404845238,
-0.0600854717195034,
0.006483850069344044,
-0.0066811456345021725,
-0.03095746971666813,
-0.03709156811237335,
-0.07206669449806213,
-0.05689287185668945,
0.04362025856971741,
-0.010842288844287395,
-0.004824773874133825,
0.02295803092420101,
-0.059475649148225784,
0.029719889163970947,
-0.02575604058802128,
-0.02977369725704193,
0.007716947700828314,
0.03615890070796013,
-0.009550899267196655,
-0.02225852943956852,
-0.003829327877610922,
-0.030562879517674446,
0.01174805499613285,
0.001134449616074562,
-0.03870580717921257,
-0.005676731932908297,
0.0026724583003669977,
-0.022509632632136345,
0.034634340554475784,
-0.015989910811185837,
-0.02024970017373562,
-0.004031107295304537,
-0.011972254142165184,
-0.056856997311115265,
0.0014057309599593282,
0.0060040634125471115,
-0.05710810050368309,
-0.0600854717195034,
-0.04136032611131668,
-0.05441770702600479,
0.00596819119527936,
-0.00011216982238693163,
0.046346526592969894,
0.01457296870648861,
-0.05456119403243065,
0.03680459409952164,
0.055709097534418106,
-0.03992545232176781,
0.05029243603348732,
-0.009048692882061005,
0.04501926526427269,
0.02742408588528633,
0.028320884332060814,
0.029128002002835274,
0.01440257765352726,
-0.017406851053237915,
0.04039178416132927,
0.006860505323857069,
0.024321164935827255,
0.059439778327941895,
-0.07138513028621674,
0.06887409090995789,
-0.040571145713329315,
0.06571736186742783,
0.015335246920585632,
0.029827503487467766,
-0.011272751726210117,
0.046382397413253784,
-0.021881872788071632,
0.05466881021857262,
-0.00036964897299185395,
0.057395078241825104,
-0.015631191432476044,
-0.017173683270812035,
-0.052086032927036285,
-0.0651434138417244,
-0.004062495194375515,
-0.002750928048044443,
0.0399613231420517,
0.019765429198741913,
0.013218804262578487,
-0.020769843831658363,
0.07683765888214111,
0.03045526333153248,
0.017066067084670067,
-0.008869333192706108,
0.016124429181218147,
-0.03877754881978035,
0.013353323563933372,
0.0007387374062091112,
0.033755481243133545,
-0.02179219387471676,
0.075187548995018,
-0.07167210429906845,
-0.01037595421075821,
-0.0365893617272377,
-0.03755790367722511,
0.016761155799031258,
0.011873606592416763,
-0.004165627062320709,
-0.0949888527393341,
-0.007335808128118515,
0.01480613648891449,
-0.03072430193424225,
-0.022132975980639458,
-0.018617527559399605,
-0.03296629711985588,
0.02360372617840767,
-0.02884102612733841,
0.020626356825232506,
0.06751096248626709,
-0.003645484335720539,
0.014842008240520954,
-0.017209555953741074,
-0.04781727492809296,
0.040965735912323,
-0.0025805365294218063,
-0.07045245915651321,
-0.033486440777778625,
0.01174805499613285,
0.0042485808953642845,
0.0010408462258055806,
-0.01933496631681919,
-0.038490574806928635,
0.016205141320824623,
0.00450641056522727,
-0.04921627789735794,
0.06030070409178734,
-0.031872205436229706,
-0.03468814864754677,
0.06435423344373703,
0.026545222848653793,
-0.0018877600086852908,
0.01755930669605732,
-0.007748335599899292,
-0.02745995670557022,
-0.024984795600175858,
-0.044265951961278915,
-0.013999017886817455,
0.045772574841976166,
-0.01732613891363144,
-0.030831918120384216,
-0.0345805324614048,
0.04082224890589714,
-0.06252476572990417,
-0.004515378270298243,
-0.04803250730037689,
-0.008869333192706108,
0.018205001950263977,
-0.014555033296346664,
0.0072820005007088184,
-0.04340502619743347,
-0.034598469734191895,
0.00269039417617023,
0.003304701065644622,
0.023460237309336662,
0.0174606591463089,
0.027280597016215324,
-0.034132134169340134,
0.10826146602630615,
-0.025702232494950294,
-0.060982268303632736,
0.0037822460290044546,
0.037916623055934906,
-0.023980380967259407,
-0.017514467239379883,
0.07360918819904327,
-0.021397601813077927,
0.04437356814742088,
0.07970741391181946,
0.036607299000024796,
0.012913892045617104,
-0.0016052685678005219,
0.004972745198756456,
-0.030527006834745407,
-0.06632718443870544,
-0.024769563227891922,
-0.0006187906838022172,
0.010366985574364662,
0.00766313960775733,
0.02803390845656395,
-0.005470468197017908,
0.05592432990670204,
-0.03931562975049019,
-0.020572548732161522,
0.004336018580943346,
0.020070340484380722,
-0.011900510638952255,
0.005210396833717823,
-0.005111749283969402,
0.05721571668982506,
-0.03662523254752159,
0.008313318714499474,
-0.00871239323168993,
-0.02991718426346779,
-0.038526445627212524,
0.024590203538537025,
0.08071182668209076,
-0.005882995668798685,
0.047315068542957306,
-0.0050310371443629265,
0.033289145678281784,
-0.01775660179555416,
-0.010958872735500336,
-0.0449833907186985,
0.03307391330599785,
0.027585508301854134,
-0.0694839134812355,
-0.01685980334877968,
0.05377201363444328,
-0.0010907306568697095,
-0.019693685695528984,
-0.037450287491083145,
-0.007891823537647724,
-0.033325016498565674,
0.01564912684261799,
-0.036643169820308685,
0.0033966228365898132,
0.012277165427803993,
0.060013726353645325,
0.026186503469944,
-0.03535177931189537,
0.03273313120007515,
-0.033055976033210754,
0.0021242904476821423,
0.01170321460813284,
0.04907279089093208,
0.025666361674666405,
-0.027621380984783173,
-0.018545784056186676,
-0.0412885844707489,
-0.021397601813077927,
0.0013754640240222216,
-0.028285011649131775,
0.08071182668209076,
-0.07439836859703064,
-0.022509632632136345,
-0.045736704021692276,
-0.04494751989841461,
0.0422929972410202,
-0.0005047291633673012,
-0.0017207313794642687,
0.003887619823217392,
0.03511861339211464,
0.05122510716319084,
-0.032679323107004166,
0.026025081053376198,
0.02850024402141571,
-0.01122791226953268,
0.028697539120912552,
0.003345056902617216,
0.008873817510902882,
-0.07791382074356079,
0.02541525848209858,
0.027872484177350998,
-0.03528003767132759,
-0.03831121325492859,
-0.024249419569969177,
0.01685083657503128,
0.006147550884634256,
-0.043692003935575485,
-0.015075176022946835,
0.056785255670547485,
0.03917213901877403,
0.018778951838612556,
-0.008169830776751041,
0.0059188674204051495,
0.00567224808037281,
0.008322286419570446,
-0.027388213202357292,
-0.025271769613027573,
-0.019460517913103104,
-0.018115321174263954,
-0.0293791051954031,
-0.017801441252231598,
0.009577803313732147,
-0.05445358157157898,
-0.026563160121440887,
0.015415959060192108,
-0.06657829135656357,
0.034024517983198166,
0.01823190599679947,
0.018079450353980064,
-0.007335808128118515,
-0.03477783128619194,
0.05929629132151604,
0.0069546690210700035,
0.04444531351327896,
-0.05072290077805519,
0.0002212569088442251,
0.02060841955244541,
0.013048412278294563,
0.0005913262139074504,
-0.012411685660481453,
0.009219083935022354,
0.06227365881204605,
-0.054166603833436966,
-0.01016969047486782,
0.005219365004450083,
-0.03142380341887474,
-0.05151208117604256,
0.04071463271975517,
0.09448664635419846,
0.009990330785512924,
-0.014160442166030407,
0.008299866691231728,
-0.008111538365483284,
0.0005476073129102588,
0.06528689712285995,
0.020303508266806602,
0.05122510716319084,
-0.021630769595503807,
0.06399551033973694,
0.038060110062360764,
-0.013317451812326908,
-0.04232886806130409,
0.025002731010317802,
0.01789112202823162,
-0.008398514240980148,
0.06973502039909363,
-0.01611546240746975,
0.021325858309864998,
-0.00784249883145094,
-0.05825600400567055,
0.06281173974275589,
-0.015478734858334064,
-0.055242761969566345,
0.041145097464323044,
-0.09154514968395233,
-0.060515936464071274,
-0.0587582103908062,
0.022384081035852432,
0.04146794229745865,
0.01141623966395855,
0.04509100690484047,
0.001679254462942481,
-0.056283049285411835,
0.026294119656085968,
0.029701951891183853,
0.01203502994030714,
-0.04860645532608032,
-0.016088558360934258,
-0.01268969289958477,
-0.06564562022686005,
0.0251820906996727,
0.031244445592164993,
-0.01438464131206274,
-0.01806151308119297,
0.053664397448301315,
-0.03605128452181816,
0.01698535494506359,
-0.013963146135210991,
-0.02206123247742653,
-0.047996632754802704,
0.03210537135601044,
0.013774818740785122,
0.006048902869224548,
0.014680584892630577,
0.05172731354832649,
-0.015971973538398743,
0.0027150562964379787,
0.05248062312602997,
0.01987304538488388,
-0.07192320376634598,
0.03601540997624397,
0.008582357317209244,
-0.05700048804283142,
0.001981923822313547,
-0.0025805365294218063,
-0.03176458925008774,
0.03716331347823143,
0.01718265190720558,
0.0349213182926178,
0.0048696137964725494,
-0.0580766424536705,
0.03377341479063034,
-0.024087997153401375,
-0.013120155781507492,
-0.005093812942504883,
-0.03258964419364929,
0.04921627789735794,
-0.051655568182468414,
0.046382397413253784,
-0.012223358266055584,
-0.02541525848209858,
-0.040965735912323,
-0.010797449387609959,
-0.03988957777619362,
0.00021845441369805485,
0.10653961449861526,
-0.0154428631067276,
0.02652728743851185,
-0.04433769732713699,
0.040607016533613205,
-0.051619697362184525,
0.014106634072959423,
0.02087746001780033,
-0.056785255670547485,
0.020626356825232506,
0.0009315490024164319,
-0.07145687192678452,
0.0012532753171399236,
0.0015200728084892035,
-0.01705710031092167,
0.012860084883868694,
0.004015413578599691,
0.018976246938109398,
-0.056247174739837646,
0.00666320975869894,
-0.013317451812326908,
0.05513514578342438,
-0.02225852943956852,
0.05761031061410904,
-0.018088417127728462,
0.025235898792743683,
0.014124569483101368,
0.028966577723622322,
-0.028823090717196465,
0.035495270043611526,
0.08602087199687958,
-0.02017795667052269,
-0.007035381160676479,
-0.00970335491001606,
-0.04652588441967964,
-0.019765429198741913,
0.00221957522444427,
-0.006896377075463533,
0.012357877567410469,
0.011783926747739315,
-0.026832198724150658,
0.05721571668982506,
0.010770545341074467,
-0.01176599133759737,
0.03838295862078667,
0.00008918937237467617,
0.00038057868368923664,
0.02676045522093773,
0.06951978802680969,
-0.000752749911043793,
-0.04408659413456917,
0.020536676049232483,
-0.07985090464353561,
0.025038601830601692,
0.019783366471529007,
-0.026670774444937706,
-0.03646381199359894,
-0.0023294331040233374,
0.05868646502494812,
-0.009452251717448235,
0.04089399427175522,
-0.008837944827973843,
0.023155326023697853,
0.0338989682495594,
0.024518460035324097,
0.03183633089065552,
0.010833321139216423,
-0.00004799271118827164,
-0.007860435172915459,
0.07726812362670898,
-0.013317451812326908,
-0.021325858309864998,
0.03888516500592232,
0.02964814566075802,
-0.08860365301370621,
0.006950185168534517,
-0.008990400470793247,
-0.02098507434129715,
0.022473759949207306,
0.056247174739837646,
0.010887129232287407,
-0.032679323107004166,
-0.014106634072959423,
0.024016253650188446,
-0.03468814864754677,
-0.0034123167861253023,
0.02545112930238247,
0.007322356570512056,
-0.03371960669755936,
-0.00943431630730629,
0.008515098132193089,
0.052588239312171936,
0.02607888914644718,
-0.01617823727428913,
0.050687026232481,
-0.00034638826036825776,
0.012761436402797699,
-0.057395078241825104,
0.01823190599679947,
0.03877754881978035,
0.06442597508430481,
0.019496390596032143,
0.04082224890589714,
0.018491975963115692,
-0.002961675636470318,
0.024231484159827232,
0.007918726652860641,
-0.06453359127044678,
0.033055976033210754,
-0.04509100690484047,
0.03723505511879921,
0.0419701486825943,
-0.00001421389970346354,
-0.03701982647180557,
-0.041611433029174805,
0.03158522769808769,
0.06980676203966141,
-0.020769843831658363,
-0.05330567806959152,
-0.010259370319545269,
-0.05018481984734535,
0.019747493788599968,
0.05513514578342438,
0.0009287465363740921,
0.05029243603348732,
-0.0018283470999449492,
-0.02121824212372303,
0.0013351081870496273,
0.03594366833567619
]
|
41,346 | pyglove.core.typing.class_schema | items | Returns an iterable of (KeySpec, Field) tuple in declaration order. | def items(self) -> Iterable[Tuple[KeySpec, Field]]:
"""Returns an iterable of (KeySpec, Field) tuple in declaration order."""
return self._fields.items()
| (self) -> Iterable[Tuple[pyglove.core.typing.class_schema.KeySpec, pyglove.core.typing.class_schema.Field]] | [
0.05946683883666992,
-0.004308895207941532,
-0.08684045821428299,
-0.02181902900338173,
0.0012003189185634255,
-0.024632630869746208,
0.04360175505280495,
-0.06229859218001366,
0.0621170699596405,
-0.0006619906052947044,
-0.004991874564439058,
-0.009911139495670795,
0.0041727530770003796,
0.015120841562747955,
0.009974672459065914,
-0.01876944676041603,
-0.0658201351761818,
0.03222028166055679,
-0.050790052860975266,
0.008835617452859879,
0.0011390550062060356,
0.023670561611652374,
0.032837457954883575,
-0.028789501637220383,
0.028426455333828926,
0.020693589001893997,
0.03405366092920303,
-0.027101339772343636,
0.06454947590827942,
0.021746419370174408,
-0.04951939359307289,
-0.011118265800178051,
0.03423518314957619,
-0.000639867561403662,
-0.042476311326026917,
-0.03997129946947098,
0.025267960503697395,
-0.008445343933999538,
0.027210254222154617,
0.03679465129971504,
0.028898414224386215,
-0.006289761513471603,
-0.0007493484299629927,
-0.03946303576231003,
-0.018878361210227013,
-0.021056633442640305,
0.07308103889226913,
-0.019404776394367218,
0.04018912836909294,
-0.019150644540786743,
0.033890288323163986,
0.005159782711416483,
0.002595774596557021,
-0.027373623102903366,
0.006371446885168552,
-0.047086991369724274,
-0.0007470793789252639,
-0.016209976747632027,
-0.01723558083176613,
0.08183043450117111,
0.0007368687074631453,
0.006739030592143536,
-0.024886762723326683,
-0.060701191425323486,
-0.0053866864182055,
-0.0685429722070694,
0.0011265752837061882,
-0.03526986017823219,
-0.024251433089375496,
0.0001521670783404261,
-0.028317542746663094,
-0.011145493946969509,
0.005917640402913094,
0.03153049200773239,
-0.03410811722278595,
-0.013668660074472427,
0.013133167289197445,
0.035342469811439514,
0.060628581792116165,
-0.09410136938095093,
-0.017925366759300232,
0.02063913084566593,
-0.07493257522583008,
0.03742998093366623,
0.0174806360155344,
0.025939594954252243,
0.0026252721436321735,
0.028735043480992317,
0.01761677861213684,
0.03895477205514908,
-0.011662833392620087,
0.023307515308260918,
-0.014594425447285175,
0.0719555988907814,
-0.06251642107963562,
-0.03098592534661293,
-0.0648399069905281,
-0.021492287516593933,
-0.07184668630361557,
0.05943053215742111,
0.007814552634954453,
-0.026429705321788788,
-0.011308864690363407,
0.052387453615665436,
-0.004045687150210142,
-0.03078624978661537,
-0.028426455333828926,
-0.06454947590827942,
0.03793824464082718,
-0.0054910616017878056,
-0.011544844135642052,
0.028208628296852112,
0.02840830385684967,
0.07856302708387375,
-0.0062035382725298405,
-0.0329100675880909,
0.009017140604555607,
-0.01734449528157711,
0.03851911798119545,
-0.03790194168686867,
-0.02338012494146824,
0.06001140549778938,
0.012652132660150528,
0.04062478244304657,
0.031112991273403168,
0.013378223404288292,
0.01568356156349182,
-0.019023578613996506,
-0.036123018711805344,
-0.01642780564725399,
0.02966080978512764,
0.01734449528157711,
-0.010936742648482323,
0.0001497562334407121,
-0.002486861078068614,
-0.030731793493032455,
0.1455812156200409,
-0.038809552788734436,
0.003467083675786853,
0.012969797477126122,
-0.0023280286695808172,
0.021401526406407356,
0.02169196307659149,
0.03539692610502243,
-0.05409376695752144,
-0.03114929609000683,
0.004674209747463465,
0.007501425687223673,
-0.025358721613883972,
-0.028426455333828926,
-0.032528869807720184,
0.0021328916773200035,
-0.002704688347876072,
0.02653861977159977,
-0.039317816495895386,
0.0203668475151062,
-0.054928772151470184,
-0.04578002542257309,
-0.00482850382104516,
-0.004179560113698244,
-0.0454895906150341,
-0.03078624978661537,
-0.0021612546406686306,
0.04015282168984413,
0.04047956317663193,
0.06284315884113312,
-0.03009646385908127,
-0.09562616050243378,
0.01571078971028328,
-0.023089688271284103,
0.013577898032963276,
-0.004640174098312855,
-0.049737222492694855,
-0.03269223868846893,
-0.03610486537218094,
0.023035231977701187,
-0.015765246003866196,
0.02575807087123394,
0.03559660166501999,
-0.02915254607796669,
0.03470714017748833,
-0.06091902032494545,
-0.009829454123973846,
-0.020475761964917183,
0.04425523430109024,
0.0055591329000890255,
-0.02274479530751705,
0.030731793493032455,
0.03628638759255409,
-0.052314843982458115,
0.02840830385684967,
-0.021455984562635422,
-0.035487689077854156,
-0.005727041512727737,
-0.05580008029937744,
-0.008409039117395878,
-0.00977499783039093,
0.007723791059106588,
0.003237911267206073,
0.03957194834947586,
-0.03383583202958107,
-0.0668729618191719,
-0.043093491345644,
0.03499757871031761,
-0.040298040956258774,
0.040261734277009964,
0.035651057958602905,
-0.1058640405535698,
-0.04440045356750488,
-0.00690693873912096,
0.011327017098665237,
-0.014249532483518124,
-0.0037098703905940056,
-0.06146358698606491,
0.013350995257496834,
-0.0665099173784256,
0.009057982824742794,
-0.0349612720310688,
-0.0012559102615341544,
0.015211602672934532,
0.06538447737693787,
0.00018875524983741343,
-0.02412436716258526,
-0.05300462990999222,
0.04385588690638542,
-0.021256309002637863,
-0.02962450496852398,
0.0007232545176520944,
-0.08538828045129776,
-0.0685429722070694,
-0.0010261705610901117,
0.023779474198818207,
-0.04280305281281471,
0.002754607005044818,
0.012107564136385918,
0.04367436096072197,
0.008286511525511742,
-0.040878914296627045,
0.0012286817654967308,
0.005182472988963127,
0.005963020958006382,
0.04941048100590706,
-0.020239781588315964,
0.037829332053661346,
-0.04131456837058067,
-0.009729617275297642,
0.0006591543206013739,
0.012125716544687748,
0.02541317790746689,
0.03153049200773239,
-0.02169196307659149,
-0.01523883081972599,
0.03314604610204697,
0.038337595760822296,
0.03438039869070053,
-0.03761150315403938,
-0.009883911348879337,
-0.008182136341929436,
0.03690356761217117,
-0.021546745672822,
0.034126266837120056,
-0.008413577452301979,
-0.017634930089116096,
0.034943122416734695,
0.07725606113672256,
0.05351289361715317,
0.03581443056464195,
0.010292337276041508,
-0.04051586613059044,
0.032056909054517746,
0.12278195470571518,
0.007605801336467266,
-0.024868611246347427,
-0.01734449528157711,
0.001057937042787671,
-0.010619077831506729,
0.039317816495895386,
0.04196804761886597,
-0.02267218567430973,
-0.0020602827426046133,
0.023343820124864578,
-0.00463336706161499,
-0.02739177644252777,
0.012761046178638935,
0.007850856520235538,
0.02131076529622078,
-0.05155244842171669,
0.03750259056687355,
-0.04701438173651695,
-0.023343820124864578,
0.01619182527065277,
0.041859135031700134,
0.02653861977159977,
-0.052278537303209305,
0.044436756521463394,
0.005917640402913094,
-0.02169196307659149,
-0.000041126237192656845,
0.05525550991296768,
0.02443295530974865,
0.03094962053000927,
0.028934719040989876,
-0.016500413417816162,
0.039317816495895386,
0.005400300491601229,
0.020076410844922066,
0.038773249834775925,
0.02443295530974865,
-0.04327501356601715,
-0.03648606315255165,
-0.038192376494407654,
0.026284487918019295,
0.027409927919507027,
-0.007460583001375198,
-0.053331371396780014,
-0.051879189908504486,
-0.07979737967252731,
0.06291577219963074,
-0.008672247640788555,
0.02677459828555584,
-0.01299702562391758,
0.00875393208116293,
-0.0021805413998663425,
-0.011399625800549984,
-0.005422990769147873,
0.014258608222007751,
0.007328979205340147,
-0.020893262699246407,
0.003648606361821294,
0.009920216165482998,
-0.015955844894051552,
-0.007737405132502317,
-0.004179560113698244,
0.04588893800973892,
-0.03692171722650528,
0.060229234397411346,
0.03581443056464195,
-0.0031675712671130896,
0.017181124538183212,
-0.057542696595191956,
-0.022454358637332916,
-0.05932161957025528,
0.023597951978445053,
-0.008658632636070251,
-0.06284315884113312,
-0.03859172761440277,
-0.0053095389157533646,
0.0051960875280201435,
0.07326256483793259,
0.016073836013674736,
0.038264986127614975,
-0.057034432888031006,
0.0242695864289999,
0.010174348019063473,
0.02572176791727543,
-0.006062858272343874,
-0.05997510254383087,
-0.024723391979932785,
-0.025304265320301056,
0.09257657825946808,
0.1126892939209938,
0.00923042930662632,
0.0009785208385437727,
-0.0186605341732502,
0.019894888624548912,
-0.05895857512950897,
-0.019259558990597725,
0.011281636543571949,
0.030296139419078827,
0.01896912232041359,
-0.01108196098357439,
0.008517952635884285,
-0.015311440452933311,
-0.02759145200252533,
-0.013341918587684631,
-0.02158305048942566,
0.04676024988293648,
0.07097537815570831,
-0.07587648928165436,
-0.017698463052511215,
0.009439180605113506,
-0.05478355288505554,
0.006784411147236824,
0.02490491420030594,
-0.04280305281281471,
-0.0035533069167286158,
0.019695213064551353,
-0.023561647161841393,
0.010582773946225643,
0.03183908388018608,
-0.017453407868742943,
-0.01199865061789751,
-0.07573127001523972,
0.014567197300493717,
0.021220004186034203,
-0.03438039869070053,
0.0010278723202645779,
-0.06396859884262085,
-0.01336914673447609,
-0.03841020539402962,
0.04225848615169525,
-0.07878085225820541,
-0.05732487142086029,
0.01920510269701481,
-0.01069168746471405,
-0.04893852025270462,
0.02372501790523529,
-0.015021003782749176,
0.005391224287450314,
-0.002500475151464343,
0.056526169180870056,
0.03617747500538826,
-0.008477110415697098,
-0.05046331137418747,
0.05478355288505554,
-0.02704688347876072,
-0.009253120049834251,
0.010818753391504288,
0.03133082017302513,
0.029533743858337402,
0.016373347491025925,
-0.04200435429811478,
-0.04621567949652672,
0.0332549586892128,
-0.005168858915567398,
-0.029007328674197197,
-0.047086991369724274,
0.06952319294214249,
0.0072064511477947235,
-0.007238217629492283,
-0.002389292698353529,
0.03909999132156372,
0.0005059945397078991,
0.02103848196566105,
-0.02575807087123394,
-0.030060159042477608,
-0.009684236720204353,
-0.02388838864862919,
0.02165565825998783,
0.010364945977926254,
0.016445957124233246,
0.02412436716258526,
0.04385588690638542,
-0.06487621366977692,
0.050281789153814316,
0.006879710592329502,
-0.022799251601099968,
0.056562475860118866,
0.056054212152957916,
0.044436756521463394,
0.002274706494063139,
0.019132493063807487,
0.07348039001226425,
-0.045598503202199936,
0.02454186975955963,
0.03746628761291504,
-0.012416153214871883,
-0.06578382849693298,
-0.03352724388241768,
-0.03679465129971504,
0.07413387298583984,
0.020820654928684235,
-0.0062806857749819756,
-0.008921841159462929,
0.011726366356015205,
-0.03855542093515396,
-0.03336387127637863,
0.022145770490169525,
0.020003801211714745,
0.046506118029356,
0.020457608625292778,
0.03267408534884453,
-0.025267960503697395,
-0.0475226454436779,
-0.005255082156509161,
0.006335142534226179,
0.04280305281281471,
0.021746419370174408,
-0.05714334920048714,
-0.08909134566783905,
0.043420229107141495,
-0.05296832695603371,
-0.028898414224386215,
-0.010610002093017101,
0.00482850382104516,
-0.009293962270021439,
-0.016917916014790535,
0.00015315978089347482,
-0.07478735595941544,
-0.039317816495895386,
0.0008055070065893233,
-0.051225706934928894,
0.008490724489092827,
0.025140894576907158,
0.07515040040016174,
0.011299788020551205,
0.02443295530974865,
0.025667309761047363,
-0.04745003581047058,
0.050245486199855804,
0.024015454575419426,
0.0234164297580719,
0.03016907349228859,
0.012352620251476765,
-0.008871922269463539,
-0.045453283935785294,
0.04516284912824631,
-0.049737222492694855,
0.030568422749638557,
-0.03479790315032005,
0.0029610891360789537,
-0.024487413465976715,
0.011808051727712154,
-0.01287903543561697,
0.02361610345542431,
-0.024723391979932785,
-0.050245486199855804,
-0.01605568267405033,
-0.018488086760044098,
0.06208076328039169,
-0.0239246916025877,
-0.010936742648482323,
0.0009830589406192303,
0.006035630125552416,
-0.005082635674625635,
0.045562200248241425,
-0.043492838740348816,
-0.038845859467983246,
0.018488086760044098,
-0.03125821053981781,
0.07950694113969803,
-0.017907215282320976,
0.030895164236426353,
-0.017870910465717316,
-0.03804715722799301,
0.014077086001634598,
0.036504216492176056,
0.042367398738861084,
-0.05452942103147507,
0.04363805800676346,
0.061681415885686874,
0.059140097349882126,
-0.02103848196566105,
-0.02583068050444126,
0.07856302708387375,
-0.009094287641346455,
-0.04160500317811966,
-0.06832514703273773,
-0.006934167351573706,
-0.018243031576275826,
-0.03231104090809822,
-0.010364945977926254,
-0.02497752383351326,
-0.0648399069905281,
-0.0019763284362852573,
-0.0037098703905940056,
-0.008622328750789165,
-0.025195350870490074,
-0.01199865061789751,
-0.02372501790523529,
0.031403426080942154,
-0.011245331726968288,
-0.07253647595643997,
0.034598227590322495,
-0.029315916821360588,
-0.0009274675976485014,
0.0621170699596405,
0.03379952907562256,
-0.03047766163945198,
0.02755514718592167,
-0.009053444489836693,
0.022926317527890205,
0.0417502224445343,
0.04269414022564888,
0.0651666522026062,
-0.04686916247010231,
-0.06654622405767441,
-0.01069168746471405,
-0.04018912836909294,
-0.08974482864141464,
0.03501572832465172,
0.047050684690475464,
0.05558225139975548,
-0.005109864287078381,
-0.015411277301609516,
-0.00514163076877594,
0.02637524902820587,
0.004951031878590584,
0.006330604199320078,
0.023089688271284103,
-0.020711740478873253,
-0.031911689788103104,
-0.00977499783039093,
-0.011508539319038391,
-0.013087786734104156,
-0.020112715661525726,
-0.056998129934072495,
0.03269223868846893,
-0.08662263303995132,
-0.03136712312698364,
0.015992149710655212,
0.030586576089262962,
0.009126054123044014,
0.018106888979673386,
0.017934443429112434,
-0.047704167664051056,
0.06324250996112823,
0.028662435710430145,
0.04665133357048035,
0.033309414982795715,
-0.03939042612910271,
-0.04280305281281471,
-0.004640174098312855,
-0.05500137805938721,
-0.008213902823626995,
-0.01012896653264761,
0.03216582164168358,
0.024069910869002342,
0.05521920695900917,
0.0012525066267699003,
-0.05100788176059723,
0.0060038636438548565,
-0.009892987087368965,
0.05373071879148483,
0.007179223001003265,
-0.03078624978661537,
-0.021964246407151222,
-0.03851911798119545,
0.03746628761291504,
-0.024069910869002342,
0.005722503177821636,
0.003467083675786853,
0.06128206476569176,
0.0058223409578204155,
-0.01070983987301588,
0.008885536342859268,
-0.03909999132156372,
-0.06545709073543549,
-0.032093215733766556,
0.02857167460024357,
-0.006503050681203604,
0.051770273596048355,
-0.025685463100671768,
0.03305528312921524,
-0.008554257452487946,
0.02216392196714878,
-0.022472510114312172,
-0.054311592131853104,
0.04490871727466583,
-0.049301568418741226,
-0.020784350112080574,
0.04490871727466583,
-0.031911689788103104,
-0.025195350870490074,
-0.02243620716035366,
-0.023325666785240173,
-0.024305889382958412,
-0.03554214537143707,
-0.04182283207774162,
-0.030423205345869064,
0.03634084388613701,
-0.004070646595209837,
0.052351146936416626,
-0.06676404923200607,
-0.010737068019807339,
-0.008676785044372082,
0.00041693495586514473,
0.03786563500761986,
0.006552969571202993,
0.04145978391170502,
0.01994934491813183,
0.021873485296964645,
0.05460203066468239,
-0.010963971726596355,
-0.010510164313018322,
0.06505773961544037,
0.02857167460024357,
0.0332549586892128,
0.05663508549332619,
-0.0074696592055261135,
0.022690337151288986,
-0.041423480957746506,
-0.02528611198067665,
0.022109465673565865,
0.02274479530751705,
-0.021165547892451286,
-0.039789777249097824,
0.02283555641770363,
-0.011018428020179272,
-0.04305718466639519,
0.04229478910565376,
-0.05246006324887276,
0.04578002542257309,
-0.017081286758184433,
0.005790574476122856,
0.03024168312549591,
0.06429534405469894,
0.00440419465303421,
0.03811976686120033,
0.030532119795680046,
-0.02973341941833496,
0.0009229294955730438,
0.045453283935785294,
0.029261460527777672,
0.008145831525325775,
0.02232729271054268,
0.046542420983314514,
0.023089688271284103,
-0.01771661639213562,
0.012670285068452358,
-0.01713574305176735,
0.03855542093515396,
-0.07936172932386398,
-0.037829332053661346,
0.0488659106194973,
-0.030731793493032455,
0.033000826835632324,
0.015955844894051552,
0.01208033598959446,
0.04153239354491234,
0.004061570391058922,
0.04944678395986557,
-0.004263514652848244,
0.031004078686237335,
0.027228405699133873,
0.0249412190169096,
-0.06538447737693787,
0.02610296569764614,
-0.0648399069905281,
0.03320050239562988,
0.04730481654405594,
0.0009552632109262049,
-0.05714334920048714,
0.012706588953733444,
0.0024097138084471226,
0.027264710515737534,
-0.01734449528157711,
0.016473185271024704,
-0.0028362921439111233,
0.0366494357585907,
0.01795259490609169,
0.04254892095923424,
0.01978597417473793,
0.03470714017748833,
-0.03570551425218582,
-0.01303333044052124,
0.01149038691073656,
-0.011118265800178051,
-0.04933787137269974,
-0.010882286354899406,
0.003696256084367633,
0.06926906108856201,
0.02072989195585251,
-0.03067733719944954,
-0.031312666833400726,
-0.0019071229035034776,
0.036740195006132126,
-0.05220593139529228,
-0.019913040101528168,
-0.011136418208479881,
-0.040334343910217285,
-0.015129917301237583,
0.012733818031847477,
0.06255272030830383,
-0.030532119795680046,
-0.0013432679697871208,
0.03016907349228859,
0.0065665836445987225
]
|
41,347 | pyglove.core.typing.class_schema | keys | Return an iteratable of KeySpecs in declaration order. | def keys(self) -> Iterable[KeySpec]:
"""Return an iteratable of KeySpecs in declaration order."""
return self._fields.keys()
| (self) -> Iterable[pyglove.core.typing.class_schema.KeySpec] | [
0.03299884870648384,
-0.0180513933300972,
-0.089060477912426,
-0.021398097276687622,
-0.009927399456501007,
0.0019020290346816182,
0.02034033089876175,
-0.04744343087077141,
0.06776642054319382,
0.017349105328321457,
-0.021536819636821747,
-0.0516744963824749,
0.017843307927250862,
0.002203318988904357,
0.01066436804831028,
-0.06388216465711594,
-0.023114800453186035,
0.014756710268557072,
-0.05236811563372612,
-0.03887725621461868,
-0.007543089333921671,
0.018484903499484062,
0.035374488681554794,
-0.03492363542318344,
-0.006533009000122547,
0.060934290289878845,
0.02132873609662056,
-0.014947455376386642,
0.05743152275681496,
0.012172985821962357,
-0.06114237383008003,
0.008288728073239326,
0.04567470774054527,
0.0002573970705270767,
-0.022039692848920822,
-0.06041407585144043,
0.033102892339229584,
-0.01471335906535387,
0.03877321258187294,
0.02583724819123745,
0.03582533821463585,
0.02002820186316967,
-0.00282649090513587,
-0.059234924614429474,
-0.0232708640396595,
0.008288728073239326,
0.05455300956964493,
0.0020732658449560404,
0.03655363619327545,
-0.010855112224817276,
0.023444268852472305,
-0.011999581009149551,
0.00581338070333004,
-0.02257724665105343,
-0.013967720791697502,
-0.0483798123896122,
0.017557190731167793,
-0.04224130138754845,
-0.02066979929804802,
0.04744343087077141,
-0.027068419381976128,
-0.010542984120547771,
-0.005587955005466938,
-0.02644416317343712,
0.005678992718458176,
-0.06901492923498154,
-0.006207875907421112,
-0.01940394751727581,
-0.018640967085957527,
-0.015068838372826576,
-0.027883419767022133,
-0.029652144759893417,
0.009701973758637905,
0.03676172345876694,
-0.06020599231123924,
-0.026721609756350517,
-0.02718980237841606,
0.04890002682805061,
0.044391512870788574,
-0.0879506841301918,
-0.03100469894707203,
0.017496498301625252,
-0.06859876215457916,
0.020253628492355347,
0.02816086634993553,
0.03358842432498932,
0.01836352050304413,
0.01435788068920374,
0.012198995798826218,
0.02781405858695507,
-0.03206246346235275,
0.03998704254627228,
-0.0035201082937419415,
0.07005535811185837,
-0.026756292209029198,
0.0013493025908246636,
-0.05177854001522064,
-0.0012485113693401217,
-0.023704374209046364,
0.019785435870289803,
0.012779900804162025,
0.001923704519867897,
0.04009108617901802,
0.06679535657167435,
-0.008982345461845398,
-0.023461608216166496,
-0.05004449561238289,
-0.06249492987990379,
-0.007811866234987974,
0.002140460070222616,
-0.019837457686662674,
0.026288099586963654,
0.04612555727362633,
0.014461922459304333,
0.035027679055929184,
-0.051535774022340775,
0.04616023972630501,
-0.005635641515254974,
0.03801023215055466,
-0.040576618164777756,
-0.026947036385536194,
0.06554684787988663,
0.009797345846891403,
0.037004489451646805,
0.025611823424696922,
0.025351716205477715,
0.03703916817903519,
0.026669589802622795,
-0.03462884947657585,
0.008839286863803864,
0.05455300956964493,
0.05326981842517853,
-0.02169288508594036,
0.03742066025733948,
0.02098192647099495,
-0.02710309997200966,
0.13629582524299622,
-0.03175033628940582,
0.041582364588975906,
0.013664263300597668,
0.025334374979138374,
-0.005973780062049627,
0.03544384986162186,
0.04106215015053749,
-0.03324161469936371,
-0.02491820603609085,
-0.0017091166228055954,
-0.04002172499895096,
0.006489657796919346,
-0.0028546692337840796,
0.002041836269199848,
0.006546014454215765,
0.004638566169887781,
-0.00887830276042223,
-0.03003363311290741,
0.022854693233966827,
-0.0452585369348526,
-0.05916556343436241,
-0.0033987252973020077,
-0.01588383875787258,
-0.03369246423244476,
-0.017687244340777397,
-0.00197680969722569,
0.012875272892415524,
0.023097459226846695,
0.04456491768360138,
-0.052160028368234634,
-0.06017130985856056,
0.025386396795511246,
-0.0142018161714077,
0.026999058201909065,
0.01500814687460661,
-0.021450119093060493,
-0.025403738021850586,
-0.014591976068913937,
0.0033878874965012074,
-0.00003525662759784609,
0.05306173115968704,
0.003192807547748089,
-0.011219261214137077,
0.056078966706991196,
-0.033432360738515854,
-0.030172357335686684,
-0.010889792814850807,
0.03922406584024429,
0.0046819173730909824,
-0.024744801223278046,
0.028958527371287346,
0.022785332053899765,
-0.06301514059305191,
0.005774364806711674,
-0.01407176349312067,
-0.023721715435385704,
0.0555240735411644,
-0.030155016109347343,
-0.014011071994900703,
-0.003593805246055126,
-0.007087903097271919,
-0.02037501148879528,
0.03967491537332535,
-0.01421048678457737,
-0.029461398720741272,
-0.05132768675684929,
0.003582967445254326,
-0.003593805246055126,
0.013941709883511066,
0.021103309467434883,
-0.0936383530497551,
0.013135379180312157,
-0.01936926692724228,
-0.012823252007365227,
-0.05143173038959503,
-0.006658727303147316,
-0.048033006489276886,
0.019560011103749275,
-0.04647236689925194,
0.009554579854011536,
-0.008518489077687263,
0.008358090184628963,
-0.019646713510155678,
0.07262174040079117,
0.06076088547706604,
-0.0042635793797671795,
-0.0491081140935421,
0.013490858487784863,
-0.015563040971755981,
-0.0024103205651044846,
0.010447612032294273,
-0.0962047353386879,
-0.07130386680364609,
-0.014028412289917469,
0.042865555733442307,
-0.03558257222175598,
0.008332079276442528,
0.006970854941755533,
0.03676172345876694,
-0.003303352976217866,
-0.005375534761697054,
0.012450432404875755,
0.008674552664160728,
-0.007712158374488354,
0.05718875676393509,
-0.002887182403355837,
0.027016397565603256,
-0.05011385679244995,
0.0010626435978338122,
0.0018294159090146422,
0.03525310382246971,
0.034472785890102386,
0.03223586827516556,
-0.024623418226838112,
-0.07192812860012054,
0.03369246423244476,
0.026270758360624313,
0.017574530094861984,
-0.027657993137836456,
-0.013386815786361694,
0.002129622269421816,
0.0491081140935421,
-0.008930323645472527,
0.004564869683235884,
0.02847299538552761,
-0.04255342856049538,
0.04300427809357643,
0.06655258685350418,
0.030276399105787277,
0.04820641130208969,
0.03780214861035347,
-0.04432215169072151,
0.01900511607527733,
0.07747706770896912,
0.009268462657928467,
-0.0549691803753376,
-0.01585782878100872,
0.021415436640381813,
0.00038907601265236735,
0.02323618344962597,
0.024293949827551842,
-0.03270405903458595,
0.01812075451016426,
0.028282249346375465,
-0.02321884222328663,
-0.013490858487784863,
0.018259478732943535,
-0.0241899061948061,
0.026080014184117317,
-0.06464514136314392,
-0.015485008247196674,
-0.03485427424311638,
-0.045397259294986725,
0.023721715435385704,
0.06263364851474762,
0.026738950982689857,
-0.08198557794094086,
0.03263469785451889,
-0.02942671813070774,
-0.015563040971755981,
-0.06471450626850128,
0.05621768906712532,
0.03648427501320839,
0.04890002682805061,
0.02743256837129593,
-0.004213725682348013,
0.018328839913010597,
-0.02096458524465561,
0.00006475568807218224,
0.04914279282093048,
0.0406806617975235,
-0.04730470851063728,
-0.041859809309244156,
-0.04480768367648125,
0.04040321335196495,
-0.0016971951117739081,
-0.017409797757864,
-0.036345552653074265,
-0.0879506841301918,
-0.03455948829650879,
0.04480768367648125,
0.015224901959300041,
0.05985918268561363,
-0.0010073708835989237,
0.03197576105594635,
-0.01613527536392212,
-0.01616128534078598,
-0.01740112714469433,
-0.005778700113296509,
0.06287641823291779,
-0.015493678860366344,
-0.0028655068017542362,
-0.006485322955995798,
-0.011479368433356285,
-0.05007917806506157,
0.017409797757864,
0.03780214861035347,
-0.04064597934484482,
0.049871090799570084,
0.04907343164086342,
0.014340539462864399,
0.006281572859734297,
-0.02842097356915474,
-0.010681708343327045,
-0.08559238910675049,
0.033154912292957306,
-0.01874501071870327,
-0.11375325173139572,
-0.041894491761922836,
-0.00906037725508213,
-0.02224777825176716,
0.034698210656642914,
0.0406806617975235,
0.0478249192237854,
-0.012346389703452587,
0.04824109002947807,
0.025317035615444183,
0.05472641438245773,
0.0018023215234279633,
-0.04047257453203201,
-0.017825966700911522,
-0.03887725621461868,
0.06131577864289284,
0.1253366619348526,
0.012736549600958824,
-0.015224901959300041,
-0.04813704639673233,
0.0059000831097364426,
-0.04584810882806778,
-0.01505149807780981,
-0.028178207576274872,
0.026704270392656326,
0.020114904269576073,
-0.02552512101829052,
0.019490649923682213,
-0.0277620367705822,
-0.01084644254297018,
-0.006975190248340368,
-0.0362761914730072,
0.03485427424311638,
0.06148918345570564,
-0.050217900425195694,
0.017895329743623734,
-0.029010547325015068,
-0.033779166638851166,
0.03421267867088318,
0.04661108925938606,
-0.07504940032958984,
-0.0004202346026431769,
0.024397991597652435,
-0.04099278897047043,
0.028299590572714806,
0.02392980083823204,
0.018623627722263336,
-0.034438103437423706,
-0.04973236843943596,
0.04810236766934395,
0.01872766949236393,
-0.04754747450351715,
0.010785751044750214,
-0.0337098054587841,
0.010742399841547012,
-0.03287746384739876,
0.04355917125940323,
-0.05340854078531265,
-0.030293740332126617,
0.018519584089517593,
0.02162352204322815,
-0.04165172576904297,
0.02809150516986847,
-0.04414874687790871,
-0.012493783608078957,
-0.01871033012866974,
0.008132664486765862,
0.02066979929804802,
0.0003855537506751716,
-0.028178207576274872,
0.04491172730922699,
-0.026929695159196854,
-0.007738169282674789,
-0.010924474336206913,
0.03742066025733948,
0.05014853924512863,
0.015961870551109314,
-0.06252960860729218,
-0.01839820109307766,
0.041894491761922836,
0.047027260065078735,
0.022490544244647026,
-0.023062778636813164,
0.025941291823983192,
0.0038127282168716192,
-0.007365349680185318,
-0.02935735695064068,
0.05226407200098038,
-0.009043036960065365,
0.022161075845360756,
-0.029634803533554077,
-0.021450119093060493,
-0.011479368433356285,
-0.008345084264874458,
0.006220880895853043,
0.011548729613423347,
-0.013144049793481827,
0.0031169431749731302,
0.015606391243636608,
-0.037004489451646805,
0.06145450100302696,
0.020773841068148613,
0.003996970131993294,
0.07345408201217651,
0.08260983228683472,
0.04688853770494461,
0.02193565107882023,
-0.01196490041911602,
0.060587480664253235,
-0.08517621457576752,
0.029270654544234276,
0.06481854617595673,
0.0006415960961021483,
-0.023010756820440292,
-0.048275772482156754,
-0.05722343549132347,
0.08316472917795181,
0.03525310382246971,
0.00044191014603711665,
0.006190535146743059,
0.02420724742114544,
-0.014253837987780571,
-0.04643768444657326,
0.044426195323467255,
0.03171565756201744,
0.04529321566224098,
0.017201712355017662,
0.04106215015053749,
-0.014106444083154202,
-0.027970122173428535,
-0.022820012643933296,
0.0013319621793925762,
0.02422458864748478,
0.0516744963824749,
-0.06502663344144821,
-0.06686472147703171,
0.004387130029499531,
-0.061246417462825775,
-0.02257724665105343,
-0.02618405781686306,
0.024935545399785042,
-0.03391789272427559,
-0.026652248576283455,
-0.018016712740063667,
-0.0793498307466507,
-0.039952363818883896,
0.002999895252287388,
-0.038911934942007065,
0.01210362371057272,
0.028195546939969063,
0.12186858057975769,
0.007109578233212233,
0.042449384927749634,
0.01973341591656208,
-0.050183217972517014,
0.05392875149846077,
0.010092133656144142,
0.03814895823597908,
0.029825547710061073,
0.025351716205477715,
-0.006480987649410963,
-0.03070991113781929,
0.03544384986162186,
-0.06644854694604874,
0.00500271562486887,
-0.04033385217189789,
0.006424630992114544,
-0.007504073437303305,
-0.0028286585584282875,
0.0009575171279720962,
0.024380652233958244,
-0.025958631187677383,
-0.045744068920612335,
-0.026617567986249924,
-0.021103309467434883,
0.10258601605892181,
-0.024415332823991776,
-0.0045258537866175175,
0.022213097661733627,
0.009901388548314571,
0.009511228650808334,
0.06516535580158234,
-0.04650704562664032,
-0.04747810959815979,
0.026652248576283455,
0.0006757350638508797,
0.06076088547706604,
-0.00558362016454339,
0.04692321643233299,
0.044079385697841644,
-0.07282982766628265,
0.004677582532167435,
0.02169288508594036,
0.023981822654604912,
-0.022872034460306168,
0.03485427424311638,
0.05743152275681496,
0.04609087482094765,
0.02292405441403389,
-0.012511123903095722,
0.07116514444351196,
0.041894491761922836,
-0.03433405980467796,
-0.06859876215457916,
-0.04366321489214897,
-0.016993626952171326,
-0.018987776711583138,
-0.003377049695700407,
-0.014808731153607368,
-0.07629791647195816,
0.000762979150749743,
-0.012407081201672554,
0.04532789811491966,
-0.04553598165512085,
-0.03690044581890106,
-0.006194870453327894,
0.016698839142918587,
-0.019854798913002014,
-0.03804491460323334,
-0.0028438314329832792,
-0.028681078925728798,
-0.008488142862915993,
0.06738492846488953,
0.013144049793481827,
-0.019837457686662674,
0.023149481043219566,
-0.01714969053864479,
0.043143004179000854,
0.0641249269247055,
0.031108740717172623,
0.018658308312296867,
-0.018901074305176735,
-0.05965109542012215,
0.004473832435905933,
-0.050842154771089554,
-0.09183494746685028,
0.04588279128074646,
0.017236392945051193,
0.05278428643941879,
0.0021913975942879915,
-0.031160762533545494,
-0.015970541164278984,
0.018883733078837395,
-0.0006367191090248525,
-0.026947036385536194,
0.013395486399531364,
-0.029582781717181206,
-0.034143317490816116,
-0.020635118708014488,
-0.011999581009149551,
-0.02358299121260643,
-0.020877884700894356,
-0.020947245880961418,
0.011852187104523182,
-0.055732157081365585,
-0.03488895669579506,
0.043108321726322174,
0.017279744148254395,
0.03318959102034569,
0.048622578382492065,
0.01618729531764984,
-0.032131824642419815,
0.055732157081365585,
0.04352449253201485,
0.04550130292773247,
0.005050401668995619,
-0.07206685096025467,
-0.022767990827560425,
-0.007387025281786919,
-0.0646798238158226,
0.003303352976217866,
-0.0008886972791515291,
0.05129300802946091,
0.005947769153863192,
0.04432215169072151,
-0.0015996551373973489,
-0.024484694004058838,
-0.009511228650808334,
0.020635118708014488,
0.04446087405085564,
-0.007582105230540037,
-0.05486513674259186,
-0.033779166638851166,
-0.017704583704471588,
0.02288937382400036,
-0.034767571836709976,
0.007387025281786919,
-0.012519794516265392,
0.048622578382492065,
-0.003498432692140341,
0.02651352621614933,
0.0037108531687408686,
-0.04029916971921921,
-0.07012472301721573,
-0.0386691689491272,
0.023669693619012833,
-0.045744068920612335,
0.04331640526652336,
-0.011071868240833282,
0.024744801223278046,
-0.021571502089500427,
0.019490649923682213,
-0.016300009563565254,
-0.04293491691350937,
0.05212534964084625,
-0.06207875907421112,
0.010707718320190907,
0.030137676745653152,
-0.026686929166316986,
-0.04009108617901802,
-0.040611300617456436,
-0.011574740521609783,
-0.021779585629701614,
-0.04560534283518791,
-0.0190571378916502,
-0.04338577017188072,
0.04265747219324112,
0.015380965545773506,
0.029877569526433945,
-0.04792896285653114,
-0.02524767443537712,
0.0002699960023164749,
0.012198995798826218,
0.0064636473543941975,
-0.02613203600049019,
0.04390598088502884,
0.012970645911991596,
-0.0011423011310398579,
0.034143317490816116,
-0.03749002143740654,
-0.02425926923751831,
0.06017130985856056,
0.012060272507369518,
0.010993835516273975,
0.08018217235803604,
-0.03336299583315849,
-0.023166822269558907,
-0.01643873192369938,
-0.010300218127667904,
0.016013892367482185,
0.019507989287376404,
-0.04227598011493683,
0.0006692323950119317,
-0.0006638135528191924,
0.006090827751904726,
-0.036657679826021194,
0.04501577094197273,
-0.044391512870788574,
0.04394066333770752,
-0.008488142862915993,
-0.015164210461080074,
0.03943214938044548,
0.05385939031839371,
-0.011834846809506416,
-0.0036870099138468504,
0.01803405210375786,
-0.032495975494384766,
-0.005293167661875486,
0.025629162788391113,
0.02519565261900425,
-0.016326019540429115,
0.04102746769785881,
0.04567470774054527,
0.014921444468200207,
0.0033076880499720573,
0.007556094788014889,
-0.01622197777032852,
0.02332288585603237,
-0.056668542325496674,
-0.06585897505283356,
0.05621768906712532,
-0.02451937459409237,
0.03613746538758278,
-0.013837667182087898,
0.03258267790079117,
0.05812513828277588,
0.02330554462969303,
0.021207353100180626,
-0.010673037730157375,
0.03466352820396423,
-0.002395147690549493,
0.016273997724056244,
-0.047686196863651276,
0.044391512870788574,
-0.06273769587278366,
0.027970122173428535,
0.034992996603250504,
-0.01017883513122797,
-0.0646798238158226,
0.007053222041577101,
-0.004369789734482765,
-0.01290995441377163,
-0.02288937382400036,
-0.03041512332856655,
0.02361767180263996,
0.03780214861035347,
0.004159536678344011,
0.03518374264240265,
-0.010386920534074306,
0.01163543201982975,
0.012381070293486118,
-0.012459103018045425,
0.01500814687460661,
-0.0021664705127477646,
-0.005384204909205437,
-0.037940870970487595,
-0.027311185374855995,
0.034108635038137436,
-0.008284392766654491,
-0.0725523829460144,
-0.05354726314544678,
0.0045692045241594315,
-0.0009282551473006606,
-0.01806873269379139,
-0.010092133656144142,
0.013126709498465061,
-0.03589469939470291,
-0.04328172653913498,
-0.00525415176525712,
0.05392875149846077,
-0.03759406507015228,
0.002369137015193701,
0.06648322939872742,
-0.018484903499484062
]
|
41,348 | pyglove.core.typing.class_schema | resolve | Resolve keys by grouping them by their matched fields.
Args:
keys: A list of string keys.
Returns:
A tuple of matched key results and unmatched keys.
Matched key results are an ordered dict of KeySpec to matched keys,
in field declaration order.
Unmatched keys are strings from input.
| def resolve(
self, keys: Iterable[str]
) -> Tuple[Dict[KeySpec, List[str]], List[str]]:
"""Resolve keys by grouping them by their matched fields.
Args:
keys: A list of string keys.
Returns:
A tuple of matched key results and unmatched keys.
Matched key results are an ordered dict of KeySpec to matched keys,
in field declaration order.
Unmatched keys are strings from input.
"""
keys = list(keys)
input_keyset = set(keys)
nonconst_key_specs = [k for k in self._fields.keys() if not k.is_const]
nonconst_keys = {k: [] for k in nonconst_key_specs}
unmatched_keys = []
keys_by_key_spec = dict()
for key in keys:
if key not in self._fields:
matched_nonconst_keys = False
for key_spec in nonconst_key_specs:
if key_spec.match(key):
nonconst_keys[key_spec].append(key)
matched_nonconst_keys = True
break
if not matched_nonconst_keys:
unmatched_keys.append(key)
for key_spec in self._fields.keys():
keys = []
if not key_spec.is_const:
keys = nonconst_keys.get(key_spec, [])
elif key_spec in input_keyset:
keys.append(str(key_spec))
keys_by_key_spec[key_spec] = keys
return (keys_by_key_spec, unmatched_keys)
| (self, keys: Iterable[str]) -> Tuple[Dict[pyglove.core.typing.class_schema.KeySpec, List[str]], List[str]] | [
0.0241989865899086,
-0.010288813151419163,
-0.08955322206020355,
0.0185971949249506,
-0.02851821295917034,
-0.024651655927300453,
0.06454320251941681,
-0.03417658805847168,
0.07585995644330978,
-0.0020676646381616592,
-0.016135800629854202,
0.015202169306576252,
0.03140398487448692,
-0.019917482510209084,
0.00604974664747715,
-0.03044206090271473,
-0.039306849241256714,
0.039306849241256714,
-0.045267004519701004,
-0.059337496757507324,
-0.02800895832479,
0.00545561732724309,
0.020917128771543503,
0.03296946734189987,
0.008610161952674389,
-0.0003586584934964776,
0.05398090183734894,
-0.03489331528544426,
0.029197217896580696,
0.03274313360452652,
0.020690793171525,
0.04579512029886246,
0.01921018585562706,
0.01414593867957592,
-0.04553106054663658,
-0.10947070270776749,
0.028027819469571114,
0.0318189337849617,
0.004550277255475521,
0.014193092472851276,
0.028348460793495178,
0.015022987499833107,
0.033610749989748,
-0.09000589698553085,
0.008039608597755432,
0.03511965274810791,
0.006030885502696037,
0.003951432183384895,
0.010788636282086372,
0.04639868065714836,
0.026405753567814827,
-0.06888129562139511,
-0.05164210870862007,
-0.04911470040678978,
0.018682070076465607,
0.008614877238869667,
-0.005573499947786331,
0.012372980825603008,
-0.034421782940626144,
-0.04134386405348778,
-0.01921018585562706,
0.007846280932426453,
-0.021350936964154243,
0.04711540788412094,
-0.0708051398396492,
-0.056621477007865906,
0.02340681292116642,
-0.07959448546171188,
-0.06386420130729675,
-0.014890958555042744,
-0.050585877150297165,
-0.005186844151467085,
-0.04228692501783371,
-0.013127431273460388,
0.04085347056388855,
0.01468348503112793,
-0.0032559235114604235,
-0.003548273118212819,
0.054471295326948166,
-0.026764117181301117,
-0.006563715636730194,
-0.030781563371419907,
-0.03960862755775452,
-0.04696451872587204,
0.033346693962812424,
0.0403253547847271,
0.027461983263492584,
0.03593068569898605,
0.04202286899089813,
-0.003689732402563095,
-0.06695744395256042,
0.014174230396747589,
-0.00015781563706696033,
0.05315100774168968,
-0.007940586656332016,
0.044776611030101776,
-0.052585169672966,
-0.04341860115528107,
-0.01867263950407505,
0.012891666032373905,
0.054395850747823715,
-0.01511729322373867,
-0.029668748378753662,
0.005054815672338009,
0.054320406168699265,
-0.06888129562139511,
-0.02548155188560486,
-0.039382293820381165,
0.005964871030300856,
-0.023105032742023468,
-0.03498762100934982,
-0.06427914649248123,
0.00977012887597084,
0.07427561283111572,
-0.036006130278110504,
-0.02770717814564705,
-0.02814098820090294,
-0.0261416956782341,
0.03770364075899124,
-0.02865024097263813,
-0.046360958367586136,
0.0736343264579773,
-0.07510550320148468,
0.02125663124024868,
0.01321230735629797,
-0.04100436344742775,
0.044059883803129196,
0.011863727122545242,
0.042626429349184036,
0.05009548366069794,
0.03374277800321579,
0.10162442177534103,
-0.01780502125620842,
0.026688670739531517,
-0.0017010491574183106,
0.03606271371245384,
0.04315454512834549,
-0.0022527407854795456,
0.02297300472855568,
0.0027160202153027058,
0.01468348503112793,
-0.012655899859964848,
0.057979486882686615,
0.012476718053221703,
-0.009449487552046776,
-0.01174112968146801,
0.036930330097675323,
0.001982789020985365,
-0.02133207581937313,
0.036949191242456436,
-0.02110574021935463,
-0.01959684118628502,
-0.007983025163412094,
0.042890485376119614,
0.018908405676484108,
-0.002127785002812743,
0.003649652237072587,
-0.039533182978630066,
-0.008713898248970509,
-0.017361782491207123,
0.01889897510409355,
-0.03577979654073715,
0.01826712302863598,
0.02153955027461052,
0.024934574961662292,
0.0011075091315433383,
0.02849935181438923,
-0.045493338257074356,
0.03660969063639641,
-0.04364493861794472,
0.0041376869194209576,
0.04666273668408394,
-0.06156312674283981,
-0.046059176325798035,
-0.027763763442635536,
-0.0033360838424414396,
-0.01231639739125967,
-0.04654956981539726,
-0.03847695514559746,
0.002850406803190708,
0.06412825733423233,
-0.026179417967796326,
0.023897206410765648,
-0.005068961530923843,
0.0552634671330452,
0.09921018779277802,
0.0050453850999474525,
0.03246021270751953,
-0.018606625497341156,
-0.025387244299054146,
-0.011392195709049702,
-0.020370151847600937,
-0.017512671649456024,
0.05499941110610962,
-0.01762584038078785,
-0.019200755283236504,
-0.014136508107185364,
-0.01655074767768383,
-0.0352516807615757,
0.0824613943696022,
-0.07563362270593643,
-0.016135800629854202,
-0.029631026089191437,
0.04866202920675278,
0.001750559895299375,
-0.021860191598534584,
-0.008643168956041336,
-0.014862666837871075,
-0.0002225038333563134,
-0.003206412773579359,
-0.00612047640606761,
-0.03445950895547867,
-0.043192267417907715,
-0.05284922942519188,
-0.04364493861794472,
-0.01253330148756504,
0.026179417967796326,
0.039382293820381165,
-0.018229400739073753,
-0.028687963262200356,
0.09181657433509827,
0.01688081957399845,
0.05247200280427933,
-0.01928563043475151,
0.04345632344484329,
-0.019332783296704292,
0.002211481798440218,
0.03095131367444992,
-0.02815984934568405,
-0.05390545725822449,
0.001974537270143628,
-0.03611929714679718,
-0.02182246930897236,
0.004177767317742109,
0.027461983263492584,
-0.045342449098825455,
0.04006129875779152,
-0.018606625497341156,
0.07725568860769272,
0.019219616428017616,
-0.03851467743515968,
0.04243781790137291,
-0.014240245334804058,
-0.008199929259717464,
-0.01980431377887726,
-0.050736766308546066,
-0.02210538648068905,
-0.03174348548054695,
0.024972297251224518,
0.039533182978630066,
-0.01501355692744255,
-0.018408581614494324,
0.025802193209528923,
0.0406271368265152,
0.015711423009634018,
-0.04688907042145729,
-0.051528941839933395,
-0.013495225459337234,
0.06012967228889465,
-0.028178710490465164,
0.028235293924808502,
0.040815748274326324,
-0.031347401440143585,
-0.02284097671508789,
0.019634563475847244,
-0.017126016318798065,
0.0743887796998024,
0.01428739819675684,
-0.03215843439102173,
0.008530001156032085,
0.027971236035227776,
0.010647176764905453,
0.006959802005439997,
0.00942591018974781,
-0.028555935248732567,
0.050887659192085266,
0.011656253598630428,
0.02327478490769863,
0.013344335369765759,
0.026688670739531517,
0.01864434778690338,
-0.003875987371429801,
-0.042626429349184036,
-0.02455735020339489,
0.06103501096367836,
0.08502652496099472,
-0.034440647810697556,
-0.02742426097393036,
-0.048511140048503876,
-0.06439231336116791,
0.01087351143360138,
-0.013985618017613888,
0.016645055264234543,
-0.046285513788461685,
-0.0483979731798172,
0.03768477961421013,
-0.013202876783907413,
-0.08615820109844208,
0.057904042303562164,
0.032705411314964294,
-0.01938936673104763,
0.03742072358727455,
0.05994105711579323,
-0.003171047894284129,
0.04998231679201126,
-0.029668748378753662,
0.016682777553796768,
-0.015164446085691452,
-0.02327478490769863,
0.00543675571680069,
-0.07714252173900604,
0.049152422696352005,
-0.009152422659099102,
-0.03398797661066055,
-0.012589885853230953,
-0.039382293820381165,
-0.012853942811489105,
0.09573971480131149,
0.03530826419591904,
0.03161145746707916,
0.0410798080265522,
0.00008774903108133003,
-0.06695744395256042,
0.03634563088417053,
-0.028914298862218857,
0.005856418516486883,
0.04013674333691597,
0.0025934220757335424,
0.06167629361152649,
0.004432394169270992,
0.0040033007971942425,
-0.029913945123553276,
-0.0017269833479076624,
0.010024755261838436,
-0.03279971703886986,
0.011184722185134888,
0.0666179433465004,
-0.047869857400655746,
0.04798302426934242,
-0.04643640294671059,
0.030781563371419907,
-0.026330307126045227,
0.025538135319948196,
-0.03087586909532547,
-0.07808558642864227,
-0.03168690204620361,
0.007138983812183142,
-0.019068725407123566,
0.033346693962812424,
0.017484379932284355,
0.0014971118653193116,
-0.11724153906106949,
0.005441471002995968,
-0.01442885771393776,
0.07446422427892685,
0.039457738399505615,
-0.08397029340267181,
-0.0018106801435351372,
0.03172462433576584,
0.00685606524348259,
0.07197453826665878,
-0.05311328545212746,
-0.020954851061105728,
-0.02972533367574215,
0.022463751956820488,
-0.05609336495399475,
-0.017767298966646194,
-0.04315454512834549,
0.018201109021902084,
-0.03742072358727455,
0.003729812568053603,
0.02655664272606373,
0.002624071668833494,
0.00464929873123765,
-0.004628079477697611,
0.023746315389871597,
0.018870683386921883,
0.10343510657548904,
-0.05552752688527107,
0.005059530958533287,
-0.03087586909532547,
-0.009939880110323429,
0.02714134193956852,
0.04703996330499649,
-0.012127785012125969,
0.038741011172533035,
0.03583637997508049,
-0.001181185944005847,
0.03862784430384636,
0.038307201117277145,
0.01844630390405655,
-0.025104327127337456,
0.02908405102789402,
-0.034931037575006485,
0.023387951776385307,
-0.036798302084207535,
0.004415890667587519,
-0.05492396652698517,
-0.013127431273460388,
-0.04364493861794472,
0.03402569890022278,
-0.06850406527519226,
-0.034648120403289795,
0.027688317000865936,
0.01980431377887726,
0.014211953617632389,
0.07295532524585724,
-0.02548155188560486,
-0.02463279478251934,
-0.027480844408273697,
0.011477071791887283,
-0.01570199243724346,
0.010477425530552864,
-0.04817163571715355,
-0.019879760220646858,
0.0036991629749536514,
-0.016569610685110092,
0.00239773653447628,
0.008883649483323097,
0.02699045091867447,
0.02685842290520668,
-0.09098667651414871,
-0.056772369891405106,
-0.0025179770309478045,
0.010053046979010105,
-0.0023057879880070686,
-0.026896145194768906,
-0.013476364314556122,
0.009760698303580284,
-0.0008964988519437611,
-0.02951785922050476,
0.04379582777619362,
-0.021671578288078308,
-0.014277967624366283,
-0.018663208931684494,
-0.028763409703969955,
0.02885771542787552,
0.04919014498591423,
0.0241989865899086,
-0.007138983812183142,
-0.03553459793329239,
0.004319226834923029,
0.028235293924808502,
-0.011505363509058952,
0.012853942811489105,
-0.016993988305330276,
0.01677708327770233,
0.03404456004500389,
-0.010222798213362694,
0.008610161952674389,
0.04055169224739075,
0.008666745387017727,
-0.00023060827516019344,
-0.05292467400431633,
0.060356006026268005,
0.024519627913832664,
0.01537192054092884,
0.03892962262034416,
-0.04243781790137291,
-0.0060921842232346535,
0.07446422427892685,
-0.003357302863150835,
0.03638335317373276,
0.03745844587683678,
-0.027480844408273697,
-0.02499115839600563,
-0.007195567712187767,
0.009048685431480408,
-0.004984085913747549,
0.007544500753283501,
-0.013664976693689823,
-0.03232818469405174,
0.006959802005439997,
0.02742426097393036,
-0.01626783050596714,
-0.034421782940626144,
0.07306849211454391,
0.020634209737181664,
-0.02578333206474781,
-0.04745490849018097,
-0.0003088529920205474,
-0.037005774676799774,
-0.0021148179657757282,
-0.02399151213467121,
0.02550041303038597,
-0.05156666412949562,
-0.021162325516343117,
-0.02519863285124302,
-0.06824000924825668,
0.026764117181301117,
-0.04447483271360397,
-0.015362489968538284,
0.03547801449894905,
0.009968171827495098,
0.05714959278702736,
0.007440763991326094,
-0.012797359377145767,
-0.0007792054675519466,
-0.010996109806001186,
-0.01805964857339859,
0.0023835906758904457,
-0.027480844408273697,
0.03613815829157829,
0.04522928223013878,
0.04594600945711136,
-0.02770717814564705,
0.06390192359685898,
-0.03180006891489029,
0.008666745387017727,
-0.0666179433465004,
-0.06835317611694336,
-0.04055169224739075,
0.03908051550388336,
-0.008935517631471157,
0.02599080465734005,
-0.0006848992197774351,
0.008407402783632278,
-0.016748791560530663,
-0.03517623618245125,
0.023519981652498245,
-0.019653424620628357,
0.020992573350667953,
0.01731462962925434,
0.011156430467963219,
0.026481198146939278,
0.013061417266726494,
0.01562654785811901,
-0.038665566593408585,
0.029763055965304375,
-0.07303076982498169,
-0.008765766397118568,
-0.003095603082329035,
0.025670163333415985,
-0.03987268730998039,
0.034516092389822006,
0.0634869709610939,
-0.007596369367092848,
0.03072497993707657,
-0.05515030026435852,
0.023086171597242355,
0.043267711997032166,
0.05126488208770752,
-0.037665918469429016,
-0.017456088215112686,
0.08412118256092072,
0.02770717814564705,
-0.018304845318198204,
-0.037665918469429016,
-0.040249910205602646,
-0.013617823831737041,
-0.032064128667116165,
0.003864198923110962,
0.01350465603172779,
-0.004194270819425583,
-0.0026382175274193287,
-0.03504420444369316,
-0.01091123465448618,
-0.03511965274810791,
-0.05024637654423714,
-0.011184722185134888,
0.03466698154807091,
-0.03462925925850868,
-0.013466933742165565,
0.01109984703361988,
-0.06129906699061394,
-0.02174702286720276,
0.07404927164316177,
0.02736767567694187,
0.012938818894326687,
0.04643640294671059,
-0.05579158291220665,
0.05816810205578804,
-0.0029800778720527887,
0.0062902276404201984,
-0.022708946838974953,
-0.024368736892938614,
-0.028423907235264778,
-0.027971236035227776,
-0.02829187735915184,
-0.05017092823982239,
0.017210891470313072,
0.03942001610994339,
0.06793823093175888,
0.046059176325798035,
-0.010203937068581581,
0.010119061917066574,
-0.013410350307822227,
0.01537192054092884,
0.0027419545222073793,
0.016918543726205826,
0.00239773653447628,
-0.029461275786161423,
0.016748791560530663,
0.03302605077624321,
-0.02678297832608223,
-0.03268655017018318,
-0.0358552411198616,
0.05767770856618881,
-0.0339125320315361,
-0.09015678614377975,
-0.012325827963650227,
-0.043984439224004745,
0.03476128727197647,
0.04545561596751213,
0.06567487865686417,
-0.039533182978630066,
0.07159731537103653,
0.014325120486319065,
0.050736766308546066,
0.017399504780769348,
-0.017889898270368576,
-0.015136154368519783,
0.08049982041120529,
0.0070022395811975,
0.031856656074523926,
0.021860191598534584,
0.02312389574944973,
0.0013014263240620494,
-0.009180714376270771,
-0.04330543428659439,
-0.048435695469379425,
0.005337734241038561,
-0.005460332613438368,
0.008897795341908932,
-0.006973947864025831,
0.047077685594558716,
-0.010835789144039154,
0.009416479617357254,
0.031347401440143585,
0.0025226925499737263,
-0.005064246244728565,
0.0010621242690831423,
0.058771662414073944,
0.03843923285603523,
0.01342921145260334,
0.01923847757279873,
0.017531532794237137,
-0.03279971703886986,
-0.03934457153081894,
0.03530826419591904,
-0.023897206410765648,
0.0012401273706927896,
-0.04349404573440552,
0.027952374890446663,
-0.02844276838004589,
0.0016256041126325727,
0.00826122798025608,
-0.09196746349334717,
0.043116822838783264,
0.011439349502325058,
-0.004125898703932762,
0.06443003565073013,
-0.035063065588474274,
-0.020143816247582436,
0.008558292873203754,
0.01928563043475151,
0.00014396439655683935,
-0.05307556316256523,
-0.07091830670833588,
0.013806436210870743,
0.03583637997508049,
-0.006978663150221109,
0.0664670541882515,
0.013391489163041115,
-0.019408227875828743,
0.0053565953858196735,
0.04583284258842468,
-0.0015796298393979669,
-0.0027395968791097403,
0.014013909734785557,
0.010043616406619549,
-0.05809265747666359,
0.04866202920675278,
0.0027867499738931656,
0.016635624691843987,
0.05039726570248604,
0.011976894922554493,
0.03860898315906525,
0.005196274723857641,
-0.018436873331665993,
0.07816103100776672,
-0.01378757506608963,
-0.009114700369536877,
-0.022369444370269775,
-0.0029682894237339497,
-0.04013674333691597,
0.007582223042845726,
0.02169043943285942,
-0.0038146881852298975,
-0.05443357303738594,
0.08298950642347336,
-0.007332311477512121,
0.0005422609974630177,
-0.06039372831583023,
-0.0715595930814743,
-0.0034869739320129156,
0.00935046561062336,
-0.0028433336410671473,
0.03502534329891205,
0.02103029564023018,
-0.00882706604897976,
-0.012637038715183735,
0.01888011395931244,
-0.021784745156764984,
-0.04273959621787071,
0.03296946734189987,
0.034931037575006485,
0.022520335391163826,
-0.03374277800321579,
-0.007667099125683308,
-0.025443829596042633,
-0.001972179627045989,
-0.019219616428017616,
-0.057904042303562164,
0.052321113646030426,
-0.034421782940626144,
0.022746669128537178,
-0.03577979654073715,
0.0552634671330452,
0.001999292755499482,
0.014051632955670357,
-0.012278675101697445,
0.032422490417957306,
0.03202640637755394,
-0.017993634566664696,
-0.0013733349042013288,
0.008143345825374126,
-0.014749499037861824,
-0.05032182112336159,
0.03655310720205307,
0.06835317611694336,
0.07223859429359436,
-0.05967700108885765,
0.008577154017984867,
0.023821761831641197,
-0.03964634984731674,
-0.02478368580341339,
-0.03923140466213226,
0.012655899859964848,
0.06265708059072495,
0.010835789144039154,
-0.008407402783632278,
-0.014089355245232582,
-0.014730637893080711,
-0.048133913427591324,
-0.00879877433180809,
0.018333137035369873,
0.038741011172533035,
-0.03842037171125412,
-0.05156666412949562,
-0.018323706462979317,
0.05009548366069794,
0.008996817283332348,
-0.03574207052588463,
-0.028952021151781082,
-0.04473888874053955,
-0.00427207350730896,
0.022388305515050888,
-0.0129576800391078,
0.014277967624366283,
0.013344335369765759,
0.002989508444443345,
-0.0022503831423819065,
0.057564541697502136,
-0.0554143562912941,
-0.016975127160549164,
0.04439938813447952,
0.023897206410765648
]
|
41,349 | pyglove.core.typing.class_schema | set_description | Sets the description for the schema. | def set_description(self, description: str) -> None:
"""Sets the description for the schema."""
self._description = description
| (self, description: str) -> NoneType | [
0.03187737613916397,
0.01325418334454298,
0.05050056427717209,
-0.03042437508702278,
0.0448303259909153,
-0.04096747562289238,
0.050925832241773605,
0.02087356708943844,
0.016231058165431023,
-0.003162930253893137,
-0.06130945682525635,
0.04096747562289238,
-0.011101264506578445,
0.018623191863298416,
-0.0043457066640257835,
0.031186314299702644,
-0.033259496092796326,
-0.008549656718969345,
-0.003521749982610345,
0.007495346944779158,
-0.0004662442661356181,
-0.04536191001534462,
-0.015726054087281227,
-0.011127843521535397,
-0.024984490126371384,
0.051670052111148834,
-0.012696019373834133,
-0.012315049767494202,
0.027110829949378967,
-0.02998138777911663,
-0.01435279194265604,
-0.050713200122117996,
-0.019261091947555542,
0.0016589878359809518,
-0.0027974655386060476,
0.004837422631680965,
-0.007690261583775282,
0.008713562041521072,
0.004458668176084757,
-0.0005880657699890435,
0.003227163339033723,
0.05773011967539787,
-0.058049071580171585,
-0.004677947144955397,
0.019314251840114594,
0.03425178676843643,
0.010675996541976929,
-0.007003630977123976,
-0.029910510405898094,
0.01692212000489235,
-0.001259191776625812,
0.0380614772439003,
-0.027837328612804413,
-0.0015305215492844582,
-0.06290421634912491,
-0.02936120517551899,
0.02131655439734459,
0.06641267240047455,
0.011960660107433796,
0.026224855333566666,
-0.041038352996110916,
0.004992468282580376,
-0.03678567335009575,
-0.034358102828264236,
-0.01270487904548645,
0.011544251814484596,
0.010144411586225033,
-0.008833169005811214,
0.05563921853899956,
0.017772655934095383,
0.025781868025660515,
-0.022929029539227486,
-0.03191281482577324,
0.03542127460241318,
-0.0046602278016507626,
-0.0045406208373606205,
-0.04312925413250923,
-0.028510669246315956,
-0.007087798789143562,
-0.061344895511865616,
0.026348890736699104,
0.016098162159323692,
0.010950649157166481,
-0.02510852739214897,
-0.0010675996309146285,
-0.003515105228871107,
0.011650568805634975,
0.01864091120660305,
0.016718344762921333,
0.004655797965824604,
0.03834499046206474,
-0.020235665142536163,
-0.017772655934095383,
0.06875164806842804,
-0.019491447135806084,
-0.027412060648202896,
-0.05911223962903023,
-0.09384245425462723,
0.022875869646668434,
0.019898993894457817,
0.028546109795570374,
0.02764241397380829,
0.05574553459882736,
0.012580842711031437,
0.04387347400188446,
-0.04422786459326744,
0.012890934012830257,
-0.034446701407432556,
0.009949496947228909,
-0.027146268635988235,
-0.013201025314629078,
0.008314874023199081,
-0.0004778726724907756,
-0.0025493926368653774,
-0.011074685491621494,
0.037175502628088,
0.08852660655975342,
-0.013050409033894539,
0.03745901584625244,
0.024275710806250572,
-0.009630545973777771,
-0.010002655908465385,
-0.02110392041504383,
-0.026791878044605255,
0.025161685422062874,
0.019261091947555542,
0.007003630977123976,
0.04447593539953232,
0.019987592473626137,
-0.05032337084412575,
-0.008177547715604305,
-0.004292548168450594,
0.031540703028440475,
0.0625852644443512,
0.012820055708289146,
-0.013865506276488304,
0.045042961835861206,
0.04164081811904907,
-0.010525381192564964,
0.03380880132317543,
-0.07321695983409882,
0.014689462259411812,
0.010277307592332363,
-0.004558340646326542,
-0.024984490126371384,
-0.04387347400188446,
-0.05085495486855507,
-0.0406130850315094,
0.0006052315584383905,
0.030318059027194977,
-0.009059092961251736,
-0.029219450429081917,
0.02110392041504383,
-0.011154423467814922,
-0.0019336401019245386,
0.002547177718952298,
-0.01171258743852377,
-0.0009341497207060456,
-0.013971823267638683,
0.04089659824967384,
0.05797819420695305,
-0.04972090572118759,
0.011730306781828403,
0.025250282138586044,
-0.04047133028507233,
0.040152378380298615,
0.013892085291445255,
-0.05556834116578102,
-0.0015925397165119648,
0.007087798789143562,
-0.006206253543496132,
-0.03458845615386963,
-0.03820323571562767,
0.05397358536720276,
0.06364843249320984,
0.0990874245762825,
0.05464692786335945,
0.04199520871043205,
0.0007492024451494217,
-0.023354295641183853,
0.018180202692747116,
0.037742529064416885,
-0.055710095912218094,
0.03310002014040947,
0.03636040538549423,
-0.036466725170612335,
-0.019881274551153183,
0.0091255409643054,
0.010755734518170357,
0.03230264410376549,
0.022610077634453773,
0.00947107095271349,
-0.044334180653095245,
-0.001912598148919642,
0.03396827355027199,
-0.033259496092796326,
0.052237074822187424,
-0.04281030222773552,
0.02505536749958992,
0.047984395176172256,
0.03271019086241722,
0.0466022752225399,
0.029839633032679558,
0.025693269446492195,
0.09270840883255005,
0.01890670321881771,
0.0038207664620131254,
-0.02606537938117981,
-0.01340479962527752,
-0.06364843249320984,
-0.006551783997565508,
0.016239918768405914,
-0.0049260202795267105,
-0.028741024434566498,
0.037033747881650925,
-0.036165494471788406,
-0.09852039813995361,
-0.037600770592689514,
-0.027855047956109047,
-0.001986798597499728,
0.03951447829604149,
-0.02330113761126995,
0.028935937210917473,
-0.04805527627468109,
0.03788428381085396,
0.00964826624840498,
0.062230873852968216,
-0.11588551104068756,
-0.005205102264881134,
0.027571536600589752,
-0.06464072316884995,
0.0023013197351247072,
-0.038841135799884796,
0.004467528313398361,
0.05631256103515625,
-0.001106361043639481,
0.01340479962527752,
-0.0020953305065631866,
-0.025516076013445854,
-0.03724638372659683,
-0.012731458060443401,
-0.029467523097991943,
-0.020536895841360092,
0.022574638947844505,
-0.0980951339006424,
-0.007637103088200092,
-0.04277486354112625,
0.006507485173642635,
-0.0034287224989384413,
-0.011907502077519894,
-0.022220248356461525,
-0.05397358536720276,
0.007619383744895458,
0.024470625445246696,
0.03446442261338234,
-0.024151673540472984,
-0.006197393871843815,
-0.009160979650914669,
-0.0012326125288382173,
-0.023354295641183853,
-0.010968368500471115,
-0.055851854383945465,
-0.0600336529314518,
0.10808893293142319,
0.08179319649934769,
-0.024647820740938187,
0.034836530685424805,
-0.013626293279230595,
-0.018082747235894203,
-0.05216619744896889,
0.15408873558044434,
0.045078400522470474,
-0.03788428381085396,
-0.05103215202689171,
0.013068128377199173,
0.004425444174557924,
-0.037600770592689514,
-0.027288025245070457,
-0.0021363068372011185,
-0.013236464001238346,
0.057517487555742264,
-0.0601399727165699,
0.05783643573522568,
0.04419242590665817,
0.0601399727165699,
-0.0025582523085176945,
-0.04950827360153198,
0.03749445453286171,
-0.044334180653095245,
0.006277131848037243,
-0.004064409527927637,
0.05446973443031311,
-0.018516873940825462,
0.014618584886193275,
0.04522015526890755,
0.03636040538549423,
-0.002925931941717863,
0.04408610612154007,
-0.03827411308884621,
-0.000904248037841171,
-0.027801889926195145,
0.017037296667695045,
0.062089115381240845,
0.046885788440704346,
-0.05301673337817192,
-0.013422518968582153,
0.011039246805012226,
-0.0036524313036352396,
0.03869938105344772,
0.03657304123044014,
-0.01807388663291931,
0.021245677024126053,
-0.06627091765403748,
0.09901654720306396,
0.018357397988438606,
0.01855231262743473,
0.007832017727196217,
-0.0029458662029355764,
-0.0006257197237573564,
0.000852197059430182,
0.015929827466607094,
-0.06829094141721725,
-0.007233984302729368,
-0.07718612998723984,
-0.00947107095271349,
0.010002655908465385,
-0.011048106476664543,
-0.014485688880085945,
0.027943646535277367,
-0.02950296178460121,
0.022043053060770035,
-0.024470625445246696,
0.03278106823563576,
0.01531850453466177,
0.001019978546537459,
-0.012191013433039188,
-0.0034331525675952435,
-0.05230795219540596,
-0.0030411086045205593,
-0.009444491937756538,
0.05322936922311783,
0.0199167151004076,
-0.006963761989027262,
-0.04794895648956299,
0.03446442261338234,
0.009657125920057297,
-0.02478957548737526,
-0.09922917932271957,
0.04008150100708008,
-0.010649417527019978,
-0.03125719353556633,
-0.06967306137084961,
0.021334273740649223,
-0.016514571383595467,
0.04054220765829086,
-0.035722505301237106,
-0.02206077240407467,
0.034730214625597,
-0.0296269990503788,
-0.04135730490088463,
-0.02567555010318756,
-0.029662437736988068,
0.02431114949285984,
-0.0211393591016531,
-0.016647467389702797,
0.04419242590665817,
-0.06418001651763916,
0.06272701919078827,
0.01452998723834753,
0.0032692470122128725,
0.04302293807268143,
-0.05535570904612541,
-0.030052267014980316,
-0.004983608610928059,
0.02158234640955925,
-0.05011073499917984,
-0.024293430149555206,
0.007796578574925661,
-0.06754671782255173,
0.041215550154447556,
0.0300168264657259,
-0.007424469105899334,
-0.004117568023502827,
0.00936475396156311,
-0.04047133028507233,
-0.0022481612395495176,
-0.018977580592036247,
0.024771856144070625,
-0.03508460149168968,
-0.006556213833391666,
-0.004181801341474056,
-0.013156726025044918,
-0.005931601393967867,
-0.018835825845599174,
-0.019615482538938522,
-0.011836623772978783,
-0.005089925602078438,
-0.009940637275576591,
-0.0027886058669537306,
-0.01771063730120659,
-0.02897137776017189,
-0.0634712353348732,
-0.019668640568852425,
0.02383272349834442,
0.03820323571562767,
0.0054265959188342094,
0.014184457249939442,
0.08746343851089478,
0.01536280382424593,
0.03247983753681183,
-0.003018959192559123,
-0.07020464539527893,
0.007278283126652241,
-0.01929653249680996,
0.0027753161266446114,
-0.012146715074777603,
0.039053771644830704,
-0.01577921211719513,
0.04773632436990738,
0.06453440338373184,
0.031133156269788742,
0.026260294020175934,
0.028900498524308205,
0.05546202510595322,
-0.03279878944158554,
0.0033379101660102606,
0.019013019278645515,
-0.024807294830679893,
0.03432266414165497,
-0.024116234853863716,
-0.02571098878979683,
0.07342959195375443,
-0.04830334708094597,
-0.03706918656826019,
0.021422872319817543,
-0.05999821424484253,
0.024275710806250572,
-0.05432797595858574,
-0.059891898185014725,
0.007087798789143562,
0.07973773777484894,
-0.059891898185014725,
0.03841586783528328,
-0.0002253698476124555,
0.012093556113541126,
0.03210772946476936,
0.018570031970739365,
0.025197124108672142,
0.04607069119811058,
0.0175334420055151,
-0.037175502628088,
-0.009710283949971199,
0.04043589159846306,
-0.04291662201285362,
-0.016461411491036415,
-0.0350668840110302,
-0.023708686232566833,
-0.04972090572118759,
-0.016984136775135994,
0.012740317732095718,
-0.024027638137340546,
0.0034486569929867983,
-0.04281030222773552,
-0.019367409870028496,
0.0135642746463418,
0.03855762630701065,
-0.004695666488260031,
-0.01132275816053152,
-0.010605119168758392,
0.07704436779022217,
-0.0015748202567920089,
-0.0575883649289608,
0.031363509595394135,
-0.021989895030856133,
0.002074288669973612,
-0.035173200070858,
-0.015283065848052502,
-0.00973686296492815,
-0.02813856117427349,
-0.0013134577311575413,
0.02558695338666439,
-0.008332593366503716,
0.017737215384840965,
0.006383448839187622,
0.05397358536720276,
0.0015637455508112907,
0.007264993619173765,
-0.022875869646668434,
0.0005332460859790444,
-0.010268447920680046,
-0.021298835054039955,
0.0025848315563052893,
0.02633117139339447,
-0.040329575538635254,
0.03508460149168968,
0.0034442271571606398,
0.02356692962348461,
0.03898289427161217,
-0.015628596767783165,
0.006011339370161295,
-0.04206608608365059,
-0.024452906101942062,
-0.03212544694542885,
-0.024116234853863716,
0.0550367571413517,
-0.05716309696435928,
-0.02602994069457054,
-0.0024032066576182842,
0.005519623402506113,
-0.01582351140677929,
-0.03060157038271427,
0.016727205365896225,
0.060069095343351364,
0.009010364301502705,
-0.020997604355216026,
0.0034996005706489086,
-0.0012990606483072042,
0.0432710126042366,
0.041959766298532486,
-0.025569234043359756,
-0.0190838985145092,
-0.024718698114156723,
-0.017684057354927063,
-0.038522183895111084,
0.019615482538938522,
-0.05992733687162399,
-0.03820323571562767,
-0.06198279932141304,
0.036023736000061035,
0.01894214190542698,
0.020324261859059334,
0.000944670639000833,
0.024328868836164474,
0.05588729307055473,
-0.0027487368788570166,
0.08016300201416016,
-0.013263043016195297,
-0.00894391629844904,
-0.030955960974097252,
0.035403553396463394,
0.02742977999150753,
0.02021794579923153,
0.00212633959017694,
0.004401079844683409,
-0.008935056626796722,
0.012323910370469093,
-0.03398599475622177,
0.032373521476984024,
0.05053600296378136,
-0.019367409870028496,
0.0010626160074025393,
-0.0054354555904865265,
-0.032338082790374756,
-0.07307520508766174,
-0.03657304123044014,
0.031221752986311913,
0.04022325575351715,
0.023939039558172226,
0.06736952811479568,
0.01876494660973549,
-0.016284218057990074,
-0.02443518675863743,
0.023673247545957565,
0.02510852739214897,
0.13927523791790009,
0.04883493110537529,
-0.010835472494363785,
-0.0541507825255394,
-0.0532648079097271,
-0.02057233639061451,
-0.005887302570044994,
-0.03503144532442093,
0.07222466915845871,
0.06705057621002197,
-0.01518560852855444,
-0.0071232374757528305,
0.00314299575984478,
0.07119693607091904,
-0.018038447946310043,
-0.018747227266430855,
-0.06499511003494263,
0.04387347400188446,
-0.006144235376268625,
0.00391157902777195,
-0.016151322051882744,
-0.030583851039409637,
-0.022911308333277702,
0.03841586783528328,
-0.024151673540472984,
-0.04181801155209541,
-0.026703281328082085,
-0.004638078156858683,
-0.013838927261531353,
-0.051280222833156586,
0.004102063365280628,
0.012589702382683754,
0.021653225645422935,
-0.1067422479391098,
0.026472928002476692,
0.04940195754170418,
-0.04720474034547806,
0.02510852739214897,
-0.004392220173031092,
0.038486745208501816,
0.001273588859476149,
0.01674492470920086,
-0.015850089490413666,
0.03962079435586929,
0.02980419248342514,
0.032993704080581665,
-0.05397358536720276,
0.03015858307480812,
-0.021617785096168518,
-0.0072029754519462585,
-0.04291662201285362,
-0.034269507974386215,
0.04805527627468109,
-0.025338880717754364,
0.01679808273911476,
-0.06829094141721725,
-0.03310002014040947,
0.03559846803545952,
0.032816506922245026,
-0.03692743182182312,
-0.08236022293567657,
0.0021385217551141977,
-0.05921855941414833,
-0.0794542208313942,
-0.034216348081827164,
-0.043235570192337036,
0.02356692962348461,
-0.033915117383003235,
0.0007043500081636012,
-0.038663942366838455,
0.01876494660973549,
-0.04047133028507233,
-0.012199873104691505,
0.008425620384514332,
0.021192517131567,
0.016275357455015182,
0.011499953456223011,
0.015353944152593613,
-0.025604672729969025,
-0.0016301936702802777,
-0.04383803531527519,
0.07718612998723984,
-0.018747227266430855,
-0.05174092948436737,
-0.000314797944156453,
-0.029573839157819748,
-0.04663771390914917,
0.06120314076542854,
0.037388138473033905,
0.014078140258789062,
0.08703816682100296,
-0.0013931954745203257,
-0.03767165169119835,
0.002458580071106553,
-0.022893588989973068,
-0.019757239148020744,
0.026012221351265907,
-0.09384245425462723,
0.02145831100642681,
-0.029024535790085793,
0.032639313489198685,
0.03411003202199936,
0.027394341304898262,
-0.009728003293275833,
-0.0737839862704277,
0.05609992519021034,
0.01136705745011568,
0.0009906305931508541,
0.06237262859940529,
-0.008784440346062183,
0.032851945608854294,
-0.005497473757714033,
-0.054434292018413544,
0.010791173204779625,
-0.0009086779318749905,
-0.009302735328674316,
0.02193673700094223,
0.00936475396156311,
-0.000835031270980835,
-0.03148754686117172,
0.01903073862195015,
0.07027552276849747,
-0.05507219582796097,
-0.006432177498936653,
-0.013617433607578278,
-0.011836623772978783,
-0.029467523097991943,
-0.06350667774677277,
-0.0499335415661335,
0.03692743182182312,
0.007105518132448196,
-0.01934969052672386,
0.03324177488684654,
-0.055320266634225845,
0.039939746260643005,
-0.0012115705758333206,
0.047807201743125916,
0.06318772584199905,
-0.010835472494363785,
0.024027638137340546,
0.011942940764129162,
0.0355098694562912,
-0.027571536600589752,
-0.002327898982912302,
-0.013599713332951069,
-0.006135375704616308,
0.07098430395126343,
0.0473819337785244,
0.005989189725369215,
-0.0837777778506279,
0.04522015526890755,
-0.04291662201285362,
0.020501457154750824,
-0.0059847598895430565,
-0.0008765613310970366,
0.03269246965646744,
-0.004040045198053122,
-0.03313545882701874,
0.0022060773335397243,
-0.011145563796162605,
-0.00440772483125329,
0.013706030324101448,
-0.10149727761745453,
-0.008137678727507591,
0.07293345034122467,
-0.0165322907269001,
-0.011154423467814922,
0.023939039558172226,
-0.016541149467229843,
0.014671742916107178,
-0.01635509543120861,
-0.02443518675863743,
0.05411534383893013,
0.008252855390310287,
0.06453440338373184,
-0.010977228172123432,
0.007521926425397396,
0.04642508178949356,
0.015850089490413666,
0.008115529082715511,
-0.021298835054039955,
0.014972974546253681,
-0.0651368722319603,
0.016293076798319817,
-0.0026269154623150826,
0.05106759071350098,
-0.010419064201414585,
-0.020607775077223778,
-0.05106759071350098,
0.04699210450053215,
-0.03348984941840172,
-0.030885081738233566,
0.01917249523103237,
0.049472834914922714,
0.003732169046998024,
-0.004219455178827047,
-0.0032603873405605555,
0.0008289401885122061,
0.05595817044377327,
-0.017994148656725883,
0.044901203364133835,
0.023460613563656807,
-0.0181979238986969,
-0.010525381192564964
]
|
41,350 | pyglove.core.typing.class_schema | set_name | Sets the name of this schema. | def set_name(self, name: str) -> None:
"""Sets the name of this schema."""
self._name = name
| (self, name: str) -> NoneType | [
-0.0010689968476071954,
0.0058203330263495445,
0.00792821403592825,
-0.01832566037774086,
-0.060913462191820145,
-0.012294539250433445,
0.006689296569675207,
0.007704520598053932,
0.03317546844482422,
0.015572509728372097,
-0.04738860949873924,
0.018841875717043877,
0.042811498045921326,
0.03544681891798973,
-0.005166459828615189,
-0.029906101524829865,
0.02710132859647274,
0.04515167325735092,
-0.030319074168801308,
-0.0020412032026797533,
0.01223431434482336,
-0.007773349527269602,
0.04095311835408211,
-0.023092053830623627,
0.007274340838193893,
0.04862752929329872,
-0.008973550982773304,
0.04848987236618996,
0.009532785043120384,
-0.017224401235580444,
-0.046252936124801636,
-0.01743949018418789,
0.03484456613659859,
-0.012105260044336319,
0.035894203931093216,
-0.055888962000608444,
-0.00942954234778881,
0.02988889440894127,
-0.015236970037221909,
-0.015021879225969315,
0.056542836129665375,
0.022145656868815422,
-0.06356336921453476,
-0.03544681891798973,
0.02617214061319828,
0.0245546642690897,
0.0147895822301507,
0.06679832190275192,
-0.03023303858935833,
0.039266813546419144,
-0.034655287861824036,
0.005106234457343817,
-0.014686339534819126,
0.031231055036187172,
-0.0039533525705337524,
-0.008431524969637394,
0.010539405979216099,
0.05513184890151024,
0.0011657873401418328,
-0.011649269610643387,
-0.01517674420028925,
-0.02570754662156105,
-0.0032994793727993965,
-0.033571235835552216,
-0.03339916095137596,
-0.018188003450632095,
0.041813477873802185,
-0.0033876660745590925,
-0.02710132859647274,
0.014703546650707722,
0.030026551336050034,
-0.0021261638030409813,
-0.03448321670293808,
0.016690976917743683,
-0.015873635187745094,
0.04704446718096733,
-0.06566265225410461,
-0.0019336583791300654,
-0.0715130940079689,
-0.042432937771081924,
0.053755272179841995,
-0.008702537976205349,
-0.06318481266498566,
-0.019031155854463577,
-0.02118205465376377,
0.0231952965259552,
-0.01635543629527092,
-0.038716185837984085,
0.014376609586179256,
-0.02961357869207859,
0.035240333527326584,
-0.007235624827444553,
-0.023453405126929283,
0.09326298534870148,
-0.035309161990880966,
-0.03730519488453865,
0.008341186679899693,
-0.06593796610832214,
-0.0013228029711171985,
0.046906810253858566,
-0.035825375467538834,
0.010504991747438908,
0.014832600951194763,
0.01851494051516056,
0.006366661284118891,
-0.02226610854268074,
0.014238952659070492,
-0.05354878678917885,
0.014583095908164978,
-0.03425952047109604,
0.014385213144123554,
0.05513184890151024,
0.01848052628338337,
0.036479249596595764,
0.003697395557537675,
0.015649942681193352,
0.06115436553955078,
0.0038694676477462053,
0.017792237922549248,
-0.00445666303858161,
0.00819492619484663,
0.014238952659070492,
0.01198481023311615,
0.0386473573744297,
0.0320914164185524,
0.02427935041487217,
0.03606627881526947,
0.04160699248313904,
0.01712115667760372,
0.002705831080675125,
-0.022403765469789505,
0.024365385994315147,
-0.0030241641215980053,
0.011313729919493198,
0.0633912980556488,
0.008414317853748798,
0.04167582094669342,
0.03572213277220726,
-0.05148392170667648,
0.0656970664858818,
-0.05351437255740166,
-0.005269702989608049,
-0.0008555201347917318,
-0.019306471571326256,
0.004439455922693014,
-0.013309763744473457,
-0.020080793648958206,
-0.00665058009326458,
-0.026653941720724106,
-0.00012159301695646718,
-0.00494706816971302,
0.020046379417181015,
0.022472593933343887,
0.01001458615064621,
-0.022128449752926826,
0.018704218789935112,
-0.05551040545105934,
-0.05265401303768158,
-0.034121863543987274,
0.023797547444701195,
0.02254142239689827,
-0.011795531027019024,
-0.02834024652838707,
-0.05867652967572212,
-0.04164140671491623,
-0.011012603528797626,
-0.014006655663251877,
-0.05117419362068176,
-0.03429393470287323,
0.025294573977589607,
0.024417007341980934,
0.0007237775716930628,
-0.007201210595667362,
0.04824896901845932,
0.02760033868253231,
0.031523577868938446,
0.04711329564452171,
0.0413660928606987,
0.011098640039563179,
-0.05502860248088837,
0.03374330699443817,
-0.014522871002554893,
-0.01631241850554943,
0.013197917491197586,
0.005841841921210289,
-0.033622857183218,
-0.04611527919769287,
0.07158192247152328,
0.07350912690162659,
0.06731454282999039,
0.03069763258099556,
-0.004482473712414503,
-0.015374626964330673,
-0.04332771152257919,
0.04487635940313339,
-0.03305501863360405,
0.01716417446732521,
-0.038337625563144684,
0.04848987236618996,
-0.02691205032169819,
0.05045149102807045,
0.023900792002677917,
-0.025965655222535133,
0.012948412448167801,
0.0958784818649292,
-0.006831255741417408,
0.03443159535527229,
-0.022489801049232483,
0.041194021701812744,
-0.059674546122550964,
0.00043663251562975347,
0.023418990895152092,
-0.010995396412909031,
0.028133761137723923,
0.01774061657488346,
-0.05041707679629326,
-0.03888825699687004,
-0.07880894839763641,
0.05912391468882561,
0.039060328155756,
0.028047725558280945,
0.0313170924782753,
0.05554481968283653,
-0.04146933555603027,
-0.003293026704341173,
-0.014402421191334724,
0.028753219172358513,
-0.06229003891348839,
-0.010935171507298946,
-0.025174124166369438,
0.010548009537160397,
0.00962742418050766,
-0.020235659554600716,
-0.026929257437586784,
-0.020597010850906372,
0.0010055453749373555,
-0.0067151072435081005,
-0.015727374702692032,
-0.0672801285982132,
-0.045599061995744705,
0.008616502396762371,
0.030904119834303856,
-0.006994724273681641,
0.021508991718292236,
-0.052447523921728134,
-0.03193655237555504,
-0.031213847920298576,
0.014849808067083359,
0.026068897917866707,
-0.0076485974714159966,
0.001360443769954145,
-0.08211272954940796,
-0.000010166359061258845,
0.02365989051759243,
0.019426921382546425,
-0.01735345460474491,
-0.07839597016572952,
0.016785617917776108,
0.012346161529421806,
-0.014256159774959087,
-0.045874375849962234,
-0.03696105256676674,
-0.06796841323375702,
0.03998951613903046,
0.03675456345081329,
-0.05175923556089401,
0.009558595716953278,
-0.03360565006732941,
-0.023642683401703835,
-0.047457437962293625,
0.09099163860082626,
0.005097630899399519,
-0.01717277802526951,
-0.0059708962216973305,
0.01128791831433773,
-0.0978056862950325,
-0.021061604842543602,
0.048386625945568085,
-0.072683185338974,
-0.019702237099409103,
0.08865145593881607,
-0.09340064227581024,
0.03143754228949547,
0.05544157698750496,
0.00211110757663846,
-0.02424493618309498,
-0.009438145905733109,
-0.009111208841204643,
-0.06043166294693947,
-0.03761492297053337,
0.008500353433191776,
0.024640699848532677,
-0.012105260044336319,
-0.0044652665965259075,
-0.02598286233842373,
-0.020820703357458115,
-0.0013529155403375626,
0.044050414115190506,
-0.034276727586984634,
0.02211124263703823,
0.07178840786218643,
0.009851118549704552,
0.02691205032169819,
0.01863539032638073,
-0.023418990895152092,
-0.032143037766218185,
-0.034311141818761826,
0.015254177153110504,
0.030938534066081047,
0.033880963921546936,
-0.04387834295630455,
0.041194021701812744,
-0.1500467211008072,
0.027049707248806953,
0.0583667978644371,
0.04983203113079071,
0.03026745282113552,
-0.016845842823386192,
0.03155799210071564,
0.035085465759038925,
-0.006177382543683052,
-0.061257608234882355,
-0.050279419869184494,
-0.07543633878231049,
-0.018721425905823708,
0.017344851046800613,
-0.019151605665683746,
-0.019616199657320976,
-0.019805479794740677,
-0.005252495873719454,
-0.0502450056374073,
-0.028426283970475197,
0.017465300858020782,
0.02694646455347538,
-0.04580554738640785,
-0.013206521049141884,
0.0015067048370838165,
-0.029080156236886978,
-0.013576475903391838,
-0.028477905318140984,
0.02555268257856369,
0.016690976917743683,
-0.002839186927303672,
-0.049315813928842545,
-0.024055656045675278,
0.004912653472274542,
-0.02369430474936962,
-0.048386625945568085,
0.03819996863603592,
0.039679788053035736,
-0.04319005459547043,
-0.013662511482834816,
-0.0013378593139350414,
-0.03544681891798973,
0.0583667978644371,
-0.03333033248782158,
-0.012957016937434673,
0.005239590536803007,
-0.046218521893024445,
-0.01474656444042921,
-0.04078104719519615,
-0.0065258280374109745,
0.04391275718808174,
-0.02071746066212654,
-0.044291313737630844,
-0.014488456770777702,
-0.0398174449801445,
0.026774393394589424,
-0.011115847155451775,
-0.016871653497219086,
0.005699882749468088,
-0.05668049305677414,
-0.05272284150123596,
0.004731978289783001,
-0.022747909650206566,
0.05052031949162483,
0.07591813802719116,
0.010728685185313225,
-0.04800806939601898,
-0.03947330266237259,
0.04095311835408211,
-0.016252193599939346,
0.05981220304965973,
0.01368832215666771,
-0.022007999941706657,
-0.022816738113760948,
-0.007304453756660223,
-0.01922043412923813,
0.01759435422718525,
0.01577899605035782,
0.00810028612613678,
-0.007239926606416702,
0.016949085518717766,
0.038991499692201614,
0.005897765513509512,
-0.017215797677636147,
-0.03178168460726738,
-0.0328657403588295,
-0.015366023406386375,
0.023900792002677917,
-0.028856463730335236,
-0.034741323441267014,
0.00856057833880186,
0.030646011233329773,
-0.0011808436829596758,
-0.03561889007687569,
0.03174727037549019,
0.05554481968283653,
0.02756592445075512,
0.031953759491443634,
-0.015710167586803436,
-0.03463808074593544,
-0.03407024219632149,
-0.03723636642098427,
0.03327871114015579,
0.045908790081739426,
0.06972354650497437,
-0.029820065945386887,
0.06242769584059715,
0.06266859918832779,
-0.016957689076662064,
0.07282084226608276,
0.032917361706495285,
0.07798299938440323,
-0.008414317853748798,
-0.002413308946415782,
-0.026000069454312325,
0.0026025879196822643,
0.002292858436703682,
0.03283132612705231,
-0.04659707844257355,
0.02118205465376377,
0.03038790263235569,
-0.008130398578941822,
0.03234952315688133,
-0.045908790081739426,
-0.012784944847226143,
-0.035584475845098495,
-0.08569182455539703,
-0.025535475462675095,
0.08307632803916931,
-0.0576096847653389,
0.020424937829375267,
-0.041813477873802185,
-0.01269890833646059,
-0.00569127919152379,
0.010005982592701912,
-0.006190287880599499,
0.003658679546788335,
-0.02133691869676113,
-0.00862080417573452,
0.005153554491698742,
0.021078811958432198,
-0.059984274208545685,
-0.006783935707062483,
-0.01922043412923813,
-0.017060931771993637,
-0.0649743601679802,
0.020476559177041054,
-0.022455386817455292,
-0.08245687186717987,
0.060638148337602615,
-0.01782665215432644,
0.020166831091046333,
0.01638985238969326,
0.017112553119659424,
0.031489163637161255,
0.02930385060608387,
0.053720857948064804,
-0.011098640039563179,
0.016209175810217857,
-0.016923274844884872,
0.022334937006235123,
0.01906557008624077,
-0.020579803735017776,
-0.028133761137723923,
-0.0772947147488594,
-0.0152713842689991,
-0.014333591796457767,
-0.0012098808074370027,
-0.009111208841204643,
0.008534767664968967,
0.05430590361356735,
0.038372039794921875,
0.07061832398176193,
-0.018549354746937752,
-0.008784271776676178,
-0.031334299594163895,
-0.018807461485266685,
-0.019392507150769234,
-0.016295211389660835,
0.015538095496594906,
0.013825980015099049,
0.009042380377650261,
0.005407360382378101,
0.0231952965259552,
0.03730519488453865,
0.0691729187965393,
-0.001394858118146658,
0.0491093285381794,
-0.024847187101840973,
-0.03191934525966644,
-0.014497060328722,
-0.022713495418429375,
0.056542836129665375,
0.013963636942207813,
-0.007166795898228884,
-0.020975569263100624,
0.003589850617572665,
0.014901429414749146,
-0.049384646117687225,
-0.01542624831199646,
0.0452205054461956,
-0.01407548412680626,
0.009481163695454597,
-0.003230650443583727,
-0.044945187866687775,
0.010264091193675995,
-0.0075152418576180935,
0.0020788440015167,
-0.016346832737326622,
-0.04824896901845932,
-0.030938534066081047,
0.023126468062400818,
-0.016269400715827942,
-0.01789548061788082,
0.014643321745097637,
-0.05458121746778488,
0.04167582094669342,
0.08906443417072296,
0.03665132075548172,
0.01743949018418789,
-0.017602957785129547,
0.029837273061275482,
0.020321695134043694,
0.04115960747003555,
-0.07185723632574081,
0.01612314023077488,
-0.006315039936453104,
0.026688355952501297,
0.02114764042198658,
0.014806789346039295,
0.026774393394589424,
0.001212031696923077,
-0.017843859270215034,
-0.0036844902206212282,
-0.04250176623463631,
0.05984661728143692,
0.030990155413746834,
-0.037477266043424606,
0.008268056437373161,
-0.03534357622265816,
-0.05637076497077942,
-0.042467352002859116,
-0.059433646500110626,
-0.037821412086486816,
0.03610069304704666,
-0.016733994707465172,
0.041538164019584656,
0.021233676001429558,
0.00569127919152379,
0.004101764876395464,
0.06607562303543091,
0.0016077971085906029,
0.08142443746328354,
0.05072680488228798,
-0.020941155031323433,
-0.0668671503663063,
0.0017637372948229313,
0.026774393394589424,
0.03463808074593544,
-0.027669167146086693,
0.08706840127706528,
0.08355812728404999,
-0.012131071649491787,
0.03857852891087532,
0.02192196436226368,
0.07495453208684921,
-0.05740319564938545,
-0.02353944070637226,
-0.004848126787692308,
0.0160457082092762,
-0.06346012651920319,
0.014651925303041935,
-0.053720857948064804,
-0.008569181896746159,
-0.03092132695019245,
0.037167537957429886,
-0.004108217544853687,
0.008655218407511711,
-0.10393144935369492,
-0.050623562186956406,
-0.008633709512650967,
-0.0514150932431221,
-0.03100736252963543,
0.03259042277932167,
-0.003768375376239419,
-0.09725505858659744,
0.03551564738154411,
-0.0007888422696851194,
-0.010728685185313225,
0.031299885362386703,
-0.008461637422442436,
0.062496524304151535,
-0.002243387745693326,
0.023453405126929283,
-0.026223761960864067,
0.05399617180228233,
0.015649942681193352,
0.014703546650707722,
-0.01565854623913765,
-0.013043052516877651,
0.010504991747438908,
0.05881418660283089,
-0.004392135888338089,
-0.0007017308380454779,
0.020287280902266502,
-0.011563234031200409,
-0.0022369350772351027,
-0.05977778881788254,
-0.0057988241314888,
0.0610855370759964,
0.04005834460258484,
-0.023092053830623627,
-0.05544157698750496,
-0.032263487577438354,
0.03026745282113552,
-0.05131185054779053,
-0.012647286988794804,
-0.05633635073900223,
-0.019960343837738037,
-0.08679307997226715,
-0.0340186208486557,
-0.09532785415649414,
0.0208723247051239,
0.024107277393341064,
-0.006943102460354567,
-0.02837466076016426,
-0.019375300034880638,
0.001499176723882556,
0.027497094124555588,
0.040540147572755814,
0.072683185338974,
0.028133761137723923,
-0.034276727586984634,
0.06937940418720245,
-0.003533927258104086,
-0.04855870082974434,
0.015357419848442078,
0.015297194942831993,
-0.065731480717659,
0.018342867493629456,
0.01932367868721485,
-0.00984251406043768,
0.12650728225708008,
0.00852186232805252,
-0.06328805536031723,
-0.03978303074836731,
-0.02157782018184662,
-0.0274454727768898,
-0.00607844116166234,
-0.05884860083460808,
-0.0005336918402463198,
-0.015486474148929119,
0.022524215281009674,
0.03300339728593826,
-0.011640666052699089,
-0.03355402499437332,
-0.0746103897690773,
0.05664607882499695,
-0.04766392707824707,
0.0583667978644371,
0.010092019103467464,
-0.07061832398176193,
0.041847892105579376,
-0.014471249654889107,
0.003400571644306183,
-0.020304488018155098,
0.025346195325255394,
0.002273500431329012,
-0.049384646117687225,
-0.005790220573544502,
0.055303920060396194,
-0.0016809277003630996,
0.037098709493875504,
0.05299815535545349,
-0.012630079872906208,
0.014927240088582039,
0.021009983494877815,
0.014858411625027657,
-0.0226102527230978,
0.007588372100144625,
-0.026464663445949554,
0.05268842726945877,
-0.03283132612705231,
-0.006586053408682346,
0.05637076497077942,
-0.03506825864315033,
0.0030413714703172445,
0.02095836214721203,
0.024675115942955017,
0.031609613448381424,
-0.008534767664968967,
-0.026240969076752663,
-0.014368006028234959,
0.0171985886991024,
0.006444093771278858,
0.024193312972784042,
0.05736878141760826,
-0.0014615359250456095,
0.03706429526209831,
-0.009369316510856152,
0.011821341700851917,
0.013430214487016201,
0.031489163637161255,
-0.0043512689881026745,
-0.03042231686413288,
0.02756592445075512,
0.010289901867508888,
0.05788499861955643,
0.012010620906949043,
0.03575654700398445,
-0.02431376464664936,
-0.013283953070640564,
-0.008379902690649033,
-0.013481835834681988,
-0.058125898241996765,
-0.03919798508286476,
0.012337557971477509,
0.015804806724190712,
-0.0053600408136844635,
0.03881942853331566,
-0.019977550953626633,
0.023436198011040688,
0.01956457830965519,
-0.016802825033664703,
0.07044624537229538,
0.007627088576555252,
0.028667183592915535,
0.04453221708536148,
-0.027049707248806953,
0.016372645273804665,
-0.03374330699443817,
-0.01593386009335518,
-0.017465300858020782,
0.04549581930041313,
0.005071820225566626,
0.035240333527326584,
0.002026146976277232,
0.04232969507575035,
0.007351773325353861,
-0.0006226853001862764,
-0.019822686910629272,
0.02362547628581524,
-0.0595368891954422,
-0.03188492730259895,
0.04322446882724762,
0.04990085959434509,
0.053376711905002594,
-0.0313170924782753,
0.010005982592701912,
0.031953759491443634,
0.019736651331186295,
0.0007802386535331607,
0.015452059917151928,
-0.025311781093478203,
0.04921257123351097,
0.019340885803103447
]
|
41,351 | pyglove.core.typing.class_schema | to_json | null | def to_json(self, **kwargs) -> Dict[str, Any]:
return self.to_json_dict(
fields=dict(
fields=(list(self._fields.values()), []),
name=(self._name, None),
description=(self._description, None),
allow_nonconst_keys=(self._allow_nonconst_keys, False),
metadata=(self._metadata, {}),
),
exclude_default=True,
**kwargs,
)
| (self, **kwargs) -> Dict[str, Any] | [
-0.034817393869161606,
-0.09383780509233475,
0.06257092952728271,
-0.042569052428007126,
-0.05067390203475952,
-0.022808833047747612,
0.003524959087371826,
0.008671817369759083,
-0.004800636786967516,
-0.023645343258976936,
0.010781681165099144,
0.03275400400161743,
-0.0005582540761679411,
0.014295022003352642,
0.028143906965851784,
0.002120319986715913,
-0.015884390100836754,
-0.021024279296398163,
0.017157744616270065,
0.010484255850315094,
0.023385094478726387,
-0.044093359261751175,
0.044242072850465775,
0.022344104945659637,
0.02697279304265976,
0.042085736989974976,
-0.017464464530348778,
-0.023979946970939636,
0.0025955038145184517,
0.04149088263511658,
-0.03974350914359093,
-0.02805096097290516,
0.014908462762832642,
0.06614004075527191,
-0.010828154161572456,
-0.005028353072702885,
-0.037196800112724304,
0.026731133460998535,
-0.08491503447294235,
-0.009666334837675095,
-0.022418461740016937,
0.02559719793498516,
-0.09138404577970505,
-0.021042868494987488,
0.045134346932172775,
-0.014824812300503254,
0.029631035402417183,
0.04773682355880737,
0.044502317905426025,
-0.043647218495607376,
0.0049400548450648785,
0.021321704611182213,
-0.022474229335784912,
0.010474961251020432,
-0.01385817863047123,
-0.060823552310466766,
0.03277259320020676,
0.021544773131608963,
-0.029184896498918533,
0.036973729729652405,
-0.06402087956666946,
0.02433313988149166,
0.025429897010326385,
-0.03918583318591118,
-0.013607225380837917,
-0.025392718613147736,
-0.03922301158308983,
-0.028664400801062584,
0.0002966995525639504,
0.059187714010477066,
0.016451358795166016,
-0.06465291231870651,
0.029333608224987984,
0.02321779355406761,
0.014545975252985954,
0.035226356238126755,
-0.018561221659183502,
-0.009164429269731045,
-0.00498188054189086,
-0.045171525329351425,
-0.027214450761675835,
-0.01654430478811264,
-0.07465384900569916,
-0.009731397032737732,
0.021823609247803688,
-0.00819779559969902,
-0.04974444583058357,
0.022846011444926262,
0.029891282320022583,
-0.05130593106150627,
-0.03491033986210823,
0.03753140568733215,
-0.009880109690129757,
0.07011810690164566,
-0.008049082942306995,
-0.06357473880052567,
-0.05361098051071167,
-0.0007772569661028683,
0.03446420282125473,
0.059633851051330566,
-0.010419193655252457,
-0.017631767317652702,
-0.03191749379038811,
-0.0016892850399017334,
0.02808813937008381,
-0.07469102740287781,
-0.021656308323144913,
-0.016776667907834053,
-0.029110539704561234,
-0.007668006233870983,
-0.02704714797437191,
0.06517340242862701,
0.00988940428942442,
-0.05498657375574112,
0.022994723170995712,
0.012622002512216568,
0.02570873312652111,
-0.004047777969390154,
0.004389352630823851,
-0.047439396381378174,
-0.031192518770694733,
0.060972265899181366,
0.031173929572105408,
0.04996751621365547,
0.020801208913326263,
0.01747375912964344,
-0.05193796008825302,
0.020652497187256813,
0.0751371681690216,
-0.02845992147922516,
0.01977880857884884,
-0.012017857283353806,
-0.009712807834148407,
-0.025058114901185036,
0.043089546263217926,
0.023013312369585037,
0.06967196613550186,
0.03676925227046013,
0.05167771503329277,
0.04654712229967117,
0.035449422895908356,
-0.01146018411964178,
0.023942768573760986,
-0.00806767214089632,
-0.02845992147922516,
-0.04145370423793793,
0.06918865442276001,
-0.01259411871433258,
-0.06792458891868591,
-0.04937266558408737,
0.07101038098335266,
-0.006324943155050278,
0.008063024841248989,
-0.01992752216756344,
-0.010270480997860432,
-0.00477740028873086,
-0.011088402010500431,
-0.03836791589856148,
-0.012017857283353806,
0.037196800112724304,
0.030895093455910683,
-0.015559081919491291,
0.030188707634806633,
-0.011172052472829819,
0.01055861171334982,
0.047550931572914124,
0.06851944327354431,
-0.09108661860227585,
0.01661865971982479,
0.00364114111289382,
-0.018077906221151352,
-0.002841809531673789,
0.0009677953203208745,
0.013848884031176567,
-0.06788741052150726,
0.04911241680383682,
0.03572826087474823,
0.034073829650878906,
-0.006292412523180246,
0.04227162525057793,
0.06669770926237106,
-0.06357473880052567,
-0.02078261971473694,
0.05275588110089302,
0.10395027697086334,
-0.07963573187589645,
0.004763458389788866,
0.016860319301486015,
-0.0029091951437294483,
0.015847213566303253,
0.05037647485733032,
0.02574591152369976,
0.009252727031707764,
0.017046209424734116,
-0.009410735219717026,
-0.04156523942947388,
0.008616050705313683,
-0.05952231585979462,
-0.024240193888545036,
0.045134346932172775,
-0.03844226896762848,
-0.0076354751363396645,
-0.03550519049167633,
0.009215549565851688,
-0.0068640271201729774,
-0.009006422013044357,
0.042011380195617676,
-0.08662523329257965,
0.030523311346769333,
-0.04859192296862602,
0.006408594083040953,
-0.02489081211388111,
-0.05799800902605057,
-0.026917025446891785,
0.037345513701438904,
-0.05335073173046112,
0.005428018979728222,
-0.005339720752090216,
-0.007626180537045002,
0.01922113448381424,
0.023329326882958412,
0.007087096571922302,
-0.02797660417854786,
-0.03147135674953461,
0.00894135981798172,
-0.012417522259056568,
0.012761421501636505,
-0.044204894453287125,
-0.010753797367215157,
-0.044762566685676575,
-0.06632593274116516,
-0.022901779040694237,
-0.05491221696138382,
0.023180615156888962,
-0.015559081919491291,
0.05599038675427437,
-0.0012338518863543868,
-0.05747751519083977,
0.009057541377842426,
-0.023868411779403687,
0.06930018961429596,
-0.011153463274240494,
-0.015856506302952766,
0.008383686654269695,
0.007263693027198315,
-0.03150853514671326,
0.06584261357784271,
0.062496572732925415,
0.05197513848543167,
0.00629705935716629,
0.05346226692199707,
-0.00869970116764307,
-0.009619861841201782,
0.07889216393232346,
-0.007984020747244358,
-0.03312578797340393,
0.03275400400161743,
0.03859098255634308,
0.03182454779744148,
-0.03327449783682823,
0.019388437271118164,
-0.021414650604128838,
-0.06684642285108566,
0.011887732893228531,
0.045059993863105774,
-0.004916818346828222,
0.029073361307382584,
-0.003006787970662117,
-0.05130593106150627,
0.030932271853089333,
0.04000375419855118,
-0.03760576248168945,
-0.016497831791639328,
-0.04974444583058357,
0.004124457947909832,
-0.018235912546515465,
-0.023143436759710312,
-0.08082543313503265,
-0.007235809229314327,
-0.0008469661115668714,
0.028366975486278534,
-0.023236382752656937,
0.04926113039255142,
0.0013965065591037273,
0.07491409778594971,
-0.02879452519118786,
0.0009085425408557057,
0.029668211936950684,
-0.03550519049167633,
-0.022957544773817062,
0.01907242275774479,
0.01996469870209694,
-0.07048989087343216,
-0.00045804717228747904,
0.03974350914359093,
0.008564930409193039,
-0.003722468391060829,
-0.02630358375608921,
0.04167677462100983,
0.02671254426240921,
-0.029947049915790558,
0.021526183933019638,
0.060488950461149216,
0.020931333303451538,
-0.05647370219230652,
-0.014053364284336567,
0.004721632692962885,
-0.010679441504180431,
-0.02585744671523571,
0.005725444760173559,
-0.05948513746261597,
0.02619205042719841,
0.05580449476838112,
0.05520964413881302,
-0.05390840768814087,
-0.019760219380259514,
-0.0008672979893162847,
0.02875734679400921,
0.029705390334129333,
0.020540961995720863,
-0.020912744104862213,
-0.010075295343995094,
-0.029928460717201233,
-0.037010908126831055,
0.10335543006658554,
-0.05015340819954872,
-0.003622551914304495,
0.01333768293261528,
0.07398463785648346,
0.033553335815668106,
-0.0023608163464814425,
-0.07376157492399216,
0.03126687556505203,
0.062087614089250565,
-0.041974201798439026,
0.02890605852007866,
0.017046209424734116,
-0.009545505978167057,
-0.05584167316555977,
0.016293350607156754,
-0.03333026543259621,
-0.029928460717201233,
0.012724243104457855,
-0.010177535004913807,
-0.07978444546461105,
-0.014239255338907242,
0.04881499335169792,
-0.046770188957452774,
0.006148346699774265,
-0.03985504433512688,
-0.009657040238380432,
-0.004101221449673176,
0.060191523283720016,
0.05639934539794922,
-0.026508064940571785,
-0.06658617407083511,
-0.00176945049315691,
-0.0009189989068545401,
-0.03472444787621498,
-0.007630827836692333,
0.007375227753072977,
0.011106990277767181,
0.021600540727376938,
0.01966727338731289,
0.04085885360836983,
0.04018964618444443,
0.02819967269897461,
0.005553495138883591,
0.05818390101194382,
-0.044427961111068726,
-0.007440289482474327,
-0.003095086198300123,
-0.007891075685620308,
-0.036416057497262955,
-0.016163228079676628,
0.05587885156273842,
0.013904650695621967,
0.009038953110575676,
-0.09004563093185425,
-0.04885217174887657,
-0.026842668652534485,
-0.05056236684322357,
-0.027140093967318535,
0.020671086385846138,
0.023533808067440987,
0.03197326138615608,
0.05494939535856247,
-0.030318832024931908,
0.0012187482789158821,
-0.034631505608558655,
-0.07350132614374161,
-0.020206358283758163,
-0.024649154394865036,
0.04948420077562332,
-0.015085059218108654,
-0.05305330827832222,
0.005367604084312916,
0.017371518537402153,
-0.013030963018536568,
0.003761970205232501,
-0.029742568731307983,
-0.08402276039123535,
-0.012640591710805893,
-0.020578140392899513,
0.012659180909395218,
-0.04000375419855118,
0.043201081454753876,
-0.01465750951319933,
0.07119627296924591,
0.023329326882958412,
0.0006105359643697739,
-0.004424207378178835,
-0.03877687454223633,
0.002848780481144786,
0.061938900500535965,
0.041193459182977676,
-0.023979946970939636,
-0.003799148602411151,
0.0005321131320670247,
0.008560283109545708,
0.01259411871433258,
0.05186360329389572,
0.016181817278265953,
0.02674972265958786,
0.03836791589856148,
0.012027151882648468,
-0.021451827138662338,
-0.006306353956460953,
0.046286873519420624,
0.024128658697009087,
0.005237480625510216,
0.045692022889852524,
-0.027660589665174484,
-0.009935877285897732,
0.03610004484653473,
0.03621157631278038,
0.07799988985061646,
-0.06855662167072296,
-0.018616989254951477,
0.04071014001965523,
0.024240193888545036,
-0.02585744671523571,
-0.05450325831770897,
0.030579078942537308,
0.022994723170995712,
0.011348648928105831,
-0.008230326697230339,
0.01795707643032074,
0.03180595859885216,
0.01799425482749939,
0.08617909252643585,
0.03684360906481743,
0.036490414291620255,
-0.09636592119932175,
-0.04658430069684982,
-0.025727322325110435,
0.0019135160837322474,
-0.060340236872434616,
0.022102447226643562,
-0.02459338679909706,
0.04100756719708443,
-0.004953996744006872,
-0.03148994594812393,
0.017687534913420677,
0.015968041494488716,
-0.011116284877061844,
-0.03654618188738823,
-0.006245939526706934,
-0.04089603200554848,
0.04825731739401817,
0.06799894571304321,
0.06777588278055191,
-0.05810954421758652,
-0.018533337861299515,
-0.029928460717201233,
0.04044989496469498,
0.008300035260617733,
0.0009253889438696206,
-0.04216009005904198,
-0.06290553510189056,
0.00728228222578764,
-0.006817554589360952,
-0.008425512351095676,
-0.032809771597385406,
0.07045271247625351,
0.03416677564382553,
-0.00810485053807497,
-0.029240664094686508,
-0.02648947574198246,
0.006608427036553621,
-0.00022902358614373952,
-0.005274658557027578,
-0.02507670409977436,
0.06297989189624786,
0.012696359306573868,
0.04795989394187927,
0.006891910918056965,
0.010242597199976444,
-0.013514280319213867,
0.030393188819289207,
0.007784188259392977,
0.00951762218028307,
-0.01948138326406479,
0.02790224738419056,
-0.06495033204555511,
-0.029538089409470558,
0.019574329257011414,
0.026842668652534485,
-0.012566235847771168,
0.008541693910956383,
-0.02522541582584381,
0.03005858324468136,
0.019685862585902214,
0.0014662157045677304,
-0.002600151114165783,
-0.000900409824680537,
-0.02403571456670761,
0.05164053663611412,
-0.037345513701438904,
-0.034073829650878906,
-0.015205888077616692,
0.07621533423662186,
-0.022976133972406387,
-0.004995821975171566,
-0.03446420282125473,
0.10395027697086334,
-0.002542060101404786,
-0.010586495511233807,
0.010986161418259144,
0.02037365920841694,
0.028404153883457184,
-0.037754472345113754,
-0.05167771503329277,
0.04844320937991142,
-0.06416959315538406,
0.030002817511558533,
0.02593180164694786,
0.11346790194511414,
-0.019760219380259514,
-0.02078261971473694,
0.06011716648936272,
0.009935877285897732,
-0.018877236172556877,
-0.05271870270371437,
0.008309329859912395,
-0.009582684375345707,
0.03621157631278038,
0.03524494543671608,
0.008708995766937733,
-0.015633437782526016,
0.006654900033026934,
-0.023570986464619637,
0.005469844210892916,
-0.0059252772480249405,
-0.031062396243214607,
0.030783558264374733,
0.01874711364507675,
-0.03970633074641228,
-0.0023062110412865877,
-0.006022870074957609,
0.01378382183611393,
0.01922113448381424,
0.0065480126067996025,
0.010958277620375156,
-0.059931278228759766,
0.06822201609611511,
0.01933266967535019,
0.09599414467811584,
-0.08937641978263855,
-0.002246958203613758,
-0.041379351168870926,
0.03346038982272148,
0.01907242275774479,
0.015215182676911354,
0.029668211936950684,
-0.02578308992087841,
0.014183487743139267,
0.031192518770694733,
-0.010382015258073807,
-0.03420395404100418,
-0.017445875331759453,
0.01959291659295559,
0.0034901045728474855,
-0.016079576686024666,
-0.020020466297864914,
-0.00025850476231426,
-0.02805096097290516,
0.012770716100931168,
0.03989222273230553,
0.012854366563260555,
0.009187665767967701,
0.043201081454753876,
0.018282385542988777,
-0.014202076941728592,
0.015744972974061966,
-0.01840321533381939,
-0.03465009480714798,
-0.021897966042160988,
0.03598850965499878,
-0.030132940039038658,
-0.059299249202013016,
-0.015614848583936691,
-0.02886888198554516,
-0.0040663667023181915,
-0.001418581116013229,
0.02667536586523056,
-0.004317319951951504,
0.05454043671488762,
-0.006413241382688284,
-0.025838857516646385,
-0.059039000421762466,
-0.001648621284402907,
-0.042345982044935226,
-0.03613722324371338,
-0.035932742059230804,
-0.012268809601664543,
-0.015178005211055279,
-0.01594945229589939,
0.01259411871433258,
-0.06614004075527191,
0.02015059068799019,
-0.014313611201941967,
0.018040727823972702,
0.030002817511558533,
-0.031062396243214607,
-0.04888934642076492,
-0.047550931572914124,
0.022734476253390312,
-0.008202442899346352,
0.03346038982272148,
-0.006561954505741596,
-0.031657248735427856,
0.018756408244371414,
0.005265364423394203,
-0.011915616691112518,
-0.003973421175032854,
-0.026693955063819885,
-0.004596156533807516,
0.015187299810349941,
0.015856506302952766,
0.02570873312652111,
0.013421334326267242,
-0.05401994287967682,
0.009740691632032394,
-0.06714385002851486,
0.03215915337204933,
0.002725627738982439,
-0.02474210038781166,
0.024463262408971786,
-0.08469196408987045,
-0.013830294832587242,
0.00687332171946764,
0.0028882822953164577,
-0.046026624739170074,
-0.019537150859832764,
0.021786432713270187,
-0.07993315160274506,
0.022957544773817062,
0.019871754571795464,
-0.033850762993097305,
-0.012640591710805893,
0.008049082942306995,
-0.045729201287031174,
-0.05190078169107437,
0.030783558264374733,
0.036192987114191055,
-0.05056236684322357,
-0.04026400297880173,
0.033887941390275955,
0.003520311787724495,
0.021842198446393013,
0.006348179653286934,
0.03128546476364136,
0.025132471695542336,
-0.041899845004081726,
0.02660101093351841,
-0.005186360329389572,
0.04160241782665253,
0.020094823092222214,
-0.045692022889852524,
-0.009740691632032394,
0.003882799530401826,
-0.02321779355406761,
0.07606662064790726,
-0.006390004884451628,
-0.0007784187910147011,
-0.04777400195598602,
0.03245657682418823,
0.02886888198554516,
0.015531198121607304,
0.04788553714752197,
-0.044093359261751175,
-0.04067296162247658,
0.013133203610777855,
0.04758810997009277,
-0.027586232870817184,
0.04993033781647682,
-0.02816249430179596,
0.022083858028054237,
-0.013886062428355217,
0.0059206304140388966,
-0.011116284877061844,
0.027586232870817184,
0.04048707336187363,
0.036416057497262955,
-0.005767269991338253,
0.02689843624830246,
-0.005665029864758253,
0.016479242593050003,
-0.044836923480033875,
-0.044651031494140625,
0.09703513234853745,
0.01283577736467123,
-0.013477101922035217,
0.0011420681839808822,
-0.013030963018536568,
0.07119627296924591,
0.008894886821508408,
0.015215182676911354,
-0.004215079825371504,
0.0025467074010521173,
0.04836885258555412,
-0.03375781700015068,
0.002639652928337455,
0.022269748151302338,
-0.027995193377137184,
-0.04885217174887657,
-0.030151529237627983,
0.0022550909779965878,
-0.012566235847771168,
0.016005219891667366,
-0.008392981253564358,
-0.02786506898701191,
-0.03550519049167633,
0.014592448249459267,
-0.06294271349906921,
0.034148186445236206,
-0.03234504535794258,
-0.027586232870817184,
0.015187299810349941,
-0.00964774563908577,
0.07420770823955536,
0.02641511894762516,
0.05085979402065277,
0.03227068856358528,
0.006008928641676903,
0.027065737172961235,
0.037233978509902954,
0.012529057450592518,
-0.04829449579119682,
-0.015531198121607304,
0.019276902079582214,
-0.012045740149915218,
-0.021805021911859512,
-0.0019948433618992567,
-0.021563362330198288,
0.0041337525472044945,
0.07402181625366211,
0.06558236479759216,
-0.001539410324767232,
-0.06770152598619461,
-0.046881724148988724,
-0.005678971763700247,
-0.01914677955210209,
0.00616693589836359,
0.05647370219230652,
0.020243536680936813,
-0.023756876587867737
]
|
41,352 | pyglove.core.typing.class_schema | validate | Validates whether dict object is conformed with the schema. | def validate(self,
dict_obj: Dict[str, Any],
allow_partial: bool = False,
root_path: Optional[object_utils.KeyPath] = None) -> None:
"""Validates whether dict object is conformed with the schema."""
self.apply(
copy.deepcopy(dict_obj),
allow_partial=allow_partial,
root_path=root_path)
| (self, dict_obj: Dict[str, Any], allow_partial: bool = False, root_path: Optional[pyglove.core.object_utils.value_location.KeyPath] = None) -> NoneType | [
0.06711398810148239,
0.019677309319376945,
-0.028105497360229492,
-0.018137045204639435,
-0.026842134073376656,
-0.01815435104072094,
0.057457052171230316,
0.005754358600825071,
0.0018734114710241556,
-0.021442556753754616,
-0.0049669197760522366,
0.031341783702373505,
0.03466460108757019,
-0.035062648355960846,
-0.057076312601566315,
0.005611581262201071,
-0.03347046300768852,
0.03859313949942589,
0.016311226412653923,
0.025232644751667976,
0.011751005426049232,
-0.01991959847509861,
-0.01193272229284048,
0.08943916857242584,
0.0015510808443650603,
-0.00343747204169631,
0.005949054844677448,
-0.004516954999417067,
0.08133980631828308,
0.01773899979889393,
0.014329650439321995,
0.019711922854185104,
0.09213896095752716,
0.044996485114097595,
-0.010383804328739643,
-0.06216437742114067,
0.03817778825759888,
0.0013563844840973616,
-0.06212976574897766,
-0.020940672606229782,
-0.01074723806232214,
0.07573255151510239,
-0.027672838419675827,
0.03530493751168251,
0.05108831822872162,
0.02910926565527916,
-0.0060572195798158646,
0.11200664192438126,
0.0143469562754035,
-0.03229363262653351,
0.0035369833931326866,
-0.043681204319000244,
0.014130627736449242,
-0.02265400066971779,
-0.01200194749981165,
-0.017713040113449097,
-0.02341547980904579,
0.06586793065071106,
0.04212363436818123,
-0.06718321889638901,
-0.03435308858752251,
-0.022290566936135292,
-0.002701952587813139,
-0.059810712933540344,
0.0017793081933632493,
-0.0634104311466217,
-0.0023017432540655136,
-0.01901966892182827,
-0.009509834460914135,
-0.018587009981274605,
-0.08542410284280777,
0.003359593451023102,
0.006325467489659786,
0.061506737023591995,
-0.028105497360229492,
-0.053511206060647964,
-0.027811290696263313,
-0.02149447612464428,
0.021805990487337112,
-0.006533143576234579,
-0.023917363956570625,
-0.07510951906442642,
-0.05008454993367195,
-0.041431378573179245,
-0.05368426814675331,
0.04025454819202423,
-0.01808512583374977,
-0.010409764014184475,
0.09345424175262451,
0.0446503609418869,
0.0010172883048653603,
0.06181824952363968,
-0.02701519802212715,
-0.026772908866405487,
0.03700095787644386,
0.028538156300783157,
0.013126859441399574,
-0.004503975156694651,
-0.010080943815410137,
-0.0033098377753049135,
0.00009417083492735401,
-0.04257359728217125,
0.013689315877854824,
0.04696941003203392,
0.03547799959778786,
0.016328532248735428,
0.013940257951617241,
-0.07192515581846237,
-0.018725460395216942,
0.04246976226568222,
0.0055337026715278625,
-0.03071875497698784,
-0.02223864756524563,
0.063756562769413,
0.0117250457406044,
-0.0035715962294489145,
-0.020992591977119446,
-0.041396766901016235,
-0.03146292641758919,
-0.0013823439367115498,
0.04219285771250725,
-0.0036278418265283108,
0.037450920790433884,
-0.021113736554980278,
0.05448036268353462,
0.03478574380278587,
0.017263075336813927,
0.0056721530854702,
0.044615745544433594,
0.03345315903425217,
0.0012341584078967571,
0.024055814370512962,
-0.009977106004953384,
-0.0001438589533790946,
-0.01670927181839943,
0.0064768982119858265,
0.05859927088022232,
-0.006234609521925449,
-0.031012963503599167,
-0.03482035920023918,
0.057457052171230316,
0.026288332417607307,
0.037762437015771866,
-0.010773197747766972,
-0.0060269334353506565,
-0.018656235188245773,
-0.055657193064689636,
0.004144868813455105,
0.014944025315344334,
0.034006960690021515,
-0.0142517713829875,
-0.017496710643172264,
0.004651078954339027,
0.05465342476963997,
-0.07774008065462112,
-0.002160047646611929,
0.0020107803866267204,
-0.10432262718677521,
0.049946099519729614,
-0.04520416259765625,
-0.005737051833420992,
0.00431360537186265,
-0.001962106442078948,
-0.021148348227143288,
0.01841394603252411,
0.0001442645734641701,
0.052576664835214615,
-0.08535487204790115,
0.0031086516100913286,
0.020871447399258614,
0.023432785645127296,
-0.0052048820070922375,
-0.005559661891311407,
0.062372054904699326,
0.03511456772685051,
0.058426208794116974,
0.008609904907643795,
-0.022498242557048798,
-0.04776550084352493,
0.0050101857632398605,
0.01583530195057392,
0.01747940480709076,
0.0001366930518997833,
0.017167890444397926,
0.024142345413565636,
0.044892650097608566,
-0.053891945630311966,
0.030943738296628,
0.023432785645127296,
0.021061817184090614,
-0.04153521731495857,
0.014900759793817997,
0.040462225675582886,
-0.006091832183301449,
-0.017107317224144936,
-0.016778497025370598,
0.01217501051723957,
0.01603432558476925,
-0.013144166208803654,
-0.015636278316378593,
-0.03068414330482483,
-0.10688396543264389,
-0.00485875504091382,
0.001228750217705965,
-0.043162014335393906,
0.008103693835437298,
-0.012858611531555653,
0.05202285945415497,
0.018465865403413773,
-0.045861802995204926,
-0.020715689286589622,
-0.04070451483130455,
-0.010254006832838058,
-0.03904310613870621,
0.048561591655015945,
-0.04980764910578728,
0.043646592646837234,
-0.06496800482273102,
-0.047592438757419586,
-0.00596636114642024,
0.08750086277723312,
0.019971517845988274,
0.041327543556690216,
-0.03679328039288521,
0.018275495618581772,
-0.021996360272169113,
-0.0011411368614062667,
-0.0028555463068187237,
0.001980494474992156,
-0.0050534517504274845,
-0.01908889412879944,
-0.028347786515951157,
-0.02884967066347599,
-0.017695734277367592,
0.057976242154836655,
0.03253592178225517,
0.04212363436818123,
-0.027880515903234482,
0.07995529472827911,
-0.004084296524524689,
0.0817551538348198,
-0.0324493907392025,
-0.018465865403413773,
-0.05011916533112526,
-0.04475419968366623,
0.028988121077418327,
0.02223864756524563,
-0.006355753634124994,
0.010574174113571644,
-0.02313857711851597,
-0.02242901735007763,
0.019417714327573776,
-0.02625371888279915,
0.06444881111383438,
-0.004222747404128313,
0.03139370307326317,
0.015298805199563503,
-0.0072253975085914135,
0.01400948315858841,
-0.010176128707826138,
0.024142345413565636,
0.007095600012689829,
-0.008999297395348549,
0.09740008413791656,
0.004664058797061443,
-0.004850102122873068,
0.02614988200366497,
0.010998180136084557,
-0.007753240875899792,
-0.0012655261671170592,
0.0073638479225337505,
-0.027707451954483986,
0.060779869556427,
0.049357686191797256,
-0.016025671735405922,
0.030632223933935165,
0.05278433859348297,
0.011205855756998062,
0.0006706207059323788,
0.030701449140906334,
0.018102433532476425,
-0.03610102832317352,
0.03217248618602753,
-0.0018117575673386455,
0.014450795017182827,
-0.02505958266556263,
-0.04821546748280525,
0.009232932701706886,
-0.017946675419807434,
-0.05859927088022232,
0.02798435278236866,
-0.021061817184090614,
0.0226886123418808,
0.00898199062794447,
-0.028797751292586327,
-0.013421067036688328,
-0.0006489877705462277,
-0.09421572089195251,
-0.03272629156708717,
-0.010020371526479721,
0.004551567602902651,
-0.00032233059755526483,
0.026876747608184814,
-0.0088175805285573,
0.05908384919166565,
-0.0042616864666342735,
0.024246184155344963,
-0.0038744572084397078,
-0.0052481479942798615,
0.024540390819311142,
-0.009362730197608471,
0.010911648161709309,
-0.02165023237466812,
0.00013628743181470782,
0.014269078150391579,
-0.035962577909231186,
0.031376395374536514,
-0.03542608022689819,
-0.02682482823729515,
0.02505958266556263,
-0.05074219033122063,
0.024038508534431458,
-0.03045915998518467,
-0.06666402518749237,
-0.015636278316378593,
-0.06469110399484634,
0.07843233644962311,
-0.027707451954483986,
0.01058282796293497,
-0.020075354725122452,
-0.03755475953221321,
-0.05686863511800766,
0.03907771781086922,
0.03083989955484867,
0.03334932029247284,
-0.009276199154555798,
-0.012512484565377235,
-0.004060500301420689,
-0.024211570620536804,
0.009250239469110966,
0.04378504306077957,
0.005442844238132238,
0.0904083251953125,
-0.026478702202439308,
-0.04080835357308388,
-0.02190982736647129,
-0.0390084944665432,
-0.01245191227644682,
0.02197905257344246,
-0.036516379565000534,
-0.08542410284280777,
0.021546395495533943,
0.019746534526348114,
-0.027863208204507828,
-0.016666006296873093,
-0.0525074377655983,
0.02213481068611145,
0.033332012593746185,
-0.01593048684298992,
-0.048180852085351944,
0.06420652568340302,
-0.05721476301550865,
-0.08743163198232651,
-0.061887476593256,
0.024142345413565636,
0.04506571218371391,
-0.016986174508929253,
-0.055345676839351654,
-0.009786736220121384,
-0.017115971073508263,
0.016302572563290596,
-0.010721278376877308,
-0.04600025340914726,
-0.03578951209783554,
0.03662021830677986,
0.03800472617149353,
0.009743469767272472,
0.04323124140501022,
-0.04330046474933624,
0.04506571218371391,
0.046692509204149246,
0.015696851536631584,
0.0412583164870739,
-0.03255322575569153,
-0.023242415860295296,
-0.055657193064689636,
-0.027378631755709648,
-0.0010637991363182664,
-0.041915956884622574,
-0.00338987959548831,
0.01029727328568697,
-0.028970815241336823,
-0.0008555822423659265,
0.006174037232995033,
0.014070055447518826,
-0.0018117575673386455,
0.011655820533633232,
0.004668385721743107,
-0.0324493907392025,
0.015792036429047585,
0.0023255394771695137,
-0.01966000348329544,
-0.0701599046587944,
-0.011413532309234142,
0.046692509204149246,
-0.01320473849773407,
0.034387700259685516,
0.09580790251493454,
0.022740531712770462,
0.07074832171201706,
0.05859927088022232,
0.004138378892093897,
0.03682789206504822,
0.018171658739447594,
-0.03267437219619751,
-0.0005502875428646803,
0.022377099841833115,
-0.02280975691974163,
-0.03786627575755119,
-0.01670927181839943,
0.08092445135116577,
0.013360495679080486,
0.005525049287825823,
-0.019711922854185104,
0.004175154957920313,
-0.058806948363780975,
-0.024332715198397636,
-0.056210994720458984,
0.06299508363008499,
0.016120856627821922,
-0.025786448270082474,
-0.019036974757909775,
-0.019798453897237778,
-0.040946803987026215,
0.007121559232473373,
-0.005633214022964239,
0.0047852033749222755,
0.007048007566481829,
0.03322817385196686,
0.026513313874602318,
0.011967334896326065,
-0.003190856659784913,
0.04264282435178757,
-0.007043680641800165,
0.013048981316387653,
0.039527684450149536,
0.009016603231430054,
0.00852769985795021,
0.0416390560567379,
0.029853438958525658,
0.07213282585144043,
-0.020421482622623444,
-0.001198464073240757,
-0.009466568939387798,
-0.08272431045770645,
0.005810603965073824,
-0.030822593718767166,
-0.00838492251932621,
-0.049946099519729614,
0.027430551126599312,
-0.029230410233139992,
-0.0457579642534256,
0.00531737320125103,
-0.03308972343802452,
-0.05146905779838562,
0.0343184731900692,
-0.03852391615509987,
0.05340736731886864,
-0.005788971204310656,
-0.001446161069907248,
-0.02242901735007763,
-0.01535937748849392,
0.0052048820070922375,
0.025423014536499977,
0.024730760604143143,
0.004153521731495857,
0.07884769141674042,
0.002401254838332534,
-0.026357557624578476,
-0.014710390008985996,
0.02625371888279915,
0.043611980974674225,
0.032051343470811844,
-0.004767897073179483,
0.014061402529478073,
-0.04648483172059059,
-0.049080781638622284,
0.01728038117289543,
-0.03700095787644386,
0.036516379565000534,
0.0027971374802291393,
-0.000491067417897284,
0.0007522850064560771,
0.004927980713546276,
0.019331183284521103,
-0.04703863337635994,
-0.014788268133997917,
0.021771376952528954,
0.01593914069235325,
-0.04018532484769821,
-0.011058751493692398,
0.014796921983361244,
0.007086946628987789,
0.05416884645819664,
-0.07026374340057373,
-0.01148275751620531,
-0.056626349687576294,
-0.00687494408339262,
0.0020107803866267204,
-0.012746119871735573,
-0.06289124488830566,
-0.001689531491138041,
0.0461387038230896,
0.07995529472827911,
0.0656256452202797,
0.03696634620428085,
0.014173893257975578,
0.019781148061156273,
-0.006217303220182657,
-0.04340430349111557,
-0.0013531395234167576,
0.00828973762691021,
0.027586307376623154,
-0.05146905779838562,
0.03807394951581955,
-0.012278849259018898,
0.005624560639262199,
-0.06026067957282066,
0.045446451753377914,
-0.08106289803981781,
0.021027203649282455,
-0.013871032744646072,
0.06081448122859001,
-0.0010302681475877762,
-0.009137747809290886,
0.05804546922445297,
0.04330046474933624,
-0.08936994522809982,
-0.0798860713839531,
0.019781148061156273,
0.03272629156708717,
0.01344702672213316,
0.04534261301159859,
0.007199437823146582,
0.023571236059069633,
0.02805357798933983,
0.020231112837791443,
-0.04115447774529457,
-0.04444268345832825,
0.0010437887394800782,
-0.0040864599868655205,
-0.021373331546783447,
0.034906890243291855,
0.06521029025316238,
-0.04527338966727257,
-0.012071172706782818,
0.05243821442127228,
-0.003405022667720914,
0.015316111966967583,
-0.002589461160823703,
0.017565935850143433,
-0.04471958428621292,
0.01586991548538208,
0.005793297663331032,
-0.028728526085615158,
-0.025578772649168968,
-0.017453445121645927,
0.017332300543785095,
0.001923167146742344,
0.07268663495779037,
-0.03533954918384552,
0.041327543556690216,
-0.02377891167998314,
-0.03793549910187721,
0.02805357798933983,
-0.01384507305920124,
-0.07552487403154373,
-0.016432370990514755,
-0.032916661351919174,
-0.030943738296628,
-0.000028427017241483554,
-0.0066586146131157875,
0.03904310613870621,
-0.010037677362561226,
-0.040981415659189224,
-0.002247661119326949,
0.010054984129965305,
0.02929963544011116,
0.03315895050764084,
-0.04212363436818123,
-0.05074219033122063,
-0.012131744995713234,
-0.03582412749528885,
-0.020161887630820274,
0.031791746616363525,
0.012408646754920483,
-0.03983919695019722,
-0.02502496913075447,
-0.0009210218559019268,
-0.05600332096219063,
-0.028486236929893494,
0.012348074465990067,
0.005243821535259485,
0.040531449019908905,
-0.038662366569042206,
0.023086659610271454,
0.019833067432045937,
0.041396766901016235,
0.04662328213453293,
-0.05489571392536163,
-0.03103026933968067,
-0.01628526672720909,
0.04243514686822891,
-0.00142993638291955,
0.007831119000911713,
-0.05268050357699394,
-0.04620793089270592,
0.048077017068862915,
-0.006048566196113825,
-0.0037446594797074795,
-0.02265400066971779,
-0.0019848209340125322,
-0.013343188911676407,
0.02933424897491932,
-0.03366083279252052,
-0.017332300543785095,
-0.001719817635603249,
-0.010738584212958813,
-0.04343891516327858,
-0.05465342476963997,
-0.00803014263510704,
-0.015973752364516258,
-0.02644408866763115,
-0.0015911017544567585,
0.006766779348254204,
0.024851905182003975,
0.03582412749528885,
-0.006983108818531036,
-0.010167475789785385,
0.02033495157957077,
-0.020092662423849106,
-0.028382400050759315,
0.00636873347684741,
0.06091831997036934,
-0.010980873368680477,
0.0956694558262825,
-0.024678843095898628,
-0.03023417852818966,
0.0469001829624176,
0.017808225005865097,
0.016371797770261765,
0.002166537567973137,
-0.041431378573179245,
-0.01283265184611082,
0.06008761748671532,
0.024661535397171974,
0.03218979388475418,
-0.08521642535924911,
-0.004397973883897066,
0.04561951383948326,
-0.01751401647925377,
-0.06403346359729767,
-0.014796921983361244,
-0.06223360076546669,
0.04070451483130455,
0.03942384570837021,
-0.008112347684800625,
-0.05448036268353462,
-0.0013531395234167576,
0.012313461862504482,
-0.03547799959778786,
-0.028192030265927315,
-0.005157289560884237,
0.0558994822204113,
-0.009440609253942966,
0.009812694974243641,
-0.042781274765729904,
0.0001729282084852457,
0.04603486880660057,
-0.04291972517967224,
0.015575706958770752,
-0.025405708700418472,
-0.006334120873361826,
0.007549891248345375,
-0.02791512757539749,
-0.028866976499557495,
-0.0030177931766957045,
0.002693299436941743,
0.006065872497856617,
0.0022952535655349493,
-0.021563701331615448,
-0.07337888330221176,
0.033781979233026505,
0.02595951221883297,
-0.033332012593746185,
-0.09470029920339584,
-0.014978637918829918,
0.07905536890029907,
0.03658560663461685,
0.045861802995204926,
0.020058048889040947,
0.04523877426981926,
0.04250437393784523,
-0.008947378024458885,
-0.012036560103297234,
0.010072290897369385,
-0.03672405704855919,
0.010219394229352474,
0.024488473311066628,
-0.0038376811426132917,
0.027620920911431313,
0.07220205664634705,
0.04111986607313156,
-0.06008761748671532,
-0.0008052857010625303,
0.03064952977001667,
0.04378504306077957,
-0.021702151745557785,
0.0637911707162857,
-0.11394494771957397,
-0.01657947525382042,
-0.010254006832838058,
-0.10231509059667587,
-0.001197382458485663,
0.06531412899494171,
-0.026271026581525803,
-0.00025432207621634007,
-0.0024531737435609102,
0.0018160841427743435,
-0.011603902094066143,
0.05596870556473732,
-0.03462998941540718,
-0.03800472617149353,
-0.02078491635620594,
-0.022982820868492126,
0.016726579517126083,
-0.020231112837791443,
0.02133871801197529,
-0.002435867441818118,
0.03720863163471222,
0.0660063847899437,
0.055761031806468964,
0.05821853131055832,
0.00732490886002779,
0.018967749550938606,
0.01283265184611082,
-0.0322590209543705,
0.0002068648609565571,
0.03928539529442787,
-0.01065205316990614,
0.05004993826150894,
0.06347966194152832,
0.011776965111494064,
0.02730940654873848,
0.02978421375155449,
-0.00242937752045691,
-0.03810856118798256,
0.0009632060537114739,
0.03106488287448883,
-0.004850102122873068,
-0.025855673477053642,
-0.047246310859918594,
-0.0031021616887301207,
0.002920445054769516,
0.019867679104208946,
0.03163599222898483,
0.0008750518900342286,
0.03786627575755119
]
|
41,353 | pyglove.core.typing.class_schema | values | Returns an iterable of Field in declaration order. | def values(self) -> Iterable[Field]:
"""Returns an iterable of Field in declaration order."""
return self._fields.values()
| (self) -> Iterable[pyglove.core.typing.class_schema.Field] | [
0.0498894527554512,
-0.010190516710281372,
-0.06983832269906998,
-0.020899634808301926,
-0.0218158308416605,
0.026431383565068245,
0.0339856781065464,
-0.07056435942649841,
0.055697787553071976,
-0.004797062836587429,
-0.008971803821623325,
-0.007982139475643635,
-0.006296684965491295,
0.0030294964089989662,
0.043355073779821396,
-0.014252894558012486,
-0.0417301245033741,
0.031029649078845978,
-0.03144453093409538,
0.020018013194203377,
0.0007065943791531026,
-0.004451328422874212,
0.005475566256791353,
-0.021107075735926628,
0.01718299277126789,
0.00973241962492466,
0.02511759288609028,
-0.033864669501781464,
0.02418411150574684,
0.05262075364589691,
-0.02888609655201435,
-0.000754673033952713,
0.002333706244826317,
-0.014754209667444229,
-0.013449062593281269,
-0.06800592690706253,
0.0033255312591791153,
0.018047327175736427,
-0.008600139990448952,
0.05237874016165733,
0.00655166432261467,
-0.03443513065576553,
-0.03479815274477005,
-0.02333706244826317,
-0.047365590929985046,
-0.04477258771657944,
0.0637533962726593,
-0.030130740255117416,
0.029162684455513954,
-0.048437368124723434,
0.044495999813079834,
0.032153286039829254,
-0.010199160315096378,
-0.03040732815861702,
0.03507474064826965,
-0.024962013587355614,
0.013976307585835457,
0.0026038112118840218,
-0.014192391186952591,
0.06216301769018173,
-0.004408111795783043,
-0.024201396852731705,
-0.03021717444062233,
-0.07488603889942169,
0.023561788722872734,
-0.037754181772470474,
0.020657621324062347,
-0.019810572266578674,
-0.01736450381577015,
0.012990964576601982,
-0.05815250054001808,
-0.02399395778775215,
0.04498002678155899,
0.04117694869637489,
-0.017857173457741737,
-0.013492279686033726,
0.04639753699302673,
0.05262075364589691,
0.03448699042201042,
-0.10095439851284027,
-0.014710992574691772,
0.0437699556350708,
-0.05680413916707039,
0.04027803987264633,
0.004392985720187426,
-0.0061670346185564995,
-0.014840642921626568,
0.015938349068164825,
0.004332482349127531,
0.05628553777933121,
-0.021331803873181343,
0.0003573487629182637,
-0.026569677516818047,
0.0792422890663147,
-0.07972631603479385,
-0.00976699311286211,
-0.06880111992359161,
-0.010821482166647911,
-0.07758276909589767,
0.06696872413158417,
0.013872587122023106,
0.0035934753250330687,
0.006223216652870178,
0.0420067124068737,
0.006473873741924763,
-0.0329657606780529,
-0.024702712893486023,
-0.06358052790164948,
0.06351137906312943,
0.004109915811568499,
-0.005527426488697529,
0.04446142539381981,
0.032723747193813324,
0.04477258771657944,
-0.014443048276007175,
-0.0455332025885582,
-0.02359636314213276,
-0.003213167656213045,
0.005518782883882523,
-0.027710599824786186,
-0.0003867901978082955,
0.0835985392332077,
0.028782377019524574,
0.05732274055480957,
0.0169236920773983,
0.04861023649573326,
0.008103146217763424,
-0.023890236392617226,
-0.03557605296373367,
-0.00582130067050457,
0.024789145216345787,
0.001402384601533413,
-0.0037296083755791187,
0.00899773370474577,
0.007454894948750734,
-0.014399832114577293,
0.13780967891216278,
-0.03924083709716797,
0.021228082478046417,
-0.014417118392884731,
0.004533440340310335,
0.016387803480029106,
0.050027746707201004,
0.00798646081238985,
-0.0329657606780529,
-0.006923328619450331,
0.05189471319317818,
0.059950318187475204,
-0.045636922121047974,
-0.01616307720541954,
-0.02715742588043213,
0.0044815801084041595,
0.009663272649049759,
0.0033082447480410337,
-0.044253986328840256,
0.02143552340567112,
-0.03436598554253578,
-0.04508374631404877,
-0.010389314033091068,
-0.027330292388796806,
-0.05898226425051689,
-0.005717580206692219,
-0.009369398467242718,
0.01116721611469984,
0.03626752272248268,
0.08435916155576706,
0.009058237075805664,
-0.09521521627902985,
-0.0013019056059420109,
-0.006884433329105377,
-0.0026880837976932526,
-0.028021762147545815,
-0.017641089856624603,
0.006469552405178547,
-0.037512168288230896,
0.044876307249069214,
-0.007368461228907108,
0.04359709098935127,
0.044876307249069214,
0.018928950652480125,
0.003917601425200701,
-0.03535132855176926,
-0.011711747385561466,
-0.041695550084114075,
0.07447116076946259,
-0.02416682429611683,
-0.025013873353600502,
0.00910145416855812,
0.023181481286883354,
-0.03325963392853737,
0.04031261429190636,
-0.010467104613780975,
-0.010432531125843525,
-0.023319775238633156,
-0.04435770586133003,
-0.03358808159828186,
-0.015307384543120861,
-0.01262794341892004,
0.000981020973995328,
0.02456441894173622,
-0.016698963940143585,
-0.06358052790164948,
-0.031150655820965767,
0.0038138809613883495,
-0.0415918305516243,
0.06627725809812546,
0.026880837976932526,
-0.08083266764879227,
-0.031185230240225792,
-0.03163468465209007,
0.029370125383138657,
-0.0023747622035443783,
-0.010225090198218822,
-0.06351137906312943,
0.022040558978915215,
-0.05797963589429855,
0.008963160216808319,
-0.05663127079606056,
0.005812657065689564,
0.03415854275226593,
0.06434114277362823,
0.0016573636094108224,
-0.04027803987264633,
-0.04110780358314514,
0.044115692377090454,
-0.026949984952807426,
-0.04536033421754837,
-0.04542947933077812,
-0.07861997187137604,
-0.07101381570100784,
-0.012878600507974625,
0.03823820874094963,
-0.07481689006090164,
-0.018756084144115448,
0.04383910447359085,
0.09127384424209595,
0.024858292192220688,
-0.015411104075610638,
-0.0067245312966406345,
0.030683914199471474,
-0.009403971955180168,
0.018946237862110138,
-0.02812548168003559,
0.03365723043680191,
-0.041902992874383926,
0.009983076713979244,
-0.018358489498496056,
0.03149639070034027,
0.019689565524458885,
0.020726768299937248,
-0.02672525867819786,
-0.04836822301149368,
0.024218684062361717,
0.02952570468187332,
0.025463327765464783,
-0.042663607746362686,
0.02117622271180153,
0.008621747605502605,
0.07056435942649841,
-0.019326545298099518,
0.03275832161307335,
-0.06745275110006332,
-0.011850041337311268,
0.04435770586133003,
0.036544110625982285,
0.02176397107541561,
0.012299495749175549,
-0.012359999120235443,
-0.009637342765927315,
0.026638824492692947,
0.09265677630901337,
0.00006475764530478045,
-0.06382254511117935,
-0.030770348384976387,
0.009343468584120274,
-0.005713258404284716,
0.023423494771122932,
0.04276732727885246,
-0.02124536968767643,
-0.0017772901337593794,
0.014831999316811562,
-0.02594735659658909,
-0.006128139793872833,
-0.011824111454188824,
-0.0038462935481220484,
0.011296866461634636,
-0.041902992874383926,
0.009948503226041794,
-0.048817675560712814,
-0.02511759288609028,
0.050096891820430756,
0.03467714414000511,
0.008280334994196892,
-0.05974287912249565,
0.04719272628426552,
-0.01056218147277832,
-0.005466923117637634,
-0.0030532656237483025,
0.027001844719052315,
0.01680268533527851,
0.04096950963139534,
0.009810209274291992,
0.019620418548583984,
0.0555940680205822,
-0.01711384579539299,
-0.009490405209362507,
0.030372753739356995,
0.024633565917611122,
-0.016690321266651154,
-0.031202515587210655,
-0.03395110368728638,
0.04871395602822304,
-0.006132461130619049,
-0.013889873400330544,
-0.028419354930520058,
-0.05172184482216835,
-0.059708304703235626,
0.039344556629657745,
-0.011806825175881386,
0.008660643361508846,
-0.013181118294596672,
-0.003716643201187253,
0.020916922017931938,
-0.021020643413066864,
-0.032101426273584366,
0.052828192710876465,
0.0037836292758584023,
0.006581916008144617,
0.020381033420562744,
-0.021089790388941765,
-0.011443804018199444,
-0.023821089416742325,
0.0035740279126912355,
0.06427200138568878,
0.025204027071595192,
0.03557605296373367,
0.032983046025037766,
-0.004529118537902832,
0.019551271572709084,
-0.03505745157599449,
-0.04491087794303894,
-0.04408111795783043,
0.00333201396279037,
0.003016531467437744,
-0.04740016534924507,
-0.0010550296865403652,
-0.012161202728748322,
0.022351719439029694,
0.08574209362268448,
0.020968781784176826,
0.04470343887805939,
-0.054176557809114456,
0.006171356420964003,
0.024581706151366234,
-0.0007049737614579499,
-0.008971803821623325,
-0.021833118051290512,
0.005635468289256096,
-0.033242348581552505,
0.06935428828001022,
0.08608783036470413,
0.012143915519118309,
-0.00025592438760213554,
-0.00422876188531518,
0.057668473571538925,
-0.025204027071595192,
-0.043424222618341446,
-0.004300069995224476,
0.02570534124970436,
0.029750432819128036,
-0.0011225559283047915,
0.0434933677315712,
0.0007282027509063482,
-0.053796250373125076,
-0.022369006648659706,
-0.012610657140612602,
0.04311306029558182,
0.04871395602822304,
-0.04000145196914673,
-0.005756475497037172,
-0.005194657016545534,
-0.06707244366407394,
-0.020000725984573364,
0.0027269788552075624,
-0.038825955241918564,
0.0023034545592963696,
0.03854937106370926,
-0.035852640867233276,
-0.024529844522476196,
0.02067490853369236,
-0.026414096355438232,
-0.0308567825704813,
-0.09535350650548935,
-0.017087915912270546,
0.01306875515729189,
-0.031150655820965767,
0.006880111526697874,
-0.031064223498106003,
0.02257644757628441,
-0.036094654351472855,
0.025688055902719498,
-0.04294019564986229,
-0.033432502299547195,
0.046535830944776535,
-0.04660497605800629,
-0.06683043390512466,
0.03910254314541817,
-0.02862679585814476,
0.01040660124272108,
0.01858321577310562,
0.05704615265130997,
0.021660251542925835,
0.006357188802212477,
-0.051306962966918945,
0.07308822125196457,
-0.03595636412501335,
0.005030433181673288,
0.007208559196442366,
0.03695899248123169,
0.014408474788069725,
0.016189007088541985,
-0.0316692590713501,
-0.04024346545338631,
0.07315737009048462,
-0.0022796853445470333,
-0.02556704729795456,
-0.022282572463154793,
0.08408257365226746,
-0.009853426367044449,
-0.005332950968295336,
0.02404581755399704,
0.041004084050655365,
-0.026500530540943146,
-0.005652755033224821,
-0.02143552340567112,
-0.03332878276705742,
-0.021452810615301132,
0.00045755767496302724,
0.007256097625941038,
0.01609393022954464,
0.0023877271451056004,
0.031582824885845184,
0.05351966246962547,
-0.06423742324113846,
0.05109952390193939,
-0.0018874929519370198,
-0.017381789162755013,
0.06036520004272461,
0.02086506225168705,
0.00808153860270977,
-0.017589230090379715,
0.015056726522743702,
0.09901829063892365,
-0.024339690804481506,
0.02340620942413807,
0.06887026131153107,
-0.05051177367568016,
-0.07820508629083633,
0.0018410348566249013,
-0.026500530540943146,
0.0598120242357254,
0.01578276790678501,
-0.00516872713342309,
-0.032723747193813324,
-0.0227666012942791,
-0.020018013194203377,
-0.02010444737970829,
0.0010766381165012717,
0.010285594500601292,
0.03557605296373367,
0.055559493601322174,
0.009611411951482296,
-0.0033925173338502645,
-0.09217274934053421,
-0.02416682429611683,
0.019240111112594604,
0.008379734121263027,
0.00827169232070446,
-0.044253986328840256,
-0.05825622007250786,
0.0247372854501009,
-0.04466886445879936,
-0.04058920219540596,
-0.021037928760051727,
0.018427636474370956,
-0.009006377309560776,
0.0010733967646956444,
0.006785034667700529,
-0.0517909899353981,
-0.011694461107254028,
0.01972413994371891,
-0.0497511588037014,
0.018081901594996452,
-0.00443836348131299,
0.04114237800240517,
0.0031850768718868494,
0.04836822301149368,
0.01920553855597973,
-0.04885224997997284,
0.07716788351535797,
0.010700475424528122,
0.010034936480224133,
-0.017528725787997246,
0.012990964576601982,
-0.011633957736194134,
-0.03986315801739693,
0.06952715665102005,
-0.037512168288230896,
0.011919188313186169,
-0.0199834406375885,
-0.006322615314275026,
-0.013431775383651257,
-0.01116721611469984,
-0.005198978818953037,
0.005587929859757423,
-0.031012361869215965,
-0.040036026388406754,
-0.002456874120980501,
-0.05331222340464592,
0.03830735385417938,
-0.040105175226926804,
-0.010397957637906075,
-0.037512168288230896,
0.03322506323456764,
-0.019603131338953972,
0.07813594490289688,
-0.06638097763061523,
-0.03383009508252144,
0.03135809674859047,
-0.041453536599874496,
0.10219904780387878,
-0.057668473571538925,
0.024253258481621742,
-0.012740307487547398,
-0.029992446303367615,
-0.001219793688505888,
0.05113409459590912,
0.025411467999219894,
-0.05618181452155113,
0.0598120242357254,
0.03376094996929169,
0.06645012646913528,
-0.02729571983218193,
0.024218684062361717,
0.05874025076627731,
-0.04840279370546341,
-0.05186013877391815,
-0.047434739768505096,
0.02067490853369236,
-0.014736922457814217,
-0.02022545412182808,
-0.00999172031879425,
-0.01205748226493597,
-0.055317480117082596,
-0.012809454463422298,
0.017036056146025658,
-0.0028587901033461094,
0.006512769032269716,
-0.009326181374490261,
-0.03443513065576553,
0.03479815274477005,
-0.038134489208459854,
-0.060849227011203766,
0.024149537086486816,
-0.05006232112646103,
0.03137538209557533,
0.04740016534924507,
0.043735384941101074,
-0.04432313144207001,
0.005920698866248131,
-0.0008686573128215969,
0.01160802785307169,
0.029473844915628433,
0.023630935698747635,
0.10040123015642166,
0.012429146096110344,
-0.04892139509320259,
-0.021988699212670326,
-0.026258517056703568,
-0.05227502062916756,
0.014408474788069725,
0.025048445910215378,
0.027848893776535988,
-0.03230886533856392,
-0.018669649958610535,
0.027641452848911285,
0.012143915519118309,
0.028592223301529884,
0.033691804856061935,
0.03341521695256233,
-0.009455831721425056,
0.002824216615408659,
-0.02893795631825924,
-0.007515398319810629,
-0.034193117171525955,
-0.013820726424455643,
-0.07260419428348541,
0.030891355127096176,
-0.06665756553411484,
-0.01358735654503107,
-0.008397020399570465,
0.01355278305709362,
0.00612381799146533,
0.0016994999023154378,
-0.0007649370236322284,
-0.07433286309242249,
0.06451401114463806,
0.03199770674109459,
0.06734903156757355,
0.056320108473300934,
-0.03986315801739693,
-0.028782377019524574,
-0.009879356250166893,
-0.05946629121899605,
-0.0021230243146419525,
-0.0028328599873930216,
0.0053156642243266106,
0.026258517056703568,
0.02437426522374153,
0.018980810418725014,
-0.02226528525352478,
-0.00033033828367479146,
-0.003617244539782405,
0.04905968904495239,
0.0015352761838585138,
-0.022369006648659706,
-0.0339856781065464,
-0.048955969512462616,
0.01068318821489811,
0.00380955939181149,
0.0000737386362743564,
0.0029192937072366476,
0.029179971665143967,
-0.009784279391169548,
-0.05075378715991974,
-0.0027529089711606503,
-0.03944827988743782,
-0.06873197108507156,
-0.0248064324259758,
-0.0045636920258402824,
0.0011668531224131584,
0.05618181452155113,
-0.016621174290776253,
0.036232948303222656,
-0.013025538064539433,
0.007528363261371851,
-0.03550690785050392,
-0.06112581491470337,
0.0188943762332201,
-0.05109952390193939,
-0.02036374807357788,
0.059016838669776917,
-0.017736166715621948,
-0.010043580085039139,
-0.009965789504349232,
-0.03550690785050392,
-1.3927282793702034e-7,
-0.005518782883882523,
-0.0018702062079682946,
-0.016145789995789528,
0.027053704485297203,
-0.0028652725741267204,
0.05711529776453972,
-0.07246589660644531,
-0.01724349521100521,
0.025463327765464783,
-0.0020711643155664206,
0.06482516974210739,
0.016776755452156067,
0.03474629297852516,
-0.011046209372580051,
0.05462601035833359,
0.04211043193936348,
-0.01326755154877901,
-0.013570069335401058,
0.07737532258033752,
0.018756084144115448,
0.028782377019524574,
0.06195557862520218,
-0.008098824881017208,
0.01832391507923603,
-0.025152167305350304,
-0.013734293170273304,
0.02347535640001297,
0.02003530040383339,
-0.035143885761499405,
-0.04076206684112549,
0.021902265027165413,
0.02366551011800766,
-0.027019131928682327,
0.02010444737970829,
-0.042283300310373306,
0.03664783015847206,
-0.038203634321689606,
0.03535132855176926,
0.054487720131874084,
0.04688156396150589,
-0.002590846037492156,
0.00780927250161767,
0.0697345957159996,
-0.03187669813632965,
0.0076536922715604305,
0.023717369884252548,
0.03796162083745003,
0.0319458432495594,
0.007904349826276302,
0.060399774461984634,
0.02824648842215538,
-0.0005418303771875799,
0.017978182062506676,
0.006832573097199202,
0.07792849838733673,
-0.08774735033512115,
-0.03491916134953499,
0.008379734121263027,
-0.033363357186317444,
0.008695216849446297,
0.03619837760925293,
-0.006326936651021242,
0.0656549334526062,
0.010052223689854145,
0.048506516963243484,
-0.0030899997800588608,
0.028782377019524574,
0.009334824979305267,
0.050857510417699814,
-0.05428027734160423,
0.0479879155755043,
-0.04878310486674309,
0.003150503383949399,
0.03322506323456764,
0.013846657238900661,
-0.04321678355336189,
-0.0009453670936636627,
-0.0350055918097496,
-0.013561425730586052,
-0.002145713195204735,
0.026172082871198654,
-0.020502042025327682,
0.00922246091067791,
0.020087160170078278,
-0.0048316363245248795,
0.046916138380765915,
0.018272055312991142,
-0.009049594402313232,
-0.012264922261238098,
0.010631328448653221,
-0.0188943762332201,
-0.05096122995018959,
-0.0037836292758584023,
-0.008989091031253338,
0.05286276713013649,
0.025532474741339684,
-0.017321286723017693,
-0.024771859869360924,
0.003727447474375367,
0.04428855702280998,
-0.05186013877391815,
-0.046155523508787155,
-0.017891747877001762,
-0.06067636236548424,
-0.0005250839167274535,
-0.012532866559922695,
0.049647439271211624,
-0.014529482461512089,
0.012411859817802906,
0.03448699042201042,
-0.01724349521100521
]
|
41,354 | pyglove.core.symbolic.base | Symbolic | Base for all symbolic types.
Symbolic types are types that provide interfaces for symbolic programming,
based on which symbolic objects can be created. In PyGlove, there are three
categories of symbolic types:
* Symbolic classes: Defined by :class:`pyglove.Object` subclasses,
including symbolic classes created from :func:`pyglove.symbolize`, which
inherit :class:`pyglove.ClassWrapper`, a subclass of ``pg.Object``.
* Symbolic functions: Defined by :class:`pyglove.Functor`.
* Symbolic container types: Defined by :class:`pyglove.List` and
:class:`pyglove.Dict`.
| class Symbolic(
TopologyAware,
object_utils.JSONConvertible,
object_utils.MaybePartial,
object_utils.Formattable,
):
"""Base for all symbolic types.
Symbolic types are types that provide interfaces for symbolic programming,
based on which symbolic objects can be created. In PyGlove, there are three
categories of symbolic types:
* Symbolic classes: Defined by :class:`pyglove.Object` subclasses,
including symbolic classes created from :func:`pyglove.symbolize`, which
inherit :class:`pyglove.ClassWrapper`, a subclass of ``pg.Object``.
* Symbolic functions: Defined by :class:`pyglove.Functor`.
* Symbolic container types: Defined by :class:`pyglove.List` and
:class:`pyglove.Dict`.
"""
# Do not include comments in str output.
__str_format_kwargs__ = dict(compact=False, verbose=False)
# Symbolic sub-types that will be set when they are defined.
# pylint: disable=invalid-name
DictType = None
ListType = None
ObjectType = None
# pylint: enable=invalid-name
def __init__(self,
*,
allow_partial: bool,
accessor_writable: bool,
sealed: bool,
root_path: Optional[object_utils.KeyPath],
init_super: bool = True):
"""Constructor.
Args:
allow_partial: Whether to allow required fields to be MISSING_VALUE or
partial.
accessor_writable: Whether to allow write access via attributes. This flag
is useful when we want to enforce update of fields using `rebind`
method, which leads to better trackability and batched field update
notification.
sealed: Whether object is sealed that cannot be changed. This flag is
useful when we don't want downstream to modify the object.
root_path: KeyPath of current object in its context (object tree).
init_super: If True, call super.__init__, otherwise short-circuit. This
flag is useful when user want to explicitly implement `__init__` for
multi-inheritance, which is needed to pass different arguments to
different bases. Please see `symbolic_test.py#testMultiInheritance`
for more details.
"""
# NOTE(daiyip): we uses `self._set_raw_attr` here to avoid overridden
# `__setattr__` from subclasses change the behavior unintentionally.
self._set_raw_attr('_allow_partial', allow_partial)
self._set_raw_attr('_accessor_writable', accessor_writable)
self._set_raw_attr('_sealed', sealed)
# NOTE(daiyip): parent is used for rebind call to notify their ancestors
# for updates, not for external usage.
self._set_raw_attr('_sym_parent', None)
self._set_raw_attr('_sym_path', root_path or object_utils.KeyPath())
self._set_raw_attr('_sym_puresymbolic', None)
self._set_raw_attr('_sym_missing_values', None)
self._set_raw_attr('_sym_nondefault_values', None)
origin = Origin(None, '__init__') if flags.is_tracking_origin() else None
self._set_raw_attr('_sym_origin', origin)
# super.__init__ may enter into next base class's __init__ when
# multi-inheritance is used. Since we have override `__setattr__` for
# symbolic.Object, which depends on `_accessor_writable` and so on,
# we want to call make `__setattr__` ready to call before entering
# other base's `__init__`.
if init_super:
super().__init__()
else:
object.__init__(self)
def _init_kwargs(self) -> Dict[str, Any]:
kwargs = {}
def add_if_nondefault(key, attrname, default):
v = getattr(self, attrname)
if v != default:
kwargs[key] = v
add_if_nondefault('allow_partial', '_allow_partial', False)
add_if_nondefault('sealed', '_sealed', False)
return kwargs
#
# Formal contract for symbolic operations.
#
# NOTE(daiyip): Since methods such as `__getattr__`, `keys` can be overriden
# by subclasses of `pg.Object`, we introduces a set of methods in signature
# `sym_<xxx>` as the contract to symbolically operate on a symbolic
# value, which are less likely to clash with other names. These methods will
# be used insided PyGlove library. Users can either use these methods or their
# convenient version at their preferences.
#
@property
def sym_partial(self) -> bool:
"""Returns True if current value is partial."""
return bool(self.sym_missing(flatten=False))
@property
def sym_puresymbolic(self) -> bool:
"""Returns True if current value is or contains subnodes of PureSymbolic."""
pure_symbolic = getattr(self, '_sym_puresymbolic')
if pure_symbolic is None:
pure_symbolic = isinstance(self, PureSymbolic)
if not pure_symbolic:
for v in self.sym_values():
if is_pure_symbolic(v):
pure_symbolic = True
break
self._set_raw_attr('_sym_puresymbolic', pure_symbolic)
return pure_symbolic
@property
def sym_abstract(self) -> bool:
"""Returns True if current value is abstract (partial or pure symbolic)."""
return self.sym_partial or self.sym_puresymbolic
@property
def sym_sealed(self) -> bool:
"""Returns True if current object is sealed."""
return getattr(self, '_sealed')
def sym_seal(self, is_seal: bool = True) -> 'Symbolic':
"""Seals or unseals current object from further modification."""
return self._set_raw_attr('_sealed', is_seal)
def sym_missing(self, flatten: bool = True) -> Dict[str, Any]:
"""Returns missing values."""
missing = getattr(self, '_sym_missing_values')
if missing is None:
missing = self._sym_missing()
self._set_raw_attr('_sym_missing_values', missing)
if flatten:
missing = object_utils.flatten(missing)
return missing
def sym_nondefault(self, flatten: bool = True) -> Dict[Union[int, str], Any]:
"""Returns missing values."""
nondefault = getattr(self, '_sym_nondefault_values')
if nondefault is None:
nondefault = self._sym_nondefault()
self._set_raw_attr('_sym_nondefault_values', nondefault)
if flatten:
nondefault = object_utils.flatten(nondefault)
return nondefault
@property
def sym_field(self) -> Optional[pg_typing.Field]:
"""Returns the symbolic field for current object."""
if self.sym_parent is None:
return None
return self.sym_parent.sym_attr_field(self.sym_path.key)
@property
def sym_root(self) -> 'Symbolic':
"""Returns the root of the symbolic tree."""
root = self
while root.sym_parent is not None:
root = root.sym_parent
return root
def sym_ancestor(
self,
where: Optional[Callable[[Any], bool]] = None,
) -> Optional['Symbolic']:
"""Returns the nearest ancestor of specific classes."""
ancestor = self.sym_parent
where = where or (lambda x: True)
while ancestor is not None and not where(ancestor):
ancestor = ancestor.sym_parent
return ancestor
def sym_descendants(
self,
where: Optional[Callable[[Any], bool]] = None,
option: DescendantQueryOption = DescendantQueryOption.ALL,
include_self: bool = False) -> List[Any]:
"""Returns all descendants of specific classes.
Args:
where: Optional callable object as the filter of descendants to return.
option: Descendant query options, indicating whether all matched,
immediate matched or only the matched leaf nodes will be returned.
include_self: If True, `self` will be included in the query, otherwise
only strict descendants are included.
Returns:
A list of objects that match the descendant_cls.
"""
descendants = []
where = where or (lambda x: True)
def visit(k, v, p):
del k, p
if not where(v):
return TraverseAction.ENTER
if not include_self and self is v:
return TraverseAction.ENTER
if option == DescendantQueryOption.IMMEDIATE:
descendants.append(v)
return TraverseAction.CONTINUE
# Dealing with option = ALL or LEAF.
leaf_descendants = []
if isinstance(v, Symbolic):
leaf_descendants = v.sym_descendants(where, option)
if option is DescendantQueryOptio | (*, allow_partial: bool, accessor_writable: bool, sealed: bool, root_path: Optional[pyglove.core.object_utils.value_location.KeyPath], init_super: bool = True) | [
0.05461789295077324,
-0.06511974334716797,
0.025158962234854698,
0.05610634386539459,
0.001625409466214478,
-0.041407886892557144,
-0.04676217958331108,
-0.013623463921248913,
0.02051788754761219,
-0.044281426817178726,
-0.013509762473404408,
0.02141715958714485,
0.0435371994972229,
0.030017100274562836,
-0.06896491348743439,
0.03654974699020386,
0.0017003489192575216,
0.04000212997198105,
-0.0034523801878094673,
0.0005940238479524851,
-0.015845803543925285,
0.019194819033145905,
0.026399336755275726,
-0.0017068091547116637,
-0.01840924844145775,
0.002757252659648657,
0.0010110357543453574,
0.05122753232717514,
-0.027391638606786728,
-0.047051601111888885,
-0.010853290557861328,
-0.016662385314702988,
-0.0031267814338207245,
-0.004860723856836557,
0.06966778635978699,
-0.08343596756458282,
-0.0030285848770290613,
0.0894724577665329,
-0.03708724305033684,
0.0014574419474229217,
0.014729466289281845,
-0.010222766548395157,
-0.009349334985017776,
-0.04804389923810959,
0.014936195686459541,
0.03026517666876316,
0.0017248980002477765,
0.05887651816010475,
0.01269318163394928,
-0.05730537325143814,
0.018740015104413033,
-0.04225547984242439,
0.014016250148415565,
-0.000511655118316412,
-0.008548258803784847,
0.018977753818035126,
0.018212854862213135,
0.04411604255437851,
0.02453877404332161,
-0.012827555648982525,
0.016114553436636925,
0.03621898218989372,
-0.017241228371858597,
-0.03592956066131592,
-0.015080905519425869,
-0.015215279534459114,
-0.05829767510294914,
-0.02427002601325512,
-0.023525800555944443,
0.007969416677951813,
-0.04411604255437851,
-0.04907754808664322,
-0.006656684912741184,
0.01659003086388111,
0.02086932770907879,
-0.04920158535242081,
0.023401761427521706,
-0.07512544840574265,
0.004196605645120144,
-0.06015824154019356,
-0.016703730449080467,
-0.04080837219953537,
-0.07045336067676544,
-0.032208431512117386,
-0.051475606858730316,
0.037707433104515076,
0.059910163283348083,
0.014574418775737286,
-0.004212110303342342,
0.009778298437595367,
-0.07115624099969864,
0.026874816045165062,
0.0009180075139738619,
0.06565724313259125,
-0.02238878794014454,
-0.02265753597021103,
0.015515037812292576,
-0.08839746564626694,
-0.0004325165646150708,
-0.006294908467680216,
0.03057526983320713,
0.005238004960119724,
-0.06156399846076965,
0.025779150426387787,
-0.020094092935323715,
0.0004186269361525774,
-0.03446178138256073,
-0.016124889254570007,
0.015969842672348022,
-0.030864691361784935,
-0.10253775864839554,
0.023215705528855324,
0.030368540436029434,
-0.011783572845160961,
-0.018843380734324455,
-0.003674614243209362,
-0.003930441569536924,
-0.005617870017886162,
0.035516101866960526,
-0.02238878794014454,
-0.011256412602961063,
0.022182058542966843,
-0.010625888593494892,
0.040436260402202606,
0.04045693203806877,
0.053170789033174515,
0.04415738955140114,
0.009023736231029034,
-0.006641180254518986,
0.029376240447163582,
0.03338678926229477,
0.0327252559363842,
-0.02315368689596653,
0.10088392347097397,
0.03134017065167427,
0.025531074032187462,
-0.014936195686459541,
-0.0156907569617033,
-0.06950240582227707,
0.026337318122386932,
0.05226117745041847,
-0.04072568193078041,
-0.00031461621983908117,
-0.009581904858350754,
-0.07334757596254349,
0.01540133636444807,
-0.02369118295609951,
-0.032249778509140015,
-0.028756052255630493,
-0.012310732156038284,
-0.01530830841511488,
-0.014264324679970741,
0.012806883081793785,
0.06594666093587875,
-0.054245781153440475,
0.05672653391957283,
-0.046059299260377884,
0.005798758007586002,
-0.022285424172878265,
0.022678209468722343,
-0.07686197012662888,
-0.040250204503536224,
-0.026089243590831757,
-0.07218988984823227,
-0.02900412678718567,
0.003423954825848341,
0.0001679675915511325,
-0.09732817858457565,
-0.010594879277050495,
0.0425449013710022,
-0.0202491395175457,
-0.045439109206199646,
-0.013561445288360119,
0.0344204381108284,
0.024332044646143913,
0.035433411598205566,
0.02145850658416748,
0.006114020477980375,
0.007158003747463226,
-0.024145986884832382,
0.05730537325143814,
-0.075621597468853,
-0.1012146919965744,
-0.00007283979357453063,
0.046596795320510864,
0.043206434696912766,
-0.012775873765349388,
0.0018411832861602306,
0.07285141944885254,
0.03934059292078018,
-0.0158664770424366,
0.006124356761574745,
0.040560297667980194,
0.024104641750454903,
0.022698882967233658,
-0.02499357797205448,
0.004834882449358702,
0.023029649630188942,
-0.0725206583738327,
0.07467064261436462,
-0.03222910687327385,
0.002616418292745948,
0.024828193709254265,
-0.024125315248966217,
-0.005385299678891897,
-0.009525055065751076,
0.03131949529051781,
-0.005209579598158598,
-0.007390574086457491,
-0.029851717874407768,
-0.040746353566646576,
0.001381210400722921,
0.009380344301462173,
0.006796227302402258,
-0.0017313582357019186,
-0.07810235023498535,
0.023298397660255432,
0.023877238854765892,
0.007442256435751915,
0.0029045473784208298,
0.02280224673449993,
0.011070356704294682,
-0.04949100688099861,
-0.007323387078940868,
-0.00466949911788106,
-0.03952665254473686,
0.010496682487428188,
0.021169085055589676,
0.013313369825482368,
-0.046555448323488235,
0.002426485763862729,
-0.03987809270620346,
0.009225296787917614,
-0.016703730449080467,
0.043371815234422684,
-0.028528649359941483,
0.043743930757045746,
0.03830694779753685,
-0.011504488065838814,
0.00757663045078516,
-0.01269318163394928,
0.0005555851384997368,
-0.03762474283576012,
-0.016341954469680786,
-0.04858139529824257,
0.013819856569170952,
0.05511404573917389,
0.029169511049985886,
0.0008023682748898864,
-0.02838393859565258,
0.012558807618916035,
-0.059248629957437515,
0.0032404824160039425,
-0.01649700105190277,
0.0035686653573065996,
-0.058711133897304535,
-0.05383232235908508,
0.018874390050768852,
0.024786848574876785,
0.0006679942016489804,
-0.03053392469882965,
0.026895487681031227,
-0.028549322858452797,
0.05999285727739334,
0.040250204503536224,
-0.007964247837662697,
0.00943202618509531,
-0.018295546993613243,
-0.026068570092320442,
-0.00572123471647501,
0.07516679167747498,
0.008594772778451443,
-0.04006414860486984,
0.05503135174512863,
-0.0378107987344265,
0.01769603230059147,
0.00020301468612160534,
0.011122038587927818,
-0.006367263849824667,
-0.04076702892780304,
-0.0021228520199656487,
-0.022554172202944756,
0.020807309076189995,
0.006568824872374535,
-0.0023412099108099937,
0.03183631971478462,
-0.037480030208826065,
-0.020796971395611763,
0.0017571994103491306,
-0.029024800285696983,
0.08207155019044876,
0.04395065829157829,
0.07657255232334137,
0.026978179812431335,
0.12544336915016174,
0.007762686815112829,
-0.050979457795619965,
-0.000006127183496573707,
0.019112128764390945,
-0.03404832258820534,
0.03789348900318146,
0.013303033076226711,
0.09261474758386612,
0.039092518389225006,
0.0006008071941323578,
-0.043289124965667725,
0.0563957653939724,
0.02954162284731865,
0.014378026127815247,
0.056561149656772614,
0.0073647331446409225,
0.05126887932419777,
0.0021034711971879005,
0.057098645716905594,
-0.0016073206206783652,
-0.024600792676210403,
-0.020497214049100876,
-0.08864554762840271,
0.04411604255437851,
0.07458794862031937,
-0.02207869477570057,
0.008775660768151283,
-0.03165026381611824,
-0.01837823912501335,
-0.006439619231969118,
-0.026564721018075943,
0.018967418000102043,
-0.012744864448904991,
0.001919998787343502,
-0.02453877404332161,
-0.012031648308038712,
-0.0003339971008244902,
0.015453018248081207,
0.015163597650825977,
-0.030327195301651955,
0.02954162284731865,
0.03429639711976051,
-0.017179207876324654,
-0.04357854649424553,
-0.06263899058103561,
0.06011689454317093,
0.02101403847336769,
-0.00951988622546196,
-0.03080267272889614,
-0.04444681107997894,
-0.047671787440776825,
0.02226475067436695,
-0.01840924844145775,
0.018915735185146332,
0.05618903785943985,
-0.010155579075217247,
0.007462929468601942,
-0.014905186370015144,
0.019597942009568214,
0.0281978826969862,
-0.047092944383621216,
-0.02534501813352108,
-0.009762793779373169,
-0.03423437848687172,
-0.04444681107997894,
0.09319359064102173,
0.03373822942376137,
-0.055362120270729065,
0.00042637926526367664,
0.00060371431754902,
-0.05089676380157471,
-0.00828984659165144,
-0.002227508695796132,
0.02369118295609951,
-0.04514968767762184,
0.0021848708856850863,
-0.0651610866189003,
-0.014533072710037231,
-0.03326275199651718,
0.005783253349363804,
0.06011689454317093,
0.034172359853982925,
0.0028528650291264057,
-0.015928495675325394,
-0.0020970108453184366,
0.06553320586681366,
-0.008279510773718357,
0.007974584586918354,
0.046017952263355255,
0.042710281908512115,
-0.012010974809527397,
0.05511404573917389,
0.012910247780382633,
0.0678485706448555,
0.03719060868024826,
-0.004506699740886688,
-0.014801821671426296,
0.05457654595375061,
0.043371815234422684,
-0.00016909814439713955,
-0.004899485502392054,
0.01142179686576128,
0.01046050526201725,
-0.03357284516096115,
-0.0044524334371089935,
0.033634863793849945,
-0.034399762749671936,
0.03977472707629204,
-0.012000638991594315,
0.0074784341268241405,
-0.021871965378522873,
0.07132162153720856,
-0.010196925140917301,
-0.014729466289281845,
0.060447659343481064,
0.004834882449358702,
0.022326769307255745,
-0.05577557906508446,
-0.03487524017691612,
0.005896954797208309,
-0.04004347324371338,
0.05829767510294914,
0.04072568193078041,
0.05730537325143814,
0.030285850167274475,
0.025985879823565483,
-0.01117372140288353,
0.03162958845496178,
0.02914883755147457,
0.00546282297000289,
0.03061661683022976,
0.0009735660278238356,
0.022554172202944756,
-0.025820495560765266,
0.05784287303686142,
0.0009451407240703702,
0.011969628743827343,
0.004871060140430927,
-0.039671361446380615,
-0.013427071273326874,
-0.049284275621175766,
-0.004090656992048025,
-0.06995721161365509,
-0.04506699740886688,
0.03289064019918442,
-0.019236166030168533,
0.028983455151319504,
-0.008015930652618408,
0.014357353560626507,
0.0327252559363842,
0.028259901329874992,
0.013675146736204624,
0.06387937068939209,
0.035784851759672165,
0.007617976516485214,
-0.005380131304264069,
-0.041056446731090546,
0.0708254724740982,
0.013282360509037971,
-0.07458794862031937,
-0.0056747207418084145,
0.04370258376002312,
-0.02722625434398651,
-0.03514399006962776,
0.0317329540848732,
0.0005142392474226654,
0.014739802107214928,
0.010486345738172531,
-0.021892637014389038,
-0.046555448323488235,
0.04299970343708992,
0.04068433493375778,
0.008124463260173798,
-0.034482456743717194,
-0.057553451508283615,
0.022698882967233658,
0.01743762008845806,
-0.005064868833869696,
-0.026440683752298355,
0.011752563528716564,
-0.008801502175629139,
-0.0286940336227417,
-0.05288136750459671,
-0.10410889983177185,
-0.11254345625638962,
0.027288272976875305,
-0.03621898218989372,
-0.005132055841386318,
-0.043247777968645096,
0.030513251200318336,
0.008837679401040077,
0.08748786151409149,
-0.009426858276128769,
0.01680709607899189,
0.0032275619450956583,
-0.049863118678331375,
0.056561149656772614,
0.00845006201416254,
0.020528223365545273,
0.01905011013150215,
0.059248629957437515,
-0.01855395920574665,
-0.0002745624224189669,
0.023980604484677315,
-0.05069003626704216,
-0.03516466170549393,
-0.01101867388933897,
-0.04796120896935463,
0.026874816045165062,
0.03030652180314064,
0.006444787606596947,
-0.053212132304906845,
-0.001746863010339439,
0.016217917203903198,
-0.015618402510881424,
0.02176859974861145,
-0.0291901845484972,
0.05623038113117218,
-0.017272237688302994,
0.010491514578461647,
0.015018886886537075,
0.04062231630086899,
-0.017354927957057953,
-0.0317329540848732,
-0.04477757588028908,
-0.013168659061193466,
-0.034399762749671936,
-0.014057595282793045,
-0.028094518929719925,
0.004871060140430927,
-0.028900763019919395,
-0.017799396067857742,
0.0012300396338105202,
0.05664383992552757,
-0.006940937601029873,
0.05089676380157471,
0.001231977716088295,
-0.03518533334136009,
0.044901613146066666,
0.008077949285507202,
0.05561019480228424,
0.028259901329874992,
0.014429708011448383,
-0.01240376103669405,
-0.008134800009429455,
0.019246501848101616,
0.04066366329789162,
-0.02091067284345627,
0.008465566672384739,
0.010000532492995262,
-0.025158962234854698,
-0.00802626647055149,
-0.053212132304906845,
-0.02207869477570057,
-0.02195465750992298,
-0.019143138080835342,
0.011235740035772324,
0.04953235015273094,
0.0019083702936768532,
0.008475903421640396,
-0.047919861972332,
0.06495436280965805,
0.025014251470565796,
-0.015080905519425869,
0.04151125252246857,
-0.010956655256450176,
0.02873537875711918,
0.047713134437799454,
-0.09493011981248856,
0.03239448741078377,
-0.0004670791095122695,
0.012951593846082687,
0.007442256435751915,
0.020941682159900665,
0.02865268662571907,
0.00927181076258421,
0.009886831045150757,
0.03973338007926941,
0.03334544226527214,
0.020424859598279,
0.03487524017691612,
-0.050938110798597336,
0.0397953987121582,
-0.026564721018075943,
-0.08273308724164963,
0.03706657141447067,
0.02668875828385353,
-0.0718177780508995,
-0.0004693402152042836,
0.018398912623524666,
0.006739376578480005,
0.017644349485635757,
0.07301680743694305,
-0.05879382789134979,
-0.03460649400949478,
-0.05052465200424194,
0.004183684941381216,
-0.0013295281678438187,
-0.014274661429226398,
-0.04349585622549057,
0.007953912019729614,
-0.07099086046218872,
0.015628738328814507,
0.036094944924116135,
-0.005638543050736189,
-0.05184771865606308,
0.03435841575264931,
0.01905011013150215,
-0.014398698695003986,
0.01993904635310173,
0.010801608674228191,
0.0283425934612751,
0.021603217348456383,
-0.0028192715253680944,
-0.06015824154019356,
0.003493726020678878,
0.020104428753256798,
0.0168587788939476,
-0.004772863816469908,
-0.0685514509677887,
-0.02708154357969761,
-0.035784851759672165,
0.03392428532242775,
0.01186626497656107,
-0.013561445288360119,
-0.05234387144446373,
-0.026399336755275726,
-0.013313369825482368,
0.0015246289549395442,
-0.049821771681308746,
0.04535641893744469,
0.025096943601965904,
0.014781148172914982,
0.002899379003793001,
-0.03762474283576012,
-0.005638543050736189,
0.003268907777965069,
-0.026792123913764954,
0.011514824815094471,
0.009008231572806835,
-0.03346947953104973,
-0.0006725164130330086,
0.011277086101472378,
0.001037522917613387,
0.10303390771150589,
-0.051558300852775574,
-0.005457654595375061,
-0.011504488065838814,
0.05953805148601532,
-0.046555448323488235,
0.018398912623524666,
0.0033050854690372944,
-0.0368184968829155,
0.023670509457588196,
0.04171798378229141,
-0.034441109746694565,
0.03487524017691612,
-0.021603217348456383,
-0.05416308715939522,
0.045563146471977234,
0.022471480071544647,
-0.02342243492603302,
-0.06594666093587875,
0.025055596604943275,
0.009313156828284264,
-0.005664383992552757,
-0.03762474283576012,
-0.022202732041478157,
-0.006000319495797157,
-0.025407036766409874,
0.012321068905293941,
-0.00757663045078516,
-0.026750776916742325,
0.06834471970796585,
0.014905186370015144,
0.010083223693072796,
0.001292058383114636,
0.005147560965269804,
-0.013468417339026928,
-0.06019958481192589,
0.004721181467175484,
0.02735029347240925,
0.05308809503912926,
0.03650840371847153,
-0.031050747260451317,
0.005747075658291578,
0.03049257956445217,
-0.012434770353138447,
-0.014471054077148438,
-0.03450312837958336,
-0.02896278165280819,
0.010398485697805882,
0.02046620473265648,
-0.005752244032919407,
-0.11543766409158707,
-0.03737666457891464,
-0.030699308961629868,
0.04473622888326645,
0.02207869477570057,
-0.06660819798707962,
-0.04173865541815758,
-0.03766608610749245,
-0.03508197143673897,
0.05565154179930687,
-0.016517674550414085,
0.025675784796476364,
0.004989929497241974,
0.00031219361699186265,
-0.0022029594983905554,
0.049863118678331375,
0.047754477709531784,
-0.02976902574300766,
-0.03510264307260513,
0.046555448323488235,
0.020404186099767685,
0.01072925329208374,
0.038244929164648056,
-0.01909145526587963,
-0.0805831030011177,
0.016259262338280678,
-0.02945893257856369,
-0.004447265062481165,
0.02226475067436695,
-0.03969203308224678,
0.015411673113703728,
0.007437088061124086,
-0.01765468716621399,
0.09476473182439804,
0.035516101866960526,
0.006315581500530243,
0.02735029347240925,
0.006816900335252285,
0.011504488065838814,
0.0029588136821985245,
-0.0048271301202476025,
0.015184270218014717,
0.05693326145410538,
-0.06110919639468193,
0.015515037812292576,
-0.00907541811466217,
-0.04519103467464447,
-0.011380450800061226,
-0.0032172254286706448,
-0.03981607407331467,
0.09418588876724243,
-0.029252203181385994,
0.01321000512689352,
-0.05986882001161575,
0.001957468455657363,
0.01090497337281704,
0.0212724506855011,
-0.015225616283714771,
0.025324344635009766,
0.04750640317797661,
0.0035350718535482883,
0.037211284041404724,
0.005509336944669485,
0.01725156418979168,
-0.0195772685110569,
0.06623608618974686,
0.04473622888326645,
-0.05445250868797302,
0.014243652112782001,
-0.005261261947453022,
-0.061977457255125046,
-0.0513102225959301,
-0.03934059292078018,
-0.007080479990690947,
0.02123110368847847,
0.012145348824560642,
0.005716066341847181,
-0.04448815435171127,
0.011700880713760853
]
|
41,358 | pyglove.core.symbolic.base | __init__ | Constructor.
Args:
allow_partial: Whether to allow required fields to be MISSING_VALUE or
partial.
accessor_writable: Whether to allow write access via attributes. This flag
is useful when we want to enforce update of fields using `rebind`
method, which leads to better trackability and batched field update
notification.
sealed: Whether object is sealed that cannot be changed. This flag is
useful when we don't want downstream to modify the object.
root_path: KeyPath of current object in its context (object tree).
init_super: If True, call super.__init__, otherwise short-circuit. This
flag is useful when user want to explicitly implement `__init__` for
multi-inheritance, which is needed to pass different arguments to
different bases. Please see `symbolic_test.py#testMultiInheritance`
for more details.
| def __init__(self,
*,
allow_partial: bool,
accessor_writable: bool,
sealed: bool,
root_path: Optional[object_utils.KeyPath],
init_super: bool = True):
"""Constructor.
Args:
allow_partial: Whether to allow required fields to be MISSING_VALUE or
partial.
accessor_writable: Whether to allow write access via attributes. This flag
is useful when we want to enforce update of fields using `rebind`
method, which leads to better trackability and batched field update
notification.
sealed: Whether object is sealed that cannot be changed. This flag is
useful when we don't want downstream to modify the object.
root_path: KeyPath of current object in its context (object tree).
init_super: If True, call super.__init__, otherwise short-circuit. This
flag is useful when user want to explicitly implement `__init__` for
multi-inheritance, which is needed to pass different arguments to
different bases. Please see `symbolic_test.py#testMultiInheritance`
for more details.
"""
# NOTE(daiyip): we uses `self._set_raw_attr` here to avoid overridden
# `__setattr__` from subclasses change the behavior unintentionally.
self._set_raw_attr('_allow_partial', allow_partial)
self._set_raw_attr('_accessor_writable', accessor_writable)
self._set_raw_attr('_sealed', sealed)
# NOTE(daiyip): parent is used for rebind call to notify their ancestors
# for updates, not for external usage.
self._set_raw_attr('_sym_parent', None)
self._set_raw_attr('_sym_path', root_path or object_utils.KeyPath())
self._set_raw_attr('_sym_puresymbolic', None)
self._set_raw_attr('_sym_missing_values', None)
self._set_raw_attr('_sym_nondefault_values', None)
origin = Origin(None, '__init__') if flags.is_tracking_origin() else None
self._set_raw_attr('_sym_origin', origin)
# super.__init__ may enter into next base class's __init__ when
# multi-inheritance is used. Since we have override `__setattr__` for
# symbolic.Object, which depends on `_accessor_writable` and so on,
# we want to call make `__setattr__` ready to call before entering
# other base's `__init__`.
if init_super:
super().__init__()
else:
object.__init__(self)
| (self, *, allow_partial: bool, accessor_writable: bool, sealed: bool, root_path: Optional[pyglove.core.object_utils.value_location.KeyPath], init_super: bool = True) | [
0.011445210315287113,
-0.0181364007294178,
0.0655081495642662,
0.0479145348072052,
-0.0015113666886463761,
-0.005839583929628134,
0.0027326256968080997,
0.02146795764565468,
-0.00512835243716836,
-0.024724647402763367,
-0.0019067551475018263,
0.050347693264484406,
0.03481290489435196,
0.05094662681221962,
-0.07333169877529144,
0.031574930995702744,
0.06041723117232323,
0.04222468286752701,
-0.010602962225675583,
0.003471932141110301,
-0.00806686095893383,
0.001441179309040308,
0.0005021317047066987,
0.05802150443196297,
-0.04095195233821869,
0.03881825879216194,
-0.029890434816479683,
0.03705889731645584,
0.05371668562293053,
-0.051695290952920914,
-0.02740112505853176,
0.007711245212703943,
0.017322227358818054,
0.036141782999038696,
0.08983974903821945,
-0.09964726120233536,
-0.013429171405732632,
0.05614984408020973,
-0.06779158115386963,
0.040839653462171555,
0.02979685179889202,
-0.016115006059408188,
-0.005175143945962191,
-0.05948140099644661,
0.03840649500489235,
0.041251420974731445,
0.028318237513303757,
0.07602688670158386,
0.012755373492836952,
-0.005418459884822369,
0.02579149603843689,
-0.025997377932071686,
0.014636392705142498,
-0.016386397182941437,
-0.04997336119413376,
0.06580761820077896,
0.04828886687755585,
0.05899477005004883,
-0.006808168720453978,
-0.023339617997407913,
-0.037582963705062866,
0.043085645884275436,
0.0054465350694954395,
-0.04918726533651352,
-0.03490648791193962,
-0.05787177383899689,
-0.06393595784902573,
-0.04521934315562248,
-0.0023348976392298937,
0.016863670200109482,
-0.010659112595021725,
-0.03683429956436157,
-0.024462616071105003,
0.03408295661211014,
0.0391177237033844,
-0.00583022553473711,
-0.005381026770919561,
-0.049074962735176086,
0.04574340581893921,
-0.06913917511701584,
0.013869011774659157,
-0.05173272266983986,
-0.05045999214053154,
-0.005774075631052256,
-0.052256789058446884,
0.0422995500266552,
0.03649739921092987,
0.000837568542920053,
0.06547071784734726,
0.028730003163218498,
-0.061053596436977386,
0.03443857282400131,
0.020869025960564613,
0.016115006059408188,
0.017743350937962532,
-0.0005316688329912722,
0.011903767473995686,
-0.045705974102020264,
0.006990655791014433,
-0.0035046860575675964,
-0.0027443235740065575,
-0.029254069551825523,
-0.04525677487254143,
0.03496263548731804,
0.00463236216455698,
0.03219257667660713,
-0.016274096444249153,
-0.018613673746585846,
0.009648415260016918,
-0.059294234961271286,
-0.042524147778749466,
-0.0035304215271025896,
-0.025361012667417526,
0.044358376413583755,
-0.04458297789096832,
-0.0004872168938163668,
0.021430524066090584,
-0.030227333307266235,
0.05581294372677803,
-0.042112383991479874,
0.050984058529138565,
0.03926745802164078,
-0.0613156296312809,
0.039978690445423126,
0.07490389049053192,
0.033409155905246735,
0.03793857991695404,
0.03793857991695404,
0.02508026361465454,
0.03204284608364105,
0.03376477211713791,
0.02481823042035103,
-0.02410699985921383,
0.0380321629345417,
0.00792180746793747,
0.010322213172912598,
0.0373583622276783,
-0.012287457473576069,
-0.08048144727945328,
0.000861549167893827,
0.03243589401245117,
-0.07059907168149948,
0.03367118909955025,
-0.01792115904390812,
-0.029197920113801956,
0.051058925688266754,
0.01740645244717598,
-0.0091196708381176,
0.004026411566883326,
0.001877510454505682,
-0.008282101713120937,
-0.013878369703888893,
-0.022628387436270714,
0.04697870463132858,
-0.024537481367588043,
-0.0002589619252830744,
-0.03535568714141846,
-0.008871675468981266,
0.008478626608848572,
0.024331599473953247,
-0.03640381619334221,
-0.0531926192343235,
-0.019689878448843956,
-0.06621938198804855,
-0.008895071223378181,
0.01109895296394825,
-0.023732667788863182,
-0.13363662362098694,
0.0042159175500273705,
0.03327814117074013,
-0.017387734726071358,
-0.03934232518076897,
0.00905884150415659,
0.042037516832351685,
0.014112327247858047,
0.006377686746418476,
0.021018758416175842,
-0.0014224627520889044,
-0.04394661262631416,
-0.026128394529223442,
0.07628892362117767,
-0.05397871881723404,
-0.03640381619334221,
0.0028028131928294897,
0.021205924451351166,
0.058583006262779236,
-0.022104322910308838,
0.004751680418848991,
0.0496738962829113,
0.05588781088590622,
0.018885064870119095,
-0.00014695466961711645,
0.012147082947194576,
0.00926472432911396,
0.012072216719388962,
0.023451918736100197,
0.02085030823945999,
-0.0236203670501709,
-0.03874339163303375,
0.08048144727945328,
-0.05951883643865585,
0.012614998035132885,
0.009695206768810749,
-0.04170061647891998,
0.015010724775493145,
-0.012109649367630482,
0.001440009567886591,
0.022946570068597794,
0.005675813648849726,
-0.009461249224841595,
0.002283426932990551,
-0.005390385165810585,
0.020026778802275658,
0.017986666411161423,
-0.008094935677945614,
-0.07786111533641815,
0.03367118909955025,
0.015581581741571426,
0.03043321520090103,
0.03574873507022858,
0.08557236194610596,
0.05199475586414337,
0.007678491063416004,
0.002664778148755431,
-0.007879694923758507,
-0.0046230037696659565,
0.024855663999915123,
-0.02811235561966896,
-0.02197330631315708,
-0.011379702016711235,
-0.04342254623770714,
-0.051695290952920914,
-0.0032660493161529303,
-0.0012516736751422286,
-0.02468721568584442,
0.008113652467727661,
0.039716657251119614,
0.007743999361991882,
-0.04551880806684494,
0.014851633459329605,
0.010013389401137829,
0.0028963962104171515,
0.007594266440719366,
-0.039417192339897156,
-0.04671667143702507,
-0.011351627297699451,
0.0015932518290355802,
0.022553520277142525,
0.008661113679409027,
-0.029197920113801956,
0.020251376554369926,
-0.008090256713330746,
-0.039417192339897156,
0.020569559186697006,
-0.018623031675815582,
-0.03543055057525635,
-0.014917141757905483,
0.01354147121310234,
-0.011557510122656822,
-0.011267402209341526,
-0.02068185992538929,
-0.01114574447274208,
-0.03866852819919586,
0.05173272266983986,
0.0229091364890337,
-0.022422505542635918,
0.022328920662403107,
-0.017350301146507263,
-0.04843859747052193,
0.001520724967122078,
0.008399080485105515,
-0.01963372901082039,
-0.03314712643623352,
0.07905898243188858,
-0.04031558707356453,
-0.0006439685239456594,
-0.010191196575760841,
-0.0018529448425397277,
-0.00414339080452919,
-0.038930557668209076,
0.030545515939593315,
0.023994700983166695,
0.04009098932147026,
0.014767409302294254,
-0.005891054403036833,
-0.0006708736764267087,
-0.028000056743621826,
-0.024181867018342018,
-0.019006721675395966,
-0.03994125500321388,
0.018641747534275055,
0.04765250161290169,
0.039978690445423126,
0.040689919143915176,
0.10413924604654312,
-0.01720992662012577,
-0.05596267804503441,
-0.009110311977565289,
-0.019081588834524155,
-0.05476481467485428,
0.019521430134773254,
-0.009891730733215809,
0.010453229770064354,
0.040839653462171555,
0.020232660695910454,
-0.0760643258690834,
0.006597606930881739,
0.034382421523332596,
0.024855663999915123,
0.03728349506855011,
0.060641832649707794,
0.07142259925603867,
0.029048185795545578,
0.018370358273386955,
0.021336941048502922,
-0.024631064385175705,
-0.010443870909512043,
-0.06876484304666519,
0.006162445526570082,
0.07913384586572647,
-0.03271664306521416,
-0.010612321086227894,
-0.024406466633081436,
-0.02740112505853176,
-0.02300271950662136,
-0.022403787821531296,
0.021861005574464798,
0.004903753288090229,
-0.059369102120399475,
-0.0005881111137568951,
-0.08916595578193665,
0.031649794429540634,
0.017986666411161423,
-0.02987171709537506,
-0.06928890943527222,
0.0036988710053265095,
-0.0009639056515879929,
-0.040278155356645584,
-0.020700575783848763,
-0.022478654980659485,
0.05360438674688339,
0.03464445471763611,
-0.015516073442995548,
-0.06389852613210678,
-0.07149747014045715,
-0.06498408317565918,
0.05173272266983986,
-0.002676476025953889,
0.01875404827296734,
-0.00020983080321457237,
-0.013653770089149475,
-0.028224654495716095,
-0.03649739921092987,
-0.0013803503243252635,
0.031125729903578758,
-0.059930600225925446,
-0.06565788388252258,
0.006971939001232386,
-0.003441517474129796,
-0.06883970648050308,
0.05592524632811546,
0.0031701265834271908,
-0.07116056978702545,
0.023058868944644928,
0.004014713689684868,
-0.03767654672265053,
-0.035823602229356766,
0.009199216030538082,
-0.01940912939608097,
-0.035093653947114944,
0.015151099301874638,
-0.07808572053909302,
-0.009975955821573734,
-0.011623017489910126,
0.02532357908785343,
0.027981339022517204,
-0.00039831295725889504,
-0.014037461020052433,
-0.04656693711876869,
-0.017631052061915398,
0.026128394529223442,
0.00401003472507,
-0.015750031918287277,
0.030283482745289803,
-0.012006708420813084,
-0.03211770951747894,
0.048663198947906494,
0.006836243439465761,
0.07456699013710022,
0.05206962302327156,
0.006929826457053423,
0.019465278834104538,
0.057609740644693375,
0.00833825208246708,
0.01852944865822792,
0.001018300885334611,
0.044433243572711945,
0.010078896768391132,
0.007173142861574888,
0.004594929050654173,
0.05083432421088219,
-0.050010796636343,
0.042112383991479874,
-0.009409777820110321,
0.06670601665973663,
0.009494002908468246,
0.10885582864284515,
-0.02931021898984909,
0.017322227358818054,
0.003708229400217533,
-0.02202945575118065,
0.008263385854661465,
0.0038579623214900494,
-0.02962840162217617,
-0.021018758416175842,
-0.03584231808781624,
0.027607006952166557,
0.025211280211806297,
0.014720617793500423,
-0.0047353035770356655,
0.00905884150415659,
0.010312855243682861,
-0.028730003163218498,
-0.008342931047081947,
0.037807561457157135,
0.02251608856022358,
-0.019278112798929214,
-0.0022974645253270864,
0.023264752700924873,
0.04170061647891998,
-0.023133736103773117,
0.026446577161550522,
-0.01987704448401928,
-0.005605626385658979,
-0.049224697053432465,
-0.05079689249396324,
0.0022635406348854303,
-0.03500007092952728,
-0.03065781481564045,
0.02562304586172104,
-0.028786154463887215,
-0.007369667291641235,
0.009461249224841595,
0.00916646234691143,
-0.011941200122237206,
0.03569258376955986,
0.04462040960788727,
0.06494665145874023,
0.028393104672431946,
0.017350301146507263,
0.03200541064143181,
-0.016105646267533302,
0.03496263548731804,
0.001359294168651104,
-0.0669306144118309,
-0.0415508858859539,
0.02953481860458851,
-0.016751369461417198,
-0.045406509190797806,
0.019465278834104538,
0.0033455949742347,
0.029984017834067345,
-0.01181954238563776,
-0.013204571790993214,
-0.05734770745038986,
0.0691017434000969,
0.04754020273685455,
0.0020576578099280596,
-0.027831606566905975,
-0.03256690874695778,
-0.011754034087061882,
0.01911902241408825,
0.0003219842619728297,
-0.0020284131169319153,
-0.011080236174166203,
-0.037882428616285324,
-0.01281152293086052,
-0.051620423793792725,
-0.10915529727935791,
-0.0760643258690834,
0.0003158428880851716,
-0.02444389835000038,
0.017939874902367592,
-0.027607006952166557,
0.020494693890213966,
-0.01933426409959793,
0.026558876037597656,
-0.0023922172840684652,
-0.0037667187862098217,
0.023901117965579033,
-0.01640511304140091,
0.07587715983390808,
-0.009994672611355782,
0.021205924451351166,
0.01811768300831318,
0.022328920662403107,
0.000479028356494382,
0.003205220215022564,
0.05895733833312988,
-0.04772736877202988,
-0.03666584938764572,
-0.03395193815231323,
-0.0008849449222907424,
0.05835840478539467,
0.031088298186659813,
0.01030349638313055,
-0.0743798241019249,
-0.019184529781341553,
0.008838921785354614,
-0.03705889731645584,
0.021917156875133514,
0.012109649367630482,
-0.005062844138592482,
0.0070982761681079865,
0.012877031229436398,
0.004211238119751215,
0.00036351176095195115,
0.012362323701381683,
-0.02051340974867344,
-0.02652144245803356,
0.0059846374206244946,
0.005605626385658979,
-0.003516383934766054,
-0.044283509254455566,
0.00512835243716836,
-0.011725959368050098,
0.02195458859205246,
0.007790790870785713,
0.055288881063461304,
-0.0054980055429041386,
0.019259396940469742,
-0.033727340400218964,
-0.045631106942892075,
0.049149829894304276,
-0.0012528434162959456,
0.10062052309513092,
0.022104322910308838,
0.013625695370137691,
0.022385071963071823,
-0.021037474274635315,
0.02713909186422825,
0.06281296163797379,
-0.0014329907717183232,
0.004903753288090229,
0.044208645820617676,
-0.0051704649813473225,
-0.028524121269583702,
-0.045631106942892075,
0.0189505722373724,
-0.036927882581949234,
0.0008498512906953692,
-0.01605885475873947,
0.048663198947906494,
0.03923002630472183,
-0.04185035079717636,
-0.03335300832986832,
0.05581294372677803,
-0.0010691866045817733,
-0.000310286384774372,
0.04813913255929947,
-0.0028168505523353815,
0.026970641687512398,
0.036048199981451035,
-0.04997336119413376,
-0.0022939550690352917,
0.0038252081722021103,
0.019914478063583374,
-0.016582921147346497,
0.021280791610479355,
0.03179952874779701,
-0.032211292535066605,
0.04304821416735649,
-0.013597620651125908,
0.05012309551239014,
-0.010322213172912598,
0.017172494903206825,
-0.03584231808781624,
0.032136429101228714,
-0.028935886919498444,
-0.0560375452041626,
0.07875951379537582,
0.0040544867515563965,
-0.04765250161290169,
-0.00884827971458435,
-0.0010919974884018302,
-0.009208574891090393,
0.0017663805047050118,
0.07973277568817139,
-0.04046532139182091,
-0.07524079084396362,
-0.07928358018398285,
-0.01792115904390812,
-0.0028028131928294897,
-0.02762572281062603,
-0.02588507905602455,
0.009816864505410194,
-0.06936377286911011,
-0.040053557604551315,
0.081754170358181,
-0.043796878308057785,
-0.061540231108665466,
0.008619001135230064,
-0.022796837612986565,
0.01370056252926588,
-0.025492029264569283,
-0.004211238119751215,
0.026689892634749413,
0.03784499689936638,
-0.032941240817308426,
-0.021598974242806435,
0.02738240733742714,
0.01564708910882473,
0.031743377447128296,
-0.030863698571920395,
-0.05405358225107193,
-0.0461551733314991,
-0.06670601665973663,
0.0170882698148489,
0.026727326214313507,
-0.03762039542198181,
-0.07497876137495041,
-0.0364786833524704,
-0.011688525788486004,
-0.0014657449210062623,
-0.07351886481046677,
0.04106425121426582,
0.031013431027531624,
0.03204284608364105,
-0.010135047137737274,
-0.048101700842380524,
0.03075139783322811,
-0.042599014937877655,
-0.02635299414396286,
-0.009311515837907791,
0.016901103779673576,
-0.0119786337018013,
0.021336941048502922,
0.024050850421190262,
0.032286159694194794,
0.09463120251893997,
0.0015663467347621918,
-0.06086643040180206,
0.0380321629345417,
0.04697870463132858,
-0.07269532978534698,
-0.007336913142353296,
-0.0000976042210822925,
-0.02539844624698162,
0.007931165397167206,
0.04533164203166962,
-0.01353211235255003,
0.06401082128286362,
-0.03975408896803856,
-0.036441247910261154,
0.02386368438601494,
0.004779755603522062,
0.00453410018235445,
-0.021898439154028893,
0.05772203952074051,
0.04551880806684494,
-0.03683429956436157,
-0.010050822049379349,
-0.005619663745164871,
0.007350950501859188,
0.008455230854451656,
0.024724647402763367,
0.003521063132211566,
-0.050010796636343,
0.030882414430379868,
0.028954602777957916,
0.00994788110256195,
-0.0015371020417660475,
-0.011520076543092728,
0.022965285927057266,
-0.025492029264569283,
0.01389708649367094,
0.018885064870119095,
-0.00962033960968256,
0.01684495247900486,
-0.019671162590384483,
-0.006522740237414837,
0.015881048515439034,
-0.007982635870575905,
-0.02740112505853176,
-0.014664467424154282,
-0.012605640105903149,
0.03507493808865547,
0.03617921471595764,
0.0016189871821552515,
-0.10166864842176437,
0.01504815835505724,
-0.038443926721811295,
0.03260434418916702,
0.043572280555963516,
-0.0708611011505127,
-0.06472205370664597,
-0.025098981335759163,
-0.02403213270008564,
0.019689878448843956,
-0.04742790386080742,
0.02962840162217617,
0.02506154775619507,
-0.0014248023508116603,
-0.02171127311885357,
0.0012575226137414575,
0.03496263548731804,
-0.03529953584074974,
-0.016835594549775124,
0.07175949960947037,
-0.04241184890270233,
0.045705974102020264,
0.06913917511701584,
-0.004000676330178976,
-0.10383977741003036,
0.014524092897772789,
-0.016564203426241875,
0.040203288197517395,
0.01811768300831318,
-0.019259396940469742,
-0.013410454615950584,
0.005774075631052256,
-0.024294165894389153,
0.05581294372677803,
0.010209913365542889,
0.021280791610479355,
-0.00384158524684608,
-0.011117668822407722,
0.022010739892721176,
0.020326243713498116,
-0.03009631671011448,
0.015487998723983765,
0.053304918110370636,
-0.05701080709695816,
-0.0086283590644598,
0.021655123680830002,
-0.028935886919498444,
0.0056898510083556175,
-0.0046534184366464615,
0.010949219577014446,
0.08078090846538544,
0.010069538839161396,
0.011754034087061882,
-0.005858300253748894,
0.0362728014588356,
-0.020663142204284668,
0.07423009723424911,
-0.027906471863389015,
0.0166484285145998,
0.040914520621299744,
0.012362323701381683,
0.011791467666625977,
-0.00030239031184464693,
-0.0056898510083556175,
-0.019689878448843956,
0.05278085544705391,
-0.00937702413648367,
-0.06831564754247665,
0.012614998035132885,
-0.0023711612448096275,
-0.019034797325730324,
-0.06311242282390594,
-0.08302690088748932,
-0.0057693966664373875,
0.031107014045119286,
0.03814446181058884,
0.0796579122543335,
-0.01432756893336773,
0.013232646510004997
]
|
41,362 | pyglove.core.symbolic.base | _init_kwargs | null | def _init_kwargs(self) -> Dict[str, Any]:
kwargs = {}
def add_if_nondefault(key, attrname, default):
v = getattr(self, attrname)
if v != default:
kwargs[key] = v
add_if_nondefault('allow_partial', '_allow_partial', False)
add_if_nondefault('sealed', '_sealed', False)
return kwargs
| (self) -> Dict[str, Any] | [
0.015931863337755203,
-0.0021388267632573843,
0.08299911022186279,
-0.004160713870078325,
-0.06193125620484352,
-0.0017587728798389435,
0.017550308257341385,
0.018130328506231308,
0.03412767872214317,
0.012854009866714478,
-0.010178430005908012,
0.08906126767396927,
-0.018092907965183258,
0.038842685520648956,
-0.0034029448870569468,
-0.011843651533126831,
-0.009560988284647465,
0.04778623208403587,
-0.03074110485613346,
-0.04550357162952423,
0.04018983244895935,
-0.01915004290640354,
-0.04842238500714302,
0.08314879238605499,
0.039104629307985306,
0.06178157404065132,
-0.047224923968315125,
0.0033327811397612095,
0.0809035524725914,
0.0029772843699902296,
-0.011768809519708157,
0.0028205851558595896,
0.02007620595395565,
0.053810965269804,
0.027260979637503624,
-0.05197735130786896,
0.01134782750159502,
0.08412173390388489,
-0.07544013112783432,
-0.01208688598126173,
0.008344816043972969,
-0.006445715669542551,
-0.029880428686738014,
-0.02443571761250496,
0.017915159463882446,
0.0024229902774095535,
0.004490484017878771,
0.020880749449133873,
0.019496183842420578,
-0.03263084962964058,
0.037589091807603836,
0.003456737147644162,
0.06425134092569351,
0.02546478621661663,
-0.030554000288248062,
-0.021498192101716995,
-0.039179470390081406,
0.08883673697710037,
-0.03294892609119415,
0.033865731209516525,
-0.05332449823617935,
0.022171763703227043,
0.019982652738690376,
-0.052688345313072205,
-0.04340801015496254,
-0.047000396996736526,
-0.06690821051597595,
-0.008003352209925652,
0.01229269988834858,
0.053025130182504654,
-0.013471451587975025,
-0.032350193709135056,
-0.035231590270996094,
0.020918171852827072,
0.011918492615222931,
-0.008854673244059086,
-0.02978687733411789,
-0.02557704783976078,
0.03525029867887497,
0.021535612642765045,
-0.01576346904039383,
-0.02857070416212082,
-0.09153103083372116,
0.008962257765233517,
0.03229406476020813,
0.009168071672320366,
-0.06735725700855255,
0.017671925947070122,
0.10275723785161972,
-0.027335820719599724,
-0.07738600671291351,
0.030198505148291588,
0.03255600854754448,
0.016184452921152115,
0.011272985488176346,
0.010159719735383987,
0.006702982820570469,
0.02742937207221985,
0.02132979780435562,
-0.041873764246702194,
-0.03639163076877594,
-0.06436360627412796,
0.0270925872027874,
-0.04542873054742813,
0.0016874396242201328,
-0.060621533542871475,
0.0005227203946560621,
-0.07435493171215057,
-0.021498192101716995,
-0.0034193163737654686,
-0.03104047104716301,
-0.06470038741827011,
-0.021947240456938744,
0.08299911022186279,
-0.022190473973751068,
-0.03442704305052757,
-0.03824395313858986,
-0.06017248332500458,
0.042173128575086594,
-0.0012185114901512861,
-0.044680316001176834,
0.03218180313706398,
-0.025296391919255257,
0.0268306415528059,
0.03691551834344864,
-0.010075523518025875,
-0.012470448389649391,
0.023855695500969887,
0.0683676153421402,
0.04250991344451904,
0.02484734356403351,
0.007760117761790752,
-0.025371234863996506,
-0.014584717340767384,
-0.04131245240569115,
-0.027934551239013672,
0.044979680329561234,
0.06122026592493057,
0.03631678968667984,
0.05714140832424164,
0.025127999484539032,
0.014406968839466572,
0.016118966042995453,
0.008588050492107868,
-0.03206953778862953,
0.005028406623750925,
0.04056403785943985,
-0.010449729859828949,
-0.011909137479960918,
-0.031021758913993835,
0.028402311727404594,
0.02948751114308834,
-0.036597445607185364,
0.02409893088042736,
0.007493495009839535,
-0.04247249290347099,
-0.027148718014359474,
-0.04131245240569115,
-0.00893419235944748,
-0.0020043461117893457,
0.02542736567556858,
-0.0016628822777420282,
-0.014584717340767384,
-0.047000396996736526,
0.0334353931248188,
0.025333814322948456,
0.055382635444402695,
-0.10200882703065872,
0.05912470445036888,
0.03831879794597626,
-0.009458081796765327,
0.029319118708372116,
0.004291686229407787,
0.028664255514740944,
-0.001639494439586997,
0.080604188144207,
-0.012554644607007504,
-0.06391455233097076,
0.004869368392974138,
0.007661888375878334,
0.023649882525205612,
-0.010112944059073925,
-0.041836343705654144,
0.05130377784371376,
0.06833019852638245,
-0.006609431002289057,
0.0018160733161494136,
-0.0013249266194179654,
-0.017522241920232773,
0.0009945720667019486,
-0.004389915615320206,
-0.009102584794163704,
-0.020824618637561798,
0.022190473973751068,
-0.0398530438542366,
0.014659559354186058,
0.024922186508774757,
-0.03525029867887497,
-0.02742937207221985,
0.06294161826372147,
-0.050255998969078064,
-0.0536612831056118,
-0.05601878836750984,
0.011123303323984146,
-0.00963583029806614,
-0.007240905426442623,
-0.0027083230670541525,
0.0017856690101325512,
-0.0267558004707098,
-0.012002689763903618,
-0.011806230992078781,
-0.029955269768834114,
0.020506544038653374,
-0.016923511400818825,
-0.009879064746201038,
-0.05912470445036888,
0.04943274334073067,
0.03835621848702431,
-0.020749777555465698,
0.055195532739162445,
0.030479159206151962,
0.021647874265909195,
0.027728738263249397,
0.013761462643742561,
0.03727101534605026,
0.003269633511081338,
0.02037557028234005,
-0.017961936071515083,
-0.04527904465794563,
0.008831284940242767,
-0.023387936875224113,
-0.008424335159361362,
0.001971603138372302,
0.018663574010133743,
-0.03556837514042854,
-0.0165680143982172,
0.020880749449133873,
-0.05934922769665718,
-0.000630304915830493,
-0.023275675252079964,
0.09003420174121857,
0.005800208542495966,
-0.00684798788279295,
0.020132336765527725,
-0.004249588120728731,
-0.017578372731804848,
0.04527904465794563,
0.05669235810637474,
0.023649882525205612,
-0.025090578943490982,
0.04018983244895935,
0.0339592844247818,
-0.03665357455611229,
0.05998538061976433,
-0.022190473973751068,
0.033304423093795776,
0.01930908113718033,
0.052912868559360504,
0.024940896779298782,
-0.04026467353105545,
0.05407290905714035,
0.017335139214992523,
-0.04318348690867424,
0.044306106865406036,
0.01572604849934578,
0.002495492808520794,
0.05437227711081505,
-0.01087071280926466,
-0.11847393214702606,
-0.001679253880865872,
0.10365533828735352,
-0.01138524804264307,
0.029955269768834114,
-0.010103588923811913,
0.007591724395751953,
0.018139684572815895,
0.026288041844964027,
-0.05182766914367676,
-0.04292154312133789,
0.00158453278709203,
0.053174812346696854,
0.019252950325608253,
0.06275451183319092,
0.034670278429985046,
0.03294892609119415,
0.008424335159361362,
-0.02808423526585102,
0.034857381135225296,
0.00848982110619545,
-0.036073554307222366,
0.0007226872839964926,
-0.010655543766915798,
0.02144206129014492,
0.05732851102948189,
0.027073875069618225,
-0.026568695902824402,
-0.02132979780435562,
-0.03959110006690025,
0.04883401095867157,
-0.009748091921210289,
0.008274652063846588,
-0.02462282031774521,
0.03721488639712334,
0.03517545759677887,
0.01716674491763115,
-0.023649882525205612,
-0.009776157326996326,
0.009009033441543579,
0.030217215418815613,
-0.006113606970757246,
-0.014566007070243359,
0.020207177847623825,
0.01439761370420456,
0.005266963504254818,
-0.060995738953351974,
-0.03437091410160065,
0.04250991344451904,
-0.029730746522545815,
-0.012208502739667892,
0.06743209809064865,
-0.01915939897298813,
-0.009172748774290085,
-0.07476655393838882,
-0.039179470390081406,
0.024379584938287735,
-0.03283666446805,
0.04232281073927879,
-0.035343851894140244,
0.015604431740939617,
0.041499555110931396,
-0.06638432294130325,
0.026531275361776352,
-0.014827951788902283,
0.03697165101766586,
-0.05164056643843651,
0.039441417902708054,
-0.009200814180076122,
0.006151027511805296,
-0.007830281741917133,
-0.04254733398556709,
-0.03278053179383278,
-0.0334353931248188,
-0.020506544038653374,
-0.021947240456938744,
-0.039329156279563904,
-0.03815040364861488,
0.01886003278195858,
-0.02129237726330757,
0.057852402329444885,
-0.06518685817718506,
0.007554303854703903,
-0.04670103266835213,
0.019664578139781952,
0.023275675252079964,
0.053212232887744904,
-0.027672607451677322,
-0.036185815930366516,
-0.02458539977669716,
0.001035500899888575,
-0.015819599851965904,
0.1095678061246872,
0.013405965641140938,
-0.03317344933748245,
0.027410661801695824,
0.06990186870098114,
0.032387614250183105,
0.024641530588269234,
0.008995000272989273,
0.024716371670365334,
-0.06511201709508896,
0.04913337901234627,
-0.03541869297623634,
-0.022358868271112442,
-0.023799564689397812,
0.024566689506173134,
-0.019870391115546227,
-0.0273919515311718,
-0.01365855522453785,
-0.03293021395802498,
-0.001150686526671052,
-0.04329574853181839,
-0.03543740138411522,
0.022901467978954315,
0.02834617905318737,
-0.01848582550883293,
-0.02982429787516594,
0.008952902629971504,
0.014603427611291409,
0.053025130182504654,
0.02280791662633419,
-0.03562450408935547,
-0.015127317979931831,
0.013134665787220001,
0.04801075905561447,
0.03820653259754181,
-0.012769813649356365,
0.006478458642959595,
-0.017110614106059074,
-0.02591383457183838,
0.0200387854129076,
0.01288207620382309,
-0.05729109048843384,
-0.00797060877084732,
0.009350497275590897,
0.060920897871255875,
0.036447759717702866,
0.020805908367037773,
0.017138680443167686,
0.06934055685997009,
-0.012189792469143867,
0.001569330575875938,
-0.0012875059619545937,
0.005982634145766497,
-0.01572604849934578,
0.02306986041367054,
0.004766461439430714,
0.02742937207221985,
0.015987994149327278,
0.0033514914102852345,
-0.013134665787220001,
0.06028474494814873,
0.02591383457183838,
0.022227894514799118,
0.009331787005066872,
0.05650525540113449,
0.044642895460128784,
-0.019037781283259392,
-0.04262217506766319,
0.030198505148291588,
0.009645185433328152,
-0.044530633836984634,
0.03835621848702431,
-0.03304247930645943,
-0.007301713805645704,
0.0204129908233881,
0.022676944732666016,
-0.008059483021497726,
-0.0547090619802475,
-0.022489840164780617,
0.0163434911519289,
-0.060883477330207825,
-0.04381963983178139,
-0.032013408839702606,
0.039142049849033356,
0.00785834714770317,
-0.0133779002353549,
0.015277000144124031,
0.0656733289361,
0.055719420313835144,
-0.01912197656929493,
0.047748811542987823,
0.012760458514094353,
-0.003407622454687953,
-0.020656226202845573,
-0.014023407362401485,
0.01650252752006054,
-0.044268686324357986,
-0.011525575071573257,
-0.010533927008509636,
-0.0018160733161494136,
0.05384838581085205,
-0.014893438667058945,
-0.04621456190943718,
0.009378562681376934,
-0.011319761164486408,
0.07790989428758621,
0.006833955179899931,
-0.017877738922834396,
-0.060808636248111725,
0.003059142269194126,
-0.001914302702061832,
0.021161405369639397,
0.010786516591906548,
-0.05452195927500725,
-0.028065524995326996,
-0.011824941262602806,
0.008943547494709492,
-0.024267323315143585,
-0.05452195927500725,
-0.042173128575086594,
0.06241772696375847,
0.03444575518369675,
0.0038894140161573887,
-0.03584903106093407,
-0.013499516993761063,
-0.04610230028629303,
-0.04531646519899368,
-0.007325102109462023,
-0.023387936875224113,
0.03590516000986099,
-0.023893116042017937,
0.02956235222518444,
0.01561378687620163,
0.04894627630710602,
0.03498835489153862,
0.009448726661503315,
0.03173275291919708,
0.039067208766937256,
0.0546342208981514,
-0.011899782344698906,
-0.018916163593530655,
-0.02181626856327057,
-0.009065164253115654,
0.06376487016677856,
-0.030572710558772087,
-0.04539131000638008,
-0.11233694106340408,
0.02273307554423809,
-0.009303721599280834,
0.0076385000720620155,
0.020974302664399147,
-0.015389262698590755,
-0.013097244314849377,
0.01778418757021427,
0.04793591424822807,
-0.03714004531502724,
-0.033940576016902924,
-0.007633822504431009,
0.0034029448870569468,
-0.0026615471579134464,
0.02875780686736107,
0.09198007732629776,
0.020244598388671875,
-0.03642905130982399,
-0.020693646743893623,
0.03757038339972496,
0.02735453099012375,
-0.02132979780435562,
0.026007385924458504,
-0.013134665787220001,
-0.019383922219276428,
-0.060658954083919525,
-0.029618483036756516,
0.09048324823379517,
-0.05149088054895401,
0.025015737861394882,
0.015987994149327278,
0.012414316646754742,
-0.012470448389649391,
-0.014341482892632484,
0.05598136782646179,
0.017110614106059074,
0.009682605974376202,
-0.001634816755540669,
0.03132112696766853,
0.01849518157541752,
-0.020693646743893623,
0.04696297645568848,
-0.03577418997883797,
-0.013424675911664963,
-0.04378221929073334,
-0.015847666189074516,
-0.03143338859081268,
-0.0073063913732767105,
-0.06511201709508896,
-0.06279193609952927,
0.015857022255659103,
-0.03815040364861488,
0.0026241266168653965,
0.032237932085990906,
0.004111599177122116,
-0.016399621963500977,
0.009083874523639679,
-0.029805587604641914,
-0.06204351782798767,
-0.0015903797466307878,
0.002720016986131668,
0.06260482966899872,
-0.07008896768093109,
-0.006417649798095226,
-0.05171540752053261,
-0.00567391375079751,
-0.05190251022577286,
0.027579056099057198,
-0.009200814180076122,
-0.02174142561852932,
-0.02804681472480297,
-0.02447313815355301,
-0.03545611351728439,
-0.03801942989230156,
0.03287408500909805,
0.021011723205447197,
-0.01424793154001236,
-0.002572673140093684,
-0.03805685043334961,
-0.006511201616376638,
0.014753110706806183,
0.01853260211646557,
-0.024304743856191635,
-0.018663574010133743,
-0.027990683913230896,
0.020824618637561798,
-0.007914477959275246,
-0.037439409643411636,
-0.04924564063549042,
0.03251858800649643,
0.022190473973751068,
-0.0273919515311718,
-0.012030755169689655,
-0.031901147216558456,
-0.0655984878540039,
0.008279330097138882,
-0.036260657012462616,
0.06511201709508896,
-0.023088570684194565,
0.026419013738632202,
-0.000986386206932366,
0.040676299482584,
-0.028626834973692894,
-0.04602745920419693,
-0.030441738665103912,
-0.03154565021395683,
0.037851035594940186,
0.03558708354830742,
-0.015567011199891567,
-0.028664255514740944,
-0.042247969657182693,
-0.030385607853531837,
0.02974945679306984,
-0.039329156279563904,
-0.11286082863807678,
-0.0334353931248188,
-0.0035105294082313776,
0.026362882927060127,
-0.031975988298654556,
-0.04310864582657814,
0.0023808919358998537,
0.011553640477359295,
-0.0327618233859539,
0.011188789270818233,
0.02937524951994419,
0.02015104703605175,
0.04875916987657547,
-0.025184130296111107,
0.038075562566518784,
0.06660884618759155,
0.022284027189016342,
-0.004621456377208233,
0.00902306567877531,
0.0335102379322052,
0.017466111108660698,
-0.017438046634197235,
0.04415642470121384,
0.009205492213368416,
-0.0334353931248188,
0.049769531935453415,
0.006394261959940195,
-0.016137676313519478,
0.003094224026426673,
-0.029843008145689964,
-0.004719685763120651,
-0.01564185321331024,
0.017185457050800323,
-0.030310766771435738,
-0.033454105257987976,
-0.02417377196252346,
-0.03510061651468277,
0.017250942066311836,
0.05710398778319359,
-0.05175282806158066,
-0.044268686324357986,
0.006263289600610733,
-0.008302717469632626,
-0.03723359480500221,
0.03457672521471977,
0.033603787422180176,
-0.06660884618759155,
-0.058488551527261734,
0.06211836263537407,
-0.007993997074663639,
0.04116277024149895,
0.038805264979600906,
0.013087889179587364,
0.019477473571896553,
-0.04396932199597359,
0.021685294806957245,
0.004958242643624544,
0.001396259875036776,
0.03251858800649643,
-0.002918814541772008,
-0.004621456377208233,
-0.006777824368327856,
-0.05766529589891434,
0.0037350535858422518,
-0.00943001639097929,
-0.029805587604641914,
-0.007063156925141811,
0.013387255370616913,
0.01723223179578781,
-0.0005598487332463264,
0.022358868271112442,
-0.05875049903988838,
0.006211835891008377,
0.06395197659730911,
0.010889423079788685,
-0.08771412074565887,
-0.021161405369639397,
-0.0397782027721405,
0.04108792915940285,
-0.02030072920024395,
0.01590379700064659,
0.000983462785370648,
-0.04924564063549042,
-0.0006034087855368853,
-0.04512936249375343,
-0.025184130296111107,
-0.0167176965624094,
-0.004219183698296547,
0.04610230028629303,
-0.006314742844551802,
-0.0039034467190504074,
0.052912868559360504,
-0.0074888174422085285,
-0.0413498729467392,
0.0007864193757995963,
0.021498192101716995,
0.05594394728541374,
-0.028327468782663345,
-0.01915939897298813,
-0.04396932199597359,
0.028813937678933144,
-0.001436019316315651,
-0.03285537287592888,
0.031208863481879234,
0.017802897840738297,
-0.03130241483449936,
-0.060471851378679276,
-0.05714140832424164,
0.03169533237814903,
-0.036522600799798965,
0.00383328297175467,
-0.009785512462258339,
-0.031901147216558456,
0.00293518602848053,
-0.018962940201163292,
-0.05923696607351303,
0.03137725591659546,
0.004911466967314482,
-0.07106190919876099,
0.03708391264081001,
-0.036073554307222366,
0.058151766657829285,
0.018177105113863945,
0.12326378375291824,
-0.00457701925188303,
0.020169757306575775,
0.05961117520928383,
-0.012582710012793541,
0.06122026592493057,
-0.036672286689281464,
-0.009163393639028072,
0.022414999082684517,
0.005229542963206768,
-0.00848982110619545,
0.007516882847994566,
-0.02207821235060692,
-0.0167176965624094,
-0.003274311078712344,
0.05066762864589691,
0.008611438795924187,
-0.05594394728541374,
-0.08958515524864197,
0.03132112696766853,
0.011722033843398094,
0.04516678303480148,
0.028551993891596794,
0.0801551416516304,
0.017540952190756798
]
|
41,365 | pyglove.core.symbolic.base | _on_change | Event that is triggered when field values in the subtree are updated.
This event will be called
* On per-field basis when object is modified via attribute.
* In batch when multiple fields are modified via `rebind` method.
When a field in an object tree is updated, all ancestors' `_on_change` event
will be triggered in order, from the nearest one to furthest one.
Args:
field_updates: Updates made to the subtree. Key path is relative to
current object.
| @abc.abstractmethod
def _on_change(self, field_updates: Dict[object_utils.KeyPath, FieldUpdate]):
"""Event that is triggered when field values in the subtree are updated.
This event will be called
* On per-field basis when object is modified via attribute.
* In batch when multiple fields are modified via `rebind` method.
When a field in an object tree is updated, all ancestors' `_on_change` event
will be triggered in order, from the nearest one to furthest one.
Args:
field_updates: Updates made to the subtree. Key path is relative to
current object.
"""
| (self, field_updates: Dict[pyglove.core.object_utils.value_location.KeyPath, pyglove.core.symbolic.base.FieldUpdate]) | [
0.0035474731121212244,
-0.008596829138696194,
-0.04114355891942978,
0.08991686254739761,
-0.06246405094861984,
-0.050163768231868744,
-0.006916681304574013,
0.009243039414286613,
0.018646517768502235,
-0.036865200847387314,
-0.0003531874972395599,
-0.05330123007297516,
0.10253801941871643,
0.022283123806118965,
-0.0195021890103817,
-0.028076734393835068,
-0.08813420683145523,
0.020072637125849724,
0.04328273981809616,
-0.028700662776827812,
-0.02759541943669319,
-0.03629475086927414,
0.05686653032898903,
0.02427969127893448,
-0.013423353433609009,
0.02545624040067196,
0.002660604892298579,
0.03957482799887657,
0.052338600158691406,
0.0007799093145877123,
-0.04150008782744408,
-0.052481211721897125,
0.0095728300511837,
0.005998616572469473,
-0.01800476387143135,
-0.05326557904481888,
-0.003948569297790527,
0.07059293240308762,
-0.10096928477287292,
0.024386649951338768,
0.025634504854679108,
0.009831313975155354,
-0.003634377382695675,
-0.008302691392600536,
0.09148558974266052,
0.04930809512734413,
-0.016320159658789635,
0.0252066683024168,
-0.018343467265367508,
-0.0037012267857789993,
-0.011943753808736801,
-0.014938605949282646,
0.019965678453445435,
0.0037591629661619663,
0.003297902178019285,
0.05084117501974106,
0.04463755339384079,
0.02417273260653019,
0.03429818153381348,
-0.010357195511460304,
0.006796352565288544,
-0.01668560318648815,
-0.010000665672123432,
-0.03786348178982735,
-0.02410142682492733,
-0.07679655402898788,
0.04331839084625244,
0.0034427426289767027,
-0.028665009886026382,
-0.006421996280550957,
-0.06966595351696014,
0.012300283648073673,
0.0412861704826355,
0.006332863587886095,
-0.04666977375745773,
0.05312296748161316,
-0.02162354253232479,
0.03572430461645126,
0.018753476440906525,
-0.013530312106013298,
-0.018396945670247078,
-0.04310447350144386,
0.008177906274795532,
-0.014011627994477749,
-0.02659713663160801,
-0.045493222773075104,
-0.005272186826914549,
0.0014261199394240975,
0.10268063098192215,
0.008864226751029491,
-0.03602735325694084,
-0.009421304799616337,
-0.042854901403188705,
0.031855951994657516,
-0.03722172975540161,
-0.0015910150250419974,
-0.02793412283062935,
-0.03875480964779854,
-0.06503106653690338,
0.06021791324019432,
0.06032487004995346,
0.016436031088232994,
0.02773803099989891,
0.03775652498006821,
0.016462771221995354,
-0.03747130185365677,
-0.045421916991472244,
0.005254360381513834,
0.012835078872740269,
0.001010539592243731,
0.003850523615255952,
-0.04945070669054985,
-0.009875880554318428,
0.012416156008839607,
-0.022657480090856552,
0.011123735457658768,
-0.03634823113679886,
-0.02048264630138874,
0.03271162509918213,
-0.07144860923290253,
0.05946920067071915,
0.005454908590763807,
-0.02180180698633194,
0.010410674847662449,
-0.020197423174977303,
-0.036758240312337875,
0.02656148374080658,
0.04806023836135864,
-0.012612247839570045,
-0.014867300167679787,
-0.020857002586126328,
-0.01674799621105194,
-0.026276258751749992,
0.03365642949938774,
0.10061275959014893,
0.005713392980396748,
0.013869015499949455,
0.0027140844613313675,
-0.033175114542245865,
-0.03854088857769966,
-0.002462285105139017,
-0.002718541072681546,
0.0848541334271431,
-0.0027007146272808313,
-0.018842609599232674,
0.011578311212360859,
0.0009414619416929781,
0.01506339106708765,
-0.06435365974903107,
-0.0022305406164377928,
-0.049058523029088974,
0.01037502195686102,
0.027559766545891762,
-0.019520016387104988,
-0.05576128885149956,
0.040430497378110886,
-0.07665394246578217,
-0.028290653601288795,
0.026133647188544273,
0.049129828810691833,
-0.014234459027647972,
0.0031330070924013853,
0.03121419996023178,
-0.04695499688386917,
0.003010449931025505,
0.03886176645755768,
-0.07679655402898788,
-0.10695899277925491,
-0.05158988758921623,
0.03602735325694084,
0.004412058275192976,
0.012442896142601967,
-0.029164152219891548,
0.0386478491127491,
0.06681371480226517,
0.03971743956208229,
-0.0016177546931430697,
0.003079527523368597,
-0.026240605860948563,
0.0606100969016552,
-0.020072637125849724,
-0.008039751090109348,
0.0365443229675293,
0.07080685347318649,
-0.004688369110226631,
0.01935957744717598,
-0.03602735325694084,
0.0030973542015999556,
0.01566949300467968,
-0.0006400826969183981,
-0.014742514118552208,
-0.07330255955457687,
-0.029502855613827705,
-0.06635022908449173,
0.03606300801038742,
0.013610531575977802,
-0.01325400173664093,
-0.004880004096776247,
0.007041466888040304,
0.09248387813568115,
-0.044209714978933334,
-0.031945087015628815,
0.005927310790866613,
0.04264098405838013,
-0.050056807696819305,
0.058577872812747955,
0.07330255955457687,
0.01509013120085001,
-0.0020010245498269796,
-0.04085833579301834,
0.023459672927856445,
0.05404994264245033,
-0.020161770284175873,
0.02672192081809044,
-0.0031218656804412603,
-0.03893307223916054,
-0.03946786746382713,
0.0062259044498205185,
-0.025901902467012405,
0.015045564621686935,
0.017844324931502342,
0.041535742580890656,
-0.039396561682224274,
-0.05925527960062027,
0.01443055085837841,
-0.023602284491062164,
-0.0021436363458633423,
-0.003324642078951001,
0.018628690391778946,
-0.06453192234039307,
-0.014733601361513138,
0.005954050458967686,
-0.02272878587245941,
-0.007148426026105881,
0.08898988366127014,
0.002273992635309696,
0.0011358822230249643,
-0.052552517503499985,
0.0001752010575728491,
-0.025794943794608116,
-0.024885792285203934,
0.014938605949282646,
-0.025598851963877678,
0.004100094549357891,
-0.007273211609572172,
-0.06331972032785416,
0.01139113213866949,
0.03854088857769966,
-0.04068006947636604,
0.01801367662847042,
0.019626975059509277,
-0.02903936617076397,
-0.020036984235048294,
0.06381886452436447,
-0.010009579360485077,
-0.005089465528726578,
-0.014599902555346489,
0.061109237372875214,
0.0215165838599205,
-0.024867964908480644,
-0.001377096981741488,
-0.04987854138016701,
-0.07893573492765427,
0.02668626792728901,
0.00157541676890105,
-0.01259442139416933,
0.08121752738952637,
-0.023798376321792603,
-0.011738749220967293,
0.04199923202395439,
0.0792209580540657,
-0.006493302062153816,
-0.01140895951539278,
0.04977158457040787,
-0.03779217600822449,
-0.051411621272563934,
0.0038059575017541647,
-0.006885485257953405,
-0.015580359846353531,
-0.03768521919846535,
0.03221248462796211,
-0.021231360733509064,
-0.004135747440159321,
0.02788064442574978,
0.01921696588397026,
-0.06574412435293198,
-0.009144993498921394,
0.004813154693692923,
-0.042854901403188705,
-0.007696590851992369,
0.07979140430688858,
-0.001150923315435648,
-0.010383935645222664,
0.021445278078317642,
-0.013423353433609009,
-0.00721973180770874,
-0.010366109199821949,
0.027434980496764183,
0.005927310790866613,
0.011703096330165863,
0.027310196310281754,
0.02545624040067196,
-0.05151858180761337,
-0.04353230819106102,
0.016641035676002502,
0.02167702279984951,
0.020126117393374443,
-0.01916348561644554,
0.028165867552161217,
-0.0031463769264519215,
-0.02902153879404068,
0.047775015234947205,
-0.08499674499034882,
0.03520733490586281,
0.013788796961307526,
-0.034636884927749634,
0.0102324103936553,
-0.0018717823550105095,
0.008913249708712101,
0.04246272146701813,
-0.034547753632068634,
0.033335551619529724,
-0.038113053888082504,
0.03581343591213226,
-0.03378121554851532,
-0.01793345808982849,
0.044031452387571335,
0.04699065163731575,
0.008717157877981663,
-0.021997898817062378,
-0.009938272647559643,
-0.038113053888082504,
0.07387301325798035,
-0.009483696892857552,
-0.03893307223916054,
-0.014876212924718857,
0.008218015544116497,
-0.05034203082323074,
0.01918131299316883,
-0.015999281778931618,
0.03786348178982735,
0.022354429587721825,
-0.023192275315523148,
-0.01435924507677555,
0.02155223675072193,
0.01019675750285387,
0.03729303553700447,
0.03403078764677048,
0.07451476156711578,
0.010027405805885792,
-0.0033870346378535032,
-0.04378188028931618,
-0.04841677099466324,
-0.016320159658789635,
0.03722172975540161,
-0.03590256720781326,
0.011141561903059483,
-0.09141428768634796,
-0.016560817137360573,
-0.02034003473818302,
0.046313244849443436,
-0.021124400198459625,
0.023834029212594032,
-0.03693650662899017,
0.026204952970147133,
-0.019644800573587418,
-0.007758983410894871,
-0.016017109155654907,
0.04264098405838013,
-0.015268395654857159,
0.009760008193552494,
-0.0009910418884828687,
0.05651000142097473,
0.021534409373998642,
-0.011400045827031136,
-0.019092179834842682,
-0.01335204765200615,
0.013762056827545166,
-0.02900371327996254,
0.022425735369324684,
0.035777781158685684,
-0.02287139743566513,
-0.031107239425182343,
0.00975109450519085,
0.007705504074692726,
-0.00422710832208395,
0.058649178594350815,
0.017746279016137123,
0.01930609717965126,
-0.007086033001542091,
0.008062033914029598,
0.036758240312337875,
-0.05469169840216637,
-0.025884075090289116,
-0.06431800872087479,
-0.031927257776260376,
0.056046511977910995,
-0.020019158720970154,
-0.02160571701824665,
-0.05936224013566971,
0.0038817201275378466,
-0.020892655476927757,
-0.0730886459350586,
-0.0044209714978933334,
0.02666844241321087,
-0.0030059933196753263,
-0.003627692349255085,
0.03394165262579918,
-0.0014974258374422789,
0.04028788581490517,
0.0068097226321697235,
0.03772087022662163,
-0.02766672521829605,
-0.029467202723026276,
0.0032355093862861395,
-0.05939789488911629,
-0.01085633784532547,
-0.053657758980989456,
0.01019675750285387,
0.0012200010241940618,
-0.03137463703751564,
0.06624326854944229,
-0.028023255988955498,
0.01676582172513008,
0.01907435432076454,
-0.07116337865591049,
0.007897138595581055,
0.005931767635047436,
0.05048464238643646,
0.12107757478952408,
0.04028788581490517,
0.016703428700566292,
-0.0502350740134716,
-0.019644800573587418,
0.027559766545891762,
-0.018575211986899376,
0.026222780346870422,
0.013111390173435211,
-0.013129216618835926,
-0.003950797952711582,
-0.03700781241059303,
-0.008151166141033173,
0.05454908683896065,
-0.07034336030483246,
0.015963628888130188,
-0.008106600493192673,
0.01827216148376465,
0.008231385610997677,
-0.04474451020359993,
-0.013209435157477856,
0.00788376946002245,
0.035581689327955246,
-0.003921829629689455,
0.024671874940395355,
-0.0151525242254138,
-0.06731285899877548,
-0.03488645702600479,
-0.0300376508384943,
0.03971743956208229,
0.001578759285621345,
-0.07180513441562653,
0.0012523115146905184,
0.01703321933746338,
-0.038077399134635925,
-0.030911149457097054,
0.017790844663977623,
0.02290705032646656,
0.0028366416227072477,
-0.02759541943669319,
-0.010036318562924862,
0.07558435201644897,
-0.045421916991472244,
-0.030590271577239037,
0.008111056871712208,
-0.02285357192158699,
-0.021445278078317642,
-0.017719538882374763,
-0.037899136543273926,
-0.05579693987965584,
-0.0576152428984642,
0.008717157877981663,
0.014769254252314568,
0.0577935092151165,
-0.022461388260126114,
0.024547088891267776,
-0.059825729578733444,
0.0017547958996146917,
-0.008365084417164326,
-0.00569110969081521,
-0.02411925233900547,
-0.06335537880659103,
-0.0386478491127491,
0.03625909984111786,
0.01277268584817648,
-0.03957482799887657,
-0.06028921902179718,
0.01394923496991396,
0.026900187134742737,
0.014234459027647972,
-0.014198806136846542,
-0.010152190923690796,
0.02796977572143078,
0.0192347913980484,
0.015348615124821663,
-0.028629356995224953,
-0.023406192660331726,
0.01328965462744236,
0.04681238532066345,
0.014252285473048687,
-0.0007336718263104558,
0.024903617799282074,
-0.039040032774209976,
0.08086099475622177,
-0.0003774203942157328,
-0.0032689340878278017,
-0.06285623461008072,
-0.020197423174977303,
0.06706328690052032,
-0.016623210161924362,
0.01584775745868683,
0.010357195511460304,
-0.04328273981809616,
0.039325255900621414,
-0.005597520619630814,
0.022514868527650833,
0.006533411797136068,
-0.04028788581490517,
0.016320159658789635,
-0.015241656452417374,
-0.03739999234676361,
0.026294086128473282,
-0.010178931057453156,
0.04802458733320236,
-0.010535460896790028,
-0.03936091065406799,
0.031909432262182236,
0.026187125593423843,
0.002520221285521984,
-0.14489378035068512,
0.03165986016392708,
0.036722585558891296,
0.046313244849443436,
0.007692134007811546,
0.02431534416973591,
0.016480598598718643,
-0.017808672040700912,
0.012122019194066525,
-0.0864228680729866,
0.033282071352005005,
-0.010918729938566685,
-0.0024466868489980698,
0.009171733632683754,
0.030501138418912888,
0.04977158457040787,
0.00967978872358799,
-0.006671566981822252,
-0.021267013624310493,
0.0013826678041368723,
0.025028403848409653,
-0.002903491025790572,
-0.00302827637642622,
0.004617063328623772,
0.062357090413570404,
0.06356929242610931,
0.01823650859296322,
0.05465604364871979,
0.028058908879756927,
0.05757959187030792,
0.03722172975540161,
0.033246420323848724,
0.010874164290726185,
0.062891885638237,
-0.018949568271636963,
-0.034440796822309494,
-0.008944445289671421,
-0.018967393785715103,
-0.04449494183063507,
-0.039289601147174835,
-0.030483312904834747,
-0.11872448027133942,
-0.002517992863431573,
-0.03836262598633766,
0.014492942951619625,
0.025670157745480537,
0.011177214793860912,
0.03946786746382713,
0.009385651908814907,
0.07943487912416458,
-0.015455574728548527,
0.02645452320575714,
-0.042819250375032425,
-0.07323125749826431,
-0.0432114340364933,
0.011729836463928223,
-0.009893706999719143,
0.01804932951927185,
-0.047454141080379486,
-0.013432267121970654,
-0.00916281994432211,
-0.05319427326321602,
-0.038184359669685364,
0.01213984563946724,
0.029449375346302986,
-0.028451092541217804,
-0.050056807696819305,
-0.050163768231868744,
0.045101042836904526,
0.021106574684381485,
0.03272945061326027,
0.03267597034573555,
0.03021591529250145,
0.03467253968119621,
0.043068818747997284,
0.014582076109945774,
0.0195021890103817,
0.00907814409583807,
-0.022104857489466667,
0.019680455327033997,
0.036900851875543594,
-0.008904336020350456,
-0.03394165262579918,
0.047810669988393784,
-0.02411925233900547,
0.018842609599232674,
-0.06018225848674774,
-0.018717823550105095,
0.029591986909508705,
-0.0721973180770874,
-0.007620828226208687,
-0.005254360381513834,
0.009376738220453262,
0.007464846130460501,
0.005962963681668043,
-0.040252234786748886,
0.04246272146701813,
-0.04606367275118828,
-0.002754193963482976,
-0.02518884278833866,
-0.05536910519003868,
-0.042961861938238144,
0.028201520442962646,
0.03486863151192665,
0.0303050484508276,
-0.02292487770318985,
0.002965883817523718,
0.017844324931502342,
-0.012870731763541698,
-0.023495325818657875,
0.01790671795606613,
-0.04481581598520279,
-0.015910150483250618,
0.03176682069897652,
-0.0655302107334137,
0.04082268103957176,
0.05519083887338638,
0.053907331079244614,
-0.011203953996300697,
-0.07586957514286041,
0.013450093567371368,
0.023798376321792603,
-0.028023255988955498,
-0.016239941120147705,
0.03711476922035217,
-0.013093562796711922,
0.06053878739476204,
0.007611915003508329,
0.04324708506464958,
0.001945316675119102,
0.037970442324876785,
0.04474451020359993,
0.000039900718547869474,
-0.003366980003193021,
0.0241549052298069,
-0.01586558297276497,
0.023851854726672173,
-0.0653519406914711,
0.08357062190771103,
0.04681238532066345,
0.02157006412744522,
0.0012935353443026543,
0.04627759009599686,
0.035617344081401825,
-0.03267597034573555,
-0.0019887688104063272,
0.04820285364985466,
0.016008196398615837,
0.033210765570402145,
0.053729068487882614,
0.07529912889003754,
0.003438286017626524,
0.0169084332883358,
-0.036829546093940735,
0.0102324103936553,
-0.02891458012163639,
-0.0007247586036100984,
-0.03258683905005455,
-0.008084316737949848,
-0.009635222144424915,
-0.004661629442125559,
0.03641953691840172,
0.06157272681593895,
0.023709243163466454,
-0.031980738043785095,
0.017318442463874817,
0.017888890579342842,
-0.01801367662847042,
-0.042605333030223846,
-0.019751761108636856,
0.052588172256946564,
-0.0009158363682217896,
-0.046348895877599716,
-0.001968713942915201,
-0.0432114340364933,
-0.08578111231327057,
0.0300376508384943,
0.006787439342588186,
0.018682170659303665,
0.022461388260126114,
0.025723638013005257,
0.012264630757272243,
-0.019876545295119286,
0.02777368389070034,
0.023388365283608437,
-0.006791896186769009,
0.011560484766960144,
0.01206853985786438,
0.04007396847009659,
0.004915656987577677,
-0.0655302107334137,
-0.0036522038280963898,
0.06292753666639328,
0.022407907992601395,
0.00853889249265194,
-0.07722438871860504,
0.047775015234947205,
-0.030804188922047615,
-0.042997512966394424,
-0.02659713663160801,
-0.05034203082323074,
0.039040032774209976,
-0.004848807584494352,
-0.04435233026742935,
0.035849086940288544,
-0.001671234262175858,
0.008547806181013584,
0.0012890787329524755,
-0.020108290016651154,
0.05893440544605255,
0.015571446157991886,
-0.013655098155140877,
0.024885792285203934,
0.028005428612232208,
0.030643751844763756,
-0.029342416673898697,
0.02793412283062935,
0.014368157833814621,
-0.03665127977728844,
0.0002555595710873604,
0.01030371617525816,
0.005365775898098946,
-0.0029993082862347364,
-0.0024177187588065863,
-0.003489537164568901,
0.004211510065943003,
0.021284839138388634,
0.01678364910185337,
-0.011587223969399929,
0.022443560883402824
]
|
41,368 | pyglove.core.symbolic.base | _set_item_without_permission_check | Child should implement: set an item without permission check. | @abc.abstractmethod
def _set_item_without_permission_check(
self, key: Union[str, int], value: Any) -> Optional[FieldUpdate]:
"""Child should implement: set an item without permission check."""
| (self, key: Union[str, int], value: Any) -> Optional[pyglove.core.symbolic.base.FieldUpdate] | [
0.018825866281986237,
-0.022336969152092934,
-0.03631080687046051,
0.08610142767429352,
-0.037192992866039276,
-0.05575420334935188,
0.02381904236972332,
0.015208899974822998,
0.047708660364151,
-0.061047326773405075,
0.03421120345592499,
0.03265855461359024,
0.03138820454478264,
0.040015991777181625,
-0.040792316198349,
0.006916344165802002,
-0.0019981530494987965,
0.07869105786085129,
0.03368189185857773,
-0.03558741509914398,
-0.0024635065346956253,
0.018861154094338417,
0.04216852784156799,
-0.007207465823739767,
0.0016011690022423863,
0.08553683012723923,
0.02156064473092556,
0.03652253374457359,
0.09026534855365753,
-0.0033920081332325935,
-0.03849863260984421,
-0.0008739162585698068,
0.05374281853437424,
0.07128069549798965,
-0.0035133089404553175,
-0.002851668745279312,
-0.046826474368572235,
0.0772089883685112,
-0.11228473484516144,
-0.00019077288743574172,
-0.019725697115063667,
0.01019807904958725,
0.05843605101108551,
-0.05967111513018608,
0.034899309277534485,
0.03475815802812576,
0.02674790285527706,
0.05518960580229759,
-0.005893007852137089,
-0.0012041849549859762,
-0.02208995632827282,
0.04322715103626251,
0.021419495344161987,
-0.00006182199285831302,
-0.03265855461359024,
0.03624023124575615,
0.02152535691857338,
0.030241362750530243,
0.028124114498496056,
0.03744000568985939,
-0.016470426693558693,
0.03920438140630722,
-0.024965886026620865,
-0.09217087179422379,
0.009130633436143398,
-0.05402511730790138,
-0.06090617552399635,
-0.02249576337635517,
0.0054695578292012215,
0.0762915164232254,
-0.04026300460100174,
-0.02856520749628544,
0.021878231316804886,
0.06796366721391678,
0.055930640548467636,
0.010400982573628426,
-0.017220286652445793,
0.01490013487637043,
0.047285210341215134,
-0.009509973227977753,
0.03634609654545784,
-0.022001737728714943,
0.02438364177942276,
0.02159593254327774,
-0.04587371274828911,
0.03421120345592499,
0.0035485962871462107,
-0.011371387168765068,
0.07085724174976349,
-0.018843509256839752,
-0.04668532311916351,
-0.014264959841966629,
-0.032041024416685104,
0.002133789239451289,
0.03534040227532387,
0.046226587146520615,
0.0018603113712742925,
-0.07982026040554047,
-0.09788744151592255,
0.026218591257929802,
-0.011124375276267529,
0.026236234232783318,
0.08588970452547073,
-0.03846334293484688,
0.038816217333078384,
-0.04195680469274521,
-0.002025721361860633,
-0.007476532831788063,
-0.022813349962234497,
-0.01230650581419468,
0.001595655339770019,
0.008857155218720436,
-0.05494259297847748,
0.014185563661158085,
-0.04696762561798096,
0.05049636960029602,
-0.05829490348696709,
-0.09308835119009018,
0.038886792957782745,
-0.003019284224137664,
0.01760844886302948,
-0.0032773239072412252,
-0.0008502075215801597,
-0.011441962793469429,
0.08821868151426315,
0.01569410227239132,
-0.037087131291627884,
0.047391075640916824,
0.031211769208312035,
-0.005712159443646669,
-0.046226587146520615,
-0.016055800020694733,
-0.005650406237691641,
0.013594497926533222,
0.02912980690598488,
0.012703489512205124,
0.0481674000620842,
0.004470481537282467,
-0.05056694522500038,
-0.022336969152092934,
-0.014803093858063221,
-0.00468441192060709,
0.09033592790365219,
0.016541002318263054,
0.008720416575670242,
-0.028953369706869125,
-0.034564077854156494,
0.019461041316390038,
-0.01460019126534462,
-0.016955630853772163,
-0.008605731651186943,
0.014785450883209705,
-0.036028508096933365,
0.004377851728349924,
-0.023395594209432602,
0.046897049993276596,
-0.012862282805144787,
-0.03698126971721649,
0.016161661595106125,
0.004069086629897356,
-0.008588088676333427,
-0.05956524983048439,
0.018296554684638977,
-0.02208995632827282,
-0.00023281460744328797,
0.00774118909612298,
-0.028124114498496056,
-0.06694032996892929,
0.021190127357840538,
0.06323514878749847,
0.005191669333726168,
-0.008014666847884655,
-0.012359436601400375,
-0.0031494067516177893,
0.03691069409251213,
0.029782624915242195,
-0.007008973974734545,
-0.02641267143189907,
0.009801095351576805,
0.015420624986290932,
0.030347226187586784,
-0.024524793028831482,
-0.009165920317173004,
0.018596496433019638,
0.05783616378903389,
0.029517969116568565,
-0.03601086512207985,
0.03586971387267113,
0.023342661559581757,
0.05776559188961983,
-0.03013550117611885,
-0.05607179179787636,
0.01136256568133831,
-0.078126460313797,
-0.02697727084159851,
-0.02434835582971573,
-0.0014688409864902496,
-0.008892443031072617,
-0.0036390204913914204,
0.045697275549173355,
-0.027912389487028122,
-0.030170787125825882,
0.03032958135008812,
0.06972804665565491,
-0.03119412437081337,
0.03839276731014252,
0.060447439551353455,
-0.01715853251516819,
-0.062917560338974,
-0.028229976072907448,
-0.009959888644516468,
0.0028472577687352896,
-0.04153335466980934,
0.00876893661916256,
0.023695537820458412,
-0.05638938024640083,
-0.019319890066981316,
-0.0077941203489899635,
-0.012535873800516129,
0.07039850205183029,
0.03751058131456375,
0.031176481395959854,
0.00730009563267231,
-0.029341531917452812,
0.07763243466615677,
0.009959888644516468,
0.013162226416170597,
-0.03265855461359024,
-0.016391029581427574,
0.008579266257584095,
0.0017897364450618625,
0.011000868864357471,
0.013682716526091099,
0.019161097705364227,
0.00048768389387987554,
-0.06951631605625153,
0.005668050143867731,
-0.07967910915613174,
-0.040792316198349,
0.025495197623968124,
-0.008561622351408005,
0.00204115966334939,
0.015314762480556965,
0.10332171618938446,
-0.054236844182014465,
-0.003191310679540038,
-0.016020512208342552,
0.06203537434339523,
0.012456477619707584,
-0.0014489918248727918,
0.02295449934899807,
-0.030047282576560974,
-0.07053965330123901,
0.0258127860724926,
0.017784886062145233,
0.00925413891673088,
-0.05614236742258072,
-0.00218230951577425,
0.02016679011285305,
-0.009721698239445686,
-0.02837112732231617,
-0.02607744187116623,
-0.03507574647665024,
-0.035693276673555374,
-0.016735082492232323,
-0.031811654567718506,
0.04837912321090698,
0.045661989599466324,
-0.049155447632074356,
0.0672932043671608,
0.009262961335480213,
-0.010109860450029373,
0.02826526388525963,
0.008574855513870716,
-0.04837912321090698,
0.009465863928198814,
0.01079796627163887,
0.015861717984080315,
-0.030453087761998177,
-0.055965930223464966,
0.06535239517688751,
0.008345486596226692,
0.03135291859507561,
0.05402511730790138,
-0.045697275549173355,
-0.03740471974015236,
0.0030854481738060713,
0.03588735684752464,
-0.05166085809469223,
0.009730520658195019,
0.005482790991663933,
0.0064267306588590145,
-0.04308600351214409,
0.031546998769044876,
0.009836382232606411,
0.002342205960303545,
-0.051272694021463394,
-0.010427447967231274,
0.04421520233154297,
-0.026659684255719185,
-0.004600604064762592,
0.01456490345299244,
-0.09951066970825195,
-0.01164486538618803,
0.0503552220761776,
-0.004878493025898933,
0.024524793028831482,
0.022583981975913048,
-0.024577723816037178,
0.03856920450925827,
0.004113195929676294,
0.025265829637646675,
-0.06634044647216797,
0.050743382424116135,
0.06069445237517357,
-0.0016893877182155848,
0.0023532332852482796,
0.013532745651900768,
0.012712311930954456,
0.08913615345954895,
-0.05173143371939659,
0.006942810025066137,
-0.018825866281986237,
-0.006206184159964323,
-0.016055800020694733,
-0.06390561163425446,
0.012721133418381214,
-0.0038308959919959307,
-0.021878231316804886,
0.030911825597286224,
-0.05561305582523346,
0.0353756882250309,
0.04068645462393761,
-0.0425214022397995,
-0.08821868151426315,
0.009554082527756691,
-0.0011975686065852642,
-0.030153144150972366,
0.04806153476238251,
0.018561210483312607,
0.03135291859507561,
0.02182530052959919,
0.0061708963476121426,
0.0010691001079976559,
0.019108165055513382,
-0.015641171485185623,
0.03219981864094734,
0.031211769208312035,
0.08871269971132278,
-0.01168015319854021,
0.024171918630599976,
-0.0353756882250309,
-0.005791556090116501,
-0.05151970684528351,
0.05155499652028084,
-0.06140020117163658,
-0.01926695927977562,
-0.025071747601032257,
-0.03221746161580086,
-0.052543044090270996,
0.11666037887334824,
-0.04703819751739502,
0.017105601727962494,
0.030417799949645996,
-0.05219016969203949,
-0.012950502336025238,
-0.02969440631568432,
-0.03786345571279526,
0.07173942774534225,
-0.03980426862835884,
-0.006497305817902088,
-0.06387032568454742,
-0.005557776894420385,
-0.0076706139370799065,
0.016488071531057358,
0.029218025505542755,
-0.012474121525883675,
0.04467393830418587,
-0.08370187878608704,
0.004027182701975107,
0.058224327862262726,
-0.04308600351214409,
-0.037087131291627884,
0.020007995888590813,
-0.002024618675932288,
-0.012835817411541939,
0.01613519713282585,
0.031546998769044876,
0.004216852597892284,
0.022901568561792374,
0.011838946491479874,
0.017581982538104057,
-0.07438598573207855,
-0.04213324189186096,
-0.04446221515536308,
-0.0003129006363451481,
-0.017096780240535736,
-0.017405545338988304,
-0.038816217333078384,
-0.01145960669964552,
0.04696762561798096,
-0.017705488950014114,
-0.0029134219512343407,
-0.01542944647371769,
0.021543001756072044,
0.03705184534192085,
-0.002736984519287944,
-0.004821150563657284,
-0.034369997680187225,
-0.01230650581419468,
0.02747129648923874,
-0.000538133957888931,
-0.010118681937456131,
0.006545825861394405,
0.016717439517378807,
-0.03962783142924309,
0.044003475457429886,
-0.04015714302659035,
-0.017555516213178635,
0.0019507355755195022,
0.030611881986260414,
0.032041024416685104,
-0.027330147102475166,
0.016452783718705177,
-0.021648863330483437,
-0.010118681937456131,
-0.0016926958924159408,
0.010339229367673397,
-0.0031935160513967276,
0.033170223236083984,
0.015058928169310093,
-0.001627634628675878,
-0.033875972032547,
0.029853200539946556,
-0.007886749692261219,
-0.01900230348110199,
0.00029498120420612395,
-0.033205509185791016,
-0.04495623707771301,
0.028988657519221306,
-0.03085889294743538,
-0.014379644766449928,
0.010127504356205463,
-0.0021966451313346624,
0.07368023693561554,
-0.0005138738197274506,
-0.007604449987411499,
0.09217087179422379,
0.040510017424821854,
-0.018155403435230255,
0.014856025576591492,
0.08779522776603699,
0.05434270575642586,
0.016602754592895508,
-0.04100404307246208,
-0.06235296279191971,
-0.060482725501060486,
-0.04375646263360977,
0.040474727749824524,
-0.011521358974277973,
0.03361131623387337,
0.03604615107178688,
-0.08454877883195877,
-0.07068080455064774,
0.02882986329495907,
0.0637291744351387,
0.00023005777620710433,
-0.01949632726609707,
-0.00595476059243083,
0.02122541330754757,
0.00935117993503809,
-0.05578949302434921,
0.023166224360466003,
0.0028803397435694933,
-0.057624440640211105,
-0.00006189091800479218,
0.039380818605422974,
-0.021137194707989693,
-0.0327291302382946,
-0.02757715806365013,
0.035693276673555374,
0.017581982538104057,
0.010886184871196747,
0.026694972068071365,
-0.011239059269428253,
-0.08130233734846115,
-0.003744882997125387,
-0.009183564223349094,
0.007772065699100494,
0.000378237571567297,
-0.01373564824461937,
-0.029147451743483543,
0.02697727084159851,
0.03361131623387337,
0.03902794420719147,
-0.07043379545211792,
-0.038886792957782745,
0.025953935459256172,
0.030082568526268005,
-0.027083134278655052,
0.00659434637054801,
-0.0026223002932965755,
-0.007498587481677532,
-0.01104497816413641,
0.01956690289080143,
-0.03980426862835884,
-0.0346875824034214,
0.0037669376470148563,
0.030506018549203873,
-0.009756986051797867,
0.02770066447556019,
0.017511406913399696,
0.05547190457582474,
-0.02724192850291729,
0.029447395354509354,
-0.010056929662823677,
-0.02920038253068924,
0.020025640726089478,
-0.0024635065346956253,
-0.026730259880423546,
0.03059423714876175,
-0.047285210341215134,
0.013903263956308365,
-0.030276650562882423,
0.008883620612323284,
-0.03221746161580086,
-0.02618330344557762,
-0.018014254048466682,
0.02611272782087326,
-0.02803589589893818,
-0.040051281452178955,
-0.002384109888225794,
-0.0024789448361843824,
-0.005116683430969715,
0.007335382979363203,
0.0398748442530632,
-0.0004474341112654656,
0.03698126971721649,
-0.04749693721532822,
0.010330406948924065,
0.03544626384973526,
0.061611924320459366,
0.01870235987007618,
-0.05776559188961983,
-0.0007189822499640286,
0.004249935038387775,
-0.06792838126420975,
-0.010771500878036022,
0.010718569159507751,
-0.017176177352666855,
-0.05847134068608284,
0.011336100287735462,
0.03040015697479248,
0.02189587615430355,
0.027788883075118065,
-0.013506279326975346,
0.03867506980895996,
-0.005840076599270105,
0.015076572075486183,
0.03902794420719147,
-0.0006467531784437597,
-0.018296554684638977,
0.05829490348696709,
-0.004613836761564016,
0.016205770894885063,
-0.001691593206487596,
0.0019044206710532308,
0.018984658643603325,
0.044003475457429886,
-0.014891312457621098,
-0.042874276638031006,
-0.028476988896727562,
-0.008076420053839684,
0.011071444489061832,
-0.028494633734226227,
-0.029376819729804993,
-0.01765255816280842,
-0.020854895934462547,
-0.03867506980895996,
-0.07368023693561554,
-0.016982095316052437,
-0.009862848557531834,
0.037192992866039276,
-0.014794272370636463,
0.023942548781633377,
-0.012288861908018589,
0.022601624950766563,
0.06415262073278427,
-0.02461301162838936,
0.006065034307539463,
-0.046261873096227646,
0.0038794162683188915,
0.014944244176149368,
-0.058753639459609985,
0.0193022470921278,
0.011186128482222557,
-0.02757715806365013,
-0.07219816744327545,
-0.012156534008681774,
-0.0016739494167268276,
-0.013965017162263393,
0.030682455748319626,
0.01926695927977562,
-0.002220905153080821,
0.008358719758689404,
0.012597627006471157,
-0.027065491303801537,
0.010162792168557644,
-0.027824170887470245,
-0.032640911638736725,
-0.0017202642047777772,
0.006956042721867561,
0.03856920450925827,
0.0030369278974831104,
-0.009377645328640938,
-0.04146277904510498,
-0.0334172360599041,
0.04022771865129471,
0.01933753490447998,
-0.04435634985566139,
-0.07181000709533691,
0.04329772666096687,
-0.051907870918512344,
0.011786015704274178,
-0.06884585320949554,
-0.01023336686193943,
0.020149145275354385,
0.009430577047169209,
-0.024542436003684998,
-0.040792316198349,
0.010727391578257084,
-0.0027215462177991867,
0.012694668024778366,
0.034969884902238846,
0.017705488950014114,
-0.014688409864902496,
-0.03511103242635727,
0.015508843585848808,
0.0353756882250309,
0.06316457688808441,
0.06422320008277893,
0.007110425271093845,
0.0033920081332325935,
0.012368259020149708,
-0.041074614971876144,
0.04541497677564621,
-0.01512950286269188,
-0.01692916452884674,
-0.0214900691062212,
-0.033170223236083984,
-0.06725791841745377,
0.02193116396665573,
-0.02475416101515293,
-0.013250445015728474,
0.06909286975860596,
-0.002743600867688656,
-0.006956042721867561,
-0.03754587098956108,
-0.03419356048107147,
-0.03811046853661537,
-0.027224283665418625,
-0.015773499384522438,
-0.007573573384433985,
0.019443396478891373,
0.03188223019242287,
0.005443092435598373,
-0.01288874913007021,
-0.0737508162856102,
0.02657146565616131,
0.03339959308505058,
0.05441328138113022,
-0.0023863152600824833,
-0.03586971387267113,
0.011847768910229206,
0.012253574095666409,
-0.02939446270465851,
0.06224709749221802,
-0.006792838219553232,
0.020872538909316063,
0.016126373782753944,
0.010092216543853283,
-0.026659684255719185,
-0.042274389415979385,
0.037334144115448,
-0.008910086937248707,
0.034864023327827454,
0.0001607234007678926,
0.014758984558284283,
-0.019408108666539192,
-0.11263760924339294,
0.025301117449998856,
-0.05518960580229759,
-0.016532180830836296,
-0.0009207824477925897,
0.025636347010731697,
-0.027559515088796616,
-0.0437917523086071,
0.03197044879198074,
0.038886792957782745,
0.07233931869268417,
0.010789144784212112,
-0.009536439552903175,
-0.00880422443151474,
-0.006184129510074854,
0.009439398534595966,
-0.0031229411251842976,
-0.055930640548467636,
0.026553822681307793,
0.05293120816349983,
-0.05540132895112038,
0.0021900287829339504,
0.03458172082901001,
0.0001546583662275225,
-0.09922836720943451,
-0.01460019126534462,
-0.019708052277565002,
0.010603885166347027,
0.015032462775707245,
0.005893007852137089,
-0.010039285756647587,
-0.018843509256839752,
0.012800530530512333,
0.005015231668949127,
-0.04096875339746475,
0.003947786055505276,
-0.041215766221284866,
-0.03902794420719147,
-0.054695580154657364,
0.03131762892007828,
0.056989267468452454,
0.07389196753501892,
0.02830055169761181,
-0.02291921339929104,
-0.04139220342040062,
0.07092781364917755,
-0.01919638365507126,
-0.054730866104364395,
-0.027683021500706673,
-0.02238989993929863,
0.05561305582523346,
0.03440528362989426,
0.028724001720547676,
-0.0002770617720670998,
-0.02062552608549595,
0.010895006358623505,
0.025071747601032257,
-0.04026300460100174,
0.05829490348696709,
0.016161661595106125,
0.012650558724999428,
0.011027335189282894,
0.040615878999233246,
-0.011336100287735462,
0.0538133941590786,
0.06704619526863098,
-0.021878231316804886,
0.0007063007797114551,
0.05377810448408127,
0.02923567034304142,
0.026536177843809128,
-0.04358002543449402,
0.001896701636724174,
-0.011636043898761272,
0.00609591044485569,
-0.017449654638767242,
0.02261926978826523,
-0.003367748111486435,
0.04859084635972977
]
|
41,370 | pyglove.core.symbolic.base | _sym_clone | Subclass specific clone implementation. | @abc.abstractmethod
def _sym_clone(self, deep: bool, memo=None) -> 'Symbolic':
"""Subclass specific clone implementation."""
| (self, deep: bool, memo=None) -> pyglove.core.symbolic.base.Symbolic | [
-0.011562568135559559,
-0.06982950121164322,
0.06105035915970802,
0.02029966562986374,
-0.08974234759807587,
-0.0006338389357551932,
-0.03525111824274063,
0.015901684761047363,
0.00661378912627697,
-0.017978742718696594,
0.011369157582521439,
0.02697652205824852,
-0.005301963072270155,
0.06989677250385284,
-0.07063677906990051,
-0.013605989515781403,
0.039186593145132065,
0.027296070009469986,
-0.05435668304562569,
-0.009460282512009144,
-0.015388727188110352,
0.03864840790629387,
0.027296070009469986,
-0.017928287386894226,
-0.004797414410859346,
0.0763549953699112,
0.04440025985240936,
0.036932945251464844,
-0.026253337040543556,
0.002697231713682413,
-0.052674856036901474,
-0.0029137672390788794,
0.015716683119535446,
0.08308231085538864,
0.04631754383444786,
-0.04934483766555786,
-0.020198754966259003,
0.10992428660392761,
-0.08637869358062744,
-0.002209501573815942,
-0.004091046750545502,
-0.02103966847062111,
0.021796492859721184,
-0.03885022923350334,
0.004864687565714121,
-0.004776391666382551,
-0.00862777791917324,
0.022620588541030884,
-0.010788926854729652,
-0.06451492756605148,
-0.012025070376694202,
-0.00440218485891819,
-0.006592765916138887,
-0.012538027949631214,
0.0012887007324025035,
0.05802306905388832,
0.06902222335338593,
0.0009560141479596496,
-0.030020631849765778,
0.013320078141987324,
-0.06142036244273186,
-0.01385826338082552,
0.02016511932015419,
-0.06549038738012314,
-0.013320078141987324,
-0.06094944849610329,
-0.08173684775829315,
-0.041911154985427856,
0.041742973029613495,
-0.002995756221935153,
-0.02744743414223194,
-0.009855512529611588,
0.02371377684175968,
-0.00021443307923618704,
0.024907873943448067,
-0.026572883129119873,
0.035890210419893265,
-0.071982242166996,
0.02818743884563446,
-0.0780368223786354,
-0.10131332278251648,
-0.038312043994665146,
-0.06296764314174652,
0.03837931528687477,
-0.10804063826799393,
0.025866515934467316,
0.05015211179852486,
0.00006779869727324694,
0.03733658418059349,
0.002468082820996642,
-0.008871642872691154,
0.01851692795753479,
-0.03548657149076462,
0.03361974284052849,
-0.0013685876037925482,
0.0053061675280332565,
-0.0020623416639864445,
-0.03220700845122337,
0.017322828993201256,
-0.02480696514248848,
-0.02280558831989765,
0.006908108945935965,
-0.0813332051038742,
0.008770733140408993,
-0.015128043480217457,
0.02021557278931141,
-0.003796726930886507,
-0.014673950150609016,
-0.02068648487329483,
-0.022654224187135696,
-0.07406771183013916,
0.08005501329898834,
-0.037403855472803116,
-0.009687329642474651,
-0.019845571368932724,
0.012781893834471703,
0.007143564987927675,
-0.02241876907646656,
0.016364187002182007,
-0.01368167158216238,
-0.014480539597570896,
0.027010159566998482,
-0.00960323866456747,
0.025748787447810173,
0.041877519339323044,
0.07070405036211014,
0.0505557507276535,
0.007463112007826567,
-0.02346150204539299,
-0.014589858241379261,
-0.021224670112133026,
0.01027596928179264,
0.01322757825255394,
0.07904592156410217,
0.01164665911346674,
0.024436961859464645,
-0.009502328932285309,
-0.004561958834528923,
-0.056273967027664185,
-0.021359216421842575,
0.013496669940650463,
-0.028961079195141792,
0.021628309041261673,
0.05573578178882599,
-0.04322298243641853,
-0.011032791808247566,
-0.017289193347096443,
-0.01895420253276825,
-0.04073387756943703,
0.0273297056555748,
0.014497358351945877,
0.04241570457816124,
-0.014026446267962456,
0.06464947015047073,
-0.03422520309686661,
0.06582675129175186,
0.00747993029654026,
-0.0005313525325618684,
-0.04006114602088928,
0.022065583616495132,
-0.05526487156748772,
-0.01674259826540947,
0.008358685299754143,
-0.07992047071456909,
-0.03210609778761864,
-0.01004051323980093,
0.0302224513143301,
-0.12808802723884583,
-0.021493762731552124,
0.02840607613325119,
-0.043391164392232895,
-0.05543305352330208,
0.018533745780587196,
0.0010159292723983526,
0.008102206513285637,
0.012714620679616928,
0.009662101976573467,
0.01643986999988556,
-0.01777692325413227,
0.000511643651407212,
0.014034855179488659,
-0.06680221110582352,
-0.12162980437278748,
0.01752464845776558,
0.07137678563594818,
0.04241570457816124,
-0.01895420253276825,
0.009401419200003147,
0.055971238762140274,
0.050421204417943954,
-0.04628390818834305,
0.02645515650510788,
0.03244246542453766,
-0.016372596845030785,
0.03148382157087326,
-0.09310600161552429,
0.008005501702427864,
0.05348213389515877,
-0.053280312567949295,
0.14073537290096283,
-0.019374659284949303,
0.01648191548883915,
0.005180030595511198,
-0.012563255615532398,
0.020568758249282837,
-0.004185649566352367,
-0.021224670112133026,
-0.019677389413118362,
-0.00009059534932021052,
0.003620134899392724,
-0.0051842350512743,
-0.003979625646024942,
0.05095938965678215,
0.061353087425231934,
0.011217793449759483,
-0.01353030651807785,
-0.012874393723905087,
-0.009157554246485233,
0.01843283511698246,
0.008379708044230938,
0.020131481811404228,
-0.009300509467720985,
-0.04409753158688545,
0.03183700516819954,
-0.030726999044418335,
-0.009620056487619877,
0.008947325870394707,
-0.011739159934222698,
0.005167416762560606,
-0.035318389534950256,
-0.016280096024274826,
-0.05788852274417877,
0.009796648286283016,
-0.008119025267660618,
0.055533964186906815,
0.005482759326696396,
0.0034246223513036966,
0.003832465736195445,
-0.01752464845776558,
0.06202581897377968,
-0.060646720230579376,
0.029078807681798935,
0.03885022923350334,
0.04574572294950485,
-0.007606067694723606,
-0.011957797221839428,
0.009838694706559181,
0.051497574895620346,
0.0031954734586179256,
0.009578010998666286,
0.010183469392359257,
-0.06488493084907532,
-0.031769733875989914,
0.008547890931367874,
0.054323047399520874,
-0.031769733875989914,
-0.03807658702135086,
0.0011562567669898272,
0.032022006809711456,
-0.019795116037130356,
0.005978898610919714,
0.027750164270401,
0.008379708044230938,
-0.006697880569845438,
-0.011167338117957115,
-0.028893806040287018,
-0.02590015158057213,
-0.0028086528182029724,
-0.041002970188856125,
0.03774022310972214,
0.06643220782279968,
0.03057563491165638,
-0.030323360115289688,
0.0725204274058342,
-0.02875925973057747,
-0.01608668640255928,
-0.01262211985886097,
0.023007407784461975,
-0.03355247154831886,
-0.07117496430873871,
0.020484665408730507,
0.018769200891256332,
0.014278720133006573,
-0.039792053401470184,
-0.051766667515039444,
0.010309605859220028,
0.018146924674510956,
-0.026001062244176865,
-0.0024827986489981413,
-0.014430085197091103,
0.03713476285338402,
0.06471674144268036,
0.023360591381788254,
0.03663021698594093,
0.11214429885149002,
0.04783118888735771,
-0.056879427284002304,
0.0293983556330204,
-0.031467001885175705,
0.0037357606925070286,
-0.0022536495234817266,
-0.025479694828391075,
-0.038143862038850784,
0.013244396075606346,
-0.024100596085190773,
-0.05469305068254471,
0.0163473691791296,
0.03447747603058815,
0.008463799953460693,
0.068147674202919,
0.030693363398313522,
0.043525710701942444,
-0.025563787668943405,
0.05348213389515877,
0.012554846704006195,
-0.0339224711060524,
0.017491012811660767,
-0.06710494309663773,
0.05620669573545456,
0.06623038649559021,
-0.055063050240278244,
-0.022149676457047462,
-0.06128581613302231,
-0.04002750664949417,
-0.010309605859220028,
-0.02827152982354164,
-0.009460282512009144,
-0.010511425323784351,
-0.008644596673548222,
0.013042576611042023,
-0.032593827694654465,
0.04830210283398628,
0.0472593680024147,
0.03669748827815056,
-0.04043114557862282,
-0.00541128171607852,
0.019004657864570618,
-0.0428529791533947,
-0.03087836317718029,
-0.0689549520611763,
0.07023314386606216,
0.03578930348157883,
-0.01608668640255928,
-0.05930125713348389,
-0.007698568049818277,
-0.0066053797490894794,
-0.001649242709390819,
0.010536652989685535,
0.013605989515781403,
0.01950920559465885,
-0.006441401783376932,
0.00674413051456213,
-0.02527787536382675,
0.013177122920751572,
0.05307849496603012,
0.05681215226650238,
-0.0447702631354332,
0.0018121697939932346,
-0.03908568620681763,
-0.1077042669057846,
0.06202581897377968,
-0.014110537245869637,
-0.010074149817228317,
0.011587795801460743,
0.027817437425255775,
-0.033888835459947586,
-0.023276500403881073,
0.029179716482758522,
0.03027290478348732,
-0.06189127266407013,
-0.04366025701165199,
-0.04110387712717056,
-0.01747419312596321,
-0.07299134135246277,
-0.034712933003902435,
0.011873706243932247,
-0.004339116625487804,
-0.02332695573568344,
-0.035318389534950256,
0.006660039070993662,
0.10016968101263046,
-0.04470299184322357,
-0.025950606912374496,
-0.004515708424150944,
0.018247835338115692,
0.006113444920629263,
0.05368395149707794,
0.05620669573545456,
0.08698415011167526,
0.030155178159475327,
-0.002320922678336501,
-0.0033762699458748102,
0.002139075193554163,
0.021022850647568703,
0.011974615976214409,
-0.027296070009469986,
0.02640470117330551,
0.011150520294904709,
-0.10857882350683212,
0.004856278654187918,
0.04322298243641853,
0.0027497888077050447,
0.024823782965540886,
-0.029566537588834763,
-0.01700328104197979,
-0.007631294894963503,
0.03525111824274063,
-0.0025164352264255285,
-0.008249366655945778,
-0.01843283511698246,
0.02793516404926777,
-0.007690159138292074,
-0.015296226367354393,
-0.041440244764089584,
0.02697652205824852,
-0.015203725546598434,
0.055702146142721176,
-0.040868423879146576,
0.028473349288105965,
0.007534589618444443,
0.0447702631354332,
-0.013042576611042023,
-0.02368013933300972,
0.04601481556892395,
0.008510050363838673,
0.06882040202617645,
-0.010814154520630836,
0.052405763417482376,
-0.028591077774763107,
0.002533253515139222,
-0.0254124216735363,
0.022654224187135696,
-0.02038375660777092,
0.019324203953146935,
0.00012015873653581366,
-0.06649947911500931,
-0.02467241883277893,
-0.03351883217692375,
-0.04342480003833771,
0.07951683551073074,
0.018180562183260918,
-0.0068324264138937,
0.0026909250300377607,
-0.004578777123242617,
0.02741379849612713,
0.02082103118300438,
0.07050223648548126,
0.020787395536899567,
-0.0273297056555748,
0.018416017293930054,
0.0076228859834373,
0.008829597383737564,
0.053145766258239746,
-0.017642376944422722,
-0.032812464982271194,
-0.015792366117239,
0.023175591602921486,
-0.04228115826845169,
-0.012605301104485989,
0.0111925657838583,
0.016456687822937965,
0.044299352914094925,
0.03195473179221153,
-0.0144889485090971,
-0.00734117953106761,
-0.032022006809711456,
0.017844196408987045,
-0.002491207793354988,
0.011528931558132172,
-0.020350119099020958,
0.035318389534950256,
-0.004704914055764675,
0.008821188472211361,
-0.030558817088603973,
-0.025664696469902992,
-0.007669135928153992,
-0.024790145456790924,
-0.02021557278931141,
-0.05230485275387764,
-0.055063050240278244,
-0.04483753815293312,
-0.03166882321238518,
-0.016019413247704506,
-0.009552783332765102,
0.01574191078543663,
-0.0035717824939638376,
0.054760321974754333,
0.0022620586678385735,
-0.007904591970145702,
0.027531525120139122,
-0.058056704699993134,
0.04292025417089462,
-0.03659657761454582,
0.04964756593108177,
0.041305698454380035,
0.01920647732913494,
-0.0245883259922266,
0.059738531708717346,
0.026085153222084045,
-0.05307849496603012,
-0.05889761820435524,
0.011411204002797604,
0.006533902138471603,
0.039522960782051086,
0.016111912205815315,
0.022435586899518967,
-0.026707429438829422,
-0.017844196408987045,
-0.01917283982038498,
0.008127434179186821,
0.018617836758494377,
-0.019458750262856483,
0.004139399155974388,
0.0007242372375912964,
0.012067116796970367,
-0.01865147426724434,
-0.035150207579135895,
-0.022704679518938065,
-0.02055193856358528,
-0.060343991965055466,
0.04783118888735771,
-0.041137516498565674,
-0.04154115542769432,
-0.07696045190095901,
0.008510050363838673,
-0.030424270778894424,
-0.011158929206430912,
0.011318703182041645,
0.04947938397526741,
-0.011259838938713074,
0.008451186120510101,
-0.0015493840910494328,
-0.015565318986773491,
0.043828438967466354,
0.01860101893544197,
0.02645515650510788,
-0.0005006066639907658,
0.02428559772670269,
0.022368313744664192,
-0.006596970837563276,
-0.029179716482758522,
-0.0005213667172938585,
-0.00310087064281106,
0.007807886693626642,
-0.03713476285338402,
0.06145399808883667,
0.010393697768449783,
-0.026825157925486565,
-0.020787395536899567,
-0.014816905371844769,
0.013067804276943207,
0.006634811870753765,
0.0005016577779315412,
0.001230887952260673,
0.0270606130361557,
-0.016793053597211838,
0.05590396374464035,
-0.008051752112805843,
-0.0020570859778672457,
0.012554846704006195,
0.0293983556330204,
-0.005743443034589291,
0.06690312176942825,
-0.07379861921072006,
-0.013563943095505238,
0.017272373661398888,
-0.00459559541195631,
0.015144862234592438,
0.01873556524515152,
-0.008034933358430862,
0.01617918536067009,
0.009300509467720985,
0.04598117992281914,
0.04500572010874748,
0.026135608553886414,
0.034410201013088226,
0.02958335541188717,
-0.012125980108976364,
-0.009056644514203072,
-0.062429457902908325,
0.010259151458740234,
0.00002685340768948663,
-0.021443307399749756,
-0.013538716360926628,
-0.006575947627425194,
0.01868510991334915,
-0.02246922254562378,
0.009948013350367546,
-0.011142111383378506,
-0.0510939359664917,
-0.012638937681913376,
0.05862852558493614,
-0.0030230858828872442,
-0.055231235921382904,
-0.07992047071456909,
-0.010738472454249859,
-0.06303491443395615,
-0.01730601117014885,
0.002917971694841981,
0.01151211280375719,
-0.056879427284002304,
0.02337741106748581,
0.016902372241020203,
0.0037021241150796413,
-0.01511122565716505,
0.010746881365776062,
-0.016069866716861725,
0.017709650099277496,
0.02384832315146923,
-0.017575103789567947,
0.0030483133159577847,
-0.020484665408730507,
0.0447702631354332,
-0.08005501329898834,
-0.04732664301991463,
0.005344008561223745,
-0.02189740166068077,
0.015884866937994957,
-0.013715308159589767,
0.026085153222084045,
-0.08072774857282639,
-0.020888304337859154,
-0.02632061019539833,
0.0196437519043684,
-0.06962767988443375,
0.055668510496616364,
-0.0008656159043312073,
0.05812397971749306,
-0.014043264091014862,
-0.05829216167330742,
-0.025782424956560135,
0.018449654802680016,
0.01546440925449133,
0.01999693550169468,
0.022452404722571373,
-0.0431220717728138,
0.045812997967004776,
0.03700021654367447,
0.0005184760666452348,
0.0890023410320282,
-0.028288347646594048,
-0.018701927736401558,
-0.0014642415335401893,
0.001579867210239172,
-0.08180411905050278,
-0.029684266075491905,
0.027699708938598633,
-0.015943730250000954,
0.02189740166068077,
-0.009670511819422245,
-0.039354778826236725,
0.043559346348047256,
-0.029297444969415665,
0.024487417191267014,
0.0785750076174736,
0.00986392144113779,
-0.002787630073726177,
-0.0038724092300981283,
0.04766300693154335,
-0.016111912205815315,
-0.0004296545230317861,
-0.006790380924940109,
-0.01920647732913494,
0.018029196187853813,
0.018062833696603775,
0.029684266075491905,
0.007328565698117018,
-0.05203576013445854,
0.018197380006313324,
0.0033741674851626158,
-0.028826532885432243,
0.0010742676677182317,
-0.020451029762625694,
0.0026383677031844854,
-0.025429241359233856,
0.02719515934586525,
0.00357808917760849,
0.029331082478165627,
0.02324286475777626,
0.027851073071360588,
0.010662790387868881,
-0.004561958834528923,
0.0034246223513036966,
-0.02220012992620468,
-0.01582600176334381,
0.034376565366983414,
0.011436430737376213,
0.06495220214128494,
-0.0475284606218338,
-0.0859750509262085,
-0.02711106836795807,
0.029650628566741943,
0.04298752546310425,
0.04762937128543854,
0.0032249053474515676,
0.03134927526116371,
-0.07480771094560623,
-0.05200212448835373,
0.06643220782279968,
-0.01755828596651554,
0.01955966092646122,
0.014758041128516197,
0.0079340236261487,
0.015447590500116348,
0.04359298571944237,
0.021224670112133026,
-0.03720203787088394,
-0.00804334320127964,
0.027262432500720024,
0.01981193572282791,
0.012891212478280067,
0.021628309041261673,
0.027985619381070137,
-0.02502560243010521,
0.012882803566753864,
-0.06434674561023712,
0.042785707861185074,
-0.005070711486041546,
-0.017289193347096443,
0.0381774976849556,
0.015304635278880596,
-0.0373702198266983,
0.0818713903427124,
0.048470284789800644,
-0.007997092790901661,
0.025967424735426903,
-0.013059395365417004,
0.009922785684466362,
0.05486123263835907,
0.03972477838397026,
0.015481227077543736,
0.04574572294950485,
-0.0346120223402977,
0.018937384709715843,
0.013143486343324184,
-0.030340177938342094,
0.0037210446316748857,
0.0052935536950826645,
-0.02198149263858795,
0.06397674232721329,
-0.0014484744751825929,
-0.01582600176334381,
0.0004317568091209978,
0.050421204417943954,
0.0002919548423960805,
-0.014758041128516197,
-0.02445377968251705,
0.05005120486021042,
0.028439713642001152,
-0.02411741390824318,
0.015186907723546028,
0.018247835338115692,
0.02697652205824852,
0.011814842000603676,
0.01082256343215704,
-0.008581527508795261,
-0.008409140631556511,
-0.014758041128516197,
-0.00999846775084734,
-0.009519146755337715,
-0.02428559772670269,
-0.0522039420902729,
0.016036231070756912,
0.04436662420630455,
-0.022368313744664192,
-0.02085466869175434,
0.008388117887079716,
0.0017785332165658474
]
|
41,371 | pyglove.core.symbolic.base | _sym_getattr | Get symbolic attribute by key. | @abc.abstractmethod
def _sym_getattr(self, key: Union[str, int]) -> Any:
"""Get symbolic attribute by key."""
| (self, key: Union[str, int]) -> Any | [
0.047334861010313034,
-0.07166261970996857,
0.02938445284962654,
0.03676966577768326,
0.009574709460139275,
-0.023893332108855247,
0.021060885861516,
-0.03729097545146942,
0.008666763082146645,
-0.031243789941072464,
0.013388954102993011,
0.02950609289109707,
0.08716287463903427,
0.06648427993059158,
-0.04406799003481865,
0.01796778477728367,
0.0044485037215054035,
0.08167175203561783,
-0.021373670548200607,
0.011651257053017616,
-0.013406330719590187,
0.03228640556335449,
0.008088978938758373,
-0.04917681962251663,
0.0026521598920226097,
0.10043887794017792,
0.0316782146692276,
0.018732372671365738,
0.0499761626124382,
-0.06050660461187363,
-0.04518011584877968,
-0.024136608466506004,
0.00894044991582632,
0.05838661268353462,
-0.009496512822806835,
-0.014040590263903141,
0.004535388667136431,
0.06801345199346542,
-0.05609285458922386,
-0.0010654253419488668,
0.027386102825403214,
0.0018213235307484865,
0.07576358318328857,
-0.09042974561452866,
-0.03916768729686737,
-0.03343328833580017,
-0.03282509371638298,
-0.014023213647305965,
-0.009062089025974274,
-0.028463473543524742,
0.027959542348980904,
-0.019444826990365982,
-0.004242152441293001,
-0.022173011675477028,
0.01515271607786417,
0.043928977102041245,
-0.018628109246492386,
0.019201550632715225,
-0.012337647378444672,
0.05598859116435051,
-0.03492770716547966,
-0.00861897598952055,
-0.008340944536030293,
-0.028724128380417824,
-0.0024935950059443712,
-0.07166261970996857,
-0.039758503437042236,
0.001812634989619255,
-0.006103659979999065,
-0.008132421411573887,
-0.0017148895421996713,
0.012189943343400955,
-0.02556152082979679,
0.011477487161755562,
0.050149932503700256,
-0.043928977102041245,
-0.03173034265637398,
-0.03524048998951912,
0.039723750203847885,
-0.043094880878925323,
-0.045041102916002274,
-0.026691023260354996,
-0.03979325667023659,
0.009974380023777485,
-0.0882750004529953,
-0.0035427294205874205,
0.022902844473719597,
-0.04114866256713867,
-0.0013955878093838692,
0.011538307182490826,
-0.0652678906917572,
0.013102234341204166,
-0.047439124435186386,
0.05831710621714592,
-0.0038815801963210106,
-0.007741439621895552,
0.04900304973125458,
-0.02048744633793831,
0.013936328701674938,
-0.018871387466788292,
0.023180875927209854,
-0.014874684624373913,
0.010217657312750816,
-0.0007542690145783126,
-0.02488381788134575,
-0.036665402352809906,
-0.03941096365451813,
0.0036621959879994392,
-0.02033105306327343,
0.011833715252578259,
-0.06203577667474747,
0.011686011217534542,
-0.011364537291228771,
-0.008601599372923374,
-0.022572681307792664,
0.029836254194378853,
0.005121861584484577,
-0.03451066091656685,
0.0032603535801172256,
-0.003646991215646267,
-0.021999241784214973,
0.008284470066428185,
-0.012598302215337753,
0.002819413086399436,
0.07590259611606598,
0.05324302986264229,
-0.0181589312851429,
0.009009958244860172,
0.015343863517045975,
0.04924632981419563,
0.004018424078822136,
0.025231357663869858,
0.018662864342331886,
0.08292289078235626,
0.022607436403632164,
0.04191324859857559,
0.02900215983390808,
0.04062735289335251,
-0.021999241784214973,
0.02135629393160343,
0.01765500009059906,
-0.019931383430957794,
0.024640541523694992,
-0.007815291173756123,
-0.06179250031709671,
0.0012120435712859035,
-0.004583175294101238,
-0.012372401542961597,
-0.022259896621108055,
0.012650432996451855,
-0.006759640760719776,
0.042087018489837646,
-0.008688484318554401,
0.030791988596320152,
0.009817986749112606,
0.018367456272244453,
-0.0086363535374403,
0.01236371323466301,
-0.025057587772607803,
-0.030965758487582207,
-0.03982800990343094,
-0.028828389942646027,
-0.030166417360305786,
-0.1114211231470108,
0.00842782948166132,
0.013163053430616856,
-0.024518901482224464,
-0.04938534274697304,
0.029645107686519623,
0.028515605255961418,
-0.061132173985242844,
-0.03279034048318863,
-0.008049880154430866,
-0.0027520773001015186,
0.04719584435224533,
-0.0004851975245401263,
-0.027994295582175255,
0.02594381384551525,
0.038542114198207855,
0.00016725332534406334,
0.04948960617184639,
-0.04802994057536125,
-0.12386303395032883,
0.011920600198209286,
0.05021943897008896,
0.0632869154214859,
-0.0013955878093838692,
0.0054911221377551556,
0.02747298777103424,
0.040453583002090454,
-0.011790272779762745,
0.0016736192628741264,
-0.009505202062427998,
-0.03107002004981041,
0.0024914229288697243,
-0.062279053032398224,
-0.0017496434738859534,
0.040870629251003265,
-0.03421524912118912,
0.0999523252248764,
0.012137812562286854,
0.023146122694015503,
-0.04229554161429405,
0.09835363924503326,
-0.005321696400642395,
-0.04521487280726433,
0.05220041424036026,
-0.03527524694800377,
-0.06325216591358185,
-0.024675294756889343,
-0.008831843733787537,
-0.012103058397769928,
0.01742909848690033,
0.02033105306327343,
0.01979236677289009,
0.03313788026571274,
-0.030861495062708855,
0.019705481827259064,
0.01398845948278904,
0.03393721953034401,
0.06811771541833878,
0.01606500707566738,
0.04604896530508995,
0.009913560003042221,
0.06839574873447418,
-0.048516497015953064,
0.025544144213199615,
-0.0017822253284975886,
-0.051644351333379745,
-0.008658074773848057,
0.04827321693301201,
-0.013024037703871727,
0.06033283472061157,
0.001777881057932973,
0.025318242609500885,
-0.03909817710518837,
0.009930937550961971,
0.019271057099103928,
-0.015595829114317894,
0.011242898181080818,
-0.026934301480650902,
0.07194064557552338,
0.0029910106677562,
0.07451243698596954,
-0.048898790031671524,
-0.020157283172011375,
0.0191841721534729,
0.08660680800676346,
-0.029297567903995514,
-0.02144317887723446,
0.03614409267902374,
-0.046987321227788925,
0.003416746389120817,
-0.0019516507163643837,
0.0048742396757006645,
-0.04024505987763405,
-0.08987367898225784,
-0.0018072046805173159,
0.02460578642785549,
-0.04066210612654686,
-0.0316087044775486,
0.021078262478113174,
-0.031139526516199112,
0.0009665938559919596,
0.02288546785712242,
-0.01112126000225544,
0.03546639159321785,
0.024275625124573708,
-0.05265221372246742,
0.025439880788326263,
0.006042840890586376,
-0.011242898181080818,
-0.04080112278461456,
0.03053133375942707,
-0.02090449258685112,
0.028272327035665512,
0.04382471367716789,
0.006755296606570482,
-0.021043509244918823,
-0.06359970569610596,
-0.012971906922757626,
0.001987490803003311,
-0.030861495062708855,
0.02900215983390808,
-0.05717022716999054,
0.026187092065811157,
0.006025463808327913,
-0.01698598638176918,
0.01496156957000494,
-0.006125381216406822,
0.09168088436126709,
0.018714994192123413,
-0.009166350588202477,
0.03034018725156784,
0.0957123413681984,
0.021425802260637283,
-0.019166795536875725,
0.009053400717675686,
0.045458149164915085,
-0.026882169768214226,
-0.005343417637050152,
0.008879630826413631,
-0.01880187913775444,
0.0036578518338501453,
-0.023789070546627045,
-0.008801434189081192,
0.031278543174266815,
0.03317263349890709,
-0.04458929970860481,
0.06620624661445618,
0.001078458153642714,
0.04187849536538124,
-0.06620624661445618,
0.040870629251003265,
0.0004944290267303586,
-0.01465747319161892,
-0.046605028212070465,
0.03809031471610069,
0.03282509371638298,
0.11573060601949692,
-0.03729097545146942,
-0.008141109719872475,
-0.053938109427690506,
-0.03527524694800377,
-0.013632231391966343,
-0.0015454641543328762,
-0.02594381384551525,
-0.05105353146791458,
0.019931383430957794,
0.018402209505438805,
-0.04097489267587662,
0.02915855310857296,
0.00887528620660305,
-0.018506471067667007,
-0.06589346379041672,
0.014292556792497635,
-0.006998573895543814,
-0.0005134351085871458,
-0.007493817713111639,
-0.01005257572978735,
0.01587386056780815,
-0.03386771306395531,
-0.00541726965457201,
-0.013962393626570702,
0.009314054623246193,
-0.008801434189081192,
0.015986811369657516,
0.020539576187729836,
0.06603247672319412,
-0.014839931391179562,
0.0258743055164814,
-0.039654240012168884,
0.01131240651011467,
0.007046360522508621,
0.028150688856840134,
0.028567735105752945,
-0.04166996851563454,
0.03129592165350914,
-0.01046962384134531,
-0.014066656120121479,
0.07485997676849365,
-0.039758503437042236,
-0.028185442090034485,
-0.0057821860536932945,
-0.028376588597893715,
-0.028741504997015,
-0.017794014886021614,
0.02377169206738472,
0.06950787454843521,
-0.04719584435224533,
-0.031400181353092194,
-0.01895827241241932,
-0.03753425180912018,
-0.01861073262989521,
-0.028463473543524742,
0.02740347944200039,
0.04573618248105049,
0.0036687124520540237,
-0.03233853727579117,
0.006672755815088749,
0.036248356103897095,
-0.052756477147340775,
0.01791565492749214,
0.060437094420194626,
0.003888096660375595,
-0.04076636955142021,
-0.0013271659845486283,
-0.0037164990790188313,
-0.003848998574540019,
0.060089558362960815,
0.006151446606963873,
-0.027525117620825768,
-0.05209615081548691,
-0.00021789089078083634,
-0.009922249242663383,
-0.03683917224407196,
0.013701739721000195,
-0.03770802170038223,
-0.06471183151006699,
0.015274355188012123,
0.02530086599290371,
-0.006438166834414005,
0.006781361997127533,
-0.004787354730069637,
0.00709849176928401,
0.0518181212246418,
0.03084411844611168,
-0.010096018202602863,
-0.04875977337360382,
-0.029262814670801163,
-0.010773720219731331,
0.041252922266721725,
-0.05682268738746643,
-0.05866464599967003,
0.042816851288080215,
-0.012997972778975964,
0.06818722188472748,
0.015430747531354427,
0.0005799563368782401,
0.005443335510790348,
0.02667364664375782,
-0.05324302986264229,
-0.03826408460736275,
0.03393721953034401,
-0.009539955295622349,
0.026934301480650902,
0.031434934586286545,
0.05147058144211769,
-0.01450107991695404,
0.06412101536989212,
-0.004609240684658289,
0.019305812194943428,
-0.03336377814412117,
-0.03087887354195118,
0.02973199263215065,
-0.03122641146183014,
-0.045805688947439194,
-0.06596297025680542,
-0.013154365122318268,
-0.012407155707478523,
-0.020122529938817024,
0.042399801313877106,
-0.013293380849063396,
0.03122641146183014,
0.018106801435351372,
-0.06276561319828033,
0.03285984694957733,
0.08862254023551941,
0.044658809900283813,
-0.06964688748121262,
-0.0028824047185480595,
0.014031901955604553,
0.06134069710969925,
-0.003023592522367835,
0.016812216490507126,
-0.03435426577925682,
0.008731926791369915,
-0.02820281870663166,
0.028498228639364243,
0.008397419936954975,
-0.0005077333189547062,
0.035136230289936066,
-0.028446096926927567,
-0.08757992088794708,
-0.013302069157361984,
0.06266134977340698,
-0.0015161405317485332,
-0.019844498485326767,
-0.01791565492749214,
-0.006134069990366697,
0.010956178419291973,
-0.016238776966929436,
-0.0034493282437324524,
-0.019305812194943428,
-0.03011428564786911,
0.01902778074145317,
-0.02086973935365677,
0.005977677181363106,
-0.05477220565080643,
-0.08709336817264557,
0.007154966704547405,
-0.029453961178660393,
-0.016047630459070206,
-0.016169268637895584,
0.017411721870303154,
0.011738141998648643,
0.029523469507694244,
0.01656894013285637,
-0.030618218705058098,
-0.03614409267902374,
-0.042365048080682755,
0.08653730154037476,
0.037360481917858124,
0.024553656578063965,
0.07569407671689987,
0.014049278572201729,
-0.0043659633956849575,
0.022416289895772934,
-0.01282420288771391,
-0.008319223299622536,
-0.02001826837658882,
-0.045110609382390976,
0.01864548772573471,
0.02166907861828804,
0.02365005388855934,
0.02820281870663166,
-0.022520551458001137,
-0.010877981781959534,
0.01771581918001175,
-0.023858577013015747,
0.02358054555952549,
0.019392697140574455,
0.03718671202659607,
-0.017350902780890465,
0.04146144539117813,
-0.030096909031271935,
0.0073243919759988785,
-0.04306012764573097,
-0.02380644716322422,
0.010686835274100304,
0.025804797187447548,
-0.061166927218437195,
-0.0499761626124382,
-0.01669926568865776,
0.0002675781724974513,
-0.015526320785284042,
-0.02724708616733551,
0.004948091693222523,
0.0008797090267762542,
0.0067161982879042625,
-0.015656648203730583,
0.017446476966142654,
-0.03718671202659607,
0.030618218705058098,
-0.011016997508704662,
0.04834272712469101,
-0.022120879963040352,
0.04955911263823509,
-0.0019244992872700095,
0.02227727323770523,
0.016169268637895584,
0.01515271607786417,
-0.020626461133360863,
-0.028063803911209106,
0.00980061013251543,
-0.013510593213140965,
-0.08243633806705475,
-0.025961190462112427,
0.01647336594760418,
0.004413750022649765,
-0.05133156478404999,
0.030635595321655273,
0.009574709460139275,
-0.009314054623246193,
0.03492770716547966,
-0.007002918049693108,
0.04730010777711868,
-0.028463473543524742,
-0.04365094378590584,
0.028758883476257324,
0.013658297248184681,
-0.015031077899038792,
0.03708244860172272,
-0.025613650679588318,
-0.018680240958929062,
0.018906140699982643,
0.03159132972359657,
0.016238776966929436,
0.03760375827550888,
-0.04681355133652687,
-0.035900816321372986,
-0.02201661840081215,
0.0383683443069458,
0.017255330458283424,
-0.00657283840700984,
0.02361530065536499,
-0.01026109978556633,
-0.02001826837658882,
-0.0120161734521389,
-0.054320402443408966,
0.01123420987278223,
0.03435426577925682,
0.0063165281899273396,
0.010712901130318642,
0.03459754213690758,
-0.010626016184687614,
0.028150688856840134,
0.018784502521157265,
-0.04271258786320686,
-0.07103704661130905,
-0.06843049824237823,
-0.08528616279363632,
0.006481609307229519,
-0.023128744214773178,
-0.02934969961643219,
0.013936328701674938,
-0.05796956643462181,
0.01685565896332264,
-0.020817607641220093,
-0.019740236923098564,
0.010243723168969154,
0.0065120188519358635,
0.04524962604045868,
0.006907344795763493,
0.02285071276128292,
0.06641477346420288,
0.0172379519790411,
0.027160201221704483,
-0.043164391070604324,
-0.024049723520874977,
-0.011990108527243137,
-0.030235925689339638,
0.04455454647541046,
-0.0063165281899273396,
-0.008071601390838623,
0.00922717060893774,
0.014040590263903141,
0.03614409267902374,
-0.005695301573723555,
-0.01417960599064827,
-0.06353019922971725,
0.0181589312851429,
-0.032390668988227844,
0.04191324859857559,
-0.03428475931286812,
0.07041147351264954,
0.03405885770916939,
0.030479202046990395,
0.019861875101923943,
-0.0422607883810997,
0.0032169113401323557,
0.026343483477830887,
0.047717154026031494,
-0.0030931003857403994,
-0.030739856883883476,
-0.03555327653884888,
0.06141020730137825,
0.03492770716547966,
-0.004913337994366884,
0.08897008001804352,
-0.01005257572978735,
0.03301623836159706,
-0.03431951254606247,
0.029332322999835014,
0.008540780283510685,
0.05021943897008896,
-0.03371131792664528,
-0.021964488551020622,
0.0354316383600235,
-0.0034819100983440876,
-0.05824759975075722,
-0.018367456272244453,
-0.027612002566456795,
-0.009904871694743633,
0.05942923203110695,
-0.041252922266721725,
-0.0355011448264122,
-0.031313296407461166,
0.006942098960280418,
-0.031017888337373734,
-0.052686966955661774,
-0.008102011866867542,
-0.034562788903713226,
0.02288546785712242,
-0.020417938008904457,
-0.050845008343458176,
-0.04639650508761406,
-0.08980417251586914,
0.060437094420194626,
-0.022798582911491394,
0.06339117884635925,
0.034753937274217606,
0.03687392547726631,
-0.03511885181069374,
-0.028915274888277054,
0.041322432458400726,
0.06950787454843521,
-0.01835007779300213,
0.0669013261795044,
0.01014814991503954,
0.029766745865345,
-0.006872591096907854,
-0.019236303865909576,
-0.014422883279621601,
-0.0344063974916935,
-0.032269030809402466,
0.024362510070204735,
0.04173947870731354,
0.004904649220407009,
-0.12351549416780472,
-0.005104484502226114,
-0.0422607883810997,
0.004372479859739542,
0.018854010850191116,
-0.017637623474001884,
-0.04153095558285713,
-0.027194956317543983,
0.007754472084343433,
0.07548554986715317,
0.015213536098599434,
-0.0016518980264663696,
-0.006624969188123941,
0.015526320785284042,
-0.0030757233034819365,
0.02533561922609806,
0.020661216229200363,
-0.03285984694957733,
-0.00026065451675094664,
0.005221778992563486,
-0.03409361094236374,
-0.024640541523694992,
-0.018019916489720345,
-0.028637243434786797,
-0.05220041424036026,
0.04757814109325409,
-0.037012942135334015,
-0.041322432458400726,
0.04650076851248741,
-0.03412836417555809,
0.08486911654472351,
0.006516363006085157,
-0.024084478616714478,
0.07326129823923111,
0.03343328833580017,
-0.042782094329595566,
0.00920979306101799,
-0.04031456634402275,
0.035518523305654526,
-0.0038099002558737993,
0.0846605896949768,
0.05039320886135101,
0.025822175666689873,
-0.009201104752719402,
0.030444448813796043,
-0.003916334360837936,
-0.024588409811258316,
-0.0498371459543705,
-0.05032369866967201,
0.012163877487182617,
0.08201929181814194,
-0.031626082956790924,
0.05988103151321411,
-0.042121771723032,
0.02564840577542782,
0.02999264746904373,
0.0032255996484309435,
-0.02182547189295292,
0.07110655307769775,
0.02660413831472397,
-0.013745182193815708,
-0.0081758638843894,
0.060471851378679276,
0.014735668897628784,
0.0158043522387743,
0.05438991263508797,
-0.015317797660827637,
0.009574709460139275,
-0.0038381379563361406,
0.035362131893634796,
0.007863078266382217,
-0.06050660461187363,
0.0008672193507663906,
-0.04073161259293556,
0.031817227602005005,
-0.037395235151052475,
-0.03421524912118912,
-0.019479582086205482,
0.036630649119615555
]
|
41,373 | pyglove.core.symbolic.base | _sym_missing | Returns missing values. | @abc.abstractmethod
def _sym_missing(self) -> Dict[str, Any]:
"""Returns missing values."""
| (self) -> Dict[str, Any] | [
0.03125613555312157,
-0.05433182418346405,
0.039232075214385986,
0.0116741843521595,
-0.02563207782804966,
-0.015440599992871284,
-0.006182204931974411,
-0.02558095008134842,
0.058592475950717926,
-0.027745360508561134,
0.008257142268121243,
0.026041099801659584,
0.0615919753909111,
0.019275186583399773,
-0.06363708525896072,
-0.016548369079828262,
0.014852629974484444,
0.10545963793992996,
-0.024387966841459274,
-0.04877593368291855,
-0.030148368328809738,
-0.001740476000122726,
-0.0031741850543767214,
0.015363908372819424,
-0.023041602224111557,
0.05310475826263428,
0.03122205287218094,
-0.03255137428641319,
0.019326314330101013,
-0.018031075596809387,
-0.06046716123819351,
-0.007988721132278442,
0.004861402790993452,
0.05658144876360893,
0.023314284160733223,
-0.043117791414260864,
-0.019087716937065125,
0.03722104802727699,
-0.09482505172491074,
0.021814534440636635,
0.019275186583399773,
-0.013906765729188919,
0.02489924617111683,
-0.07164710760116577,
-0.0212009996175766,
-0.004115789197385311,
0.00152318284381181,
0.0041562654078006744,
-0.016071176156401634,
0.0035768167581409216,
0.03296039626002312,
-0.0010854009306058288,
-0.0006721177487634122,
0.005730575881898403,
-0.0038899744395166636,
0.08344059437513351,
-0.005423808936029673,
-0.0007605262217111886,
-0.04093633592128754,
0.04059548303484917,
-0.025887716561555862,
0.030608518049120903,
0.02114987187087536,
-0.05900149792432785,
0.018474183976650238,
0.00672330753877759,
-0.008989973925054073,
-0.025989972054958344,
0.01697443425655365,
0.006586966570466757,
0.01775839366018772,
-0.03478395566344261,
-0.0458105206489563,
0.04441302642226219,
0.07832781225442886,
-0.034562401473522186,
-0.02825663797557354,
-0.026739846915006638,
0.05695638433098793,
-0.07621452957391739,
-0.046696737408638,
-0.024882202968001366,
-0.06302355229854584,
0.019513782113790512,
-0.06820450723171234,
0.029994985088706017,
0.03681202605366707,
-0.0021654758602380753,
0.008167668245732784,
0.03994786739349365,
-0.060876183211803436,
0.007447618059813976,
-0.01162305660545826,
0.04134535789489746,
0.012219547294080257,
0.003148621181026101,
0.032125309109687805,
-0.05204811319708824,
0.010549372062087059,
-0.053820546716451645,
0.0479578897356987,
-0.02329724095761776,
-0.005696490872651339,
-0.01999097503721714,
-0.025257140398025513,
-0.0661253035068512,
-0.005440851673483849,
-0.0564110204577446,
0.0029505009297281504,
0.00940751750022173,
-0.08289522677659988,
-0.011878695338964462,
-0.013003507629036903,
-0.0258706733584404,
-0.016156388446688652,
0.0033339594956487417,
-0.028324808925390244,
-0.018491225317120552,
-0.011946866288781166,
0.018985461443662643,
-0.02846115082502365,
0.040152378380298615,
-0.029739344492554665,
-0.018559396266937256,
0.09189372509717941,
0.01828671433031559,
0.0031060148030519485,
0.012015036307275295,
0.051332324743270874,
0.048128314316272736,
0.0479578897356987,
0.027012528851628304,
0.007115287706255913,
0.03701653704047203,
-0.013855637982487679,
0.044140346348285675,
0.039572928100824356,
-0.00463132793083787,
0.023041602224111557,
0.00579874636605382,
0.05157092213630676,
-0.04182255268096924,
0.0015476815169677138,
0.03111979551613331,
0.0025010022800415754,
0.013003507629036903,
-0.011444109492003918,
0.020365912467241287,
-0.013685211539268494,
0.005632580723613501,
0.015159397386014462,
0.042436085641384125,
-0.02310977131128311,
-0.002901503350585699,
-0.011324810795485973,
-0.005986215081065893,
0.05092330276966095,
0.013625562191009521,
-0.037425559014081955,
-0.06172831356525421,
-0.011520801112055779,
-0.0763508677482605,
0.001970551209524274,
-0.058967411518096924,
-0.0011887217406183481,
0.02033182792365551,
0.008670425042510033,
-0.034835085272789,
0.03415337949991226,
0.01693182811141014,
-0.060637589544057846,
-0.0517413467168808,
-0.03783458098769188,
-0.03147768974304199,
0.05675187334418297,
0.02466064877808094,
-0.026586463674902916,
0.028682703152298927,
0.012628570199012756,
0.022121300920844078,
0.060330819338560104,
-0.05525212362408638,
-0.16688118875026703,
0.016088219359517097,
0.05242305248975754,
0.02329724095761776,
-0.009526816196739674,
-0.00645488640293479,
0.01804811879992485,
0.0547749325633049,
-0.014418043196201324,
0.0006854322855360806,
0.002211278071627021,
0.051298242062330246,
0.04591277614235878,
-0.04748069867491722,
0.005628320388495922,
0.06936340034008026,
-0.0424019992351532,
0.055422551929950714,
-0.010191477835178375,
-0.014528820291161537,
-0.03098345547914505,
0.037868667393922806,
-0.011554885655641556,
-0.024302754551172256,
-0.023314284160733223,
-0.06292130053043365,
-0.04690124839544296,
-0.017485711723566055,
0.00697894673794508,
-0.01828671433031559,
0.010958394967019558,
-0.006224811542779207,
0.007038595620542765,
0.0022602754179388285,
0.047003503888845444,
0.009143357165157795,
-0.031494732946157455,
0.02933032251894474,
0.05419548228383064,
-0.018116289749741554,
0.05123006924986839,
0.008989973925054073,
0.04679899290204048,
-0.010822053998708725,
0.03613032028079033,
-0.016377942636609077,
-0.03814135119318962,
-0.03146065026521683,
0.00850852020084858,
-0.013838594779372215,
0.006403758656233549,
-0.008785462938249111,
0.04693533480167389,
-0.013634083792567253,
0.02237693965435028,
-0.03277292847633362,
0.014273181557655334,
0.03079598769545555,
-0.028103254735469818,
0.05869473144412041,
-0.023518795147538185,
0.08739447593688965,
-0.007451878860592842,
-0.03858445584774017,
-0.0005757205071859062,
0.12625162303447723,
-0.037186965346336365,
-0.006510274950414896,
0.041856639087200165,
-0.05937643349170685,
-0.010242605581879616,
-0.0036492478102445602,
0.03169924393296242,
-0.043697237968444824,
-0.030574433505535126,
0.02363809198141098,
0.08187267184257507,
-0.03371027112007141,
0.013003507629036903,
0.03019949607551098,
-0.05030976980924606,
0.03933433070778847,
0.011026564985513687,
0.0065614026971161366,
0.018116289749741554,
0.021916789934039116,
-0.05627468228340149,
0.03984560817480087,
0.014946364797651768,
-0.00214630295522511,
-0.031068667769432068,
-0.01050676591694355,
-0.0011514410143718123,
0.07526014000177383,
0.0538887158036232,
-0.02266666479408741,
-0.007558395154774189,
-0.027080699801445007,
0.014971928671002388,
-0.03331829234957695,
-0.012568920850753784,
0.005053132306784391,
-0.036846112459897995,
0.04727618396282196,
-0.030284708365797997,
-0.06748871505260468,
0.022581450641155243,
-0.018457140773534775,
0.06176239997148514,
0.011929823085665703,
-0.0269443579018116,
0.039027564227581024,
0.09305262565612793,
0.026671675965189934,
-0.024575436487793922,
-0.021081702783703804,
0.03069373033940792,
-0.005266164895147085,
0.027557892724871635,
0.015730325132608414,
0.012884208932518959,
0.0060842097736895084,
-0.02096240408718586,
-0.06002405285835266,
0.04172029718756676,
0.06442104279994965,
-0.05903558433055878,
0.010702756233513355,
-0.017451627179980278,
0.05402505770325661,
-0.01108621433377266,
0.003404260380193591,
0.008691728115081787,
-0.02684210240840912,
-0.025461651384830475,
0.0038984958082437515,
0.03321603685617447,
0.08500850945711136,
-0.023314284160733223,
-0.012262154370546341,
-0.05027568340301514,
-0.031205009669065475,
-0.039709270000457764,
-0.011512279510498047,
-0.017306765541434288,
-0.034698743373155594,
0.027983957901597023,
0.005121302790939808,
-0.017587967216968536,
-0.0012675437610596418,
0.007226064335554838,
-0.008035588078200817,
-0.07682806253433228,
0.015517291612923145,
-0.0009730262099765241,
-0.02310977131128311,
0.027847616001963615,
0.004422556143254042,
-0.006851126905530691,
-0.04829874262213707,
-0.02251328155398369,
0.003044235287234187,
0.001228132750838995,
-0.012168419547379017,
-0.020877189934253693,
-0.008137843571603298,
0.046867161989212036,
0.02922806702554226,
-0.011878695338964462,
0.020655637606978416,
0.007008771412074566,
0.012509271502494812,
0.07894134521484375,
0.026978442445397377,
-0.01907067559659481,
0.02650124952197075,
-0.022888218984007835,
-0.02374034933745861,
0.09823357313871384,
-0.019104760140180588,
-0.042197488248348236,
0.023706262931227684,
-0.001393232960253954,
-0.03538044914603233,
0.0024711776059120893,
0.02450726553797722,
-0.00002306743226654362,
-0.06820450723171234,
-0.02791578695178032,
-0.03578947111964226,
-0.0377323254942894,
-0.051775433123111725,
-0.016667667776346207,
0.009526816196739674,
0.0513664111495018,
0.023160899057984352,
-0.06431879103183746,
-0.007008771412074566,
0.02617744170129299,
-0.06551177054643631,
-0.054399993270635605,
0.015926314517855644,
-0.007601001765578985,
-0.03083007223904133,
0.029637088999152184,
0.027660148218274117,
-0.013787467032670975,
0.043663155287504196,
0.0017458018846809864,
-0.05801302567124367,
-0.03739147633314133,
0.014307267032563686,
-0.018014032393693924,
-0.04069773852825165,
0.007149372715502977,
-0.04768520966172218,
-0.0925072580575943,
0.002560651395469904,
0.0547749325633049,
-0.03613032028079033,
0.020502254366874695,
-0.028955385088920593,
0.021081702783703804,
0.003613032167777419,
0.027165912091732025,
-0.0483328253030777,
0.002462656470015645,
-0.024728819727897644,
0.010796490125358105,
-0.01169974822551012,
-0.048128314316272736,
-0.0907348245382309,
0.02261553704738617,
-0.0014848369173705578,
0.00766065064817667,
0.0007722430163994431,
0.02495037391781807,
0.0027204258367419243,
0.0377323254942894,
-0.08828069269657135,
0.011546364985406399,
0.08753082156181335,
-0.0040518795140087605,
0.035721298307180405,
-0.006872430443763733,
-0.008538344874978065,
0.0011993732769042253,
0.017340850085020065,
0.012637091800570488,
0.00012076283019268885,
-0.04976440593600273,
-0.04352681338787079,
0.007405011914670467,
-0.05020751431584358,
-0.028665661811828613,
-0.06960199773311615,
-0.011921302415430546,
0.06687518209218979,
-0.038209520280361176,
0.046083204448223114,
0.01463959738612175,
0.05341152474284172,
0.06097843870520592,
-0.010395988821983337,
0.010174434632062912,
0.037868667393922806,
0.040254633873701096,
-0.017451627179980278,
-0.01658245362341404,
-0.009552380070090294,
0.045503754168748856,
-0.010327818803489208,
0.001510400790721178,
0.01524460967630148,
-0.0011141602881252766,
-0.03578947111964226,
-0.007426314987242222,
0.025768417865037918,
0.022888218984007835,
0.06530725955963135,
-0.07594184577465057,
-0.030676688998937607,
-0.0020451126620173454,
0.10034685581922531,
-0.034170422703027725,
-0.0488441064953804,
-0.046867161989212036,
0.007724560797214508,
0.021098744124174118,
0.0022858392912894487,
0.00824009906500578,
-0.049968916922807693,
-0.062478188425302505,
-0.0034127815160900354,
-0.007549874018877745,
0.030710773542523384,
-0.017570925876498222,
-0.050957389175891876,
-0.0031614031177014112,
0.010438594967126846,
-0.014085712842643261,
-0.017434583976864815,
0.019513782113790512,
0.016377942636609077,
0.020689722150564194,
-0.018065160140395164,
-0.013830074109137058,
0.0020781327039003372,
-0.04765112325549126,
-0.004324560984969139,
0.018559396266937256,
0.024387966841459274,
0.038993481546640396,
0.009203006513416767,
0.025989972054958344,
0.0044822050258517265,
0.010080700740218163,
-0.028853129595518112,
-0.0020674809347838163,
0.0023987465538084507,
-0.026279697194695473,
0.040288716554641724,
0.01415388286113739,
-0.07048821449279785,
-0.008039848878979683,
-0.0014773807488381863,
-0.005764660891145468,
-0.014000499621033669,
-0.008282706141471863,
0.020843105390667915,
0.06793182343244553,
-0.01658245362341404,
0.032568417489528656,
-0.022393982857465744,
-0.016071176156401634,
-0.0662616491317749,
-0.02382556162774563,
0.016079697757959366,
0.004895488265901804,
-0.03365914523601532,
-0.004160525742918253,
-0.008930324576795101,
-0.0325002484023571,
0.00017215694242622703,
0.011265161447227001,
-0.022308770567178726,
-0.008563908748328686,
0.002756641246378422,
-0.026620548218488693,
-0.020979447290301323,
-0.005044611170887947,
0.035482704639434814,
-0.029756387695670128,
0.06319397687911987,
0.010191477835178375,
0.009893232025206089,
-0.041958894580602646,
0.06223959103226662,
0.029654132202267647,
0.013634083792567253,
0.03906165063381195,
-0.022496238350868225,
0.05532029643654823,
-0.0034639094956219196,
-0.0925072580575943,
-0.015397993847727776,
-0.0011897868243977427,
0.006808520760387182,
-0.051195986568927765,
-0.010881703346967697,
0.03643709048628807,
-0.004460901953279972,
0.010378946550190449,
-0.008913282305002213,
0.07328320294618607,
0.018491225317120552,
-0.00982506200671196,
0.02324611321091652,
0.014239096082746983,
-0.005048871506005526,
0.027796488255262375,
-0.0849403440952301,
-0.02851227857172489,
0.0188661627471447,
0.014477692544460297,
0.03466465696692467,
0.008014285005629063,
0.0037898493465036154,
-0.04206115007400513,
-0.016369421035051346,
0.03253433108329773,
0.0022453630808740854,
-0.006297242362052202,
0.02982455864548683,
0.01065162755548954,
-0.027847616001963615,
-0.025069670751690865,
-0.09687016904354095,
-0.0008926064474508166,
0.04189072176814079,
0.02646716497838497,
-0.012705261819064617,
0.038686711341142654,
-0.010890224017202854,
-0.04499247670173645,
0.02348470874130726,
0.0042436085641384125,
-0.015474685467779636,
-0.06012630835175514,
-0.049593981355428696,
0.027012528851628304,
-0.04512881860136986,
-0.007511528208851814,
0.03756190091371536,
-0.020399997010827065,
-0.01571328192949295,
-0.026296738535165787,
-0.023604007437825203,
-0.005760400556027889,
0.04362906888127327,
0.011503757908940315,
0.011878695338964462,
0.03722104802727699,
0.04192480817437172,
0.007754385005682707,
0.06056941673159599,
-0.03181854262948036,
-0.029637088999152184,
-0.010148870758712292,
-0.05235488340258598,
0.034562401473522186,
-0.04553784057497978,
0.024336839094758034,
-0.00464410986751318,
0.023212026804685593,
0.011546364985406399,
0.006987467873841524,
0.034017037600278854,
-0.057467661798000336,
-0.03439197689294815,
-0.0713062584400177,
0.052661649882793427,
0.002020613756030798,
0.045844607055187225,
0.011418545618653297,
0.07116992026567459,
-0.00943308137357235,
-0.04591277614235878,
-0.02057042345404625,
0.03384661301970482,
0.039913780987262726,
-0.015645110979676247,
-0.029313279315829277,
0.028853129595518112,
0.04863959550857544,
0.013795988634228706,
0.0007402881165035069,
0.10102856159210205,
-0.017289722338318825,
0.005500500556081533,
-0.023893732577562332,
0.06394385546445847,
-0.03488621115684509,
0.02466064877808094,
-0.04546966776251793,
-0.026773931458592415,
0.06206916645169258,
-0.015491727739572525,
-0.027881700545549393,
0.011802003718912601,
-0.015253131277859211,
-0.023263156414031982,
0.008627818897366524,
0.013003507629036903,
-0.048366911709308624,
-0.006791478022933006,
-0.012441101484000683,
-0.017349371686577797,
-0.040152378380298615,
-0.016181953251361847,
-0.07655537873506546,
0.01639498583972454,
0.03630074858665466,
0.005027568433433771,
-0.029347365722060204,
-0.06336440145969391,
0.06776139885187149,
-0.019684208557009697,
0.03088119998574257,
0.03301152586936951,
0.07069272547960281,
-0.019581953063607216,
-0.03633483499288559,
0.030710773542523384,
0.016028570011258125,
0.03272180259227753,
0.05024160072207451,
0.009134836494922638,
0.039470672607421875,
-0.015304259024560452,
-0.045844607055187225,
0.002558520995080471,
-0.04656039550900459,
0.0023902254179120064,
-0.010728320106863976,
0.002882330445572734,
-0.009015537798404694,
-0.0658867135643959,
0.012125813402235508,
-0.049150872975587845,
0.014971928671002388,
0.037664156407117844,
-0.012398495338857174,
-0.020843105390667915,
-0.05024160072207451,
-0.017255637794733047,
0.0547749325633049,
0.003979448229074478,
-0.007213282398879528,
0.03175037354230881,
0.008321051485836506,
0.011997994035482407,
0.03379548713564873,
0.024524308741092682,
-0.03030175156891346,
0.006642355117946863,
-0.011529321782290936,
-0.026058143004775047,
-0.029296237975358963,
0.02752380631864071,
-0.03670977056026459,
-0.039129819720983505,
-0.024149371311068535,
-0.044583454728126526,
0.029483705759048462,
0.02217242866754532,
-0.005969172343611717,
0.03428972139954567,
0.015985963866114616,
-0.02513784170150757,
0.034698743373155594,
0.04819648712873459,
-0.019394483417272568,
0.06885212659835815,
-0.06169423088431358,
-0.04942355304956436,
0.020144358277320862,
0.07594184577465057,
0.042197488248348236,
0.058967411518096924,
-0.03722104802727699,
0.08296339958906174,
0.019513782113790512,
-0.04182255268096924,
-0.05054836720228195,
-0.0008989974157884717,
0.009893232025206089,
0.0666365846991539,
-0.0021324558183550835,
0.014912279322743416,
0.023092729970812798,
0.008227317593991756,
0.05924009531736374,
-0.00234761880710721,
0.006608270108699799,
0.07778244465589523,
0.0017127817263826728,
0.03093232773244381,
0.022053129971027374,
0.039129819720983505,
-0.013429572805762291,
0.033982954919338226,
0.003044235287234187,
0.009560901671648026,
0.031205009669065475,
0.001996115082874894,
0.020399997010827065,
0.024745862931013107,
-0.08453132212162018,
0.002332706470042467,
-0.0002790726430248469,
0.0671478658914566,
-0.029943857342004776,
-0.004592982120811939,
0.00528746796771884,
0.03701653704047203
]
|
41,374 | pyglove.core.symbolic.base | _sym_nondefault | Returns non-default values. | @abc.abstractmethod
def _sym_nondefault(self) -> Dict[Union[int, str], Any]:
"""Returns non-default values."""
| (self) -> Dict[Union[int, str], Any] | [
0.03985822945833206,
-0.04900718107819557,
0.04400717094540596,
0.0012466778280213475,
-0.032943323254585266,
-0.010363494046032429,
-0.005239371210336685,
-0.030230550095438957,
0.056312158703804016,
-0.05205683037638664,
0.007898950017988682,
0.03485821932554245,
0.026312103495001793,
0.02914898842573166,
-0.05890081450343132,
-0.02102840691804886,
-0.015567404218018055,
0.0800001472234726,
-0.01659577526152134,
-0.012943285517394543,
-0.008732285350561142,
-0.014991161413490772,
0.006932636722922325,
0.015221658162772655,
-0.017367051914334297,
0.04985824599862099,
0.0026196856051683426,
-0.036737654358148575,
0.01833336614072323,
-0.018510671332478523,
-0.07418452948331833,
-0.02466316521167755,
0.001294328598305583,
0.07017742842435837,
0.036702193319797516,
-0.036737654358148575,
-0.010248245671391487,
0.10411366075277328,
-0.07468098402023315,
0.004295220598578453,
-0.0033399881795048714,
-0.031684454530477524,
0.01762414537370205,
-0.06262422353029251,
-0.04436178132891655,
-0.005877670366317034,
0.021489400416612625,
-0.01166668813675642,
0.010443281382322311,
-0.019078047946095467,
0.06163131818175316,
-0.025815648958086967,
0.00030612864065915346,
0.009867039509117603,
-0.001494905212894082,
0.03420218825340271,
-0.005319158546626568,
0.019095778465270996,
-0.06269514560699463,
0.05765967816114426,
-0.02769508585333824,
0.024503590539097786,
0.02473408728837967,
-0.07297885417938232,
0.016409603878855705,
-0.01000888366252184,
-0.011054984293878078,
-0.02264188416302204,
0.006037245038896799,
0.032056793570518494,
0.008204801939427853,
-0.04432632029056549,
-0.030195089057087898,
0.04117028787732124,
0.09106399118900299,
-0.041844047605991364,
-0.039787307381629944,
-0.026276642456650734,
0.029716365039348602,
-0.04024830088019371,
-0.04326248914003372,
-0.03141849488019943,
-0.04461000859737396,
0.02771281637251377,
-0.06783699989318848,
-0.004539015237241983,
0.013129455968737602,
0.0038763368502259254,
0.028883030638098717,
-0.001728726550936699,
-0.042482346296310425,
-0.00112367223482579,
-0.003661354072391987,
0.0554610937833786,
0.008550547063350677,
-0.0025709266774356365,
0.04503554105758667,
-0.050638388842344284,
0.006826253607869148,
-0.06595756858587265,
-0.0008117257384583354,
-0.01728726550936699,
0.002976512536406517,
-0.05510648339986801,
-0.027216361835598946,
-0.06882990896701813,
0.008218100294470787,
-0.019787270575761795,
-0.025602882727980614,
0.0041445111855864525,
-0.08333348482847214,
-0.04170220345258713,
-0.012517753057181835,
-0.023457489907741547,
-0.010106401517987251,
0.005425541661679745,
-0.04294333979487419,
-0.02574472688138485,
0.01692378893494606,
0.04574476182460785,
-0.06624125689268112,
0.02845749817788601,
-0.018209252506494522,
-0.00947696715593338,
0.07673772424459457,
0.03514190763235092,
0.011108175851404667,
0.024609973654150963,
0.01790783368051052,
0.08134766668081284,
0.05109938234090805,
0.02503550611436367,
-0.01623229868710041,
0.04095752164721489,
0.004614369943737984,
0.029539059847593307,
0.026170259341597557,
0.039432693272829056,
0.028191540390253067,
0.03356388956308365,
0.053652577102184296,
-0.016409603878855705,
0.011471651494503021,
0.03695042058825493,
-0.02132982574403286,
0.010913140140473843,
0.010195054113864899,
0.005979620851576328,
-0.029663173481822014,
0.010132997296750546,
0.020159611478447914,
0.05542563274502754,
-0.05517740547657013,
0.03189722076058388,
-0.014645416289567947,
-0.012225199490785599,
0.05007101222872734,
-0.02306741662323475,
-0.02946813777089119,
-0.05492917820811272,
-0.0058510745875537395,
-0.05361711606383324,
0.023439759388566017,
-0.0804256796836853,
0.02168443612754345,
0.041489437222480774,
0.00039117978303693235,
-0.03423764929175377,
0.055957548320293427,
0.003120573004707694,
-0.07453913986682892,
-0.05319158360362053,
-0.030283741652965546,
0.001818487304262817,
0.09787251800298691,
0.046276677399873734,
-0.010186188854277134,
0.01081562228500843,
0.010461011901497841,
0.018510671332478523,
0.08028383553028107,
-0.040425606071949005,
-0.1453903317451477,
0.03363481163978577,
0.05890081450343132,
0.025301463901996613,
0.01620570383965969,
0.007805865257978439,
0.022482309490442276,
0.02636529505252838,
-0.009055867791175842,
-0.005704797338694334,
-0.007433523889631033,
0.0007685075979679823,
0.040815677493810654,
-0.04702136293053627,
0.02028372511267662,
0.02308514714241028,
-0.03554970771074295,
0.03359935060143471,
0.001650047255679965,
-0.021790819242596626,
-0.022961033508181572,
0.043156106024980545,
0.006369692273437977,
-0.02471635676920414,
0.016489392146468163,
-0.04737597331404686,
-0.06542564928531647,
-0.02203904651105404,
0.006555862724781036,
-0.031968142837285995,
-0.014007117599248886,
0.00669327424839139,
0.016418470069766045,
-0.043794404715299606,
0.029574520885944366,
0.0020545250736176968,
-0.05815613269805908,
0.04234050214290619,
0.07205686718225479,
0.013111725449562073,
0.05574478209018707,
0.007495580706745386,
0.0867377445101738,
-0.033688005059957504,
0.006134762894362211,
-0.043475255370140076,
-0.012961016036570072,
-0.023262452334165573,
0.022624153643846512,
-0.030000053346157074,
-0.02306741662323475,
-0.021063867956399918,
0.04978732392191887,
-0.031329844146966934,
0.04237596318125725,
-0.05790790542960167,
-0.010602856054902077,
0.031985871493816376,
-0.006112599745392799,
0.06776607781648636,
-0.004259759560227394,
0.0723050981760025,
-0.04202135279774666,
-0.016391873359680176,
-0.005500896368175745,
0.1081562265753746,
-0.01235817838460207,
-0.012482292018830776,
0.04166674241423607,
-0.06092209368944168,
-0.013794351369142532,
-0.0013696833048015833,
0.030992964282631874,
0.014884778298437595,
-0.07624126970767975,
0.02136528678238392,
0.05219867452979088,
-0.03631212189793587,
0.014361727982759476,
0.036347582936286926,
-0.051950447261333466,
0.026950404047966003,
0.0226773452013731,
-0.02060287445783615,
0.003701247740536928,
0.007610829081386328,
-0.05833343788981438,
0.04202135279774666,
0.01964542455971241,
-0.007118807174265385,
-0.03929084911942482,
-0.022854650393128395,
-0.030000053346157074,
0.050638388842344284,
0.035673823207616806,
-0.022588692605495453,
-0.012730519287288189,
-0.05219867452979088,
0.0012411370407789946,
-0.006613486912101507,
-0.008368809707462788,
0.005367917474359274,
-0.018120599910616875,
0.045248307287693024,
-0.022801458835601807,
-0.03833340108394623,
0.02671990543603897,
-0.02407805807888508,
0.06265968829393387,
0.02062060497701168,
-0.01726953499019146,
0.037375953048467636,
0.07560297101736069,
0.013581585139036179,
0.0010854407446458936,
-0.00396720552816987,
0.032659634947776794,
-0.023439759388566017,
0.018794359639286995,
0.002566494047641754,
0.014007117599248886,
0.014787260442972183,
-0.005296995397657156,
-0.035372402518987656,
0.05375896021723747,
0.018209252506494522,
-0.04127667099237442,
0.03253551945090294,
-0.021187981590628624,
0.052659668028354645,
-0.024148980155587196,
0.017118824645876884,
0.0024246496614068747,
-0.010035479441285133,
-0.0016921573551371694,
-0.008249128237366676,
0.017411379143595695,
0.10028386861085892,
-0.0467376746237278,
-0.02744685858488083,
-0.05319158360362053,
-0.059397269040346146,
-0.02235819585621357,
-0.029521329328417778,
-0.04294333979487419,
-0.023422028869390488,
0.03854616731405258,
0.023244721814990044,
-0.05074477195739746,
0.006790792569518089,
0.0010577368084341288,
-0.010842218063771725,
-0.05450364574790001,
0.010381224565207958,
0.011054984293878078,
0.0020290373358875513,
-0.011161367408931255,
-0.022765997797250748,
0.011223424226045609,
-0.05035470053553581,
-0.009219874627888203,
-0.0013663588324561715,
0.010558529756963253,
0.009246470406651497,
-0.004982278682291508,
0.00011386323603801429,
0.09106399118900299,
0.012074490077793598,
0.009273066185414791,
0.01557626947760582,
0.00481383828446269,
0.01797875575721264,
0.0669504776597023,
0.021560322493314743,
-0.011578034609556198,
0.02170216664671898,
-0.002491139341145754,
-0.0277305468916893,
0.07361715286970139,
-0.04340433329343796,
-0.020478760823607445,
0.04712774604558945,
0.007101076655089855,
-0.0106471823528409,
0.020886562764644623,
0.029592251405119896,
0.04195043072104454,
-0.07212778925895691,
-0.008195936679840088,
-0.022854650393128395,
-0.05216321349143982,
-0.06996466219425201,
-0.011374133639037609,
0.02093975432217121,
0.017101094126701355,
0.021453939378261566,
-0.0718795657157898,
-0.02879437804222107,
0.033031973987817764,
-0.07117033749818802,
-0.021241173148155212,
0.047198668122291565,
-0.032943323254585266,
-0.05489371716976166,
0.025656074285507202,
0.029007144272327423,
-0.03521282970905304,
0.046595826745033264,
-0.012987611815333366,
-0.039787307381629944,
-0.05049654468894005,
0.014326266944408417,
0.0032690661028027534,
-0.0332624725997448,
-0.011693283915519714,
-0.03558516874909401,
-0.09333350509405136,
0.03496460244059563,
0.03624119982123375,
-0.017482301220297813,
0.020922023802995682,
-0.023953944444656372,
-0.012659597210586071,
0.019202161580324173,
0.024255363270640373,
-0.04645398259162903,
0.007145402953028679,
-0.02067379653453827,
0.001758646802045405,
0.010186188854277134,
-0.03868801146745682,
-0.07347530871629715,
0.0413830541074276,
-0.004711887799203396,
0.020726988092064857,
0.036702193319797516,
0.031985871493816376,
-0.01793442852795124,
0.03083338961005211,
-0.047517817467451096,
0.015070948749780655,
0.09382995963096619,
0.009636541828513145,
0.04439724236726761,
0.025992954149842262,
0.002941051498055458,
-0.00809398666024208,
0.009228739887475967,
0.02398940548300743,
-0.013634776696562767,
-0.029007144272327423,
-0.055283788591623306,
0.04677313566207886,
-0.04131213203072548,
-0.021773088723421097,
-0.0804256796836853,
-0.010265976190567017,
0.03946815803647041,
-0.03586885705590248,
0.04468093067407608,
-0.020549682900309563,
0.032340485602617264,
0.08255334198474884,
-0.03554970771074295,
-0.005421109031885862,
0.06432635337114334,
0.02572699636220932,
-0.017340457066893578,
-0.012180873192846775,
-0.006334231235086918,
0.06386536359786987,
0.0029432678129523993,
0.022429117932915688,
0.005930861923843622,
-0.028244731947779655,
-0.015141870826482773,
0.0277305468916893,
0.004596639424562454,
0.04936179146170616,
0.032305024564266205,
-0.0507093109190464,
-0.044822774827480316,
0.0036923824809491634,
0.10503564774990082,
-0.016489392146468163,
-0.06187954545021057,
-0.03868801146745682,
0.010700373910367489,
0.022216351702809334,
0.003253551898524165,
-0.0023736744187772274,
-0.07021289318799973,
-0.05404265224933624,
0.016010666266083717,
-0.008674660697579384,
0.0058067478239536285,
-0.02205677703022957,
-0.05521286651492119,
-0.0019071400165557861,
0.03173764422535896,
-0.007420226000249386,
-0.007158700842410326,
0.008882994763553143,
0.010771295987069607,
0.028581611812114716,
-0.01351066306233406,
-0.028262462466955185,
0.028989413753151894,
-0.03347523882985115,
0.032659634947776794,
0.018014216795563698,
0.010062075220048428,
0.03141849488019943,
-0.005979620851576328,
0.02195039391517639,
0.00915781781077385,
-0.004893625620752573,
-0.02404259704053402,
0.017065633088350296,
-0.01101952325552702,
-0.048936259001493454,
0.01898939535021782,
0.026223450899124146,
-0.06620579212903976,
-0.026844019070267677,
-0.0013164917472749949,
-0.018191521987318993,
-0.012570944614708424,
-0.004317383747547865,
0.020496491342782974,
0.05411357432603836,
-0.024468129500746727,
0.037021342664957047,
-0.033971693366765976,
0.027305014431476593,
-0.04964547976851463,
-0.012588675133883953,
-0.012101085856556892,
-0.014361727982759476,
-0.02544330805540085,
-0.020070958882570267,
0.02638302557170391,
-0.003834226867184043,
0.017544357106089592,
-0.0018461912404745817,
-0.009787251241505146,
0.006179089192301035,
0.02060287445783615,
-0.015274850651621819,
-0.011595765128731728,
-0.037056803703308105,
0.040815677493810654,
-0.04574476182460785,
0.04765966162085533,
0.00500444183126092,
0.025797918438911438,
-0.018457479774951935,
0.03216317668557167,
0.016063857823610306,
0.027003595605492592,
0.022854650393128395,
-0.017065633088350296,
0.060141950845718384,
0.002086661523208022,
-0.0887235626578331,
0.02333337627351284,
-0.008328915573656559,
0.00047927835839800537,
-0.0554610937833786,
-0.010079805739223957,
0.03890077769756317,
-0.0019802784081548452,
-0.01491137407720089,
-0.018209252506494522,
0.07432637363672256,
0.01371456403285265,
-0.003641407238319516,
0.038475245237350464,
0.03184402734041214,
-0.004078021738678217,
0.018847551196813583,
-0.054326340556144714,
-0.010620586574077606,
0.03453906998038292,
0.007074480876326561,
0.043865326792001724,
-0.0009452587692067027,
-0.0033621513284742832,
-0.04666675254702568,
-0.04429085925221443,
0.053368888795375824,
0.0014051443431526423,
-0.01081562228500843,
0.021187981590628624,
-0.0036458398681133986,
-0.02301422506570816,
-0.054326340556144714,
-0.07010650634765625,
-0.016489392146468163,
0.06624125689268112,
0.024113519117236137,
-0.025975223630666733,
0.055993009358644485,
-0.01202129852026701,
-0.03599297255277634,
0.02271280623972416,
-0.025797918438911438,
-0.015691516920924187,
-0.055993009358644485,
0.009281931445002556,
0.01692378893494606,
-0.033971693366765976,
-0.03622347116470337,
0.019468119367957115,
-0.031028425320982933,
-0.0018838685937225819,
-0.007132105063647032,
-0.011631226167082787,
-0.02269507572054863,
0.030283741652965546,
0.015221658162772655,
0.016737619414925575,
0.03510644659399986,
0.03985822945833206,
0.014441515319049358,
0.046276677399873734,
-0.009512428194284439,
-0.03964546322822571,
-0.017836911603808403,
-0.058049749583005905,
0.03549651801586151,
-0.05191498622298241,
0.007686184253543615,
-0.004729618318378925,
0.014645416289567947,
0.013856408186256886,
0.004574476275593042,
0.005044335499405861,
-0.06304975599050522,
0.014343997463583946,
-0.046241216361522675,
0.0412057489156723,
0.0009812739444896579,
0.03599297255277634,
-0.004423766862601042,
0.0784398540854454,
0.01626775972545147,
-0.032003603875637054,
0.003448587842285633,
0.03407807648181915,
0.04375894367694855,
-0.012765980325639248,
-0.05049654468894005,
0.015718113631010056,
0.03476956486701965,
0.015195062384009361,
0.012668462470173836,
0.08702143281698227,
0.014964565634727478,
0.020124150440096855,
0.010230515152215958,
0.05865258723497391,
-0.017322726547718048,
0.013741159811615944,
-0.037766024470329285,
-0.004946817643940449,
0.05216321349143982,
-0.03351069986820221,
-0.04443270340561867,
0.005048768129199743,
-0.005474300589412451,
-0.043156106024980545,
-0.0008322266512550414,
-0.005966322962194681,
-0.03078019805252552,
-0.01692378893494606,
0.006737601011991501,
-0.03680857643485069,
-0.07223417609930038,
-0.01898939535021782,
-0.06230507791042328,
0.022588692605495453,
0.020124150440096855,
-0.009636541828513145,
-0.0723050981760025,
-0.062056850641965866,
0.07858169823884964,
-0.062446922063827515,
0.0615958571434021,
0.03716318681836128,
0.04471639171242714,
-0.031613532453775406,
-0.03627666085958481,
0.02205677703022957,
0.03836886212229729,
0.032978784292936325,
0.04691497981548309,
-0.0024445964954793453,
0.06719870120286942,
-0.022890111431479454,
-0.052872434258461,
-0.002974296221509576,
-0.04127667099237442,
-0.010212784633040428,
-0.03498233109712601,
-0.0019459255272522569,
0.011196828447282314,
-0.0623759999871254,
0.016090454533696175,
-0.07117033749818802,
0.01656031422317028,
0.0233688373118639,
-0.010673778131604195,
-0.01338654849678278,
-0.045531995594501495,
-0.011312076821923256,
0.04904264211654663,
0.022765997797250748,
-0.0031227893196046352,
0.018741168081760406,
-0.010461011901497841,
0.016844002529978752,
0.034414954483509064,
0.007921113632619381,
-0.028900761157274246,
0.00003296770228189416,
0.05067384988069534,
-0.03042558580636978,
-0.022907841950654984,
0.035744745284318924,
-0.049539096653461456,
-0.03049650974571705,
-0.027269553393125534,
-0.02804969623684883,
-0.013297895900905132,
0.04879441484808922,
-0.02741139754652977,
0.03929084911942482,
-0.005793449934571981,
-0.04776604473590851,
0.022163160145282745,
0.050992999225854874,
0.003820928977802396,
0.04439724236726761,
-0.051950447261333466,
-0.03929084911942482,
0.010381224565207958,
0.08453916013240814,
0.049290869385004044,
0.04127667099237442,
-0.019450388848781586,
0.03136530518531799,
-0.0031604666728526354,
-0.03074473701417446,
-0.00809398666024208,
-0.03159580007195473,
-0.012562079355120659,
0.04634759947657585,
-0.029698634520173073,
0.02845749817788601,
0.007570935413241386,
0.03624119982123375,
0.0473405122756958,
-0.01655144803225994,
0.02567380480468273,
0.06765969842672348,
0.023173799738287926,
0.04765966162085533,
-0.005562953185290098,
0.05982280150055885,
-0.0037078966852277517,
0.015097544528543949,
0.02572699636220932,
-0.012890093959867954,
0.024219902232289314,
0.0008832019520923495,
0.016418470069766045,
0.03184402734041214,
-0.08865264058113098,
0.003107275115326047,
-0.023953944444656372,
0.020478760823607445,
-0.038439784198999405,
-0.015203927643597126,
0.012686192989349365,
0.028865300118923187
]
|
41,376 | pyglove.core.symbolic.base | _sym_rebind | Subclass specific rebind implementation.
Args:
path_value_pairs: A dictionary of key path to new field value.
Returns:
A list of FieldUpdate from this rebind.
Raises:
WritePermissionError: If object is sealed.
KeyError: If update location specified by key or key path is not aligned
with the schema of the object tree.
TypeError: If updated field value type does not conform to field spec.
ValueError: If updated field value is not acceptable according to field
spec.
| @abc.abstractmethod
def _sym_rebind(
self, path_value_pairs: Dict[object_utils.KeyPath, Any]
) -> List[FieldUpdate]:
"""Subclass specific rebind implementation.
Args:
path_value_pairs: A dictionary of key path to new field value.
Returns:
A list of FieldUpdate from this rebind.
Raises:
WritePermissionError: If object is sealed.
KeyError: If update location specified by key or key path is not aligned
with the schema of the object tree.
TypeError: If updated field value type does not conform to field spec.
ValueError: If updated field value is not acceptable according to field
spec.
"""
| (self, path_value_pairs: Dict[pyglove.core.object_utils.value_location.KeyPath, Any]) -> List[pyglove.core.symbolic.base.FieldUpdate] | [
0.03293155878782272,
-0.027634110301733017,
-0.08774467557668686,
0.025686250999569893,
-0.048605453222990036,
-0.03588065505027771,
-0.004746768157929182,
0.026687487959861755,
0.030692432075738907,
-0.0461660772562027,
0.006635463330894709,
0.010358240455389023,
0.05548667162656784,
0.05727069452404976,
-0.043799519538879395,
-0.003991290461272001,
-0.013343743979930878,
0.06848453730344772,
-0.04576558247208595,
-0.05341138318181038,
0.005292897112667561,
-0.007786884438246489,
0.047840870916843414,
0.014008200727403164,
-0.02308303862810135,
0.02605033852159977,
0.03065602295100689,
0.059455208480358124,
0.06316888332366943,
-0.018823234364390373,
-0.022209232673048973,
-0.007668556645512581,
0.023301489651203156,
0.049297213554382324,
0.06273198127746582,
-0.05545026436448097,
-0.025176532566547394,
0.04561994969844818,
-0.04132373631000519,
-0.027579497545957565,
0.05545026436448097,
0.006671871989965439,
-0.013817055150866508,
-0.04077760875225067,
0.08526889234781265,
0.07103313505649567,
-0.03819260001182556,
0.05938239023089409,
0.04106887802481651,
-0.008405830711126328,
-0.01599246822297573,
0.0057935151271522045,
-0.012078545987606049,
0.0062804799526929855,
0.04576558247208595,
0.025140123441815376,
0.03131137788295746,
0.07485603541135788,
-0.0002238558663520962,
-0.045219454914331436,
-0.00025414893752895296,
-0.049588482826948166,
-0.023028425872325897,
-0.044127196073532104,
-0.001765816006809473,
-0.04529226943850517,
-0.032749515026807785,
-0.07412786781787872,
-0.005388469435274601,
-0.022627931088209152,
-0.07929788529872894,
-0.011723562143743038,
-0.022318458184599876,
-0.013844361528754234,
0.028762776404619217,
0.0339692048728466,
0.03881154581904411,
0.01786750927567482,
0.040886834263801575,
-0.09058453887701035,
-0.018213391304016113,
-0.03655421361327171,
-0.032986171543598175,
-0.011896503157913685,
-0.09116707742214203,
0.04744037613272667,
0.02239127643406391,
-0.02656005695462227,
0.03276772052049637,
-0.014800086617469788,
-0.0406319722533226,
-0.014335877262055874,
-0.04824136570096016,
0.037355199456214905,
0.014308570884168148,
-0.05195504054427147,
-0.022700749337673187,
-0.0913127139210701,
-0.03325923532247543,
0.011277557350695133,
0.028653550893068314,
-0.032658495008945465,
-0.05060792341828346,
-0.0006849363562650979,
0.017130235210061073,
-0.05657893046736717,
-0.004724013153463602,
-0.01309798564761877,
-0.019915493205189705,
-0.014536124654114246,
-0.0361173078417778,
0.011759970337152481,
0.02177233062684536,
0.02473962865769863,
-0.048933129757642746,
0.0484234094619751,
0.0019137258641421795,
-0.030637819319963455,
0.08053577691316605,
-0.03502505272626877,
0.0172121562063694,
0.004687604494392872,
-0.024138886481523514,
0.022882791236042976,
0.06014697253704071,
0.05020742863416672,
0.022973813116550446,
0.019078094512224197,
0.010494772344827652,
0.009147655218839645,
-0.03808337450027466,
-0.006043823901563883,
-0.031183946877717972,
0.02736104652285576,
0.05271962285041809,
-0.00740459468215704,
0.018076859414577484,
0.0009915648261085153,
-0.04594762623310089,
-0.003513427684083581,
0.03080165758728981,
0.008496851660311222,
0.05843576788902283,
0.0393940806388855,
0.02168130874633789,
-0.02239127643406391,
0.0033222828060388565,
0.07725900411605835,
-0.029691195115447044,
0.0367908701300621,
-0.06353297084569931,
0.047331150621175766,
0.0328405387699604,
0.0656810775399208,
-0.058981895446777344,
0.06724664568901062,
-0.057161469012498856,
-0.015591973438858986,
-0.019442180171608925,
-0.012233282439410686,
-0.03573501855134964,
-0.030619613826274872,
-0.012460836209356785,
-0.06069310009479523,
0.012570061720907688,
-0.01804955303668976,
0.0027602254413068295,
-0.08890974521636963,
-0.006244071293622255,
0.061712540686130524,
-0.016056183725595474,
-0.04354466125369072,
-0.003841104917228222,
0.027670519426465034,
0.0825018361210823,
0.018896052613854408,
-0.0016065285308286548,
-0.025413187220692635,
0.00014805207320023328,
0.006735587026923895,
0.036281149834394455,
-0.03997661918401718,
-0.04208831489086151,
0.035006847232580185,
0.028944820165634155,
0.10194402188062668,
-0.026032133027911186,
0.03841105103492737,
0.05585075914859772,
0.06786558777093887,
0.0033313848543912172,
-0.017039215192198753,
0.0337507538497448,
-0.03424226865172386,
0.023538146167993546,
-0.009061184711754322,
-0.010485670529305935,
0.04689424857497215,
-0.003674990963190794,
0.1272115707397461,
-0.04015866294503212,
-0.02337430790066719,
0.018695805221796036,
0.021663103252649307,
-0.00033279714989475906,
0.017102928832173347,
0.04594762623310089,
-0.05712505802512169,
-0.021663103252649307,
-0.0052200797945261,
0.03447892516851425,
0.005333856679499149,
0.022118210792541504,
-0.010503875091671944,
0.00966647733002901,
0.0132618248462677,
0.0126974917948246,
-0.03014630265533924,
0.013006964698433876,
0.0025099164340645075,
0.028890207409858704,
0.061712540686130524,
-0.02943633496761322,
-0.03697291016578674,
0.02958196960389614,
-0.05403032898902893,
-0.05694301798939705,
-0.008610628545284271,
-0.02581368200480938,
-0.04434564709663391,
0.015865037217736244,
-0.005697942338883877,
-0.02699696086347103,
-0.0154918497428298,
0.13609527051448822,
-0.042889304459095,
0.023265082389116287,
-0.024466564878821373,
0.03056500107049942,
0.03573501855134964,
-0.025795478373765945,
0.0348794162273407,
-0.02952735684812069,
0.028926614671945572,
-0.027015164494514465,
-0.050899192690849304,
0.00753657566383481,
0.018841439858078957,
-0.009320596233010292,
0.00412782235071063,
0.038483865559101105,
-0.0019319301936775446,
-0.04048633947968483,
0.03456994518637657,
0.001336877467110753,
-0.026578262448310852,
-0.05825372412800789,
0.012324303388595581,
0.0034337840043008327,
-0.0287809818983078,
-0.004764972720295191,
0.0055887168273329735,
-0.0496613010764122,
-0.002942268270999193,
0.01786750927567482,
0.011241148225963116,
0.0416514128446579,
0.024557586759328842,
-0.02666928432881832,
0.03229440748691559,
0.012215077877044678,
-0.009366107173264027,
-0.038301825523376465,
0.05825372412800789,
-0.0564332976937294,
0.03852027654647827,
0.07725900411605835,
-0.027725132182240486,
0.020680071786046028,
-0.0450374111533165,
0.016110796481370926,
-0.03935767337679863,
0.01857747696340084,
-0.001049022190272808,
-0.009184063412249088,
0.005907292012125254,
-0.030692432075738907,
0.008892795071005821,
-0.03234902024269104,
0.001656590262427926,
0.08898256719112396,
0.03009168989956379,
0.022737156599760056,
0.023356102406978607,
0.02040700800716877,
0.03986739367246628,
-0.0777687206864357,
0.0021378661040216684,
0.014117426238954067,
-0.007486513815820217,
-0.0164202693849802,
0.040559157729148865,
-0.005811719223856926,
0.03624473884701729,
0.04612966999411583,
-0.08308437466621399,
0.05100841820240021,
0.01763995550572872,
-0.02271895296871662,
0.03353229910135269,
-0.010066972114145756,
0.049115173518657684,
-0.08934664726257324,
0.049770526587963104,
0.04485536739230156,
-0.031766485422849655,
-0.03575322404503822,
0.015764914453029633,
-0.017175747081637383,
0.054139554500579834,
-0.06662769615650177,
0.0031652706675231457,
-0.02756129391491413,
-0.012287895195186138,
-0.023811209946870804,
-0.021226201206445694,
0.054758500307798386,
-0.007286266889423132,
0.02129901759326458,
-0.019059890881180763,
-0.04034070298075676,
0.0082101346924901,
0.03704572841525078,
0.02111697569489479,
-0.0023392511066049337,
-0.02177233062684536,
0.01464535016566515,
-0.0642247349023819,
-0.02135363034904003,
-0.0248306505382061,
0.037828512489795685,
0.04092324152588844,
-0.02557702548801899,
-0.05392110347747803,
-0.008833630941808224,
-0.011951115913689137,
0.0002679443859960884,
0.03551656752824783,
0.07587547600269318,
-0.01206034142524004,
-0.011869196780025959,
-0.030728839337825775,
-0.029308905825018883,
0.029090454801917076,
0.047986507415771484,
-0.031948529183864594,
-0.03686368465423584,
0.002047982532531023,
0.01093167532235384,
-0.06316888332366943,
0.04085042327642441,
-0.016766149550676346,
-0.032986171543598175,
0.005779861938208342,
0.021990781649947166,
-0.004655746743083,
-0.06742868572473526,
-0.006389705464243889,
-0.007554779760539532,
-0.00013240776024758816,
-0.05468568578362465,
-0.02670569159090519,
0.017712773755192757,
-0.033787161111831665,
-0.03688189014792442,
0.019533202052116394,
0.04547431319952011,
0.024757832288742065,
-0.03211236745119095,
0.011059105396270752,
0.07318124175071716,
-0.03180289268493652,
0.02581368200480938,
0.020188556984066963,
0.02299201674759388,
-0.0028034604620188475,
0.07168848812580109,
0.01537352241575718,
0.05403032898902893,
0.023993253707885742,
0.003925299737602472,
-0.003977637272328138,
-0.05515899509191513,
0.019879084080457687,
-0.03884795308113098,
-0.011441395618021488,
0.02219102904200554,
0.005925496108829975,
-0.0506807416677475,
-0.02182694338262081,
0.018277106806635857,
-0.012215077877044678,
-0.03527991101145744,
0.0016577281057834625,
-0.02295560948550701,
-0.011486906558275223,
0.05504976958036423,
0.05690660700201988,
-0.0248306505382061,
0.00011854121112264693,
0.04529226943850517,
-0.013625910505652428,
-0.00606657937169075,
-0.03362332284450531,
0.022045394405722618,
0.020607255399227142,
-0.01583773083984852,
-0.03167546167969704,
-0.0034565394744277,
0.060875143855810165,
0.03888436034321785,
-0.014963925816118717,
-0.06222226098179817,
0.0337507538497448,
-0.022027188912034035,
-0.026887735351920128,
0.009994154796004295,
0.029035842046141624,
-0.0005782706430181861,
0.06102077662944794,
0.02210000716149807,
0.016675129532814026,
-0.02384761907160282,
-0.023993253707885742,
-0.00021489594655577093,
-0.05366624519228935,
0.03193032369017601,
-0.008392177522182465,
-0.005961904767900705,
0.022300254553556442,
-0.020370598882436752,
-0.0018045001197606325,
0.03822900727391243,
-0.042962122708559036,
0.019059890881180763,
-0.022027188912034035,
-0.020425211638212204,
0.006708280649036169,
-0.007736823055893183,
0.0029604726005345583,
0.01570119895040989,
-0.022209232673048973,
0.04303494095802307,
0.025941111147403717,
-0.03899358585476875,
-0.029090454801917076,
0.0052200797945261,
-0.046712204813957214,
-0.005015281494706869,
-0.008355768397450447,
-0.00007071939762681723,
0.001430174452252686,
0.038119781762361526,
-0.01843184232711792,
-0.05504976958036423,
0.006234969012439251,
0.001114443875849247,
-0.022828178480267525,
0.004316692240536213,
-0.051190461963415146,
0.017284972593188286,
-0.04663939028978348,
0.0010859996546059847,
-0.009921337477862835,
-0.03222159296274185,
0.0053702653385698795,
0.03140239790081978,
0.03371434286236763,
-0.06706459820270538,
-0.08628833293914795,
-0.015127764083445072,
-0.036699846386909485,
0.01739419810473919,
0.006494380068033934,
0.01297965832054615,
-0.05228271707892418,
0.04420001432299614,
-0.007664005737751722,
-0.023301489651203156,
-0.011150127276778221,
0.004157404415309429,
-0.020006513223052025,
-0.015764914453029633,
0.024248113855719566,
0.0029354416765272617,
-0.005606920924037695,
-0.0484234094619751,
0.013179905712604523,
0.0021697236225008965,
-0.03688189014792442,
-0.021808737888932228,
-0.04092324152588844,
-0.006080232560634613,
0.02129901759326458,
0.00900657195597887,
0.026177767664194107,
0.008474096655845642,
0.013862566091120243,
0.023246876895427704,
-0.028089217841625214,
-0.010176197625696659,
-0.018504660576581955,
0.019241932779550552,
0.030109893530607224,
0.009206819348037243,
-0.017512526363134384,
-0.026268789544701576,
-0.025504209101200104,
-0.09437103569507599,
-0.04019507020711899,
0.015409930609166622,
-0.031766485422849655,
-0.01707562245428562,
-0.03688189014792442,
0.005916393827646971,
-0.044272832572460175,
-0.009511740878224373,
-0.01192380953580141,
0.03538913652300835,
-0.028380487114191055,
0.018677599728107452,
0.03484300896525383,
0.027306433767080307,
-0.048532634973526,
0.01450881827622652,
0.06506212800741196,
0.0025372228119522333,
-0.029145067557692528,
-0.10922573506832123,
0.01394448522478342,
0.014754576608538628,
0.05246476083993912,
-0.02111697569489479,
-0.02126261033117771,
-0.0062395199202001095,
-0.006676422897726297,
-0.015218785963952541,
-0.11330349743366241,
-0.01081334799528122,
-0.06586311757564545,
-0.07241666316986084,
0.006212213542312384,
0.018231594935059547,
0.016247328370809555,
-0.0037796655669808388,
-0.03071063570678234,
0.006039272993803024,
-0.050425879657268524,
-0.030200915411114693,
0.008451341651380062,
-0.0017533005448058248,
-0.026214176788926125,
0.056396886706352234,
0.02106236293911934,
0.03302257880568504,
0.04085042327642441,
0.010522078722715378,
0.028180239722132683,
0.026505444198846817,
0.03471557796001434,
0.00002636421959323343,
0.009347902610898018,
0.05614202842116356,
0.019241932779550552,
0.031948529183864594,
-0.006671871989965439,
0.03244004398584366,
-0.04696706682443619,
0.024703219532966614,
-0.1397361159324646,
0.021098770201206207,
0.0321669802069664,
-0.00039793437463231385,
-0.03173007443547249,
0.017758283764123917,
0.010276321321725845,
-0.007004100363701582,
0.11526955664157867,
0.009411617182195187,
-0.027761541306972504,
-0.07267152518033981,
-0.014663554728031158,
-0.03198493644595146,
-0.05082637444138527,
-0.03793773800134659,
-0.008169175125658512,
-0.06706459820270538,
0.009539047256112099,
-0.009602762758731842,
0.025522412732243538,
-0.023064834997057915,
0.022591521963477135,
0.03389638662338257,
-0.012469938024878502,
-0.039102811366319656,
-0.05173658952116966,
0.02331969514489174,
0.030073486268520355,
0.025995725765824318,
0.02379300631582737,
0.029545560479164124,
0.007632147986441851,
0.07638520002365112,
-0.015191479586064816,
-0.001890970510430634,
0.022118210792541504,
-0.0163110438734293,
0.04962489381432533,
0.0007059850613586605,
-0.0017567138420417905,
-0.053629834204912186,
-0.004287110175937414,
-0.011432293802499771,
0.03240363299846649,
-0.04758601263165474,
0.0304193664342165,
0.011623438447713852,
0.024703219532966614,
-0.024757832288742065,
-0.05173658952116966,
-0.021936168894171715,
-0.024521177634596825,
0.019260138273239136,
0.04227035865187645,
0.005452184472233057,
0.0031402399763464928,
0.011841890402138233,
-0.016447575762867928,
0.005488593131303787,
0.03080165758728981,
0.03393279388546944,
-0.010139789432287216,
0.014008200727403164,
0.030546797439455986,
-0.0551954060792923,
0.014426899142563343,
0.04223395138978958,
-0.08920101821422577,
0.023392511531710625,
0.0010820174356922507,
-0.03757365420460701,
0.016993703320622444,
-0.04762241989374161,
0.010285423137247562,
0.054103147238492966,
0.047039881348609924,
-0.03593526780605316,
-0.08206493407487869,
-0.02308303862810135,
-0.018786827102303505,
-0.043144166469573975,
-0.025176532566547394,
0.015300705097615719,
-0.028526121750473976,
0.03380536660552025,
0.020661868155002594,
0.04500100389122963,
0.018695805221796036,
0.03578963130712509,
0.02881738916039467,
0.011295760981738567,
-0.040741197764873505,
-0.01673884317278862,
0.040085844695568085,
-0.010558487847447395,
-0.03578963130712509,
0.04030429571866989,
0.034442514181137085,
0.017421504482626915,
0.03633576259016991,
0.01008517574518919,
-0.01318900752812624,
-0.013780646957457066,
0.0036681643687188625,
-0.003388273296877742,
0.041869863867759705,
0.036699846386909485,
0.05876344442367554,
0.04420001432299614,
-0.058981895446777344,
0.011996626853942871,
-0.03560759127140045,
0.022700749337673187,
-0.01339835673570633,
-0.06386064738035202,
-0.04915158078074455,
0.012051239609718323,
-0.020716480910778046,
0.04467332363128662,
0.02102595381438732,
0.034351494163274765,
0.0609479583799839,
0.022737156599760056,
-0.005675187334418297,
0.04769523814320564,
-0.014754576608538628,
-0.03136599063873291,
-0.013771545141935349,
-0.0016019773902371526,
0.00870165042579174,
0.00627592857927084,
0.008938306011259556,
0.009493536315858364,
-0.06324169784784317,
0.05326575040817261,
-0.03808337450027466,
0.03710034117102623,
-0.012378916144371033,
0.014372286386787891,
0.019241932779550552,
-0.00411644484847784,
0.002063911175355315,
0.05275603011250496,
-0.0038888913113623857,
0.024375542998313904,
-0.010431057773530483,
0.008428585715591908,
0.017239462584257126,
-0.024138886481523514,
0.03511607274413109,
0.04947925731539726,
0.02727002464234829,
-0.04609325900673866,
0.004851443227380514,
0.04583840072154999,
-0.0026623771991580725,
-0.026960551738739014,
0.031948529183864594,
-0.014326775446534157,
0.1138860359787941,
0.0025440494064241648,
0.0084376884624362,
0.013553093187510967,
-0.007905212230980396,
-0.051372501999139786,
-0.01311619020998478,
-0.020097535103559494,
0.029691195115447044,
0.0012788512976840138,
0.014536124654114246,
0.06036542356014252,
0.06644565612077713,
-0.004541970323771238,
-0.01424485631287098,
0.03240363299846649,
-0.05759837105870247,
-0.050571516156196594,
-0.022409480065107346,
-0.009994154796004295,
-0.006389705464243889,
-0.0035270811058580875,
0.026123154908418655,
0.00033222828642465174,
0.04223395138978958,
0.02590470388531685,
0.010258116759359837,
-0.01678435504436493,
0.01810416579246521
]
|
41,377 | pyglove.core.symbolic.base | _update_children_paths | Update children paths according to root_path of current node. | @abc.abstractmethod
def _update_children_paths(
self,
old_path: object_utils.KeyPath,
new_path: object_utils.KeyPath) -> None:
"""Update children paths according to root_path of current node."""
| (self, old_path: pyglove.core.object_utils.value_location.KeyPath, new_path: pyglove.core.object_utils.value_location.KeyPath) -> NoneType | [
0.022300120443105698,
-0.04442395269870758,
-0.015028341673314571,
0.03828921914100647,
-0.08602733910083771,
0.022952375933527946,
0.012525087222456932,
0.0752386674284935,
0.05112280324101448,
0.004711230751127005,
0.03987578675150871,
-0.04653938114643097,
0.08482860028743744,
0.0484432652592659,
-0.08207854628562927,
-0.005932008381932974,
0.02901659905910492,
0.014164542779326439,
0.005284158978611231,
0.0006241609808057547,
-0.03229551017284393,
-0.03481639176607132,
0.06564873456954956,
0.005557401571422815,
-0.04428292438387871,
0.036561619490385056,
0.026513343676924706,
0.040686700493097305,
0.08652094006538391,
-0.05806845426559448,
-0.04255532845854759,
-0.001967787276953459,
-0.0014312181156128645,
0.022370634600520134,
0.00008876252104528248,
0.0019193087937310338,
-0.0067208861000835896,
0.035098448395729065,
0.009836732409894466,
0.023798547685146332,
0.020713550969958305,
0.021700749173760414,
-0.02120715007185936,
-0.051299091428518295,
0.05478954315185547,
0.051052290946245193,
0.0009216428152285516,
0.06434421986341476,
0.010471360757946968,
-0.003746067639440298,
-0.005605880171060562,
-0.016764754429459572,
-0.0037526781670749187,
-0.001822351710870862,
0.007474506739526987,
0.06198199465870857,
0.009792661294341087,
0.010621203109622002,
0.027606314048171043,
-0.019162237644195557,
0.057328056544065475,
-0.016711868345737457,
0.012419315986335278,
-0.02933391183614731,
-0.023816175758838654,
-0.06875135749578476,
-0.015759926289319992,
-0.03694944828748703,
-0.02099560759961605,
0.05165166035294533,
-0.09463007748126984,
-0.011194131337106228,
0.024204004555940628,
0.011132431216537952,
0.0020129603799432516,
0.029192883521318436,
-0.015495498664677143,
0.02889319881796837,
0.021506834775209427,
-0.030832339078187943,
-0.05591776967048645,
-0.04914840683341026,
-0.012824772857129574,
-0.004587830975651741,
-0.017108511179685593,
0.02790600061416626,
0.05792742595076561,
-0.011211760342121124,
0.05958450958132744,
-0.00022393772087525576,
-0.026178400963544846,
0.006632743403315544,
-0.018351323902606964,
0.014666955918073654,
0.023639889433979988,
-0.005786572583019733,
-0.008091505616903305,
-0.08066826313734055,
-0.024186374619603157,
0.018042825162410736,
0.0029395611491054296,
0.01865100860595703,
0.037231504917144775,
0.02064303681254387,
0.041004013270139694,
-0.053308743983507156,
-0.041673898696899414,
-0.0334942527115345,
0.016006726771593094,
-0.010700532235205173,
-0.06409741938114166,
0.007518577855080366,
-0.009012597613036633,
0.030003797262907028,
-0.07100781053304672,
0.021030863747000694,
-0.011440930888056755,
-0.06550770252943039,
0.03843024745583534,
-0.05500108748674393,
0.006936835590749979,
0.008461705408990383,
0.004248481243848801,
0.005204830318689346,
0.046468865126371384,
0.00380776752717793,
0.0190740954130888,
0.06511987745761871,
-0.04209698364138603,
-0.06117108091711998,
-0.015513126738369465,
0.0233225766569376,
-0.016438625752925873,
0.0029946505092084408,
0.07495661079883575,
-0.012428130023181438,
0.017390567809343338,
-0.021171892061829567,
-0.032207366079092026,
0.0027103901375085115,
0.0039179460145533085,
-0.02945731207728386,
0.06353330612182617,
0.014032328501343727,
-0.012445759028196335,
0.00954586174339056,
-0.0013133272295817733,
0.011617216281592846,
-0.08786071091890335,
0.03737253323197365,
-0.027147972956299782,
0.02788837067782879,
0.031431712210178375,
-0.035433392971754074,
-0.008779019117355347,
-0.036667391657829285,
-0.03938218951225281,
-0.033106423914432526,
-0.0003853491507470608,
-0.021242406219244003,
-0.039558473974466324,
-0.06240507960319519,
0.03892384469509125,
-0.02334020473062992,
-0.030444512143731117,
0.016579654067754745,
-0.02423926070332527,
-0.07862334698438644,
-0.038465503603219986,
0.030990997329354286,
0.024468431249260902,
-0.011458559893071651,
-0.05581200122833252,
0.011291088536381721,
0.03012719750404358,
-0.005746908485889435,
0.02187703549861908,
0.00975740421563387,
0.027817856520414352,
0.021136635914444923,
-0.006623928900808096,
-0.014719842001795769,
0.0014190985821187496,
0.046891950070858,
0.05147537589073181,
0.03871230408549309,
-0.07005587220191956,
0.04696246609091759,
0.01573348417878151,
0.034111250191926956,
-0.063392274081707,
0.013168529607355595,
0.017117325216531754,
0.009299062192440033,
0.012657301500439644,
-0.005839458201080561,
0.019109351560473442,
-0.02422163262963295,
-0.0038386175874620676,
0.14314384758472443,
-0.01596265472471714,
-0.027394771575927734,
0.043577782809734344,
0.019708722829818726,
0.04086298495531082,
0.0045085023157298565,
-0.005209237337112427,
0.018562866374850273,
-0.046045780181884766,
0.013133272528648376,
-0.04318995401263237,
0.053626060485839844,
-0.0055089229717850685,
-0.02342834696173668,
-0.027306629344820976,
-0.012472201138734818,
-0.0463983528316021,
0.01200504507869482,
-0.02244114875793457,
-0.0020228764042258263,
0.022582177072763443,
0.06818724423646927,
-0.014640513807535172,
-0.036914192140102386,
-0.0060554081574082375,
-0.03539813682436943,
0.041004013270139694,
-0.023252062499523163,
0.024204004555940628,
-0.044917553663253784,
0.017372939735651016,
-0.028329085558652878,
0.005724872462451458,
-0.016473883762955666,
0.05845628306269646,
-0.04276686906814575,
-0.003129068296402693,
-0.030091941356658936,
0.0014367271214723587,
0.040475159883499146,
-0.07700151950120926,
-0.04333098232746124,
0.006491714622825384,
-0.002752257976680994,
-0.020114179700613022,
-0.03025059774518013,
0.021824149414896965,
0.010171675123274326,
0.009968946687877178,
-0.0117229875177145,
0.0026619115378707647,
-0.06861033290624619,
-0.027659200131893158,
0.0200965516269207,
0.030232969671487808,
-0.012489830143749714,
-0.012639672495424747,
0.054965827614068985,
-0.006482900585979223,
0.015178184024989605,
-0.0017342088976874948,
-0.011590774171054363,
-0.03783087432384491,
0.05302668735384941,
-0.0363500751554966,
-0.008117948658764362,
0.050629206001758575,
0.004182374104857445,
-0.059443481266498566,
0.012542715296149254,
0.06409741938114166,
-0.011150060221552849,
-0.020114179700613022,
0.04262584075331688,
0.01886255294084549,
0.0031863609328866005,
-0.02533223107457161,
-0.00975740421563387,
-0.05894988402724266,
-0.05880885198712349,
0.027200857177376747,
-0.043613042682409286,
-0.0004489772254601121,
0.03906487300992012,
-0.034534335136413574,
-0.05690497159957886,
-0.03003905527293682,
0.00354554271325469,
-0.026760144159197807,
-0.0047685238532722,
0.030726568773388863,
-0.006205250974744558,
-0.07798872143030167,
0.038677044212818146,
0.056552398949861526,
0.002769886516034603,
-0.077283576130867,
-0.008664433844387531,
0.016491511836647987,
0.0030034647788852453,
-0.00602896511554718,
-0.0026376722380518913,
-0.03680841997265816,
-0.010286260396242142,
0.054648514837026596,
-0.004303570371121168,
0.0113351596519351,
0.032648079097270966,
0.006258136592805386,
0.017223097383975983,
-0.05337926000356674,
-0.019250379875302315,
-0.03987578675150871,
-0.007738934829831123,
0.015759926289319992,
-0.06857506930828094,
0.017337681725621223,
-0.024380289018154144,
-0.009863175451755524,
0.04385983943939209,
-0.1046430915594101,
0.021736005321145058,
-0.09244413673877716,
0.016703054308891296,
-0.01795468106865883,
0.01974397897720337,
0.0515458881855011,
0.051863204687833786,
0.02277609147131443,
-0.004250684753060341,
-0.005442815832793713,
0.034657735377550125,
0.02020232193171978,
-0.035662561655044556,
-0.0662481039762497,
-0.03405836597084999,
0.011978602036833763,
-0.04209698364138603,
0.0014852056046947837,
0.034340422600507736,
0.06473204493522644,
0.03474587947130203,
-0.011026659980416298,
-0.0003941634204238653,
0.03984053060412407,
0.043260470032691956,
0.0700911283493042,
0.00691920705139637,
0.00744806369766593,
0.015592454932630062,
-0.04710349440574646,
0.0025142724625766277,
-0.047385551035404205,
-0.023957204073667526,
-0.0057777585461735725,
-0.003860653145238757,
0.0027214079163968563,
-0.022582177072763443,
-0.038782816380262375,
-0.02200043387711048,
0.07622586190700531,
-0.030303483828902245,
-0.003926760051399469,
0.005905565340071917,
0.0035058786161243916,
-0.029880397021770477,
-0.022599805146455765,
0.021736005321145058,
0.055741485208272934,
-0.05905565246939659,
0.02334020473062992,
-0.01953243650496006,
0.030973367393016815,
0.012022673152387142,
0.0026244509499520063,
0.05288565903902054,
-0.014376085251569748,
0.024062974378466606,
-0.016094869002699852,
0.036455847322940826,
0.02767682820558548,
-0.06346279382705688,
0.003673349739983678,
0.012921729125082493,
0.017152583226561546,
-0.04054567217826843,
0.09984812885522842,
-0.04153287038207054,
0.013098015449941158,
0.0023842619266361,
-0.023375460878014565,
0.013327185995876789,
-0.014455413445830345,
-0.016368111595511436,
-0.04033413156867027,
-0.04297841340303421,
0.07460403442382812,
-0.010709346272051334,
-0.03605039045214653,
-0.030056683346629143,
0.038112930953502655,
0.0006869626813568175,
-0.0432957261800766,
0.0035389321856200695,
0.04865480586886406,
-0.005984893999993801,
0.03460485115647316,
0.04544641077518463,
-0.010585946030914783,
0.02066066488623619,
0.024397917091846466,
-0.012542715296149254,
-0.025596659630537033,
0.023798547685146332,
0.03624430671334267,
-0.06427370756864548,
0.03233076632022858,
-0.003924556542187929,
0.041356585919857025,
0.05225103348493576,
-0.00006472984387073666,
0.024644717574119568,
0.004479856230318546,
0.02847011387348175,
0.0602896511554718,
-0.03502793610095978,
-0.020484378561377525,
0.010533060878515244,
0.004393917042762041,
0.054436974227428436,
0.02041386440396309,
0.02007892169058323,
-0.07136038690805435,
0.01395300030708313,
-0.0216478630900383,
0.006690036039799452,
0.009484161622822285,
-0.033547136932611465,
-0.02041386440396309,
0.027306629344820976,
-0.014270314015448093,
0.001822351710870862,
0.0011359398486092687,
-0.0328419953584671,
0.04812594875693321,
-0.03257756680250168,
0.002116528106853366,
-0.009299062192440033,
0.0031511038541793823,
-0.011396859772503376,
-0.019109351560473442,
0.008902419358491898,
-0.010409660637378693,
0.005799794103950262,
-0.04745606705546379,
-0.06060696765780449,
0.04340149834752083,
-0.01564534194767475,
-0.006632743403315544,
0.03229551017284393,
-0.004825816489756107,
0.04107452929019928,
0.034992679953575134,
-0.01761973835527897,
0.05041766166687012,
-0.02522645890712738,
0.004248481243848801,
-0.031167281791567802,
-0.017170211300253868,
-0.060219138860702515,
0.08750814199447632,
-0.08229008316993713,
-0.035010308027267456,
-0.009748590178787708,
-0.0007266269531100988,
-0.04273161292076111,
-0.04622206836938858,
-0.018157409504055977,
-0.07763614505529404,
-0.04227327182888985,
-0.020713550969958305,
-0.005385523196309805,
0.0520394891500473,
-0.005491294432431459,
-0.023075776174664497,
-0.0682930126786232,
0.020801693201065063,
0.015380912460386753,
-0.013424143195152283,
-0.04900737851858139,
-0.01594502665102482,
-0.0419912151992321,
-0.019937893375754356,
0.018263181671500206,
0.018598124384880066,
-0.032877251505851746,
-0.019814493134617805,
0.01798993907868862,
0.010559502989053726,
-0.020360978320240974,
-0.03233076632022858,
-0.047068238258361816,
0.041039273142814636,
0.058773595839738846,
0.012674929574131966,
0.06014862284064293,
-0.020237579941749573,
0.01921512372791767,
0.00031208049040287733,
0.007857928052544594,
0.04586949571967125,
-0.017778396606445312,
0.03467536345124245,
-0.01183757372200489,
0.02577294409275055,
-0.019620580598711967,
-0.03638533502817154,
0.06236981973052025,
0.04467075318098068,
-0.021171892061829567,
-0.04565795138478279,
-0.051968976855278015,
0.038782816380262375,
-0.06085376441478729,
-0.0018179445760324597,
-0.016156569123268127,
-0.017707882449030876,
0.0007938357884995639,
0.02788837067782879,
0.012622044421732426,
-0.009995389729738235,
0.019796865060925484,
0.05292091518640518,
0.047279778867959976,
-0.03227788209915161,
0.08771967887878418,
0.03157274052500725,
-0.03291250765323639,
-0.035010308027267456,
0.008615955710411072,
0.023163918405771255,
0.033987849950790405,
-0.049712520092725754,
0.005892343819141388,
-0.001737514277920127,
0.017998753115534782,
0.035997506231069565,
-0.06892764568328857,
0.049853548407554626,
0.011229388415813446,
0.0006511546671390533,
0.0009712231112644076,
0.017505154013633728,
0.08102083206176758,
0.03462247923016548,
-0.015980282798409462,
0.013327185995876789,
-0.05768062546849251,
-0.011343973688781261,
0.009695704095065594,
-0.05288565903902054,
0.0191974937915802,
0.0435425266623497,
0.014217427931725979,
0.06991484016180038,
0.031978197395801544,
-0.01754041016101837,
0.050629206001758575,
0.07869385927915573,
0.025067802518606186,
0.030973367393016815,
0.04745606705546379,
0.013565171509981155,
-0.04802018031477928,
-0.0010830542305484414,
-0.011352788656949997,
-0.010744603350758553,
-0.05581200122833252,
-0.008426448330283165,
-0.0654371902346611,
0.008607140742242336,
0.015521940775215626,
0.045940011739730835,
0.03418176621198654,
0.03303590789437294,
0.010154047049582005,
0.021013235673308372,
0.10259818285703659,
-0.013371258042752743,
-0.02252929098904133,
-0.07587329298257828,
-0.028522999957203865,
0.015495498664677143,
-0.02041386440396309,
-0.01048898883163929,
-0.050170861184597015,
-0.027659200131893158,
-0.05521262809634209,
0.02252929098904133,
-0.03416413813829422,
-0.014763913117349148,
0.001489612739533186,
0.03368816524744034,
0.06920970231294632,
-0.038677044212818146,
-0.0015171574195846915,
0.020149435847997665,
-0.005187201779335737,
-0.052638858556747437,
0.06349804997444153,
0.03652636334300041,
0.030091941356658936,
0.12861792743206024,
-0.035680193454027176,
-0.031749024987220764,
-0.027941256761550903,
-0.017002739012241364,
-0.006046593654900789,
0.0031555111054331064,
-0.00920210499316454,
-0.0654371902346611,
-0.010920888744294643,
-0.015900954604148865,
-0.005050580482929945,
-0.10436103492975235,
0.0011734005529433489,
0.033441364765167236,
-0.04294315725564957,
-0.036878932267427444,
-0.016650168225169182,
0.03474587947130203,
-0.07946951687335968,
-0.030497396364808083,
-0.03885333240032196,
0.01100021693855524,
-0.045798979699611664,
0.006954464130103588,
-0.018792036920785904,
-0.007677235174924135,
0.010303889401257038,
0.0007001840858720243,
-0.0045657954178750515,
-0.03139645233750343,
-0.029845140874385834,
-0.035221848636865616,
-0.0026420794893056154,
-0.014922570437192917,
-0.025808202102780342,
-0.028047028928995132,
0.0018322677351534367,
-0.02432740293443203,
-0.002185940509662032,
-0.051052290946245193,
0.028047028928995132,
0.025631915777921677,
0.050382405519485474,
-0.004133895970880985,
-0.04925417900085449,
0.005085837561637163,
-0.0030541468877345324,
-0.000554473081137985,
-0.02210620604455471,
-0.008007770404219627,
0.023287318646907806,
0.06684747338294983,
-0.009457718580961227,
0.03213685378432274,
0.006601893343031406,
0.03340610861778259,
0.008492555469274521,
0.016905782744288445,
-0.04206172749400139,
-0.02855825610458851,
-0.005182794760912657,
-0.022176720201969147,
-0.07594380527734756,
0.04065144434571266,
0.004490873776376247,
0.022740833461284637,
0.0014290146064013243,
-0.027271371334791183,
0.02690117247402668,
-0.06839878857135773,
0.047279778867959976,
0.012375244870781898,
0.06381536275148392,
0.03783087432384491,
0.029210513457655907,
0.04505858197808266,
-0.03294776752591133,
0.01932089403271675,
-0.03471061959862709,
0.01873915269970894,
0.0649435892701149,
0.013908928260207176,
0.024151118472218513,
-0.01395300030708313,
-0.029404425993561745,
0.018104523420333862,
-0.007192449644207954,
0.07347580790519714,
0.018598124384880066,
-0.03180190920829773,
-0.010145232081413269,
0.03737253323197365,
-0.019232751801609993,
-0.08123237639665604,
0.01852761022746563,
-0.02892845682799816,
0.032313138246536255,
-0.0017132749781012535,
0.009581118822097778,
0.0120491161942482,
-0.07460403442382812,
0.021965177729725838,
-0.02857588417828083,
0.0370904766023159,
-0.05348503217101097,
0.004856666550040245,
0.004997694864869118,
-0.008959712460637093,
-0.043366242200136185,
0.05277988687157631,
-0.009228548035025597,
-0.0216478630900383,
0.02892845682799816,
0.032542310655117035,
-0.02233537659049034,
0.03104388155043125,
0.03305353596806526,
-0.04488229751586914,
0.03162562474608421,
0.02300526201725006,
-0.03550390526652336,
0.04322521388530731,
-0.041462358087301254,
-0.034763507544994354,
-0.016773568466305733,
-0.0062669506296515465,
0.03213685378432274,
0.05679919943213463,
-0.0035565607249736786,
-0.017364125698804855,
0.009360761381685734,
0.014305571094155312,
-0.045270126312971115,
-0.014878499321639538,
0.08736710995435715,
-0.002021774649620056,
-0.004728859290480614,
0.02958071231842041,
0.05595302954316139,
-0.008029806427657604,
0.01573348417878151,
0.023498861119151115,
-0.0063506863079965115,
0.007152785547077656,
-0.015821626409888268,
0.04142710193991661,
0.001622928655706346,
-0.02041386440396309,
-0.010312703438103199,
0.019937893375754356,
0.04051041603088379,
0.08616837114095688,
0.047138750553131104,
-0.02711271494626999,
0.053414516150951385
]
|
41,385 | pyglove.core.symbolic.base | seal | Alias for `sym_seal`. | def seal(self, sealed: bool = True) -> 'Symbolic':
"""Alias for `sym_seal`."""
return self.sym_seal(sealed)
| (self, sealed: bool = True) -> pyglove.core.symbolic.base.Symbolic | [
0.03184380382299423,
-0.07809033989906311,
0.09165375679731369,
0.02037869207561016,
-0.00018884702876675874,
-0.04904986545443535,
-0.01920364424586296,
-0.048445556312799454,
-0.019640089944005013,
0.03488214313983917,
-0.03511715307831764,
0.00798193458467722,
-0.0014320899499580264,
0.052407145500183105,
-0.05868526175618172,
-0.018700052052736282,
-0.009425564669072628,
0.026421796530485153,
-0.03162558004260063,
0.03261597827076912,
0.02857045643031597,
0.029359417036175728,
0.031021270900964737,
-0.020210828632116318,
-0.026153214275836945,
0.03823942318558693,
0.04411466419696808,
0.025632835924625397,
-0.004081193823367357,
-0.06808564811944962,
-0.012891956605017185,
0.021503381431102753,
0.01602262072265148,
0.032229892909526825,
0.059222426265478134,
-0.006895014550536871,
-0.05915528163313866,
0.054992254823446274,
0.01807895489037037,
0.014872752130031586,
-0.016375135630369186,
0.03706437721848488,
0.07292012870311737,
-0.024474574252963066,
-0.006546696648001671,
0.01054186001420021,
0.033388152718544006,
0.02606928162276745,
0.01536795124411583,
-0.010214525274932384,
0.02575034089386463,
0.009148589335381985,
0.025213176384568214,
-0.025666408240795135,
0.0229805838316679,
0.009803258813917637,
0.04048880189657211,
0.010147379711270332,
0.013521446846425533,
-0.022090904414653778,
0.019875099882483482,
-0.055965863168239594,
0.010264884680509567,
-0.011909952387213707,
-0.0178439449518919,
-0.01757536269724369,
-0.05482438951730728,
-0.004998151212930679,
0.03451284393668175,
0.04075738415122032,
0.0010035120649263263,
-0.04314105212688446,
-0.05411935970187187,
0.008829647675156593,
-0.007553881034255028,
-0.060867492109537125,
-0.020345119759440422,
-0.03968305513262749,
-0.017038198187947273,
-0.050795651972293854,
0.009165375493466854,
-0.07520308345556259,
-0.036460064351558685,
0.06358689069747925,
-0.04011949896812439,
0.043275345116853714,
0.061773959547281265,
-0.03140735998749733,
-0.02721075713634491,
0.020496197044849396,
0.015216873027384281,
0.05626801773905754,
-0.012556228786706924,
0.03830656781792641,
0.027378622442483902,
-0.0019126007100567222,
-0.010508287698030472,
-0.039548762142658234,
0.045793306082487106,
-0.0380379855632782,
0.0060850707814097404,
0.021218013018369675,
-0.03773583099246025,
0.007616830058395863,
-0.014981864020228386,
0.030903765931725502,
0.039548762142658234,
0.022644856944680214,
0.02977907657623291,
-0.015317591838538647,
-0.021973399445414543,
0.0393473245203495,
-0.017222847789525986,
-0.00926609430462122,
-0.07936611026525497,
0.00913180224597454,
0.0036909100599586964,
-0.010508287698030472,
-0.009240914136171341,
0.01757536269724369,
-0.042066723108291626,
0.04226816073060036,
-0.003883953671902418,
0.01602262072265148,
0.07379302382469177,
0.029963728040456772,
-0.012606588192284107,
-0.00544299092143774,
0.07473306357860565,
0.058013804256916046,
-0.005367451813071966,
0.07466591894626617,
0.01102866604924202,
0.05532798171043396,
-0.03874301537871361,
0.004427413456141949,
0.06281471997499466,
0.050258487462997437,
-0.028503309935331345,
0.04223458841443062,
0.01712213084101677,
0.01557778101414442,
-0.016929086297750473,
0.009912370704114437,
-0.024743156507611275,
0.036661501973867416,
-0.023517748340964317,
-0.0034013446420431137,
-0.011037059128284454,
0.04847912862896919,
0.06445978581905365,
-0.033690307289361954,
0.01006344798952341,
0.09272808581590652,
-0.0037286796141415834,
0.044920410960912704,
-0.012379971332848072,
0.034109968692064285,
-0.009920763783156872,
0.0031705317087471485,
-0.024508146569132805,
0.02742898091673851,
-0.014981864020228386,
-0.048411983996629715,
-0.03703080117702484,
-0.036493636667728424,
-0.017911091446876526,
-0.02133551612496376,
0.024205991998314857,
-0.012866777367889881,
-0.031793445348739624,
-0.017709653824567795,
-0.07963468879461288,
0.03686293959617615,
0.019975818693637848,
0.045390430837869644,
0.035755034536123276,
0.03474785387516022,
0.006072480697184801,
-0.03709794953465462,
0.024978166446089745,
-0.03046732023358345,
-0.08675212413072586,
0.029644785448908806,
0.06375475227832794,
0.022913439199328423,
-0.016375135630369186,
0.008422576822340488,
0.016517819836735725,
-0.030903765931725502,
-0.015602960251271725,
0.058013804256916046,
0.03548645228147507,
0.013907534070312977,
-0.04220101609826088,
-0.043241772800683975,
-0.04391322657465935,
-0.004910022486001253,
-0.07809033989906311,
0.0027697563637048006,
-0.017894305288791656,
0.04458468407392502,
-0.032196320593357086,
0.014461485669016838,
0.026673592627048492,
-0.021654458716511726,
-0.03426104784011841,
-0.06956285238265991,
-0.03118913434445858,
0.0075832572765648365,
0.013714490458369255,
0.019522584974765778,
0.00826310645788908,
0.02836901880800724,
0.020915856584906578,
-0.05751021206378937,
0.03167594224214554,
0.03733295947313309,
0.014562203548848629,
0.01640031486749649,
0.004695996176451445,
-0.043241772800683975,
0.009568248875439167,
0.01253104954957962,
-0.007390213664621115,
-0.03639291971921921,
0.024524932727217674,
-0.03071911633014679,
-0.030165163800120354,
-0.018565760925412178,
-0.025498544797301292,
-0.04263745993375778,
-0.0027005125302821398,
-0.030131591483950615,
-0.016929086297750473,
0.022376274690032005,
-0.00838900450617075,
-0.004649833310395479,
-0.015989048406481743,
0.03426104784011841,
0.024306710809469223,
-0.020983003079891205,
0.03676221892237663,
0.07110720127820969,
-0.016131732612848282,
0.09568249434232712,
0.04354392737150192,
0.05512654408812523,
-0.013983072713017464,
0.007486735470592976,
0.03518429771065712,
-0.06264685094356537,
-0.007088058162480593,
0.03402603790163994,
0.03145771846175194,
-0.04179814085364342,
-0.030819833278656006,
0.01136439386755228,
0.0180621687322855,
-0.007243332453072071,
0.002587204100564122,
0.027798281982541084,
-0.03548645228147507,
0.006294900551438332,
0.03921303525567055,
-0.00032130221370607615,
-0.011112597770988941,
-0.019119711592793465,
0.00655928673222661,
-0.032229892909526825,
-0.006240345072001219,
-0.03097091242671013,
-0.04804268106818199,
0.010760083794593811,
-0.009937549941241741,
0.03474785387516022,
0.03360637649893761,
0.03300206735730171,
0.019841527566313744,
-0.010097021237015724,
0.029644785448908806,
0.027261117473244667,
0.024508146569132805,
0.02630429156124592,
-0.030433746054768562,
0.03275027126073837,
-0.025599263608455658,
-0.052407145500183105,
0.004960381891578436,
-0.044416818767786026,
0.023349884897470474,
0.057577360421419144,
0.072248674929142,
0.009224127978086472,
0.14825750887393951,
0.023131661117076874,
-0.016912300139665604,
-0.06076677516102791,
0.05133281648159027,
-0.025699982419610023,
0.034076396375894547,
-0.014503451064229012,
0.048613421618938446,
0.0012023260351270437,
-0.01898542046546936,
-0.058282386511564255,
0.028956543654203415,
0.034328192472457886,
0.035016436129808426,
0.04763980954885483,
-0.01969045028090477,
0.031978096812963486,
-0.029392989352345467,
0.020529769361019135,
-0.02793257310986519,
-0.06523195654153824,
-0.017877517268061638,
-0.03093733824789524,
0.016912300139665604,
0.06976428627967834,
-0.0025788110215216875,
-0.03214595839381218,
-0.0431746244430542,
-0.051467109471559525,
-0.001417401828803122,
-0.05227285623550415,
0.004460986237972975,
-0.033874958753585815,
0.008686963468790054,
0.022594496607780457,
-0.04028736427426338,
-0.019371507689356804,
0.04246959835290909,
-0.016677290201187134,
-0.13032962381839752,
0.03170951455831528,
0.033438511192798615,
0.011087418533861637,
-0.03887730836868286,
-0.04267103224992752,
0.049822039902210236,
-0.0031537453178316355,
-0.005594068672508001,
-0.026891816407442093,
-0.06513123959302902,
0.01994224637746811,
-0.042335305362939835,
-0.02182232216000557,
0.04367821663618088,
0.035016436129808426,
-0.015552601777017117,
0.02113408036530018,
-0.010995093733072281,
0.027999717742204666,
0.02130194380879402,
-0.02083192579448223,
-0.013177325949072838,
0.04008592665195465,
-0.0450882762670517,
-0.08520777523517609,
-0.010071841068565845,
-0.005690590478479862,
-0.05717448517680168,
0.02299736998975277,
-0.002259869361296296,
-0.00877928826957941,
-0.02059691585600376,
-0.02974550426006317,
0.04434967413544655,
-0.02622036077082157,
-0.0023312114644795656,
-0.04102596640586853,
-0.044215381145477295,
-0.004293122328817844,
0.02909083478152752,
0.07043574005365372,
0.015519028529524803,
0.0029124408029019833,
0.029946941882371902,
0.011171350255608559,
0.03170951455831528,
-0.0013355681439861655,
0.045558296144008636,
0.04716978967189789,
0.05670446529984474,
0.028738319873809814,
-0.02766399085521698,
-0.02793257310986519,
0.059390291571617126,
0.050728507339954376,
0.012094602920114994,
-0.006341063417494297,
0.0685892403125763,
0.024743156507611275,
0.018381109461188316,
0.007637812756001949,
-0.008355431258678436,
-0.02766399085521698,
-0.005115656182169914,
0.04827769100666046,
0.021906254813075066,
0.016719255596399307,
0.04475254938006401,
-0.07500164210796356,
-0.03582218289375305,
-0.01760893501341343,
0.0713757798075676,
-0.023131661117076874,
-0.003879757132381201,
-0.02462565153837204,
0.023752758279442787,
-0.00610185693949461,
-0.08440203219652176,
-0.055462270975112915,
0.05791308730840683,
-0.03723223879933357,
0.06889139115810394,
0.053313612937927246,
0.06378832459449768,
-0.0365607850253582,
0.046766914427280426,
-0.020529769361019135,
-0.024944594129920006,
0.03860872611403465,
-0.00002139282696589362,
0.01898542046546936,
-0.03860872611403465,
0.025901418179273605,
-0.008762502111494541,
-0.0068572452291846275,
0.027781495824456215,
-0.03162558004260063,
0.04109311103820801,
-0.02930905856192112,
-0.009627001360058784,
-0.05244072154164314,
0.000447987113147974,
-0.05861811712384224,
-0.0380379855632782,
0.01777680031955242,
0.06419119983911514,
-0.013043034821748734,
-0.04565901309251785,
0.05435436964035034,
0.07157722115516663,
-0.019875099882483482,
0.04696835204958916,
0.06539982557296753,
0.020546555519104004,
-0.010844015516340733,
0.039045169949531555,
-0.054018642753362656,
-0.02575034089386463,
0.013303223997354507,
-0.05724162980914116,
0.001316683366894722,
0.06187467649579048,
-0.04915058612823486,
-0.050997089594602585,
0.02083192579448223,
-0.00826310645788908,
-0.015401523560285568,
0.008745715022087097,
0.059625301510095596,
-0.025918204337358475,
-0.034344978630542755,
-0.027580058202147484,
0.0026081872638314962,
0.007877019234001637,
-0.022829506546258926,
-0.001601003110408783,
-0.03914589062333107,
-0.003155843587592244,
-0.020496197044849396,
0.0058038984425365925,
-0.00867017637938261,
-0.003925919998437166,
-0.05465652421116829,
-0.09440672397613525,
-0.029963728040456772,
-0.04250317066907883,
-0.01207781583070755,
-0.052675727754831314,
0.004385447595268488,
0.019354721531271935,
-0.017995022237300873,
0.038105133920907974,
0.00963539443910122,
0.0040518175810575485,
0.03382460027933121,
0.0015233659651130438,
0.058248814195394516,
-0.002116135787218809,
0.03914589062333107,
0.028503309935331345,
0.03723223879933357,
-0.0180621687322855,
-0.01559456717222929,
-0.02558247745037079,
-0.021906254813075066,
-0.02789900079369545,
-0.04196600615978241,
-0.04052237421274185,
-0.002564122900366783,
-0.0036951068323105574,
0.02227555587887764,
-0.059390291571617126,
-0.05250786617398262,
-0.006026318296790123,
0.005820685066282749,
0.04246959835290909,
0.022611282765865326,
-0.0023354082368314266,
0.010961520485579967,
0.02276236191391945,
0.02746255323290825,
0.0306855421513319,
-0.02862081490457058,
0.01159940380603075,
-0.03615790978074074,
0.021285157650709152,
-0.03676221892237663,
-0.029124407097697258,
-0.039750199764966965,
-0.014696494676172733,
-0.031961310654878616,
0.00545977707952261,
-0.02952728047966957,
0.022594496607780457,
0.008174978196620941,
-0.0013649442698806524,
-0.0169962327927351,
-0.09091515094041824,
0.02135230414569378,
-0.02764720469713211,
0.04364464432001114,
-0.06022961065173149,
0.01829717867076397,
-0.007520308252424002,
-0.05133281648159027,
-0.03275027126073837,
-0.01804538257420063,
-0.03239775449037552,
0.0350835807621479,
-0.0032943314872682095,
0.020445838570594788,
-0.06120322272181511,
-0.048143401741981506,
0.011070632375776768,
0.003867167280986905,
-0.08070901781320572,
-0.0005429352167993784,
0.028234727680683136,
-0.04330891743302345,
0.05227285623550415,
-0.039951637387275696,
0.051433537155389786,
0.004381251055747271,
-0.05630159378051758,
0.054052215069532394,
-0.03120592050254345,
0.006034711375832558,
0.04948631301522255,
-0.06533267349004745,
0.03639291971921921,
-0.04626332223415375,
0.06368760764598846,
0.022611282765865326,
0.028184369206428528,
0.003630059538409114,
-0.0168871209025383,
-0.011691728606820107,
0.028922971338033676,
0.012144961394369602,
-0.008989118039608002,
0.04458468407392502,
-0.0047925179824233055,
0.009593429043889046,
-0.04391322657465935,
-0.005111459642648697,
-0.010835622437298298,
0.00568219693377614,
-0.10575433075428009,
-0.01676122285425663,
-0.008661783300340176,
0.030584825202822685,
-0.02836901880800724,
0.03187737613916397,
-0.0880950391292572,
0.032951708883047104,
-0.03605719283223152,
-0.02108372002840042,
-0.016140125691890717,
-0.008603030815720558,
-0.04240244999527931,
-0.03286777436733246,
0.03491571545600891,
-0.0006121791084297001,
0.03619148209691048,
0.028436165302991867,
-0.041831713169813156,
0.013966286554932594,
-0.01875041052699089,
0.00533387903124094,
0.05774522200226784,
0.08406630158424377,
0.05348147824406624,
-0.006895014550536871,
-0.04965417832136154,
-0.04589402303099632,
-0.07412875443696976,
0.011087418533861637,
-0.02511245757341385,
-0.039750199764966965,
-0.002295540412887931,
0.04545757547020912,
0.0038566759321838617,
-0.009333239868283272,
-0.0557980015873909,
-0.016610145568847656,
-0.04471897333860397,
0.01619887724518776,
-0.06576912105083466,
-0.010373996570706367,
-0.0038629707414656878,
0.028973329812288284,
0.009106623008847237,
0.050795651972293854,
0.01925400272011757,
-0.07050289213657379,
-0.04458468407392502,
0.05328004062175751,
0.037198666483163834,
-0.014461485669016838,
0.06949570775032043,
0.03659435734152794,
0.00831766240298748,
0.05042635276913643,
0.04283889755606651,
0.04129454866051674,
-0.028788680210709572,
0.003229284193366766,
-0.0007323067984543741,
0.003562913741916418,
-0.04569258540868759,
0.0044777728617191315,
-0.019371507689356804,
0.017961449921131134,
-0.013756456784904003,
-0.021033361554145813,
-0.032699912786483765,
0.0218055360019207,
-0.025213176384568214,
-0.028671175241470337,
0.0801718533039093,
-0.018330750986933708,
0.018397897481918335,
-0.03662792965769768,
0.04337606206536293,
-0.03046732023358345,
-0.02697574719786644,
-0.023517748340964317,
-0.050057049840688705,
0.07271869480609894,
0.03642649203538895,
-0.0025955974124372005,
-0.043040335178375244,
-0.024205991998314857,
0.05089637264609337,
-0.009333239868283272,
0.01172530185431242,
-0.024558506906032562,
-0.017760014161467552,
-0.012875170446932316,
-0.013697704300284386,
0.005879437085241079,
0.008531688712537289,
0.023987768217921257,
0.045121848583221436,
-0.014369159936904907,
-0.06335188448429108,
-0.01643388718366623,
0.005787112284451723,
-0.06983143091201782,
-0.013160538859665394,
0.01546866912394762,
-0.024239564314484596,
0.02012689597904682,
-0.03797084093093872,
-0.10038268566131592,
-0.018146101385354996,
-0.08178335428237915,
-0.004125258419662714,
0.020932642742991447,
-0.020445838570594788,
0.004448396619409323,
0.0008812861051410437,
0.0026144820731133223,
0.015989048406481743,
-0.022594496607780457,
0.03382460027933121,
0.036460064351558685,
0.04220101609826088,
-0.021453021094202995,
0.012757665477693081,
0.028788680210709572,
0.039011597633361816,
-0.05717448517680168,
0.02296379767358303,
-0.02086549811065197,
0.011339214630424976,
0.03968305513262749,
0.025901418179273605,
0.006500534247606993,
0.04834483936429024,
-0.04354392737150192,
-0.014327194541692734,
-0.01922043040394783,
-0.04693477973341942,
0.013185719028115273,
-0.033438511192798615,
-0.033388152718544006,
0.025716768577694893,
-0.019572945311665535,
-0.006781706586480141,
-0.0011026568245142698,
0.004207091871649027,
0.055193688720464706,
0.07070432603359222,
0.023568108677864075,
0.0018769295420497656,
0.006185789126902819,
-0.06583626568317413,
0.049352023750543594,
0.010147379711270332,
0.007885412313044071,
-0.03347208723425865,
0.05552941933274269,
-0.017021412029862404,
0.04196600615978241,
0.03275027126073837,
0.04011949896812439,
-0.022174837067723274,
-0.042066723108291626,
0.014822392724454403,
0.02768077701330185,
-0.06422477215528488,
0.029611213132739067,
-0.0016870334511622787,
0.0002761887735687196,
-0.018599333241581917,
0.05364933982491493,
0.03264955058693886,
0.01079365611076355,
0.01242193765938282,
-0.027982931584119797,
0.0032901347149163485,
0.006899211090058088,
-0.0044777728617191315,
0.00972772017121315,
-0.027042893692851067,
0.008347038179636002,
0.025968564674258232,
0.026371438056230545,
0.01326125767081976,
-0.0003543504572007805,
-0.02155373990535736,
0.008552671410143375
]
|
41,388 | pyglove.core.symbolic.base | sym_attr_field | Returns the field definition for a symbolic attribute. | @abc.abstractmethod
def sym_attr_field(self, key: Union[str, int]) -> Optional[pg_typing.Field]:
"""Returns the field definition for a symbolic attribute."""
| (self, key: Union[str, int]) -> Optional[pyglove.core.typing.class_schema.Field] | [
0.046501994132995605,
-0.03520410135388374,
0.031148899346590042,
0.07968734949827194,
0.00627759238705039,
-0.029165569692850113,
0.04352699965238571,
-0.06707903742790222,
-0.019054129719734192,
-0.042570751160383224,
0.022277040407061577,
0.02208225056529045,
0.07001861929893494,
0.044518664479255676,
0.0019268844043835998,
0.01810673624277115,
-0.013635390438139439,
0.06406863033771515,
-0.030298901721835136,
0.003036973299458623,
0.013927577994763851,
0.041897837072610855,
0.005414312705397606,
-0.029625985771417618,
0.01618538610637188,
0.08726650476455688,
0.02250724844634533,
0.014370284974575043,
0.02339266426861286,
-0.024667661637067795,
-0.005334625486284494,
-0.0349561832845211,
0.04862699285149574,
0.05592280998826027,
-0.009978626854717731,
-0.04193325340747833,
-0.0009556948207318783,
0.0568082258105278,
-0.08464567363262177,
-0.030068693682551384,
0.0218520425260067,
0.0027248645201325417,
0.033752020448446274,
-0.07706651836633682,
-0.03803742676973343,
-0.02238329127430916,
0.029519734904170036,
-0.04090617224574089,
-0.04087075591087341,
-0.02918327786028385,
0.02303849719464779,
0.0008798811468295753,
0.007725245784968138,
-0.014494243077933788,
0.032158274203538895,
-0.02365828864276409,
-0.034903060644865036,
0.010642687790095806,
-0.024260370060801506,
0.053337398916482925,
-0.044129084795713425,
-0.003278248943388462,
-0.00083893071860075,
-0.06144779920578003,
0.0057153538800776005,
-0.03423014283180237,
-0.045864496380090714,
-0.01000518910586834,
0.00033092385274358094,
-0.0002847162541002035,
-0.04788324236869812,
-0.023481205105781555,
-0.005139833781868219,
0.05737489089369774,
0.04249991849064827,
-0.04961865767836571,
-0.002811192534863949,
-0.030617650598287582,
0.05723322555422783,
-0.06020822003483772,
-0.021781207993626595,
-0.008619515225291252,
-0.048201993107795715,
0.013697369955480099,
-0.026898907497525215,
0.004732543136924505,
0.020470794290304184,
0.004564314149320126,
0.011289041489362717,
-0.02682807482779026,
-0.044943664222955704,
-0.01590205356478691,
-0.031503066420555115,
0.0967581495642662,
-0.000614810036495328,
-0.0147864306345582,
0.023729121312499046,
-0.01255518477410078,
-0.007875766605138779,
0.009518210776150227,
0.017008822411298752,
0.003103379625827074,
0.001568291336297989,
0.01986871287226677,
-0.013042163103818893,
-0.05957071855664253,
-0.05121240392327309,
-0.022135375067591667,
-0.016273926943540573,
-0.023888496682047844,
-0.05879155546426773,
-0.004340746905654669,
0.0004938955535180867,
0.012679142877459526,
-0.014157786034047604,
0.013458307832479477,
0.014131222851574421,
-0.03775409609079361,
0.047139495611190796,
-0.0166989266872406,
0.008340609259903431,
0.007937745191156864,
-0.037045761942863464,
-0.00914633646607399,
0.07062070071697235,
0.0326186865568161,
0.011776018887758255,
-0.0005716460291296244,
-0.016052573919296265,
0.021002043038606644,
0.002656244905665517,
0.03470826894044876,
0.013927577994763851,
0.07193111628293991,
0.03180410712957382,
0.021285375580191612,
0.07402069121599197,
0.044518664479255676,
-0.03906450793147087,
0.0189655888825655,
-0.001123923691920936,
0.01532653346657753,
0.048201993107795715,
-0.039029091596603394,
-0.0429249182343483,
0.013369766063988209,
-0.03867492824792862,
-0.009571336209774017,
-0.03327389433979988,
0.012891641817986965,
-0.018239548429846764,
-0.002068550791591406,
0.006857539061456919,
0.005409885663539171,
0.005542697850614786,
0.028439529240131378,
-0.038604091852903366,
-0.006445820908993483,
-0.0009341128170490265,
-0.03148535639047623,
-0.03208743780851364,
-0.03153848275542259,
-0.032671812921762466,
-0.09045399725437164,
0.015158304944634438,
0.03148535639047623,
-0.016619239002466202,
-0.07154153287410736,
0.019673921167850494,
0.030422858893871307,
-0.039029091596603394,
-0.05107073485851288,
0.008305192925035954,
0.018452048301696777,
-0.02181662619113922,
0.0502561554312706,
0.014874971471726894,
0.01367966178804636,
0.025305161252617836,
0.01032393891364336,
0.08868316560983658,
-0.01539736706763506,
-0.04731657728552818,
0.026367658749222755,
0.0667957067489624,
0.025216618552803993,
-0.01829267293214798,
0.028581196442246437,
0.04632491245865822,
0.03251243755221367,
-0.010040606372058392,
-0.006069519557058811,
-0.02039996162056923,
-0.06406863033771515,
-0.011616644449532032,
-0.07713735103607178,
0.045829080045223236,
0.03314993530511856,
-0.024118704721331596,
0.06838945299386978,
0.03578847274184227,
-0.009695294313132763,
-0.024685369804501534,
0.09144566208124161,
-0.01854058913886547,
-0.0024282506201416254,
0.021621834486722946,
-0.03550514206290245,
-0.07904984802007675,
-0.029289526864886284,
0.022719748318195343,
-0.011094249784946442,
-0.0030834577046334743,
0.01230726856738329,
0.024171829223632812,
-0.0483790747821331,
-0.025411410257220268,
0.025588493794202805,
-0.01479528471827507,
0.03920617699623108,
0.08549567312002182,
-0.0002250890975119546,
0.03771867975592613,
-0.02631453424692154,
0.07841235399246216,
-0.04883949086070061,
0.00447134580463171,
-0.013741640374064445,
-0.032583270221948624,
-0.032583270221948624,
-0.001164320739917457,
-0.011935394257307053,
-0.008057276718318462,
0.0059057180769741535,
0.050185322761535645,
-0.003003770252689719,
0.014936950989067554,
-0.008216651156544685,
0.0038869718555361032,
-0.007995297200977802,
-0.03304368630051613,
0.07472902536392212,
-0.02590724267065525,
0.08499983698129654,
-0.047812409698963165,
-0.0383915938436985,
0.013927577994763851,
0.06155404821038246,
-0.03160931542515755,
-0.033096812665462494,
-0.021409334614872932,
-0.06307696551084518,
0.008845295757055283,
0.018593715503811836,
0.047281160950660706,
-0.008482275530695915,
-0.08847066760063171,
-0.016096845269203186,
0.039524924010038376,
-0.018841631710529327,
-0.01761975884437561,
-0.004586449824273586,
-0.024295786395668983,
-0.022064542397856712,
0.052026983350515366,
-0.029395777732133865,
0.018452048301696777,
0.015184867195785046,
-0.036904096603393555,
0.018717672675848007,
-0.0019224572461098433,
0.004278767853975296,
-0.01577809453010559,
-0.016256218776106834,
-0.016335906460881233,
-0.03364576771855354,
0.018452048301696777,
0.014919242821633816,
0.018345799297094345,
-0.06753945350646973,
-0.02590724267065525,
-0.03701034560799599,
-0.0018538376316428185,
0.047954075038433075,
-0.02132079377770424,
0.05489572882652283,
-0.03392910212278366,
-0.006330717355012894,
-0.01618538610637188,
-0.006844257935881615,
0.06343112885951996,
0.03028119169175625,
-0.0021028604824095964,
0.04193325340747833,
0.06704362481832504,
0.02208225056529045,
0.03118431568145752,
0.03789576143026352,
0.037824928760528564,
-0.03221139684319496,
0.013059871271252632,
0.04274783656001091,
0.005511708091944456,
0.025322869420051575,
-0.03786034509539604,
0.007335663307458162,
-0.0032229104544967413,
0.021922875195741653,
-0.012077060528099537,
0.0255176592618227,
-0.05050406977534294,
0.09406648576259613,
-0.07281652837991714,
0.08244984596967697,
0.012935913167893887,
0.0014720023609697819,
-0.050079070031642914,
0.0426061674952507,
0.020718710497021675,
0.09002899378538132,
-0.012865079566836357,
0.005781759973615408,
-0.03550514206290245,
-0.025942659005522728,
-0.042429085820913315,
-0.015955178067088127,
-0.025818701833486557,
-0.06105821579694748,
0.015707261860370636,
0.03973742574453354,
-0.01598174124956131,
0.055851977318525314,
0.021550999954342842,
0.008929410018026829,
-0.11935394257307053,
0.011687478050589561,
0.018345799297094345,
-0.05092906951904297,
-0.01420205645263195,
-0.02089579403400421,
0.008588525466620922,
-0.04997282102704048,
0.0195853803306818,
-0.015477053821086884,
0.007424204610288143,
-0.043491583317518234,
0.0028532498981803656,
-0.009429669938981533,
0.08308733999729156,
0.014981221407651901,
0.047422826290130615,
-0.06569778919219971,
0.0027182239573448896,
-0.007618995849043131,
0.031786397099494934,
0.0024282506201416254,
-0.04646657779812813,
0.04710407555103302,
-0.024968702346086502,
0.03144994005560875,
0.06573320925235748,
-0.03754159435629845,
-0.018097883090376854,
0.004400512669235468,
-0.0020962199196219444,
0.008978107944130898,
-0.04239366948604584,
0.023888496682047844,
0.06909778714179993,
0.0017343065701425076,
-0.005560406018048525,
-0.024632245302200317,
-0.02500411868095398,
-0.04065825790166855,
-0.018983297049999237,
0.03665618225932121,
0.01933746412396431,
0.021072877570986748,
-0.05854363739490509,
-0.037577010691165924,
-0.004099471494555473,
-0.044412415474653244,
-0.013830182142555714,
0.07437486201524734,
-0.019815586507320404,
-0.029094737023115158,
0.013520286418497562,
-0.006189050618559122,
0.011085395701229572,
0.030068693682551384,
-0.0351155586540699,
-0.015273408964276314,
-0.036762431263923645,
-0.022170791402459145,
0.0025986928958445787,
-0.038497842848300934,
-0.019939545542001724,
-0.04876865819096565,
-0.043349917978048325,
0.00559582281857729,
0.01702653057873249,
-0.06027905270457268,
-0.0016214161878451705,
0.0022865841165184975,
-0.006193477660417557,
0.04618324711918831,
0.03430097550153732,
0.0035792901180684566,
-0.03118431568145752,
-0.002972780726850033,
0.0316801480948925,
0.04894573986530304,
-0.03945409134030342,
-0.03410618379712105,
0.04143742099404335,
-0.027270780876278877,
0.08032485097646713,
-0.016158822923898697,
0.0038094979245215654,
0.029891610145568848,
0.02211766690015793,
-0.004878636449575424,
-0.041897837072610855,
0.048343658447265625,
-0.03603639081120491,
0.05209781602025032,
0.018859339877963066,
0.07940401881933212,
-0.013219245709478855,
0.08620399981737137,
0.0028886664658784866,
0.03603639081120491,
0.006454675458371639,
-0.0005699858884327114,
0.008128109388053417,
-0.03669159859418869,
-0.004356241784989834,
-0.044412415474653244,
-0.013927577994763851,
-0.0035217381082475185,
0.01591976173222065,
-0.0030281192157417536,
-0.0006983710918575525,
0.012935913167893887,
0.05131865292787552,
-0.02803223766386509,
-0.00013135961489751935,
0.08995816111564636,
0.04012700542807579,
-0.030582234263420105,
0.022949956357479095,
0.03446035087108612,
0.07037278264760971,
0.005533843766897917,
0.014078098349273205,
-0.03329160436987877,
-0.005356760695576668,
-0.0710102841258049,
0.01479528471827507,
0.009181753732264042,
-0.003074603620916605,
0.07423318922519684,
-0.024384329095482826,
-0.055710311979055405,
-0.01165206078439951,
0.03789576143026352,
-0.0023419226054102182,
-0.034672852605581284,
-0.014936950989067554,
0.004635147284716368,
0.037966594099998474,
-0.024809328839182854,
0.011891122907400131,
-0.032583270221948624,
-0.009438524022698402,
0.016096845269203186,
0.001932418206706643,
-0.008159099146723747,
-0.0618019662797451,
-0.10334564000368118,
0.029767651110887527,
0.0013834609417244792,
-0.04667907953262329,
-0.010802063159644604,
0.059251971542835236,
0.02050621062517166,
-0.012634871527552605,
0.012209872715175152,
-0.04628949612379074,
0.0028089790139347315,
-0.050999902188777924,
0.08237901329994202,
0.039524924010038376,
0.02526974305510521,
0.06456445902585983,
-0.014024973846971989,
0.021072877570986748,
0.025871826335787773,
-0.0218520425260067,
-0.0035770765971392393,
-0.022011416032910347,
-0.05617072805762291,
-0.01985100470483303,
0.0005257151206023991,
0.016663510352373123,
-0.027678072452545166,
-0.03630201518535614,
0.006587487645447254,
0.033220771700143814,
0.0038183522410690784,
0.02983848564326763,
-0.006313008721917868,
0.04384575039148331,
-0.004263272974640131,
0.030883274972438812,
-0.0038338468875736,
0.015707261860370636,
-0.038462426513433456,
-0.015618720091879368,
-0.0006795559893362224,
-0.022153083235025406,
-0.030830150470137596,
-0.056631144136190414,
-0.0341770201921463,
-0.012537476606667042,
0.02578328363597393,
-0.010474459268152714,
-0.016096845269203186,
0.009279148653149605,
-0.011466124095022678,
0.03173327445983887,
0.029661402106285095,
-0.00456874119117856,
0.021391626447439194,
-0.0333978533744812,
0.06612279266119003,
-0.024791618809103966,
0.080537348985672,
-0.0255176592618227,
-0.03173327445983887,
0.028103072196245193,
0.03380514308810234,
-0.016424447298049927,
-0.0038781175389885902,
0.023764537647366524,
0.01894788071513176,
-0.06502487510442734,
0.0005716460291296244,
0.001655725995078683,
-0.012918205000460148,
-0.08769150078296661,
0.062049880623817444,
0.01815100759267807,
-0.050858236849308014,
0.02234787493944168,
0.038214512169361115,
0.05078740417957306,
-0.009376544505357742,
0.006684883031994104,
0.006423685699701309,
-0.009624460712075233,
-0.05475406348705292,
0.056099895387887955,
-0.007951026782393456,
-0.00894269160926342,
0.00043606688268482685,
0.025995783507823944,
0.02893536165356636,
0.036904096603393555,
-0.009279148653149605,
-0.045333247631788254,
-0.008026286959648132,
0.032707229256629944,
0.027270780876278877,
0.0013912082649767399,
-0.014697888866066933,
-0.04678532853722572,
0.00041752849938347936,
-0.05592280998826027,
-0.06417487561702728,
-0.0022467405069619417,
0.013750494457781315,
0.013476015999913216,
0.04065825790166855,
-0.025057245045900345,
-0.012679142877459526,
0.032972853630781174,
0.033450979739427567,
-0.0724269449710846,
-0.04207491874694824,
-0.05510823056101799,
-0.03863951191306114,
0.0030613222625106573,
-0.017646320164203644,
-0.03906450793147087,
0.01559215784072876,
-0.03824992850422859,
0.005223948508501053,
-0.009252586401998997,
-0.020559335127472878,
-0.013236953876912594,
0.016397885978221893,
0.017177050933241844,
0.0027049428317695856,
0.027802031487226486,
0.0062156133353710175,
0.030971815809607506,
0.05000823736190796,
-0.01474215928465128,
-0.050964485853910446,
-0.03520410135388374,
-0.0010829732054844499,
0.01250205934047699,
-0.007729672826826572,
-0.019018713384866714,
-0.025482242926955223,
-0.003652336774393916,
0.028634320944547653,
0.015353095717728138,
-0.022578082978725433,
-0.05985405296087265,
0.042570751160383224,
0.011244770139455795,
0.04154366999864578,
-0.033468686044216156,
0.07108111679553986,
0.017424967139959335,
-0.0018239548662677407,
0.004821084439754486,
-0.029147861525416374,
0.0076101417653262615,
0.030971815809607506,
0.007663266733288765,
0.0064059775322675705,
-0.02302078902721405,
-0.025747867301106453,
0.014104660600423813,
0.030723899602890015,
0.005923426244407892,
0.08407900482416153,
-0.009190607815980911,
0.049016572535037994,
-0.06013738736510277,
0.0333978533744812,
0.00915519054979086,
0.05854363739490509,
-0.027306199073791504,
-0.07051444798707962,
0.008739045821130276,
-0.039029091596603394,
-0.08698316663503647,
-0.012094768695533276,
-0.0295728612691164,
-0.04646657779812813,
0.0828748419880867,
-0.039241593331098557,
-0.038852009922266006,
-0.05656030774116516,
-0.031237440183758736,
-0.05330198258161545,
-0.008739045821130276,
-0.028439529240131378,
-0.004108325578272343,
-0.0050645736046135426,
-0.03739992901682854,
-0.016079137101769447,
-0.01590205356478691,
-0.07699568569660187,
0.02750098891556263,
-0.025216618552803993,
0.007951026782393456,
0.03155618906021118,
0.012679142877459526,
-0.06194363161921501,
-0.030546817928552628,
0.050185322761535645,
0.07221444696187973,
0.0021438109688460827,
0.06027905270457268,
0.001846090191975236,
0.09172899276018143,
-0.019372880458831787,
-0.010394771583378315,
-0.0029993432108312845,
-0.011280187405645847,
-0.03568222373723984,
0.026473907753825188,
0.03718743100762367,
-0.004701553378254175,
-0.08259151130914688,
-0.013750494457781315,
-0.055462393909692764,
0.014396848157048225,
0.010430188849568367,
0.012749975547194481,
-0.07713735103607178,
-0.007415350526571274,
0.050079070031642914,
0.0820956751704216,
0.04806032404303551,
-0.005848166067153215,
0.010208834894001484,
-0.016752051189541817,
0.025995783507823944,
0.018381215631961823,
0.021497875452041626,
-0.008796597830951214,
0.0021316364873200655,
-0.008424723520874977,
-0.023516621440649033,
-0.007588006556034088,
-0.006401550490409136,
-0.054258231073617935,
-0.04579366371035576,
0.028616612777113914,
-0.008588525466620922,
-0.033999934792518616,
0.039029091596603394,
-0.039914507418870926,
0.04565199837088585,
0.008787743747234344,
-0.01985100470483303,
0.04986657202243805,
0.02316245622932911,
-0.032937437295913696,
0.00272929179482162,
-0.07416235655546188,
0.0017664028564468026,
-0.017203614115715027,
0.03718743100762367,
0.07295819371938705,
0.04356241598725319,
-0.013723932206630707,
0.042429085820913315,
0.007459621410816908,
-0.011891122907400131,
-0.03662076219916344,
-0.038852009922266006,
-0.015184867195785046,
0.05882697179913521,
-0.03614263981580734,
0.0766415223479271,
0.0009728497243486345,
0.028209321200847626,
0.02261349931359291,
0.0251280777156353,
-0.02330412156879902,
0.055851977318525314,
-0.006357279606163502,
-0.026225991547107697,
-0.0025699168909341097,
0.0750831887125969,
0.0239593293517828,
0.019673921167850494,
0.021143710240721703,
-0.01090831309556961,
0.02422495372593403,
0.020417669788002968,
0.03437180817127228,
0.011280187405645847,
-0.02707599103450775,
-0.022170791402459145,
-0.01882392354309559,
0.015503616072237492,
-0.038108259439468384,
-0.03382285311818123,
-0.005954416003078222,
0.04037492349743843
]
|
41,397 | pyglove.core.symbolic.base | sym_hasattr | Returns if a symbolic attribute exists. | @abc.abstractmethod
def sym_hasattr(self, key: Union[str, int]) -> bool:
"""Returns if a symbolic attribute exists."""
| (self, key: Union[str, int]) -> bool | [
0.03756989166140556,
-0.052286211401224136,
0.024809978902339935,
0.04231373965740204,
0.022403428331017494,
-0.01362557802349329,
0.01805778779089451,
-0.020412398502230644,
-0.0019098749617114663,
-0.007141742389649153,
0.017711520195007324,
0.02266312949359417,
0.11149774491786957,
0.044183578342199326,
-0.04729997366666794,
-0.02184940315783024,
0.02314790152013302,
0.05948854982852936,
-0.02046433836221695,
-0.011487384326756,
-0.030021287500858307,
0.06111599877476692,
0.019737178459763527,
-0.04013226181268692,
0.029276814311742783,
0.09868589043617249,
0.030973520129919052,
0.0379507839679718,
0.034592002630233765,
0.001010664738714695,
-0.08005676418542862,
-0.027891749516129494,
0.040478527545928955,
0.05900377407670021,
0.030073227360844612,
-0.020343145355582237,
0.0174864474684,
0.056268271058797836,
-0.046780575066804886,
-0.019806431606411934,
0.01763361133635044,
0.0244463998824358,
0.0439065657556057,
-0.05058950558304787,
-0.01707092858850956,
-0.017685551196336746,
-0.020135384052991867,
0.01928703300654888,
-0.03222007676959038,
-0.03732750564813614,
0.028393834829330444,
-0.020325832068920135,
0.027476230636239052,
-0.00791651289910078,
0.0015549520030617714,
0.02115686982870102,
-0.003938779234886169,
0.03756989166140556,
-0.038400933146476746,
0.06177390739321709,
-0.02603922411799431,
0.014551840722560883,
0.030021287500858307,
-0.0788794606924057,
-0.008864416740834713,
-0.06108137220144272,
-0.07049981504678726,
-0.015928249806165695,
-0.0016599140362814069,
-0.0034128872212022543,
-0.03961286321282387,
-0.005644140299409628,
-0.0005486156442202628,
0.05121278390288353,
0.029294127598404884,
-0.058449748903512955,
-0.018352113664150238,
-0.024913858622312546,
0.041482701897621155,
-0.05432917922735214,
-0.038781825453042984,
-0.042937021702528,
-0.03372633829712868,
-0.007288905326277018,
-0.0898214727640152,
0.031112026423215866,
0.021728210151195526,
-0.017434507608413696,
0.024775352329015732,
0.01562526635825634,
-0.06212017312645912,
0.044079698622226715,
0.002640280406922102,
0.04671132192015648,
0.024290580302476883,
0.011824993416666985,
0.0628819614648819,
-0.029484573751688004,
0.026575937867164612,
-0.04002838209271431,
0.017495105043053627,
-0.03206425905227661,
0.029830841347575188,
0.0056008570827543736,
-0.03732750564813614,
0.0031402024906128645,
-0.05453693866729736,
-0.01422288827598095,
-0.03563079982995987,
-0.008725910447537899,
-0.05581812560558319,
-0.019910311326384544,
0.01977180503308773,
-0.016802571713924408,
0.0063453298062086105,
-0.025242812931537628,
0.02366730011999607,
-0.03902421146631241,
-0.012050067074596882,
-0.024532966315746307,
-0.004488476552069187,
0.026229672133922577,
0.0052069793455302715,
-0.01618794910609722,
0.08268839120864868,
0.024221327155828476,
0.007215323857963085,
0.03826242312788963,
0.021122243255376816,
0.028376521542668343,
0.004575043451040983,
0.018490619957447052,
0.015045270323753357,
0.08275764435529709,
-0.000746636709664017,
0.03154486045241356,
0.03753526508808136,
0.031891126185655594,
-0.04252149909734726,
-0.00034870096715167165,
0.027424290776252747,
-0.015495416708290577,
0.011946187354624271,
0.0034410213120281696,
-0.05858825519680977,
0.0012205886887386441,
-0.06703715026378632,
-0.024827292189002037,
0.006012048572301865,
0.007786663249135017,
-0.004795788321644068,
-0.011634547263383865,
0.0017627117922529578,
0.03502483665943146,
-0.019615985453128815,
0.01636108197271824,
-0.013391848653554916,
0.0005137185216881335,
-0.011833650059998035,
-0.04729997366666794,
-0.029519200325012207,
-0.01178171020001173,
-0.053359635174274445,
-0.07465501129627228,
-0.012006783857941628,
-0.0033068431075662374,
-0.027632050216197968,
-0.0469537079334259,
0.017140181735157967,
0.05831124261021614,
-0.0349382683634758,
-0.05259785056114197,
0.006397269666194916,
0.011565294116735458,
0.01721809059381485,
0.007275920361280441,
0.00004355380588094704,
0.008111287839710712,
0.028515029698610306,
0.007332188542932272,
0.0668986439704895,
-0.04702296108007431,
-0.11468339711427689,
0.005250262562185526,
0.04743847995996475,
0.04141344875097275,
-0.011850963346660137,
-0.009963812306523323,
0.04525700584053993,
0.040790170431137085,
-0.03770839795470238,
-0.010015752166509628,
-0.009695456363260746,
-0.004886683076620102,
0.02326909452676773,
-0.07610932737588882,
0.01606675609946251,
0.04383731260895729,
-0.042867764830589294,
0.0698765367269516,
0.028376521542668343,
0.0025840122252702713,
-0.029103681445121765,
0.07714813202619553,
0.0036920642014592886,
-0.03784690424799919,
0.003787287510931492,
-0.038089290261268616,
-0.0538790337741375,
-0.020620157942175865,
0.00440840283408761,
-0.04030539467930794,
0.01287244912236929,
0.04820026829838753,
0.034990210086107254,
0.024792665615677834,
0.0005026271683163941,
0.027995629236102104,
-0.010007095523178577,
0.018906138837337494,
0.0768711194396019,
0.019425539299845695,
0.05748020485043526,
0.042763885110616684,
0.050658758729696274,
-0.04262537881731987,
0.024602219462394714,
0.025519825518131256,
-0.02527743950486183,
-0.011435444466769695,
0.04082479700446129,
0.01643899269402027,
0.04155195504426956,
0.0209491103887558,
0.0094790393486619,
-0.029813528060913086,
0.024186700582504272,
0.056649163365364075,
-0.001900136237964034,
0.011504697613418102,
-0.02437714673578739,
0.06513269245624542,
-0.010716941207647324,
0.06949564069509506,
-0.03653109446167946,
-0.05159367620944977,
0.013019612058997154,
0.07437799870967865,
-0.04435671120882034,
-0.0264547448605299,
0.009305906482040882,
-0.06745267659425735,
-0.01778077334165573,
-0.03462662920355797,
0.02655862458050251,
-0.032895296812057495,
-0.10138677060604095,
-0.003557886229828,
0.032289329916238785,
-0.02455027960240841,
-0.029571140184998512,
0.03395140916109085,
0.01918315328657627,
0.017192121595144272,
0.015036613680422306,
0.0009841537103056908,
0.061046745628118515,
0.028497716411948204,
-0.07423949241638184,
0.011045894585549831,
0.0012454765383154154,
-0.016542872413992882,
-0.01906195841729641,
0.024636846035718918,
-0.014828854240477085,
0.010535151697695255,
0.023996254429221153,
-0.02976158820092678,
-0.0001284972531720996,
-0.04972383752465248,
-0.002804756863042712,
-0.010647688060998917,
-0.01608406938612461,
0.02474072575569153,
-0.04553401842713356,
0.04030539467930794,
-0.008834118954837322,
-0.012361706234514713,
-0.00032732984982430935,
-0.010864105075597763,
0.06634461879730225,
0.01958135887980461,
0.012257826514542103,
0.01583302579820156,
0.08511225134134293,
0.05055487900972366,
0.022334175184369087,
0.005198322702199221,
0.02186671644449234,
-0.02437714673578739,
0.013642892241477966,
0.019910311326384544,
-0.036496467888355255,
-0.012439616024494171,
-0.02127806283533573,
-0.007669798098504543,
0.02224760875105858,
0.04903130605816841,
-0.05249397084116936,
0.06745267659425735,
0.007946811616420746,
0.06281270831823349,
-0.05858825519680977,
0.04802713543176651,
0.024827292189002037,
-0.012153946794569492,
-0.03403797745704651,
-0.004101091530174017,
0.003109904006123543,
0.10533420741558075,
-0.0294326338917017,
0.006241450086236,
-0.057757217437028885,
-0.05259785056114197,
-0.05235546454787254,
-0.0418982207775116,
0.004609670024365187,
-0.07119234651327133,
0.006752192508429289,
0.022230295464396477,
-0.02835920825600624,
0.027632050216197968,
0.04629580304026604,
-0.005955780390650034,
-0.07915647327899933,
0.028220701962709427,
-0.017417194321751595,
-0.003943107556551695,
0.009807992726564407,
0.00384139153175056,
-0.0018914795946329832,
-0.00835800264030695,
-0.0021414405200630426,
-0.02325178124010563,
-0.00684308772906661,
-0.041690461337566376,
-0.04823489487171173,
0.024204013869166374,
0.06537507474422455,
0.01600615866482258,
0.015045270323753357,
-0.015504073351621628,
0.00656174635514617,
-0.01600615866482258,
0.04452984407544136,
0.019044645130634308,
-0.020810604095458984,
0.05744557827711105,
0.005912496708333492,
-0.0033306488767266273,
0.09563875198364258,
-0.033276189118623734,
-0.03486901521682739,
-0.013867964968085289,
-0.04702296108007431,
-0.02205716259777546,
-0.012482900172472,
0.01968523859977722,
0.04813101515173912,
-0.05567961931228638,
-0.021641643717885017,
-0.033709023147821426,
-0.058934520930051804,
-0.05564499273896217,
-0.005120412912219763,
0.02345954068005085,
0.042382992804050446,
0.0044625066220760345,
-0.03074844554066658,
-0.012534840032458305,
0.024307893589138985,
-0.021641643717885017,
-0.00873456709086895,
0.03073113225400448,
0.0037375118117779493,
-0.03315499797463417,
-0.0016566677950322628,
0.014742286875844002,
0.002534236293286085,
0.05318650230765343,
0.018213607370853424,
-0.012474242597818375,
-0.06308972090482712,
-0.009158743545413017,
-0.017901966348290443,
-0.047057587653398514,
0.008132929913699627,
-0.038954958319664,
-0.056060511618852615,
0.01836942695081234,
0.04130956903100014,
-0.029103681445121765,
0.017356596887111664,
-0.018525246530771255,
0.010353362187743187,
0.0699457898736,
0.02105299010872841,
-0.02285357564687729,
-0.02475803904235363,
-0.019529419019818306,
0.032999176532030106,
0.022593874484300613,
-0.0638861283659935,
-0.04723072052001953,
0.012759912759065628,
-0.012569466605782509,
0.06980728358030319,
-0.006544433068484068,
0.024896545335650444,
0.006656969431787729,
0.03881645202636719,
-0.04404507204890251,
-0.02687026374042034,
0.0379161573946476,
-0.03415916860103607,
0.02913830801844597,
0.00835800264030695,
0.029830841347575188,
0.014785570092499256,
0.05741095170378685,
-0.028809355571866035,
0.0008093974320217967,
0.010249482467770576,
-0.003573035355657339,
-0.010413958691060543,
-0.052770983427762985,
-0.045083869248628616,
-0.0788794606924057,
-0.034107230603694916,
0.014898107387125492,
-0.022801635786890984,
0.0045880284160375595,
-0.037396758794784546,
0.043179407715797424,
0.012707972899079323,
-0.0174864474684,
0.03336275741457939,
0.0788102075457573,
0.07250816375017166,
-0.03455737605690956,
-0.016741974279284477,
0.024584906175732613,
0.0209664236754179,
0.0010236497037112713,
-0.009011580608785152,
-0.03303380310535431,
-0.01367751881480217,
-0.042937021702528,
0.012145290151238441,
-0.0003776466764975339,
-0.019010018557310104,
0.05353276804089546,
-0.0639553815126419,
-0.060838986188173294,
-0.00984261929988861,
0.04584565758705139,
-0.014854824170470238,
-0.01987568475306034,
0.0033847528975456953,
0.010154259391129017,
0.017832713201642036,
-0.03185649961233139,
0.012153946794569492,
-0.0224553681910038,
-0.016161978244781494,
0.034107230603694916,
-0.012638719752430916,
0.02986546792089939,
-0.07313144207000732,
-0.05045099928975105,
0.009046207182109356,
0.0042244489304721355,
-0.027909062802791595,
-0.03414185717701912,
0.05114353075623512,
0.0008937998791225255,
-0.010266795754432678,
0.001353684812784195,
-0.010145601816475391,
-0.016975704580545425,
-0.02217835560441017,
0.03026367351412773,
0.027389664202928543,
0.03176993131637573,
0.10353361815214157,
-0.010154259391129017,
0.017192121595144272,
0.03003860078752041,
-0.008518151007592678,
-0.018248233944177628,
-0.03331081569194794,
-0.008968296460807323,
0.02666250430047512,
0.02456759288907051,
0.018144354224205017,
0.0025450573302805424,
-0.023788494989275932,
-0.01752973161637783,
0.024498339742422104,
-0.00338042457588017,
0.03332813084125519,
0.01795390620827675,
0.04840802773833275,
0.007076817099004984,
0.06537507474422455,
0.013478415086865425,
-0.0014867809368297458,
-0.055264100432395935,
-0.021001050248742104,
-0.0018622634233906865,
0.024827292189002037,
-0.05221695452928543,
-0.020083444193005562,
-0.044287458062171936,
-0.02306133508682251,
0.009054863825440407,
-0.0035427368711680174,
-0.019148526713252068,
-0.00938381627202034,
-0.005973093677312136,
0.01003306545317173,
0.018213607370853424,
-0.03905883803963661,
0.03194306418299675,
-0.015824370086193085,
0.07230040431022644,
0.002562370616942644,
0.051662929356098175,
0.007332188542932272,
0.0032072914764285088,
0.044460590928792953,
-0.014101694338023663,
0.007665469776839018,
-0.00984261929988861,
0.007626514881849289,
0.03556154668331146,
-0.06963415443897247,
-0.05329038202762604,
0.0017475626664236188,
-0.004111912101507187,
-0.05980018898844719,
0.047369226813316345,
0.0028631894383579493,
-0.02984815463423729,
0.07846394181251526,
0.02527743950486183,
0.06925325840711594,
-0.019719865173101425,
-0.035700052976608276,
0.04982771724462509,
-0.007223980501294136,
-0.04342179372906685,
0.05983481556177139,
-0.05380978062748909,
-0.03222007676959038,
-0.02307864837348461,
0.008834118954837322,
-0.011348878033459187,
0.06468254327774048,
-0.014231544919312,
-0.028480403125286102,
0.0003276003699284047,
0.004523103591054678,
0.00919337011873722,
-0.003244082210585475,
0.007613529916852713,
-0.01577243022620678,
0.0064838360995054245,
-0.015547356568276882,
-0.07867170125246048,
-0.01083813514560461,
0.02067209780216217,
0.004458178300410509,
0.017936592921614647,
0.01723540388047695,
-0.018438680097460747,
0.006734879221767187,
0.029571140184998512,
-0.07721738517284393,
-0.057168565690517426,
-0.06973803043365479,
-0.044876109808683395,
0.029675021767616272,
-0.06322822719812393,
-0.00927993655204773,
0.00855710543692112,
-0.0016685706796124578,
-0.012604093179106712,
-0.01363423466682434,
0.0012768569868057966,
0.01958135887980461,
-0.006310703232884407,
0.02783980965614319,
-0.013720802031457424,
0.009063520468771458,
0.043491046875715256,
0.003982062451541424,
0.0509357713162899,
-0.04681520164012909,
-0.05734169855713844,
-0.024290580302476883,
-0.010067692026495934,
0.03256634622812271,
-0.00908083375543356,
-0.0042634038254618645,
0.0012357378145679832,
0.00006840788410045207,
0.030609939247369766,
-0.007842931896448135,
0.019910311326384544,
-0.036184828728437424,
-0.016993017867207527,
0.005072800908237696,
0.039197344332933426,
-0.03315499797463417,
0.05152442306280136,
0.017296001315116882,
0.035094089806079865,
0.0004160605894867331,
-0.06752192974090576,
-0.006630999501794577,
0.03317230939865112,
0.04560327157378197,
-0.0174864474684,
-0.020083444193005562,
-0.04411432519555092,
0.039682116359472275,
0.04421820491552353,
0.029692335054278374,
0.08559702336788177,
-0.04719609394669533,
0.02536400593817234,
-0.04155195504426956,
0.0439411923289299,
-0.0009197698091156781,
0.051974568516016006,
-0.0023286407813429832,
-0.03611557558178902,
0.043283287435770035,
-0.04172508791089058,
-0.04944682493805885,
-0.019598672166466713,
-0.02555445209145546,
-0.02875741571187973,
0.08532001078128815,
-0.02704339660704136,
-0.05962705612182617,
-0.020741350948810577,
-0.020429711788892746,
-0.048373401165008545,
-0.011721113696694374,
-0.02815144881606102,
-0.019892998039722443,
0.029605768620967865,
0.021243436262011528,
-0.002540729008615017,
-0.004865041468292475,
-0.09016773849725723,
0.038193169981241226,
-0.02854965627193451,
0.02766667678952217,
0.07119234651327133,
0.020308518782258034,
-0.05782647058367729,
-0.03277410566806793,
0.03474782034754753,
0.014915420673787594,
-0.013452445156872272,
0.050173986703157425,
-0.00800307933241129,
0.039578236639499664,
-0.007734723389148712,
-0.013651548884809017,
-0.006951295770704746,
-0.015019300393760204,
-0.028012942522764206,
0.029501887038350105,
0.009972468949854374,
-0.006873385980725288,
-0.11468339711427689,
-0.02347685396671295,
-0.051662929356098175,
0.03905883803963661,
0.042382992804050446,
0.020533591508865356,
-0.04972383752465248,
-0.01876763254404068,
0.0659290999174118,
0.07223115116357803,
-0.01686316914856434,
-0.0018254725728183985,
0.012344392947852612,
-0.0087432237342,
0.014032441191375256,
-0.000837531581055373,
0.031406354159116745,
-0.05678766965866089,
0.0022507309913635254,
0.025433259084820747,
-0.0013136477209627628,
-0.047369226813316345,
-0.005596528761088848,
-0.02224760875105858,
-0.09224534034729004,
0.016387052834033966,
-0.048061762005090714,
-0.0016545036341995,
-0.0012984985951334238,
-0.009236653335392475,
0.03277410566806793,
0.024100134149193764,
-0.015157806687057018,
0.032098885625600815,
0.026316238567233086,
-0.06468254327774048,
-0.010976641438901424,
-0.035388413816690445,
0.0027181904297322035,
-0.0038370632100850344,
0.0439065657556057,
0.050485625863075256,
0.029934721067547798,
-0.052563223987817764,
0.08912894129753113,
-0.004661609884351492,
0.0006481672171503305,
-0.06544432789087296,
-0.03481707721948624,
-0.01740853860974312,
0.07610932737588882,
0.006557418033480644,
0.05640677735209465,
0.014093037694692612,
-0.010240825824439526,
0.056856922805309296,
-0.00016501752543263137,
-0.03701586648821831,
0.06066585332155228,
0.02766667678952217,
-0.028324581682682037,
0.025883404538035393,
0.05159367620944977,
0.006531448103487492,
-0.0010117468191310763,
0.07250816375017166,
0.01388527825474739,
-0.0174864474684,
0.00338042457588017,
0.04844265431165695,
0.0008434830233454704,
-0.05221695452928543,
-0.024100134149193764,
-0.027891749516129494,
0.025502512231469154,
-0.03123321942985058,
-0.018906138837337494,
-0.020845230668783188,
0.04899667948484421
]
|
41,398 | pyglove.core.symbolic.base | sym_hash | Computes the symbolic hash of current object. | @abc.abstractmethod
def sym_hash(self) -> int:
"""Computes the symbolic hash of current object."""
| (self) -> int | [
0.011438005603849888,
-0.07905499637126923,
0.02655094489455223,
0.05763840675354004,
-0.016625110059976578,
-0.038999997079372406,
-0.03207213431596756,
-0.02408926747739315,
-0.023737598210573196,
-0.011007212102413177,
0.03581739962100983,
-0.004510143771767616,
0.05992424860596657,
0.06326510012149811,
-0.06242109462618828,
-0.014189809560775757,
0.007398218382149935,
0.051835883408784866,
-0.027887282893061638,
-0.024599185213446617,
-0.02971595712006092,
0.01447993516921997,
0.04508385434746742,
-0.014743686653673649,
-0.012229259125888348,
0.07265463471412659,
0.062210094183683395,
0.037944991141557693,
0.02071325294673443,
0.008615869097411633,
-0.06231559440493584,
-0.019482415169477463,
0.021258339285850525,
0.07328763604164124,
0.0354129821062088,
-0.07968799769878387,
0.013257889077067375,
0.09220738708972931,
-0.05679440498352051,
0.00796528346836567,
0.028256533667445183,
0.01401397492736578,
0.04177817329764366,
-0.047756534069776535,
0.0062201302498579025,
-0.0007863079663366079,
-0.00887082889676094,
0.009978583082556725,
-0.015350313857197762,
-0.059678081423044205,
-0.027904866263270378,
-0.06333543360233307,
-0.005398105829954147,
0.010409376583993435,
0.039738498628139496,
0.0717402994632721,
0.042833179235458374,
-0.0435013473033905,
-0.04729936271905899,
0.04262217879295349,
-0.034146975725889206,
0.007494926918298006,
0.0623859278857708,
-0.06161225587129593,
0.00040359413833357394,
-0.03921099752187729,
-0.06477726995944977,
0.0022023217752575874,
0.01592177525162697,
-0.0001703392481431365,
0.0036111921072006226,
0.00796528346836567,
0.03261721879243851,
0.012967762537300587,
0.01688007079064846,
-0.005380522459745407,
0.01615915074944496,
-0.01447993516921997,
0.0542975589632988,
-0.05215238407254219,
-0.03625698387622833,
-0.04976104199886322,
-0.028274117037653923,
0.0010039026383310556,
-0.09298105537891388,
-0.010198376141488552,
0.05109737813472748,
-0.012202884070575237,
-0.016211900860071182,
-0.021012170240283012,
-0.031052296981215477,
0.017099862918257713,
-0.02658611163496971,
0.03604598343372345,
0.002716636285185814,
-0.029417039826512337,
0.0031694089993834496,
-0.03857799246907234,
0.015508565120398998,
-0.022805677726864815,
0.016589943319559097,
0.018075741827487946,
-0.030946794897317886,
-0.0033034824300557375,
-0.03878899663686752,
-0.013477681204676628,
-0.01274796947836876,
-0.029329122975468636,
-0.04986654222011566,
0.00698940409347415,
-0.05535256490111351,
0.07166996598243713,
-0.032529301941394806,
-0.03762849047780037,
-0.001783616840839386,
0.005798128433525562,
0.01993958279490471,
-0.026005858555436134,
0.03036654368042946,
0.002419916447252035,
-0.021891340613365173,
0.023034263402223587,
-0.026972945779561996,
-0.0003953519044443965,
0.07043913006782532,
0.02551352232694626,
0.022752927616238594,
-0.0035452544689178467,
-0.04395851492881775,
-0.01911316253244877,
0.0263399425894022,
0.04870603606104851,
-0.0013275472447276115,
0.07680431753396988,
0.010426959954202175,
0.023596931248903275,
0.030243460088968277,
0.021346256136894226,
-0.02175067365169525,
-0.009090621024370193,
0.036467984318733215,
-0.022805677726864815,
0.02567177452147007,
0.02071325294673443,
-0.027412530034780502,
0.017091071233153343,
-0.05099187791347504,
-0.022612260654568672,
-0.007160842418670654,
0.03854282572865486,
0.060627587139606476,
0.01853291131556034,
0.04729936271905899,
0.05264471843838692,
-0.059678081423044205,
0.012027050368487835,
0.0027583970222622156,
-0.01355680637061596,
-0.04023083299398422,
-0.010954461991786957,
-0.01277434453368187,
-0.034850310534238815,
0.019763749092817307,
-0.06773128360509872,
-0.04599819332361221,
0.005622294265776873,
-0.011174255050718784,
-0.06980612128973007,
-0.01557889860123396,
-0.009960999712347984,
-0.06699278205633163,
-0.07089629769325256,
-0.056688904762268066,
0.008857641369104385,
0.0481785349547863,
0.010189584456384182,
-0.016255859285593033,
0.030683044344186783,
0.011991883628070354,
0.007037758361548185,
0.03224796801805496,
-0.09663840383291245,
-0.10852478444576263,
0.01611519232392311,
0.036538317799568176,
0.03931649774312973,
0.01769769936800003,
0.018233992159366608,
0.059678081423044205,
0.0143832266330719,
-0.07588998228311539,
-0.026674028486013412,
-0.02881920337677002,
-0.000532172794919461,
0.05151938274502754,
-0.050183042883872986,
-0.01316117960959673,
0.04262217879295349,
-0.04810820147395134,
0.0837673470377922,
-0.002136383904144168,
0.010796211659908295,
-0.009934624657034874,
-0.0007670760969631374,
0.015350313857197762,
-0.02083633653819561,
0.01858566142618656,
-0.016686653718352318,
-0.026867445558309555,
-0.027518032118678093,
0.006923466455191374,
-0.02570694126188755,
-0.042024340480566025,
0.07223263382911682,
0.020519835874438286,
-0.03455139324069023,
0.024300267919898033,
-0.010119250975549221,
0.03766365721821785,
0.025003604590892792,
0.05049954354763031,
-0.0009989573154598475,
-0.012580927461385727,
0.00968845747411251,
0.010576419532299042,
-0.04072317108511925,
0.03618665039539337,
-0.005314584821462631,
-0.009116996079683304,
-0.07385031133890152,
0.012097383849322796,
-0.022805677726864815,
0.05471955984830856,
0.021205589175224304,
0.037417490035295486,
-0.0044266227632761,
-0.004336507525295019,
0.012018258683383465,
-0.05953741446137428,
0.03854282572865486,
-0.0530315563082695,
0.058869246393442154,
0.05398105829954147,
0.07736699283123016,
-0.027799366042017937,
-0.042868345975875854,
0.007033362518996,
0.09572406858205795,
-0.040406666696071625,
-0.03945716470479965,
-0.023509014397859573,
-0.06586743891239166,
-0.02554868906736374,
-0.050780877470970154,
0.03041929379105568,
-0.010400584898889065,
-0.03298646956682205,
0.025460772216320038,
0.017126237973570824,
0.012185300700366497,
0.002745209261775017,
0.005217875819653273,
-0.0057365866377949715,
-0.012167717330157757,
0.0077850534580647945,
-0.01488435361534357,
-0.02319251373410225,
0.06189358979463577,
-0.07807032763957977,
0.058904413133859634,
0.09572406858205795,
-0.05225788429379463,
-0.030823711305856705,
0.03945716470479965,
-0.025003604590892792,
-0.004165069665759802,
0.004936541430652142,
0.021240755915641785,
-0.042798012495040894,
-0.038015324622392654,
0.005173917394131422,
-0.006690486334264278,
0.0029012621380388737,
-0.020977003499865532,
-0.05264471843838692,
0.05999458208680153,
0.010541251860558987,
-0.043677181005477905,
0.005235459189862013,
-0.03534264862537384,
0.03748782351613045,
0.02417718432843685,
-0.03787465766072273,
0.03395355865359306,
0.10887645184993744,
0.0402659997344017,
-0.028555452823638916,
0.01597452536225319,
0.025214605033397675,
0.003558441996574402,
-0.03228313475847244,
0.02078358642756939,
-0.033162303268909454,
-0.02407168410718441,
-0.05369972437620163,
-0.0353250652551651,
0.029188454151153564,
0.030788544565439224,
0.001207760302349925,
0.026832278817892075,
-0.006826757453382015,
0.08285301178693771,
-0.04575202241539955,
0.05355905741453171,
0.024493684992194176,
-0.02477502077817917,
-0.012176509015262127,
-0.023825516924262047,
0.022893594577908516,
0.08946437388658524,
-0.039632998406887054,
0.0155964819714427,
-0.026128942146897316,
-0.037206489592790604,
0.014172226190567017,
-0.04888186976313591,
-0.038929663598537445,
-0.040477003902196884,
0.029962124302983284,
0.010813795030117035,
-0.03868349641561508,
0.03622181713581085,
0.08074299991130829,
0.0035386604722589254,
-0.08580702543258667,
0.006338817998766899,
0.036432817578315735,
0.01604485884308815,
-0.04086383804678917,
-0.05064021050930023,
0.03551848232746124,
-0.024194767698645592,
0.010998420417308807,
-0.014181017875671387,
-0.03557123243808746,
-0.011780882254242897,
-0.05943191424012184,
-0.007530094124376774,
0.006686090491712093,
0.003655150765553117,
0.004092537797987461,
-0.016589943319559097,
-0.003521077102050185,
-0.025478355586528778,
0.06305409967899323,
0.03678448498249054,
-0.0337073914706707,
-0.004681582096964121,
-0.049163203686475754,
-0.027676282450556755,
0.041356172412633896,
-0.05918574705719948,
-0.03548331558704376,
-0.003830984700471163,
-0.02482777088880539,
0.003057314781472087,
-0.024229934439063072,
0.0353250652551651,
0.050956711173057556,
-0.06287825852632523,
-0.0418836735188961,
-0.042868345975875854,
-0.03717132285237312,
-0.05820107460021973,
0.01279192790389061,
0.029082953929901123,
0.04346618056297302,
0.023649681359529495,
-0.054016225039958954,
-0.009969791397452354,
0.07560864835977554,
-0.03748782351613045,
-0.025443188846111298,
-0.014356851577758789,
-0.01771528273820877,
0.008747744373977184,
0.03604598343372345,
0.033426057547330856,
0.04381784796714783,
0.06108475476503372,
-0.015139313414692879,
-0.01993958279490471,
-0.011754507198929787,
-0.01768890768289566,
-0.0029386267997324467,
0.008646639995276928,
0.027570782229304314,
-0.0016209703171625733,
-0.11949682980775833,
-0.010075291618704796,
0.05049954354763031,
-0.013038096018135548,
0.05229305103421211,
-0.025091521441936493,
0.0005214579286985099,
0.006470693740993738,
0.029487373307347298,
-0.021275922656059265,
-0.017838366329669952,
-0.027025695890188217,
-0.022155093029141426,
0.0037254842463880777,
-0.051624882966279984,
-0.05067537724971771,
0.024335434660315514,
-0.03618665039539337,
0.05844724550843239,
-0.053312890231609344,
0.03193146735429764,
0.009512622840702534,
0.0399143323302269,
-0.010752253234386444,
-0.023526597768068314,
0.06730928272008896,
-0.026779528707265854,
0.043642014265060425,
0.0026485007256269455,
0.05911541357636452,
-0.022243009880185127,
0.027693865820765495,
0.010004958137869835,
0.01691523753106594,
0.002158363116905093,
0.011983091942965984,
-0.01358318142592907,
-0.06439043581485748,
0.005235459189862013,
-0.041356172412633896,
-0.009354372508823872,
0.06565643846988678,
0.03551848232746124,
0.021064920350909233,
-0.0092576639726758,
0.0319138839840889,
0.05718123912811279,
-0.0026177295949310064,
0.04329034686088562,
0.005187104921787977,
0.0001653939252719283,
0.018233992159366608,
0.012572135776281357,
0.013802974484860897,
0.021838590502738953,
-0.04241117835044861,
-0.0415320061147213,
-0.03745265677571297,
-0.0018440597923472524,
-0.062280427664518356,
0.011095129884779453,
0.018673578277230263,
0.006431131158024073,
0.07015779614448547,
-0.012607302516698837,
-0.034111808985471725,
-0.01612398400902748,
-0.014963478781282902,
-0.037417490035295486,
-0.015904191881418228,
0.020273668691515923,
0.008646639995276928,
0.05116771161556244,
0.005107979755848646,
-0.012290800921618938,
-0.005565148312598467,
-0.04663119465112686,
0.02074841968715191,
-0.021486923098564148,
-0.005516794044524431,
-0.05922091379761696,
-0.055774565786123276,
0.007143259048461914,
-0.001468214439228177,
0.02806311659514904,
-0.01399639155715704,
0.06386293470859528,
0.010664336383342743,
0.04030116647481918,
-0.023895850405097008,
0.013046887703239918,
-0.011156671680510044,
-0.0636519342660904,
0.021979257464408875,
-0.019763749092817307,
0.052398551255464554,
0.02574210800230503,
0.005503606051206589,
0.013688681647181511,
0.026885028928518295,
-0.04399368166923523,
-0.04322001338005066,
-0.03212488442659378,
0.005020062439143658,
0.03625698387622833,
0.01925382949411869,
0.03296888619661331,
0.00741140590980649,
-0.0016253661597147584,
-0.03205455094575882,
0.01320513803511858,
0.010339043103158474,
0.010383001528680325,
-0.018902162089943886,
0.0559152327477932,
0.006637736223638058,
0.04241117835044861,
-0.010215959511697292,
-0.037276823073625565,
-0.040406666696071625,
-0.023702431470155716,
-0.010637961328029633,
0.0011308328248560429,
-0.050218209624290466,
-0.021170422434806824,
-0.03622181713581085,
0.009776374325156212,
-0.02157483994960785,
-0.003263919847086072,
-0.00807957537472248,
0.04082867130637169,
0.01616794243454933,
-0.0417078398168087,
0.006356401368975639,
-0.03688998892903328,
0.03223038464784622,
-0.03126329556107521,
0.07483498007059097,
-0.0352371484041214,
0.005468439310789108,
0.01927141286432743,
-0.009837916120886803,
-0.030876461416482925,
-0.024458518251776695,
0.012950179167091846,
-0.0402659997344017,
0.002238587476313114,
0.040512170642614365,
-0.021486923098564148,
-0.025021187961101532,
-0.03854282572865486,
-0.033179886639118195,
-0.013117221184074879,
-0.009723624214529991,
0.043747514486312866,
-0.027500448748469353,
0.049303870648145676,
-0.031773217022418976,
0.07631198316812515,
0.018216408789157867,
-0.0020034094341099262,
0.03187871724367142,
0.0160009004175663,
0.026252025738358498,
0.05352389067411423,
-0.0688566192984581,
-0.004134298302233219,
0.016422901302576065,
0.01603606715798378,
-0.011903965845704079,
0.029276372864842415,
-0.02085391990840435,
-0.04075833782553673,
0.047580696642398834,
0.06653561443090439,
0.010998420417308807,
0.02417718432843685,
0.027043279260396957,
-0.03372497484087944,
-0.030770961195230484,
0.010813795030117035,
-0.11000179499387741,
-0.00657619396224618,
0.014963478781282902,
-0.005235459189862013,
0.024229934439063072,
0.029891790822148323,
-0.0036199837923049927,
-0.006097046192735434,
0.03270513564348221,
-0.05127321556210518,
-0.023403514176607132,
-0.07996933162212372,
-0.029399456456303596,
-0.005015666596591473,
-0.02493327111005783,
-0.0288543701171875,
-0.011156671680510044,
-0.02716636285185814,
-0.03193146735429764,
-0.00875214021652937,
-0.007363051641732454,
0.004769498948007822,
0.026199275627732277,
0.022278176620602608,
-0.0011758903274312615,
0.04381784796714783,
0.046807028353214264,
-0.024247517809271812,
0.03611631691455841,
-0.03286338597536087,
-0.027500448748469353,
-0.015060188248753548,
-0.007407010067254305,
0.05542289838194847,
-0.07778899371623993,
-0.02394860051572323,
0.005793732590973377,
0.010189584456384182,
0.01675698719918728,
-0.020396752282977104,
0.06034625321626663,
-0.05922091379761696,
0.020273668691515923,
-0.022137509658932686,
0.03210730105638504,
-0.019746165722608566,
0.08193867653608322,
0.0035012958105653524,
0.05116771161556244,
0.01858566142618656,
-0.051730383187532425,
-0.04075833782553673,
0.014559060335159302,
0.03133362904191017,
0.0006632241420447826,
0.051730383187532425,
-0.0449431873857975,
0.012686427682638168,
0.0559152327477932,
-0.004918958060443401,
0.08461135625839233,
-0.025443188846111298,
0.034129392355680466,
-0.019798915833234787,
0.016247067600488663,
-0.023596931248903275,
0.013372180983424187,
0.0045321229845285416,
-0.023051846772432327,
0.021258339285850525,
-0.03664381802082062,
-0.028678536415100098,
0.004962916485965252,
0.004217819776386023,
0.0028001575265079737,
0.06871595233678818,
0.004402445629239082,
-0.03449864313006401,
-0.04814336821436882,
0.002600146224722266,
-0.02806311659514904,
-0.0018627421231940389,
0.011429213918745518,
-0.057251572608947754,
0.006690486334264278,
0.0015330532332882285,
0.022049592807888985,
0.006075066979974508,
-0.055071230977773666,
0.012009466998279095,
-0.01367109827697277,
0.005446460098028183,
0.038085658103227615,
0.03907033056020737,
-0.0320018008351326,
-0.03629215061664581,
0.010426959954202175,
0.01608881726861,
0.041215505450963974,
0.015420647338032722,
-0.010725878179073334,
0.021064920350909233,
-0.0076531777158379555,
-0.052433717995882034,
0.002540802350267768,
-0.009538997896015644,
0.01616794243454933,
-0.01840982586145401,
0.030876461416482925,
-0.01524481363594532,
-0.07835166156291962,
-0.036467984318733215,
-0.012677635997533798,
0.01404034998267889,
0.01480522844940424,
0.00739382253959775,
0.016282234340906143,
-0.04592785984277725,
-0.005727794487029314,
0.07170513272285461,
-0.0467366948723793,
-0.006044296082109213,
0.02874886989593506,
0.04828403517603874,
0.03819115832448006,
0.02816861681640148,
0.025935525074601173,
-0.06101442128419876,
0.003369420301169157,
0.01840982586145401,
-0.013802974484860897,
-0.010796211659908295,
-0.02407168410718441,
-0.006861924659460783,
-0.000803341914433986,
0.03458655998110771,
-0.038050491362810135,
0.023526597768068314,
0.040371499955654144,
-0.01833949238061905,
0.05106221139431,
-0.004659602884203196,
-0.04652569442987442,
0.08636969327926636,
0.030999545007944107,
-0.027430115267634392,
0.01921866275370121,
0.014172226190567017,
0.01441839337348938,
0.03293371945619583,
0.0706501305103302,
0.011314922012388706,
0.01990441605448723,
-0.041285838931798935,
0.053418390452861786,
0.031087463721632957,
-0.0064223394729197025,
-0.008607077412307262,
-0.037347156554460526,
-0.02727186307311058,
0.05436789244413376,
0.014989853836596012,
-0.01935933157801628,
-0.04353651404380798,
0.0006115728756412864,
0.09389539062976837,
-0.017943866550922394,
-0.029962124302983284,
0.08784669637680054,
0.027377363294363022,
-0.039632998406887054,
-0.002813345054164529,
0.05355905741453171,
0.0063695888966321945,
0.006461902055889368,
0.04001983255147934,
0.027447698637843132,
0.00661136070266366,
0.004518935456871986,
0.0296632070094347,
-0.0012879845453426242,
-0.0337953083217144,
-0.042129840701818466,
-0.007881762459874153,
0.019517581909894943,
-0.02252434380352497,
-0.01695040427148342,
0.0184274110943079,
0.03671415150165558
]
|
41,401 | pyglove.core.symbolic.base | sym_items | Iterates the (key, value) pairs of symbolic attributes. | @abc.abstractmethod
def sym_items(self) -> Iterator[Tuple[Union[str, int], Any]]:
"""Iterates the (key, value) pairs of symbolic attributes."""
| (self) -> Iterator[Tuple[Union[str, int], Any]] | [
0.054581765085458755,
-0.038780853152275085,
-0.011903469450771809,
-0.004856404382735491,
0.0005894548958167434,
-0.02466912753880024,
-0.010275870561599731,
-0.02873372659087181,
0.07749132812023163,
0.004508890211582184,
-0.003525732085108757,
0.03329100459814072,
0.0504995696246624,
0.07974357157945633,
-0.054265040904283524,
0.016267195343971252,
-0.020358188077807426,
0.06383708864450455,
-0.04578392952680588,
0.037725113332271576,
-0.03621188551187515,
0.0621127113699913,
-0.0048388089053332806,
-0.014085332863032818,
0.022029777988791466,
0.0379362627863884,
0.03635265305638313,
0.009140949696302414,
0.05813609063625336,
-0.015070689842104912,
-0.06095139682292938,
-0.02292715571820736,
0.029331980273127556,
0.03299187868833542,
0.0405404195189476,
-0.027079734951257706,
-0.02005906216800213,
0.03853451460599899,
-0.01369822770357132,
0.03916795924305916,
0.04912710562348366,
-0.021449120715260506,
0.05620056763291359,
-0.02709732949733734,
-0.02343743108212948,
-0.007724498398602009,
0.0010309962090104818,
-0.04698043689131737,
0.006717146374285221,
-0.07319798320531845,
0.020833272486925125,
-0.006057308986783028,
0.02600639872252941,
-0.0062376647256314754,
0.02572486735880375,
0.04719158262014389,
-0.03388925641775131,
-0.002995662624016404,
-0.015343423001468182,
0.05183684080839157,
-0.0076585146598517895,
-0.02644629031419754,
0.03684533014893532,
-0.06992518901824951,
0.0034113603178411722,
-0.06876387447118759,
-0.05859357863664627,
-0.02336704730987549,
-0.01979512721300125,
-0.009316906332969666,
-0.0068227206356823444,
-0.00506755243986845,
-0.014050141908228397,
0.03179537504911423,
-0.005397471599280834,
-0.017138181254267693,
-0.007843269035220146,
-0.00040909930248744786,
0.038780853152275085,
-0.09550929069519043,
-0.04152577742934227,
0.03255198895931244,
-0.050077274441719055,
0.0042229606769979,
-0.06996037811040878,
0.03142586350440979,
0.0006972283590584993,
-0.009528054855763912,
-0.01699741557240486,
0.07203666865825653,
-0.04842327907681465,
0.021818628534674644,
-0.0017628660425543785,
0.08734489977359772,
-0.012114617973566055,
0.009923957288265228,
0.009457672014832497,
-0.07080496847629547,
-0.0017628660425543785,
-0.008054417558014393,
0.024440383538603783,
-0.011525163426995277,
0.005489848554134369,
-0.0009133251733146608,
-0.0331326425075531,
-0.03109154663980007,
-0.037654731422662735,
-0.052223943173885345,
0.02583044208586216,
-0.001055740169249475,
-0.09811344742774963,
0.025777654722332954,
0.020551741123199463,
-0.0027999107260257006,
-0.029595915228128433,
0.010267072357237339,
0.008929802104830742,
-0.017490094527602196,
0.02132594957947731,
-0.02081567607820034,
-0.024493170902132988,
0.022540051490068436,
0.024686723947525024,
0.05866396054625511,
0.05845281109213829,
0.013047188520431519,
0.031848158687353134,
0.016575120389461517,
-0.04363725706934929,
0.03232324495911598,
-0.0202702097594738,
-0.014578011818230152,
0.019531192258000374,
0.06823600083589554,
0.003895241068676114,
-0.0024391994811594486,
0.060141995549201965,
-0.008098406717181206,
-0.022135350853204727,
0.024897871538996696,
0.047543495893478394,
0.007385781966149807,
-0.0020421973895281553,
0.0463469922542572,
-0.08234772831201553,
-0.023402240127325058,
-0.0328335165977478,
0.005063153803348541,
0.0016111034201458097,
-0.03232324495911598,
-0.029666297137737274,
0.037725113332271576,
0.019777530804276466,
0.06049390882253647,
-0.025408145040273666,
0.018510643392801285,
-0.03545527160167694,
0.000518522341735661,
-0.023666175082325935,
-0.009528054855763912,
-0.06802485883235931,
-0.02364857867360115,
-0.01779801957309246,
-0.031214715912938118,
-0.00047783239278942347,
0.033255815505981445,
-0.035226527601480484,
-0.05053475871682167,
0.029543127864599228,
-0.0245987456291914,
-0.005155530758202076,
-0.09769115597009659,
-0.022540051490068436,
-0.023771747946739197,
0.013504675589501858,
0.01678626798093319,
0.007025070954114199,
0.033150240778923035,
0.05503925308585167,
0.007544143125414848,
0.033044666051864624,
-0.0700659528374672,
-0.12133973091840744,
-0.009088163264095783,
0.03719724342226982,
0.013293527998030186,
-0.0009369693580083549,
0.024317214265465736,
0.07087535411119461,
0.001983911730349064,
0.005199519917368889,
-0.009756797924637794,
-0.02473950944840908,
0.002437000162899494,
0.011938661336898804,
-0.04145539551973343,
0.0019707148894667625,
0.04272228479385376,
-0.04022369906306267,
0.06510397791862488,
-0.024757105857133865,
-0.03179537504911423,
-0.04381321370601654,
0.08164390176534653,
0.019161682575941086,
-0.022434476763010025,
0.010830134153366089,
-0.07509831339120865,
-0.040962718427181244,
-0.001053540618158877,
-0.007544143125414848,
0.0020410974975675344,
0.042194414883852005,
0.017164574936032295,
0.013267134316265583,
-0.002252245554700494,
-0.012748061679303646,
-0.015396210364997387,
-0.001291082240641117,
-0.012378552928566933,
0.0553559735417366,
-0.01815873011946678,
0.002410606713965535,
-0.015774516388773918,
0.07474640011787415,
-0.06454091519117355,
0.02023501880466938,
0.015176264569163322,
-0.05521520972251892,
0.014771563932299614,
0.02678060717880726,
-0.016865449026226997,
0.040927525609731674,
0.005019164644181728,
0.04828251525759697,
-0.012941614724695683,
0.00922892801463604,
-0.013091177679598331,
-0.03513855114579201,
0.0084459213539958,
-0.0553559735417366,
0.060177188366651535,
-0.02917361818253994,
0.04592469707131386,
-0.06380189210176468,
-0.013909376226365566,
0.02371896058320999,
0.08326270431280136,
-0.04849366471171379,
-0.010610188357532024,
0.020410975441336632,
-0.032164882868528366,
0.006013319827616215,
0.005274301860481501,
0.041490588337183,
-0.043390918523073196,
-0.06394266337156296,
-0.029331980273127556,
0.046522948890924454,
-0.03200652077794075,
0.04588950425386429,
0.030686846002936363,
-0.014472437091171741,
0.06573741883039474,
0.05394832044839859,
0.0291032362729311,
0.03336138650774956,
0.028751322999596596,
-0.05503925308585167,
0.0245987456291914,
0.057819366455078125,
0.006057308986783028,
-0.027994709089398384,
0.037619538605213165,
-0.02982465922832489,
0.05134415999054909,
0.045502398163080215,
0.008094007149338722,
-0.05971970036625862,
-0.06221828609704971,
0.0021686661057174206,
0.005749384872615337,
-0.04377802461385727,
0.004702442325651646,
-0.024581149220466614,
-0.002516180742532015,
0.0008440422243438661,
0.0012690876610577106,
0.020358188077807426,
-0.006057308986783028,
0.08706337213516235,
0.021994585171341896,
-0.008969391696155071,
-0.010293466039001942,
0.11218998581171036,
0.021853821352124214,
-0.015712931752204895,
0.02510901913046837,
0.04673409461975098,
0.0003560373734217137,
0.03534969687461853,
-0.007425372023135424,
0.010812538675963879,
0.024897871538996696,
-0.014850744046270847,
0.006140888202935457,
0.0504995696246624,
0.05127377808094025,
-0.07108650356531143,
0.038780853152275085,
0.015554571524262428,
0.04933825507760048,
-0.030722036957740784,
0.043144579976797104,
-0.02183622494339943,
-0.06936212629079819,
-0.044446658343076706,
0.00788285955786705,
0.01354866474866867,
0.08058816194534302,
-0.035877566784620285,
-0.026868585497140884,
-0.028786513954401016,
-0.04722677543759346,
-0.021783437579870224,
0.02739645540714264,
-0.005445859394967556,
-0.027660390362143517,
0.03937910497188568,
0.017322935163974762,
-0.00459686852991581,
0.01699741557240486,
-0.0184930469840765,
0.03593035414814949,
-0.045396823436021805,
0.05799532309174538,
0.0007846568478271365,
0.010249476879835129,
-0.0023886121343821287,
-0.0655614584684372,
0.008925402536988258,
-0.0304053146392107,
0.023806938901543617,
-0.01675107702612877,
-0.02085086703300476,
-0.009299310855567455,
-0.016443151980638504,
-0.016144026070833206,
0.07186070829629898,
0.04701562598347664,
0.004539682529866695,
0.03726762533187866,
0.017234956845641136,
0.01549298595637083,
0.03297428414225578,
0.033044666051864624,
-0.05831204727292061,
0.015959272161126137,
-0.034434724599123,
0.03512095659971237,
0.08565571159124374,
-0.014076534658670425,
0.006681955419480801,
-0.001013400498777628,
-0.02357819676399231,
-0.06939731538295746,
-0.010126307606697083,
0.021924203261733055,
0.06190156191587448,
-0.020534144714474678,
-0.02681579999625683,
-0.008723053149878979,
-0.040821950882673264,
-0.06587818264961243,
-0.01769244484603405,
0.00979198981076479,
0.04282785579562187,
0.027924327179789543,
-0.04592469707131386,
-0.004825612064450979,
0.03906238451600075,
-0.05620056763291359,
0.035807184875011444,
0.043144579976797104,
0.008401932194828987,
-0.0633092150092125,
0.029912637546658516,
0.0013097776100039482,
-0.019126491621136665,
0.07140322029590607,
-0.05056995153427124,
-0.03804183751344681,
-0.02521459385752678,
0.0019080303609371185,
0.013751015067100525,
-0.06637085974216461,
0.013575058430433273,
-0.059191830456256866,
-0.10712242871522903,
-0.005102743860334158,
-0.007157038431614637,
-0.036704566329717636,
-0.02183622494339943,
-0.02648148126900196,
-0.013654238544404507,
-0.019777530804276466,
-0.0038556510116904974,
-0.009457672014832497,
-0.010478220880031586,
-0.005582225974649191,
0.02336704730987549,
0.021167589351534843,
-0.03916795924305916,
-0.06316845118999481,
0.048704810440540314,
-0.027185307815670967,
0.00984477624297142,
0.018792174756526947,
0.0382881760597229,
0.0482473224401474,
0.05415946990251541,
-0.06535031646490097,
-0.02934957481920719,
0.041033100336790085,
-0.04008293151855469,
-0.004566076211631298,
0.02463393658399582,
0.035402484238147736,
0.006224467884749174,
0.007733296602964401,
-0.007135043852031231,
-0.0029340777546167374,
0.009686416015028954,
-0.030246954411268234,
0.018334686756134033,
-0.038745664060115814,
-0.061127353459596634,
-0.06834157556295395,
-0.0026481482200324535,
-0.0012602898059412837,
-0.006659960839897394,
0.037619538605213165,
0.000856689119245857,
-0.007249415386468172,
0.04673409461975098,
-0.013733419589698315,
-0.004610065370798111,
0.05757302790880203,
0.04170173406600952,
-0.006809523794800043,
-0.017490094527602196,
-0.001425249152816832,
0.05148492753505707,
-0.03842893987894058,
0.01900332234799862,
0.026745416224002838,
0.01369822770357132,
-0.051308970898389816,
-0.001252591609954834,
0.01648714207112789,
0.04268709197640419,
0.007746492978185415,
-0.004264750052243471,
-0.06640605628490448,
0.03174258768558502,
0.006233265623450279,
-0.009879968129098415,
0.009114556014537811,
-0.005401870235800743,
-0.0018343484262004495,
0.008617478422820568,
-0.00848551094532013,
0.0014285483630374074,
-0.03779549524188042,
-0.01039024256169796,
0.004482496529817581,
-0.018616218119859695,
0.012528115883469582,
-0.06380189210176468,
-0.08924522995948792,
0.016944628208875656,
-0.021413927897810936,
0.011481174267828465,
-0.022540051490068436,
0.023050326853990555,
0.021202780306339264,
0.022803986445069313,
-0.02961350977420807,
-0.056728437542915344,
0.0039018394891172647,
-0.02122037671506405,
-0.000342565675964579,
-0.002956072334200144,
0.051308970898389816,
0.06190156191587448,
-0.0008352444274351001,
0.022240925580263138,
0.018009167164564133,
-0.018211517482995987,
-0.02336704730987549,
0.007671711500734091,
-0.038675278425216675,
0.02546093240380287,
-0.0030638459138572216,
0.02375415340065956,
0.051238588988780975,
-0.012985603883862495,
-0.05415946990251541,
0.007117447908967733,
-0.03927353397011757,
0.026569459587335587,
-0.023191090673208237,
0.061268117278814316,
-0.027730774134397507,
0.032024115324020386,
-0.06327402591705322,
-0.004141580313444138,
-0.036458224058151245,
-0.016900639981031418,
0.002137873787432909,
0.015396210364997387,
-0.0758725255727768,
-0.04817694053053856,
0.013935769908130169,
-0.022029777988791466,
-0.009967946447432041,
-0.01562495343387127,
-0.02405327931046486,
0.0076981051824986935,
-0.021677864715456963,
0.012818444520235062,
0.018035560846328735,
-0.017745232209563255,
-0.00409539183601737,
-0.04384840652346611,
0.01098849531263113,
0.07629481703042984,
0.020023871213197708,
0.0009798587998375297,
0.05067552626132965,
0.06693392246961594,
0.04620622470974922,
-0.011692321859300137,
-0.03452270105481148,
0.035983141511678696,
0.007926848717033863,
-0.07805438339710236,
-0.06165522336959839,
-0.01947840489447117,
0.0019179278751835227,
-0.06432976573705673,
-0.00720102759078145,
-0.026798203587532043,
0.0034839424770325422,
0.011542758904397488,
-0.001577011775225401,
0.05940297618508339,
-0.023630982264876366,
-0.03033493272960186,
0.04191288352012634,
0.012281776405870914,
-0.006492801941931248,
-0.02934957481920719,
-0.04581912234425545,
0.03132028877735138,
0.0189681313931942,
0.03513855114579201,
0.02009425312280655,
0.011375599540770054,
0.03237602859735489,
-0.0021037820260971785,
0.0019982082303613424,
0.047825027257204056,
0.011885873973369598,
0.007372585125267506,
-0.024317214265465736,
-0.04064599424600601,
-0.027449242770671844,
-0.019196875393390656,
-0.0923420712351799,
-0.004724436905235052,
0.05982527509331703,
0.035068169236183167,
0.009404884651303291,
0.048810385167598724,
-0.008459118194878101,
-0.013328718952834606,
0.03955506160855293,
-0.054687339812517166,
0.000408274499932304,
-0.05127377808094025,
-0.08136237412691116,
-0.013064783997833729,
-0.03712686151266098,
-0.03341417387127876,
-0.03846413269639015,
-0.028329025954008102,
-0.011481174267828465,
-0.08016586303710938,
0.001920127309858799,
-0.00482121342793107,
0.039766211062669754,
0.03095078095793724,
0.025126615539193153,
0.012404946610331535,
0.006127691827714443,
0.04043484851717949,
0.02012944594025612,
-0.0038072627503424883,
0.00002223515184596181,
-0.026639843359589577,
-0.005969330668449402,
0.044376276433467865,
-0.06542069464921951,
-0.013856588862836361,
0.000698877964168787,
-0.005727390293031931,
0.06510397791862488,
0.006954688113182783,
0.014472437091171741,
-0.058030515909194946,
-0.03804183751344681,
-0.047754645347595215,
0.055743079632520676,
-0.02136114239692688,
0.019953487440943718,
0.019232066348195076,
0.026675034314393997,
0.02644629031419754,
-0.0711216926574707,
0.0005330937565304339,
0.0033035867381840944,
0.05053475871682167,
-0.021413927897810936,
-0.02081567607820034,
0.005775778088718653,
0.020551741123199463,
0.022540051490068436,
-0.04395398125052452,
0.07706902921199799,
0.0003620858769863844,
0.05933259427547455,
-0.027889134362339973,
0.050147656351327896,
0.010768549516797066,
0.03302707150578499,
-0.022698411718010902,
-0.021959394216537476,
0.05384274572134018,
-0.01805315539240837,
-0.0184930469840765,
0.01458680909126997,
-0.009607234969735146,
-0.019408022984862328,
0.028786513954401016,
-0.011102867312729359,
-0.038816045969724655,
-0.03367811068892479,
-0.013865387067198753,
-0.02194179967045784,
-0.024581149220466614,
-0.008058816194534302,
-0.003525732085108757,
0.009651224128901958,
0.013293527998030186,
-0.0234726220369339,
-0.028944874182343483,
-0.000834144651889801,
0.032639965415000916,
-0.02750203013420105,
0.006096899043768644,
0.07453525066375732,
0.03350215405225754,
-0.016328779980540276,
-0.020463762804865837,
0.033730898052453995,
0.016302386298775673,
0.005766980350017548,
0.05975488945841789,
0.0005614117835648358,
0.012475329451262951,
-0.030634058639407158,
-0.010249476879835129,
-0.008569090627133846,
-0.028311431407928467,
-0.045396823436021805,
-0.015651347115635872,
0.021924203261733055,
-0.02760760486125946,
-0.0949462279677391,
-0.014701181091368198,
-0.0527518130838871,
0.04796579107642174,
-0.011401993222534657,
-0.018756981939077377,
-0.002498585032299161,
-0.0018530439119786024,
0.014525224454700947,
0.1032513827085495,
-0.0026569459587335587,
0.002101582707837224,
-0.0004935035249218345,
0.04705081880092621,
0.03688052296638489,
0.04979574307799339,
0.015598560683429241,
-0.0491974912583828,
-0.002298434264957905,
0.026798203587532043,
0.015009105205535889,
-0.028205856680870056,
0.011146856471896172,
-0.07108650356531143,
-0.04701562598347664,
0.02368376962840557,
-0.028417004272341728,
0.001722176093608141,
0.016944628208875656,
-0.0034377537667751312,
0.046698905527591705,
0.007038267329335213,
-0.0031518242321908474,
0.02869853563606739,
0.07889898121356964,
-0.0720718577504158,
0.0472971573472023,
-0.04683966934680939,
0.05064033344388008,
-0.011613141745328903,
0.05693958327174187,
0.02644629031419754,
0.003490540897473693,
-0.04951421171426773,
0.05845281109213829,
-0.024897871538996696,
0.02289196476340294,
-0.04420031979680061,
0.0008247969672083855,
0.0015825104201212525,
0.06200713664293289,
-0.00019107796833850443,
0.06520954519510269,
-0.023155899718403816,
0.022188138216733932,
-0.016803864389657974,
-0.018827365711331367,
-0.026569459587335587,
0.035543251782655716,
-0.00020399977802298963,
-0.02597120776772499,
0.04479857161641121,
0.05278700590133667,
0.0008330449345521629,
0.014067737385630608,
0.06841196119785309,
0.013293527998030186,
0.057889748364686966,
-0.05078110098838806,
0.003732481272891164,
-0.014639596454799175,
-0.046487756073474884,
0.005982527509331703,
0.029050448909401894,
0.03811221942305565,
-0.05296296253800392,
-0.015290636569261551,
0.007693706080317497,
0.029965423047542572
]
|
41,402 | pyglove.core.symbolic.base | sym_jsonify | Converts representation of current object to a plain Python object. | @abc.abstractmethod
def sym_jsonify(self,
*,
hide_default_values: bool = False,
**kwargs) -> object_utils.JSONValueType:
"""Converts representation of current object to a plain Python object."""
| (self, *, hide_default_values: bool = False, **kwargs) -> Union[int, float, bool, str, List[Any], Dict[str, Any]] | [
0.015941308811306953,
-0.09044714272022247,
0.04699772596359253,
-0.0007419491885229945,
-0.020454969257116318,
-0.015132501721382141,
-0.01147982943803072,
0.008066318929195404,
0.03494390472769737,
-0.035378746688365936,
0.028508242219686508,
0.04758910834789276,
-0.017324106767773628,
0.03325671702623367,
-0.05204189196228981,
0.019880976527929306,
-0.007727142423391342,
0.06546981632709503,
0.06286076456308365,
0.027812495827674866,
-0.023411894217133522,
-0.025029506534337997,
0.020507149398326874,
0.04445824772119522,
0.004424517508596182,
-0.0006865068571642041,
0.03398725017905235,
0.01911565475165844,
-0.009923094883561134,
0.013514889404177666,
-0.043205901980400085,
-0.027742920443415642,
0.0375007763504982,
0.07319261133670807,
0.05190274119377136,
-0.05458137020468712,
-0.060634370893239975,
0.10457080602645874,
-0.1127806231379509,
-0.041153449565172195,
-0.01153201051056385,
0.010027457028627396,
-0.029377926141023636,
-0.05586850270628929,
-0.0006278031505644321,
0.01873299479484558,
0.000014115379599388689,
0.0531550869345665,
0.03687460348010063,
-0.049815502017736435,
0.01789809763431549,
-0.023342318832874298,
0.0008772937580943108,
0.03642236813902855,
-0.035761408507823944,
-0.0011751605197787285,
0.035170022398233414,
0.02513386867940426,
-0.0485631562769413,
0.04407558590173721,
-0.05673818662762642,
0.030021492391824722,
0.0077097490429878235,
-0.060147348791360855,
-0.0007615170907229185,
-0.004439737182110548,
-0.08355924487113953,
0.0025199095252901316,
-0.009357799775898457,
0.03076942078769207,
-0.016976231709122658,
-0.04324068874120712,
0.005592068191617727,
0.06181713938713074,
0.046684637665748596,
-0.024803388863801956,
-0.013210500590503216,
-0.023237956687808037,
-0.0188895370811224,
-0.06397395581007004,
0.016993625089526176,
-0.02534259296953678,
-0.058721065521240234,
-0.014201940037310123,
-0.07058355957269669,
0.01828075759112835,
0.01050578337162733,
0.0165935717523098,
-0.0006674824981018901,
0.019550496712327003,
-0.026142701506614685,
0.006400874350219965,
-0.02631663903594017,
0.04202313348650932,
-0.048389218747615814,
-0.019411347806453705,
0.019359165802598,
-0.07416665554046631,
0.055346690118312836,
0.0003628213016781956,
0.03332629054784775,
-0.003724421840161085,
-0.04985028877854347,
-0.04852836951613426,
-0.038753122091293335,
-0.053189873695373535,
0.027812495827674866,
0.006770490203052759,
-0.009036016650497913,
0.02210736833512783,
-0.041640471667051315,
0.03569183126091957,
-0.03795301169157028,
-0.039379291236400604,
0.009209954179823399,
0.04257972911000252,
-0.011705947108566761,
-0.014088881202042103,
0.05771223083138466,
0.008735976181924343,
-0.05684254691004753,
0.016315272077918053,
0.002937357872724533,
0.0013980170479044318,
0.019741827622056007,
0.03193479776382446,
0.04532793164253235,
0.012297332286834717,
-0.006131272297352552,
0.03861397132277489,
0.02033321186900139,
0.03410900756716728,
-0.03927493095397949,
0.055694565176963806,
0.03677023947238922,
0.01960267871618271,
0.0008196771959774196,
-0.00847941916435957,
0.011636372655630112,
0.016871869564056396,
0.03555268421769142,
-0.009957882575690746,
0.04494526982307434,
0.01838511973619461,
-0.06080830842256546,
-0.005848625209182501,
0.00865335576236248,
0.00261340057477355,
-0.04421473667025566,
-0.012871324084699154,
0.05252891406416893,
0.05851234123110771,
0.028786541894078255,
0.032717514783144,
-0.023377107456326485,
0.0254991352558136,
0.005274633876979351,
-0.03470039367675781,
-0.03087378293275833,
-0.023620618507266045,
-0.0033961161971092224,
-0.03163910657167435,
0.036004919558763504,
-0.048737093806266785,
0.000894143886398524,
0.025812221691012383,
0.0660959854722023,
-0.04578016698360443,
-0.006983562838286161,
0.037222474813461304,
-0.023029232397675514,
-0.0697486624121666,
-0.03760513663291931,
0.012236454524099827,
0.08300264179706573,
0.06884418427944183,
-0.00012610419071279466,
0.02102896012365818,
-0.004709339234977961,
0.050302524119615555,
0.03812694922089577,
-0.051137421280145645,
-0.07173153758049011,
0.0069966078735888,
0.06386959552764893,
-0.02812558226287365,
0.0021557293366640806,
-0.025029506534337997,
0.05252891406416893,
0.027377653867006302,
0.016437027603387833,
0.04421473667025566,
0.0036048402544111013,
-0.019637465476989746,
0.004007069393992424,
-0.04786740988492966,
0.012706083245575428,
0.01056666113436222,
-0.07009653002023697,
0.05830361694097519,
-0.03282187506556511,
-0.032160915434360504,
-0.003626582445576787,
-0.029621437191963196,
-0.0005864931736141443,
-0.010723204351961613,
0.002348146867007017,
-0.05948638916015625,
0.003915752284228802,
-0.0365615151822567,
-0.0021589905954897404,
-0.0019013467244803905,
-0.054964032024145126,
0.018298152834177017,
0.007344481535255909,
-0.02330753207206726,
0.029534470289945602,
-0.02596876583993435,
-0.034056827425956726,
0.028264731168746948,
0.04866751655936241,
-0.008044577203691006,
-0.03136080503463745,
0.0004593018675222993,
0.04038812592625618,
-0.021185502409934998,
0.013393133878707886,
-0.04967635124921799,
0.021776888519525528,
-0.06929642707109451,
-0.019272198900580406,
-0.04365813732147217,
-0.016158729791641235,
0.032160915434360504,
0.046093255281448364,
0.008205468766391277,
0.05312030017375946,
-0.07736708968877792,
-0.04793698340654373,
0.030838996171951294,
0.010062243789434433,
0.002682975260540843,
-0.006713960785418749,
0.023585831746459007,
-0.04317111521959305,
0.020837629213929176,
0.028421273455023766,
0.07736708968877792,
-0.011445041745901108,
-0.011445041745901108,
0.05972990021109581,
-0.05454658344388008,
0.009897003881633282,
-0.008805550634860992,
0.0057138241827487946,
-0.004978941287845373,
-0.013427921570837498,
0.005783398635685444,
0.003950539510697126,
-0.003765731817111373,
0.011688553728163242,
-0.02318577654659748,
-0.05538148060441017,
0.06258246302604675,
0.025151262059807777,
-0.014271514490246773,
-0.006300861015915871,
0.010192696936428547,
-0.019637465476989746,
0.04835443198680878,
-0.0019817925058305264,
-0.05207667872309685,
0.012279938906431198,
-0.009462161920964718,
-0.023394500836730003,
0.008070668205618858,
-0.02330753207206726,
-0.014297605492174625,
0.0001607556623639539,
-0.043692924082279205,
-0.011610281653702259,
-0.025290410965681076,
0.03231745958328247,
-0.022507423534989357,
-0.015915216878056526,
-0.023342318832874298,
0.0015165115473791957,
0.006957472302019596,
-0.030856389552354813,
-0.053294237703084946,
0.07521027326583862,
0.040457699447870255,
-0.006983562838286161,
0.031917404383420944,
0.06470449268817902,
-0.001532818074338138,
-0.040457699447870255,
-0.01993315853178501,
0.030943358317017555,
-0.015245561487972736,
-0.01588043011724949,
-0.0008022835245355964,
0.03927493095397949,
0.02269875258207321,
0.01489768736064434,
-0.03990110382437706,
0.01165376603603363,
-0.0005247999797575176,
-0.029395319521427155,
0.07465367764234543,
-0.012923505157232285,
0.051867954432964325,
-0.009923094883561134,
0.048737093806266785,
-0.027360260486602783,
-0.036109279841184616,
0.011584191583096981,
-0.0015078147407621145,
0.05941681191325188,
0.05649467557668686,
-0.03701375052332878,
-0.045119207352399826,
-0.06139969080686569,
-0.021672526374459267,
0.0017545875161886215,
-0.04125780984759331,
-0.042475368827581406,
0.013784491457045078,
0.042962390929460526,
-0.0022372622042894363,
0.0012719129445031285,
0.008966442197561264,
0.0399358905851841,
-0.0013404005439952016,
-0.03857918456196785,
-0.02642100118100643,
0.0019198275404050946,
-0.010888444259762764,
-0.050789546221494675,
-0.0010653629433363676,
-0.015384710393846035,
-0.03550050035119057,
0.014636781997978687,
0.0049876379780471325,
-0.05277242884039879,
0.03172607347369194,
0.02861260436475277,
-0.028873510658740997,
0.06032128259539604,
-0.01501944288611412,
-0.04894581809639931,
0.01972443424165249,
0.010079638101160526,
0.03257836401462555,
-0.03550050035119057,
-0.027186322957277298,
-0.0069052912294864655,
-0.021933430805802345,
-0.04365813732147217,
-0.03476996719837189,
0.027864675968885422,
-0.004609325435012579,
-0.002772117732092738,
0.019689645618200302,
0.03398725017905235,
-0.016750114038586617,
0.025029506534337997,
-0.0188895370811224,
0.0507199726998806,
-0.03645715489983559,
-0.03296102583408356,
-0.018489481881260872,
-0.04226664453744888,
-0.06397395581007004,
-0.025203444063663483,
0.05190274119377136,
-0.023968491703271866,
0.037570349872112274,
-0.0473455972969532,
0.016376150771975517,
0.028177762404084206,
-0.02462945133447647,
-0.008044577203691006,
0.027951644733548164,
0.02908223308622837,
0.0036091888323426247,
0.04960677772760391,
0.02101156674325466,
-0.033830709755420685,
0.0069183362647891045,
-0.05586850270628929,
-0.03583098202943802,
0.00037885611527599394,
0.009122985415160656,
-0.003154778853058815,
-0.047902196645736694,
-0.005057212430983782,
-0.007035743910819292,
-0.0820285975933075,
0.027725527063012123,
0.0279864314943552,
-0.004552796017378569,
0.05127657204866409,
-0.036248430609703064,
-0.035065658390522,
-0.020733267068862915,
0.06439140439033508,
-0.012184273451566696,
0.014245424419641495,
0.031656499952077866,
0.047067299485206604,
-0.03579619526863098,
-0.06999216973781586,
-0.06279118359088898,
0.06414789706468582,
-0.00834896694868803,
0.02068108692765236,
0.017489345744252205,
-0.0004943610401824117,
0.0022937916219234467,
0.020385393872857094,
0.024716420099139214,
-0.005326814483851194,
0.0488414540886879,
-0.013958428986370564,
-0.007914124988019466,
0.024072853848338127,
0.03198697790503502,
0.029899736866354942,
0.024681633338332176,
0.06620034575462341,
-0.04143174737691879,
0.018124215304851532,
-0.04859794303774834,
0.024716420099139214,
-0.0012708257418125868,
0.03188261762261391,
-0.10408378392457962,
-0.021933430805802345,
0.05106784775853157,
0.008170681074261665,
0.025516528636217117,
-0.057051271200180054,
-0.014593297615647316,
0.03857918456196785,
-0.003580923890694976,
0.0021905165631324053,
0.08724670112133026,
0.029760587960481644,
-0.008688143454492092,
0.03631800413131714,
0.0038244356401264668,
0.09476077556610107,
-0.06453055143356323,
-0.07694964110851288,
-0.04654549062252045,
0.0562511645257473,
-0.025673072785139084,
0.016402240842580795,
0.024072853848338127,
0.04484090954065323,
-0.034804753959178925,
-0.028803935274481773,
-0.030143247917294502,
-0.007848897948861122,
0.04132738336920738,
-0.04195355623960495,
0.0016752288211137056,
-0.06251288950443268,
-0.02729068510234356,
0.06766141951084137,
0.023829342797398567,
-0.0034461228642612696,
-0.032978419214487076,
0.0002831908641383052,
0.04811092093586922,
0.011905974708497524,
-0.026838449761271477,
-0.06626992672681808,
-0.06546981632709503,
-0.04696293920278549,
-0.026629725471138954,
0.004374510608613491,
-0.016550086438655853,
0.034804753959178925,
0.05033731088042259,
0.04313632845878601,
-0.006631340831518173,
0.06953993439674377,
0.029151808470487595,
-0.021081140264868736,
0.07757581770420074,
-0.04000546410679817,
0.011149349622428417,
0.025168655440211296,
0.019324379041790962,
0.0029830161947757006,
-0.05586850270628929,
0.016776204109191895,
-0.01069711335003376,
-0.0010457950411364436,
-0.03386549651622772,
-0.011688553728163242,
0.014288908801972866,
0.009514342993497849,
-0.04150132089853287,
-0.009088197723031044,
0.019272198900580406,
-0.0488414540886879,
0.0005489880568347871,
0.006613946985453367,
0.03854439780116081,
0.06967908143997192,
0.016515299677848816,
0.01165376603603363,
-0.013732310384511948,
0.006105181761085987,
0.007922821678221226,
0.004115779884159565,
-0.07806283980607986,
-0.030682452023029327,
-0.0365615151822567,
-0.026873236522078514,
-0.029638832435011864,
-0.02163773961365223,
-0.006974866148084402,
-0.03543092682957649,
0.02174209989607334,
0.022803114727139473,
0.03802258521318436,
-0.003037371439859271,
-0.00823155976831913,
-0.04675421491265297,
0.02835169993340969,
-0.060147348791360855,
0.035152629017829895,
0.020628904923796654,
0.0658176839351654,
0.0344046987593174,
-0.00948825292289257,
0.04727602377533913,
0.04219707101583481,
-0.021098535507917404,
-0.013914944604039192,
0.014367179945111275,
0.00528333056718111,
-0.045362718403339386,
0.026490574702620506,
0.0015447762561962008,
-0.021081140264868736,
-0.04233621805906296,
-0.02619488351047039,
0.052111465483903885,
0.02741244062781334,
-0.009418678469955921,
-0.03329150378704071,
0.06480885297060013,
0.017150169238448143,
0.001268651569262147,
0.035030871629714966,
0.025794828310608864,
0.0863422304391861,
0.022420454770326614,
-0.07569729536771774,
-0.004259277600795031,
0.06762663275003433,
-0.003567878622561693,
0.06484363973140717,
-0.004372336436063051,
-0.009044714272022247,
-0.008044577203691006,
-0.022020399570465088,
0.07333175837993622,
0.0025416514836251736,
0.0418144091963768,
0.04543229192495346,
-0.009122985415160656,
0.031308624893426895,
-0.026855843141674995,
-0.06585247814655304,
-0.03548310697078705,
0.035413533449172974,
-0.01268868986517191,
-0.0586862787604332,
0.048389218747615814,
-0.026507969945669174,
-0.0009196908795274794,
0.058825429528951645,
0.017028413712978363,
-0.012349513359367847,
-0.046336766332387924,
0.042371004819869995,
-0.02200300619006157,
-0.006544372532516718,
-0.004691945388913155,
0.003733118763193488,
-0.024072853848338127,
-0.0005642074975185096,
0.022176941856741905,
-0.036596305668354034,
-0.03127383813261986,
0.041153449565172195,
0.01596739888191223,
-0.009540433995425701,
0.03136080503463745,
0.022663965821266174,
-0.030595485121011734,
0.00852290354669094,
-0.013949732296168804,
-0.02102896012365818,
0.007401010952889919,
0.03386549651622772,
0.045849740505218506,
-0.058581914752721786,
0.0023351015988737345,
0.005935593508183956,
-0.03176086023449898,
0.03017803654074669,
-0.029047446325421333,
0.002763421041890979,
-0.007657567970454693,
-0.0024938189890235662,
-0.031813040375709534,
-0.025186048820614815,
-0.032630544155836105,
-0.01358446478843689,
-0.02438594028353691,
0.03363937884569168,
0.007344481535255909,
-0.023620618507266045,
-0.00591819966211915,
-0.03704854100942612,
0.016541389748454094,
-0.012540843337774277,
0.006296512205153704,
-0.039240144193172455,
-0.01660226844251156,
0.016271788626909256,
0.015010746195912361,
0.09086458384990692,
0.012845233082771301,
-0.002606877824291587,
-0.03944886848330498,
0.05673818662762642,
-0.055242329835891724,
0.003000409808009863,
-0.015289044938981533,
-0.020020127296447754,
0.01598479226231575,
0.0016676191007718444,
-0.054024770855903625,
0.0060399556532502174,
-0.014480238780379295,
-0.021672526374459267,
0.016619661822915077,
0.03520480915904045,
-0.004644112661480904,
-0.01147982943803072,
0.03195219114422798,
-0.0059747290797531605,
-0.03476996719837189,
-0.010958018712699413,
-0.07827156037092209,
0.017037110403180122,
0.04383207485079765,
0.015480375848710537,
-0.07465367764234543,
-0.027969038113951683,
0.08759457617998123,
-0.04772825911641121,
0.023516256362199783,
0.024594664573669434,
0.036700665950775146,
-0.0015849991468712687,
-0.07100100070238113,
-0.011610281653702259,
0.009418678469955921,
0.07604517042636871,
0.04877188056707382,
-0.030212823301553726,
-0.00860117468982935,
-0.04292760416865349,
-0.04038812592625618,
0.06790492683649063,
-0.07465367764234543,
-0.0482848584651947,
-0.001789374859072268,
0.03316975012421608,
-0.007366223726421595,
-0.05385083705186844,
0.025899190455675125,
-0.0771583691239357,
-0.014080184511840343,
-0.01574128121137619,
-0.019446134567260742,
-0.015549950301647186,
-0.040562063455581665,
-0.01873299479484558,
0.04358856379985809,
0.03569183126091957,
0.025899190455675125,
-0.0010746032930910587,
0.020037520676851273,
0.01370622031390667,
0.08648137748241425,
0.045014847069978714,
0.0007381443283520639,
-0.01261911541223526,
0.04661506414413452,
-0.060286495834589005,
-0.033726345747709274,
0.07054876536130905,
-0.0127495676279068,
-0.038753122091293335,
-0.03826609626412392,
0.00943607185035944,
-0.019776614382863045,
0.03704854100942612,
-0.0022253040224313736,
0.04289281740784645,
-0.019498316571116447,
-0.035413533449172974,
0.03798779845237732,
0.02668190561234951,
0.029012659564614296,
0.044388674199581146,
-0.05423349514603615,
-0.021185502409934998,
0.016628358513116837,
0.016680540516972542,
0.05826883018016815,
0.05298114940524101,
-0.024838175624608994,
-0.002976493677124381,
-0.0032787087839096785,
-0.03228267282247543,
-0.004289716482162476,
0.01346270926296711,
0.005892109125852585,
0.029604043811559677,
-0.03172607347369194,
0.028943084180355072,
0.001139286090619862,
0.03386549651622772,
0.041292596608400345,
-0.013062654063105583,
0.022629179060459137,
0.0559728629887104,
0.0002645741915330291,
0.030612878501415253,
0.0118363993242383,
0.06303469836711884,
-0.0344046987593174,
-0.0042005740106105804,
0.0922560840845108,
0.0408751480281353,
-0.039135780185461044,
0.05899936333298683,
0.03388288989663124,
-0.025899190455675125,
-0.09343884885311127,
-0.013784491457045078,
-0.020768053829669952,
0.01267999317497015,
-0.042614515870809555,
0.04435388371348381,
-0.02186385728418827,
0.0007039005286060274
]
|
41,403 | pyglove.core.symbolic.base | sym_keys | Iterates the keys of symbolic attributes. | @abc.abstractmethod
def sym_keys(self) -> Iterator[Union[str, int]]:
"""Iterates the keys of symbolic attributes."""
| (self) -> Iterator[Union[str, int]] | [
0.03234932944178581,
-0.05341199412941933,
-0.010748381726443768,
0.006229373160749674,
-0.0020381121430546045,
-0.008799261413514614,
0.0034706508740782738,
-0.020541738718748093,
0.07973597943782806,
-0.00030821291147731245,
-0.007874622009694576,
0.0040002563036978245,
0.06636561453342438,
0.07181794941425323,
-0.052647970616817474,
-0.009723899886012077,
-0.016626132652163506,
0.06341371685266495,
-0.04823748767375946,
0.007023781072348356,
-0.04167385771870613,
0.0445910282433033,
0.014854993671178818,
-0.018926875665783882,
-0.004440870136022568,
0.06942170113325119,
0.028720233589410782,
0.019152609631419182,
0.06424719840288162,
-0.01740751788020134,
-0.07806902378797531,
-0.007323312107473612,
0.0291543360799551,
0.025177955627441406,
0.024934858083724976,
-0.04771656543016434,
0.004293275531381369,
0.037680111825466156,
0.00988017674535513,
0.03181104362010956,
0.04525086283683777,
0.010279551148414612,
0.03986798971891403,
-0.05438438430428505,
-0.03386000916361809,
-0.0027348469011485577,
0.015454054810106754,
-0.039242882281541824,
0.0048923371359705925,
-0.05431492626667023,
0.017832938581705093,
-0.011911777779459953,
0.021114753559231758,
-0.019031060859560966,
0.020836928859353065,
0.020819563418626785,
-0.01960407756268978,
-0.025837790220975876,
-0.03847886249423027,
0.04184749722480774,
-0.033599548041820526,
-0.019690897315740585,
0.047438740730285645,
-0.0414307601749897,
0.01748565584421158,
-0.08723727613687515,
-0.059037964791059494,
-0.011772864498198032,
-0.008126402273774147,
-0.005230937153100967,
-0.027400560677051544,
-0.019881902262568474,
-0.00166586902923882,
0.04407010227441788,
-0.005313416477292776,
-0.029866263270378113,
-0.023754097521305084,
0.016495902091264725,
0.038374677300453186,
-0.08890422433614731,
-0.04827221855521202,
0.021809319034218788,
-0.054488565772771835,
0.003978550899773836,
-0.053828731179237366,
0.034710850566625595,
0.007896327413618565,
-0.02071538008749485,
-0.001226340071298182,
0.048341672867536545,
-0.06480284780263901,
0.023250538855791092,
-0.002893294207751751,
0.09105737507343292,
-0.018544865772128105,
0.0227469801902771,
0.005291711539030075,
-0.05059900879859924,
0.006385650485754013,
-0.021809319034218788,
0.032436151057481766,
0.01639171689748764,
0.046501077711582184,
0.02460493892431259,
-0.03405101224780083,
-0.041291847825050354,
-0.061989862471818924,
-0.048098575323820114,
0.015549557283520699,
0.005157139617949724,
-0.08952933549880981,
0.022017687559127808,
0.03234932944178581,
-0.028824416920542717,
-0.009611032903194427,
-0.009732581675052643,
0.019742989912629128,
-0.02505640685558319,
0.028338221833109856,
-0.03451984375715256,
-0.010487920604646206,
0.027348468080163002,
0.010270869359374046,
0.04830694571137428,
0.06035763397812843,
0.030161453410983086,
0.03806212171912193,
0.04837640002369881,
-0.03188050165772438,
0.03474557772278786,
0.015671106055378914,
0.01626148633658886,
0.0076662530191242695,
0.08237532526254654,
0.013847875408828259,
0.010635515674948692,
0.06580996513366699,
0.00523527804762125,
-0.014820265583693981,
0.02479594387114048,
0.05032118037343025,
-0.005513104144483805,
0.024084016680717468,
0.045806512236595154,
-0.08216695487499237,
-0.0069977352395653725,
-0.01639171689748764,
-0.011642633937299252,
0.011824957095086575,
-0.023146353662014008,
-0.009454756043851376,
0.03090810962021351,
0.02936270460486412,
0.04139602929353714,
-0.03688136115670204,
0.019204702228307724,
-0.04827221855521202,
-0.018041307106614113,
-0.026671268045902252,
-0.021496763452887535,
-0.05368981882929802,
-0.021045297384262085,
-0.022642794996500015,
-0.053342536091804504,
0.00734067615121603,
0.03339117765426636,
-0.027817299589514732,
-0.04823748767375946,
0.030595555901527405,
-0.005704109091311693,
-0.00391994696110487,
-0.07404055446386337,
-0.01376105472445488,
-0.010270869359374046,
0.02068065106868744,
0.010566058568656445,
0.00438009575009346,
0.04851531609892845,
0.03729810193181038,
0.019881902262568474,
0.05445383861660957,
-0.056294433772563934,
-0.11439473927021027,
-0.010288232937455177,
0.05625970661640167,
0.01034032553434372,
-0.002713141730055213,
0.025594692677259445,
0.06254551559686661,
-0.00786594022065401,
-0.019933994859457016,
-0.01661745086312294,
-0.016348306089639664,
0.019708260893821716,
0.008890422992408276,
-0.03280079737305641,
0.004056689329445362,
0.027157463133335114,
-0.060843829065561295,
0.06494175642728806,
-0.016565358266234398,
-0.0049531115218997,
-0.059003233909606934,
0.059975624084472656,
0.030786560848355293,
-0.017885029315948486,
0.012762618251144886,
-0.06025345250964165,
-0.02186140976846218,
-0.013613459654152393,
-0.002737017348408699,
-0.02819930948317051,
0.0180065780878067,
0.016591403633356094,
0.020368097350001335,
-0.0013185868738219142,
-0.020177092403173447,
-0.002171598607674241,
0.008096015080809593,
-0.00900328904390335,
0.07619369775056839,
0.03047400712966919,
0.011772864498198032,
-0.024865401908755302,
0.05615552142262459,
-0.07459620386362076,
0.013969424180686474,
0.006251078564673662,
-0.06466393172740936,
-0.010974115692079067,
0.039173424243927,
-0.011069618165493011,
0.018041307106614113,
0.012797346338629723,
0.043097712099552155,
-0.013422454707324505,
0.011078299954533577,
-0.000337243516696617,
-0.023250538855791092,
0.0026306621730327606,
-0.06275387853384018,
0.06640034168958664,
-0.014186475425958633,
0.04827221855521202,
-0.06660871207714081,
-0.006728591397404671,
0.017155736684799194,
0.08147238940000534,
-0.03611734136939049,
-0.005795270670205355,
0.009246386587619781,
-0.0759158730506897,
0.007883304730057716,
-0.005947206635028124,
0.029709987342357635,
-0.04837640002369881,
-0.06969952583312988,
-0.009350571781396866,
0.043340809643268585,
-0.021114753559231758,
0.018544865772128105,
0.03847886249423027,
-0.036325711756944656,
0.048550043255090714,
0.05445383861660957,
0.01275393646210432,
0.05296052619814873,
0.03844413161277771,
-0.0655321404337883,
0.016574040055274963,
0.026306621730327606,
0.0002029430033871904,
-0.058829594403505325,
0.039972174912691116,
-0.02592461183667183,
0.038131579756736755,
0.018128126859664917,
0.007813848555088043,
-0.05528731644153595,
-0.05212704837322235,
-0.007844234816730022,
-0.009107474237680435,
-0.04417428746819496,
0.015349870547652245,
-0.05410655587911606,
0.008000512607395649,
-0.011903095059096813,
-0.032401423901319504,
0.013005715794861317,
-0.019256794825196266,
0.09869758039712906,
0.029709987342357635,
-0.015896840021014214,
-0.024518119171261787,
0.10217040777206421,
0.009176930412650108,
-0.009541576728224754,
-0.011225895024836063,
0.04205586761236191,
0.005513104144483805,
0.03445038944482803,
-0.009680490009486675,
0.0066330889239907265,
0.002806473756209016,
-0.028945965692400932,
-0.00931584369391203,
0.05580823868513107,
0.045875970274209976,
-0.056745901703834534,
0.044729940593242645,
-0.017885029315948486,
0.05806557461619377,
-0.04205586761236191,
0.04254206269979477,
-0.01354400347918272,
-0.08341716974973679,
-0.024084016680717468,
0.028268765658140182,
0.018162855878472328,
0.1051570326089859,
-0.034224655479192734,
0.0026805840898305178,
-0.03722864389419556,
-0.03865250200033188,
-0.031533218920230865,
0.011807592585682869,
0.009454756043851376,
-0.028824416920542717,
0.03396419435739517,
0.006745955441147089,
-0.015271731652319431,
0.0009517701109871268,
-0.00407839473336935,
0.024205565452575684,
-0.06334426254034042,
0.046327438205480576,
0.016001025214791298,
0.010158002376556396,
-0.015054680407047272,
-0.0436880923807621,
0.019881902262568474,
-0.04733455553650856,
0.025108499452471733,
-0.013101218268275261,
-0.038999784737825394,
-0.0020229185465723276,
0.001645249081775546,
-0.0027391877956688404,
0.06942170113325119,
0.05806557461619377,
0.027626294642686844,
0.029258519411087036,
0.04101401939988136,
0.0017418370116502047,
0.048584770411252975,
0.023563092574477196,
-0.055183131247758865,
0.024848036468029022,
-0.036950819194316864,
0.036256253719329834,
0.10501811653375626,
-0.014646624214947224,
-0.018562229350209236,
-0.016192030161619186,
-0.02931061200797558,
-0.05646807700395584,
-0.020559102296829224,
0.004519009031355381,
0.07820793986320496,
-0.024969585239887238,
-0.024657031521201134,
0.0034380932338535786,
-0.054245468229055405,
-0.06494175642728806,
-0.015132819302380085,
0.01479421928524971,
0.05056427791714668,
0.03663826733827591,
-0.04570233076810837,
0.01889214850962162,
0.025837790220975876,
-0.055391501635313034,
0.04306298494338989,
0.06358736008405685,
-0.031307484954595566,
-0.04990444332361221,
0.03349536284804344,
-0.013691598549485207,
0.0017309844261035323,
0.07570750266313553,
-0.03257506340742111,
-0.041986409574747086,
-0.026514992117881775,
0.0008790579158812761,
0.013248813338577747,
-0.055391501635313034,
0.020941112190485,
-0.055426228791475296,
-0.06706018000841141,
-0.014021515846252441,
0.0007108431309461594,
-0.028147216886281967,
-0.021340487524867058,
-0.00876019150018692,
0.009637079201638699,
-0.002009895397350192,
0.016556676477193832,
-0.038096848875284195,
-0.02158358506858349,
-0.020142363384366035,
0.0052569834515452385,
0.023962467908859253,
-0.029970448464155197,
-0.05365509167313576,
0.05636389181017876,
-0.04170858487486839,
0.0241013802587986,
0.0112606231123209,
0.03851358965039253,
0.05938524380326271,
0.02840767800807953,
-0.06636561453342438,
-0.025559965521097183,
0.04625798016786575,
-0.015028634108603,
0.018041307106614113,
0.022364970296621323,
0.022382333874702454,
0.009263751097023487,
0.02503904141485691,
-0.0161138903349638,
0.01821494847536087,
0.0076705943793058395,
-0.026202436536550522,
-0.005083342082798481,
-0.031533218920230865,
-0.04841113090515137,
-0.04167385771870613,
-0.007831212133169174,
0.0031971661373972893,
-0.006754637695848942,
0.025994068011641502,
-0.02000345103442669,
-0.00083781813737005,
0.059281062334775925,
-0.011686043813824654,
0.017025506123900414,
0.08890422433614731,
0.05438438430428505,
0.0026523673441261053,
-0.0065506091341376305,
-0.008790578693151474,
0.04577178508043289,
-0.05573878437280655,
0.03293970972299576,
0.04056255519390106,
0.005786588415503502,
-0.028511863201856613,
-0.003948163706809282,
0.011989915743470192,
0.04375755041837692,
0.039729077368974686,
-0.00756206875666976,
-0.052231233566999435,
0.030387187376618385,
0.02729637548327446,
-0.019465163350105286,
0.014290659688413143,
0.007983148097991943,
-0.0006142552592791617,
0.018753236159682274,
-0.013778419233858585,
-0.0017157908296212554,
-0.03636043891310692,
-0.028372950851917267,
0.018492773175239563,
-0.022434426471590996,
0.024969585239887238,
-0.07911086827516556,
-0.08682053536176682,
0.0024070993531495333,
-0.03271397575736046,
0.0211668461561203,
-0.04799439013004303,
0.03484976291656494,
-0.006607042625546455,
0.01001040730625391,
-0.022868528962135315,
-0.06876186281442642,
-0.009480802342295647,
-0.01795448735356331,
0.013778419233858585,
0.003613904817029834,
0.04139602929353714,
0.09772519022226334,
-0.00795276090502739,
0.023493636399507523,
0.01982980966567993,
-0.03851358965039253,
-0.00955025851726532,
-0.002522136550396681,
-0.023597821593284607,
0.022364970296621323,
0.008022217079997063,
0.026254529133439064,
0.049730803817510605,
-0.0005920075345784426,
-0.04938352108001709,
0.012476110830903053,
-0.03865250200033188,
0.030873382464051247,
-0.018388589844107628,
0.06494175642728806,
-0.01640908047556877,
0.014985224232077599,
-0.051293570548295975,
-0.006641770713031292,
-0.03181104362010956,
-0.020802199840545654,
0.03069974109530449,
-0.000350809219526127,
-0.06348317116498947,
-0.04670944809913635,
0.00922902300953865,
-0.012458746321499348,
0.022625431418418884,
-0.018023943528532982,
-0.03486712649464607,
0.013934696093201637,
0.00352925481274724,
0.002934534102678299,
0.016817137598991394,
-0.014203839004039764,
0.02939743362367153,
-0.06403882801532745,
0.01618334837257862,
0.04011108726263046,
0.03090810962021351,
0.015783973038196564,
0.04726509749889374,
0.0569542720913887,
0.03847886249423027,
-0.004545054864138365,
-0.020593831315636635,
0.051779765635728836,
0.025872519239783287,
-0.07806902378797531,
-0.06021872162818909,
-0.03412047028541565,
-0.0015985830686986446,
-0.051571398973464966,
-0.0010868845274671912,
-0.01229378767311573,
-0.011651315726339817,
0.01229378767311573,
-0.0007471992284990847,
0.07355435937643051,
-0.03096020221710205,
-0.02825140208005905,
0.041500214487314224,
0.0038787072990089655,
-0.01400415226817131,
-0.016678225249052048,
-0.05737100914120674,
0.015401963144540787,
0.006177281029522419,
0.031481124460697174,
0.006424719467759132,
0.0252300463616848,
0.02227814868092537,
-0.02135785110294819,
0.012042008340358734,
0.03816630691289902,
0.00723215052857995,
-0.010071181692183018,
0.0017266434151679277,
-0.050876833498477936,
-0.014733444899320602,
-0.028581319376826286,
-0.09772519022226334,
0.004017620347440243,
0.03955543413758278,
0.04528558999300003,
0.01819758489727974,
0.04486885294318199,
-0.005843021906912327,
0.0007379745366051793,
0.03373846039175987,
-0.0664350762963295,
-0.013700280338525772,
-0.06080910190939903,
-0.08834857493638992,
-0.007470907177776098,
-0.04160439968109131,
-0.030352458357810974,
-0.026688631623983383,
-0.01911788247525692,
-0.0074622249230742455,
-0.05851703882217407,
-0.01642644591629505,
0.010210094973444939,
0.021114753559231758,
0.04254206269979477,
0.033339086920022964,
0.009741264395415783,
0.02321581169962883,
0.03386000916361809,
0.041500214487314224,
0.014629259705543518,
-0.005986275617033243,
-0.054731663316488266,
-0.0007471992284990847,
0.05393291637301445,
-0.05348144844174385,
-0.01646985486149788,
0.005330780986696482,
0.02437920682132244,
0.0291543360799551,
0.007965783588588238,
0.013387726619839668,
-0.05862122401595116,
-0.026688631623983383,
-0.022017687559127808,
0.051988136023283005,
-0.03214096277952194,
0.019031060859560966,
0.011885731481015682,
0.025073770433664322,
0.03594370186328888,
-0.051328301429748535,
0.0014401356456801295,
-0.0041673858650028706,
0.040597282350063324,
-0.015775291249155998,
-0.018058670684695244,
-0.0013142458628863096,
0.016834501177072525,
0.0063075115904212,
-0.044973038136959076,
0.07081082463264465,
-0.027834663167595863,
0.05546095594763756,
-0.036742448806762695,
0.049730803817510605,
-0.0035704944748431444,
0.03549223393201828,
-0.01400415226817131,
-0.0195867121219635,
0.055426228791475296,
-0.041500214487314224,
-0.024952221661806107,
0.014646624214947224,
-0.01511545479297638,
-0.03184577077627182,
0.02278170734643936,
-0.020750107243657112,
-0.04160439968109131,
-0.03486712649464607,
-0.003140732878819108,
-0.025421053171157837,
-0.009029335342347622,
-0.005834340117871761,
-0.01272789016366005,
0.006745955441147089,
-0.01115643884986639,
-0.01887478493154049,
-0.024188200011849403,
-0.02500431425869465,
0.026445534080266953,
-0.018996333703398705,
0.010956751182675362,
0.05914214625954628,
0.03455457091331482,
-0.05101574584841728,
-0.04209059476852417,
0.04625798016786575,
0.02840767800807953,
-0.0011091323103755713,
0.07487402856349945,
-0.015323824249207973,
-0.0017667978536337614,
-0.01147767435759306,
-0.005087683442980051,
0.006646112073212862,
-0.023563092574477196,
-0.0549747608602047,
0.0010570400627329946,
0.011824957095086575,
0.0009013056987896562,
-0.09293270111083984,
0.00011646160419331864,
-0.049939170479774475,
0.05202286317944527,
0.0044278474524617195,
-0.02253860980272293,
0.005378532223403454,
0.001606179866939783,
0.0227469801902771,
0.06758110225200653,
-0.00029681771411560476,
0.006741614546626806,
0.00909879244863987,
0.02866814099252224,
0.02595933899283409,
0.02206978015601635,
0.0060079810209572315,
-0.033599548041820526,
0.005482716951519251,
0.03092547506093979,
0.009732581675052643,
-0.028945965692400932,
0.008499730378389359,
-0.05757937952876091,
-0.07702717930078506,
0.03260979428887367,
-0.023111626505851746,
0.007844234816730022,
0.011008843779563904,
0.008282679133117199,
0.06226768717169762,
0.022399697452783585,
-0.01626148633658886,
0.03486712649464607,
0.08348662406206131,
-0.07633261382579803,
0.03339117765426636,
-0.0463968925178051,
0.05480112135410309,
-0.02934534102678299,
0.05820448696613312,
0.036985546350479126,
-0.009289797395467758,
-0.059524159878492355,
0.04886259511113167,
-0.013639505952596664,
-0.007787801790982485,
-0.038583043962717056,
-0.0328528918325901,
0.004356220364570618,
0.06862294673919678,
-0.019465163350105286,
0.06230241432785988,
-0.034033648669719696,
0.019881902262568474,
0.019482528790831566,
-0.026532355695962906,
-0.02205241657793522,
0.05125884339213371,
0.017016824334859848,
-0.03248824551701546,
0.023962467908859253,
0.047473467886447906,
0.00244182744063437,
-0.019187338650226593,
0.03757592663168907,
0.015072044916450977,
0.019933994859457016,
-0.022608067840337753,
0.011460310779511929,
0.0022681865375488997,
-0.0513630285859108,
-0.023528365418314934,
-0.007127965800464153,
0.037680111825466156,
-0.036777179688215256,
-0.01674768142402172,
0.026254529133439064,
0.014099654741585255
]
|
41,413 | pyglove.core.symbolic.base | sym_values | Iterates the values of symbolic attributes. | @abc.abstractmethod
def sym_values(self) -> Iterator[Any]:
"""Iterates the values of symbolic attributes."""
| (self) -> Iterator[Any] | [
0.06449399888515472,
-0.05731649696826935,
0.015398848801851273,
0.009023639373481274,
-0.011922245845198631,
-0.008053123019635677,
-0.03369630500674248,
-0.04689531773328781,
0.08412861078977585,
0.021170182153582573,
-0.0016261528944596648,
0.02313709259033203,
0.055418603122234344,
0.07805533707141876,
-0.04510094225406647,
0.023464912548661232,
-0.0014805755345150828,
0.0735694020986557,
-0.04227134957909584,
0.03424841910600662,
-0.050553083419799805,
0.02934839390218258,
-0.02800261229276657,
-0.02370646223425865,
0.012439854443073273,
0.04751644656062126,
0.039717815816402435,
-0.004300462547689676,
0.0393037274479866,
0.000627600122243166,
-0.0498974472284317,
-0.007112801540642977,
0.01578705571591854,
0.009662022814154625,
0.06318272650241852,
-0.03768188878893852,
-0.024172309786081314,
0.051312241703271866,
-0.052934080362319946,
0.037336815148591995,
0.04116711765527725,
-0.013828770257532597,
0.03606005012989044,
-0.018064532428979874,
-0.0467572882771492,
-0.015614518895745277,
0.002275320002809167,
-0.02729521319270134,
0.008644059300422668,
-0.07149896770715714,
0.014665570110082626,
0.010774880647659302,
0.026881126686930656,
-0.006508924998342991,
0.035714976489543915,
0.07008416950702667,
-0.017857488244771957,
0.004253015387803316,
-0.013483697548508644,
0.03940724954009056,
-0.012983342632651329,
-0.03878612071275711,
0.04061500355601311,
-0.07467363029718399,
0.011758336797356606,
-0.049172792583703995,
-0.04579108580946922,
-0.013613100163638592,
-0.0004488634876906872,
0.006759102456271648,
-0.03916569799184799,
-0.023102587088942528,
-0.0021081757731735706,
0.032229747623205185,
0.0013748971978202462,
-0.023965267464518547,
-0.00653480552136898,
0.005240784492343664,
0.03197094425559044,
-0.1158752590417862,
-0.05307210981845856,
0.04147768393158913,
-0.04116711765527725,
-0.006754789035767317,
-0.07446658611297607,
0.006258747540414333,
-0.00202837772667408,
-0.015269446186721325,
0.011042311787605286,
0.09558501094579697,
-0.045307986438274384,
0.017572803422808647,
-0.006772042717784643,
0.0785384401679039,
-0.01002434827387333,
0.029745226725935936,
0.008639746345579624,
-0.05214041471481323,
0.006504611577838659,
-0.014027186669409275,
0.03197094425559044,
0.032281506806612015,
0.026259997859597206,
0.009515366517007351,
-0.022032862529158592,
-0.02389625273644924,
-0.03916569799184799,
-0.06608133018016815,
0.043927695602178574,
0.013725248165428638,
-0.09786248952150345,
0.0467572882771492,
0.01832333579659462,
-0.033523768186569214,
-0.043203044682741165,
0.005201964173465967,
0.0009203723748214543,
-0.017426148056983948,
0.0007677857065573335,
-0.017244985327124596,
-0.014277364127337933,
0.03378257155418396,
0.020497290417551994,
0.05724748596549034,
0.05497000738978386,
0.035335395485162735,
0.030935725197196007,
0.020359262824058533,
-0.02819240093231201,
0.01999693550169468,
-0.008368001319468021,
-0.0047576832585036755,
0.03153960406780243,
0.07667504996061325,
0.011758336797356606,
0.00944635272026062,
0.048448141664266586,
-0.02810613438487053,
-0.0211874358355999,
0.004477312322705984,
0.04641221463680267,
0.011930872686207294,
0.014355004765093327,
0.028606489300727844,
-0.07205108553171158,
-0.00257725827395916,
-0.019393060356378555,
0.013276654295623302,
-0.00970515701919794,
-0.02075609564781189,
-0.016434065997600555,
0.040442466735839844,
0.03737132251262665,
0.033282216638326645,
-0.026035699993371964,
0.018202560022473335,
0.0010389909148216248,
-0.002818808890879154,
-0.021739551797509193,
-0.018202560022473335,
-0.08254127949476242,
-0.007457873784005642,
-0.028451206162571907,
-0.05338267609477043,
0.0014158745761960745,
0.04068401828408241,
-0.036577656865119934,
-0.05352070555090904,
0.007397485896945,
-0.01171520259231329,
-0.018426857888698578,
-0.11042311787605286,
-0.012871194630861282,
-0.000917676487006247,
0.023827238008379936,
0.011559920385479927,
0.011344249360263348,
0.04879321530461311,
0.04285797104239464,
0.03726780042052269,
0.022757513448596,
-0.06711655110120773,
-0.13761480152606964,
-0.002193365478888154,
0.0566953681409359,
0.014769092202186584,
-0.017736712470650673,
-0.0031401573214679956,
0.06225103139877319,
0.004783563781529665,
0.00047636142699047923,
0.0012002043658867478,
-0.02113567478954792,
0.01832333579659462,
0.014130707830190659,
-0.0686003640294075,
0.007030847016721964,
0.051795341074466705,
-0.044962912797927856,
0.058765802532434464,
-0.007026533596217632,
-0.02981424145400524,
-0.03126354515552521,
0.050173502415418625,
0.006646953988820314,
-0.0020186726469546556,
0.012474361807107925,
-0.05883481726050377,
-0.046826303005218506,
-0.012733165174722672,
-0.01206890121102333,
0.00020556061645038426,
0.0368192084133625,
0.013164506293833256,
0.014432646334171295,
0.0019173076143488288,
0.007630409672856331,
-0.03612906485795975,
0.0036318853963166475,
0.0072508305311203,
0.048172082751989365,
-0.015493743121623993,
0.011102699674665928,
-0.021498000249266624,
0.05124322697520256,
-0.05258901044726372,
0.022446949034929276,
-0.0025815716944634914,
-0.04875870794057846,
-0.01751241646707058,
0.018978973850607872,
-0.008458583615720272,
0.034144897013902664,
0.003752660471946001,
0.06069820746779442,
0.007867647334933281,
0.009981214068830013,
0.03602554276585579,
-0.05672987550497055,
0.022602232173085213,
-0.06301019340753555,
0.042340364307165146,
-0.030176566913723946,
0.04748193919658661,
-0.058903831988573074,
-0.007384546101093292,
0.0339723601937294,
0.09806952625513077,
-0.04541150480508804,
-0.019030733034014702,
0.021308209747076035,
-0.06973909586668015,
0.0004089645226486027,
-0.012603763490915298,
0.03159136325120926,
-0.045825593173503876,
-0.041581206023693085,
-0.0020531797781586647,
0.07460461556911469,
-0.02018672600388527,
0.03706075996160507,
0.005184710491448641,
-0.0036124750040471554,
0.058662280440330505,
0.03445546329021454,
0.018547633662819862,
0.017115583643317223,
0.024965975433588028,
-0.040442466735839844,
0.03473152220249176,
0.07550180703401566,
-0.0091875484213233,
-0.05089815333485603,
0.03312693536281586,
-0.025449076667428017,
0.04834461957216263,
0.021014899015426636,
-0.000422443903516978,
-0.04513544961810112,
-0.05148477852344513,
-0.0008610630757175386,
-0.0070351604372262955,
-0.04064951092004776,
0.0053917537443339825,
-0.044928405433893204,
-0.007354352157562971,
0.0030215387232601643,
-0.024845201522111893,
0.020963137969374657,
-0.015925083309412003,
0.09862164407968521,
0.024258578196167946,
-0.010731746442615986,
-0.012025767005980015,
0.12774574756622314,
0.0017447714926674962,
-0.004861205350607634,
-0.001746928202919662,
0.028157895430922508,
0.0023378643672913313,
0.04613615944981575,
-0.021359970793128014,
0.008229972794651985,
0.02934839390218258,
-0.0290033221244812,
-0.011551293544471264,
0.04724038764834404,
0.05921439453959465,
-0.050311531871557236,
0.041960783302783966,
0.012241438031196594,
0.05776509270071983,
-0.0474129244685173,
0.04016640782356262,
-0.0067892963998019695,
-0.06404540687799454,
-0.0352146215736866,
-0.01741752028465271,
0.033799827098846436,
0.06497710198163986,
-0.03157411143183708,
-0.006720281671732664,
-0.010930162854492664,
-0.05348619818687439,
-0.04827560484409332,
0.03913119062781334,
-0.007203382905572653,
-0.016925793141126633,
0.029935017228126526,
-0.0003876670962199569,
-0.008786401711404324,
0.0029266439378261566,
0.011904992163181305,
0.043203044682741165,
-0.01650307886302471,
0.049448851495981216,
-0.005098442081362009,
0.004015778191387653,
-0.006206986960023642,
-0.0636313185095787,
-0.0030582027975469828,
-0.02213638462126255,
0.006858310662209988,
-0.011482278816401958,
-0.027364227920770645,
0.012931582517921925,
-0.029089588671922684,
-0.012086154893040657,
0.07405250519514084,
0.041201625019311905,
0.0039338236674666405,
0.027519511058926582,
0.014734584838151932,
0.01846136525273323,
0.015045149251818657,
0.041822753846645355,
-0.05110519751906395,
0.023033572360873222,
-0.04299600049853325,
-0.0025600045919418335,
0.07267221063375473,
-0.0015603734645992517,
-0.0061552259139716625,
-0.012448481284081936,
-0.005352932959794998,
-0.050311531871557236,
-0.03623258322477341,
0.025742389261722565,
0.06690950691699982,
-0.024586396291851997,
-0.027070917189121246,
-0.0011613836977630854,
-0.04254740849137306,
-0.08578495681285858,
-0.027519511058926582,
0.00515451654791832,
0.027450496330857277,
0.012448481284081936,
-0.0302110742777586,
0.02094588428735733,
0.04965589568018913,
-0.05214041471481323,
0.0023788416292518377,
0.018047278746962547,
0.017063822597265244,
-0.05731649696826935,
0.04451431706547737,
-0.001455773483030498,
-0.019927920773625374,
0.06870388239622116,
-0.03768188878893852,
-0.05586719512939453,
-0.05993904918432236,
-0.021929340437054634,
0.0010950651485472918,
-0.05724748596549034,
0.031798407435417175,
-0.01937580667436123,
-0.08820046484470367,
-0.010084736160933971,
-0.016140753403306007,
-0.008449956774711609,
0.007945287972688675,
-0.014122080989181995,
-0.017348507419228554,
-0.03417940437793732,
0.022792020812630653,
-0.029072336852550507,
-0.010119243524968624,
0.01765044406056404,
0.017961010336875916,
0.005663498304784298,
-0.04410023242235184,
-0.05407281965017319,
0.058662280440330505,
-0.01875467598438263,
0.028261415660381317,
-0.011853231117129326,
0.04751644656062126,
0.04365163668990135,
0.05848974362015724,
-0.055901702493429184,
-0.01861664652824402,
0.06273413449525833,
-0.0290033221244812,
0.015295326709747314,
0.03706075996160507,
0.02008320391178131,
-0.015131417661905289,
0.022653993219137192,
-0.017581431195139885,
-0.0007020063349045813,
-0.037578366696834564,
-0.024120548740029335,
0.007751184981316328,
-0.04227134957909584,
-0.07260319590568542,
-0.050311531871557236,
-0.01851312629878521,
0.001860155025497079,
-0.02070433460175991,
0.042443886399269104,
-0.0007526887929998338,
-0.0030280088540166616,
0.0233786441385746,
-0.014777718111872673,
0.020031442865729332,
0.05455591902136803,
0.019341299310326576,
-0.024362100288271904,
-0.025552598759531975,
-0.011551293544471264,
0.06563273817300797,
-0.02948642335832119,
0.0013964641839265823,
0.0342656746506691,
0.017633192241191864,
-0.07149896770715714,
0.011508159339427948,
0.031091008335351944,
0.0393037274479866,
0.011499532498419285,
-0.015925083309412003,
-0.09213428944349289,
0.008182525634765625,
0.02289554290473461,
-0.009144414216279984,
0.016287408769130707,
-0.019531087949872017,
-0.011594426818192005,
0.03823400288820267,
-0.01784023456275463,
0.00882953591644764,
-0.04634319990873337,
-0.019151508808135986,
0.004460058640688658,
-0.04475586861371994,
0.015329834073781967,
-0.058903831988573074,
-0.07453560084104538,
-0.016874032095074654,
-0.02624274417757988,
0.0003086779033765197,
-0.02324061468243599,
0.03985584154725075,
0.007190442644059658,
0.042202334851026535,
-0.03899316117167473,
-0.02981424145400524,
-0.004477312322705984,
-0.019168762490153313,
0.014760465361177921,
0.01479497179389,
0.0398903489112854,
0.04416924715042114,
0.0010503135854378343,
0.038579076528549194,
0.020255740731954575,
-0.013544085435569286,
-0.008631119504570961,
-0.021014899015426636,
-0.03411038964986801,
0.0001232689683092758,
0.017477909103035927,
0.021221943199634552,
0.04837912693619728,
-0.02213638462126255,
-0.05873129516839981,
0.0061164055950939655,
-0.019824400544166565,
0.03043537214398384,
-0.01326802745461464,
0.03875161334872246,
-0.027554018422961235,
0.02753676474094391,
-0.06715105473995209,
0.005607423838227987,
-0.03530088812112808,
-0.04378966614603996,
-0.008795028552412987,
0.006776356138288975,
-0.08060887455940247,
-0.06580527871847153,
0.002005732385441661,
-0.020221233367919922,
-0.007449246942996979,
-0.03926922008395195,
-0.020359262824058533,
0.01627015508711338,
-0.027640286833047867,
0.01984165422618389,
-0.012181050144135952,
-0.00459377421066165,
0.024638157337903976,
-0.03692273050546646,
-0.0014191095251590014,
0.08523283898830414,
-0.0041969409212470055,
-0.0048094443045556545,
0.06311371177434921,
0.03937274217605591,
0.030280089005827904,
-0.00999846775084734,
0.0015291013987734914,
0.024655411019921303,
-0.019669117406010628,
-0.07198207080364227,
-0.06759965419769287,
0.007871960289776325,
-0.005991316866129637,
-0.033713556826114655,
-0.0026139221154153347,
-0.018547633662819862,
0.0059309289790689945,
0.019772639498114586,
0.013742501847445965,
0.07840041071176529,
0.0031854480039328337,
-0.04289247840642929,
0.028830785304307938,
0.009886319749057293,
-0.0047576832585036755,
0.003155254293233156,
-0.054900992661714554,
0.016114873811602592,
0.02700190246105194,
0.03219524025917053,
0.011551293544471264,
0.008989132009446621,
0.004339283332228661,
-0.00064431456848979,
0.006526178680360317,
0.03630159795284271,
0.009377337992191315,
0.028226908296346664,
0.025518091395497322,
-0.03417940437793732,
-0.03110826201736927,
-0.011982633732259274,
-0.08944272249937057,
-0.009756917133927345,
0.0116893220692873,
0.026984648779034615,
-0.021929340437054634,
0.0536242239177227,
0.006595192942768335,
-0.026398025453090668,
0.05497000738978386,
-0.030556146055459976,
-0.016097620129585266,
-0.04789602756500244,
-0.06283765286207199,
-0.032419536262750626,
-0.0536242239177227,
-0.04958688095211983,
-0.031073754653334618,
-0.0436171293258667,
-0.01355271227657795,
-0.05662635341286659,
0.014656943269073963,
-0.03764738142490387,
0.04189176857471466,
0.03643962740898132,
0.011628934182226658,
-0.008605238981544971,
-0.0028511593118309975,
0.011672068387269974,
0.0317811518907547,
0.015950964763760567,
0.00732415821403265,
-0.015597265213727951,
0.008152331225574017,
0.038475554436445236,
-0.06073271483182907,
0.0042487019672989845,
0.012051647529006004,
-0.0024802067782729864,
0.06949754804372787,
-0.009342830628156662,
0.032574817538261414,
-0.03926922008395195,
-0.03899316117167473,
-0.052899572998285294,
0.040338944643735886,
-0.01951383426785469,
0.03476602956652641,
0.018426857888698578,
0.007600216194987297,
0.014001306146383286,
-0.04092556610703468,
0.0018946622731164098,
0.009049518965184689,
0.0233786441385746,
-0.0189962275326252,
-0.019496580585837364,
-0.019720878452062607,
0.022636739537119865,
0.019979681819677353,
-0.044686853885650635,
0.06832430511713028,
-0.0094981137663126,
0.0486551858484745,
-0.02180856466293335,
0.04227134957909584,
-0.010179631412029266,
0.0392347127199173,
-0.034231167286634445,
-0.03369630500674248,
0.06169891729950905,
-0.015209059230983257,
-0.02208462357521057,
0.018599392846226692,
-0.012206930667161942,
0.0001537997741252184,
0.049310822039842606,
-0.02208462357521057,
-0.03716427832841873,
-0.0020348478574305773,
0.01424285676330328,
-0.006819489877671003,
-0.029193110764026642,
-0.02032475546002388,
0.005262351594865322,
0.0027972417883574963,
0.0033881780691444874,
-0.004835324827581644,
-0.030883966013789177,
-0.000599023827817291,
0.026967395097017288,
-0.023913506418466568,
-0.005219217389822006,
0.08067788928747177,
0.030418118461966515,
-0.017521042376756668,
-0.024448368698358536,
0.03110826201736927,
0.0011516786180436611,
-0.009963960386812687,
0.06960107386112213,
0.021152928471565247,
0.007897840812802315,
-0.015174551866948605,
-0.0017911405302584171,
0.002710973843932152,
-0.03688822314143181,
-0.0610777847468853,
-0.004895712248980999,
0.03802695870399475,
-0.006448537576943636,
-0.09199625998735428,
-0.03875161334872246,
-0.057351004332304,
0.05455591902136803,
-0.003765600733458996,
0.00020178638806100935,
0.015864696353673935,
-0.02481069415807724,
0.014725957997143269,
0.08585397154092789,
0.024965975433588028,
0.0009926218772307038,
0.015122790820896626,
0.026018446311354637,
0.04465234652161598,
0.06735809892416,
0.015183178707957268,
-0.03802695870399475,
0.003211328526958823,
0.015580011531710625,
0.004166747443377972,
0.004289679229259491,
0.03543891757726669,
-0.07191305607557297,
-0.06425245106220245,
0.013078237883746624,
-0.013656233437359333,
0.004332813434302807,
0.02175680361688137,
-0.0005774568417109549,
0.06556372344493866,
0.01984165422618389,
-0.012275944463908672,
0.05006998032331467,
0.04848264902830124,
-0.077296182513237,
0.06252709031105042,
-0.04824109748005867,
0.06494259834289551,
0.02819240093231201,
0.05200238525867462,
0.01025727204978466,
0.013449190184473991,
-0.03875161334872246,
0.0617334246635437,
-0.05811016634106636,
-0.01143051777034998,
-0.04958688095211983,
0.0006788218161091208,
-0.02313709259033203,
0.03982133790850639,
0.0009338517556898296,
0.03493856266140938,
-0.025345556437969208,
0.020687080919742584,
0.010472942143678665,
-0.011266608722507954,
-0.03654314950108528,
0.02562161348760128,
0.022412441670894623,
-0.029572689905762672,
0.027398735284805298,
0.0474129244685173,
0.009239309467375278,
0.016761884093284607,
0.07191305607557297,
0.017201850190758705,
0.051312241703271866,
-0.049690403044223785,
-0.007255143951624632,
-0.008570731617510319,
-0.054417893290519714,
0.003987741190940142,
0.015605892054736614,
0.049172792583703995,
-0.04078753665089607,
0.003079769667237997,
-0.008009989745914936,
0.027277959510684013
]
|
41,416 | pyglove.core.symbolic.base | TraverseAction | Enum for the next action after a symbolic node is visited.
See also: :func:`pyglove.traverse`.
| class TraverseAction(enum.Enum):
"""Enum for the next action after a symbolic node is visited.
See also: :func:`pyglove.traverse`.
"""
# Traverse should immediately stop.
STOP = 0
# Traverse should enter sub-tree if sub-tree exists and traverse is in
# pre-order. For post-order traverse, it has the same effect as CONTINUE.
ENTER = 1
# Traverse should continue to next node without entering the sub-tree.
CONTINUE = 2
| (value, names=None, *, module=None, qualname=None, type=None, start=1) | [
0.0010105696273967624,
-0.03116130456328392,
-0.07916166633367538,
-0.00012009708734694868,
-0.013353551737964153,
-0.04124663025140762,
0.001299142139032483,
-0.0019306066678836942,
-0.013063847087323666,
-0.07539550960063934,
0.02949550561606884,
0.003198062302544713,
0.047909826040267944,
0.0405585840344429,
-0.029658464714884758,
-0.020387930795550346,
0.014204557053744793,
0.03268225118517876,
-0.020804380998015404,
0.0609465129673481,
-0.0003938165900763124,
0.022904735058546066,
0.03805988281965256,
-0.0573614239692688,
-0.021329469978809357,
0.0357784628868103,
-0.010284497402608395,
0.012620237655937672,
-0.02547585964202881,
-0.06793562322854996,
-0.018468640744686127,
-0.063191719353199,
-0.05254509299993515,
-0.021673493087291718,
-0.02591041661798954,
0.036303553730249405,
-0.06637846678495407,
0.03719077259302139,
-0.04805467650294304,
-0.015988048166036606,
-0.045048996806144714,
-0.022995268926024437,
-0.072896808385849,
-0.02082248590886593,
-0.008826923556625843,
-0.022814203053712845,
-0.002919674851000309,
0.007052485831081867,
0.05091550573706627,
-0.10103432834148407,
0.007188284769654274,
-0.00016522190708201379,
0.040268879383802414,
-0.01899372972548008,
0.01669420301914215,
0.03505420312285423,
0.001799334422685206,
-0.029911955818533897,
0.007758639752864838,
0.04110177978873253,
0.06351763755083084,
0.01921100728213787,
-0.026870060712099075,
0.06905823200941086,
0.017020119354128838,
-0.009505918249487877,
0.002704659942537546,
-0.006504763849079609,
-0.05279858410358429,
0.04128284379839897,
-0.04113798961043358,
0.0020222708117216825,
0.022506391629576683,
-0.013389764353632927,
-0.007152071688324213,
-0.0465337298810482,
0.0034877664875239134,
0.03090781345963478,
0.025729350745677948,
0.009551184251904488,
-0.014331302605569363,
-0.0454111285507679,
-0.010266391560435295,
-0.009170947596430779,
-0.027666747570037842,
0.006264852359890938,
0.03958083316683769,
-0.06746485829353333,
-0.054790299385786057,
0.025638818740844727,
-0.04867029935121536,
-0.03260982409119606,
-0.05399361252784729,
-0.026055268943309784,
-0.034764498472213745,
0.02518615499138832,
0.0006467418861575425,
-0.006559083238244057,
-0.06789941340684891,
-0.047149352729320526,
0.017527101561427116,
0.07836497575044632,
-0.025331007316708565,
0.0012584024807438254,
-0.01800692453980446,
-0.061489708721637726,
-0.03137858211994171,
0.013996332883834839,
0.03947219252586365,
-0.008270148187875748,
-0.028916096314787865,
0.01716497167944908,
0.029821421951055527,
0.0209492314606905,
-0.022252900525927544,
0.03490935266017914,
-0.02172781154513359,
-0.0033610209356993437,
-0.038349587470293045,
0.00795781146734953,
0.02779349312186241,
0.02547585964202881,
0.00008310605335282162,
-0.0016839054878801107,
0.029640357941389084,
0.04298485442996025,
0.05348663032054901,
0.037625327706336975,
-0.019627457484602928,
0.03994296118617058,
0.03244686499238014,
-0.025023197755217552,
0.0023063167463988066,
0.036213021725416183,
0.03845822811126709,
0.037625327706336975,
0.03614059463143349,
-0.005490799434483051,
-0.04566461965441704,
0.006762781646102667,
0.008908403106033802,
-0.05660095065832138,
-0.0040784915909171104,
-0.02075006067752838,
0.017508994787931442,
-0.003514926414936781,
-0.033913493156433105,
-0.02002580091357231,
0.017853019759058952,
0.045519765466451645,
0.02022497169673443,
-0.02726840414106846,
0.0049204439856112,
-0.0019249484175816178,
0.03009301982820034,
0.05526106804609299,
-0.020387930795550346,
-0.04559219256043434,
-0.052472665905952454,
-0.005278047639876604,
-0.018631599843502045,
-0.04005160182714462,
-0.002324423287063837,
0.001462100655771792,
0.0035262429155409336,
0.03503609821200371,
-0.023936806246638298,
0.010021953843533993,
-0.03987053409218788,
-0.0034176039043813944,
-0.038820359855890274,
-0.005024556536227465,
-0.0013783581089228392,
-0.009451597929000854,
-0.0022531289141625166,
0.014983137138187885,
-0.036303553730249405,
0.04754769429564476,
0.052182961255311966,
-0.04392639547586441,
-0.030292192474007607,
0.01853201352059841,
-0.04617160186171532,
-0.0466061569750309,
0.01350745651870966,
0.008360681124031544,
0.013525563292205334,
0.04113798961043358,
0.04153633490204811,
0.023013373836874962,
-0.034166984260082245,
-0.04606296122074127,
0.04044994339346886,
0.020351717248558998,
-0.013172485865652561,
-0.014276983216404915,
-0.042622726410627365,
0.010284497402608395,
0.05906343832612038,
0.03682864084839821,
-0.014394675381481647,
0.02732272446155548,
0.03239254653453827,
0.023954913020133972,
-0.01989905536174774,
0.07503338158130646,
0.05066201463341713,
-0.011352782137691975,
-0.022560711950063705,
-0.04436095058917999,
-0.08915645629167557,
0.020043907687067986,
0.011959349736571312,
0.018595386296510696,
-0.025874203070998192,
-0.0035760358441621065,
-0.0369734950363636,
0.05323313921689987,
0.017681008204817772,
0.03947219252586365,
-0.0015616865130141377,
0.016413550823926926,
-0.0011893713381141424,
-0.07785799354314804,
0.06989113241434097,
-0.06471266597509384,
-0.022180475294589996,
-0.01883077062666416,
-0.02103976532816887,
-0.02348414435982704,
-0.021492427214980125,
-0.06264852732419968,
0.015272841788828373,
-0.00443835835903883,
0.0232668649405241,
0.004694112576544285,
0.0016805104678496718,
0.01092727854847908,
-0.06062059476971626,
0.026942487806081772,
0.008573432452976704,
-0.042840003967285156,
-0.044542014598846436,
-0.002854038728401065,
-0.014141184277832508,
0.034547220915555954,
0.07173799723386765,
0.0008283728384412825,
0.0053912135772407055,
0.060330893844366074,
-0.030400831252336502,
-0.041427694261074066,
-0.037154559046030045,
-0.034981776028871536,
0.006536450237035751,
0.023013373836874962,
-0.03423941135406494,
0.021275149658322334,
0.002146753016859293,
0.031016452237963676,
-0.0026141274720430374,
0.015191362239420414,
-0.01693863980472088,
0.01308195386081934,
-0.001940791611559689,
0.022886628285050392,
0.045737046748399734,
-0.049104854464530945,
0.056709591299295425,
-0.025240475311875343,
0.11805444955825806,
0.012765089981257915,
-0.022814203053712845,
0.05424710363149643,
0.010565148666501045,
-0.02317633293569088,
-0.005685444455593824,
0.05272615700960159,
-0.01045650988817215,
-0.021926984190940857,
-0.02100355178117752,
0.02031550370156765,
-0.09820970892906189,
-0.0034832400269806385,
-0.145359069108963,
0.008455740287899971,
-0.012792249210178852,
0.007849171757698059,
0.00199058442376554,
-0.009012515656650066,
0.09994793683290482,
0.05442817136645317,
0.05786840617656708,
0.0021840978879481554,
0.08046533167362213,
-0.01775343343615532,
-0.026218226179480553,
0.010067219845950603,
0.04921349510550499,
0.04515763744711876,
0.04034130647778511,
-0.05406603962182999,
0.013263018801808357,
-0.09589207917451859,
-0.016540296375751495,
0.049358345568180084,
0.047402843832969666,
0.01199556328356266,
0.03253740072250366,
-0.012982367537915707,
-0.0596790574491024,
0.010809586383402348,
-0.05276237055659294,
0.017690060660243034,
-0.042622726410627365,
-0.030980238690972328,
-0.029640357941389084,
-0.07691645622253418,
0.05095171928405762,
0.010003847070038319,
-0.03838580101728439,
0.08625941723585129,
-0.0055405921302735806,
-0.020170653238892555,
-0.06130864471197128,
-0.04084828868508339,
0.04207953065633774,
0.04439716413617134,
0.041681185364723206,
-0.033822961151599884,
0.02744947001338005,
-0.04446958750486374,
0.006821627728641033,
0.005911775398999453,
-0.11501255631446838,
0.018704025074839592,
0.016531243920326233,
0.0813344419002533,
-0.005237307865172625,
0.007061539217829704,
0.03939976543188095,
0.007844645529985428,
-0.01338071096688509,
0.02600094862282276,
0.06927550584077835,
-0.0016092160949483514,
0.041717398911714554,
0.015734557062387466,
0.09096711128950119,
0.02770296111702919,
0.015825089067220688,
0.02377384714782238,
-0.024805918335914612,
-0.03069053404033184,
0.007794852834194899,
-0.009361065924167633,
0.07814770191907883,
-0.1384785920381546,
0.005866509396582842,
-0.02125704288482666,
0.06511101126670837,
0.04341941326856613,
-0.051748406141996384,
0.011723965406417847,
0.013444083742797375,
-0.07438154518604279,
0.008713757619261742,
-0.008550799451768398,
0.043093495070934296,
0.01080053299665451,
0.02906094864010811,
-0.032211482524871826,
0.017382249236106873,
0.03299006074666977,
-0.019880948588252068,
0.04591811075806618,
0.056492313742637634,
-0.0064368643797934055,
0.050734441727399826,
0.012529704719781876,
0.01120792981237173,
0.01635017804801464,
-0.020387930795550346,
0.052436452358961105,
0.014023492112755775,
0.001326301833614707,
0.07202769815921783,
0.04896000400185585,
0.010537989437580109,
0.05080686882138252,
-0.03414887934923172,
-0.00758662773296237,
0.020641421899199486,
-0.043853968381881714,
0.003727677743881941,
-0.014204557053744793,
0.012656450271606445,
-0.021057872101664543,
-0.011669646017253399,
-0.03434804826974869,
0.0466061569750309,
0.08328994363546371,
-0.06120000407099724,
-0.007242604158818722,
-0.014675326645374298,
0.01626870036125183,
-0.02996627427637577,
-0.0004883099463768303,
-0.04410745948553085,
-0.013407871127128601,
0.024480002000927925,
0.0007095488836057484,
-0.03921870142221451,
0.022814203053712845,
0.015363373793661594,
-0.05500757694244385,
0.0328633151948452,
0.07720615714788437,
0.015499172732234001,
0.008039291016757488,
0.0035103997215628624,
-0.0011141161667183042,
0.06721136718988419,
0.04139148071408272,
0.060511957854032516,
-0.019518818706274033,
0.03657514974474907,
0.02540343441069126,
-0.01993526704609394,
0.036557044833898544,
-0.01817893609404564,
-0.03094402514398098,
-0.013923906721174717,
-0.055297281593084335,
0.026598462834954262,
-0.009202633984386921,
-0.04914106801152229,
-0.056963082402944565,
0.02676142193377018,
0.039979174733161926,
-0.025457752868533134,
0.029477398842573166,
0.004662426188588142,
0.015236628241837025,
0.05761491507291794,
-0.030491363257169724,
-0.015906568616628647,
0.013181539252400398,
0.06467645615339279,
-0.020134439691901207,
-0.033913493156433105,
0.014720592647790909,
0.03228390961885452,
-0.007654527202248573,
-0.0128284627571702,
-0.0032931214664131403,
-0.08568000793457031,
0.030274085700511932,
0.013733788393437862,
-0.03201230987906456,
0.03317112848162651,
0.011506686918437481,
0.01729171723127365,
-0.03375053405761719,
-0.03355136513710022,
0.0143403559923172,
-0.011135503649711609,
0.03626734018325806,
0.02176402509212494,
-0.05917207524180412,
-0.02629065327346325,
-0.0418260395526886,
-0.03842201456427574,
-0.04392639547586441,
0.04276757687330246,
0.026435505598783493,
-0.021329469978809357,
-0.06619740277528763,
-0.02719597890973091,
-0.046932075172662735,
0.028499647974967957,
-0.06337278336286545,
0.022162368521094322,
-0.002030192408710718,
-0.007808432448655367,
-0.0005233912961557508,
0.016485977917909622,
0.03253740072250366,
0.026652783155441284,
-0.04628023877739906,
-0.02368331514298916,
-0.061055153608322144,
0.04233302175998688,
-0.02893420308828354,
0.05381254851818085,
0.031559646129608154,
-0.029223907738924026,
0.0038612133357673883,
-0.03867550566792488,
-0.017309824004769325,
0.028572073206305504,
0.0037186245899647474,
0.003220695536583662,
-0.008944615721702576,
-0.03460153937339783,
0.009587396867573261,
0.025258582085371017,
-0.044578228145837784,
-0.0022565238177776337,
0.020297398790717125,
0.045266274362802505,
0.018685918301343918,
0.05366769805550575,
0.012113255448639393,
0.00410791439935565,
0.003969852346926928,
0.017228344455361366,
0.036683790385723114,
0.05127763748168945,
-0.008849556557834148,
0.000664848426822573,
-0.08321752399206161,
0.020985445007681847,
0.020768167451024055,
-0.038096096366643906,
0.0020211392547935247,
-0.045483555644750595,
0.027413256466388702,
0.004255029838532209,
-0.013851480558514595,
0.017644794657826424,
0.036213021725416183,
0.003976642154157162,
0.055333495140075684,
-0.027938345447182655,
0.003766154171898961,
0.04345562309026718,
0.0347282849252224,
-0.02996627427637577,
0.053631484508514404,
0.01770816743373871,
0.017536155879497528,
-0.05203811079263687,
0.02726840414106846,
0.039037637412548065,
0.015408639796078205,
0.0173641424626112,
-0.07191906124353409,
0.012882782146334648,
0.017662901431322098,
-0.03820473700761795,
0.018260415643453598,
-0.08039290457963943,
-0.04733041673898697,
0.04867029935121536,
0.035488761961460114,
0.02886177785694599,
0.0071701779961586,
0.028590179979801178,
-0.006608876399695873,
-0.03827716410160065,
-0.010945385321974754,
-0.045302487909793854,
-0.056492313742637634,
0.033822961151599884,
-0.018414320424199104,
0.021619172766804695,
-0.020043907687067986,
0.0858972817659378,
0.006875947117805481,
0.08459361642599106,
-0.0489237904548645,
0.035452548414468765,
-0.010085326619446278,
0.02770296111702919,
0.025620711967349052,
0.00496118376031518,
0.01449426170438528,
0.0055768052116036415,
-0.0466061569750309,
-0.004166760481894016,
-0.026815742254257202,
-0.029314439743757248,
-0.005056242924183607,
-0.0028132989536970854,
0.018631599843502045,
0.020351717248558998,
0.036647576838731766,
-0.02176402509212494,
-0.014349409379065037,
-0.03684674948453903,
-0.02138378843665123,
0.012077041901648045,
0.016802841797471046,
-0.03871171921491623,
-0.02496887743473053,
0.01793449930846691,
0.04472307860851288,
-0.02936876006424427,
-0.01784396544098854,
-0.02654414437711239,
0.030111126601696014,
0.05106035992503166,
0.013308284804224968,
-0.00483443820849061,
0.013815267011523247,
0.009677929803729057,
-0.017391303554177284,
0.013145326636731625,
0.018070297315716743,
0.03373242914676666,
-0.023357398808002472,
-0.008247515186667442,
0.021329469978809357,
-0.018341895192861557,
-0.007360296323895454,
0.02543964609503746,
0.004255029838532209,
-0.027250297367572784,
0.026055268943309784,
-0.06757349520921707,
-0.06282959133386612,
-0.0525088794529438,
-0.013770001009106636,
-0.04903243109583855,
0.019790416583418846,
0.026489824056625366,
-0.0017088019521906972,
0.022144261747598648,
-0.03317112848162651,
-0.05439195781946182,
0.023067694157361984,
-0.0525088794529438,
-0.04903243109583855,
-0.004789171740412712,
-0.04446958750486374,
0.014050652272999287,
0.008075503632426262,
-0.017002012580633163,
0.003929112572222948,
-0.07945136725902557,
0.08973586559295654,
-0.002129778265953064,
0.016413550823926926,
-0.008858609944581985,
0.027304617688059807,
-0.03217526897788048,
0.028662605211138725,
0.02940497361123562,
-0.0031211096793413162,
0.028626393526792526,
0.07793042063713074,
-0.038132309913635254,
0.021202724426984787,
-0.026218226179480553,
0.05225538834929466,
0.04200710356235504,
-0.03069053404033184,
0.053884975612163544,
-0.013543670065701008,
-0.0215105339884758,
0.007889911532402039,
0.061018940061330795,
-0.013896746560931206,
0.009107574820518494,
0.026906274259090424,
0.00475748535245657,
-0.02125704288482666,
0.027413256466388702,
-0.05276237055659294,
-0.01229432038962841,
0.007206391077488661,
0.04341941326856613,
0.00941538531333208,
-0.01729171723127365,
0.015019350685179234,
0.07021704316139221,
0.029857635498046875,
0.04990154132246971,
-0.002854038728401065,
-0.0573614239692688,
0.0339859202504158,
-0.009478758089244366,
-0.04566461965441704,
0.006314645521342754,
0.012448226101696491,
-0.0030464204028248787,
-0.003284068312495947,
0.04689586162567139,
-0.04392639547586441,
-0.019518818706274033,
-0.027467576786875725,
-0.007364823017269373,
0.008958196267485619,
-0.057940833270549774,
0.061272431164979935,
-0.031052665784955025,
-0.05775976926088333,
-0.043817754834890366,
0.010384083725512028,
0.05453680828213692,
-0.024317042902112007,
-0.0001401839981554076,
0.001987189520150423,
0.0013998595532029867,
-0.0049023376777768135,
-0.010791480541229248,
-0.028065090999007225,
0.05750627815723419,
0.016875267028808594,
0.009904260747134686,
-0.02603716216981411,
-0.07517822831869125,
0.025729350745677948,
0.008849556557834148,
-0.03805988281965256,
-0.031559646129608154,
0.03255550563335419,
-0.05352284386754036,
0.02603716216981411,
-0.022759882733225822,
-0.037371836602687836,
-0.006513817235827446,
0.020840592682361603,
-0.0209130197763443,
-0.013308284804224968,
-0.01591562293469906,
0.00210261857137084,
0.01201366912573576,
-0.0036416719667613506,
-0.03116130456328392,
-0.009261479601264,
-0.02044224925339222,
-0.004537944216281176,
0.00433198269456625,
-0.016504084691405296,
-0.013697574846446514,
0.013561775907874107,
0.02082248590886593,
0.060330893844366074,
-0.008949142880737782,
0.015816036611795425,
-0.014032545499503613,
-0.0621415451169014,
-0.03317112848162651,
0.016377339139580727,
-0.01534526702016592,
0.003055473556742072,
0.022651243954896927,
0.026363078504800797,
0.016250593587756157,
-0.019772309809923172,
0.07698888331651688,
-0.03217526897788048,
-0.0069166868925094604,
0.05301586166024208,
-0.03300816938281059,
-0.007559468038380146,
-0.056238822638988495,
-0.006450444459915161,
-0.026616569608449936,
-0.049539413303136826,
-0.03490935266017914,
-0.0025779143907129765,
0.0018898670095950365,
-0.014240770600736141,
0.029604144394397736,
0.012176628224551678
]
|
41,417 | pyglove.core.typing.class_schema | ValueSpec | Interface for value specifications.
A value specification defines what values are acceptable for a symbolic
field (see :class:`pyglove.Field`). When assignments take place on the
attributes for the field, the associated ValueSpec object will kick in to
intercept the process and take care of the following aspects:
* Type check
* Noneable check
* Value validation and transformation
* Default value assignment
See :meth:`.apply` for more details.
Different aspects of assignment interception are handled by the following
methods:
+-----------------------+-------------------------------------------------+
| Aspect name | Property/Method |
+=======================+=================================================+
| Type check | :attr:`.value_type` |
+-----------------------+-------------------------------------------------+
| Noneable check | :attr:`.is_noneable` |
+-----------------------+-------------------------------------------------+
| Type-specific value | :meth:`.apply` |
| validation and | |
| transformation | |
+-----------------------+-------------------------------------------------+
| User transform | :attr:`.transform` |
+-----------------------+-------------------------------------------------+
| Default value lookup | :attr:`.default` |
+-----------------------+-------------------------------------------------+
There are many ``ValueSpec`` subclasses, each correspond to a commonly used
Python type, e.g. `Bool`, `Int`, `Float` and etc. PyGlove's builtin value
specifications are:
+---------------------------+----------------------------------------------+
| ``ValueSpec`` type | Class |
+===========================+==============================================+
| bool | :class:`pyglove.typing.Bool` |
+---------------------------+----------------------------------------------+
| int | :class:`pyglove.typing.Int` |
+---------------------------+----------------------------------------------+
| float | :class:`pyglove.typing.Float` |
+---------------------------+----------------------------------------------+
| str | :class:`pyglove.typing.Str` |
+---------------------------+----------------------------------------------+
| enum | :class:`pyglove.typing.Enum` |
+---------------------------+----------------------------------------------+
| list | :class:`pyglove.typing.List` |
+---------------------------+----------------------------------------------+
| tuple | :class:`pyglove.typing.Tuple` |
+---------------------------+----------------------------------------------+
| dict | :class:`pyglove.typing.Dict`
|
+---------------------------+----------------------------------------------+
| instance of a class | :class:`pyglove.typing.Object` |
+---------------------------+----------------------------------------------+
| callable | :class:`pyglove.typing.Callable` |
+---------------------------+----------------------------------------------+
| functor | :class:`pyglove.typing.Functor` |
+---------------------------+----------------------------------------------+
| type | :class:`pyglove.typing.Type` |
+---------------------------+----------------------------------------------+
| union | :class:`pyglove.typing.Union` |
+---------------------------+----------------------------------------------+
| any | :class:`pyglove.typing.Any` |
+---------------------------+----------------------------------------------+
**Construction**
A value specification is an instance of a ``ValueSpec`` subclass. All
:class:`pyglove.ValueSpec` subclasses follow a common pattern to construct::
pg.typing.<ValueSpecClass>(
[validation-rules],
[default=<default>],
[transform=<transform>])
After creation, a ``ValueSpec`` object can be modified with chaining.
The code below creates an int specification with default value 1 and can
accept None::
pg.typing.Int().noneable().set_default(1)
**Usage**
To apply a value specification on an user input to get the accepted value,
:meth:`pyglove.ValueSpec.apply` shall be used::
value == pg.typing.Int(min_value=1).apply(4)
assert value == 4
**Extension**
Besides, a ``ValueSpec`` object can extend another ``ValueSpec`` object to
obtain a more restricted ``ValueSpec`` object. For example::
pg.typing.Int(min_value=1).extend(pg.typing.Int(max_value=5))
will end up with::
pg.typing.Int(min_value=1, max_value=5)
which will be useful when subclass adds additional restrictions to an
inherited symbolic attribute from its base class. For some use cases, a value
spec can be frozen to avoid subclass extensions::
pg.typing.Int().freeze(1)
``ValueSpec`` objects can be created and modified with chaining. For example::
pg.typing.Int().noneable().set_default(1)
The code above creates an int specification with default value 1 and can
accept None.
``ValueSpec`` object can also be derived from annotations.
For example, annotation below
@pg.members([
('a', pg.typing.List(pg.typing.Str)),
('b', pg.typing.Dict().set_default('key': 'value')),
('c', pg.typing.List(pg.typing.Any()).noneable()),
('x', pg.typing.Int()),
('y', pg.typing.Str().noneable()),
('z', pg.typing.Union(pg.typing.Int(), pg.typing.Float()))
])
can be writen as
@pg.members([
('a', list[str]),
('b', {'key': 'value}),
('c', Optional[list]),
('x', int),
('y', Optional[str]),
('z', Union[int, float])
])
| class ValueSpec(object_utils.Formattable, object_utils.JSONConvertible):
"""Interface for value specifications.
A value specification defines what values are acceptable for a symbolic
field (see :class:`pyglove.Field`). When assignments take place on the
attributes for the field, the associated ValueSpec object will kick in to
intercept the process and take care of the following aspects:
* Type check
* Noneable check
* Value validation and transformation
* Default value assignment
See :meth:`.apply` for more details.
Different aspects of assignment interception are handled by the following
methods:
+-----------------------+-------------------------------------------------+
| Aspect name | Property/Method |
+=======================+=================================================+
| Type check | :attr:`.value_type` |
+-----------------------+-------------------------------------------------+
| Noneable check | :attr:`.is_noneable` |
+-----------------------+-------------------------------------------------+
| Type-specific value | :meth:`.apply` |
| validation and | |
| transformation | |
+-----------------------+-------------------------------------------------+
| User transform | :attr:`.transform` |
+-----------------------+-------------------------------------------------+
| Default value lookup | :attr:`.default` |
+-----------------------+-------------------------------------------------+
There are many ``ValueSpec`` subclasses, each correspond to a commonly used
Python type, e.g. `Bool`, `Int`, `Float` and etc. PyGlove's builtin value
specifications are:
+---------------------------+----------------------------------------------+
| ``ValueSpec`` type | Class |
+===========================+==============================================+
| bool | :class:`pyglove.typing.Bool` |
+---------------------------+----------------------------------------------+
| int | :class:`pyglove.typing.Int` |
+---------------------------+----------------------------------------------+
| float | :class:`pyglove.typing.Float` |
+---------------------------+----------------------------------------------+
| str | :class:`pyglove.typing.Str` |
+---------------------------+----------------------------------------------+
| enum | :class:`pyglove.typing.Enum` |
+---------------------------+----------------------------------------------+
| list | :class:`pyglove.typing.List` |
+---------------------------+----------------------------------------------+
| tuple | :class:`pyglove.typing.Tuple` |
+---------------------------+----------------------------------------------+
| dict | :class:`pyglove.typing.Dict`
|
+---------------------------+----------------------------------------------+
| instance of a class | :class:`pyglove.typing.Object` |
+---------------------------+----------------------------------------------+
| callable | :class:`pyglove.typing.Callable` |
+---------------------------+----------------------------------------------+
| functor | :class:`pyglove.typing.Functor` |
+---------------------------+----------------------------------------------+
| type | :class:`pyglove.typing.Type` |
+---------------------------+----------------------------------------------+
| union | :class:`pyglove.typing.Union` |
+---------------------------+----------------------------------------------+
| any | :class:`pyglove.typing.Any` |
+---------------------------+----------------------------------------------+
**Construction**
A value specification is an instance of a ``ValueSpec`` subclass. All
:class:`pyglove.ValueSpec` subclasses follow a common pattern to construct::
pg.typing.<ValueSpecClass>(
[validation-rules],
[default=<default>],
[transform=<transform>])
After creation, a ``ValueSpec`` object can be modified with chaining.
The code below creates an int specification with default value 1 and can
accept None::
pg.typing.Int().noneable().set_default(1)
**Usage**
To apply a value specification on an user input to get the accepted value,
:meth:`pyglove.ValueSpec.apply` shall be used::
value == pg.typing.Int(min_value=1).apply(4)
assert value == 4
**Extension**
Besides, a ``ValueSpec`` object can extend another ``ValueSpec`` object to
obtain a more restricted ``ValueSpec`` object. For example::
pg.typing.Int(min_value=1).extend(pg.typing.Int(max_value=5))
will end up with::
pg.typing.Int(min_value=1, max_value=5)
which will be useful when subclass adds additional restrictions to an
inherited symbolic attribute from its base class. For some use cases, a value
spec can be frozen to avoid subclass extensions::
pg.typing.Int().freeze(1)
``ValueSpec`` objects can be created and modified with chaining. For example::
pg.typing.Int().noneable().set_default(1)
The code above creates an int specification with default value 1 and can
accept None.
``ValueSpec`` object can also be derived from annotations.
For example, annotation below
@pg.members([
('a', pg.typing.List(pg.typing.Str)),
('b', pg.typing.Dict().set_default('key': 'value')),
('c', pg.typing.List(pg.typing.Any()).noneable()),
('x', pg.typing.Int()),
('y', pg.typing.Str().noneable()),
('z', pg.typing.Union(pg.typing.Int(), pg.typing.Float()))
])
can be writen as
@pg.members([
('a', list[str]),
('b', {'key': 'value}),
('c', Optional[list]),
('x', int),
('y', Optional[str]),
('z', Union[int, float])
])
"""
# pylint: disable=invalid-name
# List-type value spec class.
ListType: Type['ValueSpec']
# Dict-type value spec class.
DictType: Type['ValueSpec']
# Object-type value spec class.
ObjectType: Type['ValueSpec']
# pylint: enable=invalid-name
@property
@abc.abstractmethod
def value_type(self) -> Union[
Type[Any],
Tuple[Type[Any], ...]]: # pyformat: disable
"""Returns acceptable (resolved) value type(s)."""
@property
@abc.abstractmethod
def forward_refs(self) -> Set[ForwardRef]:
"""Returns forward referenes used by the value spec."""
@abc.abstractmethod
def noneable(self) -> 'ValueSpec':
"""Marks none-able and returns `self`."""
@property
@abc.abstractmethod
def is_noneable(self) -> bool:
"""Returns True if current value spec accepts None."""
@abc.abstractmethod
def set_default(self,
default: Any,
use_default_apply: bool = True) -> 'ValueSpec':
"""Sets the default value and returns `self`.
Args:
default: Default value.
use_default_apply: If True, invoke `apply` to the value, otherwise use
default value as is.
Returns:
ValueSpec itself.
Raises:
ValueError: If default value cannot be applied when use_default_apply
is set to True.
"""
@property
@abc.abstractmethod
def default(self) -> Any:
"""Returns the default value.
If no default is provided, MISSING_VALUE will be returned for non-dict
types. For Dict type, a dict that may contains nested MIS | () | [
0.11370823532342911,
-0.053053393959999084,
-0.011294417083263397,
0.016593879088759422,
0.013116412796080112,
0.014272303320467472,
-0.01962074264883995,
-0.05928344279527664,
-0.010226688347756863,
-0.02452837862074375,
0.007694505155086517,
0.04039737582206726,
0.01715223304927349,
0.011323804035782814,
0.014262507669627666,
0.04890002682805061,
0.004013779107481241,
0.03489220514893532,
0.05857815593481064,
0.030053140595555305,
0.00890916958451271,
-0.03308980166912079,
-0.0332857146859169,
0.03160085901618004,
0.01174501795321703,
-0.04200387001037598,
0.01580042950809002,
-0.04094593599438667,
-0.05246565118432045,
-0.012107457965612411,
-0.01615307293832302,
-0.06190868467092514,
0.01158828753978014,
-0.0012403777800500393,
0.02899520844221115,
-0.051407720893621445,
-0.05971445515751839,
0.07746422290802002,
-0.120526023209095,
0.015320440754294395,
-0.025429580360651016,
-0.0015807775780558586,
-0.06903994083404541,
-0.025743043050169945,
-0.010471579618752003,
0.011960523203015327,
0.002390145557001233,
0.051877912133932114,
-0.009075695648789406,
-0.038634154945611954,
0.026742201298475266,
-0.02401900291442871,
0.01215643621981144,
0.020629698410630226,
-0.057050030678510666,
0.015614311210811138,
0.004792535677552223,
0.09364668279886246,
0.02781972661614418,
0.07570099830627441,
-0.0024746332783252,
0.060694023966789246,
-0.03953535854816437,
-0.07652384042739868,
-0.017495080828666687,
0.014056798070669174,
0.016025729477405548,
-0.02084520272910595,
-0.021746406331658363,
0.012940091080963612,
-0.0385361984372139,
-0.054855797439813614,
0.04333608224987984,
0.06441637873649597,
0.046078871935606,
-0.04298343509435654,
-0.045099303126335144,
0.020257461816072464,
0.06641469895839691,
-0.06241806223988533,
0.040162280201911926,
0.021080300211906433,
-0.03918271139264107,
-0.07605364918708801,
0.0005078446702100337,
0.01639796607196331,
-0.0483514666557312,
0.01679958775639534,
0.10359909385442734,
0.008757336065173149,
-0.03324653208255768,
-0.007302678190171719,
0.010138526558876038,
0.026095686480402946,
-0.025194484740495682,
-0.0029876818880438805,
0.04435482993721962,
-0.0811082124710083,
-0.014193938113749027,
0.01174501795321703,
0.0060586268082261086,
0.012460102327167988,
-0.016525309532880783,
0.007327167317271233,
-0.0012171129928901792,
-0.020962750539183617,
-0.009051206521689892,
-0.02780013531446457,
0.012969478033483028,
0.010589128360152245,
-0.03540158271789551,
-0.04223896563053131,
-0.02930866926908493,
-0.022647608071565628,
-0.029426217079162598,
0.023450853303074837,
-0.013459261506795883,
-0.03479424864053726,
0.003416242776438594,
0.03130698576569557,
-0.006563104223459959,
0.037341125309467316,
-0.006935340352356434,
0.03111107461154461,
0.04059328883886337,
0.025135710835456848,
0.003428487339988351,
-0.019718701019883156,
-0.0005461090477183461,
0.035009752959012985,
0.015614311210811138,
0.015349827706813812,
-0.007929601706564426,
0.045099303126335144,
0.04964449629187584,
0.019503194838762283,
-0.019806861877441406,
-0.012283780612051487,
0.032697975635528564,
0.025194484740495682,
0.028916841372847557,
0.026938114315271378,
0.04266997426748276,
-0.08259715884923935,
-0.019277894869446754,
-0.009751597419381142,
0.023940637707710266,
-0.008350815623998642,
-0.07530917227268219,
0.02364676631987095,
-0.003266858635470271,
0.01275397278368473,
0.0177791565656662,
0.022236188873648643,
0.004954164382070303,
-0.00839979387819767,
0.016515513882040977,
-0.08620196580886841,
0.02895602397620678,
-0.02249087765812874,
-0.013968637213110924,
-0.03391263633966446,
0.0268009752035141,
-0.004768046550452709,
0.017455898225307465,
0.0730365738272667,
-0.00658759381622076,
-0.03430446609854698,
-0.009560582228004932,
0.00971241481602192,
-0.011020137928426266,
-0.037517447024583817,
-0.01027566660195589,
0.023940637707710266,
0.056697387248277664,
0.06230051442980766,
0.007557365577667952,
0.007905112579464912,
0.012842134572565556,
-0.024371648207306862,
-0.004060308448970318,
0.00575985899195075,
-0.07338922470808029,
0.009805473499000072,
0.009878941811621189,
0.014860044233500957,
-0.01066749356687069,
-0.014507399871945381,
0.027898091822862625,
0.02631119079887867,
0.02368595078587532,
-0.014340872876346111,
0.032697975635528564,
0.03015109710395336,
-0.0221578236669302,
-0.01149033010005951,
0.04106348380446434,
0.0008632441167719662,
0.020766837522387505,
0.04227814823389053,
-0.03263919800519943,
-0.041651222854852676,
0.020884385332465172,
-0.00930099654942751,
-0.05250483378767967,
-0.003134617116302252,
0.04705843701958656,
-0.01624123379588127,
-0.025233667343854904,
-0.10884957760572433,
-0.07922744750976562,
-0.03753703832626343,
-0.020766837522387505,
0.024626335129141808,
0.021628856658935547,
-0.13690440356731415,
0.04270915687084198,
-0.06606205552816391,
-0.032188598066568375,
0.03158126771450043,
0.10414765030145645,
-0.013263348489999771,
-0.0015820020344108343,
-0.023215757682919502,
0.08761254698038101,
-0.0015991444233804941,
-0.03348162770271301,
-0.021589674055576324,
0.01739712432026863,
-0.016525309532880783,
0.0026791179552674294,
0.009903430938720703,
0.01739712432026863,
0.0035313419066369534,
-0.027427898719906807,
0.016143277287483215,
0.04118103161454201,
-0.0021440291311591864,
-0.05748103931546211,
0.025233667343854904,
0.004072553012520075,
-0.0021085196640342474,
-0.026781383901834488,
0.0046553961001336575,
-0.050271421670913696,
-0.022725973278284073,
0.004038268234580755,
0.06335844844579697,
0.015516354702413082,
0.0009440584690310061,
0.0031884931959211826,
-0.020943159237504005,
0.003511750604957342,
0.01846485398709774,
-0.005382725037634373,
0.017671404406428337,
-0.011696039699018002,
-0.03894761577248573,
0.08573177456855774,
-0.006283927708864212,
-0.01225439365953207,
-0.025292441248893738,
-0.018092617392539978,
0.07389859855175018,
-0.029034391045570374,
-0.04157285764813423,
0.0028554401360452175,
0.02186395414173603,
0.004092144779860973,
0.03655746951699257,
0.05317094177007675,
-0.007464306894689798,
0.013625788502395153,
-0.029093164950609207,
-0.038830067962408066,
-0.015006978996098042,
0.023548809811472893,
-0.024371648207306862,
0.0655134990811348,
-0.013106617145240307,
0.010628310963511467,
-0.005999852903187275,
0.007606344297528267,
-0.017965273931622505,
0.030680064111948013,
0.014458420686423779,
-0.02037501148879528,
0.04780291020870209,
-0.01921912096440792,
-0.015810225158929825,
0.014967796392738819,
-0.020051753148436546,
0.030817203223705292,
-0.010677289217710495,
0.0483514666557312,
0.019875431433320045,
-0.044589925557374954,
-0.02352921850979328,
-0.00478763785213232,
-0.054855797439813614,
0.04400218650698662,
0.02435205690562725,
0.04125939682126045,
0.04035819321870804,
-0.02682056650519371,
0.002101172925904393,
0.04141612723469734,
-0.022628016769886017,
-0.006979420781135559,
0.04368872568011284,
0.01234255451709032,
0.05857815593481064,
-0.04603968933224678,
0.024293281137943268,
0.05759858712553978,
0.033031027764081955,
-0.01216623280197382,
-0.037830907851457596,
0.03708643838763237,
0.01977747492492199,
-0.026232825592160225,
-0.003110127756372094,
0.01010913960635662,
-0.020806020125746727,
-0.009286303073167801,
-0.005911691579967737,
0.003744398010894656,
0.05348440259695053,
-0.032031867653131485,
-0.0014485359424725175,
-0.043257713317871094,
-0.015173505991697311,
0.046940889209508896,
0.049762044101953506,
0.025429580360651016,
0.005304359830915928,
0.020492559298872948,
0.01582002080976963,
-0.00032203292357735336,
-0.014350668527185917,
0.02930866926908493,
-0.018455058336257935,
-0.024058185517787933,
-0.018807701766490936,
-0.020433785393834114,
-0.03722357749938965,
0.030582107603549957,
-0.027506263926625252,
0.09709475934505463,
-0.01356701459735632,
0.012842134572565556,
0.01639796607196331,
0.006563104223459959,
0.023725133389234543,
0.00020142363791819662,
-0.03491179645061493,
0.01158828753978014,
-0.08079475164413452,
-0.03344244509935379,
-0.023725133389234543,
0.0744471549987793,
-0.01646653562784195,
0.029720088467001915,
0.01946401223540306,
0.004319894127547741,
0.014027411118149757,
-0.0007873276481404901,
-0.014125367626547813,
0.02713402919471264,
0.014595560729503632,
0.024626335129141808,
-0.04882166162133217,
-0.018719540908932686,
-0.03969208896160126,
0.0022774951066821814,
-0.0001951482699951157,
-0.03975086286664009,
0.03199268504977226,
-0.08494812250137329,
-0.013919658958911896,
0.01921912096440792,
0.023450853303074837,
-0.0658661425113678,
0.026605062186717987,
-0.00024887145264074206,
-0.0120878666639328,
0.03493138775229454,
-0.007826746441423893,
-0.027231985703110695,
0.00233871815726161,
0.016407761722803116,
-0.005382725037634373,
-0.007895316928625107,
-0.0133123267441988,
-0.012871521525084972,
-0.029053982347249985,
-0.012675607576966286,
0.02501816302537918,
0.014360464178025723,
-0.006563104223459959,
0.040671657770872116,
-0.03902598097920418,
0.05368031561374664,
0.04666661098599434,
-0.01324375718832016,
-0.043963003903627396,
0.08392936736345291,
0.007464306894689798,
-0.02731035090982914,
0.09239283949136734,
0.02932826057076454,
-0.040162280201911926,
-0.0632409006357193,
-0.0110789118334651,
0.0043419343419373035,
-0.03191431984305382,
0.013214370235800743,
-0.0479988232254982,
0.013958841562271118,
-0.00003658073546830565,
0.04110266640782356,
-0.01820036955177784,
0.03471588343381882,
0.09701639413833618,
0.021746406331658363,
0.014517195522785187,
0.020727654919028282,
0.010363827459514141,
-0.012068275362253189,
0.012215211056172848,
0.03769376873970032,
-0.011833179742097855,
-0.041141849011182785,
-0.040632471442222595,
0.016760405153036118,
-0.03230614587664604,
-0.04235651344060898,
-0.06308417022228241,
0.018592197448015213,
0.0023338203318417072,
-0.030347011983394623,
0.03261960670351982,
0.037517447024583817,
0.024254098534584045,
0.004687231965363026,
-0.02995518408715725,
-0.02977886237204075,
0.05344521999359131,
0.003830110188573599,
-0.03158126771450043,
0.0055443537421524525,
-0.013322122395038605,
0.1063418835401535,
0.027741361409425735,
-0.044433195143938065,
-0.01556533295661211,
-0.04290506988763809,
-0.02037501148879528,
0.03653787821531296,
-0.0266246534883976,
0.04290506988763809,
-0.007650424726307392,
-0.03340326249599457,
-0.04259160906076431,
-0.05477743223309517,
0.06422046571969986,
0.02648751437664032,
-0.01835710182785988,
-0.029935592785477638,
0.040632471442222595,
0.007861032150685787,
0.0134886484593153,
0.04020146280527115,
-0.014546582475304604,
-0.009075695648789406,
-0.01781833916902542,
0.0005357011687010527,
-0.021080300211906433,
-0.07985436916351318,
-0.05399378016591072,
0.039339445531368256,
-0.005862713325768709,
0.01664285734295845,
0.039515767246484756,
0.017299167811870575,
0.022921886295080185,
0.03902598097920418,
0.0011093606008216739,
0.013919658958911896,
0.03471588343381882,
-0.06488656997680664,
0.0169955026358366,
0.02815277874469757,
-0.016593879088759422,
-0.03671420365571976,
-0.007939397357404232,
0.04788127541542053,
-0.03739989921450615,
0.017162028700113297,
-0.0071998233906924725,
0.017171824350953102,
0.01356701459735632,
-0.04192550107836723,
0.008125514723360538,
0.04404136911034584,
-0.0758577287197113,
-0.016770200803875923,
-0.039829228073358536,
-0.013224165886640549,
-0.015594719909131527,
-0.011637265793979168,
0.02499857172369957,
0.054228875786066055,
-0.0082773482427001,
0.004873349796980619,
-0.023783907294273376,
0.057363491505384445,
-0.005137833300977945,
-0.04188631847500801,
-0.07225292176008224,
-0.04075002297759056,
-0.03412814438343048,
-0.004674987401813269,
-0.022882703691720963,
0.017299167811870575,
0.030719246715307236,
-0.06104666739702225,
-0.0327567495405674,
0.03062129020690918,
-0.020237870514392853,
0.03988800197839737,
-0.034696292132139206,
0.020825611427426338,
0.08189187198877335,
0.001884443568997085,
0.0007934499299153686,
0.05219137296080589,
-0.00915406085550785,
-0.05328848958015442,
0.020923567935824394,
0.04980122670531273,
0.09482216835021973,
0.010177710093557835,
0.05129016935825348,
0.050075508654117584,
-0.01760283298790455,
0.0044986652210354805,
-0.0031689018942415714,
0.014095980674028397,
-0.02550794556736946,
-0.017318759113550186,
0.003560729091987014,
0.016740813851356506,
0.02484183944761753,
-0.04243487864732742,
-0.010128730908036232,
0.012117253616452217,
0.027192803099751472,
0.04748944938182831,
0.018190573900938034,
0.02832910232245922,
0.012910704128444195,
0.01735794171690941,
-0.005950874648988247,
0.005559047218412161,
0.03342285379767418,
-0.024077776819467545,
0.02433246560394764,
-0.011989910155534744,
-0.021432943642139435,
-0.0036023606080561876,
-0.0030587005894631147,
0.03755662962794304,
-0.0016971012810245156,
0.026095686480402946,
0.027917683124542236,
-0.058852434158325195,
0.03160085901618004,
-0.0651608482003212,
-0.04756781458854675,
-0.04490339010953903,
0.027114437893033028,
-0.004591724369674921,
-0.09913226217031479,
0.017945682629942894,
-0.00009742107795318589,
-0.02762381173670292,
0.06402455270290375,
-0.012646220624446869,
0.03861456364393234,
-0.0008571218349970877,
0.032697975635528564,
-0.04349281266331673,
0.010128730908036232,
-0.02204027585685253,
0.02962213009595871,
-0.0546598844230175,
-0.016319599002599716,
0.03079761192202568,
0.012744177132844925,
-0.04419809952378273,
0.041807953268289566,
0.0001584144774824381,
0.02499857172369957,
0.018415875732898712,
0.0062153576873242855,
0.020590515807271004,
0.008938556537032127,
0.04357117787003517,
-0.0648082047700882,
0.04059328883886337,
0.02298066020011902,
-0.03691011667251587,
-0.041141849011182785,
0.01109850313514471,
-0.04596132040023804,
-0.033050619065761566,
0.05066324770450592,
-0.0012287454446777701,
-0.02895602397620678,
-0.007430022116750479,
0.01514411810785532,
-0.04259160906076431,
-0.011451147496700287,
0.006445556413382292,
-0.050388969480991364,
-0.018494240939617157,
-0.04980122670531273,
-0.00980057567358017,
-0.07530917227268219,
0.027682587504386902,
0.01722080260515213,
-0.0012483367463573813,
-0.01877831481397152,
0.015153913758695126,
-0.07084234803915024,
0.005490477662533522,
-0.03589136525988579,
0.013890272006392479,
0.06578777730464935,
-0.011039729230105877,
-0.043453630059957504,
-0.017142437398433685,
0.10250197350978851,
-0.046078871935606,
0.012763768434524536,
-0.04415891692042351,
-0.057285126298666,
0.02499857172369957,
0.03455915302038193,
0.014458420686423779,
0.04051492363214493,
-0.0011846647830680013,
-0.05904834717512131,
0.004479073919355869,
0.02497897855937481,
0.03704725578427315,
-0.014605356380343437,
-0.0004536623600870371,
0.01939544267952442,
-0.06418128311634064,
0.006352497264742851,
0.03410855308175087,
-0.017994660884141922,
-0.0010952792363241315,
0.006293723359704018,
-0.03771336004137993,
0.008262654766440392,
0.08651542663574219,
0.04666661098599434,
0.02664424479007721,
-0.03279593214392662,
-0.018611788749694824,
0.012793155387043953,
-0.06308417022228241,
-0.04337526485323906,
0.02764340303838253,
0.05246565118432045,
0.005147628951817751,
0.011411964893341064,
0.043257713317871094,
-0.03189472854137421,
-0.04654906317591667,
0.011451147496700287,
-0.030719246715307236,
-0.0506240651011467,
-0.00168730563018471,
-0.02300025336444378,
0.018993820995092392,
-0.07127335667610168,
-0.02548835426568985,
-0.0662187859416008,
-0.009340179152786732,
-0.020433785393834114,
-0.07887480407953262,
-0.04208223521709442,
-0.044785842299461365,
-0.01374333631247282,
0.012362145818769932,
0.0506240651011467,
-0.013508240692317486,
-0.00401133019477129,
-0.034343648701906204,
0.028681745752692223,
0.04517766833305359,
0.037321534007787704,
-0.013557218946516514,
-0.013165391981601715,
0.08283225446939468,
-0.08204860240221024,
0.033031027764081955,
0.0967029333114624,
-0.046940889209508896,
-0.08071638643741608,
-0.0019517889013513923,
0.01232296321541071,
-0.004623560234904289,
0.0769156664609909,
0.0018758723745122552,
0.018592197448015213,
0.01124543882906437,
0.011705835349857807,
0.045765407383441925,
-0.03130698576569557,
-0.0038227634504437447,
0.022275371477007866,
-0.0413377620279789,
-0.008732846938073635,
0.03428487479686737,
-0.013645379804074764,
0.05595291405916214,
0.05830387771129608,
-0.0052308919839560986,
-0.04419809952378273,
-0.024214915931224823,
-0.047450266778469086,
0.008414487354457378,
-0.007013705559074879,
-0.020629698410630226,
0.004077450837939978,
-0.03214941546320915,
0.02979845367372036,
-0.023940637707710266,
-0.03173799812793732,
-0.03148331120610237,
0.020257461816072464,
0.02149171754717827,
0.013469057157635689,
0.018699949607253075,
0.006876565981656313,
-0.00440560607239604,
-0.0024330015294253826,
-0.029700497165322304,
0.016917135566473007,
0.08400774002075195,
-0.023039435967803,
0.0061174011789262295,
0.007062683813273907,
-0.03324653208255768,
-0.020825611427426338,
-0.059988733381032944,
-0.0006648816633969545,
0.011950727552175522,
-0.014007819816470146,
-0.03322694078087807,
0.0394178107380867,
-0.060498107224702835,
0.050584882497787476
]
|
41,423 | pyglove.core.typing.class_schema | apply | Validates, completes and transforms the input value.
Here is the procedure of ``apply``::
(1). Choose the default value if the input value is ``MISSING_VALUE``
(2). Check whether the input value is None.
(2.a) Input value is None and ``value_spec.is_noneable()`` is False,
raises Error.
(2.b) Input value is not None or ``value_spec.is_noneable()`` is True,
goto step (3).
(3). Run ``value_spec.custom_apply`` if the input value is a
``CustomTyping`` instance.
(3.a). If ``value_spec.custom_apply`` returns a value that indicates to
proceed with standard apply, goto step (4).
(3.b). Else goto step (6)
(4). Check the input value type against the ``value_spec.value_type``.
(4.a). If their value type matches, go to step (5)
(4.b). Else if there is a converter registered between input value type
and the value spec's value type, perform the conversion, and go
to step (5). (see pg.typing.register_converter)
(4.c) Otherwise raises type mismatch.
(5). Perform type-specific and user validation and transformation.
For complex types such as Dict, List, Tuple, call `child_spec.apply`
recursively on the child fields.
(6). Perform user transform and returns final value
(invoked at Field.apply.)
Args:
value: Input value to apply.
allow_partial: If True, partial value is allowed. This is useful for
container types (dict, list, tuple).
child_transform: Function to transform child node values into final
values.
(NOTE: This transform will not be performed on current value. Instead
transform on current value is done by Field.apply, which has adequate
information to call transform with both KeySpec and ValueSpec).
root_path: Key path of current node.
Returns:
Final value:
* When allow_partial is set to False (default), only input value that
has no missing values can be applied.
* When allow_partial is set to True, missing fields will be placeheld
using MISSING_VALUE.
Raises:
KeyError: If additional key is found in value, or required key is missing
and allow_partial is set to False.
TypeError: If type of value is not the same as spec required.
ValueError: If value is not acceptable, or value is MISSING_VALUE while
allow_partial is set to False.
| @abc.abstractmethod
def apply(
self,
value: Any,
allow_partial: bool = False,
child_transform: Optional[Callable[
[object_utils.KeyPath, 'Field', Any], Any]] = None,
root_path: Optional[object_utils.KeyPath] = None,
) -> Any:
"""Validates, completes and transforms the input value.
Here is the procedure of ``apply``::
(1). Choose the default value if the input value is ``MISSING_VALUE``
(2). Check whether the input value is None.
(2.a) Input value is None and ``value_spec.is_noneable()`` is False,
raises Error.
(2.b) Input value is not None or ``value_spec.is_noneable()`` is True,
goto step (3).
(3). Run ``value_spec.custom_apply`` if the input value is a
``CustomTyping`` instance.
(3.a). If ``value_spec.custom_apply`` returns a value that indicates to
proceed with standard apply, goto step (4).
(3.b). Else goto step (6)
(4). Check the input value type against the ``value_spec.value_type``.
(4.a). If their value type matches, go to step (5)
(4.b). Else if there is a converter registered between input value type
and the value spec's value type, perform the conversion, and go
to step (5). (see pg.typing.register_converter)
(4.c) Otherwise raises type mismatch.
(5). Perform type-specific and user validation and transformation.
For complex types such as Dict, List, Tuple, call `child_spec.apply`
recursively on the child fields.
(6). Perform user transform and returns final value
(invoked at Field.apply.)
Args:
value: Input value to apply.
allow_partial: If True, partial value is allowed. This is useful for
container types (dict, list, tuple).
child_transform: Function to transform child node values into final
values.
(NOTE: This transform will not be performed on current value. Instead
transform on current value is done by Field.apply, which has adequate
information to call transform with both KeySpec and ValueSpec).
root_path: Key path of current node.
Returns:
Final value:
* When allow_partial is set to False (default), only input value that
has no missing values can be applied.
* When allow_partial is set to True, missing fields will be placeheld
using MISSING_VALUE.
Raises:
KeyError: If additional key is found in value, or required key is missing
and allow_partial is set to False.
TypeError: If type of value is not the same as spec required.
ValueError: If value is not acceptable, or value is MISSING_VALUE while
allow_partial is set to False.
"""
| (self, value: Any, allow_partial: bool = False, child_transform: Optional[Callable[[pyglove.core.object_utils.value_location.KeyPath, pyglove.core.typing.class_schema.Field, Any], Any]] = None, root_path: Optional[pyglove.core.object_utils.value_location.KeyPath] = None) -> Any | [
0.07565076649188995,
-0.04688970744609833,
-0.011416458524763584,
0.041573502123355865,
-0.01502115186303854,
-0.016828279942274094,
0.020155690610408783,
-0.06551555544137955,
0.041191041469573975,
-0.018931815400719643,
0.05216766893863678,
0.04191771522164345,
0.038035739213228226,
-0.016799595206975937,
0.006262797396630049,
0.06738961488008499,
0.008600589819252491,
0.09240255504846573,
0.0985984206199646,
0.03924049064517021,
0.02933475188910961,
-0.04562758654356003,
-0.030443888157606125,
0.0476163849234581,
0.03893452137708664,
-0.00225412892177701,
0.036219049245119095,
-0.018568476662039757,
-0.014676937833428383,
0.02334923855960369,
0.027326831594109535,
0.007405399344861507,
0.02987019717693329,
-0.012391733936965466,
0.014122368767857552,
-0.06291481852531433,
-0.06165269762277603,
0.054385941475629807,
-0.06941665709018707,
-0.03237531706690788,
-0.014849044382572174,
0.009580645710229874,
-0.05706316605210304,
-0.04352405294775963,
0.00256487843580544,
-0.0011832384625449777,
0.01584344357252121,
0.10395287722349167,
-0.050637826323509216,
-0.01011609099805355,
-0.008533659391105175,
-0.010575043968856335,
0.025567511096596718,
-0.01249691005796194,
-0.03698397055268288,
0.03679274022579193,
-0.0366588793694973,
0.023234499618411064,
0.031878117471933365,
0.0053305490873754025,
0.015939058735966682,
0.04513038694858551,
-0.03973769024014473,
-0.024037668481469154,
-0.015709582716226578,
-0.02107359655201435,
0.020423412322998047,
-0.033274099230766296,
-0.044480204582214355,
0.03354182094335556,
-0.06976086646318436,
-0.03424937278032303,
0.033694807440042496,
0.05128800868988037,
0.005105853080749512,
-0.004967211280018091,
-0.0028254298958927393,
0.004259658511728048,
0.07155843824148178,
-0.018970061093568802,
-0.016531873494386673,
0.0017354163574054837,
-0.052358899265527725,
-0.10227004438638687,
-0.02983195148408413,
0.027212094515562057,
-0.04815182834863663,
0.010441183112561703,
0.10395287722349167,
0.011301719583570957,
-0.03264303877949715,
-0.039928920567035675,
0.012927179224789143,
0.02738420106470585,
0.012994109652936459,
0.03654414042830467,
0.0189605001360178,
-0.051593977957963943,
-0.0278049074113369,
0.014571760781109333,
0.021589918062090874,
0.04432721808552742,
0.007233291864395142,
-0.008624493144452572,
0.08590072393417358,
-0.012965424917638302,
-0.02051902748644352,
-0.0073384689167141914,
0.008390236645936966,
0.028091754764318466,
-0.03302549943327904,
-0.05385049432516098,
-0.039508212357759476,
-0.0006651233998127282,
-0.027116479352116585,
0.006473151035606861,
-0.03195460885763168,
0.00011436477507231757,
-0.009618892334401608,
-0.011014874093234539,
0.039584703743457794,
0.007180703803896904,
0.02139868773519993,
-0.04731041565537453,
-0.002261300105601549,
0.02818736992776394,
0.019945336505770683,
-0.0017330260016024113,
0.023406608030200005,
0.04252965375781059,
-0.016550995409488678,
0.024420129135251045,
0.01158856600522995,
0.008375894278287888,
0.004582359921187162,
0.03782538324594498,
0.01808083988726139,
-0.009413318708539009,
-0.0488785058259964,
-0.002667664783075452,
0.016283273696899414,
-0.040426116436719894,
0.11068418622016907,
-0.015518351458013058,
0.036219049245119095,
-0.007907379418611526,
0.040311381220817566,
0.03577921912074089,
-0.03845644369721413,
0.01963936723768711,
-0.003953689709305763,
0.06214989721775055,
0.02367432974278927,
0.020824996754527092,
0.014170176349580288,
0.01398850791156292,
0.07018157839775085,
-0.06283833086490631,
0.002801526105031371,
-0.035205528140068054,
-0.010441183112561703,
-0.01337657030671835,
0.006219770759344101,
0.028933167457580566,
0.03262391686439514,
0.031208809465169907,
0.00013318902347236872,
-0.04505389556288719,
0.0034421482123434544,
0.024037668481469154,
0.007582287769764662,
-0.01011609099805355,
0.03101757913827896,
0.020958857610821724,
0.02464960515499115,
0.05668070539832115,
-0.00461343489587307,
-0.035587988793849945,
-0.02111184224486351,
0.007099430542439222,
-0.017497586086392403,
-0.023330114781856537,
-0.03140003979206085,
-0.02313888445496559,
0.015470543876290321,
0.048304811120033264,
-0.04750164598226547,
-0.006917761638760567,
0.007582287769764662,
0.017421094700694084,
-0.01660836488008499,
-0.03946996480226517,
0.042453162372112274,
0.0022636905778199434,
-0.02384643815457821,
-0.003865245496854186,
0.008959147147834301,
0.016742225736379623,
0.0429886057972908,
0.029487736523151398,
-0.05304732918739319,
-0.1044883206486702,
0.06861348450183868,
0.024458374828100204,
-0.10119915753602982,
-0.02457311376929283,
-0.0006926127825863659,
0.03273865208029747,
-0.048037089407444,
-0.06773382425308228,
-0.033274099230766296,
-0.050370100885629654,
-0.03363743796944618,
0.007085088174790144,
0.01891269162297249,
-0.0885014533996582,
0.054500680416822433,
-0.06172919273376465,
0.005316206719726324,
0.04562758654356003,
0.05641298368573189,
0.03302549943327904,
0.059396177530288696,
0.010661098174750805,
0.10984276980161667,
-0.008452385663986206,
-0.020423412322998047,
-0.04796059802174568,
0.0074484264478087425,
0.002139390679076314,
-0.025376280769705772,
-0.03004230372607708,
-0.01950550638139248,
0.0067313117906451225,
0.004185556434094906,
-0.010823643766343594,
0.05411821976304054,
-0.042491406202316284,
0.011033996939659119,
0.0014915975043550134,
-0.018023470416665077,
-0.023999422788619995,
-0.04964342713356018,
-0.0028971415013074875,
-0.025299789384007454,
-0.03509078919887543,
0.030749857425689697,
0.02591172605752945,
0.014409215189516544,
-0.023406608030200005,
0.0018226653337478638,
-0.00387719739228487,
0.0009794584475457668,
0.016398010775446892,
-0.0012274604523554444,
-0.01736372523009777,
0.003492346266284585,
-0.02069113589823246,
0.053582772612571716,
0.025548389181494713,
0.024955574423074722,
-0.05595403164625168,
-0.02006007544696331,
0.03654414042830467,
-0.051173269748687744,
-0.051593977957963943,
0.02107359655201435,
-0.006525739096105099,
0.013185339979827404,
0.06084953248500824,
-0.06578327715396881,
-0.011158296838402748,
0.016015550121665,
-0.002679616678506136,
-0.05002588778734207,
0.013567800633609295,
-0.003743336070328951,
0.021762026473879814,
0.02342572994530201,
-0.03342708200216293,
-0.0051010726019740105,
-0.017516709864139557,
-0.03315936028957367,
-0.031036702916026115,
-0.009633233770728111,
0.0027991358656436205,
-0.03151477873325348,
-0.00724763423204422,
-0.017354164272546768,
0.014017192646861076,
0.028072630986571312,
-0.04520687833428383,
0.003951299469918013,
0.005158441606909037,
-0.015384489670395851,
-0.015919934958219528,
-0.04753988981246948,
-0.10288198292255402,
0.01375903096050024,
-0.1024230346083641,
0.008935242891311646,
-0.00897348951548338,
-0.014122368767857552,
-0.003112275619059801,
0.05021711811423302,
0.019792351871728897,
-0.022431332617998123,
-0.00576081732288003,
-0.013730346225202084,
0.0425678975880146,
-0.0278049074113369,
0.00751057593151927,
-0.04176473245024681,
-0.030979333445429802,
0.0463542640209198,
-0.016245028004050255,
0.047004446387290955,
0.009599768556654453,
0.019065676257014275,
0.0015800416003912687,
-0.039125751703977585,
0.017354164272546768,
-0.0438300184905529,
0.010211706161499023,
-0.03633378818631172,
-0.02688700146973133,
0.035205528140068054,
0.008079486899077892,
-0.021609041839838028,
0.012018834240734577,
-0.01575738936662674,
0.0476163849234581,
0.06214989721775055,
0.05331505089998245,
-0.052817851305007935,
-0.04272088408470154,
0.02069113589823246,
-0.026179449632763863,
0.018989184871315956,
0.03671624884009361,
0.01647450402379036,
0.03264303877949715,
0.03977593407034874,
-0.018482424318790436,
-0.0035066884011030197,
-0.006425343453884125,
0.023444853723049164,
0.01631195843219757,
0.09431485831737518,
-0.006822146475315094,
0.02987019717693329,
-0.05132625252008438,
-0.03235619142651558,
-0.029564227908849716,
-0.004587140399962664,
-0.035167280584573746,
-0.01426579151302576,
-0.01866409182548523,
-0.02191500924527645,
-0.05331505089998245,
0.12039869278669357,
-0.07362372428178787,
-0.009446784853935242,
0.01942901499569416,
0.061079006642103195,
0.007233291864395142,
-0.056527722626924515,
-0.007601410616189241,
0.02384643815457821,
0.014896852895617485,
0.054003480821847916,
-0.04975816607475281,
0.01325227040797472,
-0.057713352143764496,
0.028474215418100357,
0.01651274971663952,
0.027001740410923958,
0.035836588591337204,
-0.04432721808552742,
0.0017939807148650289,
0.026275064796209335,
0.0012418028200045228,
-0.039508212357759476,
-0.03612343221902847,
0.016130289062857628,
-0.007328907027840614,
0.061958666890859604,
-0.016321519389748573,
-0.009446784853935242,
-0.03193548694252968,
0.003542544087395072,
0.009332045912742615,
-0.01337657030671835,
-0.0784044861793518,
-0.00412818742915988,
0.00699425395578146,
0.002213492523878813,
0.001415105420164764,
-0.030826348811388016,
-0.03943172097206116,
0.0018931814702227712,
-0.018319876864552498,
0.041229285299777985,
0.0551891103386879,
0.012391733936965466,
-0.026867879554629326,
0.060199346393346786,
0.013720785267651081,
-0.015040275640785694,
0.09836894273757935,
0.040846824645996094,
-0.014543076045811176,
-0.004539332818239927,
0.011913657188415527,
0.00033554970286786556,
-0.013156655244529247,
0.0036548920907080173,
-0.020289551466703415,
-0.035243771970272064,
-0.022488702088594437,
0.03535851091146469,
0.008519317023456097,
-0.026867879554629326,
0.03021441213786602,
0.0551891103386879,
-0.036180801689624786,
0.007281099446117878,
-0.010947943665087223,
0.013931138440966606,
0.03924049064517021,
0.01715337112545967,
-0.06979911774396896,
-0.0796283632516861,
0.02642804943025112,
-0.036429401487112045,
-0.009747972711920738,
-0.011349527165293694,
0.005469190888106823,
0.03291076049208641,
0.003984764683991671,
-0.030941087752580643,
0.0244392529129982,
0.017201179638504982,
-0.026523664593696594,
0.032891638576984406,
-0.005665202159434557,
0.022029748186469078,
0.04727216809988022,
-0.06463589519262314,
0.00380787649191916,
0.03199285641312599,
0.03966119512915611,
0.03893452137708664,
0.030941087752580643,
-0.03510991111397743,
0.01795653998851776,
-0.012659456580877304,
-0.049834657460451126,
0.0027202533092349768,
0.015919934958219528,
0.05369751155376434,
-0.000029693010219489224,
-0.006511397194117308,
-0.05090554803609848,
-0.012630771845579147,
0.05767510458827019,
-0.01955331489443779,
-0.02118833363056183,
-0.020997103303670883,
-0.00576081732288003,
0.02191500924527645,
-0.029698088765144348,
0.04107630252838135,
0.025605758652091026,
0.003826999571174383,
0.03734730929136276,
0.037060461938381195,
-0.04337106645107269,
-0.030310027301311493,
-0.04008190333843231,
0.040043655782938004,
0.020576396957039833,
0.03407726809382439,
-0.0025338034611195326,
0.0019421842880547047,
-0.01899874582886696,
0.025777865201234818,
0.00922686979174614,
0.04815182834863663,
0.03893452137708664,
-0.04363878816366196,
0.04344755783677101,
0.07102298736572266,
0.030826348811388016,
-0.06463589519262314,
-0.08329998701810837,
0.01988796703517437,
-0.015279313549399376,
0.05331505089998245,
-0.017631448805332184,
0.011435581371188164,
0.024515744298696518,
0.010947943665087223,
0.04543635621666908,
0.01715337112545967,
-0.04623952507972717,
-0.0013493698788806796,
0.013606047257781029,
-0.005861213430762291,
-0.029487736523151398,
-0.05415646359324455,
-0.002146561862900853,
0.06119374558329582,
0.007653999142348766,
0.007328907027840614,
-0.0052444953471422195,
0.046621985733509064,
0.012812440283596516,
-0.036046940833330154,
-0.08926637470722198,
-0.00549787562340498,
-0.013921577483415604,
-0.0007780689047649503,
0.01766013167798519,
0.018530230969190598,
0.049834657460451126,
-0.013912015594542027,
-0.03813135251402855,
0.030539503321051598,
-0.06207340583205223,
0.018090400844812393,
-0.003932176157832146,
0.05744563043117523,
0.011148735880851746,
-0.0018310316372662783,
0.018004346638917923,
0.002433407586067915,
-0.005421383306384087,
-0.059051964432001114,
0.0025242420379072428,
0.03203110024333,
0.05136450007557869,
-0.00872488971799612,
0.004094722215086222,
0.05144099146127701,
-0.013778154738247395,
0.03851381316781044,
-0.036219049245119095,
0.00834242906421423,
-0.01942901499569416,
-0.03553061932325363,
-0.0051345378160476685,
0.04092331603169441,
0.09278501570224762,
0.005502656567841768,
-0.012831563130021095,
-0.012688140384852886,
0.05293259024620056,
-0.01815733127295971,
-0.01829119212925434,
0.013720785267651081,
-0.013892892748117447,
0.040311381220817566,
-0.03568360209465027,
0.020002705976366997,
-0.016340643167495728,
-0.038532935082912445,
0.00636319350451231,
0.032260578125715256,
-0.02195325680077076,
-0.007620533462613821,
0.024534868076443672,
-0.005827748216688633,
-0.06482712179422379,
0.035243771970272064,
0.01714381016790867,
-0.07320301979780197,
-0.03585571050643921,
-0.05473015457391739,
-0.08115820586681366,
-0.03564535826444626,
-0.048725519329309464,
0.08712459355592728,
-0.033063746988773346,
0.0007236877572722733,
-0.036046940833330154,
0.013443500734865665,
0.067427858710289,
-0.03880066052079201,
-0.002029433147981763,
-0.054806649684906006,
-0.002340182662010193,
-0.0191804151982069,
0.0034947365056723356,
0.04421248286962509,
0.002572049619629979,
-0.053544528782367706,
-0.027537185698747635,
0.04344755783677101,
-0.06333553045988083,
-0.059357933700084686,
-0.008184663020074368,
0.009810122661292553,
0.03889627382159233,
-0.02279466949403286,
0.02692524716258049,
-0.016216343268752098,
0.023234499618411064,
0.06249411404132843,
-0.029430367052555084,
0.03627641871571541,
0.01846330054104328,
0.03637203201651573,
-0.028340352699160576,
0.0008163150050677359,
-0.03910662978887558,
-0.07052579522132874,
0.018530230969190598,
0.004539332818239927,
-0.03509078919887543,
-0.03845644369721413,
0.0010535602923482656,
-0.07488584518432617,
0.011301719583570957,
-0.04264439269900322,
0.006234112661331892,
-0.023444853723049164,
-0.010202145203948021,
-0.03484218940138817,
-0.021723778918385506,
0.02166641131043434,
0.013261832296848297,
-0.013319200836122036,
0.018425054848194122,
-0.03841819986701012,
-0.009767095558345318,
0.001777247991412878,
0.010326444171369076,
-0.003542544087395072,
0.021838517859578133,
-0.021857641637325287,
-0.028302107006311417,
-0.009112130850553513,
0.031285300850868225,
-0.025051189586520195,
-0.00014857710630167276,
-0.05262662097811699,
-0.04463318735361099,
0.010947943665087223,
0.041573502123355865,
-0.038150474429130554,
0.026313310489058495,
-0.0033919501584023237,
-0.040311381220817566,
0.05828704312443733,
0.013931138440966606,
0.086818628013134,
-0.02843596786260605,
-0.027709292247891426,
0.03924049064517021,
-0.04440371319651604,
-0.03648677095770836,
0.039584703743457794,
0.0023162788711488247,
0.03472745046019554,
-0.0140076307579875,
0.015384489670395851,
-0.022909408435225487,
0.029602473601698875,
-0.005999855697154999,
-0.025548389181494713,
-0.03488043323159218,
-0.0204425361007452,
0.03788275271654129,
-0.03692660108208656,
-0.015174136497080326,
0.016847403720021248,
0.03463183715939522,
-0.02874193713068962,
0.0015597234014421701,
0.06429167836904526,
-0.03514815866947174,
-0.060696545988321304,
0.08192312717437744,
-0.060237593948841095,
-0.08008731156587601,
0.034402359277009964,
0.01706731878221035,
-0.0008049606694839895,
-0.09729805588722229,
0.04149700701236725,
-0.05025536194443703,
0.0044963061809539795,
-0.007567945402115583,
-0.030310027301311493,
-0.032681286334991455,
-0.04138227179646492,
0.03344620764255524,
0.040311381220817566,
0.06624223291873932,
0.017220303416252136,
0.0008689033566042781,
-0.02233571745455265,
-0.04337106645107269,
0.04019664227962494,
0.0122196264564991,
-0.05346803367137909,
0.021551672369241714,
0.06666293740272522,
-0.023502223193645477,
0.005038922652602196,
0.08123470097780228,
-0.02478346787393093,
-0.029678966850042343,
-0.04015839472413063,
0.004589531105011702,
0.007171141915023327,
0.04731041565537453,
0.006454027723520994,
-0.017631448805332184,
0.008653177879750729,
-0.006903419271111488,
-0.0006002843729220331,
-0.03564535826444626,
0.02233571745455265,
0.02688700146973133,
-0.03262391686439514,
-0.0025840015150606632,
0.03530114144086838,
0.01447614561766386,
0.07262932509183884,
0.04646899923682213,
0.031878117471933365,
-0.020366042852401733,
0.028550706803798676,
-0.013032355345785618,
-0.004204679746180773,
-0.006148058921098709,
-0.05599227547645569,
-0.0278049074113369,
0.012955863028764725,
0.03966119512915611,
0.012898494489490986,
-0.021972378715872765,
0.040043655782938004,
0.02717384696006775,
0.005693886894732714,
0.056145261973142624,
0.02174290269613266,
0.009398977272212505,
-0.0021429762709885836,
0.006210208870470524,
0.009494592435657978,
0.03556886315345764,
0.0644446611404419,
0.00549787562340498,
-0.002904312452301383,
-0.011942341923713684,
-0.017889609560370445,
-0.016665734350681305,
-0.02591172605752945,
-0.0556098148226738,
-0.006296262610703707,
0.013778154738247395,
0.05262662097811699,
0.019151730462908745,
-0.002863676054403186,
0.06956963986158371
]
|
41,424 | pyglove.core.typing.class_schema | extend | Extends a base spec with current spec's rules.
Args:
base: Base ValueSpec to extend.
Returns:
ValueSpec itself.
Raises:
TypeError: When this value spec cannot extend from base.
| @abc.abstractmethod
def extend(self, base: 'ValueSpec') -> 'ValueSpec':
"""Extends a base spec with current spec's rules.
Args:
base: Base ValueSpec to extend.
Returns:
ValueSpec itself.
Raises:
TypeError: When this value spec cannot extend from base.
"""
| (self, base: pyglove.core.typing.class_schema.ValueSpec) -> pyglove.core.typing.class_schema.ValueSpec | [
0.02708498202264309,
-0.06665719300508499,
-0.004306775983422995,
0.062260281294584274,
-0.03577328100800514,
0.006793229840695858,
-0.025150340050458908,
-0.06394869834184647,
-0.026557352393865585,
-0.04534096270799637,
0.06342107057571411,
-0.008050747215747833,
0.04741630703210831,
0.053888559341430664,
-0.0367581881582737,
0.012812603265047073,
0.035984333604574203,
0.047099728137254715,
0.011590261943638325,
-0.006102914456278086,
-0.017271073535084724,
-0.0010706481989473104,
-0.020014746114611626,
-0.004460667725652456,
-0.002208349294960499,
0.10798817127943039,
0.005430187098681927,
-0.01996198296546936,
0.007509926799684763,
-0.0523056723177433,
-0.07302392274141312,
-0.034823548048734665,
0.0320974625647068,
0.023373987525701523,
0.04657209664583206,
-0.0837172195315361,
-0.04913989454507828,
0.09328489750623703,
-0.12831950187683105,
0.07879267632961273,
0.0021105180494487286,
-0.02040167525410652,
0.005557697732001543,
-0.044813334941864014,
0.04428570345044136,
-0.011326447129249573,
0.005984197836369276,
0.025203103199601173,
0.00922472309321165,
0.003710994264110923,
0.015362812206149101,
-0.004190257750451565,
0.005329058039933443,
-0.014597750268876553,
-0.04505956172943115,
0.07794846594333649,
0.002137998817488551,
0.03869283199310303,
-0.010746054351329803,
0.09117437899112701,
-0.01606631837785244,
0.0002539216948207468,
-0.00019538780907168984,
-0.07794846594333649,
-0.02430613338947296,
-0.025642793625593185,
-0.06433562189340591,
-0.059481434524059296,
0.0012289370642974973,
0.047908760607242584,
-0.003651635954156518,
-0.006476652342826128,
0.015266080386936665,
0.044813334941864014,
0.031042203307151794,
0.021615222096443176,
-0.026451826095581055,
-0.011942015029489994,
0.08329511433839798,
-0.08779755234718323,
-0.011827695183455944,
0.029441727325320244,
-0.01009531132876873,
-0.0003693406470119953,
-0.002537018619477749,
-0.005289485678076744,
-0.06630544364452362,
-0.02833370491862297,
0.08864175528287888,
0.004210043698549271,
-0.003955022897571325,
0.023602627217769623,
0.001171777257695794,
0.01618943177163601,
0.06686824560165405,
0.00849483534693718,
0.009901846759021282,
-0.04333597049117088,
-0.03521047532558441,
-0.03396175429224968,
-0.030725624412298203,
0.02629353664815426,
-0.039396338164806366,
-0.026574939489364624,
0.016840174794197083,
-0.0002734329900704324,
0.005979801062494516,
-0.018730847164988518,
-0.021316232159733772,
0.024605123326182365,
-0.03016282059252262,
-0.00728568434715271,
-0.0762600526213646,
0.0028623901307582855,
-0.05986836180090904,
0.044109828770160675,
0.014439460821449757,
0.0008733367430977523,
0.02604730986058712,
-0.012302561663091183,
0.004205646924674511,
0.04935094714164734,
-0.01883637346327305,
0.02029614895582199,
0.07984793186187744,
0.01153749879449606,
-0.002072045113891363,
0.006437079980969429,
-0.006714085582643747,
-0.05234084650874138,
0.0035417131148278713,
0.00780012272298336,
-0.02938896417617798,
-0.0014245996717363596,
0.029740717262029648,
0.020278559997677803,
0.022670481353998184,
-0.00771658169105649,
-0.021070005372166634,
-0.034718021750450134,
0.019434353336691856,
-0.007672612555325031,
0.06834560632705688,
-0.006661322433501482,
-0.07056165486574173,
-0.005170769058167934,
-0.018906723707914352,
-0.012680696323513985,
-0.04850674048066139,
0.05796889588236809,
-0.02293429523706436,
0.025871433317661285,
-0.02224837802350521,
-0.02339157462120056,
0.0282105915248394,
0.004337554331868887,
0.014676894061267376,
-0.01860773377120495,
0.015098998323082924,
-0.042737990617752075,
-0.0436173714697361,
-0.025607619434595108,
0.01290933508425951,
-0.01859014667570591,
-0.009796321392059326,
0.05012480542063713,
-0.061662301421165466,
-0.060395993292331696,
-0.010508621111512184,
-0.019100189208984375,
0.010974694043397903,
-0.04386359825730324,
0.06517983227968216,
-0.0015598047757521272,
0.04980822652578354,
0.009154371917247772,
0.0036824143026024103,
0.019786106422543526,
-0.03682854026556015,
0.02696186862885952,
0.051672518253326416,
-0.020612725988030434,
-0.07998863607645035,
-0.00347136240452528,
0.034946661442518234,
-0.0018313140608370304,
-0.015521101653575897,
0.009409393183887005,
0.028632694855332375,
0.006925137247890234,
0.023708153516054153,
-0.03063768707215786,
0.0022281354758888483,
0.01570577174425125,
-0.01710399053990841,
-0.05072278529405594,
0.01869567297399044,
0.058250296860933304,
0.019346415996551514,
0.09047087281942368,
-0.050898659974336624,
-0.0023655390832573175,
0.008424484170973301,
0.015538688749074936,
0.035738106817007065,
0.011229714378714561,
0.03879835829138756,
-0.08209915459156036,
-0.05068760737776756,
-0.0372154675424099,
-0.055928729474544525,
-0.026821166276931763,
0.010112899355590343,
0.014668100513517857,
0.017578857019543648,
-0.05473276972770691,
0.004955320619046688,
-0.02879098430275917,
0.0006798726390115917,
0.03445420786738396,
0.059622135013341904,
0.005175166297703981,
0.07042095065116882,
-0.014184440486133099,
0.08238055557012558,
-0.0015147364465519786,
0.005434583872556686,
-0.0799182802438736,
-0.011950808577239513,
0.02282877080142498,
0.030321110039949417,
-0.024956876412034035,
0.023884030058979988,
0.000557583465706557,
-0.016110287979245186,
0.09856119006872177,
0.01278622169047594,
-0.017051227390766144,
-0.024130256846547127,
0.03855213150382042,
-0.04013501852750778,
0.06271756440401077,
-0.014931915327906609,
0.04724042862653732,
-0.05684328451752663,
-0.05761714279651642,
-0.01010410487651825,
0.048823315650224686,
0.0029349392279982567,
0.010570177808403969,
0.014360316097736359,
-0.05737091600894928,
-0.006243615876883268,
0.02238907851278782,
-0.007523117586970329,
0.0395018644630909,
-0.03679336607456207,
-0.02606489695608616,
0.051355939358472824,
-0.03373311460018158,
0.034137628972530365,
0.022987058386206627,
-0.011388003826141357,
0.018044929951429367,
-0.04878814145922661,
-0.026909105479717255,
0.00889495387673378,
0.034946661442518234,
-0.026821166276931763,
0.085405632853508,
-0.021492108702659607,
-0.0028470009565353394,
0.019768519327044487,
-0.014773625880479813,
-0.005992991849780083,
0.0472756028175354,
0.028087478131055832,
-0.009998579509556293,
0.03967773914337158,
-0.05529557168483734,
-0.0011300065089017153,
0.016233401373028755,
-0.011229714378714561,
0.009514918550848961,
-0.02764778584241867,
-0.023919204249978065,
-0.013463346287608147,
-0.037109941244125366,
-0.03200952336192131,
-0.018642909824848175,
0.001981908455491066,
-0.015266080386936665,
0.010262394323945045,
0.04221035912632942,
0.06778280436992645,
0.005544506944715977,
0.028316117823123932,
-0.02247701771557331,
0.010473445989191532,
-0.027471909299492836,
0.03420798107981682,
-0.016110287979245186,
-0.050300680100917816,
0.03658231347799301,
-0.04970270022749901,
-0.0837172195315361,
0.021544871851801872,
0.0024007142055779696,
-0.03890388086438179,
0.003642842173576355,
-0.023690564557909966,
0.0873754471540451,
-0.03433109447360039,
0.010974694043397903,
0.04185860976576805,
-0.009611651301383972,
0.010350332595407963,
0.006828405428677797,
0.021984562277793884,
0.04794393479824066,
-0.04449675604701042,
0.018977073952555656,
-0.003297684481367469,
-0.05402926355600357,
-0.015415575355291367,
0.0028294131625443697,
0.04002949222922325,
0.026574939489364624,
-0.01473845075815916,
-0.008965305052697659,
-0.06616473942995071,
0.005570888053625822,
0.07949618250131607,
-0.008063937537372112,
-0.09947574883699417,
-0.03408486768603325,
0.04214001074433327,
-0.006731673143804073,
0.0029283438343554735,
0.017719557508826256,
0.04048677161335945,
-0.008301370777189732,
0.00682400818914175,
-0.04456710442900658,
0.004221036098897457,
-0.040416419506073,
0.013164356350898743,
-0.014887945726513863,
0.062154754996299744,
0.00002143494930351153,
0.012021158821880817,
-0.028298528864979744,
-0.02546691708266735,
-0.028896508738398552,
0.019997159019112587,
0.007250508759170771,
-0.04382842406630516,
-0.019662993028759956,
0.003330661216750741,
-0.08111423999071121,
0.07752636075019836,
-0.004867382347583771,
0.005082830786705017,
0.035069774836301804,
-0.020049922168254852,
-0.011678200215101242,
-0.03302960842847824,
0.02077101543545723,
0.016717061400413513,
-0.030901500955224037,
0.0012212424771860242,
-0.03732099384069443,
0.04024054482579231,
-0.04467263072729111,
-0.006802023854106665,
-0.01618943177163601,
-0.02536139264702797,
0.008085922338068485,
-0.03763757273554802,
-0.00019222752598579973,
0.04935094714164734,
0.004302379209548235,
-0.07830022275447845,
-0.010411889292299747,
-0.011722168885171413,
-0.02397196739912033,
0.060079414397478104,
-0.011968395672738552,
0.0009189547272399068,
0.05589355155825615,
0.05040620639920235,
-0.0036978034768253565,
-0.05216497182846069,
0.012135478667914867,
-0.08195845037698746,
-0.036089859902858734,
-0.014034944586455822,
-0.023127760738134384,
-0.04094405099749565,
0.016110287979245186,
0.05976283550262451,
-0.009594063274562359,
0.07787811756134033,
0.010939518921077251,
0.030901500955224037,
-0.04073299840092659,
0.07499374449253082,
-0.034823548048734665,
-0.030197996646165848,
0.027260858565568924,
-0.04875296726822853,
-0.025959372520446777,
-0.07253146916627884,
0.0206654891371727,
0.00923351664096117,
-0.03633608669042587,
0.041612379252910614,
-0.06968227028846741,
-0.007518720347434282,
0.0007419789908453822,
0.03294166922569275,
-0.02891409769654274,
-0.03051457367837429,
0.09673207998275757,
0.005280692130327225,
0.034260742366313934,
-0.0038472984451800585,
0.03244921565055847,
-0.04013501852750778,
-0.005676414351910353,
0.02434130758047104,
0.020454436540603638,
-0.07984793186187744,
-0.017763527110219002,
0.004478255286812782,
-0.07429023832082748,
-0.027489498257637024,
-0.03361000120639801,
0.0016224607825279236,
0.008912541903555393,
0.008116700686514378,
0.03283614292740822,
0.0184494461864233,
0.049386121332645416,
0.024992050603032112,
-0.037461694329977036,
-0.006991091184318066,
0.029863830655813217,
-0.06753657758235931,
-0.02652217634022236,
0.01971575617790222,
-0.003073441796004772,
0.07344602793455124,
0.020507199689745903,
-0.0431600958108902,
-0.05304435268044472,
0.046396221965551376,
-0.03508736193180084,
0.016101494431495667,
-0.01509020384401083,
0.061556775122880936,
0.041612379252910614,
-0.04822533577680588,
-0.04351184889674187,
-0.006634941324591637,
0.04769770801067352,
0.022406667470932007,
-0.019135363399982452,
-0.015494720079004765,
0.03225575014948845,
0.03570292890071869,
-0.0236378014087677,
0.024323720484972,
-0.01676103100180626,
-0.010517414659261703,
0.009426980279386044,
0.013041242957115173,
0.003183364635333419,
0.005412599537521601,
-0.035861220210790634,
0.019205713644623756,
-0.020964479073882103,
-0.00521913543343544,
0.050652433186769485,
0.03707476705312729,
0.005891862791031599,
0.0014575765235349536,
0.0036912080831825733,
-0.023092584684491158,
0.0385873056948185,
-0.03565016761422157,
0.009066433645784855,
-0.015336431562900543,
0.04931577295064926,
0.011475942097604275,
-0.046642448753118515,
0.04442640393972397,
-0.0012926922645419836,
0.062365807592868805,
0.003055854234844446,
0.018783610314130783,
-0.0327833816409111,
-0.004735474940389395,
0.029072385281324387,
0.02488652616739273,
0.007180158048868179,
-0.04667762294411659,
0.0019950990099459887,
0.010658116079866886,
0.014413079246878624,
-0.005298279691487551,
0.06071256846189499,
0.02033132314682007,
0.019803693518042564,
0.04425052925944328,
-0.053747858852148056,
0.004456270951777697,
0.018801197409629822,
0.008512422442436218,
-0.037461694329977036,
-0.032748203724622726,
-0.01788664050400257,
-0.004972908180207014,
-0.04372289776802063,
0.021034829318523407,
-0.03266026824712753,
-0.027929188683629036,
-0.029072385281324387,
-0.011168157681822777,
-0.0006589872646145523,
0.020225798711180687,
-0.019416766241192818,
0.0372154675424099,
0.03879835829138756,
0.0013421576004475355,
0.042632464319467545,
0.00001641113340156153,
0.008688298985362053,
-0.030039707198739052,
-0.001272906200028956,
0.02502722665667534,
0.02708498202264309,
0.0699988454580307,
0.010526209138333797,
-0.012548788450658321,
0.04667762294411659,
-0.01860773377120495,
-0.024939287453889847,
0.01519573014229536,
-0.02258254401385784,
-0.029072385281324387,
0.02397196739912033,
-0.009567681699991226,
0.03922045975923538,
-0.01532763708382845,
-0.07232041656970978,
0.01119453925639391,
0.007114204578101635,
0.006599765736609697,
0.03478837385773659,
0.024710649624466896,
0.042984217405319214,
0.04671280086040497,
0.015468338504433632,
-0.016268577426671982,
0.03841142728924751,
-0.0033482490107417107,
0.031956762075424194,
-0.027788488194346428,
-0.005940228700637817,
-0.02960001491010189,
0.013164356350898743,
0.002427095780149102,
-0.0332406610250473,
-0.015037440694868565,
0.046536922454833984,
-0.032414041459560394,
0.02671564184129238,
-0.054556891322135925,
-0.04185860976576805,
-0.07907407730817795,
-0.020454436540603638,
0.02442924678325653,
-0.07436058670282364,
0.04889366775751114,
-0.023831266909837723,
-0.022969471290707588,
0.05385338515043259,
-0.008103510364890099,
0.0031503878999501467,
-0.06050151586532593,
0.005729177035391331,
-0.006986693944782019,
-0.07080788165330887,
-0.023373987525701523,
0.004236425273120403,
-0.058918628841638565,
-0.06116984784603119,
-0.034260742366313934,
-0.007017472293227911,
-0.038939058780670166,
0.0323261022567749,
0.043300796300172806,
0.04741630703210831,
-0.009040052071213722,
0.022230790928006172,
0.009084021672606468,
0.016787411645054817,
-0.029564840719103813,
-0.03225575014948845,
0.0632803663611412,
0.005395011976361275,
-0.002866786904633045,
-0.07478269189596176,
0.006274394225329161,
-0.03703959286212921,
-0.06088844686746597,
0.0184494461864233,
0.034383855760097504,
0.011660612188279629,
-0.007980396039783955,
0.022178027778863907,
-0.06869736313819885,
0.021281056106090546,
-0.05381821095943451,
0.05712468922138214,
0.015802504494786263,
0.015292461961507797,
-0.025889022275805473,
-0.07787811756134033,
0.018203217536211014,
0.005320264026522636,
0.018326330929994583,
-0.02924826182425022,
0.009339042007923126,
-0.05174286663532257,
0.03422556817531586,
-0.00011390751751605421,
0.029459314420819283,
0.07246112078428268,
-0.0027480702847242355,
-0.026557352393865585,
-0.0104470644146204,
0.042702816426754,
-0.05772266909480095,
-0.005113609135150909,
-0.045622363686561584,
-0.04611482098698616,
-0.011220920830965042,
-0.001958824461326003,
0.02282877080142498,
0.03156983107328415,
-0.005834702868014574,
-0.007105410564690828,
0.07780776172876358,
0.015538688749074936,
0.0559639036655426,
0.004841000773012638,
0.017068814486265182,
0.018730847164988518,
-0.03028593398630619,
0.009084021672606468,
0.03404968976974487,
0.040908873081207275,
0.03647678717970848,
0.014175646007061005,
0.00006859870336484164,
-0.042526938021183014,
0.031956762075424194,
0.011370415799319744,
0.03890388086438179,
-0.01570577174425125,
-0.050335854291915894,
0.02121070586144924,
-0.027383971959352493,
-0.0024512787349522114,
-0.009690795093774796,
-0.0014586757170036435,
0.034260742366313934,
0.024358896538615227,
0.028949271887540817,
-0.02442924678325653,
-0.01560024544596672,
-0.011352828703820705,
-0.029107561334967613,
-0.004731078166514635,
-0.0102184247225523,
0.028843747451901436,
-0.022564955055713654,
-0.07161691039800644,
0.024939287453889847,
-0.04565754160284996,
-0.02650458924472332,
0.01731504127383232,
-0.003073441796004772,
-0.007971602492034435,
-0.05589355155825615,
-0.03594915568828583,
0.024394070729613304,
0.0014564773300662637,
0.028421642258763313,
-0.0033614395651966333,
-0.033574823290109634,
0.004779444076120853,
0.05941108241677284,
0.03672301396727562,
-0.030110057443380356,
-0.023831266909837723,
0.03364517539739609,
-0.05589355155825615,
0.026100073009729385,
0.08223985135555267,
-0.026645289734005928,
-0.08378756791353226,
0.016602741554379463,
-0.023954380303621292,
0.04804946109652519,
0.018959486857056618,
0.004783840849995613,
0.06022011488676071,
-0.028316117823123932,
0.007127395365387201,
0.07330532371997833,
-0.008617948740720749,
-0.0184494461864233,
0.02961760386824608,
-0.027155332267284393,
-0.005403805524110794,
0.024253370240330696,
0.045270610600709915,
0.029459314420819283,
0.05174286663532257,
-0.016479628160595894,
0.03703959286212921,
0.026346299797296524,
0.025378979742527008,
-0.08885280787944794,
0.008617948740720749,
-0.02307499758899212,
-0.010578971356153488,
0.026821166276931763,
-0.015644215047359467,
-0.01651480421423912,
-0.025783495977520943,
0.0011827695416286588,
-0.01952229253947735,
0.04660727456212044,
0.05255189910531044,
-0.0007375821005553007,
0.024745823815464973,
-0.014501017518341541,
0.03295925632119179,
-0.0015400185948237777,
0.04646657407283783,
0.05216497182846069,
-0.01996198296546936,
0.0104470644146204,
-0.013331439346075058,
0.005359836388379335,
0.0022468222305178642,
-0.032994430512189865,
-0.008798222057521343,
0.05561215057969093,
0.052024271339178085,
-0.051672518253326416,
0.036652661859989166,
0.003794535528868437,
0.03373311460018158
]
|
41,426 | pyglove.core.typing.class_schema | freeze | Sets the default value using a permanent value and freezes current spec.
A frozen value spec will not accept any value that is not the default
value. A frozen value spec is useful when a subclass fixes the value of a
symoblic attribute and want to prevent it from being modified.
Args:
permanent_value: A permanent value used for current spec.
If MISSING_VALUE, freeze the value spec with current default value.
apply_before_use: If True, invoke `apply` on permanent value
when permanent_value is provided, otherwise use it as is.
Returns:
ValueSpec itself.
Raises:
ValueError if current default value is MISSING_VALUE and the permanent
value is not specified.
| @abc.abstractmethod
def freeze(
self,
permanent_value: Any = object_utils.MISSING_VALUE,
apply_before_use: bool = True) -> 'ValueSpec':
"""Sets the default value using a permanent value and freezes current spec.
A frozen value spec will not accept any value that is not the default
value. A frozen value spec is useful when a subclass fixes the value of a
symoblic attribute and want to prevent it from being modified.
Args:
permanent_value: A permanent value used for current spec.
If MISSING_VALUE, freeze the value spec with current default value.
apply_before_use: If True, invoke `apply` on permanent value
when permanent_value is provided, otherwise use it as is.
Returns:
ValueSpec itself.
Raises:
ValueError if current default value is MISSING_VALUE and the permanent
value is not specified.
"""
| (self, permanent_value: Any = MISSING_VALUE, apply_before_use: bool = True) -> pyglove.core.typing.class_schema.ValueSpec | [
0.12753503024578094,
-0.025029268115758896,
-0.03482634201645851,
-0.0005057565285824239,
0.009797072038054466,
-0.03589951992034912,
-0.008524836972355843,
-0.028335347771644592,
-0.030222062021493912,
-0.013302207924425602,
0.040157608687877655,
0.026448631659150124,
-0.028179563581943512,
0.027331408113241196,
-0.031260620802640915,
0.014851391315460205,
0.017335278913378716,
0.028923863545060158,
0.004517731256783009,
0.05532056838274002,
0.04050379619002342,
0.005551962647587061,
-0.02392147295176983,
0.05203180015087128,
0.009693216532468796,
0.013613775372505188,
-0.03067210502922535,
0.01620151847600937,
0.04666591063141823,
0.01410709135234356,
0.027366025373339653,
0.009122008457779884,
-0.015180268324911594,
0.03520714491605759,
0.07685335725545883,
-0.032645367085933685,
-0.02603320963680744,
0.12511172890663147,
-0.053451161831617355,
-0.07519166171550751,
0.015561074018478394,
-0.01393399853259325,
0.004169381223618984,
-0.032541509717702866,
-0.008144032210111618,
0.004915845114737749,
0.04715057089924812,
0.09021614491939545,
0.047877565026283264,
-0.015258160419762135,
0.062348149716854095,
0.014557133428752422,
0.03293962404131889,
-0.02004418522119522,
-0.03406473249197006,
0.054835908114910126,
0.03288769721984863,
0.0454888790845871,
-0.007005944848060608,
0.020113423466682434,
-0.00925182830542326,
0.013129115104675293,
0.007226638961583376,
-0.10267885029315948,
-0.03359737992286682,
-0.032956935465335846,
-0.032853078097105026,
-0.04237320274114609,
-0.003673902014270425,
0.05798620358109474,
-0.008395017124712467,
-0.03406473249197006,
-0.0319356843829155,
0.03409934788942337,
-0.007910356856882572,
-0.005582253914326429,
-0.045419640839099884,
-0.06092878803610802,
-0.001500501180998981,
-0.051408663392066956,
-0.0357956625521183,
-0.017828593030571938,
-0.025860115885734558,
-0.08592343330383301,
-0.04417337104678154,
-0.02362721413373947,
-0.019403740763664246,
0.02918350324034691,
0.13833604753017426,
0.010852940380573273,
-0.0027716539334505796,
0.06231353059411049,
0.007919011637568474,
0.07629945874214172,
0.05563213676214218,
0.011294327676296234,
0.017075639218091965,
-0.035155218094587326,
0.013224315829575062,
-0.0021149818785488605,
-0.025808187201619148,
0.022588655352592468,
-0.037249643355607986,
-0.01211651973426342,
0.013181042857468128,
-0.008992188610136509,
-0.0073694405145943165,
-0.04171544685959816,
-0.011692441999912262,
-0.03894595801830292,
-0.06812946498394012,
-0.04877764731645584,
-0.0511317141354084,
0.0009720262023620307,
-0.04514269158244133,
0.06875259429216385,
-0.02632746659219265,
-0.02750450000166893,
0.08343089371919632,
-0.004152071662247181,
-0.04974696785211563,
0.04237320274114609,
0.002145273145288229,
-0.012852165848016739,
0.032126087695360184,
0.021913591772317886,
0.02040768228471279,
0.03006627969443798,
0.010255768895149231,
0.029010411351919174,
0.009321065619587898,
0.018642131239175797,
-0.01845172978937626,
0.02577356994152069,
0.02980663999915123,
0.010826976038515568,
0.005435124505311251,
0.04316943138837814,
-0.021740498021245003,
0.007776209618896246,
0.03313002735376358,
-0.025219671428203583,
0.027625665068626404,
0.03707655146718025,
0.020615393295884132,
-0.000013007341294724029,
0.019542215391993523,
0.00403739744797349,
-0.06220967695116997,
0.06359442323446274,
0.062036581337451935,
0.058817051351070404,
-0.040053755044937134,
0.003403443843126297,
-0.021792426705360413,
0.013483955524861813,
-0.013657049275934696,
-0.05428200960159302,
-0.02878539077937603,
0.00576400151476264,
-0.04168082773685455,
0.002721889642998576,
0.041230786591768265,
-0.010861595161259174,
0.0038340131286531687,
0.021792426705360413,
-0.0572592131793499,
-0.016651559621095657,
0.03214339539408684,
0.021290456876158714,
-0.001647630357183516,
0.00047871071728877723,
0.01952490583062172,
0.029477762058377266,
0.06345594674348831,
0.027383334934711456,
-0.0028971463907510042,
-0.05348578095436096,
-0.005967386066913605,
-0.017015056684613228,
0.011190472170710564,
-0.020944271236658096,
-0.07664564251899719,
-0.0127829285338521,
0.05867857486009598,
0.027417954057455063,
-0.036938078701496124,
0.010333660989999771,
0.017240077257156372,
0.04268477112054825,
-0.005110574886202812,
0.017932450398802757,
0.03686884045600891,
0.04289248213171959,
-0.013440682552754879,
-0.044034894555807114,
0.04801603779196739,
-0.030602868646383286,
0.009139318019151688,
0.040469177067279816,
0.001723358640447259,
-0.06709090620279312,
0.04084998369216919,
-0.01377821434289217,
0.02449267916381359,
-0.04130002483725548,
0.01789783127605915,
-0.07858429104089737,
-0.04116154834628105,
-0.015119685791432858,
-0.08163072913885117,
0.014314803294837475,
-0.06200196593999863,
-0.002988020423799753,
0.0017623045714572072,
-0.08211538940668106,
0.05608217790722847,
-0.023177171126008034,
0.018901770934462547,
0.030602868646383286,
0.0201999694108963,
-0.013648394495248795,
0.05899014323949814,
0.030152825638651848,
0.04998930171132088,
-0.0015069921500980854,
-0.0066208126954734325,
-0.07269912213087082,
-0.002173400716856122,
0.0036782294046133757,
-0.03198761120438576,
-0.04247705638408661,
0.006317899562418461,
-0.039499856531620026,
0.035761043429374695,
0.004284055437892675,
0.061690397560596466,
-0.010004783980548382,
-0.08966224640607834,
0.03763044998049736,
-0.02566971257328987,
0.018192090094089508,
0.06200196593999863,
0.06304052472114563,
-0.021359693259000778,
-0.024146493524312973,
0.02065001241862774,
0.030222062021493912,
-0.011666477657854557,
-0.020286517217755318,
0.014150364324450493,
-0.025133123621344566,
-0.011389529332518578,
0.011103925295174122,
0.037803541868925095,
0.034584011882543564,
0.027642974629998207,
-0.003208714071661234,
0.023904163390398026,
0.05854010209441185,
-0.017594918608665466,
-0.033303119242191315,
-0.0309317447245121,
-0.0031308222096413374,
0.01461771596223116,
-0.020892342552542686,
-0.02371376007795334,
0.02156740613281727,
-0.01983647421002388,
0.06241738796234131,
-0.06321361660957336,
-0.026396704837679863,
0.04586968198418617,
-0.01855558529496193,
-0.04784294590353966,
-0.032385725528001785,
-0.02127314731478691,
-0.05424739047884941,
0.017681464552879333,
-0.04881226643919945,
-0.013561847619712353,
-0.02101350761950016,
0.015915915369987488,
-0.0035960101522505283,
-0.03538023680448532,
-0.007062200456857681,
-0.05071629211306572,
-0.001054786378517747,
0.007629080209881067,
-0.008537819609045982,
-0.015863986685872078,
0.01810554228723049,
-0.005824584513902664,
-0.02336757443845272,
0.0767148807644844,
-0.010368279181420803,
0.003200059523805976,
-0.04341176152229309,
0.044346462935209274,
-0.006750632543116808,
0.060755692422389984,
-0.04451955482363701,
-0.06383675336837769,
0.04860455542802811,
0.017395861446857452,
-0.013181042857468128,
0.03617646545171738,
0.013198352418839931,
-0.03534562140703201,
0.05860934033989906,
0.023038698360323906,
-0.004439839161932468,
-0.01562165655195713,
0.013129115104675293,
0.04226934537291527,
-0.043377142399549484,
0.030949054285883904,
-0.030395155772566795,
0.01753433607518673,
0.015535109676420689,
-0.04424260929226875,
-0.00664677657186985,
-0.09132394194602966,
-0.01603708043694496,
-0.0500931553542614,
-0.014453277923166752,
0.013129115104675293,
0.032333798706531525,
-0.02392147295176983,
0.040469177067279816,
-0.019542215391993523,
0.02478693798184395,
0.02996242232620716,
0.054732050746679306,
-0.04171544685959816,
0.011051997542381287,
0.048050656914711,
-0.02572164125740528,
0.015344707295298576,
-0.03352814167737961,
0.031416404992341995,
0.0002362450904911384,
-0.011432802304625511,
-0.023332955315709114,
-0.04438108205795288,
-0.002726217033341527,
0.057189974933862686,
0.008343089371919632,
0.07713030278682709,
-0.027366025373339653,
-0.021203910931944847,
0.029875876381993294,
-0.04576582834124565,
0.010376933962106705,
0.02392147295176983,
0.0022015285212546587,
-0.003541918471455574,
-0.05016239359974861,
-0.016703488305211067,
-0.06934111565351486,
0.025790877640247345,
-0.04019222781062126,
0.007715627085417509,
0.011952081695199013,
0.028664223849773407,
-0.028058398514986038,
-0.04811989516019821,
0.00676361471414566,
0.03718040883541107,
-0.03648803383111954,
0.006642449181526899,
-0.03454939275979996,
0.023073315620422363,
-0.058817051351070404,
0.034791722893714905,
0.017317969352006912,
-0.07346072793006897,
0.014167673885822296,
0.0015307924477383494,
0.0003199518541805446,
0.060859549790620804,
-0.04780832678079605,
0.0009119844762608409,
-0.003673902014270425,
-0.0031935684382915497,
0.015258160419762135,
0.06989501416683197,
-0.025219671428203583,
0.027002530172467232,
0.005863530095666647,
0.05525133013725281,
-0.04645819962024689,
-0.028248801827430725,
0.009208555333316326,
0.01582936756312847,
0.024925412610173225,
0.01706698350608349,
0.006789578590542078,
-0.03337235748767853,
-0.010766393505036831,
0.03925752639770508,
-0.004056870471686125,
0.009295102208852768,
-0.020009567961096764,
-0.015171614475548267,
-0.024146493524312973,
0.07526089996099472,
-0.0044960943050682545,
-0.01267907302826643,
0.083846315741539,
-0.03655727207660675,
-0.015318742953240871,
-0.04074612632393837,
-0.03825358301401138,
0.02954700030386448,
-0.008758513256907463,
0.005634181667119265,
-0.05653221905231476,
0.07609174400568008,
-0.023540668189525604,
0.019542215391993523,
-0.024475371465086937,
0.010316351428627968,
0.05850548297166824,
0.02878539077937603,
0.01756029948592186,
0.02255403622984886,
-0.0009363256976939738,
0.016019770875573158,
-0.016028424724936485,
0.06165577843785286,
-0.010221149772405624,
-0.059336330741643906,
0.02151547744870186,
0.013120460323989391,
-0.030689414590597153,
0.009598014876246452,
-0.0293912161141634,
-0.02336757443845272,
-0.004764388781040907,
0.02873346209526062,
-0.022173231467604637,
0.011536657810211182,
0.035657186061143875,
0.007577152457088232,
0.00499806459993124,
-0.01719680428504944,
0.04431184381246567,
-0.010671192780137062,
0.020321134477853775,
0.0027803087141364813,
-0.0005582253797911108,
0.04462341219186783,
0.0031221676617860794,
-0.07595327496528625,
-0.011294327676296234,
-0.0014940102118998766,
-0.0868927612900734,
0.01876329630613327,
-0.028508441522717476,
0.10025554895401001,
-0.00738675007596612,
-0.003907577600330114,
-0.032645367085933685,
-0.029114266857504845,
0.04147311672568321,
-0.01300795003771782,
0.005556290037930012,
-0.006560230161994696,
-0.027487190440297127,
0.045938920229673386,
-0.060097940266132355,
0.03904981166124344,
-0.04507345333695412,
-0.01743047870695591,
-0.004452821332961321,
-0.0010526226833462715,
0.024735011160373688,
-0.006339536514133215,
-0.05926709249615669,
-0.003617646638303995,
0.01824401691555977,
0.027175623923540115,
0.05338192731142044,
0.0010580318048596382,
-0.01727469637989998,
0.010463480837643147,
-0.005487052723765373,
0.029893185943365097,
0.043584853410720825,
-0.081769198179245,
0.039084430783987045,
0.011294327676296234,
0.054524339735507965,
-0.0019267430761829019,
0.005322614219039679,
0.04863917455077171,
-0.0186594408005476,
0.07470700144767761,
-0.01252328883856535,
0.0019018609309569001,
-0.02193090133368969,
-0.005080283619463444,
0.012800238095223904,
0.0028993100859224796,
-0.06411369889974594,
-0.047323666512966156,
-0.023834925144910812,
-0.023592595010995865,
-0.0157255120575428,
0.03236841782927513,
0.031364478170871735,
0.009580705314874649,
0.015024485066533089,
-0.009926891885697842,
-0.0293912161141634,
0.01926526613533497,
-0.030550939962267876,
0.005300977732986212,
-0.07193750888109207,
-0.016556359827518463,
0.028352657333016396,
0.0052836681716144085,
-0.0618634894490242,
0.003522445447742939,
-0.05722459405660629,
0.016002461314201355,
-0.06639853119850159,
0.05251646041870117,
0.002483886666595936,
0.016063043847680092,
-0.040053755044937134,
0.04687362164258957,
0.06909878551959991,
0.04033070430159569,
-0.015716858208179474,
-0.008096431382000446,
0.01599380560219288,
-0.05601293966174126,
-0.05199718102812767,
0.034480154514312744,
0.02044229954481125,
0.051097095012664795,
-0.015604346990585327,
0.028543058782815933,
-0.013163733296096325,
-0.015292779542505741,
0.0052663590759038925,
-0.00624866271391511,
-0.03804587200284004,
-0.030395155772566795,
-0.022779058665037155,
-0.0055216713808476925,
-0.02520236186683178,
-0.06349056214094162,
-0.04545425996184349,
0.03728426247835159,
0.03247227519750595,
0.01703236624598503,
0.024735011160373688,
-0.014384040609002113,
0.033614687621593475,
0.07179903984069824,
-0.007105473428964615,
0.03814972937107086,
-0.00022961887589190155,
-0.007326167542487383,
0.006932380609214306,
0.04195777699351311,
-0.006854488514363766,
0.02172319032251835,
0.03655727207660675,
0.0598209910094738,
0.013241625390946865,
0.042927101254463196,
0.02970278263092041,
-0.023454120382666588,
-0.01017787680029869,
-0.0802459791302681,
-0.05739768594503403,
-0.029408525675535202,
-0.019161410629749298,
0.026777509599924088,
-0.09374724328517914,
0.003996287938207388,
-0.03773430362343788,
-0.015292779542505741,
0.08107683062553406,
-0.0735992044210434,
-0.004569659009575844,
-0.05916323512792587,
0.02760835736989975,
-0.04832760617136955,
-0.0367996022105217,
-0.011848225258290768,
0.0009368666214868426,
-0.009260483086109161,
-0.056670695543289185,
0.04043455794453621,
0.04472726956009865,
-0.05137404426932335,
0.040573034435510635,
0.003717175219208002,
0.07072585821151733,
0.0037193389143794775,
0.02357528544962406,
-0.013613775372505188,
0.0018629149999469519,
0.026102446019649506,
-0.03169335424900055,
0.009874964132905006,
0.03873824700713158,
-0.011086615733802319,
-0.013129115104675293,
-0.03487826883792877,
0.004980755038559437,
-0.04136926308274269,
-0.007983921095728874,
-0.016288064420223236,
-0.01607169769704342,
-0.04846607893705368,
0.016106316819787025,
-0.02541007287800312,
-0.029945114627480507,
-0.036522652953863144,
-0.010229804553091526,
-0.02255403622984886,
-0.017439134418964386,
-0.010956795886158943,
-0.034030113369226456,
0.01505910325795412,
0.030222062021493912,
-0.002953401766717434,
0.005344250705093145,
0.013864761218428612,
0.010307696647942066,
-0.023142553865909576,
0.015915915369987488,
-0.002423304133117199,
0.021948210895061493,
0.020632702857255936,
0.0005971713690087199,
0.03536292910575867,
0.03894595801830292,
-0.0735992044210434,
0.005495707504451275,
0.010783703066408634,
-0.009978819638490677,
0.007512242533266544,
0.008001230657100677,
-0.0792074203491211,
-0.01753433607518673,
-0.010965450666844845,
-0.04870840907096863,
0.02776413969695568,
0.025946661829948425,
0.0495738759636879,
-0.03006627969443798,
0.0122723039239645,
-0.025842806324362755,
-0.0731145441532135,
-0.00807479489594698,
0.02151547744870186,
0.009217210114002228,
0.061274971812963486,
0.02269251085817814,
-0.027314098551869392,
-0.026414014399051666,
0.012904093600809574,
-0.02054615691304207,
0.01829594559967518,
-0.0025336509570479393,
-0.02643132396042347,
-0.02245018072426319,
-0.00196568900719285,
-0.02868153341114521,
-0.049920063465833664,
0.06660623848438263,
0.0072136567905545235,
0.005149520933628082,
0.07955361157655716,
-0.01810554228723049,
-0.04635434225201607,
0.029166195541620255,
-0.01058464590460062,
-0.03769968822598457,
-0.009130663238465786,
0.007754572667181492,
-0.0072136567905545235,
-0.038876719772815704,
0.00083571532741189,
-0.013683012686669827,
-0.0056601460091769695,
0.03394356369972229,
-0.035553332418203354,
-0.03011820651590824,
-0.0639406070113182,
0.016140935942530632,
0.03814972937107086,
0.02305600605905056,
0.013328172266483307,
0.02310793474316597,
-0.026777509599924088,
0.04275400564074516,
0.05331268906593323,
0.05030086636543274,
-0.035657186061143875,
-0.010463480837643147,
-0.004320837557315826,
-0.04469265043735504,
0.05234336853027344,
0.10655613988637924,
-0.024302277714014053,
-0.0141849834471941,
-0.026517869904637337,
-0.022311706095933914,
-0.02577356994152069,
-0.04171544685959816,
-0.014496550895273685,
0.064909927546978,
-0.0327146053314209,
-0.006945362314581871,
0.016945818439126015,
-0.05507823824882507,
-0.0028084362857043743,
0.004400893114507198,
-0.052793409675359726,
0.033251192420721054,
0.02724486030638218,
0.036834221333265305,
0.0629020482301712,
0.03828820213675499,
-0.025236980989575386,
0.013561847619712353,
0.0782380998134613,
-0.0037799214478582144,
-0.0072526028379797935,
0.014911974780261517,
-0.047012098133563995,
0.039846040308475494,
-0.012246339581906796,
0.03354545310139656,
-0.04469265043735504,
-0.011450111865997314,
-0.02059808373451233,
0.015102377161383629,
-0.04898535832762718,
0.05947480350732803,
0.04524654895067215,
0.012808892875909805,
-0.032126087695360184,
-0.018486347049474716,
0.013812832534313202,
0.029079647734761238,
0.06657162308692932,
-0.05206641927361488,
-0.011069306172430515,
0.019559524953365326,
0.008983533829450607,
0.004811989609152079,
-0.03288769721984863,
-0.0235233586281538,
0.026414014399051666,
0.06584463268518448,
-0.0034921541810035706,
0.02101350761950016,
-0.02085772342979908,
0.03214339539408684
]
|
41,427 | pyglove.core.typing.annotation_conversion | _value_spec_from_annotation | Creates a value spec from annotation. | def _value_spec_from_annotation(
annotation: typing.Any,
auto_typing=False,
accept_value_as_annotation=False
) -> class_schema.ValueSpec:
"""Creates a value spec from annotation."""
if isinstance(annotation, class_schema.ValueSpec):
return annotation
elif annotation == inspect.Parameter.empty:
return vs.Any()
elif annotation is None:
if accept_value_as_annotation:
return vs.Any().noneable()
else:
return vs.Any().freeze(None)
if auto_typing:
return _value_spec_from_type_annotation(
annotation, accept_value_as_annotation)
else:
value_spec = None
if accept_value_as_annotation:
# Accept default values is applicable only when auto typing is off.
value_spec = _value_spec_from_default_value(annotation)
return value_spec or _any_spec_with_annotation(annotation)
| (annotation: Any, auto_typing=False, accept_value_as_annotation=False) -> pyglove.core.typing.class_schema.ValueSpec | [
0.12855547666549683,
-0.08671330660581589,
0.002140756929293275,
-0.013542350381612778,
-0.008188807405531406,
0.029109889641404152,
0.04599820449948311,
-0.07438607513904572,
-0.002533687511458993,
0.019230490550398827,
0.018332362174987793,
0.029039448127150536,
-0.029638200998306274,
-0.07202628254890442,
0.01896633580327034,
0.025940028950572014,
0.03287850320339203,
0.048041004687547684,
0.040750324726104736,
0.10270349681377411,
0.03242063522338867,
-0.058360662311315536,
-0.08960140496492386,
0.045258570462465286,
0.016747431829571724,
-0.07023002952337265,
0.018121039494872093,
-0.019248099997639656,
-0.05226748436689377,
0.01675623655319214,
0.018032986670732498,
-0.05033034831285477,
0.07685151696205139,
-0.0011875972850248218,
-0.030060848221182823,
-0.0004545668780338019,
-0.014915957115590572,
0.06019213795661926,
-0.06374942511320114,
-0.04476547986268997,
-0.01741662435233593,
-0.0029387252870947123,
-0.03789744898676872,
-0.007774964440613985,
-0.020181449130177498,
-0.011112123727798462,
0.01613987609744072,
0.00665670819580555,
-0.03520306572318077,
0.042546577751636505,
0.06480604410171509,
-0.007933457382023335,
-0.03136401250958443,
0.05596565827727318,
-0.03261434659361839,
-0.012591392733156681,
-0.010046698153018951,
0.05578955262899399,
0.01184295304119587,
0.04201826825737953,
0.009351089596748352,
0.019318541511893272,
-0.014502113685011864,
-0.03321309760212898,
0.03342442214488983,
-0.015365020371973515,
0.03344203531742096,
0.0036321324296295643,
-0.010812748223543167,
-0.001762134488672018,
-0.01877262070775032,
-0.060156919062137604,
0.02659161202609539,
0.06984260678291321,
0.034340161830186844,
-0.08086667954921722,
-0.04127863422036171,
-0.0022122988011687994,
0.061319198459386826,
-0.03821443393826485,
0.03205081820487976,
0.03832009807229042,
-0.0009504079935140908,
-0.05378197506070137,
0.055226024240255356,
0.04064466059207916,
-0.06346765905618668,
0.02345697209239006,
0.10925453901290894,
0.03226214274764061,
-0.025851977989077568,
-0.029602980241179466,
0.010125945322215557,
0.052549250423908234,
-0.017073223367333412,
0.03388229385018349,
0.05638830363750458,
-0.05874808877706528,
0.01193100493401289,
-0.0025270837359130383,
-0.010302048176527023,
0.015840500593185425,
0.007814588025212288,
0.04201826825737953,
0.022365130484104156,
0.021977702155709267,
0.03404078632593155,
-0.013551156036555767,
0.0021330523304641247,
-0.0032755229622125626,
0.04434283450245857,
0.016536109149456024,
-0.013119702227413654,
0.006123995408415794,
0.0032160880509763956,
-0.018526077270507812,
-0.012934793718159199,
-0.01319014374166727,
-0.0149775929749012,
0.009641660377383232,
-0.013031651265919209,
0.02623940445482731,
-0.004415792413055897,
-0.01233604270964861,
0.04990769922733307,
-0.0022453181445598602,
0.022189026698470116,
-0.016941146925091743,
-0.020815420895814896,
0.04180694371461868,
0.02461925335228443,
0.02777150459587574,
0.0005024449783377349,
-0.01701158657670021,
-0.007105771917849779,
-0.022400351241230965,
-0.0023487790022045374,
-0.020075786858797073,
0.031170299276709557,
-0.05617698282003403,
0.014343621209263802,
0.024953849613666534,
0.032772839069366455,
-0.09516627341508865,
-0.015004009008407593,
-0.018297141417860985,
0.011878173798322678,
-0.025464549660682678,
-0.010786332190036774,
-0.05730404332280159,
0.011393888853490353,
0.020375162363052368,
-0.02754257060587406,
-0.006687526125460863,
0.014431673102080822,
-0.059769488871097565,
0.06526391953229904,
-0.09601156413555145,
0.03581942990422249,
-0.01610465534031391,
0.014546140097081661,
-0.018420414999127388,
0.010478151962161064,
-0.04944983124732971,
0.02423182688653469,
0.039235834032297134,
-0.006722746882587671,
0.05617698282003403,
0.014827905222773552,
-0.022365130484104156,
0.002546895295381546,
-0.0010236009256914258,
0.011297032237052917,
-0.00919259712100029,
0.026750104501843452,
0.06846899539232254,
0.014625386334955692,
0.01340146828442812,
0.05811411887407303,
0.035343948751688004,
0.02268211729824543,
-0.006049151532351971,
-0.005758580751717091,
-0.03229736164212227,
0.0197588000446558,
0.0033063411246985197,
0.010539787821471691,
-0.012512145563960075,
-0.010786332190036774,
0.027243195101618767,
0.01761033944785595,
0.046632178127765656,
-0.0007330303778871894,
0.04709004610776901,
-0.05945250391960144,
-0.04127863422036171,
0.0017907513538375497,
0.019600307568907738,
-0.04871019721031189,
0.010522177442908287,
0.01172848604619503,
-0.0453290119767189,
0.015373826026916504,
0.03161055967211723,
-0.03789744898676872,
0.0019272314384579659,
0.052514031529426575,
-0.031962763518095016,
0.007074953522533178,
-0.08917875587940216,
-0.08939007669687271,
-0.03344203531742096,
-0.0003442270972300321,
-0.010425320826470852,
0.013339831493794918,
-0.062094055116176605,
0.013850531540811062,
-0.024161385372281075,
-0.00493970001116395,
0.03187471255660057,
0.10044937580823898,
-0.01627195253968239,
0.0010791835375130177,
0.03497413173317909,
0.07452695071697235,
0.020427992567420006,
-0.013841726817190647,
-0.04807622358202934,
0.029409265145659447,
-0.014519724063575268,
-0.03446343168616295,
0.023333698511123657,
0.03751002252101898,
-0.03779178857803345,
-0.0438145250082016,
0.06427773833274841,
0.043356653302907944,
-0.015188917517662048,
-0.016307173296809196,
-0.003035582136362791,
0.00938631035387516,
-0.0173373781144619,
-0.009166181087493896,
0.020656928420066833,
-0.06424251943826675,
0.005410776473581791,
-0.01914243772625923,
0.061107877641916275,
0.005283101461827755,
-0.022189026698470116,
-0.032561518251895905,
-0.00155191111844033,
0.03073004074394703,
0.023210426792502403,
0.012644222937524319,
0.01487193163484335,
-0.05025990679860115,
-0.025975249707698822,
0.08276858925819397,
0.04990769922733307,
0.000011960928532062098,
0.022770168259739876,
0.0031060234177857637,
0.06237582117319107,
-0.043673641979694366,
-0.04881586134433746,
-0.030148901045322418,
0.057374484837055206,
-0.012758690863847733,
0.007444771006703377,
-0.024777747690677643,
-0.018543686717748642,
0.05420462414622307,
-0.054310284554958344,
-0.009095740504562855,
-0.038073550909757614,
0.0015508105279877782,
-0.03937671706080437,
0.00836050882935524,
-0.002062611049041152,
-0.015778863802552223,
-0.033917512744665146,
0.034533873200416565,
0.01770719513297081,
0.005459205247461796,
0.003057595109567046,
-0.0002703462087083608,
0.020058175548911095,
-0.0032336984295397997,
-0.007876223884522915,
-0.0016883912030607462,
-0.029268383979797363,
0.01641283556818962,
0.008769948966801167,
0.025711094960570335,
0.016888314858078957,
-0.005798203870654106,
-0.061143096536397934,
0.017680780962109566,
-0.021836820989847183,
0.08861522376537323,
0.05557822808623314,
-0.007594458758831024,
0.023809177801012993,
-0.0021297503262758255,
0.047019604593515396,
-0.009958646260201931,
-0.0259928610175848,
-0.0036871647462248802,
0.03069481998682022,
0.0026173365768045187,
0.011790121905505657,
-0.015409046784043312,
0.017619144171476364,
0.0003464283945504576,
-0.010029087774455547,
0.019794020801782608,
-0.07005392760038376,
0.02188965119421482,
-0.0069648888893425465,
0.005305114667862654,
-0.005283101461827755,
-0.01838519424200058,
-0.036101195961236954,
-0.035079795867204666,
-0.027031870558857918,
-0.043708860874176025,
0.038003113120794296,
-0.046244751662015915,
0.01822669990360737,
-0.029215551912784576,
0.01728454791009426,
0.0034824444446712732,
0.03465714678168297,
0.002127549145370722,
0.01233604270964861,
-0.01487193163484335,
0.025851977989077568,
-0.023368919268250465,
0.007849808782339096,
0.0075900559313595295,
-0.025182785466313362,
0.007281875237822533,
0.04969637468457222,
-0.008871207945048809,
0.017231715843081474,
-0.006260475609451532,
-0.05501469969749451,
0.06117831915616989,
-0.08002138137817383,
0.009174986742436886,
0.005265491548925638,
0.030272172763943672,
0.04032767564058304,
0.043532758951187134,
0.01798015646636486,
0.010671865195035934,
-0.021150017157197,
-0.045681219547986984,
-0.03832009807229042,
0.05494425818324089,
-0.008519001305103302,
0.05244359001517296,
-0.03030739352107048,
-0.012679443694651127,
0.08354344964027405,
-0.019794020801782608,
0.030360223725438118,
0.008866805583238602,
0.001031305524520576,
0.01644805632531643,
-0.017443040385842323,
0.012917183339595795,
-0.029567759484052658,
0.02541171945631504,
0.0259928610175848,
-0.07255459576845169,
-0.014528529718518257,
-0.028792904689908028,
0.00209012720733881,
0.015056840144097805,
0.05790279433131218,
-0.02095630392432213,
-0.017196495085954666,
0.018843062222003937,
-0.04719570651650429,
-0.03543200343847275,
-0.049802038818597794,
-0.0205160453915596,
-0.033759020268917084,
-0.020392771810293198,
0.03691127151250839,
-0.023932451382279396,
-0.03506218641996384,
-0.025922419503331184,
-0.027454517781734467,
0.006418968550860882,
0.055648669600486755,
0.05744492635130882,
0.059135518968105316,
-0.0022607273422181606,
-0.03030739352107048,
0.05071777477860451,
0.02558782324194908,
-0.006247267592698336,
-0.024953849613666534,
0.010918410494923592,
-0.04282834380865097,
-0.032931335270404816,
0.06279847025871277,
0.005410776473581791,
-0.07966917008161545,
0.008074340410530567,
0.026309845969080925,
0.0197588000446558,
0.017716001719236374,
0.02229468896985054,
-0.023773957043886185,
-0.012653028592467308,
-0.0414547361433506,
-0.015030424110591412,
0.0010879887267947197,
-0.007510809693485498,
0.10044937580823898,
0.021854430437088013,
0.04307488724589348,
0.04473026096820831,
0.008809572085738182,
-0.015796473249793053,
-0.009166181087493896,
0.014915957115590572,
-0.07854211330413818,
-0.02912750095129013,
-0.05261969193816185,
-0.01660654880106449,
0.022629285231232643,
-0.012556171976029873,
-0.05402851849794388,
0.027436908334493637,
-0.02972625195980072,
-0.05508514121174812,
0.04677306115627289,
0.022805389016866684,
0.059382062405347824,
-0.03030739352107048,
-0.07325901091098785,
-0.024689694866538048,
0.08523403853178024,
0.030553938820958138,
-0.06533435732126236,
-0.012089497409760952,
-0.015990188345313072,
0.05874808877706528,
0.018543686717748642,
0.02659161202609539,
-0.03446343168616295,
-0.024584032595157623,
-0.025711094960570335,
0.007466783747076988,
-0.003911696374416351,
0.003814839757978916,
0.004873661324381828,
-0.009720907546579838,
-0.07332944869995117,
0.028810514137148857,
0.024707306176424026,
0.021202847361564636,
0.006172423716634512,
-0.05709271878004074,
0.028634410351514816,
0.03877796605229378,
-0.026697274297475815,
0.0711105465888977,
0.011763706803321838,
0.014220348559319973,
-0.055472567677497864,
0.022822998464107513,
0.03222692012786865,
-0.05959338694810867,
0.013524740003049374,
0.007594458758831024,
0.06787024438381195,
-0.05128130689263344,
0.023139985278248787,
0.0030752054881304502,
0.027648232877254486,
-0.009580024518072605,
-0.04053900018334389,
-0.05402851849794388,
0.023139985278248787,
-0.06924385577440262,
0.030236952006816864,
0.023386530578136444,
-0.010090724565088749,
0.004745986312627792,
0.01289957296103239,
0.09086935222148895,
0.002342174993827939,
0.0320155955851078,
0.005168634466826916,
-0.0019877669401466846,
-0.012186354957520962,
-0.08051446825265884,
0.04053900018334389,
-0.0032248932402580976,
-0.09037625789642334,
-0.03268478810787201,
-0.039588041603565216,
-0.018261920660734177,
0.03404078632593155,
-0.008941649459302425,
0.017152469605207443,
0.02719036303460598,
0.0036541454028338194,
0.04691394418478012,
-0.009236622601747513,
0.03976414352655411,
-0.07502004504203796,
-0.025306057184934616,
-0.03488608077168465,
-0.06466516107320786,
-0.01515369676053524,
0.016324784606695175,
-0.005327127408236265,
0.01938898302614689,
0.05885375291109085,
0.004076793324202299,
-0.006929668132215738,
0.012159938924014568,
-0.04691394418478012,
-0.00015120126772671938,
-0.03384707123041153,
0.02308715507388115,
0.10819792002439499,
-0.0012888567289337516,
-0.04906240478157997,
0.032561518251895905,
0.0035396781750023365,
-0.037650905549526215,
0.00015395288937725127,
0.00772213377058506,
0.0919259712100029,
0.011341058649122715,
0.06494692713022232,
0.06491170823574066,
0.043356653302907944,
-0.0032887307461351156,
0.019899683073163033,
0.015937356278300285,
0.013859336264431477,
-0.009324674494564533,
0.03779178857803345,
0.02955014817416668,
0.03183949366211891,
-0.06466516107320786,
-0.00256450567394495,
0.0275954008102417,
0.042123932391405106,
0.01840280368924141,
0.007167407777160406,
0.021414171904325485,
-0.006361735053360462,
-0.004351954907178879,
0.02542932890355587,
-0.038425758481025696,
0.014053050428628922,
-0.0433918759226799,
-0.003077406669035554,
0.016668185591697693,
0.008356105536222458,
0.0013736063847318292,
-0.020375162363052368,
0.01757511869072914,
-0.04983725771307945,
-0.008047925308346748,
0.016879510134458542,
-0.023175206035375595,
0.019600307568907738,
-0.06410163640975952,
0.017346184700727463,
-0.02955014817416668,
-0.013331026770174503,
0.01762794889509678,
-0.03553766384720802,
0.039200615137815475,
-0.01250334084033966,
-0.020674537867307663,
-0.006101982668042183,
-0.061143096536397934,
-0.004332143347710371,
0.03516784682869911,
0.04184216633439064,
0.009808958508074284,
0.04973159730434418,
-0.008021509274840355,
-0.009377505630254745,
-0.008250444196164608,
-0.01644805632531643,
0.04927372932434082,
-0.044096287339925766,
-0.010680670849978924,
0.027454517781734467,
-0.023527413606643677,
0.01633358933031559,
0.05962860584259033,
0.04698438569903374,
-0.042511358857154846,
-0.03282567113637924,
0.06522869318723679,
-0.04656173661351204,
0.01995251327753067,
0.049942921847105026,
-0.012626612558960915,
-0.018631737679243088,
0.011569992639124393,
0.027472129091620445,
-0.0001884856610558927,
0.018473245203495026,
-0.04691394418478012,
0.019071996212005615,
0.033935122191905975,
0.0414547361433506,
-0.04226481169462204,
-0.025693483650684357,
-0.002461044816300273,
-0.05385241657495499,
-0.017038002610206604,
-0.08474095165729523,
-0.01778644323348999,
0.0002678697637747973,
0.0640311911702156,
-0.028863346204161644,
0.00378842419013381,
-0.018103428184986115,
0.015893330797553062,
-0.05786757543683052,
-0.05085865780711174,
-0.029497317969799042,
0.014193933457136154,
0.044272392988204956,
-0.0018876082031056285,
-0.0004504394601099193,
-0.01819148100912571,
0.10115378350019455,
0.009632855653762817,
-0.026873378083109856,
-0.03659428283572197,
-0.025904808193445206,
0.0006669915746897459,
0.04765357822179794,
-0.006956083700060844,
0.01788329891860485,
0.0008392427116632462,
-0.009518387727439404,
-0.0010302048176527023,
-0.005630905739963055,
0.031047027558088303,
-0.0171260554343462,
0.01142910961061716,
0.030360223725438118,
-0.07530181109905243,
-0.0016553718596696854,
-0.02231230027973652,
-0.027296025305986404,
-0.044237170368433,
-0.010874384082853794,
-0.07727416604757309,
-0.048041004687547684,
0.05649396777153015,
0.014132296666502953,
-0.00504095945507288,
0.022541234269738197,
-0.03516784682869911,
-0.01938898302614689,
-0.013005235232412815,
-0.052514031529426575,
-0.010064308531582355,
0.0019052185816690326,
-0.006617085076868534,
-0.007990690879523754,
0.0053887637332081795,
-0.047829680144786835,
-0.023633074015378952,
-0.007550432812422514,
-0.0614248625934124,
-0.10073114186525345,
0.007163005415350199,
-0.03247346356511116,
0.05335932597517967,
-0.025570211932063103,
-0.01074230670928955,
-0.0453290119767189,
-0.0021484612952917814,
-0.013568766415119171,
-0.017548702657222748,
0.01045173592865467,
-0.03161055967211723,
0.03722825646400452,
0.0044928379356861115,
0.02345697209239006,
-0.02016383782029152,
0.006392552983015776,
-0.04698438569903374,
0.030589159578084946,
0.02368590608239174,
0.044483717530965805,
-0.03342442214488983,
-0.016888314858078957,
0.0338294617831707,
-0.03669994696974754,
-0.034745197743177414,
0.046279970556497574,
-0.07523136585950851,
-0.05138696730136871,
-0.055824775248765945,
0.0481114462018013,
-0.011402694508433342,
0.06522869318723679,
0.010601423680782318,
-0.003345964476466179,
0.013736064545810223,
-0.008096353150904179,
0.04191260784864426,
-0.02682054601609707,
-0.03206842765212059,
0.05508514121174812,
-0.019882071763277054,
-0.013260585255920887,
0.060896553099155426,
0.01514489110559225,
0.038813188672065735,
0.048534095287323,
0.00006222090451046824,
-0.000515927909873426,
-0.04758313670754433,
-0.034533873200416565,
0.012591392733156681,
-0.01974119059741497,
-0.0219072625041008,
-0.011041682213544846,
0.025570211932063103,
0.044483717530965805,
-0.02680293656885624,
0.034727588295936584,
0.00958882924169302,
0.005613295361399651,
-0.01514489110559225,
-0.00967688113451004,
0.013322221115231514,
-0.001556313713081181,
-0.0618475116789341,
-0.005212660413235426,
-0.008131573908030987,
0.01788329891860485,
0.027313634753227234,
0.011807732284069061,
0.00034120032796636224,
0.030413055792450905,
-0.013824116438627243,
-0.0035506845451891422,
-0.062305379658937454,
0.06558090448379517,
-0.018860673531889915,
-0.05684617534279823,
-0.06642619520425797,
0.013278195634484291,
-0.05540212616324425,
0.011913394555449486
]
|
41,428 | pyglove.core.typing.class_schema | is_compatible | Returns True if values acceptable to `other` is acceptable to this spec.
Args:
other: Other value spec.
Returns:
True if values that is applicable to the other value spec can be applied
to current spec. Otherwise False.
| @abc.abstractmethod
def is_compatible(self, other: 'ValueSpec') -> bool:
"""Returns True if values acceptable to `other` is acceptable to this spec.
Args:
other: Other value spec.
Returns:
True if values that is applicable to the other value spec can be applied
to current spec. Otherwise False.
"""
| (self, other: pyglove.core.typing.class_schema.ValueSpec) -> bool | [
0.090919628739357,
-0.06576725840568542,
-0.04491003602743149,
0.0198435690253973,
-0.023932548239827156,
-0.014027942903339863,
-0.022558100521564484,
-0.05700516328215599,
-0.023846644908189774,
-0.0008735251030884683,
0.05958224833011627,
0.023434311151504517,
0.05879194289445877,
0.027076592668890953,
-0.014569131657481194,
-0.014680805616080761,
0.00009435896208742633,
0.04082105681300163,
0.05958224833011627,
0.03556380048394203,
-0.044325895607471466,
-0.00800185464322567,
-0.024533867835998535,
-0.002381657948717475,
0.04044308513402939,
0.09469935297966003,
-0.019362512975931168,
-0.003378131426870823,
-0.002903518034145236,
0.03518582880496979,
-0.053809575736522675,
-0.0328492671251297,
0.05930735915899277,
0.055596355348825455,
0.03324441984295845,
-0.02853694185614586,
-0.01910480484366417,
0.06635139882564545,
-0.1109178215265274,
0.01692287065088749,
-0.0062322551384568214,
-0.02922416664659977,
0.020152820274233818,
-0.026853246614336967,
-0.007709784898906946,
-0.019963834434747696,
-0.04188625141978264,
0.05195407196879387,
-0.00994755607098341,
0.02620038390159607,
0.035838689655065536,
-0.024980563670396805,
-0.006648884154856205,
0.01389049831777811,
-0.043638672679662704,
0.08775839954614639,
0.03051270917057991,
0.07573199272155762,
-0.01299710851162672,
0.03448142483830452,
-0.025427257642149925,
0.015144680626690388,
0.014740937389433384,
-0.0975169688463211,
-0.020255902782082558,
-0.03879375010728836,
-0.03185279294848442,
-0.05800163745880127,
0.00969843752682209,
0.08528439700603485,
-0.030375264585018158,
-0.018623748794198036,
0.00715571129694581,
0.06954698264598846,
-0.009560992941260338,
0.002437494695186615,
-0.03011755645275116,
0.0428483672440052,
0.03477349132299423,
-0.08796456456184387,
-0.01994665339589119,
-0.011193147860467434,
0.007718375418335199,
-0.06617959588766098,
-0.07284566015005112,
-0.009904604405164719,
-0.07401393353939056,
0.02465413138270378,
0.12012661248445511,
-0.021011848002672195,
-0.011760106310248375,
0.025083646178245544,
-0.0005054848734289408,
0.021802155300974846,
0.02762637287378311,
0.06212497502565384,
0.03095940500497818,
-0.0667637288570404,
-0.07140249013900757,
-0.006404060870409012,
-0.017171990126371384,
0.05796727538108826,
-0.010926848277449608,
-0.026062939316034317,
0.023932548239827156,
-0.027523288503289223,
-0.04484131187200546,
-0.003384574083611369,
-0.059169914573431015,
0.0037603992968797684,
-0.046456288546323776,
0.0008617134299129248,
-0.02912108227610588,
-0.01106429286301136,
-0.05027037486433983,
0.01718916930258274,
-0.0065415059216320515,
-0.029035178944468498,
0.007314631715416908,
-0.005179944913834333,
0.00037850963417440653,
0.041954975575208664,
0.05082015320658684,
-0.0015795395011082292,
0.04679989814758301,
0.0630870908498764,
0.004548558499664068,
0.00283479574136436,
-0.05477168783545494,
-0.004883579909801483,
0.008560223504900932,
0.020221542567014694,
-0.011124425567686558,
0.05394702032208443,
0.04948006942868233,
0.024138715118169785,
-0.024980563670396805,
0.025169549509882927,
0.0254959799349308,
-0.026166023686528206,
0.027746636420488358,
0.0023945432621985674,
0.06514875590801239,
-0.00716859707608819,
-0.048002541065216064,
0.021870877593755722,
-0.03958405554294586,
0.014543361030519009,
-0.009217380546033382,
0.031784072518348694,
0.01480965968221426,
0.03965277597308159,
0.012885434553027153,
-0.014921333640813828,
-0.008328285999596119,
-0.0017062462866306305,
0.026612717658281326,
-0.05978841707110405,
0.03348495066165924,
-0.019310971722006798,
-0.03954969346523285,
-0.03745366260409355,
0.007976084016263485,
0.00862035620957613,
0.009389187209308147,
0.027471747249364853,
-0.05411882698535919,
-0.038828108459711075,
0.017541371285915375,
0.006567276548594236,
0.010901077650487423,
-0.039824582636356354,
0.023485852405428886,
0.007250204682350159,
0.04748712107539177,
0.013572657480835915,
-0.007293155882507563,
-0.03209332376718521,
-0.01114160567522049,
-0.0012123046908527613,
0.03329596295952797,
-0.02664707973599434,
-0.09023240208625793,
0.006953839678317308,
0.03965277597308159,
0.007271680515259504,
-0.026062939316034317,
-0.018864275887608528,
0.027763817459344864,
0.02748892828822136,
0.010540285147726536,
-0.03642283007502556,
-0.006773443426936865,
0.008890950120985508,
-0.0019854307174682617,
-0.0509919598698616,
0.03975586220622063,
0.03150918334722519,
0.024224616587162018,
0.06758840382099152,
-0.0040052225813269615,
-0.04068361222743988,
-0.004673117771744728,
0.02912108227610588,
0.003768989583477378,
-0.025186730548739433,
0.021647529676556587,
-0.07600688189268112,
0.0018071822123602033,
-0.07318926602602005,
-0.060750529170036316,
-0.03903427720069885,
-0.03329596295952797,
0.044188451021909714,
0.05095759779214859,
-0.01929379068315029,
0.02152726612985134,
-0.06765712052583694,
-0.0245682280510664,
0.010222445242106915,
0.1256244033575058,
-0.014740937389433384,
0.049342624843120575,
0.03343340754508972,
0.06892848759889603,
0.014569131657481194,
-0.01270503830164671,
-0.04109594598412514,
-0.0070053813979029655,
0.017146218568086624,
0.01805678941309452,
-0.0044325897470116615,
0.059857141226530075,
0.010308347642421722,
-0.015960758551955223,
0.06470206379890442,
0.032763365656137466,
-0.004728954751044512,
-0.06264039129018784,
0.04277964308857918,
-0.0412677526473999,
0.023554574698209763,
-0.016312960535287857,
0.02451668679714203,
-0.04088978096842766,
-0.09607379883527756,
-0.019036082550883293,
0.05745185911655426,
0.0069710202515125275,
-0.004819152411073446,
-0.01924224942922592,
-0.05978841707110405,
-0.025221090763807297,
-0.014423096552491188,
-0.01568586938083172,
-0.004320915788412094,
-0.05590560659766197,
-0.04707478731870651,
0.08995751291513443,
-0.009758569300174713,
-0.0015462521696463227,
0.03149200230836868,
-0.035151466727256775,
0.0070655131712555885,
-0.05552763491868973,
-0.028554122895002365,
0.005910119507461786,
0.045769065618515015,
-0.0186581090092659,
0.041851893067359924,
0.0018898637499660254,
-0.031096849590539932,
-0.01337508112192154,
-0.0034898051526397467,
-0.034687589854002,
0.02352021262049675,
0.06896284967660904,
-0.05645538493990898,
0.02451668679714203,
-0.04202369600534439,
-0.009243152104318142,
0.020565154030919075,
-0.026080120354890823,
-0.024774394929409027,
-0.020273083820939064,
-0.014105255715548992,
-0.016802607104182243,
-0.05164482071995735,
0.005781264975667,
-0.021595988422632217,
-0.0033416226506233215,
-0.019121985882520676,
0.04686862230300903,
0.005051090382039547,
0.06178136542439461,
0.03329596295952797,
0.07257077097892761,
-0.03362239524722099,
0.034051910042762756,
-0.06212497502565384,
0.030203459784388542,
-0.00859458465129137,
-0.03016909770667553,
0.026062939316034317,
-0.006996790878474712,
-0.02709377370774746,
0.015883445739746094,
0.014629263430833817,
-0.053362879902124405,
0.04463514685630798,
-0.006760558113455772,
0.06191881000995636,
-0.014113846234977245,
0.025736508890986443,
0.06947826594114304,
0.008427074179053307,
0.014792478643357754,
0.0002904591674450785,
0.01724071241915226,
0.03528891131281853,
-0.03566688299179077,
0.05532146617770195,
-0.037591107189655304,
-0.042401671409606934,
-0.03384574130177498,
-0.0315435454249382,
0.004168438259512186,
0.004411113914102316,
-0.012387197464704514,
0.031337376683950424,
-0.04456642270088196,
0.011820239014923573,
0.10081563889980316,
0.005729723256081343,
0.018640929833054543,
0.01592639647424221,
0.01595216803252697,
0.013237636536359787,
0.016673753038048744,
0.0031590790022164583,
0.02480875700712204,
-0.021870877593755722,
0.011579710990190506,
-0.029756763949990273,
-0.0038763682823628187,
0.012627726420760155,
-0.04996112734079361,
0.0243105199187994,
0.05329415947198868,
-0.018125511705875397,
-0.026870425790548325,
0.009002624079585075,
0.023090699687600136,
-0.01493851374834776,
0.0002789159771054983,
0.018194233998656273,
-0.00504679512232542,
0.0011768697295337915,
-0.022540921345353127,
-0.057176969945430756,
0.12067639082670212,
-0.04683426022529602,
0.019809208810329437,
-0.014036533422768116,
-0.041851893067359924,
0.008942491374909878,
-0.009689847007393837,
-0.02675016224384308,
-0.012662087567150593,
-0.007559454999864101,
-0.01716339960694313,
-0.02486029826104641,
0.01505877822637558,
-0.048449233174324036,
0.00932905450463295,
-0.014697985723614693,
-0.04817434400320053,
0.018881456926465034,
-0.03779727593064308,
-0.018795553594827652,
0.05535582825541496,
0.017988067120313644,
-0.028588484972715378,
0.013924859464168549,
-0.004479836206883192,
-0.03288362920284271,
0.017627274617552757,
-0.006223665084689856,
-0.023554574698209763,
0.033021073788404465,
0.041611362248659134,
-0.02972240187227726,
-0.07635049521923065,
0.01639886386692524,
-0.05724569037556648,
-0.017936525866389275,
-0.013864727690815926,
0.01627000980079174,
-0.036285385489463806,
-0.005252962000668049,
0.02867438830435276,
-0.01850348338484764,
0.03745366260409355,
-0.024671312421560287,
0.016510536894202232,
0.010866716504096985,
0.06336198002099991,
-0.013753053732216358,
-0.04961751401424408,
0.06391175836324692,
-0.04339814558625221,
-0.04164572432637215,
-0.03169817104935646,
0.0060733347199857235,
-0.016965823248028755,
0.005119812674820423,
0.0064427172765135765,
-0.03686952218413353,
0.0465250089764595,
-0.005923004820942879,
0.04772765189409256,
-0.05088887736201286,
0.011296231299638748,
0.0615064762532711,
-0.0035864459350705147,
-0.008951081894338131,
0.04157700389623642,
0.0499267652630806,
0.006511439569294453,
-0.008774980902671814,
0.04222986474633217,
0.0012090832460671663,
-0.04535673186182976,
-0.025221090763807297,
0.01089248713105917,
-0.04143955931067467,
-0.01223257277160883,
-0.03879375010728836,
0.004849218763411045,
-0.003719595493748784,
-0.017936525866389275,
0.007237319368869066,
0.007460666820406914,
0.04649064689874649,
0.008676192723214626,
-0.04686862230300903,
0.02228321135044098,
0.0446695052087307,
-0.03765983134508133,
-0.02620038390159607,
-0.02420743741095066,
0.029086722061038017,
0.008813637308776379,
0.0017835588660091162,
-0.04473822936415672,
-0.004387490451335907,
0.022712726145982742,
-0.06013203039765358,
0.01332353986799717,
0.004913645796477795,
0.06810382008552551,
0.0036981196608394384,
-0.05813908204436302,
-0.061403390020132065,
-0.012249752879142761,
0.06157519668340683,
-0.021097751334309578,
-0.020221542567014694,
-0.017094677314162254,
0.04683426022529602,
0.027609191834926605,
-0.04515056312084198,
0.06446153670549393,
-0.002484741387888789,
-0.0425734780728817,
0.017781900241971016,
0.0190532635897398,
0.04793381690979004,
-0.048895929008722305,
-0.01960304193198681,
-0.025186730548739433,
0.008847998455166817,
0.0005648115766234696,
0.04786509647965431,
0.028073066845536232,
-0.03676643967628479,
-0.010583236813545227,
-0.0036616111174225807,
-0.027471747249364853,
0.007941722869873047,
-0.037934720516204834,
-0.05240076780319214,
0.0015462521696463227,
0.03587305173277855,
0.01613256335258484,
-0.04171444848179817,
0.049995485693216324,
-0.027695095166563988,
0.019981013610959053,
0.02281581051647663,
0.013211865909397602,
0.02501492388546467,
-0.03542635589838028,
0.032230768352746964,
0.05298490822315216,
-0.03111403062939644,
-0.035838689655065536,
-0.03398318588733673,
-0.021802155300974846,
0.039068639278411865,
0.0011811648728325963,
0.015883445739746094,
0.050236016511917114,
0.02341713011264801,
0.06810382008552551,
-0.019534319639205933,
0.003831269219517708,
-0.039068639278411865,
-0.02688760682940483,
-0.05181662738323212,
-0.02188805863261223,
-0.029584957286715508,
0.0014893414918333292,
-0.024585409089922905,
0.009586763568222523,
-0.03132019564509392,
-0.04724659398198128,
-0.023795103654265404,
-0.003558527445420623,
-0.07669410854578018,
-0.00264795683324337,
-0.026080120354890823,
0.0325915589928627,
0.057623665779829025,
-0.03456732630729675,
0.03329596295952797,
-0.0041061583906412125,
0.026664258912205696,
-0.054806049913167953,
0.016733884811401367,
0.02152726612985134,
0.036938246339559555,
0.05607741326093674,
-0.003618659684434533,
0.019774846732616425,
0.02620038390159607,
-0.042985811829566956,
-0.03169817104935646,
0.0184004008769989,
-0.016965823248028755,
-0.024052811786532402,
0.030650153756141663,
0.0454598143696785,
-0.008414189331233501,
0.00018616768647916615,
-0.01396781112998724,
0.030392445623874664,
0.017592914402484894,
0.006966724991798401,
0.034859396517276764,
0.02649245411157608,
0.015153271146118641,
0.060510002076625824,
-0.003764694556593895,
-0.0005076324450783432,
-0.000167644873727113,
0.022094225510954857,
0.012730809859931469,
0.008616060949862003,
0.001997242448851466,
-0.013881908729672432,
-0.00890813022851944,
-0.002368772402405739,
-0.018692471086978912,
0.028914915397763252,
0.005403292365372181,
-0.004896465223282576,
0.013160323724150658,
-0.07944300025701523,
-0.06264039129018784,
-0.06425536423921585,
0.006159237585961819,
0.01341803278774023,
-0.06508003920316696,
0.07380776852369308,
-0.004995253402739763,
-0.03814088553190231,
0.04707478731870651,
-0.00240528117865324,
-0.0254959799349308,
-0.03329596295952797,
0.011304821819067001,
-0.016046661883592606,
-0.06480515003204346,
-0.007722670678049326,
0.01379600539803505,
-0.023588934913277626,
-0.02367483824491501,
0.03556380048394203,
0.009019804187119007,
-0.013984992168843746,
-0.0004815931315533817,
0.012490281835198402,
-0.02063387632369995,
0.023606115952134132,
0.028863374143838882,
-0.025633424520492554,
0.007976084016263485,
0.010024867951869965,
-0.030890682712197304,
0.06033819541335106,
0.03362239524722099,
0.013057240284979343,
-0.10954337567090988,
0.03209332376718521,
0.005948775913566351,
-0.05088887736201286,
0.03169817104935646,
0.019929472357034683,
0.03339904546737671,
0.013100191950798035,
0.03717877343297005,
-0.04250475391745567,
0.02039334736764431,
-0.04628448188304901,
0.0012767318403348327,
-0.010428612120449543,
-0.019688943400979042,
-0.02862284518778324,
-0.058517053723335266,
0.05027037486433983,
-0.010231034830212593,
0.059513527899980545,
-0.0048277429305016994,
-0.02376074157655239,
-0.070440374314785,
0.0038763682823628187,
-0.002892780117690563,
0.027420205995440483,
0.0714712142944336,
-0.02084004320204258,
0.014173978008329868,
-0.02599421702325344,
0.07724388688802719,
-0.06830998510122299,
-0.006215074565261602,
-0.035151466727256775,
-0.04910209774971008,
0.02233475260436535,
-0.02391536720097065,
-0.02123519591987133,
0.04391356185078621,
0.00022012618137523532,
-0.029292888939380646,
0.0306157935410738,
-0.0023043451365083456,
0.035838689655065536,
0.0095266317948699,
0.002845533424988389,
0.014740937389433384,
-0.0026372189167886972,
0.030392445623874664,
0.0736016035079956,
0.015041597187519073,
0.028640026226639748,
0.016072431579232216,
0.00476331589743495,
-0.048792846500873566,
0.02788408100605011,
0.04377611726522446,
0.0365259125828743,
0.006352519150823355,
-0.026355009526014328,
-0.006855051498860121,
0.00504679512232542,
-0.011210327968001366,
0.0023795103188604116,
0.018039608374238014,
-0.00584139721468091,
0.011150196194648743,
0.01210371870547533,
-0.0019725454039871693,
-0.034154992550611496,
0.025461619719862938,
-0.009303283877670765,
-0.04003075137734413,
-0.012086537666618824,
0.02848540060222149,
0.018726831302046776,
-0.07655666023492813,
0.01568586938083172,
-0.060166388750076294,
-0.01528212521225214,
0.004235012922435999,
-0.0020004636608064175,
-0.007675423752516508,
-0.04054616764187813,
0.006146352272480726,
0.019671764224767685,
0.033313143998384476,
0.0016375239938497543,
-0.04288272559642792,
-0.011794467456638813,
0.03607921674847603,
0.03317569941282272,
0.031680990010499954,
-0.048792846500873566,
-0.017575733363628387,
0.07951172441244125,
-0.08555928617715836,
-0.0027854014188051224,
0.07318926602602005,
-0.040305640548467636,
-0.10919976234436035,
-0.023588934913277626,
-0.019121985882520676,
0.01944841630756855,
0.019534319639205933,
0.0446695052087307,
0.031629446893930435,
-0.035151466727256775,
-0.014697985723614693,
0.04793381690979004,
-0.035701245069503784,
-0.04068361222743988,
0.060613084584474564,
-0.024293338879942894,
-0.010858125984668732,
0.03424089401960373,
0.0373162180185318,
0.045975230634212494,
0.039962027221918106,
-0.024585409089922905,
0.02604575827717781,
-0.0064598978497087955,
-0.0015956463757902384,
-0.06047563999891281,
-0.0007602406549267471,
-0.004900760482996702,
0.04288272559642792,
0.05374085158109665,
0.0068120998330414295,
0.032625921070575714,
-0.032729003578424454,
0.006893707439303398,
0.02465413138270378,
-0.02843385934829712,
0.06298400461673737,
-0.010617597959935665,
0.006739082280546427,
-0.0056008691899478436,
0.011674203909933567,
-0.00168691819999367,
-0.012292704544961452,
0.08047383278608322,
0.02535853534936905,
-0.0024246093817055225,
-0.032625921070575714,
-0.0417831689119339,
-0.0015677278861403465,
-0.029653679579496384,
0.06191881000995636,
0.03195587918162346,
0.02242065593600273,
-0.052572574466466904,
-0.0024396423250436783,
-0.022214489057660103,
0.05205715447664261
]
|
41,429 | pyglove.core.typing.class_schema | noneable | Marks none-able and returns `self`. | @abc.abstractmethod
def noneable(self) -> 'ValueSpec':
"""Marks none-able and returns `self`."""
| (self) -> pyglove.core.typing.class_schema.ValueSpec | [
0.028491515666246414,
-0.03474986553192139,
0.037550099194049835,
0.02071496844291687,
-0.043251775205135345,
-0.016666440293192863,
-0.03453056886792183,
-0.04166610166430473,
0.025843104347586632,
-0.007793416269123554,
0.009252573363482952,
0.03412571921944618,
0.04807627201080322,
0.0575903095304966,
-0.03549209609627724,
0.019382327795028687,
-0.011766034178435802,
0.03402450308203697,
0.017045989632606506,
-0.0059083206579089165,
-0.003953640814870596,
0.006325825117528439,
0.018673835322260857,
-0.0001814721035771072,
-0.007578338496387005,
0.04716535285115242,
-0.015957947820425034,
-0.016118202358484268,
-0.010526172816753387,
-0.00676441565155983,
-0.03620058670639992,
-0.015814563259482384,
-0.0006241480587050319,
0.03802242502570152,
0.056645654141902924,
0.0006926778587512672,
-0.030616993084549904,
0.11214422434568405,
-0.1181495413184166,
0.0007411758415400982,
-0.001244078972376883,
-0.013958986848592758,
-0.012938421219587326,
-0.04632190987467766,
-0.03728019446134567,
-0.033838946372270584,
0.06254975497722626,
0.012946855276823044,
-0.009303180500864983,
0.0022119302302598953,
0.020731836557388306,
0.06872376054525375,
-0.004331081639975309,
0.01845454052090645,
-0.03765131160616875,
0.08819043636322021,
0.02567441575229168,
0.019432934001088142,
-0.023413987830281258,
0.07631475478410721,
-0.061031561344861984,
0.04591705650091171,
0.025303300470113754,
-0.09716467559337616,
0.030363960191607475,
-0.008982671424746513,
0.0010116049088537693,
-0.009716467000544071,
0.03203397989273071,
0.06268470734357834,
-0.005786021240055561,
-0.02068123035132885,
0.03937193378806114,
0.1043170690536499,
0.06528251618146896,
-0.0514163076877594,
-0.05799516290426254,
0.03447996452450752,
0.053879160434007645,
-0.053980372846126556,
-0.043859053403139114,
0.01443131547421217,
-0.03582947328686714,
-0.020208902657032013,
-0.05624080076813698,
-0.03270873427391052,
0.008822417818009853,
0.007890412583947182,
0.05431775003671646,
0.022216297686100006,
-0.013824036344885826,
0.013975855894386768,
-0.020310115069150925,
-0.010686427354812622,
0.04362288862466812,
0.053204406052827835,
0.02886263094842434,
-0.04402774199843407,
-0.039641838520765305,
-0.04004668816924095,
-0.002722213277593255,
0.04908840358257294,
0.024139348417520523,
-0.002363750012591481,
0.009961065836250782,
-0.01933172158896923,
-0.005022705066949129,
-0.01444818452000618,
-0.03233761712908745,
0.023886315524578094,
-0.049020927399396896,
0.0027285392861813307,
-0.056004639714956284,
-0.03205084800720215,
-0.034614913165569305,
0.011521436274051666,
-0.041699837893247604,
-0.03328227251768112,
0.014178282581269741,
0.017695441842079163,
-0.015308496542274952,
0.014616873115301132,
-0.049695681780576706,
-0.03768504783511162,
0.047570206224918365,
0.021288510411977768,
-0.007725941017270088,
-0.0015719674993306398,
-0.00982611533254385,
0.00835852324962616,
0.0004971044254489243,
0.06055923178792,
0.008438650518655777,
0.06717182695865631,
-0.01161421462893486,
0.038191113620996475,
0.031679730862379074,
-0.0016668549505993724,
0.008746507577598095,
0.006321607623249292,
-0.009716467000544071,
-0.04220590367913246,
0.05843375623226166,
0.030650731176137924,
0.03734767064452171,
0.018353326246142387,
-0.0074644736014306545,
-0.0047823237255215645,
-0.01159734558314085,
-0.012558870948851109,
0.03257378190755844,
0.015409709885716438,
0.019179901108145714,
0.005398037377744913,
0.025539465248584747,
0.024797234684228897,
0.0369090810418129,
-0.03205084800720215,
-0.007342174183577299,
-0.04082265868782997,
-0.0027411908376961946,
-0.04075518250465393,
0.04207095503807068,
-0.019837787374854088,
-0.018420802429318428,
0.021929526701569557,
-0.03481734171509743,
-0.04497239738702774,
0.033299144357442856,
0.008084404282271862,
-0.010281573981046677,
-0.03768504783511162,
-0.0307350754737854,
0.0289638452231884,
0.022351248189806938,
0.0555323101580143,
0.004042202141135931,
0.023785103112459183,
-0.025084005668759346,
-0.013790298253297806,
0.044736236333847046,
-0.0313086174428463,
-0.11902672797441483,
0.018015949055552483,
0.06251601874828339,
0.006637899205088615,
-0.01604229211807251,
-0.03734767064452171,
-0.008459736593067646,
0.017577359452843666,
-0.01794847473502159,
-0.007941018790006638,
-0.006089660804718733,
0.031848419457674026,
0.0307350754737854,
-0.06197621673345566,
0.030465172603726387,
0.04719908908009529,
0.009185098111629486,
0.007363260257989168,
-0.009767074137926102,
0.017830392345786095,
-0.02046193554997444,
0.0218789204955101,
-0.04018164053559303,
-0.0027538426220417023,
0.0074982112273573875,
-0.028356565162539482,
-0.06949973106384277,
-0.0407889187335968,
-0.036133114248514175,
0.016303759068250656,
-0.02074870653450489,
0.046827975660562515,
0.018184637650847435,
-0.07779921591281891,
-0.010239401832222939,
-0.0018671726575121284,
-0.03738141059875488,
0.06835264712572098,
0.029874762520194054,
-0.014667479321360588,
0.026754023507237434,
-0.004866668023169041,
0.04352167621254921,
0.030684469267725945,
0.018724441528320312,
-0.056814342737197876,
0.008215137757360935,
-0.026214219629764557,
-0.014540962874889374,
-0.003711150726303458,
0.0015055463882163167,
-0.03407511115074158,
0.005984230432659388,
0.02332964353263378,
0.018150901421904564,
-0.02655159682035446,
-0.11747478693723679,
0.020175164565443993,
-0.04062023013830185,
-0.017999080941081047,
0.010087582282721996,
0.06322450935840607,
-0.008257309906184673,
0.0048371474258601665,
-0.01656522788107395,
0.11194179952144623,
-0.009741771034896374,
0.0028107748366892338,
0.027108268812298775,
-0.0883253887295723,
-0.010720164515078068,
0.004307887051254511,
0.04328551143407822,
-0.0608966089785099,
-0.06693566590547562,
-0.019736574962735176,
0.0670706108212471,
-0.008185617625713348,
-0.002952051581814885,
-0.03027961589396,
-0.04335298761725426,
0.02712513878941536,
0.015629004687070847,
-0.0006241480587050319,
-0.028171008452773094,
0.02918314002454281,
-0.017999080941081047,
0.0741555392742157,
0.028946975246071815,
-0.04338672384619713,
-0.0033653390128165483,
-0.03795494884252548,
-0.01752675324678421,
0.01343605201691389,
0.0246791522949934,
-0.03272560238838196,
-0.011234665289521217,
-0.044567547738552094,
0.03002658300101757,
0.026990186423063278,
0.0017891541356220841,
-0.00030627535306848586,
-0.04382531717419624,
0.005381168331950903,
-0.01678452268242836,
-0.009286311455070972,
-0.009193532168865204,
-0.012466092593967915,
0.043892793357372284,
0.03368712589144707,
0.0047696721740067005,
0.03257378190755844,
0.10236028581857681,
0.017054423689842224,
0.0011460286332294345,
0.01848827861249447,
0.024780364707112312,
-0.06066044420003891,
0.03788747638463974,
-0.02309347875416279,
-0.042475808411836624,
-0.014524094760417938,
-0.025590071454644203,
-0.0337039977312088,
-0.008130793459713459,
0.07354825735092163,
-0.027361301705241203,
0.03512097895145416,
0.011884116567671299,
0.034581176936626434,
-0.02967233583331108,
0.014077069237828255,
0.04267823323607445,
0.017020687460899353,
0.032523173838853836,
-0.008999540470540524,
0.06437159329652786,
0.06696940213441849,
-0.051753684878349304,
-0.014524094760417938,
-0.042509544640779495,
-0.022924790158867836,
-0.04348793998360634,
-0.03694281727075577,
-0.009286311455070972,
0.006895149126648903,
-0.053811684250831604,
0.041902266442775726,
0.012154018506407738,
0.003382207825779915,
0.02386944741010666,
-0.02309347875416279,
-0.10499183088541031,
-0.007924149744212627,
0.01467591430991888,
0.011040673591196537,
0.04089013487100601,
-0.02106921374797821,
0.034614913165569305,
-0.014304799027740955,
-0.028103532269597054,
-0.007401215378195047,
0.007953670807182789,
0.04132872447371483,
-0.018117163330316544,
-0.0004048527916893363,
0.10465444624423981,
0.008788679726421833,
0.046119481325149536,
0.017223112285137177,
0.013554134406149387,
0.015671176835894585,
0.05900729447603226,
0.008210920728743076,
-0.006561989430338144,
0.023818839341402054,
-0.04719908908009529,
-0.05566725879907608,
0.06042427942156792,
-0.04807627201080322,
-0.01823524571955204,
0.025539465248584747,
-0.004415425937622786,
-0.01936545968055725,
0.011884116567671299,
0.02219942957162857,
0.011327443644404411,
-0.033653389662504196,
-0.04915587976574898,
-0.07334583252668381,
-0.02506713569164276,
-0.06572110205888748,
-0.0047148484736680984,
0.001810240326449275,
0.0071017928421497345,
0.024088742211461067,
-0.034581176936626434,
-0.019938999786973,
0.026045531034469604,
-0.04871728643774986,
-0.046018268913030624,
-0.0037617573980242014,
-0.014001159928739071,
-0.004744368605315685,
0.03721272200345993,
0.042509544640779495,
-0.03436188027262688,
0.018791917711496353,
0.03876465559005737,
-0.03775252401828766,
-0.06474271416664124,
-0.01483616791665554,
-0.028204744681715965,
0.000285452842945233,
-0.0007063837838359177,
-0.0010506141697987914,
-0.03522219508886337,
-0.013874642550945282,
0.05809637904167175,
-0.016337497159838676,
0.030836287885904312,
0.012052805162966251,
0.009185098111629486,
0.016801390796899796,
0.05472260341048241,
-0.059547100216150284,
-0.022452462464571,
-0.010753902606666088,
-0.0002062482526525855,
-0.013587872497737408,
-0.060964085161685944,
-0.03409197926521301,
0.0683189108967781,
-0.021119821816682816,
0.0493583045899868,
-0.027631204575300217,
0.05293450504541397,
-0.02822161465883255,
-0.000537168001756072,
-0.01926424540579319,
0.03269186243414879,
0.0883253887295723,
-0.00887302402406931,
0.05421653762459755,
0.030751943588256836,
0.001141811371780932,
-0.005516119301319122,
0.00975863914936781,
0.04051901772618294,
-0.02486470900475979,
-0.04598453268408775,
-0.04517482593655586,
0.0025261128321290016,
-0.03653796389698982,
-0.030532648786902428,
-0.06949973106384277,
-0.04382531717419624,
0.046119481325149536,
-0.008016929030418396,
0.031359221786260605,
0.004466032609343529,
0.05077528953552246,
0.08873023837804794,
-0.017155637964606285,
0.02741190791130066,
0.04999932274222374,
0.0051660905592143536,
-0.010770771652460098,
-0.007742810063064098,
0.03156165033578873,
0.06949973106384277,
0.0047148484736680984,
-0.03636927530169487,
-0.022081347182393074,
-0.04261075705289841,
-0.042442068457603455,
0.043960265815258026,
-0.029453041031956673,
0.03876465559005737,
0.057016771286726,
-0.0715239942073822,
-0.06150388717651367,
0.011968460865318775,
0.06720556318759918,
-0.03906829655170441,
-0.03569452092051506,
-0.061875004321336746,
0.004617852158844471,
0.013621609658002853,
-0.05840001627802849,
0.040215376764535904,
-0.030465172603726387,
-0.02489844709634781,
-0.016092898324131966,
-0.025050267577171326,
-0.010096016339957714,
-0.012170887552201748,
-0.0514163076877594,
-0.03162912651896477,
0.021153559908270836,
-0.013689085841178894,
0.022435592487454414,
0.015848299488425255,
0.02174396999180317,
0.004588331561535597,
-0.006017968058586121,
0.029436172917485237,
-0.009834549389779568,
-0.07948610186576843,
0.010458697564899921,
-0.00455881142988801,
0.0006984765059314668,
-0.011335878632962704,
-0.014287929981946945,
0.03579573705792427,
-0.02238498628139496,
0.015536226332187653,
-0.012348010204732418,
-0.0035403533838689327,
0.013883077539503574,
-0.018926868215203285,
0.013697519898414612,
0.032556913793087006,
-0.05725293233990669,
-0.036672916263341904,
-0.016033858060836792,
-0.02773241698741913,
0.008712769486010075,
0.038258589804172516,
0.028322827070951462,
0.03846101462841034,
-0.03306297957897186,
0.016396539285779,
-0.0016963754314929247,
0.016084464266896248,
-0.022924790158867836,
-0.005035356618463993,
-0.03453056886792183,
-0.007038534618914127,
-0.00640173489227891,
-0.016649572178721428,
0.010644255205988884,
-0.029621729627251625,
0.010686427354812622,
-0.03162912651896477,
-0.02322842925786972,
0.008455519564449787,
-0.042442068457603455,
-0.007447604555636644,
-0.05209106206893921,
-0.008535646833479404,
0.06852133572101593,
-0.029368696734309196,
0.021625887602567673,
-0.009218835271894932,
0.029486779123544693,
-0.02474662847816944,
0.03228701278567314,
0.013368576765060425,
0.02535390667617321,
0.06541746854782104,
0.010871984995901585,
0.0006505056517198682,
0.006448124535381794,
-0.07523514330387115,
0.024409249424934387,
0.013992724940180779,
0.036740392446517944,
-0.03228701278567314,
-0.0012809796025976539,
0.03768504783511162,
-0.033906422555446625,
0.008135011419653893,
0.019281115382909775,
0.0753026232123375,
0.015418143942952156,
0.005431775003671646,
0.039641838520765305,
0.030161533504724503,
0.01444818452000618,
0.0529007650911808,
-0.05060660094022751,
0.02022577077150345,
0.04004668816924095,
0.05283329263329506,
-0.008468171581625938,
0.05003305897116661,
-0.009514041244983673,
-0.026619071140885353,
0.003078568261116743,
0.008645294234156609,
-0.011049107648432255,
-0.007548817899078131,
0.02418995462357998,
-0.03041456639766693,
-0.023430855944752693,
-0.07692202925682068,
-0.08211764693260193,
-0.04159862548112869,
-0.025202086195349693,
0.002112825633957982,
-0.09149673581123352,
0.007367477752268314,
-0.026163611561059952,
-0.045309774577617645,
0.06359563022851944,
-0.028407171368598938,
-0.0018302720272913575,
-0.0000876390331541188,
-0.006448124535381794,
-0.0034138369373977184,
-0.04277944564819336,
-0.015055463649332523,
0.027395039796829224,
-0.007962104864418507,
-0.06072792038321495,
0.017358064651489258,
0.03027961589396,
-0.011293706484138966,
0.04659181088209152,
-0.005376951303333044,
0.03947314992547035,
0.018707573413848877,
0.023144084960222244,
-0.04001295194029808,
0.053271882236003876,
-0.021946396678686142,
-0.05981700122356415,
0.014928947202861309,
0.012390182353556156,
0.01887626200914383,
-0.06066044420003891,
0.002825535135343671,
-0.021305378526449203,
-0.012086543254554272,
0.027664940804243088,
-0.016582095995545387,
0.007300002034753561,
-0.044702496379613876,
0.012938421219587326,
-0.05654444172978401,
0.036841604858636856,
-0.03528967127203941,
-0.020158296450972557,
0.0009425479220226407,
0.0059420582838356495,
0.01352883130311966,
-0.011091279797255993,
0.024426119402050972,
0.014912078157067299,
-0.035424619913101196,
0.00546129560098052,
-0.0066716368310153484,
-0.029048189520835876,
-0.002228799043223262,
0.022722363471984863,
0.039000820368528366,
0.06754294037818909,
-0.012348010204732418,
0.00603905413299799,
0.015747087076306343,
0.047536466270685196,
-0.06403421610593796,
-0.021592149510979652,
-0.06200995296239853,
-0.022452462464571,
-0.0020052865147590637,
-0.05286702886223793,
-0.05205732211470604,
0.027496252208948135,
0.017189376056194305,
-0.041834790259599686,
0.04142993688583374,
-0.01119249314069748,
0.009708032943308353,
0.0033358184155076742,
0.00013943172234576195,
-0.030465172603726387,
-0.043892793357372284,
-0.028407171368598938,
-0.006203525699675083,
0.05350804701447487,
0.04068770632147789,
0.011867247521877289,
-0.01784726046025753,
-0.07388563454151154,
0.029790418222546577,
0.01784726046025753,
0.02712513878941536,
0.033096715807914734,
-0.015426578931510448,
0.0013811384560540318,
0.023751365020871162,
-0.02847464755177498,
0.0006030619842931628,
0.01370595395565033,
0.012558870948851109,
0.03582947328686714,
0.012432354502379894,
-0.008573601953685284,
-0.0771244615316391,
-0.014583135023713112,
-0.03650422766804695,
-0.03402450308203697,
-0.002313143340870738,
-0.009648991748690605,
0.026568464934825897,
-0.12219807505607605,
-0.006561989430338144,
-0.0387309193611145,
0.012348010204732418,
0.06713809072971344,
0.01961849257349968,
-0.014718086458742619,
-0.053811684250831604,
-0.020849918946623802,
0.03805616497993469,
0.044533807784318924,
0.03385581448674202,
0.007527731824666262,
-0.039877999573946,
0.021187296137213707,
0.03910203278064728,
0.06595727056264877,
-0.005680590867996216,
0.005128135439008474,
0.026113005355000496,
-0.055363621562719345,
-0.010450262576341629,
0.08947247266769409,
-0.06511382758617401,
-0.07496524602174759,
-0.023380249738693237,
-0.028238482773303986,
0.03356904536485672,
0.036099374294281006,
-0.0043606022372841835,
0.039743050932884216,
0.006342693697661161,
-0.03970931097865105,
0.026754023507237434,
-0.010112885385751724,
0.009159795008599758,
0.046760499477386475,
-0.08886519074440002,
-0.020107688382267952,
0.02029324695467949,
0.07091671973466873,
0.06231359392404556,
0.05006679520010948,
0.016118202358484268,
0.011462395079433918,
0.04271196946501732,
-0.04564715549349785,
-0.021305378526449203,
-0.011108148843050003,
-0.026686547324061394,
0.013039633631706238,
-0.015629004687070847,
0.0020369156263768673,
0.02812040038406849,
-0.005516119301319122,
0.03254004567861557,
0.013419183902442455,
-0.017897868528962135,
0.08110551536083221,
0.02786736749112606,
0.03346783295273781,
-0.023380249738693237,
0.009438131004571915,
0.0014190934598445892,
0.055970899760723114,
0.04261075705289841,
-0.01643027551472187,
0.034328144043684006,
0.02181144431233406,
-0.01810029335319996,
0.016835128888487816,
-0.07327836006879807,
0.01615194045007229,
0.0315953865647316,
0.03481734171509743,
-0.063865527510643,
0.030937502160668373,
-0.00934535264968872,
0.05114640295505524
]
|
41,430 | pyglove.core.typing.class_schema | set_default | Sets the default value and returns `self`.
Args:
default: Default value.
use_default_apply: If True, invoke `apply` to the value, otherwise use
default value as is.
Returns:
ValueSpec itself.
Raises:
ValueError: If default value cannot be applied when use_default_apply
is set to True.
| @abc.abstractmethod
def set_default(self,
default: Any,
use_default_apply: bool = True) -> 'ValueSpec':
"""Sets the default value and returns `self`.
Args:
default: Default value.
use_default_apply: If True, invoke `apply` to the value, otherwise use
default value as is.
Returns:
ValueSpec itself.
Raises:
ValueError: If default value cannot be applied when use_default_apply
is set to True.
"""
| (self, default: Any, use_default_apply: bool = True) -> pyglove.core.typing.class_schema.ValueSpec | [
0.06901271641254425,
-0.05412357300519943,
0.02919371984899044,
0.024259326979517937,
-0.03947513550519943,
-0.011089487001299858,
-0.009576503187417984,
0.00004160572279943153,
0.04373899847269058,
-0.01586914248764515,
0.027577577158808708,
0.024087397381663322,
-0.02013300731778145,
0.04851865395903587,
-0.027680734172463417,
0.008991940878331661,
-0.0007715360261499882,
0.051338307559490204,
0.056014806032180786,
0.05223234370350838,
0.02088949829339981,
-0.02747441828250885,
-0.01858563721179962,
0.02379511669278145,
0.026803892105817795,
0.042432330548763275,
-0.015594054013490677,
-0.021302130073308945,
0.042432330548763275,
0.0008666348294354975,
-0.02589266188442707,
-0.02807617373764515,
-0.02211020141839981,
0.07090394198894501,
0.0585937537252903,
-0.051097605377435684,
-0.06082884594798088,
0.13499945402145386,
-0.10639030486345291,
-0.033749863505363464,
0.013187033124268055,
-0.04057548567652702,
0.004835532046854496,
-0.044151630252599716,
-0.007792728487402201,
0.02126774564385414,
0.034265656024217606,
0.08582746982574463,
0.03528004139661789,
-0.008033431135118008,
0.03940636292099953,
-0.011682645417749882,
0.022746343165636063,
0.015568264760077,
-0.04580216109752655,
0.05955656245350838,
0.02113020047545433,
0.057596560567617416,
-0.014304578304290771,
0.06725902855396271,
-0.006911587435752153,
0.012267207726836205,
0.008712554350495338,
-0.08204501122236252,
-0.03373267129063606,
-0.021061429753899574,
-0.025841083377599716,
-0.037687063217163086,
0.004278908483684063,
0.06378604471683502,
-0.018654407933354378,
-0.019359322264790535,
0.0009552862611599267,
0.05725270137190819,
0.040609873831272125,
0.028368454426527023,
-0.0768871083855629,
-0.024861082434654236,
0.010350188240408897,
-0.018843531608581543,
-0.039990924298763275,
0.019995462149381638,
-0.01659984514117241,
-0.03342319652438164,
-0.010840188711881638,
-0.03005336970090866,
-0.012284400872886181,
0.032907407730817795,
0.15968860685825348,
-0.0137458061799407,
0.0015882037114351988,
0.019084233790636063,
0.009567906148731709,
0.03603653609752655,
0.0065763238817453384,
0.006653692107647657,
0.03600214794278145,
-0.02296985313296318,
0.0476246178150177,
-0.036930572241544724,
-0.0586281418800354,
0.008617992512881756,
0.027818279340863228,
-0.021216165274381638,
0.003733030753210187,
-0.02981266751885414,
0.02867792919278145,
-0.03246039152145386,
-0.03189302235841751,
-0.02197265811264515,
-0.04666180908679962,
-0.08534606546163559,
-0.016935108229517937,
0.006967464461922646,
-0.030706703662872314,
0.05935024842619896,
0.013505103997886181,
-0.03146319463849068,
0.04628356546163559,
0.03075828216969967,
-0.06887517124414444,
0.03029407188296318,
-0.011158258654177189,
-0.011613873764872551,
0.04552707076072693,
-0.007848605513572693,
0.028505999594926834,
0.020373709499835968,
0.030225299298763275,
0.053676556795835495,
0.06743095815181732,
0.032769862562417984,
-0.016505282372236252,
0.013694226741790771,
0.03871864452958107,
-0.006610709708184004,
0.0013281594729050994,
0.06433621793985367,
-0.014330368489027023,
0.012929138727486134,
0.02955477312207222,
0.011072293855249882,
0.07963798940181732,
0.028282489627599716,
0.015104053542017937,
0.026528803631663322,
0.02615055814385414,
-0.02333090454339981,
-0.04411724582314491,
0.05604919046163559,
0.03103337064385414,
0.05178532376885414,
-0.0586281418800354,
-0.0010826218640431762,
-0.007650886196643114,
-0.03961268067359924,
0.035967763513326645,
-0.052094798535108566,
0.0016032475978136063,
-0.015155632048845291,
0.010075099766254425,
-0.025806697085499763,
0.04363584145903587,
-0.00902632623910904,
0.012559488415718079,
0.017407916486263275,
-0.09751871228218079,
-0.004171452485024929,
0.028299683704972267,
0.0011057250667363405,
-0.020494060590863228,
-0.025480030104517937,
-0.001472150906920433,
0.008880185894668102,
0.08190746605396271,
0.04119443520903587,
0.01647949405014515,
-0.006911587435752153,
-0.009705450385808945,
0.0010025670053437352,
0.023262133821845055,
0.011218434199690819,
-0.0586281418800354,
-0.013960718177258968,
0.001548444852232933,
0.05144146457314491,
-0.012103874236345291,
0.0029872842133045197,
-0.0238295029848814,
0.029847053810954094,
0.024998625740408897,
-0.011665452271699905,
-0.0034085127990692854,
0.03201337158679962,
0.011476329527795315,
-0.04459865018725395,
0.045870933681726456,
-0.016410721465945244,
0.03589899092912674,
0.06488639116287231,
0.0025853978004306555,
-0.022402483969926834,
0.04112566262483597,
-0.008991940878331661,
0.0007011521374806762,
-0.015490896068513393,
0.021835114806890488,
-0.04177899658679962,
-0.09586818516254425,
-0.0659867450594902,
-0.052197959274053574,
-0.02785266563296318,
-0.04738391563296318,
0.020923884585499763,
0.005394304636865854,
-0.07042253762483597,
0.052197959274053574,
-0.024981433525681496,
-0.0125251030549407,
0.06258253008127213,
0.08348922431468964,
-0.006103516090661287,
0.06605552136898041,
0.02235090360045433,
0.0744800865650177,
0.0023489941377192736,
0.005059041082859039,
-0.09552432596683502,
-0.006116410717368126,
-0.006520446389913559,
-0.045011281967163086,
-0.01404668390750885,
0.031222494319081306,
-0.011166855692863464,
0.014854754321277142,
-0.013952122069895267,
0.06265130639076233,
-0.029038982465863228,
-0.09139800816774368,
0.049275148659944534,
-0.019462479278445244,
0.020855112001299858,
0.025118976831436157,
0.05938463285565376,
-0.03837478160858154,
-0.009739836677908897,
-0.04105689004063606,
0.07004429399967194,
0.015112649649381638,
-0.009481941349804401,
0.02405301108956337,
-0.03479863703250885,
-0.006632200907915831,
0.017777565866708755,
0.035967763513326645,
0.07420500367879868,
-0.024500029161572456,
0.024224940687417984,
0.03263232111930847,
0.019376514479517937,
0.024087397381663322,
-0.008467554114758968,
-0.024379678070545197,
0.026769505813717842,
-0.01733054779469967,
0.011055100709199905,
-0.009542116895318031,
0.01782914437353611,
0.004977374337613583,
0.06519586592912674,
0.019634408876299858,
-0.005824130028486252,
0.017270371317863464,
-0.0415039099752903,
-0.03751513361930847,
-0.045870933681726456,
-0.01573159731924534,
-0.07227938622236252,
-0.03196179121732712,
-0.03813407942652702,
0.010032117366790771,
0.012378962710499763,
-0.015155632048845291,
0.036827411502599716,
-0.035245656967163086,
0.016634231433272362,
-0.025858277454972267,
-0.010582293383777142,
-0.02847161330282688,
-0.03225407376885414,
0.023657571524381638,
0.008196764625608921,
-0.001622589654289186,
-0.0009450779180042446,
0.022419676184654236,
-0.030586352571845055,
0.0013528744457289577,
-0.025187749415636063,
0.00310118799097836,
-0.025239327922463417,
0.012164049781858921,
-0.053539011627435684,
-0.04284496232867241,
0.016668615862727165,
-0.008016237989068031,
-0.010229837149381638,
0.014450719580054283,
-0.005127813201397657,
0.0018600680632516742,
0.05543024092912674,
-0.0016892125131562352,
0.03847794234752655,
-0.08355799317359924,
-0.030380036681890488,
0.04800286516547203,
0.003524565603584051,
0.030809862539172173,
-0.05639304965734482,
0.045974090695381165,
0.02699301578104496,
-0.05175093933939934,
0.009361590258777142,
-0.0842457190155983,
-0.027182137593626976,
-0.03354354947805405,
-0.02248844876885414,
-0.011106680147349834,
0.050856903195381165,
-0.039887767285108566,
0.015585456974804401,
-0.015000895597040653,
-0.002237239619717002,
0.037308815866708755,
0.001211032154969871,
-0.051475852727890015,
-0.04177899658679962,
0.030259685590863228,
-0.011106680147349834,
0.004719479475170374,
-0.01672019623219967,
0.0012980717001482844,
0.004483075346797705,
-0.011295802891254425,
-0.026786698028445244,
-0.016161423176527023,
0.030483193695545197,
0.022178974002599716,
-0.03916566073894501,
0.06846253573894501,
-0.029761089012026787,
0.01610124669969082,
0.009198256768286228,
-0.0009069308871403337,
-0.01362545508891344,
0.0317210890352726,
0.008957554586231709,
0.006378604099154472,
-0.03289021551609039,
-0.0002531938371248543,
-0.09414888173341751,
0.022935466840863228,
-0.06691516935825348,
0.026167750358581543,
0.015439316630363464,
0.02272915095090866,
0.014424929395318031,
-0.010195450857281685,
0.009688257239758968,
0.014038086868822575,
-0.023623187094926834,
0.021422481164336205,
-0.09050396829843521,
-0.01307527907192707,
-0.02590985596179962,
0.0451832115650177,
0.03027687780559063,
-0.08706536889076233,
0.019084233790636063,
-0.028867052868008614,
-0.026081785559654236,
0.02721652388572693,
-0.014063876122236252,
-0.02211020141839981,
0.03459232300519943,
0.020218972116708755,
-0.04624917730689049,
0.06031305342912674,
0.023365290835499763,
-0.001365769188851118,
-0.018654407933354378,
0.031927406787872314,
-0.032787058502435684,
-0.050478655844926834,
-0.0329761803150177,
-0.013814577832818031,
-0.047693390399217606,
0.014304578304290771,
0.025720732286572456,
-0.009825801476836205,
-0.009370186366140842,
0.02333090454339981,
-0.007031938061118126,
0.05175093933939934,
0.01423580665141344,
-0.011725627817213535,
-0.0024242133367806673,
0.04697128385305405,
-0.008691063150763512,
-0.03799653798341751,
0.02589266188442707,
-0.028402840718626976,
0.012207032181322575,
-0.04710882902145386,
-0.010479135438799858,
0.003855530871078372,
0.040472328662872314,
0.045389529317617416,
-0.04556145891547203,
0.059281475841999054,
-0.042329173535108566,
0.00963667780160904,
-0.012310190126299858,
0.044770579785108566,
0.07282955944538116,
0.07846886664628983,
-0.004154259338974953,
0.010969135910272598,
-0.016943704336881638,
-0.014485104940831661,
-0.006219568662345409,
0.030087755993008614,
-0.03517688438296318,
-0.04205408692359924,
0.005218076519668102,
0.026460031047463417,
-0.022075815126299858,
-0.036208465695381165,
-0.04545830190181732,
-0.03165232017636299,
-0.017640020698308945,
-0.0014109008479863405,
-0.02883266657590866,
-0.005016058683395386,
0.002235090360045433,
-0.01708124950528145,
-0.06093200296163559,
-0.019703181460499763,
0.05711515620350838,
-0.038649871945381165,
-0.026580382138490677,
-0.008974747732281685,
0.0036599605809897184,
0.07104148715734482,
0.029520386829972267,
-0.008218255825340748,
-0.03507372736930847,
-0.0201673936098814,
-0.03579583391547203,
0.03442039340734482,
-0.011158258654177189,
0.09263589978218079,
-0.01732194982469082,
-0.032787058502435684,
-0.03507372736930847,
-0.04428917542099953,
0.04869058355689049,
-0.026924243196845055,
-0.015138438902795315,
-0.03356074169278145,
0.0032279863953590393,
0.03161793202161789,
-0.03710250183939934,
0.020975463092327118,
-0.015095456503331661,
-0.03519407659769058,
-0.03727443143725395,
-0.03407653048634529,
-0.0004819413588847965,
-0.0549144521355629,
-0.03187582641839981,
-0.04449549317359924,
0.020201778039336205,
0.05384848639369011,
0.029142139479517937,
0.013599665835499763,
-0.024706345051527023,
0.0011315145529806614,
-0.01723598502576351,
0.001048235921189189,
0.03189302235841751,
-0.0366554819047451,
0.0561867356300354,
0.03428284823894501,
-0.0034557937178760767,
-0.02040809392929077,
-0.021336516365408897,
0.05030672624707222,
-0.04201969876885414,
0.06079445779323578,
0.0012002865551039577,
0.02895301766693592,
-0.015241596847772598,
-0.03868425637483597,
0.02102704346179962,
0.0451488271355629,
-0.09449274837970734,
-0.05529269948601723,
-0.03957829251885414,
-0.0006490358500741422,
-0.013530893251299858,
-0.0019148706924170256,
0.02126774564385414,
-0.0017203749157488346,
-0.007337114308029413,
0.02981266751885414,
-0.0488625131547451,
0.056461822241544724,
-0.011252820491790771,
0.006666587200015783,
-0.0451488271355629,
-0.009421765804290771,
-0.012353172525763512,
-0.020837919786572456,
0.005093427374958992,
0.004057548940181732,
0.009103694930672646,
0.0018686645198613405,
-0.04679935425519943,
0.030070561915636063,
0.008510536514222622,
0.003492328803986311,
-0.02004704251885414,
0.002656318945810199,
0.10914118587970734,
-0.017640020698308945,
0.025308100506663322,
0.012164049781858921,
0.005239567719399929,
-0.04119443520903587,
-0.005454480182379484,
0.029262490570545197,
0.025428451597690582,
0.026717927306890488,
0.002669213805347681,
0.04188215732574463,
-0.002632678719237447,
-0.028110560029745102,
0.05873129889369011,
0.06206674128770828,
-0.04490812495350838,
-0.009516327641904354,
0.00829562358558178,
-0.028179332613945007,
0.013401946052908897,
-0.02345125563442707,
-0.022299325093626976,
0.017760371789336205,
0.039509519934654236,
0.00805062334984541,
0.023055817931890488,
0.004801146220415831,
0.010582293383777142,
0.07214184105396271,
0.019015461206436157,
0.051579009741544724,
0.013126857578754425,
-0.01337615679949522,
-0.031102143228054047,
0.009481941349804401,
-0.011888961307704449,
-0.02331371232867241,
-0.004079040139913559,
0.05360778421163559,
-0.009516327641904354,
-0.000018334725609747693,
0.045492686331272125,
-0.019685989245772362,
-0.03287302330136299,
-0.08465834707021713,
-0.045389529317617416,
-0.019221777096390724,
-0.0057768491096794605,
0.040369171649217606,
-0.0843144878745079,
0.024947047233581543,
-0.02236809767782688,
-0.04287935048341751,
0.05656497925519943,
-0.06440498679876328,
0.004766759928315878,
-0.05388287082314491,
0.011158258654177189,
-0.05230111628770828,
-0.003941495902836323,
-0.02883266657590866,
0.02075195498764515,
0.008403080515563488,
-0.08520852029323578,
0.06371726840734482,
0.012413348071277142,
-0.051957257091999054,
0.05673690885305405,
-0.0044873738661408424,
0.07379236817359924,
0.01744230091571808,
0.01808703877031803,
-0.019978269934654236,
0.03330284729599953,
0.023623187094926834,
-0.03268389776349068,
0.0293140709400177,
0.00019973433518316597,
0.0008687839144840837,
-0.022918272763490677,
-0.008325711823999882,
-0.009017730131745338,
-0.01319563016295433,
0.03261512517929077,
-0.02309020236134529,
-0.02845442108809948,
-0.036070920526981354,
0.024465642869472504,
-0.07468640804290771,
-0.024500029161572456,
-0.012920541688799858,
-0.0018192346906289458,
-0.051235150545835495,
0.014089666306972504,
-0.018396513536572456,
-0.024207748472690582,
0.031325653195381165,
0.0020653095562011003,
0.01562844030559063,
-0.008880185894668102,
0.020184585824608803,
-0.04862181469798088,
0.02967512421309948,
0.010969135910272598,
0.02953757904469967,
0.03514249995350838,
0.009464748203754425,
0.02321055345237255,
0.07031938433647156,
0.05092567577958107,
-0.018121425062417984,
0.008905976079404354,
-0.02603020705282688,
0.0008881260873749852,
0.029228106141090393,
0.0008284878567792475,
-0.048312339931726456,
-0.0016881379997357726,
-0.005059041082859039,
-0.02917652577161789,
0.021800728514790535,
0.006361410953104496,
0.04312005266547203,
0.003032415872439742,
0.042673032730817795,
-0.037927765399217606,
-0.09483660757541656,
0.00294860010035336,
0.03307933732867241,
0.009275625459849834,
0.019496865570545197,
-0.010418959893286228,
-0.036930572241544724,
-0.04848426952958107,
0.03258074074983597,
-0.006060533691197634,
0.02223055250942707,
-0.01770879328250885,
-0.018241776153445244,
-0.009481941349804401,
0.008269834332168102,
-0.046352338045835495,
0.024757925420999527,
0.006374306045472622,
0.03270109370350838,
0.018499670550227165,
0.022763535380363464,
-0.0001407677191309631,
-0.054398663341999054,
0.022264938801527023,
-0.03885618597269058,
-0.011115276254713535,
-0.0030173719860613346,
-0.004547549411654472,
0.03555513173341751,
-0.041710224002599716,
-0.012258611619472504,
-0.07344850897789001,
0.011897558346390724,
0.027869857847690582,
-0.04470180720090866,
-0.003737329039722681,
-0.08073834329843521,
-0.016402125358581543,
-0.016892125830054283,
0.01722738891839981,
0.01723598502576351,
0.022883886471390724,
-0.06131025031208992,
0.041950926184654236,
0.051716554909944534,
0.019445287063717842,
-0.055155154317617416,
0.013453524559736252,
0.0573558583855629,
-0.048793744295835495,
0.02819652482867241,
0.0671214833855629,
-0.03672425448894501,
-0.012602471746504307,
-0.035967763513326645,
0.014631245285272598,
0.00210399366915226,
0.012894752435386181,
-0.0427074208855629,
0.05625550448894501,
-0.026305295526981354,
-0.052713748067617416,
0.0013851113617420197,
-0.05398603156208992,
-0.01674598455429077,
-0.011063697747886181,
-0.04958461970090866,
-0.013634051196277142,
0.03323407471179962,
0.018826337531208992,
0.045630231499671936,
0.038065310567617416,
0.04862181469798088,
-0.008914572186768055,
-0.012636857107281685,
-0.0390968881547451,
0.024517223238945007,
-0.0100836968049407,
0.004326189402490854,
0.009361590258777142,
-0.02197265811264515,
0.017554055899381638,
-0.03148039057850838,
-0.005738164763897657,
-0.02235090360045433,
-0.013101068325340748,
-0.017304757609963417,
0.06639938056468964,
0.02623652294278145,
0.05240427330136299,
-0.06994113326072693,
-0.003653513267636299,
0.002909915754571557,
0.053435854613780975,
0.061379022896289825,
-0.04624917730689049,
-0.013470717705786228,
-0.0063872006721794605,
0.025204943493008614,
0.027663541957736015,
-0.061482179909944534,
-0.020218972116708755,
0.024138975888490677,
0.006988955661654472,
-0.007904483005404472,
0.02917652577161789,
0.010840188711881638,
0.047693390399217606
]
|
41,432 | pyglove.core.symbolic.base | WritePermissionError | Exception raisen when write access to object fields is not allowed. | class WritePermissionError(Exception):
"""Exception raisen when write access to object fields is not allowed."""
| null | [
-0.015754619613289833,
0.005688474979251623,
-0.03230820596218109,
0.07476994395256042,
0.015213653445243835,
-0.07616814225912094,
-0.009421146474778652,
0.03621981292963028,
0.0304439514875412,
-0.058890487998723984,
0.049003276973962784,
0.04064742103219032,
0.045441217720508575,
0.004797960165888071,
-0.03160911053419113,
0.038816455751657486,
-0.04577412083745003,
0.05216585472226143,
0.027830665931105614,
-0.014672686345875263,
-0.021688612177968025,
0.004831250291317701,
0.04281128942966461,
-0.014814170077443123,
-0.011543401516973972,
0.1014021635055542,
0.010261725634336472,
0.053663916885852814,
0.103932224214077,
-0.015846168622374535,
-0.05343088507652283,
-0.03302394971251488,
0.025383831933140755,
0.029611695557832718,
0.0033768818248063326,
-0.011693207547068596,
-0.01942487247288227,
0.03195865824818611,
-0.0956762358546257,
-0.024701381102204323,
-0.0778326541185379,
0.05422985181212425,
-0.044409219175577164,
-0.060488421469926834,
0.054496172815561295,
-0.031509239226579666,
0.02535054087638855,
0.07443704456090927,
-0.041046902537345886,
-0.029079051688313484,
-0.02012396790087223,
0.03964871168136597,
0.038050778210163116,
-0.015513266436755657,
0.016811586916446686,
-0.00825598742812872,
0.03878316655755043,
0.0777660682797432,
0.0059922486543655396,
-0.01839287392795086,
-0.02228783629834652,
0.04534135013818741,
0.002475963905453682,
-0.053231142461299896,
0.013590753078460693,
-0.03160911053419113,
-0.05090082436800003,
-0.00995379127562046,
-0.004706412088125944,
0.05273178964853287,
0.0011370708234608173,
-0.038483552634716034,
-0.0054637654684484005,
0.047804828733205795,
-0.012425593100488186,
-0.008955082856118679,
-0.039382390677928925,
0.03668587654829025,
0.02416873723268509,
-0.0006330353207886219,
0.0484706349670887,
-0.028246793895959854,
-0.022587448358535767,
0.006454151123762131,
0.0011911675101146102,
0.024884477257728577,
-0.0215221606194973,
-0.04297773912549019,
-0.029711566865444183,
-0.022187964990735054,
-0.03621981292963028,
0.014439654536545277,
-0.03407259285449982,
-0.011343659833073616,
-0.026915183290839195,
0.016944747418165207,
0.004086380824446678,
-0.03036072663962841,
-0.036452844738960266,
0.02709827944636345,
-0.012758496217429638,
0.03174227476119995,
0.0134742371737957,
0.015113783068954945,
0.02132241800427437,
-0.040081486105918884,
-0.003967784345149994,
-0.056227266788482666,
-0.022204609587788582,
-0.02618279866874218,
0.006187829189002514,
0.052199143916368484,
-0.01942487247288227,
-0.009845597669482231,
0.016104169189929962,
0.03167569264769554,
-0.014073462225496769,
-0.058324553072452545,
0.008730373345315456,
-0.028429891914129257,
0.08342541754245758,
0.006142054684460163,
-0.028912600129842758,
0.010877596214413643,
0.05988919734954834,
0.0608879029750824,
-0.009088244289159775,
0.03448871895670891,
0.045507799834012985,
0.013574107550084591,
-0.05409669131040573,
-0.04424276947975159,
-0.010245081037282944,
0.023020222783088684,
0.006824505515396595,
0.010877596214413643,
0.0459405742585659,
-0.024984348565340042,
-0.048637084662914276,
-0.056992944329977036,
0.010661209002137184,
0.023303190246224403,
0.05286495015025139,
0.003834623144939542,
0.03745155408978462,
0.0031209627632051706,
-0.045008447021245956,
0.01054469309747219,
0.011044046841561794,
-0.029511824250221252,
0.024052221328020096,
-0.0004122271784581244,
-0.040281228721141815,
-0.0017810295103117824,
-0.06937692314386368,
0.034788332879543304,
-0.016919780522584915,
-0.0784318745136261,
-0.004042687360197306,
-0.0049311211332678795,
-0.03898290544748306,
-0.059223391115665436,
-0.00796053558588028,
0.02381918765604496,
0.0039469776675105095,
0.038550134748220444,
0.045274768024683,
-0.0854894146323204,
-0.006104603409767151,
0.023086803033947945,
0.0023615285754203796,
0.018259713426232338,
0.000449158571427688,
0.03375633433461189,
-0.01414004247635603,
0.04048096761107445,
0.00525570148602128,
0.025100864470005035,
-0.01950809918344021,
-0.03818393871188164,
0.021904997527599335,
-0.03705207258462906,
0.007877309806644917,
0.028146924450993538,
0.041745997965335846,
0.029561759904026985,
-0.03197530657052994,
0.03362317383289337,
0.026166152209043503,
0.031076466664671898,
0.03064369410276413,
-0.033673107624053955,
-0.007203182205557823,
-0.016611844301223755,
0.007169892080128193,
-0.01950809918344021,
-0.03641955554485321,
-0.041612837463617325,
0.029511824250221252,
0.12004471570253372,
-0.029478535056114197,
0.056094106286764145,
0.01977442018687725,
0.008555599488317966,
0.005946474615484476,
0.021988224238157272,
0.025017637759447098,
-0.017003005370497704,
-0.056160684674978256,
-0.01703629642724991,
0.02521738037467003,
0.007336343172937632,
0.005164153408259153,
0.037717875093221664,
0.08595547825098038,
0.0011443530675023794,
0.03224162757396698,
-0.03342343121767044,
0.03344007581472397,
0.06095448508858681,
0.03418910875916481,
0.041879162192344666,
-0.004213300067931414,
-0.030111050233244896,
0.04753850772976875,
-0.04124664515256882,
-0.0208896454423666,
-0.05246546491980553,
-0.005613571964204311,
-0.05862416699528694,
0.017727069556713104,
0.06837821751832962,
-0.04424276947975159,
0.02040693536400795,
0.03961542248725891,
-0.0069535053335130215,
0.006687182933092117,
-0.07184040546417236,
0.012284109368920326,
-0.0269484743475914,
-0.033739689737558365,
-0.020223839208483696,
-0.005280669312924147,
0.08901818096637726,
0.03418910875916481,
-0.006345957983285189,
0.024118801578879356,
0.04494186490774155,
0.009479404427111149,
-0.04004819691181183,
0.0176937784999609,
0.016720037907361984,
-0.08335883915424347,
-0.003112640231847763,
0.006678860634565353,
-0.056593459099531174,
-0.020490162074565887,
-0.00285464059561491,
0.003297817427664995,
0.0013836268335580826,
-0.0333402045071125,
-0.03397272154688835,
0.004689767025411129,
-0.011643271893262863,
0.011992819607257843,
-0.044608961790800095,
0.008963405154645443,
0.054429590702056885,
-0.0036868974566459656,
0.04164612665772438,
0.048437342047691345,
0.04637334868311882,
0.0045607672072947025,
0.01375720463693142,
-0.06258571147918701,
-0.04134651646018028,
0.03390613943338394,
0.05982261523604393,
0.03215840086340904,
0.023170027881860733,
0.03418910875916481,
0.013490881770849228,
0.006653892807662487,
0.04610702395439148,
-0.018692485988140106,
-0.014939009211957455,
0.01677829585969448,
0.027814021334052086,
-0.04437592998147011,
-0.008871857076883316,
0.013981913216412067,
0.00451083155348897,
-0.0011277078883722425,
-0.010428177192807198,
0.01907532475888729,
0.016387134790420532,
-0.07929742336273193,
-0.025816604495048523,
0.04903656989336014,
-0.014073462225496769,
-0.0033456722740083933,
0.06711318343877792,
-0.04297773912549019,
0.0344221405684948,
0.022121384739875793,
-0.05509539693593979,
0.03182549774646759,
-0.0020275856368243694,
-0.026632215827703476,
0.03056046925485134,
0.03425568714737892,
-0.01845945417881012,
-0.007294730748981237,
0.10832653939723969,
0.06814518570899963,
0.037984199821949005,
0.0006580030312761664,
0.03051053360104561,
-0.03904948756098747,
0.07603497803211212,
-0.04018135741353035,
-0.008697083219885826,
0.03678574785590172,
-0.06448325514793396,
-0.006054667755961418,
-0.03320704400539398,
0.013740559108555317,
0.03142601624131203,
-0.011759787797927856,
-0.000888954265974462,
-0.06388402730226517,
-0.02729802206158638,
0.02828008495271206,
0.007290569134056568,
-0.03009440377354622,
-0.016811586916446686,
0.008921792730689049,
-0.0580582320690155,
0.03465517237782478,
0.01027004886418581,
0.0046731214970350266,
0.02889595553278923,
0.01385707501322031,
0.018359584733843803,
0.0029461889062076807,
-0.022537512704730034,
0.014481267891824245,
0.012408948503434658,
0.011826368980109692,
0.010286693461239338,
0.012259142473340034,
0.07663420587778091,
-0.050235018134117126,
-0.01149346586316824,
-0.007739987690001726,
-0.03891632705926895,
-0.016936425119638443,
-0.04860379546880722,
-0.02638253942131996,
-0.02465144544839859,
0.04394315555691719,
-0.03217504546046257,
0.008946760557591915,
-0.021222546696662903,
-0.04790470004081726,
0.011327014304697514,
-0.04923630878329277,
-0.038683295249938965,
0.045441217720508575,
-0.04164612665772438,
-0.0031209627632051706,
-0.05369720607995987,
-0.004897831007838249,
0.023719318211078644,
0.022404352203011513,
0.05499552562832832,
-0.014048494398593903,
0.05646029859781265,
-0.07490310817956924,
0.039448969066143036,
0.0007797205471433699,
-0.056593459099531174,
0.010977466590702534,
-0.0165785551071167,
0.004981056787073612,
0.005139185581356287,
0.007140763103961945,
-0.010344951413571835,
0.02451828494668007,
0.06944350153207779,
-0.05313127115368843,
-0.015038879588246346,
-0.046772830188274384,
-0.027248086407780647,
-0.0350879468023777,
0.035487428307533264,
-0.04297773912549019,
0.022321125492453575,
0.016969716176390648,
0.0032520433887839317,
-0.013707268983125687,
0.005368056241422892,
-0.06501589715480804,
0.022887060418725014,
-0.001980771077796817,
0.030310790985822678,
0.023120092228055,
0.015346814878284931,
0.02987801842391491,
-0.01625397428870201,
-0.005688474979251623,
-0.006320990156382322,
0.029578404501080513,
-0.013490881770849228,
0.03765129670500755,
-0.011651595123112202,
0.0605882927775383,
-0.0538969486951828,
-0.010236757807433605,
0.023452995344996452,
0.014705977402627468,
-0.028646277263760567,
0.03815064951777458,
0.031159693375229836,
-0.04490857571363449,
-0.08528967201709747,
-0.0274311825633049,
0.004281960893422365,
0.050035275518894196,
0.043909866362810135,
-0.006628924980759621,
-0.015937717631459236,
-0.03552071750164032,
-0.029278792440891266,
-0.008780308999121189,
-0.06681357324123383,
-0.023719318211078644,
0.004693928174674511,
-0.0012327802833169699,
0.08955083042383194,
0.054296430200338364,
-0.018293004482984543,
0.031209629029035568,
-0.01797674596309662,
0.022687319666147232,
-0.027481118217110634,
0.007810729555785656,
0.07070853561162949,
0.05353075638413429,
0.01688648946583271,
0.0739709809422493,
0.024984348565340042,
0.03695220127701759,
-0.010261725634336472,
0.014248236082494259,
-0.06471628695726395,
-0.08156116306781769,
-0.0733051747083664,
0.04700586199760437,
-0.004184171091765165,
-0.007802407257258892,
0.04291115701198578,
-0.040780581533908844,
-0.026848603039979935,
-0.025750024244189262,
0.009937145747244358,
-0.0007131400052458048,
0.003869993845000863,
0.04584070295095444,
0.00426531583070755,
0.032274916768074036,
0.0019193921471014619,
-0.0012608689721673727,
-0.055960945785045624,
-0.008251825347542763,
0.0032395594753324986,
0.013357721269130707,
0.004514993168413639,
-0.00038569900789298117,
-0.028313376009464264,
0.020656613633036613,
-0.04004819691181183,
0.03815064951777458,
0.01417333260178566,
-0.019874291494488716,
-0.06448325514793396,
-0.032974012196063995,
-0.02701505459845066,
0.05083424225449562,
-0.011102304793894291,
0.02556692808866501,
-0.01776035875082016,
-0.007502794731408358,
-0.048503924161195755,
-0.005963119678199291,
-0.009645855985581875,
-0.0892845019698143,
0.04184586927294731,
-0.031159693375229836,
-0.02674873173236847,
-0.007344665937125683,
-0.04038110002875328,
-0.030943306162953377,
-0.0608879029750824,
0.029411954805254936,
-0.038816455751657486,
0.03738497197628021,
-0.00881359912455082,
0.09108217805624008,
-0.05649358779191971,
-0.004356864374130964,
0.042578257620334625,
-0.0066122799180448055,
0.045374639332294464,
-0.0011828449787572026,
-0.0044733802787959576,
-0.03525439649820328,
0.031026532873511314,
-0.014772557653486729,
0.027248086407780647,
0.03190872445702553,
-0.03578704223036766,
0.05016843602061272,
-0.011019079945981503,
-0.0020223839674144983,
-0.0682450532913208,
0.008285116404294968,
-0.0481710210442543,
0.01368230115622282,
0.06428351253271103,
-0.015113783068954945,
0.004764670040458441,
0.007606826722621918,
-0.03552071750164032,
0.021155966445803642,
0.03685232996940613,
0.023552866652607918,
0.011310369707643986,
0.02603299170732498,
0.022520868107676506,
0.017926810309290886,
0.021355709061026573,
0.007635955698788166,
-0.037984199821949005,
-0.013224559836089611,
-0.061387259513139725,
-0.03831710293889046,
-0.05955629423260689,
-0.0012889576610177755,
-0.03247465938329697,
0.03309052810072899,
0.01128540188074112,
0.017926810309290886,
0.005122540518641472,
0.03988174349069595,
-0.0038970422465354204,
0.03901619836688042,
-0.005879893898963928,
0.05223243311047554,
0.031143048778176308,
-0.03355659171938896,
-0.03971529379487038,
0.05349746346473694,
-0.0331571102142334,
-0.01999080739915371,
0.007602665573358536,
-0.018775712698698044,
-0.0018007955513894558,
-0.023552866652607918,
-0.026765378192067146,
-0.0091631468385458,
0.03155917674303055,
0.03745155408978462,
-0.001652029692195356,
0.009362888522446156,
-0.00009128816600423306,
-0.0286962129175663,
0.06368428468704224,
0.005530346184968948,
-0.04663966968655586,
0.02262073941528797,
0.0020088597666472197,
-0.06514906138181686,
-0.06308506429195404,
-0.009179792366921902,
0.005738410167396069,
-0.0032936560455709696,
0.004331896547228098,
-0.0038263003807514906,
0.020922934636473656,
-0.019890936091542244,
0.014622751623392105,
-0.008210212923586369,
-0.09540991485118866,
0.0828927755355835,
0.043077610433101654,
-0.016636813059449196,
-0.07903110235929489,
0.014514558017253876,
-0.0009773814817890525,
-0.030676985159516335,
0.02867956832051277,
-0.002050472656264901,
-0.04164612665772438,
0.011618304066359997,
0.00468560541048646,
-0.015138750895857811,
0.007290569134056568,
0.005363894626498222,
-0.012550432235002518,
-0.028363309800624847,
0.009962113574147224,
-0.01726100593805313,
-0.025500347837805748,
-0.027414537966251373,
-0.02603299170732498,
-0.028146924450993538,
0.031242918223142624,
0.016703393310308456,
-0.016745006665587425,
-0.00691189244389534,
0.006304345093667507,
-0.03244137018918991,
-0.015538233332335949,
-0.05649358779191971,
0.001152675598859787,
0.025716733187437057,
-0.018226422369480133,
-0.0676458328962326,
-0.05656016990542412,
-0.05179966241121292,
0.020290419459342957,
0.01668674871325493,
-0.04916973039507866,
-0.02491776831448078,
0.022371061146259308,
-0.00884688924998045,
-0.04131322726607323,
0.031575821340084076,
0.06435009092092514,
0.018958808854222298,
0.024251962080597878,
-0.022520868107676506,
0.011160562746226788,
-0.06231938675045967,
0.043710123747587204,
0.012683592736721039,
-0.08129484206438065,
0.010245081037282944,
-0.06618105620145798,
-0.040847163647413254,
0.03934910148382187,
0.003853348782286048,
-0.04427605867385864,
0.03678574785590172,
0.003112640231847763,
-0.023769253864884377,
-0.042578257620334625,
-2.1537894667744695e-7,
-0.015355137176811695,
0.005871571600437164,
-0.02410215511918068,
0.020490162074565887,
-0.06501589715480804,
0.041479676961898804,
0.04364354535937309,
-0.04344380274415016,
-0.009579275734722614,
0.02172190137207508,
0.034588590264320374,
0.03685232996940613,
0.0054387981072068214,
0.022304480895400047,
0.026898538693785667,
0.028812728822231293,
0.0033394303172826767,
0.0548623651266098,
-0.05472920462489128,
-0.006175345275551081,
-0.011277079582214355,
-0.0018476099940016866,
0.008160277269780636,
-0.02736460231244564,
-0.018159842118620872,
-0.013524172827601433,
0.07150749862194061,
0.010428177192807198,
0.023219963535666466,
0.044043026864528656,
-0.04058083891868591,
-0.018625905737280846,
-0.01957467943429947,
-0.02458486519753933,
0.04860379546880722,
-0.03344007581472397,
-0.051633208990097046,
0.018276358023285866,
0.029694920405745506,
0.019657904282212257,
0.05383036658167839,
-0.010611273348331451,
0.05409669131040573,
0.0038096553180366755,
0.0019682871643453836,
0.0038283811882138252,
-0.03535426780581474,
-0.013848752714693546,
0.007461181841790676,
0.06897743791341782,
-0.09614229947328568,
-0.006087958347052336,
0.07350491732358932,
0.02937866374850273,
-0.06564841419458389,
0.004822927992790937,
-0.023719318211078644,
0.02896253578364849,
0.041679419577121735,
-0.012825076468288898,
-0.01955803483724594,
0.001652029692195356,
0.014747589826583862,
-0.023286543786525726,
-0.04191245138645172,
-0.042445093393325806,
-0.07310543209314346,
-0.04361025616526604,
-0.04643992707133293,
-0.0170612633228302,
0.017926810309290886,
0.062419258058071136,
0.015088815242052078,
-0.04284457862377167,
0.052332304418087006,
0.021705256775021553,
0.0032437206245958805,
-0.02292035147547722,
0.01563810370862484,
0.008268470875918865,
0.10606279969215393,
0.04930289089679718,
0.04357696324586868,
0.003988590557128191,
-0.07443704456090927,
-0.020024098455905914,
0.017077907919883728,
-0.0011141836876049638,
0.0733051747083664,
-0.00009278362267650664,
0.024884477257728577,
0.05775861814618111,
0.01379049476236105,
-0.016087522730231285,
0.03711865097284317,
0.026499055325984955,
-0.05675991252064705,
-0.007752471603453159,
0.02749776281416416,
0.00395321985706687,
-0.002374012488871813,
-0.05432972311973572,
0.018492745235562325,
-0.03147595003247261,
0.03400601074099541,
-0.014780879952013493,
0.03097659721970558,
-0.023586155846714973,
-0.0034871557727456093
]
|
41,433 | pyglove.core.symbolic.flags | allow_empty_field_description | Allow empty field description, which is useful for testing purposes. | def allow_empty_field_description(allow: bool = True) -> None:
"""Allow empty field description, which is useful for testing purposes."""
global _ALLOW_EMPTY_FIELD_DESCRIPTION
_ALLOW_EMPTY_FIELD_DESCRIPTION = allow
| (allow: bool = True) -> NoneType | [
0.03807533532381058,
0.022468185052275658,
0.04469861090183258,
-0.03831309452652931,
-0.009187670424580574,
-0.0157769788056612,
0.07472412288188934,
-0.032657839357852936,
0.03425421565771103,
-0.025134477764368057,
-0.050268955528736115,
0.01212568674236536,
-0.032946545630693436,
-0.04272861033678055,
-0.038754645735025406,
-0.00760827399790287,
0.011251075193285942,
-0.034661803394556046,
0.044936370104551315,
-0.009017842821776867,
-0.026136459782719612,
-0.05145774781703949,
-0.01720353029668331,
-0.0007435262086801231,
-0.0099434033036232,
0.05352964252233505,
0.01013870444148779,
-0.017713014036417007,
0.013637152500450611,
0.009374480694532394,
0.019156547263264656,
0.018086634576320648,
0.007103037089109421,
0.07193894684314728,
0.01583641953766346,
-0.019513186067342758,
0.007022369187325239,
0.0481291264295578,
-0.08885377645492554,
-0.03668275102972984,
0.03583361208438873,
0.019190512597560883,
0.029244303703308105,
-0.012507799081504345,
-0.03814326599240303,
-0.019530167803168297,
0.05842067673802376,
0.07832446694374084,
-0.044291023164987564,
-0.015225039795041084,
0.00796915777027607,
0.10271169990301132,
-0.017144091427326202,
0.011471850797533989,
-0.07105584442615509,
-0.04157378524541855,
0.06602895259857178,
0.057028092443943024,
0.0013373919064179063,
-0.003880559466779232,
-0.07981894910335541,
0.02919335477054119,
-0.02148318476974964,
-0.08484584093093872,
0.019513186067342758,
0.03462783619761467,
-0.02207758091390133,
0.006317584775388241,
0.043509818613529205,
0.017127107828855515,
-0.016447797417640686,
-0.042796541005373,
-0.0044324989430606365,
0.09659790992736816,
0.03654688969254494,
-0.05400516092777252,
-0.017313918098807335,
0.024234391748905182,
0.013823962770402431,
-0.07587894797325134,
0.009102756157517433,
0.004852822050452232,
0.009671678766608238,
-0.021279392763972282,
-0.013959824107587337,
-0.013424867764115334,
-0.007667713798582554,
0.06270033121109009,
0.055703435093164444,
-0.015377884730696678,
0.021279392763972282,
-0.007506377529352903,
0.007782347500324249,
0.014724048785865307,
-0.013042755424976349,
0.016532711684703827,
-0.016116634011268616,
-0.051118090748786926,
-0.03262387216091156,
0.03583361208438873,
0.0030250533018261194,
0.008117756806313992,
0.03939999267458916,
-0.014307971112430096,
-0.008071054704487324,
-0.06504394859075546,
0.023096546530723572,
-0.026849735528230667,
0.024132493883371353,
0.028412148356437683,
0.015326936729252338,
-0.043238092213869095,
0.018324391916394234,
-0.031519994139671326,
0.02330034039914608,
0.011760558001697063,
0.025440167635679245,
-0.04992929846048355,
0.008364006876945496,
-0.016660083085298538,
0.02160206437110901,
-0.044460851699113846,
-0.061783261597156525,
-0.07268618792295456,
0.08002273738384247,
0.028480079025030136,
-0.05251067876815796,
0.011429393664002419,
0.034016456454992294,
-0.017831891775131226,
-0.007943683303892612,
0.03912826627492905,
0.008546571247279644,
0.025355253368616104,
-0.03202947601675987,
-0.03702240437269211,
0.06565532833337784,
0.009518833830952644,
0.02369094267487526,
-0.02224740944802761,
-0.011089739389717579,
-0.03269180282950401,
0.021109564229846,
0.030653873458504677,
0.001847935956902802,
-0.04347585141658783,
-0.012703100219368935,
-0.05050671473145485,
0.003999438602477312,
0.03208042308688164,
0.018222495913505554,
0.02404758147895336,
-0.08701963722705841,
-0.0540391243994236,
-0.002379708457738161,
0.05631481483578682,
0.02340223640203476,
-0.06273429840803146,
0.002944385167211294,
-0.0029465078841894865,
0.05193326622247696,
-0.03216533735394478,
0.03814326599240303,
0.06473825871944427,
0.010529307648539543,
0.07907170802354813,
0.03939999267458916,
-0.07044446468353271,
0.020786892622709274,
0.02036232315003872,
-0.003576992778107524,
0.0015730276936665177,
-0.008372497744858265,
0.04320412874221802,
0.08151722699403763,
0.10834997892379761,
-0.016677064821124077,
0.029617924243211746,
-0.007841787301003933,
-0.04357774928212166,
-0.024421202018857002,
0.02073594368994236,
-0.027563011273741722,
0.03384663164615631,
0.06477222591638565,
-0.005290128290653229,
-0.0015847033355385065,
-0.01864706538617611,
-0.015624134801328182,
0.02178887464106083,
-0.021466203033924103,
-0.006720925215631723,
-0.028004562482237816,
-0.016795944422483444,
-0.00013546401169151068,
-0.04775550588965416,
0.010011333972215652,
-0.008669696748256683,
0.020413272082805634,
0.005884524434804916,
-0.05356360971927643,
-0.03613930195569992,
-0.016244005411863327,
-0.05515998601913452,
0.05135584995150566,
0.061681367456912994,
-0.01939430646598339,
-0.025440167635679245,
-0.05342774838209152,
-0.04235498979687691,
-0.022332321852445602,
0.024030597880482674,
-0.008780084550380707,
0.017373358830809593,
0.01788284070789814,
-0.0167874526232481,
-0.025813788175582886,
0.012660644017159939,
-0.06028877943754196,
0.028768787160515785,
0.02617042511701584,
-0.020617064088582993,
0.014206074178218842,
-0.034288182854652405,
0.0891934260725975,
0.05947360768914223,
0.05971136689186096,
-0.010045299306511879,
-0.017050685361027718,
-0.004343339707702398,
-0.016201548278331757,
0.010945385321974754,
-0.09619032591581345,
0.015513746999204159,
0.03868671506643295,
-0.014027755707502365,
0.046193093061447144,
-0.05098222941160202,
-0.020311374217271805,
-0.020294392481446266,
0.008771592751145363,
-0.04024912789463997,
-0.03939999267458916,
-0.004716960247606039,
-0.05315602198243141,
-0.06185119226574898,
-0.06619878113269806,
0.02987266518175602,
0.0019010071409866214,
0.006861032918095589,
-0.04687240347266197,
0.016473272815346718,
-0.020752927288413048,
0.014596677385270596,
-0.005527886562049389,
-0.03821119666099548,
0.003528167260810733,
-0.016218530014157295,
-0.040486887097358704,
-0.039807576686143875,
0.005744416732341051,
-0.04378154128789902,
-0.05743567645549774,
0.08396273851394653,
0.0737730860710144,
0.04772154241800308,
0.025338269770145416,
-0.009620730765163898,
-0.001696152612566948,
0.013348445296287537,
0.08273997902870178,
-0.0135097810998559,
0.008822540752589703,
-0.04099636897444725,
0.016176074743270874,
0.01701672002673149,
-0.0030080704018473625,
0.01465611718595028,
0.005001421086490154,
0.036750681698322296,
0.0015316321514546871,
-0.004029158502817154,
0.04306826740503311,
0.039909474551677704,
0.013823962770402431,
-0.01183698046952486,
-0.05536378175020218,
0.037599820643663406,
-0.05804705619812012,
-0.0023117775563150644,
-0.005532132461667061,
0.08348722010850906,
0.055126022547483444,
0.008763101883232594,
0.009773575700819492,
0.000802435155492276,
0.05876033008098602,
-0.010758575052022934,
-0.05033688619732857,
-0.006041615270078182,
-0.06949343532323837,
0.04901222884654999,
0.00009320613753516227,
-0.04439292103052139,
-0.02890464849770069,
-0.04666861146688461,
-0.021534133702516556,
-0.02853102795779705,
0.078392393887043,
-0.01798473671078682,
-0.02681577019393444,
0.04136998951435089,
0.0027512062806636095,
0.08552515506744385,
0.04079257696866989,
0.028225338086485863,
0.048740506172180176,
-0.0015104038175195456,
0.021568099036812782,
-0.03593550994992256,
-0.002428533975034952,
-0.018205512315034866,
-0.005587326362729073,
-0.044664643704891205,
-0.07846032828092575,
-0.019377322867512703,
0.027563011273741722,
-0.03481464833021164,
0.005167003255337477,
0.024302322417497635,
0.008856507018208504,
0.0021419499535113573,
0.018765944987535477,
-0.024387236684560776,
-0.05257860943675041,
-0.011030299589037895,
0.0010072896257042885,
-0.026119476184248924,
-0.008461657911539078,
0.00020153753575868905,
0.023758873343467712,
-0.00889047235250473,
-0.003683134913444519,
-0.0059354729019105434,
0.025525080040097237,
-0.03245404362678528,
0.01165866106748581,
-0.03824516385793686,
0.05804705619812012,
0.02245120145380497,
0.04982740432024002,
-0.02635723538696766,
0.0314180962741375,
-0.017127107828855515,
0.07234653830528259,
-0.0397736132144928,
-0.021092580631375313,
0.08470997959375381,
-0.036003440618515015,
-0.005897261667996645,
0.06551946699619293,
-0.03654688969254494,
0.0032267235219478607,
-0.017067668959498405,
0.008049826137721539,
0.034101370722055435,
0.0007217670790851116,
0.020311374217271805,
-0.0009298058575950563,
-0.020294392481446266,
-0.00917068775743246,
-0.023147495463490486,
-0.01788284070789814,
-0.07078412175178528,
0.0004163428384345025,
-0.001198345678858459,
-0.019649047404527664,
0.017950771376490593,
-0.08810653537511826,
0.022128529846668243,
-0.004929244518280029,
-0.004003684502094984,
-0.022994650527834892,
-0.007990386337041855,
-0.08695170283317566,
-0.018239479511976242,
-0.008572045713663101,
0.05862446874380112,
-0.03834706172347069,
0.0029719821177423,
0.03664878383278847,
0.0020994930528104305,
-0.07343342900276184,
0.012762540020048618,
-0.0341523215174675,
-0.024302322417497635,
-0.0076040285639464855,
0.003033544635400176,
-0.04357774928212166,
0.006512886378914118,
0.001529509318061173,
-0.012151161208748817,
-0.08172101527452469,
0.013238057494163513,
-0.047891367226839066,
0.06416084617376328,
0.0027957861311733723,
0.004576852545142174,
0.014910859055817127,
0.053699471056461334,
0.06962929666042328,
-0.015301462262868881,
0.0025962386280298233,
0.003059018636122346,
0.033439043909311295,
-0.004071615636348724,
0.00651713227853179,
-0.016761979088187218,
0.014350428245961666,
-0.012278531678020954,
-0.004109826870262623,
-0.001198345678858459,
0.007145494222640991,
0.04463068023324013,
0.002443393925204873,
0.04860464483499527,
-0.0031460553873330355,
-0.01436741091310978,
0.07356929779052734,
-0.05485429987311363,
-0.014800471253693104,
0.06351550668478012,
-0.05210309103131294,
-0.052850332111120224,
-0.0017821278888732195,
-0.05329188331961632,
0.02321542613208294,
-0.04011326655745506,
-0.0439513698220253,
0.02617042511701584,
0.004869805183261633,
-0.013985298573970795,
0.034780681133270264,
0.026374218985438347,
0.0557713657617569,
0.04486843943595886,
-0.005128792021423578,
0.06983308494091034,
0.032572925090789795,
0.002027316251769662,
-0.006742153782397509,
0.08837825804948807,
0.04058878496289253,
-0.0635494664311409,
-0.023521116003394127,
-0.01593831554055214,
-0.021347323432564735,
-0.019428271800279617,
-0.052442748099565506,
0.0005859050434082747,
-0.001470069750212133,
0.06647050380706787,
-0.07995481044054031,
-0.022773874923586845,
0.03469576686620712,
0.036377061158418655,
0.013348445296287537,
0.012855945155024529,
-0.017169564962387085,
0.06405895203351974,
-0.020005684345960617,
-0.03841499239206314,
0.056722402572631836,
-0.003120581153780222,
0.019343357533216476,
-0.02292671985924244,
0.013942841440439224,
0.04412119835615158,
0.02805551141500473,
-0.030772751197218895,
0.02454008162021637,
0.025168443098664284,
0.0011611959198489785,
0.006071334704756737,
0.018324391916394234,
-0.020413272082805634,
-0.010308532044291496,
-0.025134477764368057,
0.00045720761409029365,
0.005167003255337477,
-0.024013616144657135,
-0.04700826480984688,
0.044460851699113846,
-0.04401930049061775,
-0.010384954512119293,
-0.02150016836822033,
0.031350165605545044,
0.019513186067342758,
-0.00287857698276639,
0.021449219435453415,
-0.015496763400733471,
-0.02645913138985634,
-0.027987580746412277,
-0.0041246865876019,
0.009289567358791828,
-0.11480342596769333,
-0.019360341131687164,
0.006338813342154026,
-0.009527325630187988,
-0.0008719583274796605,
-0.03624119982123375,
0.002668415429070592,
0.0546165406703949,
0.03138413280248642,
0.03355792537331581,
0.01203228160738945,
0.0012206354876980186,
0.009782066568732262,
0.032488010823726654,
-0.0012015298707410693,
-0.02768189087510109,
-0.007255882024765015,
-0.03644499182701111,
-0.034016456454992294,
-0.0035791154950857162,
0.00663601141422987,
-0.04120016470551491,
-0.004343339707702398,
0.013840945437550545,
-0.0011919770622625947,
0.03882257640361786,
-0.025236373767256737,
0.026662925258278847,
0.03262387216091156,
-0.0397736132144928,
0.031621888279914856,
-0.00451741274446249,
0.02187378890812397,
-0.06684412062168121,
0.04772154241800308,
0.01483443658798933,
0.0019010071409866214,
0.018188530579209328,
-0.03569775074720383,
0.021262409165501595,
0.059983089566230774,
-0.012838962487876415,
0.040860507637262344,
0.002381831407546997,
-0.03987550735473633,
-0.00851685181260109,
0.012974824756383896,
0.012244566343724728,
-0.1011492908000946,
0.014316461980342865,
-0.010240601375699043,
0.03821119666099548,
0.014851419255137444,
0.04544585198163986,
0.03223326802253723,
-0.022383270785212517,
-0.06521377712488174,
0.008058317005634308,
-0.011344480328261852,
0.035527922213077545,
0.0006708188448101282,
-0.027342235669493675,
0.01483443658798933,
-0.006402498576790094,
-0.006270882207900286,
-0.019343357533216476,
-0.05342774838209152,
0.03174076974391937,
0.0576394684612751,
-0.030993526801466942,
0.002013517776504159,
0.01284745428711176,
0.05726584792137146,
-0.03726016357541084,
0.00912823062390089,
-0.05583929643034935,
0.018494220450520515,
-0.032097406685352325,
-0.00917917862534523,
-0.022977666929364204,
-0.05308809131383896,
0.0511520579457283,
-0.02776680514216423,
-0.01599775440990925,
-0.03651292249560356,
-0.023164477199316025,
0.04055481776595116,
0.04031705856323242,
-0.02948206290602684,
-0.01146335992962122,
0.022705942392349243,
0.003952736034989357,
-0.05522792041301727,
0.024132493883371353,
0.01378999650478363,
-0.0027915402315557003,
0.006933209486305714,
0.0027830488979816437,
0.03167283907532692,
0.0276649072766304,
0.03583361208438873,
-0.004593835212290287,
-0.00366402929648757,
-0.004054632503539324,
-0.015505255199968815,
-0.02282482199370861,
0.012915384955704212,
-0.006045860704034567,
-0.01726297102868557,
-0.028497062623500824,
-0.02121146023273468,
0.018086634576320648,
-0.028463097289204597,
0.03678464889526367,
-0.02547413296997547,
-0.027987580746412277,
0.028310252353549004,
-0.033812664449214935,
-0.015411850064992905,
-0.05424292013049126,
-0.04592137038707733,
-0.05451464280486107,
-0.034458011388778687,
-0.05719791725277901,
0.008508360013365746,
-0.005948209669440985,
-0.009187670424580574,
-0.03810930252075195,
0.041607748717069626,
-0.00601189536973834,
-0.0053410762920975685,
0.005035386886447668,
0.020786892622709274,
0.06117188185453415,
0.03177473321557045,
0.02778378687798977,
-0.04497033357620239,
-0.04184550791978836,
0.03773568198084831,
-0.027155425399541855,
0.049589645117521286,
-0.06480619311332703,
-0.027257321402430534,
-0.01846025511622429,
-0.04486843943595886,
-0.0208208579570055,
0.04011326655745506,
0.0368865430355072,
-0.00984999816864729,
0.04062274843454361,
-0.0022756890393793583,
-0.04225309565663338,
-0.003337111324071884,
-0.004691486246883869,
-0.043509818613529205,
0.02540620043873787,
-0.06633464246988297,
0.009773575700819492,
-0.022026633843779564,
0.003925139084458351,
0.005133037455379963,
0.01654120348393917,
-0.01788284070789814,
-0.04666861146688461,
0.025915684178471565,
0.007455429527908564,
-0.0034177794586867094,
0.03179171681404114,
0.023911718279123306,
0.05077843740582466,
0.006623274181038141,
-0.022790856659412384,
0.018120599910616875,
0.004615063779056072,
-0.007939438335597515,
0.11419204622507095,
-0.02664594165980816,
-0.010164178907871246,
-0.06969722360372543,
-0.01022361870855093,
-0.0042329514399170876,
-0.04439292103052139,
-0.02671387419104576,
0.031435079872608185,
-0.007570062763988972,
-0.010639696381986141,
-0.051695507019758224,
0.02245120145380497,
0.039332062005996704,
0.03406740725040436,
-0.027698872610926628,
0.006996895186603069,
0.01806965097784996,
0.00802010577172041,
0.03603740409016609,
0.013773013837635517,
0.06762532889842987,
-0.020022667944431305,
0.04367964714765549,
-0.015267496928572655,
0.03043309599161148,
-0.03831309452652931,
0.02511749416589737,
0.0029549994505941868,
-0.02997456304728985,
0.029991544783115387,
0.09095963835716248,
-0.04198136925697327,
-0.07581102102994919,
0.002063404768705368,
-0.05685826390981674,
0.04177757725119591,
0.000060202539316378534,
0.04605723172426224,
0.010257584042847157,
0.022179478779435158,
-0.01155676506459713,
-0.03736206144094467,
-0.02404758147895336,
-0.011013316921889782,
0.027155425399541855,
-0.135182723402977,
-0.07173515856266022,
0.08063411712646484,
-0.02027740888297558,
0.02681577019393444,
0.06069636717438698,
-0.023351287469267845,
0.03956981748342514,
0.006750645115971565,
-0.007782347500324249,
0.02319844253361225,
0.02491370216012001,
0.01641383208334446,
-0.010996333323419094,
0.026306286454200745,
0.00018282997189089656,
0.07119170576334,
0.023147495463490486,
-0.0012843208387494087,
0.01997171901166439,
-0.0024646222591400146,
0.03396550938487053,
-0.009425428695976734,
0.03347301110625267,
-0.022179478779435158,
-0.021754909306764603,
-0.03726016357541084,
0.022994650527834892,
0.010801032185554504,
0.016863875091075897,
-0.05162757635116577,
0.06293808668851852,
-0.049589645117521286,
0.00024120819580275565,
-0.004975947085767984,
0.026374218985438347,
0.034186284989118576,
0.02985568344593048,
-0.029566975310444832,
0.018239479511976242,
-0.0077271535992622375,
0.02814042568206787
]
|
41,434 | pyglove.core.symbolic.flags | allow_partial | Returns a context manager that allows partial values in scope.
This function is thread-safe and can be nested. In the nested use case, the
allow flag of immediate parent context is effective.
Example::
@pg.members([
('x', pg.typing.Int()),
('y', pg.typing.Int())
])
class A(pg.Object):
pass
with pg.allow_partial(True):
a = A(x=1) # Missing `y`, but OK
with pg.allow_partial(False):
a.rebind(x=pg.MISSING_VALUE) # NOT OK
a.rebind(x=pg.MISSING_VALUE) # OK
Args:
allow: If True, allow partial symbolic values in scope.
If False, do not allow partial symbolic values in scope even if
individual objects allow so. If None, honor object-level
`allow_partial` property.
Returns:
A context manager that allows/disallow partial symbolic values in scope.
After leaving the scope, the `allow_partial` state of individual objects
will remain intact.
| def allow_partial(allow: Optional[bool] = True) -> ContextManager[None]:
"""Returns a context manager that allows partial values in scope.
This function is thread-safe and can be nested. In the nested use case, the
allow flag of immediate parent context is effective.
Example::
@pg.members([
('x', pg.typing.Int()),
('y', pg.typing.Int())
])
class A(pg.Object):
pass
with pg.allow_partial(True):
a = A(x=1) # Missing `y`, but OK
with pg.allow_partial(False):
a.rebind(x=pg.MISSING_VALUE) # NOT OK
a.rebind(x=pg.MISSING_VALUE) # OK
Args:
allow: If True, allow partial symbolic values in scope.
If False, do not allow partial symbolic values in scope even if
individual objects allow so. If None, honor object-level
`allow_partial` property.
Returns:
A context manager that allows/disallow partial symbolic values in scope.
After leaving the scope, the `allow_partial` state of individual objects
will remain intact.
"""
return thread_local.thread_local_value_scope(_TLS_ALLOW_PARTIAL, allow, None)
| (allow: Optional[bool] = True) -> ContextManager[NoneType] | [
0.09722918272018433,
-0.007426173891872168,
0.008542712777853012,
0.011573998257517815,
-0.0027557138819247484,
0.047892406582832336,
0.052073489874601364,
-0.05302373692393303,
0.03004678338766098,
-0.06963403522968292,
-0.011764047667384148,
-0.04333122447133064,
-0.046105943620204926,
0.016477268189191818,
-0.061385899782180786,
-0.013369963504374027,
-0.020240243524312973,
-0.00024394600768573582,
0.010243653319776058,
-0.01820671558380127,
0.01539398729801178,
0.07256079465150833,
0.009488208219408989,
0.04405341297388077,
-0.055646415799856186,
-0.016486771404743195,
-0.0055351839400827885,
-0.0014384351670742035,
0.05614054203033447,
0.021418549120426178,
0.09510063380002975,
0.027272064238786697,
0.005696725565940142,
-0.0290205180644989,
0.025010479614138603,
-0.06134789064526558,
0.00785378459841013,
0.09563276916742325,
-0.07157254219055176,
-0.10840407758951187,
-0.0324414037168026,
-0.043863363564014435,
-0.020696360617876053,
0.009112861007452011,
-0.002350671449676156,
-0.004076555836945772,
0.09867355972528458,
0.050477076321840286,
0.05602651461958885,
0.007782516069710255,
0.052529606968164444,
0.011878076940774918,
-0.028336340561509132,
0.0014111155178397894,
-0.024345306679606438,
0.019328007474541664,
-0.044775597751140594,
0.058231085538864136,
0.029267581179738045,
-0.03899810090661049,
0.002461137482896447,
-0.041164662688970566,
0.024098241701722145,
-0.03113006427884102,
-0.0034137594047933817,
-0.03175722807645798,
-0.02630281262099743,
0.005492422729730606,
-0.00554468622431159,
0.031168073415756226,
-0.10946835577487946,
-0.033296626061201096,
0.020088203251361847,
0.06541494280099869,
-0.006038814317435026,
-0.049146730452775955,
-0.03557721525430679,
-0.02039228193461895,
0.02831733599305153,
0.0007916738395579159,
-0.016097169369459152,
-0.04682813212275505,
-0.04112665355205536,
-0.0013101518852636218,
-0.030635936185717583,
0.025827690958976746,
-0.00951196439564228,
-0.004525547381490469,
0.09494859725236893,
-0.036109354346990585,
-0.020696360617876053,
0.06271624565124512,
0.0396442711353302,
0.04131670296192169,
0.05176940932869911,
0.023186005651950836,
0.0031975782476365566,
0.03257443755865097,
-0.09722918272018433,
-0.03365771844983101,
-0.023642124608159065,
0.0028863726183772087,
-0.00005497322490555234,
0.008994080126285553,
0.058573171496391296,
0.02573266625404358,
0.040176406502723694,
-0.06188002973794937,
0.039036110043525696,
0.03164319694042206,
-0.03078797459602356,
-0.07944057881832123,
-0.03654646873474121,
0.06860776990652084,
0.003088299883529544,
0.04933677986264229,
-0.06788558512926102,
-0.041848842054605484,
0.04154476150870323,
0.0029101287946105003,
0.022995956242084503,
-0.003926892299205065,
-0.009573729708790779,
-0.07415720820426941,
0.07248477637767792,
0.048462554812431335,
0.006656474433839321,
-0.03160518780350685,
0.02544759213924408,
0.009816043078899384,
-0.014795332215726376,
0.04355928301811218,
-0.005896277260035276,
0.024725405499339104,
-0.031909264624118805,
0.017589056864380836,
0.02677793614566326,
0.02257784828543663,
0.019803129136562347,
-0.0180926863104105,
-0.04435748979449272,
0.005440159235149622,
-0.012894839979708195,
0.02647385746240616,
0.027766192331910133,
-0.046790119260549545,
-0.004855758044868708,
0.006884533446282148,
-0.007559208199381828,
0.008485698141157627,
0.030236832797527313,
-0.022957947105169296,
0.024326302111148834,
0.04785439744591713,
-0.04485161975026131,
0.04272306710481644,
-0.01108937244862318,
-0.02084840089082718,
-0.009835047647356987,
-0.06294430792331696,
-0.0009627181570976973,
0.008067590184509754,
-0.07738804817199707,
0.03350567817687988,
0.058801230043172836,
-0.007093587424606085,
-0.001642738003283739,
-0.10034599155187607,
0.01488085463643074,
0.018339751288294792,
0.006794259883463383,
0.0038603749126195908,
0.05838312208652496,
0.029210567474365234,
0.028564399108290672,
0.04215291887521744,
-0.023680133745074272,
-0.07168657332658768,
-0.04177282005548477,
0.0007898921030573547,
0.034151848405599594,
-0.0015857232501730323,
0.0031880757305771112,
-0.0387890487909317,
0.02113347500562668,
0.02746211364865303,
0.011364944279193878,
-0.004748855251818895,
0.04074655473232269,
-0.006281127221882343,
-0.07275084406137466,
0.004563556984066963,
0.049602847546339035,
-0.004955533891916275,
-0.04154476150870323,
-0.015698065981268883,
-0.02022123895585537,
0.014586278237402439,
-0.023623120039701462,
0.004577810876071453,
-0.09555675089359283,
-0.06343843042850494,
-0.006309634540230036,
-0.028222311288118362,
0.008528458885848522,
0.037819795310497284,
-0.021798646077513695,
0.016714829951524734,
-0.03177623078227043,
0.005525681190192699,
-0.07081234455108643,
0.02033526822924614,
0.04815847426652908,
0.06526290625333786,
0.01573607698082924,
-0.011355441063642502,
-0.01309439167380333,
0.013978120870888233,
0.01642025262117386,
0.02953365072607994,
0.0021962563041597605,
-0.019841140136122704,
-0.022102724760770798,
-0.014092150144279003,
0.025580625981092453,
-0.028241315856575966,
-0.015745578333735466,
0.001357664237730205,
-0.02166561223566532,
-0.00541640305891633,
0.027785196900367737,
0.027329079806804657,
-0.022957947105169296,
-0.04428147152066231,
0.009835047647356987,
-0.037952832877635956,
0.01928049512207508,
0.02155158296227455,
0.025010479614138603,
-0.003577676834538579,
0.0009484644397161901,
0.021000439301133156,
-0.01763656921684742,
0.016353735700249672,
0.0008142421720549464,
0.02377515845000744,
0.010661762207746506,
0.006176599767059088,
0.07035622745752335,
0.02712002582848072,
-0.07731202989816666,
0.04268505796790123,
-0.048918671905994415,
0.024668389931321144,
-0.03941620886325836,
-0.03953023999929428,
-0.04108864441514015,
0.030806981027126312,
-0.032251354306936264,
0.050401054322719574,
0.014158667996525764,
0.004029043484479189,
-0.014025633223354816,
0.033809758722782135,
0.036052338778972626,
0.010851810686290264,
-0.03584328666329384,
-0.0287164393812418,
-0.027044005692005157,
0.017741095274686813,
-0.13235028088092804,
0.011459968984127045,
0.07081234455108643,
0.01203961856663227,
-0.0012875834945589304,
-0.013075387105345726,
0.02124750427901745,
0.08179719001054764,
0.0034493934363126755,
-0.0010535854380577803,
-0.037420693784952164,
-0.010120121762156487,
-0.00007668783655390143,
-0.0010185451246798038,
-0.041050635278224945,
-0.004941279999911785,
-0.04842454567551613,
0.054886218160390854,
0.00985405221581459,
-0.009977584704756737,
-0.03681253641843796,
-0.015945130959153175,
0.06541494280099869,
0.0014562521828338504,
0.04257102683186531,
0.00003142122659482993,
-0.03027484193444252,
-0.027595147490501404,
-0.0082623902708292,
0.03137712925672531,
0.0424950085580349,
0.0048605091869831085,
0.0030978024005889893,
0.05731884762644768,
0.06533892452716827,
-0.029153551906347275,
0.039606258273124695,
-0.031149068847298622,
0.018976416438817978,
0.00809609703719616,
0.0026891964953392744,
0.015489012002944946,
0.012486234307289124,
-0.004580186679959297,
0.04979289695620537,
-0.010557234287261963,
0.03856099024415016,
-0.010386190377175808,
-0.003240339457988739,
-0.0008932313648983836,
-0.05089518427848816,
0.007335900329053402,
0.02826032042503357,
0.03107304871082306,
-0.04302714392542839,
0.036185372620821,
0.05842113494873047,
0.016971396282315254,
-0.04485161975026131,
0.030578920617699623,
-0.0930481031537056,
0.021494567394256592,
-0.032308369874954224,
0.015241947956383228,
-0.09844550490379333,
0.02407923713326454,
0.011364944279193878,
0.0018945533083751798,
0.04648604243993759,
-0.05192144960165024,
0.10141026973724365,
0.002082226797938347,
0.009013084694743156,
-0.03772477060556412,
-0.050705134868621826,
-0.03474099934101105,
0.025922715663909912,
0.024573365226387978,
0.09654501080513,
-0.004634825512766838,
-0.008480946533381939,
0.013341455720365047,
0.021570587530732155,
-0.007910799235105515,
0.02826032042503357,
-0.012096633203327656,
0.018672337755560875,
0.04694215953350067,
-0.04435748979449272,
-0.02618878334760666,
0.04625798389315605,
-0.0017686455976217985,
-0.04200087860226631,
0.015270455740392208,
0.01316090952605009,
0.036109354346990585,
-0.026055749505758286,
-0.02848837897181511,
-0.005677720531821251,
-0.037952832877635956,
-0.009835047647356987,
-0.027044005692005157,
0.01643925905227661,
0.0018862385768443346,
0.027728183194994926,
0.0054686665534973145,
-0.054544128477573395,
-0.016059160232543945,
-0.04317918419837952,
0.04044247791171074,
0.07449930161237717,
-0.039606258273124695,
0.05146533250808716,
-0.05279567465186119,
-0.05131329223513603,
-0.03607134521007538,
0.013379465788602829,
-0.023699138313531876,
0.002369676250964403,
0.031282104551792145,
0.017589056864380836,
-0.04492763802409172,
0.001564342761412263,
0.025656646117568016,
-0.016353735700249672,
0.014139662496745586,
-0.009226890280842781,
-0.010633254423737526,
-0.009378929622471333,
-0.02425028197467327,
0.056672681123018265,
0.010671264491975307,
-0.024611376225948334,
-0.03456995636224747,
-0.036907561123371124,
0.0020608464255928993,
0.07142049819231033,
0.007578213233500719,
0.015336972661316395,
0.01889089308679104,
-0.04428147152066231,
-0.015926126390695572,
0.003382876282557845,
0.019518055021762848,
0.02774718776345253,
-0.06020759791135788,
0.0370405949652195,
-0.022501828148961067,
0.024174261838197708,
-0.0017805236857384443,
0.06256420910358429,
-0.03953023999929428,
0.019156962633132935,
-0.012932850047945976,
-0.030768970027565956,
-0.02453535608947277,
-0.020088203251361847,
-0.06267823278903961,
-0.009968082420527935,
0.0140731455758214,
-0.08050485700368881,
-0.008618732914328575,
0.01832074671983719,
-0.06457872688770294,
-0.012058624066412449,
-0.07256079465150833,
-0.011707033030688763,
0.00480586988851428,
-0.01772209070622921,
0.027386093512177467,
0.06214609742164612,
0.03200428932905197,
-0.022710882127285004,
0.028013257309794426,
0.012894839979708195,
-0.009892062284052372,
-0.034265875816345215,
0.07214269042015076,
-0.0016439257888123393,
0.012172653339803219,
0.02436431124806404,
0.00008181025623343885,
0.06628917157649994,
0.001844665384851396,
-0.033581700176000595,
-0.004523171577602625,
-0.048804640769958496,
-0.022216755896806717,
-0.03348667547106743,
0.02407923713326454,
0.028355345129966736,
-0.010357682593166828,
0.0015346475411206484,
0.0027770944871008396,
-0.010547732003033161,
0.02607475407421589,
0.006955801974982023,
0.01880537159740925,
-0.008324156515300274,
-0.021741632372140884,
0.0002988821070175618,
-0.03557721525430679,
0.010082111693918705,
-0.07309293746948242,
0.04287510737776756,
0.00678000645712018,
-0.02234978973865509,
0.011754544451832771,
0.02286292240023613,
-0.057698946446180344,
-0.0033472420182079077,
0.026397837325930595,
0.06332440674304962,
0.03487403318285942,
-0.0047274744138121605,
-0.03331562876701355,
0.023699138313531876,
0.006494932342320681,
-0.004965036176145077,
0.00856171827763319,
-0.04910872131586075,
0.04888066276907921,
0.017284978181123734,
0.038351934403181076,
-0.03800984472036362,
0.009364675730466843,
-0.0036774526815861464,
-0.004468532744795084,
0.04492763802409172,
-0.008423931896686554,
0.015584036707878113,
0.0008754142909310758,
0.011288924142718315,
0.029913749545812607,
0.026682911440730095,
-0.022083720192313194,
-0.028165295720100403,
-0.01948004588484764,
0.002231890568509698,
0.014339214190840721,
0.013379465788602829,
0.013170411810278893,
0.0666692703962326,
0.04238097742199898,
0.0017876505153253675,
0.05602651461958885,
0.042989134788513184,
-0.011612008325755596,
0.03607134521007538,
-0.06716340035200119,
0.008186370134353638,
-0.03451294079422951,
0.051503341645002365,
-0.048462554812431335,
0.025010479614138603,
-0.015859607607126236,
0.01607816480100155,
-0.03101603500545025,
-0.0039007605519145727,
-0.011545490473508835,
0.061271872371435165,
0.010386190377175808,
0.030597925186157227,
0.0011711784172803164,
0.015717070549726486,
-0.018273234367370605,
-0.004561181645840406,
-0.10604747384786606,
-0.028621414676308632,
0.011973101645708084,
0.005501925013959408,
0.01902392879128456,
0.07210467755794525,
0.019803129136562347,
0.010186638683080673,
0.01857731305062771,
-0.008694752119481564,
-0.04945081099867821,
-0.021266508847475052,
-0.04614395275712013,
0.029438626021146774,
-0.033011551946401596,
-0.024288291111588478,
-0.03223234787583351,
-0.06267823278903961,
-0.03339165076613426,
0.035520199686288834,
0.03571024909615517,
-0.011003850027918816,
0.001862482400611043,
0.03312557935714722,
-0.00856171827763319,
0.033182594925165176,
-0.0005820257938466966,
-0.00009821684943744913,
-0.06073973327875137,
-0.005425905343145132,
0.05766093730926514,
0.022159740328788757,
0.03593830764293671,
0.01959407515823841,
-0.01735149510204792,
0.03580527380108833,
-0.029837729409337044,
-0.007107841316610575,
0.00894656777381897,
0.002750962506979704,
0.0018981166649609804,
-0.021741632372140884,
-0.03055991604924202,
0.006661225575953722,
-0.04990692809224129,
-0.022083720192313194,
-0.01976511999964714,
-0.010937333106994629,
0.036109354346990585,
0.040480487048625946,
0.07503143697977066,
0.026112765073776245,
0.004898518789559603,
-0.01451025903224945,
0.04800643399357796,
0.08058087527751923,
-0.054088011384010315,
0.054772187024354935,
0.05100921168923378,
-0.08909507840871811,
0.03379075229167938,
0.02578967995941639,
0.01678134687244892,
-0.011155889369547367,
0.025143513455986977,
-0.003953023813664913,
0.026036744937300682,
-0.039834316819906235,
0.007141099777072668,
-0.01215364784002304,
-0.010148628614842892,
0.013740559108555317,
-0.026625897735357285,
-0.034607965499162674,
-0.03635641932487488,
0.00008195872942451388,
-0.001525145024061203,
-0.04143073037266731,
0.0027485869359225035,
-0.08187320828437805,
-0.006276375614106655,
-0.034094832837581635,
-0.030350862070918083,
-0.09692510962486267,
0.021380538120865822,
-0.041278693825006485,
-0.026910971850156784,
0.03578627109527588,
-0.002201007679104805,
0.003062168136239052,
-0.031282104551792145,
-0.05583646520972252,
0.01160250511020422,
-0.030921010300517082,
0.00785378459841013,
-0.025181522592902184,
0.0424950085580349,
0.04200087860226631,
-0.0029101287946105003,
0.016714829951524734,
-0.016505775973200798,
-0.022729888558387756,
0.017218459397554398,
-0.041734810918569565,
-0.02905852720141411,
-0.015184933319687843,
0.006627967115491629,
-0.030483895912766457,
0.02419326640665531,
0.0021962563041597605,
-0.02981872484087944,
0.008737513795495033,
-0.011802056804299355,
-0.04002436622977257,
0.04348326474428177,
0.04264704883098602,
-0.027842212468385696,
0.019213976338505745,
0.020031189545989037,
0.0290205180644989,
-0.04013839736580849,
0.06013157591223717,
0.008827786892652512,
-0.01837776042521,
-0.04469957947731018,
-0.016914380714297295,
-0.00109694036655128,
-0.03580527380108833,
0.034379906952381134,
-0.011640515178442001,
-0.03021782822906971,
0.03567223995923996,
0.037420693784952164,
-0.016771843656897545,
-0.0075972178019583225,
-0.048348523676395416,
0.007578213233500719,
-0.014956874772906303,
-0.006960553117096424,
-0.042304959148168564,
-0.024402320384979248,
-0.027196044102311134,
0.01862482540309429,
0.01987914927303791,
-0.030293846502900124,
0.00419533671811223,
-0.01094683539122343,
-0.043217193335294724,
0.04348326474428177,
0.010994347743690014,
0.01889089308679104,
0.029628675431013107,
-0.022710882127285004,
0.022501828148961067,
-0.0330495610833168,
0.028298329561948776,
0.08453390002250671,
-0.05462015047669411,
-0.010243653319776058,
-0.005758491810411215,
0.002246144227683544,
0.02643584832549095,
0.042761076241731644,
-0.03194727376103401,
-0.007986818440258503,
0.0007483188528567553,
-0.05716680735349655,
-0.02062034234404564,
0.015669558197259903,
0.0119255892932415,
-0.006860777270048857,
-0.010528727434575558,
0.0005627239006571472,
0.012543248943984509,
0.06651723384857178,
0.0470941998064518,
0.014016130939126015,
0.009901564568281174,
-0.0035467937123030424,
-0.009697262197732925,
-0.02436431124806404,
0.05830710381269455,
-0.007373909931629896,
0.0012424468295648694,
0.04074655473232269,
-0.003672701306641102,
-0.02672092244029045,
0.01993616484105587,
0.03654646873474121,
-0.025884704664349556,
0.02124750427901745,
0.017104430124163628,
-0.03147215396165848,
0.07712198048830032,
0.02366112917661667,
-0.04051849618554115,
0.038694024085998535,
0.05180741846561432,
0.023528095334768295,
0.008001072332262993,
0.0706983134150505,
-0.08020077645778656,
0.008371668867766857,
0.015317968092858791,
0.06993811577558517,
0.018824376165866852,
0.011298426426947117,
-0.06058769300580025,
0.01817820966243744,
-0.02113347500562668,
0.009530968964099884,
0.016543785110116005,
0.0049745384603738785,
0.012942352332174778,
0.01860581897199154,
0.05617855116724968,
0.03768676146864891,
0.025599630549550056,
0.00011299020843580365,
-0.061956048011779785,
-0.003874628571793437,
-0.04614395275712013,
-0.05602651461958885,
-0.0798206776380539,
-0.017189953476190567,
-0.0019943290390074253,
0.08422981947660446,
-0.06963403522968292,
-0.02510550245642662,
0.027310075238347054,
0.052529606968164444
]
|
41,435 | pyglove.core.symbolic.flags | allow_repeated_class_registration | Allow repeated class registration, which is useful for testing purposes. | def allow_repeated_class_registration(allow: bool = True) -> None:
"""Allow repeated class registration, which is useful for testing purposes."""
global _ALLOW_REPEATED_CLASS_REGISTRATION
_ALLOW_REPEATED_CLASS_REGISTRATION = allow
| (allow: bool = True) -> NoneType | [
0.049209997057914734,
-0.011134804226458073,
-0.022036070004105568,
0.056316256523132324,
-0.0644567534327507,
0.016180913895368576,
-0.005158708896487951,
-0.0034384443424642086,
0.013011457398533821,
0.008941206149756908,
0.006418151315301657,
-0.026540035381913185,
-0.0017338183242827654,
0.002164405770599842,
-0.03077710047364235,
-0.10555961728096008,
0.029859626665711403,
0.03856729343533516,
-0.05227936804294586,
-0.05551555007696152,
-0.04684124514460564,
0.051979102194309235,
0.021752487868070602,
0.03197815641760826,
-0.0074690766632556915,
0.05948571115732193,
0.010851221159100533,
0.03876746818423271,
0.019567228853702545,
0.017365289852023125,
-0.035598013550043106,
-0.010976331308484077,
0.0018610137049108744,
-0.0011020120000466704,
0.06315561383962631,
-0.06278862059116364,
-0.020951781421899796,
0.08307314664125443,
-0.07299760729074478,
-0.012961412779986858,
0.017381971701979637,
-0.025022033601999283,
0.0005890603642910719,
-0.0510115846991539,
-0.01644781604409218,
0.05071131885051727,
0.08707667142152786,
0.0752662718296051,
-0.028475074097514153,
-0.03843384236097336,
-0.006042820867151022,
-0.02543906681239605,
-0.01662296988070011,
0.05698350816965103,
0.000400091870687902,
0.030510198324918747,
0.027741093188524246,
0.057317137718200684,
-0.021752487868070602,
-0.039868440479040146,
-0.02543906681239605,
-0.035331111401319504,
0.037432961165905,
-0.013370105996727943,
0.024404821917414665,
0.004145316779613495,
-0.06729258596897125,
0.0350642092525959,
0.0243214163929224,
0.03079378232359886,
-0.057584039866924286,
-0.08587561547756195,
0.041736751794815063,
0.00989204365760088,
0.008849458768963814,
-0.01946714147925377,
-0.047074783593416214,
-0.014329284429550171,
0.021485585719347,
-0.011034716852009296,
0.037733227014541626,
-0.015455275774002075,
0.00992540642619133,
0.015947375446558,
-0.01721515879034996,
0.039734989404678345,
-0.034013282507658005,
-0.034263502806425095,
0.017982501536607742,
-0.038667380809783936,
-0.048976458609104156,
0.02784118242561817,
0.05678333342075348,
0.042370643466711044,
0.0054047591984272,
0.054181043058633804,
-0.020401297137141228,
-0.031010638922452927,
-0.016431134194135666,
-0.023770930245518684,
-0.024404821917414665,
-0.0061220573261380196,
-0.047408413141965866,
-0.02512212097644806,
-0.012519356794655323,
-0.0336129292845726,
-0.02457163669168949,
0.006434832699596882,
-0.014554481953382492,
0.05584917590022087,
0.014029019512236118,
0.028975514695048332,
0.02443818561732769,
0.0614207498729229,
0.03513093292713165,
-0.05314679816365242,
0.015622088685631752,
-0.030677011236548424,
0.06422321498394012,
0.027307378128170967,
0.017732281237840652,
0.0007616081275045872,
-0.018633073195815086,
0.019133513793349266,
0.055248647928237915,
0.0012396331876516342,
0.015355187468230724,
0.04684124514460564,
0.0669589564204216,
-0.018366172909736633,
0.0510115846991539,
0.00071625568671152,
-0.04140312224626541,
0.0049001481384038925,
0.022753369063138962,
0.009783614426851273,
-0.003694920102134347,
0.021952662616968155,
-0.022653279826045036,
-0.021068550646305084,
-0.00725638959556818,
0.03079378232359886,
0.050978220999240875,
0.0699949637055397,
0.027290696278214455,
-0.020251166075468063,
-0.07913634926080704,
0.0560159906744957,
-0.024538272991776466,
-0.009274833835661411,
0.037432961165905,
-0.006868547759950161,
0.003373804036527872,
0.0648571103811264,
-0.1237756535410881,
0.0336129292845726,
0.010575979016721249,
0.05398086458444595,
-0.010751133784651756,
-0.030193252488970757,
-0.0042266384698450565,
-0.021635716781020164,
0.004449751693755388,
0.0187164805829525,
0.016005760058760643,
-0.006701734382659197,
-0.02021780237555504,
-0.0025689287576824427,
0.009917065501213074,
0.051979102194309235,
-0.03121081553399563,
-0.0014241706812754273,
0.08874481171369553,
0.002024699468165636,
0.007798533421009779,
0.05504847317934036,
-0.014070723205804825,
-0.026173045858740807,
0.03983507677912712,
0.07833564281463623,
0.031077364459633827,
-0.012802939862012863,
-0.012102323584258556,
-0.0372995100915432,
0.051178399473428726,
0.0216190367937088,
0.039668262004852295,
0.023403940722346306,
0.03423013910651207,
0.010367462411522865,
0.005542380269616842,
0.045506738126277924,
0.02845839224755764,
-0.019433779641985893,
0.05935226008296013,
-0.0012959328014403582,
-0.052479542791843414,
0.028675248846411705,
-0.08407402783632278,
0.07046204060316086,
-0.09561752527952194,
0.01655624434351921,
0.016039123758673668,
-0.0619545541703701,
0.06038650497794151,
0.0337463803589344,
0.03066033124923706,
0.0013292954536154866,
0.019817449152469635,
-0.044572580605745316,
0.004264171235263348,
-0.009833659045398235,
0.002076828619465232,
0.04630744084715843,
0.021402178332209587,
-0.017482060939073563,
0.08307314664125443,
0.005821792874485254,
0.005283819045871496,
-0.01834949105978012,
0.021485585719347,
0.03274549916386604,
-0.06565781682729721,
0.004775037989020348,
-0.026773575693368912,
0.011376684531569481,
-0.01971736177802086,
-0.01612252928316593,
0.0028003824409097433,
-0.0054214405827224255,
0.0404689684510231,
0.07112929970026016,
-0.011835421435534954,
0.0053380336612463,
0.07466574758291245,
-0.02173580601811409,
0.041503213346004486,
0.020651517435908318,
0.03239519149065018,
0.02130209095776081,
0.016856510192155838,
0.03372969850897789,
-0.017432015389204025,
-0.007990369573235512,
-0.00256058806553483,
0.019517185166478157,
-0.04977716505527496,
0.020117715001106262,
0.0350642092525959,
0.010651045478880405,
-0.015622088685631752,
0.012519356794655323,
-0.053480423986911774,
0.002556417603045702,
-0.035397835075855255,
-0.04754186049103737,
-0.01709838956594467,
0.004424729384481907,
-0.01362866722047329,
0.028758656233549118,
0.0038742446340620518,
0.07266398519277573,
0.03856729343533516,
-0.0022519829217344522,
-0.041002772748470306,
0.04327143356204033,
-0.012002235278487206,
0.03129422292113304,
-0.05528201162815094,
0.027090521529316902,
0.01671471819281578,
-0.017815686762332916,
0.00562161672860384,
0.03486403077840805,
-0.01252769771963358,
-0.03826702758669853,
-0.0073189446702599525,
0.06732594966888428,
-0.04750850051641464,
0.0063889590092003345,
-0.0033654633443802595,
-0.03473057970404625,
0.05941898748278618,
-0.015155010856688023,
-0.03806685283780098,
-0.010183967649936676,
0.0014523204881697893,
0.11376684159040451,
-0.0013418064918369055,
-0.04370515048503876,
-0.02348734810948372,
-0.016789784654974937,
0.08213899284601212,
-0.006142909172922373,
0.015180033631622791,
-0.03569810092449188,
-0.02895883284509182,
-0.0018453749362379313,
-0.03656553104519844,
0.035464562475681305,
-0.02387101948261261,
0.05848482996225357,
-0.04640752822160721,
0.0007339796284213662,
0.031127408146858215,
-0.021535629406571388,
0.021068550646305084,
-0.020017625764012337,
0.03261204808950424,
0.04133639857172966,
-0.009158063679933548,
0.0620880052447319,
-0.027941269800066948,
0.05528201162815094,
0.039234548807144165,
0.014312602579593658,
0.024638362228870392,
0.02073492482304573,
0.00043397588888183236,
0.004545669071376324,
-0.0018578859744593501,
0.03943472355604172,
-0.036532167345285416,
-0.005521528422832489,
0.0004524817632045597,
0.028425028547644615,
0.045506738126277924,
-0.00761503865942359,
-0.05868500843644142,
-0.024538272991776466,
-0.07213018089532852,
-0.010117242112755775,
-0.01935037225484848,
0.015563704073429108,
-0.0186497550457716,
0.034330230206251144,
-0.004358003847301006,
-0.04423895478248596,
-0.0007407564553432167,
-0.03349616006016731,
0.0020028052385896444,
-0.0032236718107014894,
-0.06322233378887177,
0.017632192000746727,
-0.06265517324209213,
-0.0005963584408164024,
-0.03719942271709442,
0.07366486638784409,
0.007865259423851967,
0.0015857713297009468,
0.023837655782699585,
-0.015405231155455112,
0.05608271434903145,
0.04473939538002014,
0.08300642669200897,
-0.03411336988210678,
-0.026840301230549812,
0.020084351301193237,
-0.02714056521654129,
-0.056883420795202255,
0.02236969769001007,
-0.037032607942819595,
-0.03833375498652458,
-0.018432896584272385,
0.000758480338845402,
0.0510115846991539,
-0.03122749738395214,
-0.0511450357735157,
0.011835421435534954,
-0.06028641760349274,
-0.03141099214553833,
-0.003976418171077967,
-0.020701561123132706,
-0.033713020384311676,
0.02105187065899372,
0.050477780401706696,
0.005984436254948378,
0.03556464985013008,
-0.03392987698316574,
0.013586963526904583,
0.03813357651233673,
0.02216952107846737,
0.0067726303823292255,
-0.03191143274307251,
0.010884583927690983,
-0.01105973869562149,
0.04247073084115982,
0.014637889340519905,
0.058017753064632416,
0.014095745049417019,
0.03139431029558182,
-0.03071037493646145,
-0.0695946142077446,
-0.051411937922239304,
-0.04347161203622818,
-0.02205275185406208,
-0.07820219546556473,
0.06572453677654266,
-0.014245877042412758,
-0.003363378345966339,
-0.009024613536894321,
0.0023395600728690624,
0.009366581216454506,
-0.006489047314971685,
-0.005721705034375191,
0.08180536329746246,
0.034897394478321075,
-0.029042240232229233,
-0.006009458098560572,
-0.045206472277641296,
-0.03786667436361313,
-0.002065360313281417,
-0.009216448292136192,
-0.038166940212249756,
0.008399062789976597,
0.0010915861930698156,
0.02714056521654129,
-0.017865732312202454,
0.016406113281846046,
0.01598907820880413,
0.017682235687971115,
-0.005225434433668852,
0.001164567074738443,
0.014621207490563393,
-0.014112426899373531,
0.021085232496261597,
0.008386551402509212,
0.019433779641985893,
0.009216448292136192,
-0.011660267598927021,
-0.0756666287779808,
0.02990967035293579,
-0.03656553104519844,
-0.05384741351008415,
0.023637481033802032,
-0.11343321204185486,
0.01309486385434866,
-0.015797242522239685,
-0.015255099162459373,
0.00907465722411871,
-0.03197815641760826,
-0.030243296176195145,
-0.023704206570982933,
-0.003988929092884064,
0.0346638560295105,
0.015755539759993553,
-0.05081140622496605,
0.07273070514202118,
0.024604998528957367,
-0.028741974383592606,
-0.04860946908593178,
-0.027791136875748634,
0.00032685030600987375,
-0.02028452791273594,
0.05291325971484184,
-0.025338977575302124,
-0.020151076838374138,
-0.08060430735349655,
0.014095745049417019,
-0.025555836036801338,
-0.016906553879380226,
0.0037908379454165697,
-0.008841117843985558,
0.025539154186844826,
-0.04453921690583229,
0.017932455986738205,
0.04373851418495178,
-0.014721295796334743,
0.013862206600606441,
0.007577505428344011,
0.08494146168231964,
-0.037900038063526154,
0.05848482996225357,
-0.07973688095808029,
-0.07206345349550247,
0.011576860211789608,
0.04437240585684776,
0.03486403077840805,
0.015446934849023819,
-0.024538272991776466,
0.009133041836321354,
0.039167821407318115,
0.05705023556947708,
0.0008491852204315364,
0.0009956683497875929,
-0.04156993702054024,
0.010542616248130798,
-0.06966134160757065,
-0.0074315438978374004,
0.01903342641890049,
-0.04981052502989769,
-0.04063577950000763,
-0.006735097151249647,
0.07199672609567642,
-0.016914894804358482,
-0.0035510435700416565,
-0.00227700499817729,
0.027924587950110435,
-0.022636599838733673,
-0.027357421815395355,
-0.0083698695525527,
-0.01539689116179943,
-0.050344329327344894,
0.020835012197494507,
0.044439129531383514,
-0.04780876263976097,
-0.014612867496907711,
-0.01928364671766758,
-0.03569810092449188,
0.042937807738780975,
0.00048688706010580063,
0.002612717216834426,
0.01998426392674446,
0.04654097929596901,
0.07953669875860214,
-0.05534873530268669,
-0.02185257524251938,
-0.06218809261918068,
-0.006101205479353666,
0.016456156969070435,
0.028241533786058426,
-0.047708675265312195,
0.05921880900859833,
0.02298690751194954,
0.026723530143499374,
0.012043938040733337,
0.03167789429426193,
0.02305363304913044,
0.028675248846411705,
0.036899156868457794,
0.012511016800999641,
0.00833650678396225,
-0.027674367651343346,
0.005367225967347622,
0.007264730054885149,
-0.02752423658967018,
0.0351976603269577,
-0.011635244823992252,
0.05294661968946457,
0.024471547454595566,
-0.006622497923672199,
-0.005759237799793482,
0.024288052693009377,
-0.014070723205804825,
0.0066558606922626495,
0.02041797898709774,
-0.006401469931006432,
-0.026773575693368912,
-0.02482185699045658,
-0.053547151386737823,
0.030443472787737846,
0.005934392102062702,
-0.013044820167124271,
-0.0507446825504303,
0.042937807738780975,
-0.04437240585684776,
0.03733287379145622,
0.04083595797419548,
0.008549194782972336,
0.0458737276494503,
-0.014329284429550171,
-0.02989298850297928,
0.021135276183485985,
-0.039801713079214096,
-0.03104400262236595,
-0.09014604240655899,
-0.029626086354255676,
0.03946808725595474,
-0.02550579234957695,
0.0005447504809126258,
0.011218211613595486,
-0.04156993702054024,
0.011443410068750381,
0.009024613536894321,
-0.038033489137887955,
0.06135402247309685,
0.001305315992794931,
0.04647425562143326,
-0.020835012197494507,
-0.06205464154481888,
-0.02970949374139309,
0.034263502806425095,
-0.041936926543712616,
-0.030393429100513458,
-0.02595618925988674,
-0.03513093292713165,
0.04203701391816139,
-0.019000062718987465,
-0.016439475119113922,
-0.04700805991888046,
-0.019700679928064346,
0.07259725779294968,
0.05634961649775505,
-0.04317134618759155,
-0.011301618069410324,
0.04684124514460564,
-0.002827489748597145,
0.0187832061201334,
0.0168064646422863,
0.016689695417881012,
0.044072140008211136,
0.053046710789203644,
0.03776658698916435,
-0.06886063516139984,
0.039367999881505966,
-0.003346696961671114,
-0.04360506311058998,
-0.048976458609104156,
0.04340488463640213,
0.01206061989068985,
-0.049276724457740784,
-0.010325758717954159,
0.03599836304783821,
-0.03830039128661156,
-0.030310021713376045,
-0.0007720339926891029,
-0.07306433469057083,
0.00708123529329896,
-0.024171283468604088,
-0.00590519979596138,
-0.05057786777615547,
0.012819621711969376,
-0.019383734092116356,
-0.03459713235497475,
-0.015997419133782387,
-0.014304261654615402,
-0.0457402765750885,
-0.022069433704018593,
0.0406024195253849,
0.01985081285238266,
-0.001124948845244944,
-0.00957509782165289,
0.02261991798877716,
-0.04844265431165695,
0.027090521529316902,
-0.014888109639286995,
-0.028491754084825516,
0.028308259323239326,
0.016522882506251335,
-0.006818504072725773,
-0.026606760919094086,
-0.0321616530418396,
-0.02789122611284256,
0.05031096562743187,
-0.04340488463640213,
-0.041803475469350815,
-0.0018933338578790426,
-0.0345304049551487,
0.009908724576234818,
-0.039801713079214096,
-0.01789909414947033,
0.03569810092449188,
0.0009748166776262224,
0.01237756572663784,
-0.019200239330530167,
-0.014370987191796303,
-0.055248647928237915,
0.014712954871356487,
0.042937807738780975,
-0.021635716781020164,
0.0027857862878590822,
0.019950900226831436,
0.0266901683062315,
-0.03836711868643761,
-0.029225734993815422,
0.03309580683708191,
0.030360067263245583,
-0.039801713079214096,
-0.04370515048503876,
-0.00779019296169281,
-0.0560159906744957,
-0.02518884651362896,
0.02940922975540161,
-0.04487284645438194,
-0.010851221159100533,
0.007844407111406326,
-0.05811784043908119,
0.013778799213469028,
-0.03663225471973419,
-0.03015989065170288,
-0.024721767753362656,
-0.022770049050450325,
-0.0026585909072309732,
-0.043304797261953354,
-0.032378509640693665,
0.049843888729810715,
-0.008157182484865189,
-0.02437146008014679,
0.028441710397601128,
-0.009950428269803524,
0.00764840142801404,
0.01948382332921028,
0.051845651119947433,
0.05434785410761833,
-0.0007245963788591325,
0.05227936804294586,
-0.016406113281846046,
-0.020067669451236725,
-0.017073366791009903,
-0.009082998149096966,
-0.02373756840825081,
-0.01259442325681448,
-0.020017625764012337,
-0.0007960133953019977,
-0.029742855578660965,
0.07059549540281296,
-0.036098454147577286,
0.026239771395921707,
0.019066788256168365,
-0.02563924342393875,
0.02261991798877716,
0.03896764665842056,
0.02977621927857399,
-0.0017213072860613465,
-0.05201246589422226,
-0.0479755774140358,
0.05448130518198013,
-0.034080009907484055,
0.020868375897407532,
0.023887701332569122,
0.004962703213095665,
0.058451469987630844,
-0.029876306653022766,
0.0007063511293381453,
-0.02764100581407547,
0.016973279416561127,
0.004391366615891457,
-0.01281128078699112,
0.03261204808950424,
-0.005342204123735428,
0.05471484363079071,
-0.002612717216834426,
-0.1283797025680542,
0.07426539063453674,
-0.007352307438850403,
-0.009883702732622623,
0.035531286150217056,
0.03956817463040352,
-0.035531286150217056,
0.012886347249150276,
-0.009500031359493732,
-0.07213018089532852,
0.01758214831352234,
0.041369762271642685,
-0.05988606438040733,
-0.031811345368623734,
0.023137040436267853,
0.06272189319133759,
-0.0018432897049933672,
-0.028475074097514153,
-0.004537328612059355,
0.008253100328147411,
0.0106760673224926,
-0.008849458768963814,
0.03616517782211304,
0.017365289852023125,
-0.05501510947942734,
0.023704206570982933,
-0.02909228391945362,
-0.07706785947084427,
-0.022336333990097046,
-0.014070723205804825,
-0.028975514695048332,
-0.016748080030083656,
0.022886820137500763,
0.009508372284471989,
0.0690608099102974,
-0.0021195746958255768
]
|
41,436 | pyglove.core.symbolic.flags | allow_writable_accessors | Returns a context manager that makes accessor writable in scope.
This function is thread-safe and can be nested. In the nested use case, the
writable flag of immediate parent context is effective.
Example::
sd1 = pg.Dict()
sd2 = pg.Dict(accessor_writable=False)
with pg.allow_writable_accessors(False):
sd1.a = 2 # NOT OK
sd2.a = 2 # NOT OK
with pg.allow_writable_accessors(True):
sd1.a = 2 # OK
sd2.a = 2 # OK
with pg.allow_writable_accessors(None):
sd1.a = 1 # OK
sd2.a = 1 # NOT OK
Args:
writable: If True, allow write access with accessors (__setattr__,
__setitem__) for all symbolic values in scope.
If False, disallow write access via accessors for all symbolic values
in scope, even if individual objects allow so.
If None, honor object-level `accessor_writable` flag.
Returns:
A context manager that allows/disallows writable accessors of all
symbolic values in scope. After leaving the scope, the
`accessor_writable` flag of individual objects will remain intact.
| def allow_writable_accessors(
writable: Optional[bool] = True) -> ContextManager[None]:
"""Returns a context manager that makes accessor writable in scope.
This function is thread-safe and can be nested. In the nested use case, the
writable flag of immediate parent context is effective.
Example::
sd1 = pg.Dict()
sd2 = pg.Dict(accessor_writable=False)
with pg.allow_writable_accessors(False):
sd1.a = 2 # NOT OK
sd2.a = 2 # NOT OK
with pg.allow_writable_accessors(True):
sd1.a = 2 # OK
sd2.a = 2 # OK
with pg.allow_writable_accessors(None):
sd1.a = 1 # OK
sd2.a = 1 # NOT OK
Args:
writable: If True, allow write access with accessors (__setattr__,
__setitem__) for all symbolic values in scope.
If False, disallow write access via accessors for all symbolic values
in scope, even if individual objects allow so.
If None, honor object-level `accessor_writable` flag.
Returns:
A context manager that allows/disallows writable accessors of all
symbolic values in scope. After leaving the scope, the
`accessor_writable` flag of individual objects will remain intact.
"""
return thread_local.thread_local_value_scope(
_TLS_ACCESSOR_WRITABLE, writable, None
)
| (writable: Optional[bool] = True) -> ContextManager[NoneType] | [
0.030288878828287125,
0.012569884769618511,
-0.042593736201524734,
0.027733255177736282,
0.02521549165248871,
0.02046392485499382,
-0.0152769535779953,
0.04963590204715729,
0.02239483967423439,
-0.04770498350262642,
0.009465274401009083,
0.012513093650341034,
0.036270931363105774,
0.05304339900612831,
-0.009214445017278194,
0.02549945004284382,
-0.0277711171656847,
-0.002031484618782997,
0.024742228910326958,
0.012598280794918537,
0.024287894368171692,
-0.017747391015291214,
0.061827175319194794,
-0.035002585500478745,
-0.07943258434534073,
0.01995280012488365,
-0.02036927081644535,
0.060464177280664444,
0.06784708797931671,
-0.0055892448872327805,
0.03352600336074829,
-0.0008146052132360637,
-0.026938172057271004,
-0.00926650408655405,
0.04054923728108406,
0.007676337845623493,
-0.037747517228126526,
0.10972146689891815,
0.02913411520421505,
-0.03488900139927864,
-0.05709453672170639,
0.020009590312838554,
0.00469004362821579,
-0.03483221307396889,
-0.008864229544997215,
-0.008878427557647228,
0.03369637951254845,
0.043767429888248444,
0.052021149545907974,
-0.07276903092861176,
0.10131630301475525,
0.026957102119922638,
-0.0026550095062702894,
-0.00019477760361041874,
0.010146774351596832,
-0.011765336617827415,
0.018031349405646324,
0.052021149545907974,
0.058949731290340424,
-0.06076706573367119,
-0.009611986577510834,
0.018731778487563133,
0.000665527128148824,
-0.015239092521369457,
0.0016292104264721274,
-0.04463823512196541,
-0.03899693116545677,
-0.004817824810743332,
0.028925880789756775,
0.04418390244245529,
-0.0389590710401535,
-0.03975415602326393,
-0.005362078081816435,
-0.00971137173473835,
-0.07174678146839142,
0.004931407980620861,
-0.06686270236968994,
-0.01454812753945589,
0.0029484331607818604,
-0.005073387175798416,
0.011443517170846462,
-0.034699697047472,
-0.013866627588868141,
0.020161034539341927,
-0.005101783201098442,
0.063947394490242,
0.006900185253471136,
0.007586417719721794,
-0.00426883902400732,
-0.009900677017867565,
0.010989184491336346,
0.06599189341068268,
0.025669826194643974,
-0.0272978525608778,
-0.017378244549036026,
-0.0011346498504281044,
-0.03121647611260414,
0.043729569762945175,
-0.06534826010465622,
0.024212172254920006,
-0.020520715042948723,
0.024079659953713417,
0.035759806632995605,
0.057170260697603226,
0.023682117462158203,
0.0043989866971969604,
-0.01133939903229475,
-0.010137309320271015,
0.05058242753148079,
-0.07276903092861176,
-0.034964725375175476,
-0.006890720222145319,
-0.007567487191408873,
-0.025480519980192184,
-0.028736574575304985,
0.06171359121799469,
-0.0647803395986557,
-0.08768630772829056,
-0.0005034343339502811,
-0.06591617316007614,
-0.008793240413069725,
0.019223973155021667,
0.013241919688880444,
-0.029437005519866943,
0.04709920659661293,
0.03214407339692116,
-0.014197912067174911,
0.027638603001832962,
0.042783040553331375,
0.019725631922483444,
-0.03398033604025841,
0.011027045547962189,
0.051453232765197754,
0.045849792659282684,
0.036138419061899185,
-0.014197912067174911,
-0.014926738105714321,
0.035059377551078796,
-0.023303506895899773,
-0.022981686517596245,
-0.02356853522360325,
-0.07405631244182587,
-0.026086296886205673,
0.007340320851653814,
0.011964106932282448,
-0.02701389417052269,
-0.014841550961136818,
0.06796067208051682,
0.02843368612229824,
0.0028135529719293118,
0.027695395052433014,
0.03899693116545677,
0.0036062696017324924,
0.06841500848531723,
-0.06341733783483505,
0.04497898742556572,
-0.011661218479275703,
0.010071052238345146,
0.026616353541612625,
0.012058760039508343,
-0.01706589013338089,
0.020426062867045403,
-0.06663553416728973,
-0.046644873917102814,
0.03685778006911278,
0.027733255177736282,
0.007397112436592579,
-0.0915481373667717,
0.03636558726429939,
0.03195476904511452,
-0.0011541720014065504,
0.007430240511894226,
0.024439340457320213,
0.020350340753793716,
0.03201156109571457,
-0.019167181104421616,
-0.01164228841662407,
-0.003142471192404628,
-0.026105228811502457,
-0.02381463162600994,
0.024439340457320213,
-0.022603075951337814,
-0.04119287431240082,
-0.005168040283024311,
0.05747314915060997,
0.018078675493597984,
0.004850953351706266,
0.025310145691037178,
0.03888335078954697,
0.02597271464765072,
-0.019593119621276855,
-0.02021782658994198,
0.014055932871997356,
-0.04319951310753822,
-0.007515428122133017,
0.041041430085897446,
-0.031083961948752403,
-0.03780430927872658,
-0.05436853691935539,
0.08329442143440247,
-0.020066382363438606,
0.016942841932177544,
-0.028490476310253143,
0.011329934000968933,
-0.0022148743737488985,
0.0018504612380638719,
-0.01734038256108761,
-0.0031188081484287977,
-0.017946161329746246,
0.015873266384005547,
-0.02356853522360325,
-0.0033791030291467905,
0.0034548253752291203,
0.06341733783483505,
0.050847455859184265,
0.05645089969038963,
-0.006251813843846321,
0.02780897729098797,
0.012049295008182526,
0.04876509681344032,
0.006564168259501457,
0.02669207565486431,
-0.005570314358919859,
-0.0021852953359484673,
0.03252268582582474,
-0.050809595733881,
-0.00766213983297348,
-0.016819793730974197,
-0.014926738105714321,
-0.06315231323242188,
0.030856795608997345,
0.03239016979932785,
-0.03299594670534134,
-0.0310271717607975,
0.03729318454861641,
-0.09896891564130783,
0.02159975655376911,
-0.019649909809231758,
-0.01753915473818779,
0.022830242291092873,
-0.012655072845518589,
0.025631964206695557,
0.0776909738779068,
0.030421392992138863,
-0.0056271059438586235,
0.035343337804079056,
0.04107929393649101,
0.01551358588039875,
0.07394272834062576,
0.01824904978275299,
-0.012049295008182526,
-0.015759682282805443,
-0.07844819873571396,
-0.00005091282582725398,
-0.027752185240387917,
-0.016942841932177544,
-0.04232870787382126,
0.044297486543655396,
-0.047212790697813034,
-0.004841487854719162,
-0.006554702762514353,
0.02394714578986168,
-0.06534826010465622,
0.007865643128752708,
0.04690990224480629,
-0.038921210914850235,
0.057170260697603226,
-0.05274051055312157,
-0.06576473265886307,
-0.009446344338357449,
-0.1396317332983017,
0.035191893577575684,
0.03687671199440956,
0.031046101823449135,
-0.06413669884204865,
0.007827782072126865,
0.04107929393649101,
0.05535292625427246,
-0.019365951418876648,
0.013005287386476994,
-0.014055932871997356,
0.02356853522360325,
-0.010355010628700256,
0.022565215826034546,
-0.0389590710401535,
-0.006204487755894661,
-0.03812612593173981,
0.045281875878572464,
0.007841980084776878,
-0.018779104575514793,
0.0019604950211942196,
0.021050771698355675,
0.03663061186671257,
-0.005608175415545702,
0.10040763765573502,
-0.03129220008850098,
-0.07242828607559204,
-0.014103259891271591,
0.01913878507912159,
0.0005528312176465988,
0.022640937939286232,
0.05633731558918953,
-0.006303872913122177,
0.10154347121715546,
0.0536491759121418,
-0.030326740816235542,
0.04709920659661293,
-0.02027461864054203,
0.018078675493597984,
0.07015661895275116,
0.03570301830768585,
-0.00355421076528728,
0.050241678953170776,
0.050620291382074356,
0.08390019834041595,
-0.04846220836043358,
0.007382914423942566,
-0.011443517170846462,
-0.0012872773222625256,
0.06292514503002167,
-0.05607228726148605,
-0.014955134131014347,
0.042631596326828,
-0.05997198075056076,
-0.022281257435679436,
-0.014604918658733368,
0.014652245678007603,
0.03964057192206383,
0.002269299700856209,
0.04081426560878754,
-0.08261291682720184,
-0.024458270519971848,
0.001864659134298563,
0.0024562387261539698,
-0.01539053674787283,
0.022319117560982704,
-0.015381071716547012,
0.005414137151092291,
-0.004193116910755634,
-0.04880295693874359,
0.011045975610613823,
0.046644873917102814,
0.001738061080686748,
-0.06708987057209015,
-0.039678432047367096,
0.0018788570305332541,
0.0692858099937439,
0.05463356524705887,
0.018656056374311447,
-0.01622348092496395,
0.01167068351060152,
0.06553756445646286,
-0.023265644907951355,
0.02371997945010662,
-0.024969395250082016,
-0.06042631343007088,
0.0074775670655071735,
0.04119287431240082,
-0.021372590214014053,
0.006407991051673889,
0.02106970176100731,
0.01679139770567417,
0.007449171505868435,
-0.008480885997414589,
-0.019365951418876648,
-0.033639587461948395,
-0.016583161428570747,
-0.06966442614793777,
-0.0062092202715575695,
-0.08708053082227707,
0.0008004073170013726,
-0.05819251015782356,
0.03229551762342453,
0.052967678755521774,
0.05001451075077057,
0.04043565317988396,
-0.06106995418667793,
0.0011772435391321778,
0.0005013637710362673,
0.06292514503002167,
0.04039779305458069,
-0.043123792856931686,
0.07708519697189331,
-0.0038239711429923773,
-0.012541488744318485,
-0.046796318143606186,
-0.013062079437077045,
0.0017569916089996696,
-0.018561404198408127,
0.04301020875573158,
-0.01843835599720478,
0.004368224181234837,
-0.00301705626770854,
0.019063062965869904,
-0.023966075852513313,
0.034207504242658615,
-0.01861819624900818,
0.012995822355151176,
0.029531657695770264,
-0.04172293096780777,
0.04653128981590271,
-0.002830117242410779,
-0.032030489295721054,
-0.07587364315986633,
-0.04460037499666214,
0.028869088739156723,
0.027089616283774376,
-0.006956976838409901,
0.018646592274308205,
-0.02650276944041252,
-0.042404431849718094,
-0.014680641703307629,
0.013166197575628757,
0.028017213568091393,
0.01753915473818779,
-0.047780707478523254,
0.07121672481298447,
-0.004711340647190809,
0.04206367954611778,
0.06773350387811661,
0.025310145691037178,
-0.06481820344924927,
-0.023322436958551407,
0.014055932871997356,
-0.010336080566048622,
-0.04963590204715729,
-0.044486790895462036,
-0.0038594657089561224,
0.011661218479275703,
0.011926245875656605,
0.0075580221600830555,
-0.03697136417031288,
0.014292565174400806,
-0.032655198127031326,
-0.03380995988845825,
-0.039299819618463516,
-0.010184635408222675,
0.017690598964691162,
-0.0002815919287968427,
0.04982520639896393,
0.04793215170502663,
-0.024477200582623482,
0.00755328917875886,
-0.002005455084145069,
0.0115760313346982,
-0.012058760039508343,
0.011102767661213875,
0.08511175215244293,
0.05425495654344559,
-0.0024799020029604435,
0.0555422343313694,
0.03998132050037384,
0.03555157408118248,
0.048916541039943695,
-0.03598697483539581,
-0.007785188499838114,
-0.0010956055484712124,
-0.047591403126716614,
-0.015409467741847038,
0.04501684755086899,
0.050090234726667404,
-0.018892688676714897,
0.004839121829718351,
0.002979195211082697,
-0.05501217767596245,
0.01421684306114912,
0.022319117560982704,
-0.009484205394983292,
0.0075958832167088985,
-0.012162878178060055,
0.03511616960167885,
-0.03681991994380951,
-0.006639890372753143,
-0.07329908758401871,
-0.0075296261347830296,
-0.002877443563193083,
-0.04702348634600639,
-0.0370660163462162,
-0.02790362946689129,
-0.043350957334041595,
-0.029361283406615257,
0.015825940296053886,
0.03483221307396889,
-0.0079650292173028,
-0.03388568386435509,
-0.07890252768993378,
0.011415121145546436,
-0.012645606882870197,
0.003750615054741502,
0.0034666568972170353,
-0.01325138472020626,
0.003639398142695427,
-0.001788936904631555,
-0.061448562890291214,
-0.027941491454839706,
-0.002425476675853133,
0.0016422251937910914,
0.02625667303800583,
0.022319117560982704,
-0.06303872913122177,
-0.009682975709438324,
0.009299632161855698,
0.01947953552007675,
0.021524034440517426,
0.05039312317967415,
-0.018589800223708153,
0.0008240704773925245,
-0.03322311490774155,
0.0030241552740335464,
-0.029077325016260147,
0.025991644710302353,
-0.00598678644746542,
-0.013658391311764717,
-0.01494566909968853,
-0.038069333881139755,
-0.021467242389917374,
-0.005134911742061377,
-0.007075292989611626,
-0.004810725804418325,
-0.039678432047367096,
0.04070068150758743,
-0.019763493910431862,
0.03638451546430588,
-0.026862449944019318,
-0.0007181777036748827,
-0.03322311490774155,
0.010421267710626125,
0.03271199017763138,
0.012437371537089348,
-0.017501292750239372,
0.03755820915102959,
-0.027278922498226166,
-0.04285876452922821,
-0.019081994891166687,
-0.008443024940788746,
0.015551446937024593,
0.04702348634600639,
-0.037312112748622894,
-0.004200215917080641,
0.04100356996059418,
0.05611014738678932,
0.05561795458197594,
0.033260975033044815,
-0.032655198127031326,
-0.002574554644525051,
-0.028074005618691444,
-0.021315798163414,
-0.07265544682741165,
0.08276436477899551,
-0.0383722223341465,
0.01720787025988102,
0.012030364014208317,
0.0370660163462162,
0.014169516041874886,
0.02084253542125225,
-0.026370255276560783,
0.03839115425944328,
-0.016109898686408997,
0.0030501848086714745,
0.025196561589837074,
0.007061094976961613,
-0.01393288467079401,
-0.019593119621276855,
-0.01867498643696308,
0.022091951221227646,
0.003528181230649352,
0.014585988596081734,
0.041457902640104294,
0.028982670977711678,
-0.03174653276801109,
0.011415121145546436,
0.0063275364227592945,
0.027354644611477852,
-0.025007255375385284,
-0.021770132705569267,
0.018353167921304703,
-0.02122114598751068,
0.011594961397349834,
0.003005224745720625,
-0.020634299144148827,
0.030118504539132118,
-0.025896992534399033,
-0.0721253976225853,
-0.010487524792551994,
0.02799828350543976,
-0.027127478271722794,
0.02998599037528038,
0.07534358650445938,
-0.005040258634835482,
0.013374432921409607,
-0.022186603397130966,
0.020255688577890396,
0.037690725177526474,
-0.07386700809001923,
0.04823504015803337,
-0.0030004922300577164,
-0.09079091250896454,
0.015551446937024593,
0.04395673796534538,
0.020426062867045403,
-0.042555876076221466,
0.015456793829798698,
-0.05599656701087952,
-0.014737432822585106,
-0.03676312789320946,
-0.02021782658994198,
0.028130797669291496,
0.006578365806490183,
-0.01494566909968853,
-0.04077640548348427,
-0.0564887598156929,
-0.01698070392012596,
0.031897976994514465,
-0.006942779291421175,
0.007288261782377958,
0.013194592669606209,
-0.07133030891418457,
0.01669674552977085,
-0.016289737075567245,
-0.06296300888061523,
-0.03097037971019745,
-0.008495084010064602,
-0.033450279384851456,
-0.028641922399401665,
-0.014178982004523277,
-0.03865618258714676,
0.08844352513551712,
-0.0061051021330058575,
-0.05349773168563843,
0.023795701563358307,
-0.03691457211971283,
0.005319484509527683,
0.008125938475131989,
-0.00789877213537693,
0.040662821382284164,
0.007823050022125244,
0.030667491257190704,
0.01565556414425373,
0.01993386819958687,
0.03621414303779602,
-0.025064047425985336,
0.004403719212859869,
0.042025819420814514,
-0.0166399534791708,
-0.06697628647089005,
0.011727475561201572,
0.045660484582185745,
0.047402095049619675,
0.010506454855203629,
-0.01230485737323761,
-0.058343954384326935,
0.010885066352784634,
-0.002472802996635437,
-0.09275969117879868,
0.005073387175798416,
-0.006389060523360968,
-0.01298635732382536,
-0.03823971003293991,
0.005892133805900812,
0.001141748740337789,
-0.024306826293468475,
-0.0166399534791708,
-0.026521699503064156,
0.049900930374860764,
-0.009957469068467617,
0.012408975511789322,
-0.057965341955423355,
0.021524034440517426,
0.08102275431156158,
0.06012342497706413,
0.03687671199440956,
0.0159868486225605,
-0.034018196165561676,
-0.005343147553503513,
-0.008395698852837086,
-0.014491335488855839,
0.025291213765740395,
-0.03174653276801109,
-0.0013298711273819208,
0.010790413245558739,
0.02097504958510399,
0.10722263157367706,
-0.020861465483903885,
0.007652674801647663,
0.0061051021330058575,
0.008097542449831963,
0.03763393312692642,
0.01564610004425049,
0.058911871165037155,
-0.06602975726127625,
-0.017671668902039528,
-0.016800863668322563,
0.04308593273162842,
0.05520148202776909,
-0.07776670157909393,
-0.05455784499645233,
-0.0012014983221888542,
-0.004200215917080641,
0.018495146185159683,
0.006450584623962641,
-0.037842169404029846,
0.04350240156054497,
0.019649909809231758,
-0.053724899888038635,
-0.009682975709438324,
-0.030610699206590652,
9.382084158460202e-7,
-0.015769148245453835,
0.07326122373342514,
-0.06852859258651733,
-0.024477200582623482,
0.04702348634600639,
0.00735451839864254,
-0.028320102021098137,
0.027411436662077904,
-0.06674911826848984,
-0.018466752022504807,
0.03017529658973217,
0.04414604231715202,
-0.002931868890300393,
0.01679139770567417,
0.047591403126716614,
0.01682925783097744,
-0.04497898742556572,
-0.030989309772849083,
0.009929073043167591,
0.009739767760038376,
-0.026578491553664207,
-0.00583534175530076,
-0.02116435393691063,
0.058571118861436844,
-0.022054091095924377,
-0.033166322857141495,
-0.011632822453975677,
0.025915922597050667,
-0.0031282734125852585,
-0.012901169247925282,
-0.0038641984574496746,
-0.04266946017742157,
0.056413039565086365,
0.008305778726935387,
0.049900930374860764,
-0.007785188499838114,
-0.0072835288010537624,
-0.039678432047367096,
-0.00530528649687767,
-0.03267413005232811,
-0.005764352157711983,
0.01421684306114912,
0.04403245821595192,
0.039148375391960144,
-0.009176583960652351,
0.02239483967423439,
-0.00482019130140543,
0.03540012612938881,
0.011945176869630814,
-0.0676199197769165,
-0.016062570735812187,
-0.05213473364710808,
0.0003286224964540452,
-0.07220111787319183,
0.05171826109290123,
-0.044524651020765305,
0.029474865645170212,
-0.01791776530444622,
-0.014869946986436844,
-0.02122114598751068,
0.006204487755894661
]
|
41,437 | pyglove.core.symbolic.class_wrapper | apply_wrappers | Context manager for swapping user classes with their class wrappers.
This helper method is a handy tool to swap user classes with their wrappers
within a code block, without modifying exisiting code.
For example::
def foo():
return A()
APrime = pg.wrap(A)
with pg.apply_wrappers([APrime]):
# Direct creation of an instance of `A` will be detoured to `APrime`.
assert isinstance(A(), APrime)
Indirect creation of an instance of `A` will be detoured too.
assert isinstance(foo(), APrime)
# Out of the scope, direct/indirect creation `of` A will be restored.
assert not isinstance(A(), APrime)
assert not isinstance(foo(), APrime)
``pg.apply_wrappers`` can be nested, under which the inner context will apply
the wrappers from the outter context. ``pg.apply_wrappers`` is NOT
thread-safe.
Args:
wrapper_classes: Wrapper classes to use. If None, sets it to all registered
wrapper classes.
where: An optional filter function in signature (wrapper_class) -> bool.
If not None, only filtered `wrapper_class` will be swapped.
Returns:
A context manager that detours the original classes to the wrapper classes.
| def apply_wrappers(
wrapper_classes: Optional[Sequence[Type['ClassWrapper']]] = None,
where: Optional[Callable[[Type['ClassWrapper']], bool]] = None):
"""Context manager for swapping user classes with their class wrappers.
This helper method is a handy tool to swap user classes with their wrappers
within a code block, without modifying exisiting code.
For example::
def foo():
return A()
APrime = pg.wrap(A)
with pg.apply_wrappers([APrime]):
# Direct creation of an instance of `A` will be detoured to `APrime`.
assert isinstance(A(), APrime)
Indirect creation of an instance of `A` will be detoured too.
assert isinstance(foo(), APrime)
# Out of the scope, direct/indirect creation `of` A will be restored.
assert not isinstance(A(), APrime)
assert not isinstance(foo(), APrime)
``pg.apply_wrappers`` can be nested, under which the inner context will apply
the wrappers from the outter context. ``pg.apply_wrappers`` is NOT
thread-safe.
Args:
wrapper_classes: Wrapper classes to use. If None, sets it to all registered
wrapper classes.
where: An optional filter function in signature (wrapper_class) -> bool.
If not None, only filtered `wrapper_class` will be swapped.
Returns:
A context manager that detours the original classes to the wrapper classes.
"""
if not wrapper_classes:
wrapper_classes = []
for _, c in object_utils.JSONConvertible.registered_types():
if (issubclass(c, ClassWrapper)
and c not in (ClassWrapper, _SubclassedWrapperBase)
and (not where or where(c))
and c.sym_wrapped_cls is not None):
wrapper_classes.append(c)
return detouring.detour([(c.sym_wrapped_cls, c) for c in wrapper_classes])
| (wrapper_classes: Optional[Sequence[Type[pyglove.core.symbolic.class_wrapper.ClassWrapper]]] = None, where: Optional[Callable[[Type[pyglove.core.symbolic.class_wrapper.ClassWrapper]], bool]] = None) | [
0.03574267029762268,
-0.030893636867403984,
0.00648747431114316,
0.012548764236271381,
-0.03036327473819256,
0.0031206172425299883,
-0.038508132100105286,
0.06137055903673172,
0.029075250029563904,
0.030192799866199493,
0.0021652537398040295,
-0.008182741701602936,
0.004292624536901712,
0.008703633211553097,
-0.06125691160559654,
-0.012558234855532646,
-0.01900782622396946,
-0.028279704973101616,
0.06095384806394577,
-0.08091822266578674,
0.03725799173116684,
-0.0002693248970899731,
0.02814711444079876,
0.02007802203297615,
-0.029283607378602028,
-0.016914786770939827,
-0.015854060649871826,
0.06197668984532356,
0.03913320228457451,
-0.017255734652280807,
0.02481340616941452,
-0.005928699392825365,
-0.04595215246081352,
-0.02447245828807354,
0.038868021219968796,
-0.03543960303068161,
0.002971452660858631,
0.1001628190279007,
0.06421179324388504,
-0.0047993105836212635,
-0.012245699763298035,
-0.0041032093577086926,
-0.037466347217559814,
-0.011232327669858932,
-0.028279704973101616,
0.03318556398153305,
0.0401560440659523,
-0.014802806079387665,
0.04712652787566185,
-0.01788080483675003,
0.06538616120815277,
-0.07319007813930511,
0.059362757951021194,
0.030571630224585533,
0.0285259447991848,
0.001119918073527515,
-0.025419535115361214,
0.018344873562455177,
0.015939299017190933,
-0.043679170310497284,
-0.00984012521803379,
0.00020302952907513827,
-0.01717996783554554,
0.02225629799067974,
0.02526800148189068,
-0.006416443735361099,
-0.018089162185788155,
-0.012463527731597424,
-0.015759354457259178,
0.01931089162826538,
-0.053453002125024796,
-0.03333709388971329,
0.025305885821580887,
0.011611158028244972,
-0.009627033025026321,
0.042580559849739075,
-0.010730377398431301,
-0.019528718665242195,
-0.0013720771530643106,
-0.01223622914403677,
0.027181096374988556,
0.00025215913774445653,
-0.04708864539861679,
0.0395120345056057,
0.012652942910790443,
-0.012226758524775505,
0.03252260759472847,
0.00100567692425102,
-0.0066105942241847515,
-0.0076334369368851185,
-0.08584301918745041,
0.00933817494660616,
0.050308708101511,
0.010730377398431301,
-0.01641283743083477,
0.020570503547787666,
-0.04413376748561859,
-0.00419318163767457,
-0.0344357043504715,
0.03593208268284798,
0.07273548096418381,
0.0034118432085961103,
-0.0025050174444913864,
-0.0068852463737130165,
0.037428464740514755,
-0.03362121805548668,
-0.05943852290511131,
-0.051748260855674744,
0.02231312356889248,
-0.02699168212711811,
-0.0655376985669136,
-0.06898505240678787,
-0.06246916949748993,
-0.008357950486242771,
0.017767155542969704,
-0.037068575620651245,
-0.0219721756875515,
0.025343768298625946,
0.016573838889598846,
-0.009077728725969791,
-0.01060725748538971,
-0.017786096781492233,
0.016943199560046196,
0.012293053790926933,
-0.029416197910904884,
0.012103638611733913,
0.0321248359978199,
0.04235326498746872,
0.0022457551676779985,
0.003421314060688019,
0.00749611109495163,
-0.03879225626587868,
-0.05296051874756813,
-0.004976887255907059,
-0.001039416529238224,
0.05284687131643295,
-0.08576725423336029,
0.03792094439268112,
-0.015295286662876606,
0.007865470834076405,
-0.009376057423651218,
0.0016704063164070249,
-0.03420840576291084,
0.01968025043606758,
-0.026802266016602516,
-0.023127609863877296,
0.024623990058898926,
0.024623990058898926,
-0.01530475728213787,
0.006435384973883629,
0.017312560230493546,
-0.01276659220457077,
0.12402914464473724,
0.04489142820239067,
-0.10107200592756271,
0.05182402953505516,
-0.04932374507188797,
0.014831218868494034,
-0.026082487776875496,
-0.005104742478579283,
0.03496606647968292,
-0.012918123975396156,
0.0009725292329676449,
0.007979120127856731,
0.029491962864995003,
0.01721785217523575,
-0.00931449793279171,
-0.021688053384423256,
0.027881933376193047,
0.027862992137670517,
0.04242902994155884,
0.02299501933157444,
0.04223961383104324,
0.01257717702537775,
-0.00785126443952322,
0.03833765909075737,
0.005654046777635813,
-0.09304080158472061,
0.03576160967350006,
-0.006733714137226343,
0.03292037919163704,
0.008637337945401669,
-0.03237107768654823,
0.038583897054195404,
0.0193393025547266,
0.010550432838499546,
0.02915101684629917,
-0.026177195832133293,
0.003534963121637702,
-0.05216497555375099,
0.0077802338637411594,
0.03606467321515083,
0.04197443276643753,
-0.008632603101432323,
0.013325367122888565,
0.0811455175280571,
-0.05947640910744667,
0.0168484915047884,
-0.06262069940567017,
0.04057275876402855,
-0.06807586550712585,
0.019983315840363503,
0.019490836188197136,
-0.04337610676884651,
0.03985298052430153,
-0.014405034482479095,
0.019083593040704727,
-0.05299840494990349,
-0.0122551703825593,
-0.042163848876953125,
0.07012154906988144,
0.02632872760295868,
-0.06890928745269775,
0.009442353621125221,
-0.0022445714566856623,
0.029075250029563904,
0.08637338131666183,
0.018013395369052887,
0.004882179666310549,
0.013855730183422565,
-0.0824335440993309,
0.018164929002523422,
-0.08773717284202576,
0.020248496904969215,
0.021309223026037216,
-0.00985906645655632,
0.02443457581102848,
-0.041065238416194916,
0.03477665036916733,
-0.04481566324830055,
0.013533723540604115,
-0.014149324037134647,
-0.02265407145023346,
-0.012671884149312973,
0.026499202474951744,
-0.07909983396530151,
-0.015039575286209583,
-0.013391662389039993,
-0.0037527908571064472,
0.025457417592406273,
0.030439039692282677,
0.013931496068835258,
-0.003958779852837324,
0.0127855334430933,
-0.009470765478909016,
-0.011914223432540894,
-0.033034030348062515,
-0.05693824216723442,
0.02697274088859558,
0.03062845580279827,
0.0071598985232412815,
-0.02879112772643566,
0.021763818338513374,
-0.01934877410531044,
-0.011383860372006893,
-0.0053651886992156506,
-0.018704762682318687,
-0.06549981236457825,
-0.03333709388971329,
-0.010862967930734158,
-0.005871874745935202,
-0.015314227901399136,
-0.017786096781492233,
0.02523011900484562,
0.011270211078226566,
-0.0245103407651186,
0.0018290416337549686,
-0.0344357043504715,
-0.013221188448369503,
0.023241259157657623,
0.038148242980241776,
0.06523463129997253,
0.006245969794690609,
0.041065238416194916,
-0.025135410949587822,
0.0076618492603302,
-0.005895551294088364,
-0.004427582956850529,
-0.0055119856260716915,
-0.05629422888159752,
0.0028483327478170395,
0.023582205176353455,
-0.014386092312633991,
-0.017255734652280807,
0.01939612813293934,
0.017331501469016075,
-0.03642456233501434,
0.04701288044452667,
0.009489706717431545,
-0.019812840968370438,
0.011791102588176727,
0.009262409061193466,
0.05523350462317467,
-0.04924798011779785,
0.048376668244600296,
0.01221728790551424,
-0.13963696360588074,
0.023222316056489944,
0.02998444437980652,
-0.05731707438826561,
-0.017984984442591667,
-0.007462962996214628,
0.03756105527281761,
0.09182853996753693,
0.037428464740514755,
0.00878413487225771,
0.03680339455604553,
-0.05951429158449173,
-0.024358808994293213,
0.04371705278754234,
0.03153764829039574,
0.021801702678203583,
-0.009224525652825832,
-0.015550997108221054,
0.023923153057694435,
-0.038148242980241776,
0.03701175004243851,
0.0036793923936784267,
-0.040383342653512955,
0.034492526203393936,
-0.00314902956597507,
-0.030154917389154434,
-0.013410603627562523,
0.036727629601955414,
0.004692764487117529,
0.04174713417887688,
-0.033715926110744476,
0.009058787487447262,
0.0018314092885702848,
-0.03254155069589615,
-0.0230329018086195,
0.029700320214033127,
-0.0030732634477317333,
0.009598621167242527,
-0.006378560326993465,
0.04830090329051018,
0.056369997560977936,
-0.003257943317294121,
0.02771146036684513,
-0.03773152828216553,
0.035610079765319824,
-0.00785126443952322,
-0.03165129944682121,
0.0014466594438999891,
-0.09008592367172241,
0.007690261583775282,
-0.03136717528104782,
0.0147933354601264,
-0.007964913733303547,
-0.02225629799067974,
0.0037220108788460493,
-0.03504183143377304,
0.005128419492393732,
0.01646018959581852,
-0.020286379382014275,
-0.02742733620107174,
0.030022326856851578,
-0.020987216383218765,
0.0066816252656280994,
-0.03367804363369942,
0.006004465278238058,
0.018761586397886276,
0.03096940368413925,
0.02335490845143795,
0.005762960761785507,
0.008945138193666935,
0.02812817320227623,
-0.06985636800527573,
-0.02697274088859558,
-0.018401697278022766,
0.025116469711065292,
0.03477665036916733,
0.013827317394316196,
-0.004238167777657509,
-0.005436219274997711,
0.004676190670579672,
-0.05561233311891556,
0.04409588500857353,
-0.05693824216723442,
0.08516111969947815,
0.03481453284621239,
-0.027313686907291412,
0.037466347217559814,
0.0010962410597130656,
0.004638307262212038,
-0.036026790738105774,
0.00282465573400259,
-0.00031904640491120517,
0.03072316385805607,
0.015901414677500725,
-0.03100728616118431,
-0.054248545318841934,
0.0039232647977769375,
0.018335402011871338,
-0.01554152648895979,
-0.006473268382251263,
-0.0467098169028759,
0.05405912920832634,
-0.008566307835280895,
-0.07277335971593857,
0.016517015174031258,
-0.04640674963593483,
0.07106862217187881,
-0.04390646889805794,
0.0017343339277431369,
0.016251834109425545,
-0.004053487442433834,
0.07978172600269318,
-0.0028649065643548965,
0.0015875371173024178,
-0.07178840041160583,
-0.01058831624686718,
0.009792771190404892,
-0.03629197180271149,
-0.006459061987698078,
-0.016715900972485542,
0.01574988290667534,
0.06712878495454788,
-0.00043032789835706353,
0.010105307213962078,
0.03477665036916733,
-0.005848197732120752,
0.007912824861705303,
0.013609490357339382,
-0.0036864953581243753,
0.009451824240386486,
0.0037883061449974775,
-0.04898279905319214,
-0.001638442394323647,
0.012008930556476116,
0.00576769607141614,
0.003539698664098978,
0.015257403254508972,
-0.009589149616658688,
0.01148803811520338,
-0.0037788355257362127,
0.008694162592291832,
0.02153652161359787,
-0.046179451048374176,
0.043300338089466095,
0.009342909790575504,
0.013439016416668892,
-0.01185739878565073,
-0.007467698771506548,
0.029302548617124557,
0.01639389432966709,
-0.027995582669973373,
0.042201731353998184,
-0.04053487628698349,
0.033393919467926025,
0.014935397543013096,
-0.027465220540761948,
0.02960561215877533,
0.046520400792360306,
-0.02960561215877533,
0.029283607378602028,
-0.04561120644211769,
-0.045762740075588226,
-0.03883013874292374,
0.07932712882757187,
0.04739170894026756,
-0.07322795689105988,
0.018070220947265625,
0.020608386024832726,
-0.045762740075588226,
0.0204000286757946,
-0.0035420663189142942,
-0.07212934643030167,
-0.025419535115361214,
-0.014727040193974972,
0.09622297435998917,
-0.03701175004243851,
0.04977834224700928,
-0.007145692594349384,
0.030420098453760147,
0.03401898965239525,
0.00965544581413269,
-0.0547410249710083,
-0.0043849642388522625,
-0.043982233852148056,
-0.02295713499188423,
0.024927055463194847,
0.034113697707653046,
-0.029832910746335983,
-0.019604485481977463,
0.002774934284389019,
0.05690035969018936,
-0.06500733643770218,
0.0612947940826416,
0.011336506344377995,
-0.01369472686201334,
0.0929650366306305,
0.007344578858464956,
0.006515886634588242,
0.0013922025682404637,
0.018155457451939583,
-0.008310596458613873,
-0.011743749491870403,
0.007050985004752874,
-0.08614608645439148,
0.025457417592406273,
-0.025362709537148476,
0.0062080868519842625,
-0.05625634640455246,
0.08152434974908829,
-0.016914786770939827,
0.01644124835729599,
-0.018003925681114197,
-0.03333709388971329,
0.028601711615920067,
0.006402237340807915,
0.0047472212463617325,
0.02591201476752758,
-0.05583963170647621,
-0.03204907104372978,
-0.04599003866314888,
0.00631700037047267,
0.019055180251598358,
0.023998919874429703,
-0.04023181274533272,
0.006572711281478405,
0.012472998350858688,
0.01966130919754505,
0.028279704973101616,
0.0107777314260602,
-0.02447245828807354,
0.04792207479476929,
0.011147091165184975,
0.05470314249396324,
-0.04492931067943573,
0.0027370513416826725,
-0.02307078428566456,
-0.045800622552633286,
-0.018856294453144073,
0.03621620684862137,
-0.023203374817967415,
-0.03284461423754692,
-0.0015295286430045962,
0.05118001624941826,
-0.013495841063559055,
0.026499202474951744,
0.06686360388994217,
-0.03578055277466774,
0.043262455612421036,
0.009494442492723465,
0.00985906645655632,
-0.03318556398153305,
-0.03606467321515083,
-0.07413715124130249,
-0.026840148493647575,
-0.06106749549508095,
-0.05008140951395035,
0.043565522879362106,
0.07550094276666641,
-0.042163848876953125,
-0.03939838334918022,
-0.003695966210216284,
0.04852820187807083,
0.007069926243275404,
0.04720229655504227,
0.02488917112350464,
0.04564908891916275,
0.02555212564766407,
-0.05667306110262871,
0.030742105096578598,
-0.023127609863877296,
0.07614495605230331,
0.06557557731866837,
-0.02665073424577713,
0.024377750232815742,
0.023847388103604317,
0.03883013874292374,
0.007657113950699568,
-0.005019505508244038,
0.03309085592627525,
0.029397256672382355,
-0.01941506937146187,
0.04977834224700928,
-0.0009222158114425838,
-0.0708034411072731,
-0.027218980714678764,
-0.005450425669550896,
-0.0709928572177887,
-0.06178727373480797,
0.007784969173371792,
-0.07053826004266739,
-0.018865764141082764,
0.06307529658079147,
-0.012397232465445995,
0.07644801586866379,
-0.006288588512688875,
0.08637338131666183,
-0.022407831624150276,
0.018789999186992645,
0.03223848715424538,
-0.01792815886437893,
-0.045762740075588226,
-0.011421742849051952,
-0.04151983559131622,
0.05580174922943115,
-0.023904211819171906,
0.01672537252306938,
-0.014480800367891788,
-0.007642907556146383,
0.011478567495942116,
-0.046179451048374176,
-0.0270485058426857,
-0.016374953091144562,
-0.05921122431755066,
-0.01755880005657673,
0.012387760914862156,
0.030817870050668716,
0.08364579826593399,
0.0496646948158741,
-0.027465220540761948,
0.013855730183422565,
-0.08766140788793564,
-0.02445351704955101,
0.005890815984457731,
0.014187206514179707,
-0.03426523134112358,
-0.04428530111908913,
0.025457417592406273,
-0.010862967930734158,
-0.02447245828807354,
-0.051634613424539566,
0.05830203369259834,
0.008433716371655464,
0.0183259304612875,
0.029776087030768394,
0.013183305971324444,
0.004953210242092609,
0.10539067536592484,
-0.04314880818128586,
0.01570252887904644,
-0.021309223026037216,
-0.008746251463890076,
-0.02519223652780056,
0.016261303797364235,
-0.061181146651506424,
0.028696419671177864,
-0.055006206035614014,
0.046899229288101196,
-0.01564570516347885,
0.025343768298625946,
-0.08394886553287506,
0.06474215537309647,
0.012368819676339626,
-0.02149863727390766,
0.022900311276316643,
-0.027218980714678764,
0.022919252514839172,
-0.03837554156780243,
-0.039284735918045044,
-0.05921122431755066,
0.021441813558340073,
-0.035666901618242264,
0.021460754796862602,
0.04114100709557533,
0.0033976370468735695,
-0.0025452682748436928,
0.0053651886992156506,
-0.004112679976969957,
0.06966695189476013,
-0.02807134948670864,
0.029340431094169617,
-0.015503643080592155,
0.042201731353998184,
0.0642496719956398,
-0.0059334347024559975,
0.013344308361411095,
-0.016924258321523666,
-0.006695831194519997,
-0.05871874466538429,
-0.05921122431755066,
-0.06436332315206528,
-0.01079667266458273,
0.013590548187494278,
-0.031954362988471985,
-0.04921009764075279,
-0.0708034411072731,
0.02771146036684513,
-0.03947415202856064,
0.038583897054195404,
-0.021763818338513374,
-0.003958779852837324,
0.012378290295600891,
-0.0067053018137812614,
0.020172730088233948,
-0.03506077453494072,
-0.010020069777965546,
0.04686134681105614,
0.03936050087213516,
0.0014987486647441983,
-0.05042235553264618,
-0.06947753578424454,
-0.04636886715888977,
-0.0832669734954834,
0.008514218032360077,
0.003501815488561988,
0.08576725423336029,
-0.04208808019757271,
-0.029397256672382355,
-0.010692493990063667,
0.027446279302239418,
-0.0034591970033943653,
0.02339279092848301,
-0.00891199056059122,
0.034473586827516556,
-0.015948768705129623,
-0.021044040098786354,
0.00030040083220228553,
0.060764431953430176,
-0.019178299233317375,
0.02369585447013378,
-0.02814711444079876,
0.0008713104180060327,
-0.005620899144560099,
0.03318556398153305,
0.020949333906173706,
0.004335242789238691,
0.01299388986080885,
0.08038786053657532,
-0.008035944774746895,
-0.005900287069380283,
0.007950707338750362,
0.026385553181171417,
-0.016554897651076317,
0.029776087030768394,
-0.004595689009875059,
0.031878598034381866,
-0.014575508423149586,
-0.09394999593496323,
0.021403929218649864,
0.016213949769735336,
-0.016554897651076317,
-0.01822175271809101,
-0.004773265682160854,
-0.052771106362342834,
-0.016346540302038193,
-0.041444070637226105,
-0.012861299328505993,
-0.022805603221058846,
0.019055180251598358,
-0.02884795144200325,
-0.05379394814372063,
0.02259724587202072,
0.009366586804389954,
0.016640134155750275,
0.018477464094758034,
0.027995582669973373,
-0.002727580489590764,
0.0008482254343107343,
-0.010446254163980484,
0.08357003331184387,
0.05659729614853859,
0.011014500632882118,
0.0018894177628681064,
-0.018534287810325623,
-0.01572147011756897,
0.042201731353998184,
0.02337384968996048,
-0.021025098860263824,
-0.003733849385753274,
0.05580174922943115,
-0.04538390785455704,
-0.0003569294640328735,
0.04712652787566185
]
|
41,438 | pyglove.core.symbolic.flags | as_sealed | Returns a context manager to treat symbolic values as sealed/unsealed.
While the user can use `Symbolic.seal` to seal or unseal an individual object.
This context manager is useful to create a readonly zone for operations on
all existing symbolic objects.
This function is thread-safe and can be nested. In the nested use case, the
sealed flag of immediate parent context is effective.
Example::
sd1 = pg.Dict()
sd2 = pg.Dict().seal()
with pg.as_sealed(True):
sd1.a = 2 # NOT OK
sd2.a = 2 # NOT OK
with pg.as_sealed(False):
sd1.a = 2 # OK
sd2.a = 2 # OK
with pg.as_sealed(None):
sd1.a = 1 # OK
sd2.a = 1 # NOT OK
Args:
sealed: If True, treats all symbolic values as sealed in scope.
If False, treats all as unsealed.
If None, honor object-level `sealed` state.
Returns:
A context manager that treats all symbolic values as sealed/unsealed
in scope. After leaving the scope, the sealed state of individual objects
will remain intact.
| def as_sealed(sealed: Optional[bool] = True) -> ContextManager[None]:
"""Returns a context manager to treat symbolic values as sealed/unsealed.
While the user can use `Symbolic.seal` to seal or unseal an individual object.
This context manager is useful to create a readonly zone for operations on
all existing symbolic objects.
This function is thread-safe and can be nested. In the nested use case, the
sealed flag of immediate parent context is effective.
Example::
sd1 = pg.Dict()
sd2 = pg.Dict().seal()
with pg.as_sealed(True):
sd1.a = 2 # NOT OK
sd2.a = 2 # NOT OK
with pg.as_sealed(False):
sd1.a = 2 # OK
sd2.a = 2 # OK
with pg.as_sealed(None):
sd1.a = 1 # OK
sd2.a = 1 # NOT OK
Args:
sealed: If True, treats all symbolic values as sealed in scope.
If False, treats all as unsealed.
If None, honor object-level `sealed` state.
Returns:
A context manager that treats all symbolic values as sealed/unsealed
in scope. After leaving the scope, the sealed state of individual objects
will remain intact.
"""
return thread_local.thread_local_value_scope(_TLS_SEALED, sealed, None)
| (sealed: Optional[bool] = True) -> ContextManager[NoneType] | [
0.07346037775278091,
-0.008912756107747555,
0.029118213802576065,
0.05311039090156555,
0.03168123587965965,
-0.021178634837269783,
0.0020282540936022997,
-0.05916142836213112,
0.040545813739299774,
-0.020851030945777893,
-0.05576976388692856,
0.034147899597883224,
-0.025784362107515335,
0.050990600138902664,
-0.05931559577584267,
0.03181612864136696,
-0.07669787853956223,
0.03553539887070656,
0.026015611365437508,
0.048909351229667664,
0.014366398565471172,
0.02909894287586212,
0.01564790867269039,
0.0043503884226083755,
-0.0556541383266449,
-0.009558328427374363,
-0.0009677566704340279,
0.009004292078316212,
0.031238004565238953,
-0.048755183815956116,
0.049024976789951324,
0.02067759446799755,
-0.013836451806128025,
0.010666401125490665,
0.003430206561461091,
-0.025899987667798996,
-0.03424425423145294,
0.07403850555419922,
0.019829677417874336,
-0.040931228548288345,
-0.03931248188018799,
0.03175831586122513,
0.055808305740356445,
-0.01712212711572647,
0.009028380736708641,
0.0015958651201799512,
0.06528954952955246,
-0.008744136430323124,
0.0040733702480793,
-0.026439569890499115,
0.06802600622177124,
-0.0006829097983427346,
0.01695832423865795,
0.0031796859111636877,
0.007530074566602707,
0.029330193996429443,
-0.026998423039913177,
0.009567963890731335,
0.011909369379281998,
-0.05322601646184921,
-0.021853113546967506,
-0.030158838257193565,
-0.0013031894341111183,
-0.017748428508639336,
-0.045903101563453674,
-0.05650205537676811,
-0.03287602588534355,
-0.022238530218601227,
-0.012593483552336693,
0.02553384192287922,
-0.04748331010341644,
-0.044322893023490906,
-0.03969789668917656,
0.02449321746826172,
-0.03457185626029968,
-0.01422186754643917,
-0.01728592813014984,
-0.013296868652105331,
-0.02374165505170822,
-0.0012526034843176603,
0.009086193516850471,
-0.06093434616923332,
-0.014501295052468777,
0.050836432725191116,
0.0011821446241810918,
0.019116656854748726,
0.04409164562821388,
0.0305057130753994,
0.024146342650055885,
0.03549685701727867,
0.03692289814352989,
0.05245518311858177,
0.014453117735683918,
0.023548945784568787,
0.024685924872756004,
0.017411189153790474,
-0.01285363920032978,
0.010666401125490665,
-0.05769684538245201,
-0.031796857714653015,
0.018278377130627632,
-0.008618876338005066,
0.015455200336873531,
0.023664571344852448,
-0.005843877326697111,
0.008956115692853928,
0.06008642911911011,
-0.040545813739299774,
0.06609892845153809,
-0.013258326798677444,
-0.046673934906721115,
-0.04867810010910034,
-0.03570883721113205,
0.011928639374673367,
-0.0589301772415638,
0.016389835625886917,
-0.05364997312426567,
-0.02854008972644806,
-0.04517081007361412,
0.005549997091293335,
-0.05141455680131912,
0.07249683886766434,
-0.0055066379718482494,
0.017748428508639336,
0.0553458072245121,
0.004545505624264479,
0.0013826815411448479,
-0.025784362107515335,
0.013027076609432697,
0.06251455098390579,
-0.003524151863530278,
0.06621454656124115,
0.018789052963256836,
0.04833122715353966,
-0.013971347361803055,
0.011109629645943642,
0.014665096998214722,
0.06960621476173401,
0.008098563179373741,
0.03678800165653229,
0.024454675614833832,
0.018721604719758034,
-0.05812080577015877,
-0.024146342650055885,
0.00274127465672791,
0.0031290999613702297,
-0.006205205339938402,
0.008960933424532413,
-0.026169778779149055,
0.03407081589102745,
0.04008331149816513,
-0.04035310447216034,
0.03954372927546501,
0.097587451338768,
0.0010556798661127687,
-0.0013236646773293614,
0.0018813142087310553,
-0.0009617345640435815,
-0.02482082135975361,
-0.003061652183532715,
-0.028906235471367836,
0.04567185044288635,
-0.044168729335069656,
-0.05708017945289612,
-0.018962491303682327,
-0.017430460080504417,
-0.013663014397025108,
-0.07238121330738068,
0.01656327210366726,
-0.014453117735683918,
-0.0391390435397625,
-0.025283319875597954,
-0.022739572450518608,
0.016755981370806694,
0.008007027208805084,
0.03040936030447483,
0.004870700649917126,
-0.0034567040856927633,
0.008252730593085289,
-0.03299165144562721,
0.02925311028957367,
0.0021559232845902443,
-0.058621846139431,
0.044823937118053436,
0.0434364378452301,
0.02526404894888401,
-0.020215094089508057,
-0.011649212799966335,
-0.009028380736708641,
-0.0343598797917366,
-0.024030717089772224,
0.04386039450764656,
0.012680201791226864,
-0.02701769396662712,
-0.0449395589530468,
0.019444260746240616,
-0.04987289011478424,
-0.03919685631990433,
-0.06860413402318954,
0.03266404569149017,
-0.027152590453624725,
0.016755981370806694,
-0.02433905005455017,
0.008137105032801628,
0.017854418605566025,
-0.026593737304210663,
-0.05299476534128189,
-0.06031767651438713,
-0.025553112849593163,
0.011051817797124386,
-0.04763747751712799,
0.010878380388021469,
-0.009500515647232533,
0.07234267145395279,
0.01695832423865795,
-0.022065093740820885,
-0.02011873945593834,
0.04960310086607933,
0.011109629645943642,
0.010849473997950554,
-0.029811963438987732,
-0.03809841722249985,
0.016861971467733383,
0.014877076260745525,
0.027653632685542107,
-0.05603955686092377,
0.06066455319523811,
-0.004232354462146759,
-0.006022132467478514,
-0.023336967453360558,
-0.007048303727060556,
-0.0413551889359951,
0.021949468180537224,
-0.04682810232043266,
0.005068226717412472,
0.0033916649408638477,
0.019328637048602104,
-0.013036712072789669,
0.01246822252869606,
0.02800050750374794,
-0.00027280260110273957,
-0.037713002413511276,
0.009529422037303448,
0.05168434977531433,
-0.032394252717494965,
0.06474997103214264,
0.04544060304760933,
0.04085414484143257,
0.013990618288516998,
0.017912231385707855,
0.005376559682190418,
-0.035959355533123016,
-0.019164834171533585,
0.0012032220838591456,
0.019868219271302223,
-0.0645572617650032,
-0.044708311557769775,
-0.0003736733051482588,
-0.004991143476217985,
-0.019829677417874336,
-0.0016187492292374372,
0.02564946562051773,
-0.05989371985197067,
0.09296245127916336,
0.03401300311088562,
-0.004160088952630758,
0.02002238668501377,
-0.06563642621040344,
0.0038975239731371403,
-0.01694868877530098,
-0.12633952498435974,
0.02318280003964901,
0.013354680500924587,
0.012015358544886112,
-0.021564051508903503,
0.05299476534128189,
0.008464708924293518,
0.06906662881374359,
-0.01766170933842659,
0.0033434878569096327,
-0.0080696577206254,
0.04332081228494644,
0.029619256034493446,
0.03198956698179245,
-0.012564577162265778,
-0.0023353828582912683,
-0.06498121470212936,
-0.056848928332328796,
0.0003510903043206781,
-0.017488272860646248,
-0.006706246640533209,
0.027634361758828163,
0.06644579768180847,
0.011649212799966335,
0.11223327368497849,
0.008334631100296974,
-0.030659880489110947,
-0.03094894252717495,
0.05145309865474701,
0.015137231908738613,
0.05792809650301933,
0.024955715984106064,
0.0827103778719902,
0.060780178755521774,
0.003372394246980548,
-0.05052809789776802,
0.020427072420716286,
-0.017970042303204536,
0.017642438411712646,
0.05284059792757034,
-0.005535543896257877,
0.044477060437202454,
0.01601405441761017,
0.011032546870410442,
0.005839059595018625,
-0.07280517369508743,
-0.005106768105179071,
-0.0743853822350502,
-0.01640910655260086,
0.04204893857240677,
-0.03397446125745773,
-0.010107547044754028,
-0.010030463337898254,
-0.07280517369508743,
-0.012583848088979721,
-0.004644268658012152,
0.03707706555724144,
0.019107021391391754,
0.030004672706127167,
0.03877289593219757,
-0.04043018817901611,
-0.02674790285527706,
0.008662234991788864,
-0.01337395142763853,
-0.09558328241109848,
0.044978100806474686,
0.025302590802311897,
0.03809841722249985,
-0.0049140602350234985,
-0.08178537338972092,
0.058429136872291565,
0.02258540503680706,
-0.0317005030810833,
-0.041586436331272125,
-0.038464564830064774,
0.013566659763455391,
0.017237752676010132,
-0.009669135324656963,
0.05287913978099823,
0.01881795935332775,
-0.034032274037599564,
0.002186034107580781,
-0.023529674857854843,
0.01322942040860653,
0.0002893634664360434,
-0.01799894869327545,
0.018721604719758034,
0.023047905415296555,
-0.020658323541283607,
-0.04012185335159302,
-0.008252730593085289,
0.0037361308932304382,
-0.02645884081721306,
-0.01990676112473011,
0.017093220725655556,
-0.010473692789673805,
0.006340100895613432,
-0.06463434547185898,
0.036171335726976395,
-0.04004477337002754,
0.004463604651391506,
-0.04335935413837433,
-0.015195044688880444,
0.04675101861357689,
0.028944777324795723,
0.051761433482170105,
-0.05349580571055412,
-0.0010400222381576896,
0.019810406491160393,
0.09157495200634003,
0.04605726897716522,
-0.019771864637732506,
0.0714176744222641,
0.041702061891555786,
0.018567439168691635,
-0.037423938512802124,
-0.02011873945593834,
-0.006576168350875378,
-0.010598952881991863,
0.03470675274729729,
-0.014289315789937973,
0.005121221300214529,
0.10097911953926086,
0.049024976789951324,
0.008903120644390583,
0.021949468180537224,
-0.011976816691458225,
-0.025572383776307106,
-0.0005245277425274253,
0.02083176001906395,
0.010358068160712719,
0.030910400673747063,
0.02482082135975361,
-0.10575827956199646,
-0.03725050389766693,
0.00809374637901783,
0.03744320943951607,
-0.0038204407319426537,
0.015513013117015362,
0.014944523572921753,
-0.004665947984904051,
-0.020542697980999947,
-0.04062289744615555,
-0.03499581664800644,
0.01809530332684517,
-0.08964787423610687,
0.07056975364685059,
0.05145309865474701,
0.06521246582269669,
-0.0054391901940107346,
0.0630926787853241,
-0.05519163981080055,
-0.029561443254351616,
0.02193019725382328,
-0.027326028794050217,
-0.027248945087194443,
-0.0407770611345768,
-0.015358846634626389,
-0.002907485468313098,
-0.022893738001585007,
0.013065618462860584,
-0.026805715635418892,
0.07334475219249725,
-0.060124970972537994,
0.006407548673450947,
-0.028251027688384056,
-0.03769373148679733,
0.019829677417874336,
-0.05746559426188469,
0.028694257140159607,
0.04802289232611656,
0.00035530581953935325,
-0.0004724362806882709,
0.07777704298496246,
0.08047495782375336,
-0.032837484031915665,
0.05708017945289612,
0.08001246303319931,
0.011514317244291306,
-0.01956952176988125,
0.030043214559555054,
-0.05638642981648445,
-0.0032447248231619596,
0.03567029535770416,
-0.10583536326885223,
0.017459366470575333,
0.025880716741085052,
-0.011389057151973248,
-0.0740770474076271,
0.07107079774141312,
0.003386847209185362,
-0.047868724912405014,
-0.020908843725919724,
0.02942654862999916,
-0.020041655749082565,
-0.03854164853692055,
-0.003056834451854229,
-0.00567525764927268,
0.0012959628365933895,
-0.041586436331272125,
0.03040936030447483,
0.014838534407317638,
0.030120298266410828,
-0.06031767651438713,
0.022296342998743057,
-0.020330719649791718,
-0.027518736198544502,
-0.046134352684020996,
-0.07600412517786026,
-0.002052342751994729,
0.05422809720039368,
0.021698947995901108,
0.018085667863488197,
0.023972904309630394,
-0.003117055632174015,
-0.025996340438723564,
0.04413018748164177,
0.02975415252149105,
0.02198801003396511,
0.04937184974551201,
-0.031353630125522614,
0.047213517129421234,
-0.013161972165107727,
0.02428123727440834,
0.016755981370806694,
0.01853853277862072,
-0.005376559682190418,
-0.02139061503112316,
0.04894789308309555,
-0.05472913756966591,
0.006089580245316029,
-0.028829151764512062,
-0.0051019503735005856,
0.0027220037300139666,
0.020658323541283607,
0.008079293183982372,
-0.026266133412718773,
-0.005029684863984585,
0.029233839362859726,
-0.00525129958987236,
0.01930936612188816,
0.03757810592651367,
0.013643743470311165,
-0.023202070966362953,
0.023760925978422165,
0.048793725669384,
0.04651976749300957,
-0.04944893345236778,
0.03112238086760044,
-0.03981352224946022,
-0.0018355459906160831,
0.007809501141309738,
0.041470810770988464,
-0.023202070966362953,
-0.020234365016222,
-0.03663383424282074,
-0.01581171154975891,
-0.010271348990499973,
0.028906235471367836,
0.03181612864136696,
0.03965935483574867,
-0.03567029535770416,
-0.0434364378452301,
0.031026026234030724,
0.0019571930170059204,
-0.0004028806579299271,
-0.03977498039603233,
-0.05376559868454933,
-0.033280711621046066,
-0.017469001933932304,
0.026555195450782776,
0.02734529785811901,
0.01849035546183586,
0.029985401779413223,
0.003801170038059354,
0.007809501141309738,
-0.02526404894888401,
-0.034379150718450546,
0.014616919681429863,
-0.02642029896378517,
-0.04914059862494469,
-0.013441399671137333,
0.01077239029109478,
-0.020080197602510452,
-0.026670819148421288,
-0.0702228844165802,
0.031469255685806274,
0.017642438411712646,
-0.03977498039603233,
0.014279680326581001,
-0.012776556424796581,
0.028424464166164398,
0.0161393154412508,
-0.04308956116437912,
0.046134352684020996,
-0.05168434977531433,
0.019887490198016167,
0.08594787120819092,
0.03588227182626724,
0.01471327431499958,
0.012699472717940807,
-0.05160726606845856,
-0.00992447417229414,
-0.026478111743927002,
-0.009828120470046997,
0.029542172327637672,
-0.03996768966317177,
0.010810932144522667,
-0.0025461576879024506,
0.023972904309630394,
0.017796605825424194,
-0.023587487637996674,
-0.08533120900392532,
-0.00943788606673479,
0.028848422691226006,
0.033666130155324936,
-0.014530201442539692,
0.060009345412254333,
-0.054459348320961,
0.07029996812343597,
-0.02591925859451294,
0.018278377130627632,
0.014443482272326946,
-0.02800050750374794,
0.011658848263323307,
-0.02782706916332245,
0.0080696577206254,
0.017912231385707855,
0.03293383866548538,
0.017748428508639336,
-0.06625308841466904,
0.006552080158144236,
-0.045903101563453674,
0.02848227694630623,
0.024512488394975662,
0.0016223624115809798,
0.07346037775278091,
-0.014414575882256031,
-0.030968213453888893,
-0.028520818799734116,
-0.07122496515512466,
0.013855721801519394,
-0.005121221300214529,
0.002912303199991584,
0.01252603530883789,
0.02740311063826084,
-0.06370934098958969,
-0.032394252717494965,
-0.03260623291134834,
-0.031796857714653015,
-0.02892550639808178,
0.00037788882036693394,
-0.036113522946834564,
-0.04216456040740013,
0.02356821671128273,
0.00828163605183363,
0.032837484031915665,
0.010464057326316833,
-0.05480622127652168,
-0.021564051508903503,
-0.045748934149742126,
0.0675635114312172,
0.019232282415032387,
-0.015773169696331024,
0.05877601355314255,
0.032143734395504,
0.01690051145851612,
0.009254813194274902,
0.04062289744615555,
0.07257392257452011,
-0.035400502383708954,
-0.017642438411712646,
0.005198304541409016,
-0.0036590476520359516,
-0.032452065497636795,
0.006768876686692238,
0.020253635942935944,
-0.0025606106501072645,
-0.008758589625358582,
0.027518736198544502,
0.0010779616422951221,
0.03514998406171799,
-0.0005979977431707084,
-0.0913437008857727,
0.04937184974551201,
0.02701769396662712,
0.016929417848587036,
-0.022835925221443176,
0.030062485486268997,
0.020234365016222,
-0.028694257140159607,
-0.022238530218601227,
-0.04713643342256546,
0.07419267296791077,
0.003114646766334772,
0.03673018887639046,
-0.07164892554283142,
0.019444260746240616,
0.1487707644701004,
0.004155271220952272,
0.009327078238129616,
0.016640355810523033,
-0.021255718544125557,
-0.015137231908738613,
-0.05264788866043091,
-0.023606758564710617,
0.010097911581397057,
0.009914838708937168,
0.01556119043380022,
-0.015599731355905533,
-0.04486247897148132,
0.06659996509552002,
-0.031083839014172554,
-0.002958071418106556,
0.00386139121837914,
-0.026497382670640945,
-0.009452339261770248,
0.008830854669213295,
0.018740875646471977,
-0.06929787993431091,
-0.021371344104409218,
-0.0705312117934227,
0.009225906804203987,
0.02094738557934761,
-0.07226558774709702,
-0.04844684898853302,
-0.021583322435617447,
0.021197905763983727,
0.018740875646471977,
-0.029484359547495842,
0.018634885549545288,
-0.0001671141799306497,
0.04324372857809067,
-0.02297082170844078,
0.020908843725919724,
0.014260409399867058,
-0.003153188619762659,
-0.006397913675755262,
0.029388006776571274,
-0.0322786308825016,
-0.02077394723892212,
0.044592685997486115,
0.014241138473153114,
-0.004364841617643833,
0.027383839711546898,
-0.02198801003396511,
-0.024512488394975662,
-0.012169525027275085,
-0.024030717089772224,
0.0061907521449029446,
-0.006065491586923599,
0.007510803639888763,
0.027094777673482895,
-0.03312654420733452,
-0.008671870455145836,
0.02139061503112316,
0.011302337981760502,
0.010300255380570889,
0.08278746157884598,
-0.024628112092614174,
0.020195823162794113,
-0.0033579410519450903,
-0.06949058920145035,
0.050720807164907455,
-0.01370155531913042,
0.03553539887070656,
-0.036229148507118225,
0.054459348320961,
-0.033165086060762405,
0.03193175420165062,
0.01550337765365839,
0.04894789308309555,
-0.010155724361538887,
-0.0025172512978315353,
-0.007823954336345196,
0.016274210065603256,
-0.0379442535340786,
0.017806241288781166,
-0.016110409051179886,
0.00488274497911334,
0.025726549327373505,
0.009408979676663876,
0.02553384192287922,
0.021409885957837105,
0.05114476755261421,
-0.004357615020126104,
-0.011080723255872726,
-0.05923851206898689,
-0.013846086338162422,
-0.017700251191854477,
-0.050720807164907455,
-0.01454947143793106,
0.01907811500132084,
0.043821852654218674,
-0.03281821310520172,
-0.009355984628200531,
-0.022354155778884888,
0.009457156993448734
]
|
41,439 | pyglove.core.symbolic.flags | auto_call_functors | Returns a context manager to enable or disable auto call for functors.
`auto_call_functors` is thread-safe and can be nested. For example::
@pg.symbolize
def foo(x, y):
return x + y
with pg.auto_call_functors(True):
a = foo(1, 2)
assert a == 3
with pg.auto_call_functors(False):
b = foo(1, 2)
assert isinstance(b, foo)
Args:
enabled: If True, enable auto call for functors.
Otherwise, auto call will be disabled.
Returns:
A context manager for enabling/disabling auto call for functors.
| def auto_call_functors(enabled: bool = True) -> ContextManager[None]:
"""Returns a context manager to enable or disable auto call for functors.
`auto_call_functors` is thread-safe and can be nested. For example::
@pg.symbolize
def foo(x, y):
return x + y
with pg.auto_call_functors(True):
a = foo(1, 2)
assert a == 3
with pg.auto_call_functors(False):
b = foo(1, 2)
assert isinstance(b, foo)
Args:
enabled: If True, enable auto call for functors.
Otherwise, auto call will be disabled.
Returns:
A context manager for enabling/disabling auto call for functors.
"""
return thread_local.thread_local_value_scope(
_TLS_AUTO_CALL_FUNCTORS, enabled, False
)
| (enabled: bool = True) -> ContextManager[NoneType] | [
0.04450424015522003,
-0.04672945290803909,
0.051294974982738495,
-0.005946687422692776,
0.00894880574196577,
0.04461933672428131,
-0.013859618455171585,
-0.009888765402138233,
0.005126620177179575,
-0.02796861343085766,
-0.019739165902137756,
-0.01942264847457409,
-0.03591031953692436,
0.01322658360004425,
-0.015327107161283493,
-0.04247085750102997,
-0.057548586279153824,
-0.011883783154189587,
0.0029541607946157455,
-0.039209771901369095,
0.02900448814034462,
0.052407581359148026,
0.004730973392724991,
-0.016113605350255966,
0.016506852582097054,
0.02913876809179783,
0.0025129548739641905,
0.01700560748577118,
0.040514204651117325,
0.021408075466752052,
0.03533483296632767,
0.06549029052257538,
-0.06602741032838821,
-0.041780274361371994,
-0.004841275047510862,
-0.025110367685556412,
0.0181278046220541,
0.11870355159044266,
0.04573194310069084,
-0.0582391694188118,
-0.006714001763612032,
-0.03293697535991669,
0.017724964767694473,
-0.002695192117244005,
-0.05421077087521553,
-0.003208333859220147,
-0.007529273629188538,
0.03228475898504257,
0.062344301491975784,
-0.03013627789914608,
0.0358719527721405,
-0.06740857660770416,
0.0069441962987184525,
0.03779023885726929,
0.0019782327581197023,
0.031805187463760376,
-0.008080780506134033,
-0.01831004209816456,
0.003999626729637384,
-0.027450677007436752,
0.004987544380128384,
0.008910439908504486,
-0.004704596940428019,
0.03136397898197174,
-0.00962979719042778,
-0.0695570558309555,
-0.05758695304393768,
0.02422795444726944,
0.016612358391284943,
0.05432586744427681,
-0.043890390545129776,
-0.006872260477393866,
0.020122822374105453,
-0.03224639222025871,
-0.007514886558055878,
-0.010531391948461533,
-0.036927010864019394,
-0.030692579224705696,
0.016497261822223663,
0.0024194384459406137,
-0.024745892733335495,
-0.0037382603622972965,
0.002975741634145379,
0.036927010864019394,
-0.002342707011848688,
-0.006829099263995886,
0.0010952216107398272,
-0.012794969603419304,
0.02919631637632847,
0.035565026104450226,
0.03713802248239517,
0.029388144612312317,
0.014789987355470657,
-0.02401694469153881,
-0.054747890681028366,
-0.007773855235427618,
0.028141260147094727,
0.04584703966975212,
-0.03345491364598274,
-0.019835079088807106,
0.0028270743787288666,
0.013830844312906265,
0.004798113368451595,
-0.0010394713608548045,
0.0018643344519659877,
-0.01912531442940235,
0.001616156194359064,
-0.03491280972957611,
0.06054111570119858,
0.017389263957738876,
0.0066468617878854275,
-0.054747890681028366,
0.030500750988721848,
0.055054813623428345,
-0.017724964767694473,
-0.04247085750102997,
-0.04461933672428131,
-0.027220482006669044,
-0.024669161066412926,
-0.045386653393507004,
-0.048724472522735596,
-0.004181864205747843,
-0.018338816240429878,
-0.022482315078377724,
-0.012142752297222614,
0.03341654688119888,
0.04450424015522003,
0.042816150933504105,
0.07293324172496796,
0.001291246386244893,
0.040437474846839905,
0.03541156277060509,
0.03184355050325394,
-0.01695764996111393,
0.017542727291584015,
-0.05428750067949295,
0.027258846908807755,
0.05336672440171242,
-0.00032580894185230136,
0.00848841667175293,
-0.020007725805044174,
-0.026261338964104652,
-0.05206228792667389,
0.0386342853307724,
0.021312160417437553,
0.009212569333612919,
-0.0181278046220541,
0.03865346685051918,
-0.00008654768316773698,
-0.03270678222179413,
0.06591231375932693,
0.0048268879763782024,
-0.002575299236923456,
0.04561684653162956,
-0.05225411802530289,
0.023249629884958267,
-0.012545592151582241,
-0.002041775966063142,
0.02173418365418911,
-0.04108969122171402,
-0.010675262659788132,
0.056244153529405594,
-0.06867464631795883,
-0.03523891791701317,
0.06165371835231781,
-0.005294470116496086,
-0.020065274089574814,
-0.06361037492752075,
-0.005193760152906179,
0.007088067475706339,
-0.0026280521415174007,
0.030443202704191208,
0.05424913391470909,
0.00960102304816246,
0.07811261713504791,
0.016391756013035774,
-0.0035440337378531694,
0.03951669856905937,
-0.03395366668701172,
0.04013054817914963,
0.016094421967864037,
0.04235576093196869,
-0.03481689468026161,
-0.008123942650854588,
0.03424140810966492,
0.014828352257609367,
0.06510663777589798,
0.0005356214824132621,
0.041588444262742996,
-0.011097285896539688,
-0.049069762229919434,
-0.010416294448077679,
0.040360741317272186,
-0.014224092476069927,
-0.027546590194106102,
0.010138142853975296,
-0.058699559420347214,
-0.0018991034012287855,
-0.014722847379744053,
0.0314023457467556,
-0.012449678033590317,
0.05789387971162796,
0.032169658690690994,
-0.03036647103726864,
0.007088067475706339,
0.020180370658636093,
-0.014895493164658546,
0.0018271676963195205,
-0.03280269354581833,
0.013581466861069202,
0.0360637828707695,
-0.025033636018633842,
-0.036831095814704895,
0.0959143117070198,
0.007083272095769644,
0.006833894643932581,
0.09998107701539993,
0.03495117649435997,
-0.022597411647439003,
-0.0002905903966166079,
-0.01566280797123909,
0.017686599865555763,
0.0006144510698504746,
-0.05751022323966026,
0.03381938487291336,
-0.010377928614616394,
0.006584517657756805,
-0.019662434235215187,
-0.045194823294878006,
-0.07957051694393158,
0.03951669856905937,
-0.009677753783762455,
-0.04270105063915253,
-0.03176682069897652,
-0.0008092770003713667,
-0.057548586279153824,
0.052599407732486725,
0.008761772885918617,
-0.048839569091796875,
-0.029733436182141304,
0.04070603474974632,
0.04001545161008835,
0.0840209349989891,
0.008929622359573841,
-0.02641480229794979,
0.042816150933504105,
0.02668336220085621,
0.04070603474974632,
-0.01389798428863287,
0.01031078863888979,
-0.009413990192115307,
-0.0333973653614521,
-0.017513953149318695,
0.0062727960757911205,
-0.07166717201471329,
-0.09921376407146454,
-0.029867716133594513,
0.054978083819150925,
-0.009274913929402828,
0.025896864011883736,
0.006498194765299559,
0.03955506160855293,
-0.05175536125898361,
0.03759840875864029,
0.03974689170718193,
-0.017168661579489708,
-0.005447932984679937,
-0.03500872477889061,
-0.025532390922307968,
0.021983560174703598,
-0.1133323535323143,
-0.03255331888794899,
0.05187046155333519,
0.0008524384465999901,
-0.02887020818889141,
-0.0030596666038036346,
-0.03750249743461609,
0.00022419969900511205,
0.0096585713326931,
-0.02179173193871975,
-0.029656704515218735,
-0.03617887943983078,
-0.03134479746222496,
0.008872074075043201,
-0.06399402767419815,
-0.006742776371538639,
-0.007078476250171661,
0.037943702191114426,
0.022060291841626167,
-0.02179173193871975,
-0.022252120077610016,
0.04181864112615585,
0.062305938452482224,
0.01259354967623949,
0.06702492386102676,
-0.019681617617607117,
0.006670840550214052,
-0.07496662437915802,
0.007068885024636984,
-0.006191269028931856,
0.052292484790086746,
0.05873792618513107,
-0.0009285704581998289,
0.026760093867778778,
0.07143697887659073,
-0.050297465175390244,
-0.0157970879226923,
-0.03295615687966347,
-0.00786497350782156,
0.012775786221027374,
-0.021177880465984344,
0.0010286810575053096,
0.006196064408868551,
-0.04243249073624611,
0.02758495695888996,
0.00019737366528715938,
0.006311161909252405,
-0.006982562132179737,
0.058776289224624634,
0.06852118670940399,
-0.0333973653614521,
0.027258846908807755,
-0.04066766798496246,
0.08547883480787277,
-0.016573993489146233,
0.010790360160171986,
0.025685852393507957,
-0.0030716557521373034,
-0.02167663536965847,
0.044082216918468475,
-0.05693473666906357,
-0.005246513057500124,
0.013917166739702225,
-0.006522173061966896,
-0.047688595950603485,
0.03982362151145935,
0.03614051267504692,
0.001602967968210578,
-0.03544992953538895,
-0.04308471083641052,
0.04070603474974632,
0.02766168862581253,
-0.02286597155034542,
-0.018549827858805656,
-0.061999011784791946,
0.022731691598892212,
0.056052323430776596,
0.04979871213436127,
0.08662980794906616,
-0.030424019321799278,
0.029790986329317093,
-0.012372946366667747,
-0.02073667384684086,
0.05827753618359566,
0.018482688814401627,
-0.010099777020514011,
-0.016420530155301094,
0.04454260692000389,
0.010224465280771255,
-0.06644943356513977,
0.004714188631623983,
-0.07584904134273529,
-0.005208147224038839,
0.030788494274020195,
0.023921029642224312,
0.008848095312714577,
-0.02060239389538765,
-0.04335327073931694,
0.035507477819919586,
-0.0651833638548851,
-0.01811821386218071,
0.029656704515218735,
-0.00022809622169006616,
0.018751248717308044,
-0.0023103361018002033,
0.03155580908060074,
0.009015945717692375,
0.03015545941889286,
0.02637643553316593,
0.11931740492582321,
0.040360741317272186,
-0.051410071551799774,
0.09952069073915482,
-0.01937469094991684,
0.0096585713326931,
-0.016372572630643845,
-0.02280842326581478,
-0.004270584788173437,
0.03713802248239517,
-0.04074440151453018,
0.018405957147479057,
0.01150971744209528,
-0.06855954974889755,
-0.0034984746016561985,
0.029656704515218735,
-0.005548642948269844,
0.00010775373812066391,
-0.02290433831512928,
-0.0003222121449653059,
-0.03813553228974342,
0.014387146569788456,
0.034529153257608414,
0.12054511159658432,
-0.030385654419660568,
-0.005937095731496811,
0.027047835290431976,
-0.00636391481384635,
-0.04450424015522003,
0.014569384045898914,
0.042777784168720245,
-0.030596666038036346,
-0.03874938189983368,
-0.03128724917769432,
-0.017667416483163834,
-0.0030980322044342756,
0.007207960356026888,
-0.023287994787096977,
0.031901098787784576,
0.03464424982666969,
0.024669161066412926,
0.021120332181453705,
-0.007495703641325235,
-0.07082312554121017,
0.03036647103726864,
-0.03025137446820736,
0.04584703966975212,
0.007730693556368351,
0.0023031423334032297,
-0.01712070405483246,
-0.014962633140385151,
0.0063159572891891,
-0.04933832213282585,
0.02399776130914688,
-0.040475841611623764,
-0.03351246193051338,
-0.03662008419632912,
0.0023307178635150194,
0.004934791475534439,
-0.0194130577147007,
0.01379247847944498,
0.030558299273252487,
0.015365472994744778,
-0.032073747366666794,
-0.039094675332307816,
-0.009231752716004848,
-0.028122076764702797,
0.011672771535813808,
0.04124315455555916,
0.02656826376914978,
0.04822571575641632,
0.03719557076692581,
0.04584703966975212,
0.028237173333764076,
0.07028600573539734,
-0.0034649046137928963,
0.010540982708334923,
0.05183209478855133,
-0.049913808703422546,
-0.03370428830385208,
0.07584904134273529,
0.04841754585504532,
-0.05037419870495796,
-0.06660290062427521,
0.030730945989489555,
0.0004852664715144783,
0.04254758730530739,
0.006076171528548002,
0.08026109635829926,
-0.033224716782569885,
-0.03481689468026161,
0.06760040670633316,
-0.067945696413517,
0.009265322238206863,
-0.052445944398641586,
-0.022079475224018097,
0.057433489710092545,
-0.030730945989489555,
-0.003709485987201333,
0.02649153396487236,
-0.018348408862948418,
-0.009927131235599518,
-0.042777784168720245,
0.01026283111423254,
-0.008253426291048527,
-0.03263004869222641,
-0.050259098410606384,
0.015442204661667347,
-0.046537622809410095,
-0.011394619941711426,
-0.00575485872104764,
-0.04193373769521713,
0.01708233915269375,
0.060848038643598557,
-0.02668336220085621,
0.00419864896684885,
-0.007697123568505049,
0.013073121197521687,
-0.01803189143538475,
-0.008732997812330723,
-0.024860989302396774,
0.0036591310054063797,
0.008651470765471458,
-0.002524944255128503,
0.044197313487529755,
0.04857100918889046,
0.002556116320192814,
-0.004445628263056278,
-0.00692501338198781,
-0.0840209349989891,
0.022232938557863235,
0.003390570869669318,
-0.0507194884121418,
-0.019739165902137756,
-0.02052566222846508,
-0.04181864112615585,
-0.006215247325599194,
0.06602741032838821,
-0.06882811337709427,
-0.011720729060471058,
-0.03623642772436142,
-0.0071264333091676235,
0.035680122673511505,
0.00043011573143303394,
-0.019950177520513535,
0.032150477170944214,
0.009265322238206863,
0.038039617240428925,
0.02915795147418976,
0.022367218509316444,
0.028390636667609215,
0.10189936310052872,
-0.014636524021625519,
-0.019566519185900688,
0.006829099263995886,
0.01925000175833702,
-0.014809169806540012,
-0.06422422081232071,
-0.08133533596992493,
0.047842059284448624,
-0.01940346509218216,
0.017638642340898514,
0.02522546425461769,
0.02184928022325039,
0.01937469094991684,
-0.008795342408120632,
-0.03646662086248398,
0.026990287005901337,
-0.02879347652196884,
0.019739165902137756,
-0.039401598274707794,
0.04369856044650078,
0.007236734963953495,
-0.01014773454517126,
-0.04626906290650368,
-0.01273742038756609,
-0.020142005756497383,
0.005889138672500849,
0.007174390368163586,
-0.014463878236711025,
-0.009840808808803558,
0.00848841667175293,
0.05187046155333519,
-0.06407076120376587,
-0.010454660281538963,
0.0366392657160759,
-0.028716744855046272,
0.0507194884121418,
0.07009418308734894,
-0.01328413188457489,
-0.04335327073931694,
0.011068511754274368,
-0.06971052289009094,
-0.045194823294878006,
-0.03951669856905937,
-0.057548586279153824,
0.06971052289009094,
0.009879174642264843,
-0.05064275860786438,
-0.03861510381102562,
-0.020046090707182884,
-0.03243822231888771,
-0.06848281621932983,
-0.06890483945608139,
-0.02039138227701187,
0.000982522265985608,
-0.038020431995391846,
0.023383909836411476,
0.03773269057273865,
-0.006052193231880665,
-0.023249629884958267,
-0.07830444723367691,
0.018962260335683823,
-0.00599944032728672,
-0.044158950448036194,
-0.007917726412415504,
0.012411312200129032,
-0.05336672440171242,
0.04473443701863289,
0.01140421163290739,
-0.027105385437607765,
-0.04573194310069084,
0.04312307387590408,
-0.03274514526128769,
-0.01152890082448721,
0.004606284666806459,
-0.010157325305044651,
-0.044158950448036194,
-0.012555183842778206,
-0.010732811875641346,
0.028640013188123703,
-0.056052323430776596,
0.018732065334916115,
0.060963135212659836,
0.014953041449189186,
0.03157499060034752,
0.013610241003334522,
-0.02296188659965992,
-0.019681617617607117,
0.008147920481860638,
-0.01518323551863432,
-0.04488789662718773,
0.03341654688119888,
-0.01563403382897377,
-0.025973595678806305,
0.019019808620214462,
-0.013380046933889389,
0.03525809943675995,
-0.041550081223249435,
0.007466929033398628,
0.03483607992529869,
-0.01804148219525814,
0.02660663053393364,
0.0410129614174366,
-0.015940958634018898,
0.06376383453607559,
-0.04438914358615875,
0.001547817257232964,
0.054939717054367065,
0.0009393608197569847,
-0.06714002043008804,
-0.03729148581624031,
-0.013399229384958744,
0.005409567151218653,
-0.041434984654188156,
0.011730320751667023,
-0.028640013188123703,
-0.019662434235215187,
-0.011672771535813808,
0.06878974288702011,
0.01499140728265047,
-0.03383857011795044,
-0.03278351202607155,
-0.01700560748577118,
0.01934591680765152,
-0.03291779384016991,
0.02670254372060299,
-0.04124315455555916,
-0.016650725156068802,
0.08317688852548599,
-0.024995269253849983,
-0.048839569091796875,
-0.0339728482067585,
-0.008661062456667423,
0.06587395071983337,
-0.06334181129932404,
-0.00853157788515091,
-0.03650498762726784,
-0.014252866618335247,
0.03546911105513573,
-0.017561910673975945,
0.013495143502950668,
0.019086947664618492,
-0.010790360160171986,
-0.0431998074054718,
0.0230769831687212,
-0.014435104094445705,
-0.04803388938307762,
-0.006550947669893503,
-0.005932300351560116,
0.05536174029111862,
-0.05532337725162506,
0.07350873202085495,
0.01199888065457344,
0.027086202055215836,
-0.05041256174445152,
-0.024803441017866135,
0.041550081223249435,
-0.028217989951372147,
0.03897957503795624,
-0.037828605622053146,
-0.019086947664618492,
0.052484311163425446,
0.03662008419632912,
0.03004036284983158,
-0.03970852494239807,
0.011682363227009773,
-0.027009470388293266,
-0.012440086342394352,
0.009370828047394753,
0.019681617617607117,
0.007697123568505049,
0.028371453285217285,
0.00121631333604455,
-0.010425886139273643,
-0.017465995624661446,
0.004397671204060316,
0.029733436182141304,
0.015950549393892288,
0.05094968155026436,
-0.014617341570556164,
-0.006522173061966896,
0.02311534993350506,
0.004057175479829311,
0.04024564474821091,
0.0252638291567564,
-0.027220482006669044,
-0.02418958954513073,
0.017523545771837234,
0.03638989105820656,
0.03261086717247963,
0.05455606058239937,
-0.00909747276455164,
0.041588444262742996,
-0.04461933672428131,
0.024592429399490356,
0.01014773454517126,
0.029234683141112328,
0.016669906675815582,
0.0039157019928097725,
-0.008306179195642471,
0.07515845447778702,
-0.015998506918549538,
-0.02775760181248188,
0.0507194884121418,
0.0315941758453846,
-0.01568198949098587,
0.004860457964241505,
0.0002901408006437123,
-0.0804145559668541,
-0.00021505786571651697,
-0.022156206890940666,
-0.026894373819231987,
-0.02052566222846508,
0.07381565123796463,
0.0788799300789833,
-0.016401346772909164,
0.0481489859521389,
0.030654214322566986,
0.013725338503718376,
0.012229074724018574,
-0.04753513261675835,
0.0126319145783782,
0.004090745467692614,
0.03268759697675705,
-0.036735180765390396,
0.017590684816241264,
-0.0431998074054718,
-0.028448184952139854,
-0.047611866146326065,
-0.057356759905815125,
-0.027143750339746475,
0.01678500510752201,
-0.03424140810966492,
-0.013658198527991772,
0.011548083275556564,
-0.024362236261367798,
0.043890390545129776,
0.06848281621932983
]
|
41,440 | pyglove.core.symbolic.boilerplate | boilerplate_class | Create a boilerplate class using a symbolic object.
As the name indicates, a boilerplate class is a class that can be used
as a boilerplate to create object.
Implementation-wise it's a class that extends the type of input value, while
setting the default values of its (inherited) schema using the value from
input.
An analogy to boilerplate class is prebound function.
For example::
# A regular function: correspond to a pg.Object subclass.
def f(a, b, c)
return a + b + c
# A partially bound function: correspond to a boilerplate class created
# from a partially bound object.
def g(c):
return f(1, 2, c)
# A fully bound function: correspond to a boilerplate class created from
# a fully bound object.
def h():
return f(1, 2, 3)
Boilerplate class can be created with a value that is fully bound
(like function `h` above), or partially bound (like function `g` above).
Since boilerplate class extends the type of the input, we can rebind members
of its instances as we modify the input.
Here are a few examples::
@pg.members([
('a', pg.typing.Str(), 'Field A.'),
('b', pg.typing.Int(), 'Field B.'),
])
class A(pg.Object):
pass
A1 = pg.boilerplate_class('A1', A.partial(a='foo'))
assert A1(b=1) == A(a='foo', b=1)
A2 = pg.boilerplate_class('A2', A(a='bar', b=2))
assert A2() == A(a='bar', b=2)
Args:
cls_name: Name of the boilerplate class.
value: Value that is used as the default value of the boilerplate class.
init_arg_list: An optional list of strings as __init__ positional arguments
names.
**kwargs: Keyword arguments for infrequently used options. Acceptable
keywords are: * `serialization_key`: An optional string to be used as the
serialization key for the class during `sym_jsonify`. If None,
`cls.__type_name__` will be used. This is introduced for scenarios when we
want to relocate a class, before the downstream can recognize the new
location, we need the class to serialize it using previous key. *
`additional_keys`: An optional list of strings as additional keys to
deserialize an object of the registered class. This can be useful when we
need to relocate or rename the registered class while being able to load
existing serialized JSON values.
Returns:
A class which extends the input value's type, with its schema's default
values set from the input value.
Raises:
TypeError: Keyword argumment provided is not supported.
| def boilerplate_class(
cls_name: str,
value: pg_object.Object,
init_arg_list: Optional[List[str]] = None,
**kwargs) -> Type[pg_object.Object]:
"""Create a boilerplate class using a symbolic object.
As the name indicates, a boilerplate class is a class that can be used
as a boilerplate to create object.
Implementation-wise it's a class that extends the type of input value, while
setting the default values of its (inherited) schema using the value from
input.
An analogy to boilerplate class is prebound function.
For example::
# A regular function: correspond to a pg.Object subclass.
def f(a, b, c)
return a + b + c
# A partially bound function: correspond to a boilerplate class created
# from a partially bound object.
def g(c):
return f(1, 2, c)
# A fully bound function: correspond to a boilerplate class created from
# a fully bound object.
def h():
return f(1, 2, 3)
Boilerplate class can be created with a value that is fully bound
(like function `h` above), or partially bound (like function `g` above).
Since boilerplate class extends the type of the input, we can rebind members
of its instances as we modify the input.
Here are a few examples::
@pg.members([
('a', pg.typing.Str(), 'Field A.'),
('b', pg.typing.Int(), 'Field B.'),
])
class A(pg.Object):
pass
A1 = pg.boilerplate_class('A1', A.partial(a='foo'))
assert A1(b=1) == A(a='foo', b=1)
A2 = pg.boilerplate_class('A2', A(a='bar', b=2))
assert A2() == A(a='bar', b=2)
Args:
cls_name: Name of the boilerplate class.
value: Value that is used as the default value of the boilerplate class.
init_arg_list: An optional list of strings as __init__ positional arguments
names.
**kwargs: Keyword arguments for infrequently used options. Acceptable
keywords are: * `serialization_key`: An optional string to be used as the
serialization key for the class during `sym_jsonify`. If None,
`cls.__type_name__` will be used. This is introduced for scenarios when we
want to relocate a class, before the downstream can recognize the new
location, we need the class to serialize it using previous key. *
`additional_keys`: An optional list of strings as additional keys to
deserialize an object of the registered class. This can be useful when we
need to relocate or rename the registered class while being able to load
existing serialized JSON values.
Returns:
A class which extends the input value's type, with its schema's default
values set from the input value.
Raises:
TypeError: Keyword argumment provided is not supported.
"""
if not isinstance(value, pg_object.Object):
raise ValueError('Argument \'value\' must be an instance of '
'symbolic.Object subclass.')
serialization_key = kwargs.pop('serialization_key', None)
additional_keys = kwargs.pop('additional_keys', None)
if kwargs:
raise TypeError(
f'Unsupported keyword arguments: {list(kwargs.keys())!r}.')
base_cls = value.__class__
class _BoilerplateClass(base_cls):
"""Boilerplate class."""
auto_register = False
is_boilerplate = True
caller_module = inspect.getmodule(inspect.stack()[1][0])
cls_module = caller_module.__name__ if caller_module else '__main__'
cls = _BoilerplateClass
cls.__name__ = cls_name
cls.__qualname__ = cls.__qualname__.replace(
'boilerplate_class.<locals>._BoilerplateClass', cls_name)
cls.__module__ = cls_module
# Enable automatic registration for subclass.
cls.auto_register = True
allow_partial = value.allow_partial
def _freeze_field(path: object_utils.KeyPath,
field: pg_typing.Field,
value: Any) -> Any:
# We do not do validation since Object is already in valid form.
del path
if not isinstance(field.key, pg_typing.ListKey):
# Recursively freeze dict field.
if isinstance(field.value, pg_typing.Dict) and field.value.schema:
field.value.schema.apply(
value, allow_partial=allow_partial, child_transform=_freeze_field)
field.value.set_default(value)
if all(f.frozen for f in field.value.schema.values()):
field.value.freeze()
else:
if value != pg_typing.MISSING_VALUE:
field.value.freeze(copy.deepcopy(value), apply_before_use=False)
else:
field.value.set_default(
pg_typing.MISSING_VALUE, use_default_apply=False)
return value
# NOTE(daiyip): we call `cls.__schema__.apply` to freeze fields that have
# default values. But we no longer need to formalize `cls.__schema__`, since
# it's copied from the boilerplate object's class which was already
# formalized.
with flags.allow_writable_accessors():
cls.__schema__.apply(
value._sym_attributes, # pylint: disable=protected-access
allow_partial=allow_partial,
child_transform=_freeze_field,
)
if init_arg_list is not None:
schema_utils.validate_init_arg_list(init_arg_list, cls.__schema__)
cls.__schema__.metadata['init_arg_list'] = init_arg_list
cls.register_for_deserialization(serialization_key, additional_keys)
return cls
| (cls_name: str, value: pyglove.core.symbolic.object.Object, init_arg_list: Optional[List[str]] = None, **kwargs) -> Type[pyglove.core.symbolic.object.Object] | [
0.058727383613586426,
-0.054185155779123306,
-0.028097495436668396,
-0.024298906326293945,
-0.014098993502557278,
-0.028398970142006874,
-0.008642291650176048,
0.0045522768050432205,
0.009612036868929863,
-0.032619625329971313,
0.023615563288331032,
0.06861577183008194,
0.038689326494932175,
0.02845926582813263,
-0.009220118634402752,
0.0004324285837356001,
0.07355996966362,
0.03537309914827347,
0.01093350350856781,
-0.007652447558939457,
0.05595381185412407,
0.018239254131913185,
0.007562004961073399,
0.09502500295639038,
-0.033282868564128876,
-0.02391703799366951,
0.00002671275069587864,
0.07761983573436737,
-0.03665939345955849,
-0.01613897643983364,
0.05241649970412254,
-0.041724178940057755,
-0.02186700701713562,
0.009657258167862892,
0.06761085242033005,
-0.050487060099840164,
0.023736152797937393,
0.08417189866304398,
-0.09261320531368256,
-0.056757744401693344,
0.03374513238668442,
0.022128285840153694,
-0.08393071591854095,
-0.03985502943396568,
0.02532392367720604,
0.028298478573560715,
0.02868034690618515,
0.029263200238347054,
-0.03483044356107712,
-0.04610561951994896,
0.04642719402909279,
0.00411011278629303,
0.02230917103588581,
0.0018251815345138311,
0.02781611867249012,
0.014752189628779888,
-0.018269401043653488,
0.0541047640144825,
0.007255504839122295,
0.01494312472641468,
-0.03549369052052498,
0.02801710180938244,
-0.01981697417795658,
-0.04924096167087555,
0.012380584143102169,
0.02878084033727646,
-0.05639597401022911,
-0.0584862045943737,
-0.03050929680466652,
0.0019834560807794333,
-0.021022874861955643,
-0.044738929718732834,
0.00931558571755886,
0.05072823911905289,
-0.0025951997376978397,
-0.04429676756262779,
0.01589779555797577,
-0.03830745816230774,
0.010109471157193184,
-0.05024587735533714,
0.026168053969740868,
-0.0368201807141304,
-0.07440409809350967,
-0.09213084727525711,
-0.007682594936341047,
-0.000444047967903316,
-0.046386994421482086,
-0.010034102015197277,
0.01937481015920639,
-0.0009509032825008035,
-0.07235406339168549,
-0.0019570770673453808,
0.0055421204306185246,
0.0757707878947258,
-0.01721423864364624,
-0.035775065422058105,
0.015335042029619217,
-0.036317721009254456,
-0.019244171679019928,
0.06998246163129807,
0.017184089869260788,
-0.01611887849867344,
-0.04445755481719971,
0.04297027736902237,
0.0184100903570652,
0.006155120208859444,
-0.02056061290204525,
-0.0004968061111867428,
-0.011355568654835224,
-0.06680691987276077,
-0.0649176761507988,
-0.015184304676949978,
-0.01711374707520008,
-0.03008723258972168,
-0.002359044039621949,
-0.007225357461720705,
-0.01699315570294857,
0.040518276393413544,
0.05691853165626526,
0.0001772737450664863,
0.0287004467099905,
-0.0005423414404504001,
-0.023293988779187202,
0.01990741677582264,
0.06861577183008194,
0.021243957802653313,
0.05824502184987068,
0.02596707083284855,
-0.014209534972906113,
0.033182378858327866,
0.0138075677677989,
0.014882829040288925,
-0.0660029873251915,
0.009612036868929863,
0.02251015417277813,
0.013435748405754566,
-0.014933074824512005,
-0.0034971132408827543,
-0.02781611867249012,
0.02717297151684761,
0.03483044356107712,
-0.010822962038218975,
0.06837458908557892,
-0.0243592020124197,
0.01784733682870865,
-0.03199657425284386,
0.015144107863307,
0.010762667283415794,
-0.023273890838027,
0.005662710405886173,
0.00973765179514885,
0.004203067626804113,
0.025062644854187965,
0.056436169892549515,
-0.0812375396490097,
-0.002454511122778058,
-0.017445368692278862,
-0.009119627065956593,
-0.018028222024440765,
0.0058486200869083405,
0.007752939127385616,
-0.0006293296464718878,
0.026710709556937218,
-0.07106777280569077,
-0.015134058892726898,
0.017616204917430878,
0.017676500603556633,
-0.07126875221729279,
0.009406028315424919,
0.03505152463912964,
0.002091484609991312,
-0.04252811148762703,
0.027574937790632248,
0.03649860620498657,
0.03874962031841278,
0.056637153029441833,
-0.006667627952992916,
-0.03288090229034424,
0.06648534536361694,
-0.02357536554336548,
0.03398631140589714,
-0.002109070774167776,
-0.018982892856001854,
0.02661021798849106,
0.046547781676054,
0.04534188285470009,
0.0013591509778052568,
0.026891594752669334,
0.07938849180936813,
0.057199910283088684,
0.013586485758423805,
0.013898010365664959,
0.019847122952342033,
0.013445797376334667,
0.007155013270676136,
-0.006496792193502188,
0.013767370954155922,
0.003745830385014415,
-0.07983065396547318,
0.04827624186873436,
-0.0053411368280649185,
-0.011566601693630219,
0.055149875581264496,
-0.0443771593272686,
0.05181355029344559,
-0.006220439914613962,
0.04972332343459129,
-0.020198842510581017,
-0.007396193221211433,
-0.07263544201850891,
-0.022550350055098534,
-0.009089479222893715,
-0.04610561951994896,
-0.0015877698315307498,
-0.022248875349760056,
-0.08067478239536285,
0.06885695457458496,
-0.04578404501080513,
-0.012551420368254185,
0.0281376913189888,
0.04698994755744934,
0.015495829284191132,
-0.04614581540226936,
0.056556761264801025,
0.04602522403001785,
-0.015626467764377594,
-0.057722464203834534,
-0.05068804323673248,
0.023354284465312958,
-0.039875131100416183,
-0.058606792241334915,
-0.00931558571755886,
-0.02628864347934723,
-0.006155120208859444,
0.011516355909407139,
-0.010310454294085503,
0.05322043597698212,
-0.026107758283615112,
-0.05249689519405365,
-0.0035749943926930428,
0.011345519684255123,
0.026650413870811462,
0.0016518332995474339,
-0.0052004484459757805,
-0.027112675830721855,
-0.006084776017814875,
-0.019847122952342033,
0.012400683015584946,
-0.011616847477853298,
-0.028218084946274757,
-0.018570877611637115,
0.004461834207177162,
0.024741070345044136,
-0.015847550705075264,
-0.009225143119692802,
-0.008642291650176048,
-0.041060931980609894,
-0.04148299619555473,
-0.008471455425024033,
0.03933247551321983,
0.0002466758596710861,
-0.06363137811422348,
-0.013737223111093044,
0.046909552067518234,
0.023012612015008926,
-0.03507162258028984,
-0.019867220893502235,
0.020641006529331207,
-0.03730253875255585,
-0.0028187937568873167,
0.07524822652339935,
0.03344365581870079,
0.008958839811384678,
0.010742569342255592,
-0.06407354772090912,
-0.04642719402909279,
-0.045502666383981705,
-0.026670511811971664,
0.029082315042614937,
-0.0746050775051117,
0.009622085839509964,
-0.055793024599552155,
0.058727383613586426,
-0.026650413870811462,
0.026992086321115494,
0.022349366918206215,
-0.032760314643383026,
-0.014792386442422867,
0.006160144694149494,
0.008561898022890091,
0.019425056874752045,
-0.00487133814021945,
0.028620053082704544,
0.006135021802037954,
0.056114599108695984,
-0.02046012133359909,
-0.04276929050683975,
0.01233033835887909,
-0.01633995957672596,
-0.08075517416000366,
0.023776350542902946,
0.030469100922346115,
0.014088944531977177,
0.044095784425735474,
0.00022375117987394333,
-0.05100961774587631,
0.00931056123226881,
-0.015033567324280739,
-0.006918857339769602,
0.08971904218196869,
-0.0061199478805065155,
0.03667949140071869,
0.021083170548081398,
0.06049603968858719,
0.06025485694408417,
-0.03193628042936325,
0.023133203387260437,
-0.007873529568314552,
0.015294845215976238,
0.006768119987100363,
-0.025705792009830475,
-0.05635577812790871,
-0.00984316784888506,
0.005934038199484348,
-0.0563155822455883,
-0.03736283630132675,
-0.008084561675786972,
0.041282013058662415,
-0.015023517422378063,
-0.034810345619916916,
-0.025806283578276634,
0.014711993746459484,
0.027775922790169716,
0.07496684789657593,
0.03671968728303909,
0.038367751985788345,
0.017405172809958458,
-0.04196535795927048,
-0.015314944088459015,
-0.052215516567230225,
0.0638725608587265,
-0.004916559439152479,
-0.024982251226902008,
0.02596707083284855,
-0.04727132245898247,
-0.015294845215976238,
0.06588239967823029,
-0.009551741182804108,
0.03298139572143555,
-0.009566815569996834,
-0.0021618290338665247,
-0.02584647946059704,
-0.025022447109222412,
0.0012190906563773751,
0.06431472301483154,
-0.05920974537730217,
-0.01228009257465601,
-0.05852640047669411,
-0.04622620716691017,
-0.021927300840616226,
0.03336326405405998,
-0.010260208509862423,
-0.02956467494368553,
0.02964506857097149,
0.023736152797937393,
0.029805855825543404,
-0.05434594303369522,
0.007340922951698303,
0.02349497377872467,
-0.004471883177757263,
0.019837072119116783,
-0.013646780513226986,
-0.011546502821147442,
-0.03907119482755661,
-0.009134700521826744,
0.011114388704299927,
-0.010461191646754742,
0.02998674102127552,
-0.08159931004047394,
0.042045749723911285,
0.014028649777173996,
-0.03617703169584274,
-0.0012159502366557717,
-0.01342569850385189,
-0.0008717660093680024,
0.031152445822954178,
0.07653452455997467,
-0.015435533598065376,
-0.012340388260781765,
0.0020952532067894936,
-0.003620215691626072,
-0.005084882955998182,
0.004499518312513828,
-0.010561684146523476,
-0.0046326699666678905,
0.009089479222893715,
-0.01384776458144188,
0.05012528970837593,
0.021786613389849663,
0.01088325772434473,
0.056878335773944855,
-0.05941072851419449,
0.06905793398618698,
0.014320075511932373,
-0.008898545056581497,
-0.051572371274232864,
0.07826298475265503,
-0.01936476118862629,
0.012099207378923893,
0.06037544831633568,
-0.00925026647746563,
-0.016641434282064438,
-0.028660248965024948,
-0.009431151673197746,
0.007431365549564362,
-0.030670084059238434,
0.03700106590986252,
-0.03981483355164528,
-0.012038912624120712,
-0.0017184090102091432,
0.028439167886972427,
0.027233267202973366,
0.010863158851861954,
0.04272909462451935,
-0.006722898688167334,
0.03720204904675484,
0.03973444178700447,
-0.0019457716261968017,
0.0021103268954902887,
0.0059089153073728085,
0.019002990797162056,
0.016581140458583832,
-0.06660594046115875,
-0.024379299953579903,
0.004758284892886877,
-0.044095784425735474,
0.02554500475525856,
-0.028057299554347992,
0.0011512587079778314,
0.02683129906654358,
-0.025404317304491997,
-0.00022799067664891481,
0.006325955968350172,
0.011556551791727543,
0.02717297151684761,
0.049964502453804016,
-0.03667949140071869,
0.03824716433882713,
0.08690527081489563,
0.035353001207113266,
0.017797090113162994,
-0.019987810403108597,
0.07725806534290314,
0.035232409834861755,
-0.04694974794983864,
-0.05852640047669411,
-0.025605300441384315,
-0.06672652810811996,
0.017907630652189255,
-0.02727346308529377,
0.006969103589653969,
-0.011546502821147442,
0.06447551399469376,
-0.028961725533008575,
-0.02910241298377514,
0.07975026220083237,
0.020641006529331207,
-0.01590784452855587,
-0.006496792193502188,
-0.007265554275363684,
0.03304168954491615,
-0.0004892692668363452,
0.04598502814769745,
-0.04244771972298622,
0.020721400156617165,
-0.019666237756609917,
-0.0027886463794857264,
-0.01158669963479042,
-0.02924310229718685,
-0.06190292164683342,
0.06150095537304878,
0.04477912560105324,
0.03181568905711174,
0.018118664622306824,
0.025725889950990677,
0.002585150534287095,
0.03907119482755661,
-0.012591617181897163,
0.04361342266201973,
0.03282060846686363,
-0.035895656794309616,
0.06740987300872803,
0.015124009922146797,
-0.0043512932024896145,
-0.06399314850568771,
-0.01206906046718359,
0.02024908922612667,
0.03374513238668442,
0.04743210971355438,
-0.0454624705016613,
0.007511758711189032,
0.019103482365608215,
-0.04630660265684128,
0.00003699745502672158,
-0.009446225129067898,
-0.046386994421482086,
-0.03661919757723808,
-0.004225678276270628,
-0.05076843500137329,
-0.0040548425167799,
-0.0010312966769561172,
0.01581740193068981,
-0.00584359560161829,
0.01980692520737648,
-0.009918536059558392,
0.03292109817266464,
0.006396300625056028,
0.015274747274816036,
-0.04727132245898247,
-0.07311780005693436,
-0.02293221838772297,
0.05876757949590683,
0.031976476311683655,
0.023515071719884872,
-0.02749454416334629,
0.018339745700359344,
0.022429760545492172,
-0.03205687180161476,
0.06431472301483154,
0.04417617619037628,
0.012400683015584946,
-0.03541329503059387,
-0.007054521236568689,
0.039975620806217194,
-0.002298749051988125,
0.009767798706889153,
0.005205472931265831,
0.037081457674503326,
0.030469100922346115,
-0.022128285840153694,
0.03169510141015053,
0.05096941813826561,
0.037061359733343124,
0.017555909231305122,
-0.02574598789215088,
-0.021726317703723907,
0.002585150534287095,
0.02379644848406315,
-0.06423433125019073,
-0.016812270507216454,
-0.03969424590468407,
-0.028177889063954353,
0.03298139572143555,
0.025605300441384315,
-0.07653452455997467,
-0.06740987300872803,
0.01959589309990406,
0.03677998483181,
0.020108399912714958,
0.02044002339243889,
0.004429174121469259,
0.03422749415040016,
0.03949325904250145,
-0.04401538893580437,
-0.005160251632332802,
0.044980112463235855,
-0.015747059136629105,
0.04405558854341507,
0.015626467764377594,
0.0033463756553828716,
-0.0189225971698761,
0.053501810878515244,
0.025806283578276634,
0.029283298179507256,
0.040759455412626266,
0.018751762807369232,
-0.032318148761987686,
0.03842804953455925,
-0.04642719402909279,
-0.10410945862531662,
0.01142591331154108,
0.01599828712642193,
0.005391382612287998,
-0.07404232770204544,
-0.014229632914066315,
-0.053943976759910583,
-0.048115454614162445,
0.025243530049920082,
-0.02608766034245491,
0.01114453561604023,
0.00040479336166754365,
0.1104605421423912,
-0.03872952237725258,
-0.020048106089234352,
0.017254434525966644,
0.014159288257360458,
-0.0768962949514389,
-0.027233267202973366,
0.03862903267145157,
0.01456125546246767,
-0.06113918498158455,
0.06527944654226303,
-0.009179921820759773,
0.02771562710404396,
0.0030624864157289267,
-0.030569592490792274,
-0.011064142920076847,
-0.03690057247877121,
0.04715073108673096,
-0.03866922855377197,
-0.011827879585325718,
0.015375238843262196,
0.01787748374044895,
0.02845926582813263,
-0.06085781008005142,
-0.03812657296657562,
-0.06146075949072838,
0.00123793282546103,
0.02661021798849106,
-0.010109471157193184,
-0.05040666460990906,
0.002821305999532342,
0.03300149366259575,
0.012933289632201195,
-0.02198759652674198,
0.024821463972330093,
0.002375373849645257,
0.0138075677677989,
0.012209748849272728,
-0.03374513238668442,
0.021505236625671387,
0.008571946993470192,
-0.022871924564242363,
-0.03179559111595154,
0.025283725932240486,
0.018379943445324898,
-0.04188496619462967,
-0.006969103589653969,
0.0018992942059412599,
0.045743849128484726,
-0.03456916660070419,
-0.06660594046115875,
0.010521487332880497,
0.06881675869226456,
-0.0519341416656971,
-0.013405600562691689,
0.014872780069708824,
-0.04461834207177162,
-0.004783407784998417,
-0.0033287894912064075,
-0.06475688517093658,
0.007632349152117968,
-0.003858883399516344,
-0.04049817845225334,
0.025183234363794327,
0.014681845903396606,
-0.022992514073848724,
-0.03537309914827347,
0.025725889950990677,
-0.009079430252313614,
-0.003105195239186287,
-0.06576180458068848,
0.04863801226019859,
-0.051049813628196716,
-0.004898973274976015,
0.07854435592889786,
-0.043573226779699326,
-0.04449775069952011,
0.015144107863307,
0.021364547312259674,
-0.04642719402909279,
-0.0020651055965572596,
-0.033704936504364014,
-0.05760187655687332,
-0.07661491632461548,
-0.009029184468090534,
-0.018359843641519547,
0.028740642592310905,
-0.018450286239385605,
0.006371177267283201,
0.04903997853398323,
-0.052657682448625565,
-0.029082315042614937,
0.04899978265166283,
-0.0006199085037223995,
-0.04698994755744934,
-0.0036579000297933817,
-0.005883792415261269,
0.014651698060333729,
-0.06210390478372574,
0.01851058192551136,
-0.0034242565743625164,
-0.002209562575444579,
-0.006466644816100597,
-0.027032282203435898,
-0.024198414757847786,
-0.02855975739657879,
0.009210069663822651,
0.014571305364370346,
0.026228349655866623,
-0.014681845903396606,
0.023454776033759117,
-0.04015650600194931,
0.024720972403883934,
0.029062217101454735,
0.04445755481719971,
-0.024419497698545456,
0.002292468212544918,
0.031875986605882645,
0.002354019321501255,
0.04481932520866394,
0.07838357239961624,
-0.005989308934658766,
-0.05165276303887367,
-0.0303083136677742,
-0.05314004048705101,
-0.022208677604794502,
0.056235186755657196,
-0.0243592020124197,
-0.0037533671129494905,
0.011285223998129368,
0.011928372085094452,
0.056556761264801025,
-0.030469100922346115,
0.03085096925497055,
-0.007270578760653734,
-0.020319433882832527,
-0.04630660265684128,
0.00018920714501291513,
0.012149453163146973,
0.0790267214179039,
0.005828522145748138,
-0.08103655278682709,
0.0243592020124197,
0.07155013084411621,
-0.047914471477270126,
-0.013485994189977646,
-0.03830745816230774,
-0.06363137811422348,
0.03617703169584274,
-0.05933033302426338,
0.0011160866124555469,
0.002683129860088229,
0.014480862766504288,
-0.007582103367894888,
0.04033739119768143,
0.016963008791208267,
0.000964720849879086,
0.037503525614738464,
0.03018772415816784,
0.00914977490901947,
0.026750905439257622,
-0.010230060666799545,
0.000011913769412785769,
0.06809321790933609,
-0.013375452719628811,
-0.043894801288843155,
0.00007886247476562858,
-0.04461834207177162,
-0.04124181717634201,
-0.019404958933591843,
-0.01288304291665554,
0.013737223111093044,
-0.04180457070469856,
0.0854581892490387,
0.027554839849472046,
-0.018470386043190956,
0.008411159738898277
]
|
41,442 | pyglove.core.symbolic.base | clone | Clones a value. Use symbolic clone if possible.
Example::
@pg.members([
('x', pg.typing.Int()),
('y', pg.typing.Any())
])
class A(pg.Object):
pass
# B is not a symbolic object.
class B:
pass
# Shallow copy on non-symbolic values (by reference).
a = A(1, B())
b = pg.clone(a)
assert pg.eq(a, b)
assert a.y is b.y
# Deepcopy on non-symbolic values.
c = pg.clone(a, deep=True)
assert pg.ne(a, c)
assert a.y is not c.y
# Copy with override
d = pg.clone(a, override={'x': 2})
assert d.x == 2
assert d.y is a.y
Args:
x: value to clone.
deep: If True, use deep clone, otherwise use shallow clone.
memo: Optional memo object for deep clone.
override: Value to override if value is symbolic.
Returns:
Cloned instance.
| def clone(
x: Any,
deep: bool = False,
memo: Optional[Any] = None,
override: Optional[Dict[str, Any]] = None
) -> Any:
"""Clones a value. Use symbolic clone if possible.
Example::
@pg.members([
('x', pg.typing.Int()),
('y', pg.typing.Any())
])
class A(pg.Object):
pass
# B is not a symbolic object.
class B:
pass
# Shallow copy on non-symbolic values (by reference).
a = A(1, B())
b = pg.clone(a)
assert pg.eq(a, b)
assert a.y is b.y
# Deepcopy on non-symbolic values.
c = pg.clone(a, deep=True)
assert pg.ne(a, c)
assert a.y is not c.y
# Copy with override
d = pg.clone(a, override={'x': 2})
assert d.x == 2
assert d.y is a.y
Args:
x: value to clone.
deep: If True, use deep clone, otherwise use shallow clone.
memo: Optional memo object for deep clone.
override: Value to override if value is symbolic.
Returns:
Cloned instance.
"""
if isinstance(x, Symbolic):
return x.sym_clone(deep, memo, override)
else:
assert not override
return copy.deepcopy(x, memo) if deep else copy.copy(x)
| (x: Any, deep: bool = False, memo: Optional[Any] = None, override: Optional[Dict[str, Any]] = None) -> Any | [
0.009098944254219532,
-0.06728599965572357,
0.0839504599571228,
0.02266884036362171,
-0.0801815539598465,
0.0038774434942752123,
-0.01729261316359043,
0.04142098128795624,
0.04980863630771637,
-0.03268229961395264,
0.008988093584775925,
0.07131355255842209,
-0.04796113446354866,
0.06200214475393295,
-0.05228428915143013,
-0.02538466826081276,
0.004554090555757284,
0.04777638241648674,
-0.012442921288311481,
0.03223889693617821,
0.03076089732348919,
0.06968774646520615,
0.008383037522435188,
0.010826357640326023,
-0.01154688373208046,
-0.006470873486250639,
0.055055540055036545,
0.05051068589091301,
-0.04522683098912239,
0.06987249851226807,
-0.0018879154231399298,
-0.01722794957458973,
-0.0032793148420751095,
0.05021508410573006,
0.010327531956136227,
-0.055683691054582596,
-0.0352872759103775,
0.13457199931144714,
-0.08358096331357956,
-0.09333577007055283,
-0.03386469930410385,
-0.008073580451309681,
-0.0076070865616202354,
0.002632689429447055,
0.005935098044574261,
-0.023075291886925697,
0.00424925284460187,
0.022243915125727654,
-0.03264534845948219,
-0.08897566050291061,
0.004960541147738695,
0.010447620414197445,
-0.008230618201196194,
-0.006295360624790192,
0.017514312639832497,
0.03129667416214943,
0.05054763704538345,
0.041199278086423874,
-0.027453869581222534,
0.01764363795518875,
-0.06643614917993546,
0.003584152553230524,
-0.020433364436030388,
-0.05756814032793045,
-0.010854070074856281,
-0.05520334094762802,
-0.06606664508581161,
-0.04984558746218681,
0.016091736033558846,
-0.044820383191108704,
-0.03986907750368118,
0.02582806907594204,
0.02900577150285244,
0.0019525779644027352,
0.006932748947292566,
0.01783762499690056,
0.033975549042224884,
-0.022890541702508926,
0.013763885013759136,
-0.04064502939581871,
-0.06887485086917877,
-0.013828547671437263,
-0.08483725786209106,
-0.003083017887547612,
-0.08121615648269653,
0.03798462823033333,
0.02900577150285244,
0.005602547898888588,
0.08572406321763992,
0.02327851578593254,
0.041125379502773285,
-0.001516105723567307,
-0.018502725288271904,
-0.024627191945910454,
-0.02026708982884884,
-0.010983395390212536,
-0.004189209081232548,
0.0257541686296463,
0.03223889693617821,
0.005274616181850433,
-0.019620463252067566,
-0.00643392326310277,
-0.10959377884864807,
0.04260338097810745,
-0.01596241071820259,
0.02484889328479767,
0.05579454079270363,
-0.00764865567907691,
0.017865337431430817,
-0.02381429262459278,
-0.07774285227060318,
0.008045868016779423,
-0.038908377289772034,
-0.017772963270545006,
0.021985266357660294,
0.038908377289772034,
-0.008161337114870548,
-0.03678375110030174,
-0.008937288075685501,
-0.005778060294687748,
-0.03375384956598282,
0.057087790220975876,
0.004651084542274475,
0.007879593409597874,
0.04393358156085014,
0.042640332132577896,
0.07393700629472733,
-0.009634719230234623,
-0.0756736546754837,
0.030132746323943138,
-0.003103802213445306,
-0.005819628946483135,
0.0004705354804173112,
0.07120270282030106,
-0.013736172579228878,
0.016211824491620064,
-0.006988173816353083,
0.0046441564336419106,
0.008396893739700317,
-0.07530415058135986,
-0.019158588722348213,
-0.030132746323943138,
0.014881622977554798,
0.05730948969721794,
0.009948794730007648,
-0.03438200056552887,
0.0158238485455513,
0.01767135038971901,
-0.015269597992300987,
0.04426613077521324,
-0.014863148331642151,
0.02778642065823078,
0.00038335652789101005,
0.054796889424324036,
-0.05941564217209816,
0.06599275022745132,
-0.02231781557202339,
-0.006008998025208712,
-0.028433045372366905,
0.046335332095623016,
-0.004415528383105993,
0.008886481635272503,
0.019417239353060722,
-0.04186438024044037,
-0.02255799062550068,
-0.0150294229388237,
0.047739434987306595,
-0.07393700629472733,
0.011334420181810856,
0.02353716641664505,
-0.027047419920563698,
-0.02582806907594204,
0.024368543177843094,
-0.023112241178750992,
0.007676368113607168,
0.04053417965769768,
-0.008433843962848186,
-0.001364841591566801,
-0.02089524082839489,
-0.009089706465601921,
-0.025957394391298294,
-0.056718289852142334,
-0.02213306538760662,
-0.014973998069763184,
0.0046072062104940414,
0.004692653194069862,
-0.021578814834356308,
-0.015121798031032085,
0.012840134091675282,
0.05394703894853592,
-0.037079352885484695,
0.013320484198629856,
0.028784070163965225,
-0.03392012417316437,
0.018595101311802864,
-0.07715165615081787,
0.019897589460015297,
-0.012941746972501278,
-0.02265036664903164,
0.11801838129758835,
0.001320963492617011,
-0.03347672522068024,
0.04282508045434952,
-0.01664598658680916,
-0.01921401359140873,
-0.025606367737054825,
-0.0438966304063797,
-0.03199872374534607,
0.039795178920030594,
-0.020858289673924446,
0.008013537153601646,
-0.0005877363728359342,
0.01930638961493969,
0.0581962913274765,
-0.04031248018145561,
0.022151540964841843,
-0.029301371425390244,
-0.027195218950510025,
0.020211664959788322,
0.023333942517638206,
0.007463905494660139,
-0.04954998567700386,
-0.05653354153037071,
0.06093059480190277,
0.029486121609807014,
0.014336610212922096,
-0.026382319629192352,
0.0063692606054246426,
0.019084688276052475,
-0.0871281623840332,
-0.01009659469127655,
-0.029153570532798767,
0.004378578159958124,
-0.02750929445028305,
0.06798804551362991,
-0.027804894372820854,
0.03475150093436241,
-0.020507264882326126,
0.013283534906804562,
0.032830096781253815,
-0.03201719745993614,
0.03473302349448204,
0.03656205162405968,
0.035324227064847946,
0.013920922763645649,
-0.017403462901711464,
-0.03334739804267883,
0.025587894022464752,
0.012840134091675282,
-0.014650685712695122,
0.0069512235932052135,
-0.009800994768738747,
-0.015325023792684078,
-0.013597609475255013,
0.05158223584294319,
0.02512601763010025,
0.00850774347782135,
0.023315466940402985,
-0.00457025645300746,
0.014576785266399384,
0.02266884036362171,
0.014539835043251514,
0.004849690943956375,
0.01331124734133482,
0.005833485629409552,
-0.05812239274382591,
-0.06118924543261528,
-0.008456937037408352,
0.013745409436523914,
0.030557671561837196,
0.011195858009159565,
0.01225817110389471,
0.02699199505150318,
0.03621102496981621,
-0.017606686800718307,
-0.018133224919438362,
-0.011131195351481438,
0.0432315319776535,
0.0035933901090174913,
-0.03258992359042168,
0.003270077286288142,
0.018992314115166664,
0.0391300767660141,
-0.08742376416921616,
-0.020913714542984962,
0.00594895426183939,
0.02919052168726921,
-0.030372921377420425,
-0.044118329882621765,
-0.005385466385632753,
0.029412221163511276,
0.051360536366701126,
0.015001710504293442,
0.024109892547130585,
0.025273818522691727,
0.05572063848376274,
-0.05139748752117157,
-0.001464144792407751,
-0.030834797769784927,
0.025680268183350563,
0.030132746323943138,
-0.0006414293893612921,
-0.003685765201225877,
0.04153183102607727,
0.006586342118680477,
-0.01863205060362816,
0.015934698283672333,
-0.019158588722348213,
0.03194329887628555,
0.0928923636674881,
0.04131012782454491,
0.0012840133858844638,
-0.00437165005132556,
0.04530073329806328,
-0.007676368113607168,
-0.0852067619562149,
0.048884883522987366,
-0.07371529936790466,
0.038797527551651,
-0.018133224919438362,
-0.041568778455257416,
-0.000044491585867945105,
-0.033624522387981415,
-0.011205095797777176,
-0.02372191660106182,
-0.026751819998025894,
-0.03343977406620979,
0.04537463188171387,
-0.03809547796845436,
0.019158588722348213,
0.009856419637799263,
0.022151540964841843,
0.044044431298971176,
0.07412175089120865,
-0.0046441564336419106,
-0.026289943605661392,
-0.014715348370373249,
-0.035490501672029495,
-0.03234974667429924,
-0.055831488221883774,
0.012110371142625809,
0.052321236580610275,
-0.007884211838245392,
-0.07341970503330231,
0.0403863787651062,
0.015241885557770729,
0.03550897538661957,
-0.010475332848727703,
-0.01384702231734991,
0.025624843314290047,
-0.003743499517440796,
0.004240015521645546,
-0.008992712944746017,
-0.06536459922790527,
0.02919052168726921,
0.005316184833645821,
-0.00914051290601492,
-0.04445088282227516,
-0.04696348309516907,
-0.07401090115308762,
0.037947677075862885,
-0.03367994725704193,
0.016258012503385544,
0.005348516162484884,
0.061041444540023804,
0.0009508858202025294,
-0.054612137377262115,
0.030077321454882622,
-0.01225817110389471,
-0.03975822776556015,
-0.030520722270011902,
-0.023555641993880272,
-0.05793764069676399,
-0.05572063848376274,
-0.013976347632706165,
0.00465801265090704,
-0.032128047198057175,
-0.01110348291695118,
-0.017514312639832497,
0.016091736033558846,
0.08106835931539536,
-0.04954998567700386,
-0.02865474484860897,
0.014447459951043129,
-0.0016500495839864016,
0.018003899604082108,
0.05498163774609566,
0.003699621418491006,
0.06817279756069183,
-0.014890860766172409,
-0.024387016892433167,
-0.009754806756973267,
0.050658486783504486,
0.03798462823033333,
-0.022816641256213188,
-0.04511598125100136,
0.06022854149341583,
0.00454716244712472,
-0.08446776121854782,
-0.015435873530805111,
0.03199872374534607,
0.01071550790220499,
0.018225600942969322,
-0.045522432774305344,
-0.04522683098912239,
0.005694922991096973,
0.04108842834830284,
-0.004946684930473566,
0.007274536415934563,
0.02699199505150318,
0.03201719745993614,
-0.02159729041159153,
-0.019417239353060722,
-0.024460917338728905,
0.03931482881307602,
-0.00725144287571311,
0.09089706838130951,
-0.016701411455869675,
-0.0018290262669324875,
-0.0061059920117259026,
0.035324227064847946,
-0.04611363261938095,
-0.05967429280281067,
0.014770773239433765,
0.020562689751386642,
0.0158238485455513,
-0.00058225158136338,
0.018447300419211388,
0.0059812855906784534,
0.002203145297244191,
-0.02599434368312359,
-0.0001707495393930003,
0.0260867178440094,
0.030372921377420425,
0.0521734356880188,
-0.03942567855119705,
-0.007486999034881592,
-0.02089524082839489,
-0.03393859788775444,
0.05427958816289902,
-0.00014736709999851882,
-0.014909335412085056,
0.0225764662027359,
-0.04814588278532028,
-0.027102844789624214,
0.06292589753866196,
0.06643614917993546,
0.003914393484592438,
-0.03475150093436241,
0.02362954244017601,
0.005801154300570488,
-0.0178099125623703,
0.08439385890960693,
-0.01739422418177128,
-0.025089068338274956,
-0.05605319142341614,
-0.045633282512426376,
-0.00044368900125846267,
-0.0014606807380914688,
0.019287914037704468,
0.032128047198057175,
-0.012821659445762634,
0.035213373601436615,
-0.029245946556329727,
-0.06399744749069214,
-0.03462217375636101,
0.038575828075408936,
0.015001710504293442,
0.03591542690992355,
-0.009223650209605694,
0.04600278288125992,
-0.011740870773792267,
0.014909335412085056,
0.0075424243696033955,
0.05198868736624718,
-0.018003899604082108,
-0.018354926258325577,
-0.032054148614406586,
-0.05860274285078049,
-0.0319802463054657,
-0.041753530502319336,
-0.033735375851392746,
0.020581165328621864,
-0.01127899531275034,
0.019287914037704468,
-0.007653274107724428,
0.01608249917626381,
0.05557284131646156,
-0.02494126744568348,
0.04988253489136696,
-0.01865052618086338,
0.05287548899650574,
-0.06636224687099457,
0.0036118649877607822,
-0.0076301805675029755,
-0.02327851578593254,
-0.019269438460469246,
0.021708140149712563,
0.05202563852071762,
-0.05908309295773506,
-0.04308373108506203,
0.025421617552638054,
0.023666491732001305,
0.02547704242169857,
0.005514791235327721,
0.02196679078042507,
0.009468444623053074,
0.022354766726493835,
-0.03560135141015053,
0.019731314852833748,
-0.03367994725704193,
-0.020488789305090904,
-0.03615560010075569,
0.013024884276092052,
-0.010161257348954678,
-0.010327531956136227,
-0.00418459065258503,
-0.021357115358114243,
-0.02468261681497097,
-0.11121957749128342,
0.04829368367791176,
-0.01565757393836975,
0.007353055290877819,
-0.08136396110057831,
0.022059164941310883,
-0.0004924745880998671,
0.0055009350180625916,
0.027638619765639305,
0.05246903747320175,
-0.009607006795704365,
0.04090368002653122,
-0.007680986542254686,
-0.035047098994255066,
0.04785028472542763,
0.03140752390027046,
-0.01366227213293314,
0.010632369667291641,
0.023204617202281952,
0.007459286600351334,
0.007782599423080683,
-0.010475332848727703,
0.01816093735396862,
-0.018428824841976166,
0.02451634220778942,
-0.007182161323726177,
0.03748580068349838,
0.03462217375636101,
0.028082020580768585,
0.027010468766093254,
-0.03162922337651253,
0.030964123085141182,
-0.0186043381690979,
-0.011011107824742794,
0.001613099593669176,
-0.03246059641242027,
-0.004671868868172169,
0.0016823809128254652,
0.014549072831869125,
0.019343338906764984,
-0.007898068055510521,
0.061743494123220444,
-0.03258992359042168,
0.06946604698896408,
-0.057605091482400894,
-0.025680268183350563,
-0.016904637217521667,
-0.04611363261938095,
0.016415048390626907,
0.03478844836354256,
0.008535455912351608,
0.03828022629022598,
0.07966426014900208,
0.04031248018145561,
0.03268229961395264,
0.020747439935803413,
0.030262071639299393,
0.0019167825812473893,
0.02566179260611534,
-0.027915744110941887,
0.0016904637450352311,
0.019731314852833748,
-0.030132746323943138,
0.0008261795155704021,
-0.029560022056102753,
-0.020913714542984962,
0.03264534845948219,
-0.005514791235327721,
0.025957394391298294,
-0.004625681322067976,
-0.03824327886104584,
0.006295360624790192,
0.10678557306528091,
-0.0321095734834671,
-0.025624843314290047,
-0.04330543056130409,
0.011759346351027489,
-0.06820975244045258,
0.0015230339486151934,
0.049771685153245926,
-0.04397053271532059,
-0.07334580272436142,
0.03351367264986038,
-0.016636749729514122,
-0.013292771764099598,
-0.025236867368221283,
-0.0069512235932052135,
-0.00003644484968390316,
-0.02096913941204548,
0.10759847611188889,
-0.044118329882621765,
0.0054131788201630116,
0.00011792254372267053,
0.0006812661304138601,
-0.051175788044929504,
-0.026142144575715065,
0.012489109300076962,
-0.018456539139151573,
-0.004512521903961897,
-0.056385740637779236,
-0.011205095797777176,
-0.07068540155887604,
-0.005454747471958399,
-0.05088018625974655,
-0.016960062086582184,
-0.03445589914917946,
0.009135894477367401,
-0.05265378952026367,
0.06525374948978424,
-0.045263782143592834,
-0.04289897903800011,
-0.024719567969441414,
-0.013172684237360954,
-0.023463265970349312,
0.04374882951378822,
0.012756996788084507,
-0.027379969134926796,
0.045005131512880325,
-0.014743060804903507,
-0.008978856727480888,
0.09961727261543274,
0.001142564113251865,
-0.01349599752575159,
0.002211228245869279,
0.026936570182442665,
-0.06869009882211685,
-0.0638865977525711,
0.01424423512071371,
-0.008844912983477116,
-0.004078359343111515,
-0.01309878472238779,
-0.03696850314736366,
0.024553293362259865,
-0.02176356501877308,
0.010161257348954678,
0.07936865836381912,
0.06022854149341583,
0.03305179998278618,
-0.015352736227214336,
0.049143534153699875,
-0.005851960275322199,
-0.011029582470655441,
-0.025181442499160767,
-0.017846861854195595,
0.02372191660106182,
0.03262687474489212,
0.037153251469135284,
-0.003302408615127206,
-0.0703158974647522,
0.01984216459095478,
0.030539195984601974,
-0.06432999670505524,
-0.04001687839627266,
-0.02459024265408516,
0.02582806907594204,
-0.022705791518092155,
-0.031352099031209946,
-0.007579374127089977,
0.058491893112659454,
-0.023223090916872025,
0.02037793956696987,
0.042455580085515976,
-0.018216362223029137,
0.0186043381690979,
0.0002559077984187752,
-0.02795269526541233,
0.05198868736624718,
0.032294321805238724,
0.03340282291173935,
-0.05209953710436821,
0.038132429122924805,
-0.0367467999458313,
-0.008817199617624283,
0.05269073694944382,
0.03545355051755905,
-0.004311606287956238,
0.00537622906267643,
-0.06636224687099457,
0.014650685712695122,
0.052579887211322784,
0.01014278270304203,
-0.006415448151528835,
-0.0009907225612550974,
-0.0016385026974603534,
0.026493169367313385,
0.024035992100834846,
-0.016415048390626907,
-0.01146374549716711,
0.014198048040270805,
0.06584494560956955,
0.0012863228330388665,
-0.005459366366267204,
0.025495517998933792,
0.012895558960735798,
0.040866728872060776,
0.018336450681090355,
-0.03414182364940643,
0.014687635935842991,
-0.002258570399135351,
-0.03586000204086304,
0.040940627455711365,
0.020839814096689224,
-0.061410944908857346,
0.060708895325660706,
0.022964442148804665,
0.004821978509426117,
0.030077321454882622,
0.04256642982363701,
-0.009764044545590878,
0.07075930386781693,
-0.005602547898888588,
0.024534817785024643,
0.07519330084323883,
0.04190133139491081,
-0.028248295187950134,
-0.019158588722348213,
-0.0067757111974060535,
0.05317108705639839,
-0.005339278839528561,
-0.018197888508439064,
0.032756198197603226,
-0.04803503304719925,
-0.015177223831415176,
0.03809547796845436,
0.023426316678524017,
-0.023149192333221436,
-0.028617795556783676,
-0.05609013885259628,
0.011038820259273052,
0.01009659469127655,
-0.016202585771679878,
-0.001792076276615262,
-0.011269758455455303,
0.01904773898422718,
-0.016553612425923347,
0.016350386664271355,
0.0005946644814684987,
-0.07135049998760223,
-0.009662431664764881,
-0.009570056572556496,
-0.024387016892433167,
-0.014512122608721256,
-0.03573067486286163,
-0.004124546889215708,
0.037504278123378754,
-0.03343977406620979,
-0.015592911280691624,
0.05139748752117157,
0.00916360691189766
]
|
41,443 | pyglove.core.symbolic.compounding | compound | Function decorator to create compound class.
Example::
@dataclasses.dataclass
class Foo:
x: int
y: int
def sum(self):
return self.x + self.y
@pg.compound
def foo_with_equal_x_y(v: int) -> Foo:
return Foo(v, v)
f = foo_with_equal_x_y(1)
# First of all, the objects of compound classes can be used as an in-place
# replacement for the objects of regular classes, as they are subclasses of
# the regular classes.
assert issubclass(foo_with_equal_x_y, Foo)
assert isinstance(f, Foo)
# We can access symbolic attributes of the compound object.
assert f.v == 1
# We can also access the public APIs of the decomposed object.
assert f.x == 1
assert f.y == 1
assert f.sum() == 2
# Or explicit access the decomposed object.
assert f.decomposed == Foo(1, 1)
# Moreover, symbolic power is fully unleashed to the compound class.
f.rebind(v=2)
assert f.x == 2
assert f.y == 2
assert f.sum() == 4
# Err with runtime type check: 2.5 is not an integer.
f.rebind(v=2.5)
Args:
base_class: The base class of the compond class, which should be a
``pg.Object`` type. If None, it will be infererenced from the return
annotation of `factory_fn`. If the annotation is not present or
`auto_typing` is set to False, `base_class` must be present.
args: Symbolic args specification. See :class:`pg.compound_class` for
details.
**kwargs: Keyword arguments. See :class:`pg.compound_class` for details.
Returns:
A symbolic compound class that subclasses `base_class`.
| def compound(
base_class: Optional[Type[Object]] = None,
args: Optional[
List[
Union[
Tuple[Tuple[str, pg_typing.KeySpec], pg_typing.ValueSpec, str],
Tuple[
Tuple[str, pg_typing.KeySpec], pg_typing.ValueSpec, str, Any
],
]
]
] = None, # pylint: disable=bad-continuation
**kwargs
):
"""Function decorator to create compound class.
Example::
@dataclasses.dataclass
class Foo:
x: int
y: int
def sum(self):
return self.x + self.y
@pg.compound
def foo_with_equal_x_y(v: int) -> Foo:
return Foo(v, v)
f = foo_with_equal_x_y(1)
# First of all, the objects of compound classes can be used as an in-place
# replacement for the objects of regular classes, as they are subclasses of
# the regular classes.
assert issubclass(foo_with_equal_x_y, Foo)
assert isinstance(f, Foo)
# We can access symbolic attributes of the compound object.
assert f.v == 1
# We can also access the public APIs of the decomposed object.
assert f.x == 1
assert f.y == 1
assert f.sum() == 2
# Or explicit access the decomposed object.
assert f.decomposed == Foo(1, 1)
# Moreover, symbolic power is fully unleashed to the compound class.
f.rebind(v=2)
assert f.x == 2
assert f.y == 2
assert f.sum() == 4
# Err with runtime type check: 2.5 is not an integer.
f.rebind(v=2.5)
Args:
base_class: The base class of the compond class, which should be a
``pg.Object`` type. If None, it will be infererenced from the return
annotation of `factory_fn`. If the annotation is not present or
`auto_typing` is set to False, `base_class` must be present.
args: Symbolic args specification. See :class:`pg.compound_class` for
details.
**kwargs: Keyword arguments. See :class:`pg.compound_class` for details.
Returns:
A symbolic compound class that subclasses `base_class`.
"""
if inspect.isfunction(base_class):
assert args is None
return compound_class(base_class, add_to_registry=True, **kwargs)
return lambda fn: compound_class( # pylint: disable=g-long-lambda # pytype: disable=wrong-arg-types
fn, base_class, args, add_to_registry=True, **kwargs
)
| (base_class: Optional[Type[pyglove.core.symbolic.object.Object]] = None, args: Optional[List[Union[Tuple[Tuple[str, pyglove.core.typing.class_schema.KeySpec], pyglove.core.typing.class_schema.ValueSpec, str], Tuple[Tuple[str, pyglove.core.typing.class_schema.KeySpec], pyglove.core.typing.class_schema.ValueSpec, str, Any]]]] = None, **kwargs) | [
-0.02019975706934929,
-0.06757228821516037,
-0.017172791063785553,
-0.02573421224951744,
0.012097876518964767,
-0.008356626145541668,
-0.031308624893426895,
0.005379608832299709,
0.011158817447721958,
-0.04731258749961853,
0.013906064443290234,
0.049350544810295105,
0.013576394878327847,
0.0006649586139246821,
-0.047392506152391434,
0.010499478317797184,
0.07004979997873306,
-0.032667264342308044,
-0.011848126538097858,
-0.008091891184449196,
0.03968023508787155,
0.04815174639225006,
-0.034285642206668854,
0.04239751398563385,
0.01339657511562109,
-0.0035364560317248106,
0.02513481304049492,
0.05806181579828262,
-0.010569408535957336,
-0.06641344726085663,
0.03888103738427162,
-0.01201795693486929,
-0.013026945292949677,
0.03808183968067169,
0.045314591377973557,
-0.03496496006846428,
0.04567423090338707,
0.079400435090065,
-0.025354592129588127,
0.042477432638406754,
0.015204763039946556,
-0.039480436593294144,
-0.058101776987314224,
-0.004283207934349775,
0.06033953279256821,
0.04839150607585907,
0.07216767966747284,
-0.01449547428637743,
-0.06433553248643875,
-0.01808187924325466,
0.020159797742962837,
-0.053466420620679855,
0.030289646238088608,
-0.017832130193710327,
-0.01953042857348919,
-0.015364603139460087,
-0.002119126496836543,
0.05386602133512497,
-0.02655339054763317,
0.027792150154709816,
0.008311671204864979,
0.023636313155293465,
0.002216528868302703,
-0.039780136197805405,
-0.027472469955682755,
0.030549386516213417,
-0.06869116425514221,
-0.034005921334028244,
-0.03442550078034401,
-0.0177821796387434,
-0.021518435329198837,
0.05602385848760605,
0.02267727442085743,
0.0001827855739975348,
0.00806192122399807,
-0.031828105449676514,
0.05666321888566017,
-0.04463526979088783,
0.004605385009199381,
-0.005294694099575281,
0.003801190759986639,
-0.055344536900520325,
-0.04211779311299324,
-0.043036870658397675,
0.01004493422806263,
-0.013706265017390251,
-0.0520278625190258,
0.01269727572798729,
-0.037882037460803986,
-0.011258717626333237,
-0.05358630046248436,
0.032946985214948654,
-0.01230766624212265,
0.017252711579203606,
0.07240743935108185,
-0.04867122694849968,
0.00018153683049604297,
0.019070889800786972,
0.0436762310564518,
0.029630307108163834,
0.010459518060088158,
0.043036870658397675,
0.008021960966289043,
-0.003528963541612029,
0.016303662210702896,
-0.025654291734099388,
-0.03876115754246712,
0.002577417064458132,
-0.019220739603042603,
-0.036803118884563446,
-0.033246684819459915,
-0.05418569967150688,
0.0409989133477211,
0.02004990726709366,
0.009710269048810005,
-0.025254692882299423,
0.010469508357346058,
0.07464519888162613,
-0.01597399264574051,
-0.012507466599345207,
0.07152832299470901,
-0.019340619444847107,
0.013706265017390251,
0.0436762310564518,
0.027772169560194016,
-0.0049825068563222885,
0.03034958615899086,
0.03916075825691223,
-0.007092892192304134,
0.0022689762990921736,
0.02625369094312191,
0.0031768165063112974,
-0.07196787744760513,
0.004318172577768564,
0.0000017999540204982623,
0.04179811477661133,
0.027971969917416573,
0.0016008957754820585,
-0.07852131128311157,
0.027432508766651154,
0.05410578101873398,
-0.011788186617195606,
0.009640339761972427,
0.044155750423669815,
-0.039200715720653534,
-0.0006824411102570593,
-0.011048927903175354,
-0.032087843865156174,
-0.01722274161875248,
0.026633311063051224,
-0.013995974324643612,
0.027832109481096268,
0.0711287185549736,
0.04491499066352844,
-0.0328870452940464,
-0.05230758339166641,
-0.017732230946421623,
0.0012812160421162844,
-0.030968965962529182,
0.03314678370952606,
-0.022237716242671013,
0.05954033508896828,
0.022777175530791283,
0.01162834744900465,
0.027712229639291763,
0.0030019916594028473,
0.004592897370457649,
-0.09614365547895432,
-0.037062857300043106,
-0.007977006025612354,
0.0015222245128825307,
-0.030789146199822426,
0.02793200872838497,
0.0368630588054657,
-0.0170928705483675,
-0.004150840453803539,
0.015444522723555565,
-0.027492448687553406,
0.016093872487545013,
-0.03670321777462959,
0.05230758339166641,
-0.03834157809615135,
0.009305674582719803,
-0.005299689248204231,
0.003993498161435127,
0.04131859540939331,
-0.01558438315987587,
0.022897055372595787,
0.08447534590959549,
-0.015204763039946556,
-0.05614373832941055,
-0.0012862110743299127,
-0.014955013059079647,
0.007367616984993219,
0.054825060069561005,
-0.0342257022857666,
-0.022557394579052925,
0.0369030199944973,
-0.0246153324842453,
0.04207783192396164,
-0.03640351817011833,
-0.016393572092056274,
0.07840143144130707,
-0.0232367143034935,
0.029630307108163834,
-0.05662325769662857,
-0.015374593436717987,
0.010639337822794914,
0.029370566830039024,
-0.04175815358757973,
0.024275673553347588,
0.04503487050533295,
-0.013196775689721107,
0.03260732442140579,
-0.01882113888859749,
-0.054305579513311386,
0.06397588551044464,
-0.03368624299764633,
0.019969988614320755,
0.024115832522511482,
0.028091849759221077,
-0.038940977305173874,
0.04015975445508957,
0.043356552720069885,
0.009765214286744595,
-0.05062926560640335,
-0.038661256432533264,
-0.01107889786362648,
0.02625369094312191,
-0.06269717216491699,
-0.01869126968085766,
-0.04667322710156441,
-0.027971969917416573,
-0.009100879542529583,
-0.01299697533249855,
-0.04275715351104736,
0.02379615418612957,
0.05854133516550064,
0.004313177894800901,
0.04731258749961853,
0.04039951413869858,
-0.0007673560176044703,
-0.014395574107766151,
0.011428547091782093,
-0.020189767703413963,
-0.025754190981388092,
0.043036870658397675,
-0.011997976340353489,
0.010479498654603958,
0.001478518359363079,
-0.05878109484910965,
0.018851108849048615,
-0.019390568137168884,
0.0019155803602188826,
0.008786194957792759,
0.03032960556447506,
-0.07496487349271774,
-0.04667322710156441,
-0.03174818307161331,
0.016333632171154022,
0.028771167621016502,
-0.0438360720872879,
0.06357628852128983,
0.092946857213974,
0.010889087803661823,
0.010959018021821976,
0.0028071869164705276,
-0.054545339196920395,
0.005599388852715492,
-0.0013411559630185366,
-0.0492306649684906,
0.05366621911525726,
0.08075907081365585,
-0.010559418238699436,
-0.029210727661848068,
-0.009330649860203266,
0.004720269702374935,
0.010249728336930275,
0.0327671654522419,
-0.07240743935108185,
0.025814130902290344,
-0.033806122839450836,
0.00041115048225037754,
-0.051548343151807785,
0.0601397342979908,
0.04071919620037079,
-0.05062926560640335,
0.013516454957425594,
0.019060898572206497,
-0.012177796103060246,
0.028051888570189476,
-0.02925068698823452,
0.0409589558839798,
0.026133811101317406,
0.09046933799982071,
0.0171328317373991,
-0.039260655641555786,
0.009615364484488964,
-0.03310682252049446,
-0.07488495856523514,
0.019070889800786972,
0.02241753600537777,
0.04351639002561569,
0.019840117543935776,
-0.020998956635594368,
-0.04843146726489067,
0.020319636911153793,
-0.01815181039273739,
-0.08295686542987823,
0.03168824315071106,
0.02733260951936245,
0.023975973948836327,
0.038681238889694214,
0.023975973948836327,
0.004660329781472683,
-0.011398577131330967,
0.030249686911702156,
-0.062177691608667374,
-0.004987502004951239,
-0.017142821103334427,
-0.021438516676425934,
-0.07604379951953888,
-0.012986985966563225,
0.05438549816608429,
-0.013206765055656433,
0.014965003356337547,
-0.020579377189278603,
0.010149829089641571,
-0.01992003805935383,
0.028531407937407494,
-0.031008925288915634,
0.060019854456186295,
0.05162826180458069,
0.049590304493904114,
-0.011558417230844498,
0.005474513862282038,
0.06317669153213501,
-0.038121797144412994,
0.035464461892843246,
-0.06313672661781311,
0.04131859540939331,
0.045234668999910355,
0.038121797144412994,
0.04203787446022034,
-0.08927053958177567,
-0.028531407937407494,
-0.009710269048810005,
-0.017532430589199066,
0.08359622955322266,
-0.033806122839450836,
0.011178798042237759,
-0.03310682252049446,
-0.07432551681995392,
0.024175772443413734,
0.02267727442085743,
-0.01901094987988472,
-0.002199046313762665,
-0.04287703335285187,
0.021158795803785324,
-0.04235755279660225,
0.059460412710905075,
-0.03860131651163101,
-0.008941040374338627,
0.01791205070912838,
0.013566404581069946,
0.026853090152144432,
-0.025914032012224197,
0.020839117467403412,
-0.055704180151224136,
0.013916054740548134,
0.02429565228521824,
-0.014715253375470638,
0.006418568082153797,
-0.0005800437065772712,
-0.05222766101360321,
-0.016333632171154022,
-0.0410388745367527,
-0.03282710537314415,
-0.07744239270687103,
0.01901094987988472,
0.02349645458161831,
-0.034025903791189194,
-0.0049425470642745495,
-0.016873091459274292,
-0.006133852992206812,
0.0204794779419899,
0.016713252291083336,
0.018071889877319336,
-0.005419569090008736,
0.03999991714954376,
0.015914052724838257,
-0.03250742331147194,
0.0354444794356823,
-0.019170789048075676,
-0.04707282781600952,
-0.030769165605306625,
0.03834157809615135,
0.0062487381510436535,
-0.004705284722149372,
-0.02487507276237011,
0.018001960590481758,
-0.030409526079893112,
0.08607374131679535,
-0.05254734307527542,
0.017452510073781013,
-0.07232751697301865,
0.08927053958177567,
-0.023975973948836327,
0.02765228971838951,
0.01339657511562109,
0.006478508003056049,
0.03390602394938469,
-0.038141779601573944,
0.0657740905880928,
0.0026947995647788048,
-0.020189767703413963,
-0.004895094782114029,
-0.01737259142100811,
-0.03474518284201622,
0.012277696281671524,
0.03226766362786293,
0.041398514062166214,
0.036743178963661194,
0.005474513862282038,
-0.033526401966810226,
0.049190703779459,
0.014875093474984169,
-0.020659297704696655,
0.014935033395886421,
0.028831107541918755,
-0.005369619000703096,
-0.0009684045799076557,
-0.08159822970628738,
0.038940977305173874,
-0.028851088136434555,
-0.026373570784926414,
-0.011738236993551254,
-0.0038236682303249836,
0.05506481975317001,
0.053985901176929474,
-0.06953032314777374,
-0.025854092091321945,
-0.003938552923500538,
-0.027272669598460197,
-0.04859130457043648,
-0.003786205779761076,
-0.02347647398710251,
-0.032147783786058426,
0.0355643592774868,
0.02081913687288761,
0.08423558622598648,
-0.009210770018398762,
0.026293650269508362,
0.04407583177089691,
0.008995984680950642,
-0.06089897081255913,
0.00984013918787241,
-0.01931064948439598,
0.002509984653443098,
-0.019040919840335846,
-0.009765214286744595,
-0.017142821103334427,
0.025214731693267822,
-0.039260655641555786,
-0.06885100156068802,
-0.038721196353435516,
0.06996988505125046,
-0.07788195461034775,
-0.04807182773947716,
-0.02409585379064083,
0.0356043204665184,
-0.016863102093338966,
-0.019040919840335846,
-0.01636360213160515,
0.03036956675350666,
0.046073827892541885,
-0.008096885867416859,
-0.04779210686683655,
-0.07136847823858261,
-0.06177809089422226,
0.03032960556447506,
0.021498456597328186,
-0.013676295056939125,
-0.005284704267978668,
0.009330649860203266,
0.03190802410244942,
0.03234758600592613,
0.02245749533176422,
0.032627303153276443,
-0.0034964962396770716,
-0.022317634895443916,
0.06477508693933487,
0.027752188965678215,
0.04403587058186531,
-0.008531450293958187,
0.0022602349054068327,
0.009710269048810005,
0.008686295710504055,
-0.0059889983385801315,
-0.056982897222042084,
0.03658333793282509,
0.0008310421835631132,
-0.0022327625192701817,
0.028371568769216537,
0.014115854166448116,
-0.09334645420312881,
0.012447526678442955,
0.012727245688438416,
-0.0017282681073993444,
-0.0021765688434243202,
-0.04259731248021126,
0.028311628848314285,
-0.000771102262660861,
0.015484482981264591,
-0.017572389915585518,
-0.00464034965261817,
0.04175815358757973,
-0.01623373292386532,
-0.04403587058186531,
-0.0342257022857666,
0.02103891596198082,
0.04503487050533295,
-0.006703282706439495,
0.07304679602384567,
-0.036803118884563446,
-0.007762221619486809,
0.08107875287532806,
-0.043316591531038284,
0.012957016006112099,
0.007952030748128891,
-0.008421560749411583,
-0.01856139861047268,
0.008311671204864979,
-0.0025449497625231743,
-0.03616375848650932,
0.05310678109526634,
-0.001654591877013445,
0.03172820433974266,
0.02653340995311737,
-0.008391590788960457,
0.05602385848760605,
0.08671310544013977,
0.0030494441743940115,
0.027472469955682755,
-0.003571421140804887,
0.0020491965115070343,
0.053186699748039246,
-0.06633352488279343,
-0.007602381519973278,
0.021718235686421394,
-0.010064913891255856,
-0.02923070825636387,
0.006303682923316956,
0.07176808267831802,
-0.012367606163024902,
-0.03993997722864151,
-0.006713272538036108,
0.012727245688438416,
-0.01575421169400215,
0.019340619444847107,
0.0009627852123230696,
0.014705264009535313,
0.052667222917079926,
0.009865114465355873,
-0.016893072053790092,
0.022557394579052925,
0.05682305619120598,
0.04255735129117966,
0.0009965014178305864,
-0.013726244680583477,
-0.041198715567588806,
0.03120872564613819,
-0.002316428581252694,
0.02021973766386509,
0.03304688259959221,
0.004338152706623077,
-0.05586401745676994,
0.006758227478712797,
-0.04619370773434639,
-0.11340635269880295,
0.007787196431308985,
-0.03372620418667793,
-0.0017757205059751868,
-0.0656542107462883,
-0.020859096199274063,
0.0327671654522419,
-0.02709284983575344,
0.02021973766386509,
-0.002002992667257786,
-0.010799177922308445,
0.033806122839450836,
0.03916075825691223,
0.042197711765766144,
-0.006553432904183865,
0.004715274553745985,
-0.008756224997341633,
-0.07092892378568649,
0.011788186617195606,
-0.007542441599071026,
-0.01216780673712492,
-0.0396202951669693,
0.031108826398849487,
-0.007837146520614624,
0.039260655641555786,
-0.0547051802277565,
-0.0519479438662529,
0.0082217613235116,
-0.029070867225527763,
-0.0043581328354775906,
-0.08567414432764053,
0.03298694267868996,
0.004425565246492624,
-0.037022899836301804,
0.04211779311299324,
-0.03584408015012741,
-0.015874091535806656,
-0.07292691618204117,
0.020939016714692116,
-0.00276972446590662,
0.040599316358566284,
-0.01324672531336546,
-0.0409989133477211,
-0.0025998945347964764,
-0.0071378471329808235,
-0.012377596460282803,
0.050509385764598846,
0.01670326106250286,
-0.025014933198690414,
0.006218768190592527,
-0.04623366892337799,
0.02211783640086651,
0.03148844465613365,
0.003641350893303752,
-0.029949987307190895,
0.00811686646193266,
-0.06229757145047188,
0.03964027762413025,
0.030509425327181816,
-0.014275694265961647,
-0.03738253936171532,
0.02217777632176876,
-0.056183699518442154,
0.019500458613038063,
0.04699290916323662,
0.00969028938561678,
-0.06353633105754852,
-0.004413077607750893,
-0.031568363308906555,
0.0009958769660443068,
-0.011738236993551254,
-0.01518478337675333,
0.07228755950927734,
-0.006738247349858284,
-0.022797154262661934,
-0.014725243672728539,
0.019260698929429054,
0.032167766243219376,
-0.05078910291194916,
0.016733231022953987,
0.04795194789767265,
0.0009871358051896095,
-0.016583381220698357,
-0.004323167726397514,
0.028371568769216537,
-0.03604387864470482,
0.0076872967183589935,
-0.0056743137538433075,
-0.043356552720069885,
0.029890047386288643,
0.006353633012622595,
-0.0157142523676157,
0.04711278900504112,
-0.0232167337089777,
-0.015784181654453278,
-0.03112880513072014,
-0.015284682624042034,
0.034345582127571106,
0.041957952082157135,
0.005082407034933567,
-0.006893092300742865,
0.0765632763504982,
-0.0024837609380483627,
-0.010149829089641571,
-0.0037112808786332607,
0.016473492607474327,
-0.029450487345457077,
-0.02437557280063629,
-0.007252731826156378,
-0.022637315094470978,
-0.09126853942871094,
0.03166826441884041,
-0.017432531341910362,
0.037002917379140854,
-0.049310583621263504,
-0.018401559442281723,
-0.005529459100216627,
-0.03696295991539955,
0.011668306775391102,
-0.0031918014865368605,
-0.004458032548427582,
-0.013866104185581207,
0.03764227777719498,
-0.029150787740945816,
0.01804191991686821,
0.04731258749961853,
0.053506381809711456,
0.04571418836712837,
-0.014545423910021782,
0.029450487345457077,
-0.0032792137935757637,
0.02707286924123764,
0.04255735129117966,
0.0007517466438002884,
-0.037022899836301804,
0.05002986639738083,
-0.0016470993869006634,
0.03582410141825676,
0.037322599440813065,
-0.049630265682935715,
-0.029610326513648033,
-0.034545380622148514,
0.03480512276291847,
0.0901496633887291,
-0.025294652208685875,
0.0315084233880043,
-0.02925068698823452,
0.0573824979364872,
-0.03388604149222374,
-0.04967022314667702,
-0.008931050077080727,
0.08583398163318634,
0.048831064254045486,
-0.0601796917617321,
-0.012497476302087307,
0.052627261728048325,
-0.006143843289464712,
0.012117856182157993,
-0.05989997461438179,
-0.07068916410207748,
0.033266663551330566,
-0.07296688109636307,
0.012237736023962498,
-0.02519475296139717,
-0.04055935516953468,
-0.044155750423669815,
-0.01323673501610756,
-0.01869126968085766,
-0.03310682252049446,
0.034285642206668854,
0.010719258338212967,
0.024515433236956596,
0.0873524621129036,
0.019969988614320755,
-0.011198777705430984,
0.058661215007305145,
0.012227746658027172,
-0.005107381846755743,
-0.019200759008526802,
-0.008961020037531853,
-0.05170818418264389,
-0.007327656727284193,
-0.020459497347474098,
0.037062857300043106,
-0.022617334499955177,
0.0273725688457489,
0.013716254383325577,
-0.012887085787951946,
0.0170928705483675
]
|
41,444 | pyglove.core.symbolic.compounding | compound_class | Creates a compound class from a factory function.
Args:
factory_fn: A function that produces a compound object.
base_class: The base class of the compond class, which should be a
``pg.Object`` type. If None, it will be infererenced from the return
annotation of `factory_fn`. If the annotation is not present or
`auto_typing` is set to False, `base_class` must be present.
args: Symbolic args specification. `args` is a list of tuples, each
describes an argument from the input function. Each tuple is the format of
(<argumment-name>, <value-spec>, [description], [metadata-objects]).
`argument-name` - a `str` or `pg_typing.StrKey` object. When
`pg_typing.StrKey` is used, it describes the wildcard keyword argument.
`value-spec` - a `pg_typing.ValueSpec` object or equivalent, e.g.
primitive values which will be converted to ValueSpec implementation
according to its type and used as its default value. `description` - a
string to describe the agument. `metadata-objects` - an optional list of
any type, which can be used to generate code according to the schema.
There are notable rules in filling the `args`: 1) When `args` is None or
arguments from the function signature are missing from it, `schema.Field`
for these fields will be automatically generated and inserted into `args`.
That being said, every arguments in input function will have a
`schema.Field` counterpart in `Functor.schema.fields` sorted by the
declaration order of each argument in the function signature ( other than
the order in `args`). 2) Default argument values are specified along with
function definition as regular python functions, instead of being set at
`schema.Field` level. But validation rules can be set using `args` and
apply to argument values.
lazy_build: If True, `factory_fn` will be called upon first use. Otherwise,
it will be called at construction.
auto_doc: If True, the descriptions of argument fields will be inherited
from `factory_fn` docstr if they are not explicitly specified through
``args``.
auto_typing: If True, the value spec for constraining each argument will be
inferred from its annotation. Otherwise the value specs for all arguments
will be ``pg.typing.Any()``.
serialization_key: An optional string to be used as the serialization key
for the class during `sym_jsonify`. If None, `cls.__type_name__` will be
used. This is introduced for scenarios when we want to relocate a class,
before the downstream can recognize the new location, we need the class to
serialize it using previous key.
additional_keys: An optional list of strings as additional keys to
deserialize an object of the registered class. This can be useful when we
need to relocate or rename the registered class while being able to load
existing serialized JSON values.
add_to_registry: If True, the newly created functor class will be added to
the registry for deserialization.
Returns:
A callable that converts a factory function into a subclass of the base
class.
| def compound_class(
factory_fn: types.FunctionType,
base_class: Optional[Type[Object]] = None,
args: Optional[
List[
Union[
Tuple[Tuple[str, pg_typing.KeySpec], pg_typing.ValueSpec, str],
Tuple[
Tuple[str, pg_typing.KeySpec], pg_typing.ValueSpec, str, Any
],
]
]
] = None, # pylint: disable=bad-continuation
*,
lazy_build: bool = True,
auto_doc: bool = True,
auto_typing: bool = True,
serialization_key: Optional[str] = None,
additional_keys: Optional[List[str]] = None,
add_to_registry: bool = False
) -> Type[Compound]:
"""Creates a compound class from a factory function.
Args:
factory_fn: A function that produces a compound object.
base_class: The base class of the compond class, which should be a
``pg.Object`` type. If None, it will be infererenced from the return
annotation of `factory_fn`. If the annotation is not present or
`auto_typing` is set to False, `base_class` must be present.
args: Symbolic args specification. `args` is a list of tuples, each
describes an argument from the input function. Each tuple is the format of
(<argumment-name>, <value-spec>, [description], [metadata-objects]).
`argument-name` - a `str` or `pg_typing.StrKey` object. When
`pg_typing.StrKey` is used, it describes the wildcard keyword argument.
`value-spec` - a `pg_typing.ValueSpec` object or equivalent, e.g.
primitive values which will be converted to ValueSpec implementation
according to its type and used as its default value. `description` - a
string to describe the agument. `metadata-objects` - an optional list of
any type, which can be used to generate code according to the schema.
There are notable rules in filling the `args`: 1) When `args` is None or
arguments from the function signature are missing from it, `schema.Field`
for these fields will be automatically generated and inserted into `args`.
That being said, every arguments in input function will have a
`schema.Field` counterpart in `Functor.schema.fields` sorted by the
declaration order of each argument in the function signature ( other than
the order in `args`). 2) Default argument values are specified along with
function definition as regular python functions, instead of being set at
`schema.Field` level. But validation rules can be set using `args` and
apply to argument values.
lazy_build: If True, `factory_fn` will be called upon first use. Otherwise,
it will be called at construction.
auto_doc: If True, the descriptions of argument fields will be inherited
from `factory_fn` docstr if they are not explicitly specified through
``args``.
auto_typing: If True, the value spec for constraining each argument will be
inferred from its annotation. Otherwise the value specs for all arguments
will be ``pg.typing.Any()``.
serialization_key: An optional string to be used as the serialization key
for the class during `sym_jsonify`. If None, `cls.__type_name__` will be
used. This is introduced for scenarios when we want to relocate a class,
before the downstream can recognize the new location, we need the class to
serialize it using previous key.
additional_keys: An optional list of strings as additional keys to
deserialize an object of the registered class. This can be useful when we
need to relocate or rename the registered class while being able to load
existing serialized JSON values.
add_to_registry: If True, the newly created functor class will be added to
the registry for deserialization.
Returns:
A callable that converts a factory function into a subclass of the base
class.
"""
if not inspect.isfunction(factory_fn):
raise TypeError('Decorator `compound` is only applicable to functions.')
schema = schema_utils.function_schema(
factory_fn,
args=args,
returns=pg_typing.Object(base_class) if base_class else None,
auto_doc=auto_doc,
auto_typing=auto_typing,
)
# Inference the base_class from schema.
return_spec = schema.metadata.get('returns', None)
if isinstance(return_spec, pg_typing.Object):
base_class = return_spec.cls
else:
raise ValueError(
'Cannot inference the base class from return value annotation. '
'Please either add an annotation for the return value or provide the '
'value for the `base_class` argument.'
)
class _Compound(Compound, base_class):
"""The compound class bound to a factory function."""
# Disable auto register so we can use function module and name
# for registration later.
auto_register = False
# The compound class uses the function signature to decide its
# schema, thus we do not infer its schema from the class annotations.
auto_schema = False
def _on_bound(self):
# NOTE(daiyip): Do not call `super()._on_bound()` to avoid side effect.
# This is okay since all states are delegated to `self.decomposed`.
Compound._on_bound(self) # pylint: disable=protected-access
self._sym_decomposed = None
if not lazy_build:
# Trigger build.
_ = self.decomposed
@property
def decomposed(self):
if self._sym_decomposed is None:
# Build the compound object.
self._sym_decomposed = factory_fn(**self.sym_init_args)
# This allows the decomposed symbolic object to access the parent chain
# for value retrieval of inferred attributes.
if isinstance(self._sym_decomposed, Symbolic):
self._sym_decomposed.sym_setparent(self.sym_parent)
return self._sym_decomposed
def _on_parent_change(self, old_parent, new_parent):
"""Override to allow decomposed object to follow parent chain change."""
super()._on_parent_change(old_parent, new_parent)
if isinstance(self._sym_decomposed, Symbolic):
self._sym_decomposed.sym_setparent(new_parent)
def _sym_inferred(self, key: str, **kwargs) -> Any:
# Bypass the user base' `_sym_inferred` if it's overriden.
return Compound._sym_inferred(self, key, **kwargs)
def __getattribute__(self, name: str):
if (
name.startswith('_')
or name in _COMPOUND_OWNED_ATTR_NAMES
or name in self.sym_init_args
):
return Compound.__getattribute__(self, name)
# Redirect attribute to the compound object.
return getattr(self.decomposed, name)
cls = _Compound
cls.__name__ = factory_fn.__name__
cls.__qualname__ = factory_fn.__qualname__
cls.__module__ = factory_fn.__module__
cls.__doc__ = factory_fn.__doc__
# Enable automatic registration of subclass.
cls.auto_register = True
cls.apply_schema(schema)
# Supporting abstract class as compound base class.
# This is a feature supported for Python 3.10 and above.
if sys.version_info >= (3, 10):
# NOTE(daiyip): Override abstract methods as non-ops, so `cls` could
# have an abstract class as its base. We don't need to worry about the
# implementation of the abstract method, since it will be detoured to the
# decomposed object at runtime via `__getattribute__`.
for key in dir(cls):
attr = getattr(cls, key)
if getattr(attr, '__isabstractmethod__', False):
noop = lambda self, *args, **kwargs: None
if isinstance(attr, property):
noop = property(noop)
else:
assert inspect.isfunction(attr), (key, attr)
setattr(cls, key, noop)
abc.update_abstractmethods(cls)
if add_to_registry:
cls.register_for_deserialization(serialization_key, additional_keys)
return cls
| (factory_fn: function, base_class: Optional[Type[pyglove.core.symbolic.object.Object]] = None, args: Optional[List[Union[Tuple[Tuple[str, pyglove.core.typing.class_schema.KeySpec], pyglove.core.typing.class_schema.ValueSpec, str], Tuple[Tuple[str, pyglove.core.typing.class_schema.KeySpec], pyglove.core.typing.class_schema.ValueSpec, str, Any]]]] = None, *, lazy_build: bool = True, auto_doc: bool = True, auto_typing: bool = True, serialization_key: Optional[str] = None, additional_keys: Optional[List[str]] = None, add_to_registry: bool = False) -> Type[pyglove.core.symbolic.compounding.Compound] | [
-0.023901883512735367,
-0.05592295154929161,
0.003743730718269944,
-0.0060583194717764854,
0.014322488568723202,
-0.010925687849521637,
-0.021685676649212837,
-0.004587753210216761,
0.02332194149494171,
-0.058491263538599014,
0.013152249157428741,
0.06847454607486725,
-0.0198940709233284,
0.010532155632972717,
-0.04552542418241501,
0.06184663996100426,
0.026532333344221115,
-0.006705576088279486,
-0.03079904615879059,
-0.02644948475062847,
0.006917876191437244,
0.010915331542491913,
-0.027153698727488518,
-0.0006181298522278666,
0.0443241149187088,
-0.014581391587853432,
-0.0020297958981245756,
0.03204178065061569,
-0.008020800538361073,
-0.06739751249551773,
0.019987275823950768,
0.007616912946105003,
-0.023011257871985435,
0.005566404666751623,
0.03378160297870636,
-0.016114095225930214,
0.020971106365323067,
0.0847543403506279,
-0.007389078848063946,
0.030011983588337898,
0.004926915280520916,
-0.03115115500986576,
-0.06039678677916527,
-0.015337387099862099,
0.04680958017706871,
0.04014025256037712,
0.05530158430337906,
0.008145074360072613,
-0.022659150883555412,
-0.023632625117897987,
0.00700590293854475,
-0.029245631769299507,
0.017812496051192284,
0.014716020785272121,
-0.026428772136569023,
-0.03496219962835312,
-0.0004016225866507739,
0.02176852524280548,
-0.032911691814661026,
0.02905922196805477,
-0.0037463197950273752,
0.060562483966350555,
0.005299735348671675,
-0.027340108528733253,
-0.019241636618971825,
0.018309587612748146,
-0.04888080060482025,
-0.030074119567871094,
-0.02464752271771431,
0.0006417547119781375,
-0.01003506314009428,
0.027816489338874817,
0.037219829857349396,
0.01050108764320612,
0.06039678677916527,
-0.0260973758995533,
0.07290695607662201,
-0.07630375772714615,
0.0306333489716053,
-0.037095557898283005,
-0.027070850133895874,
-0.06105957552790642,
-0.0586569607257843,
-0.008864822797477245,
0.0017825440736487508,
0.0073942565359175205,
0.004515260457992554,
0.005768348928540945,
-0.01864098384976387,
0.012872634455561638,
-0.055881526321172714,
0.015327030792832375,
-0.023404790088534355,
0.03765478730201721,
0.020846832543611526,
-0.026967288926243782,
0.008621455170214176,
0.0013204029528424144,
0.050869170576334,
-0.018868817016482353,
0.010977467522025108,
0.026304498314857483,
-0.06611335277557373,
-0.023176955059170723,
0.011702395044267178,
-0.015171688981354237,
-0.027174411341547966,
0.004297782201319933,
-0.012872634455561638,
-0.044406965374946594,
-0.034630805253982544,
-0.03574926406145096,
0.026677317917346954,
0.050910595804452896,
-0.014384625479578972,
-0.031213290989398956,
0.028127172961831093,
0.030405515804886818,
-0.012603376060724258,
-0.02201707288622856,
0.0384625606238842,
-0.027485094964504242,
-0.02949417755007744,
0.03144112601876259,
-0.016020890325307846,
0.02410900592803955,
0.051573388278484344,
0.02881067618727684,
0.04813516139984131,
0.019417690113186836,
-0.0006527580553665757,
0.024937493726611137,
-0.03612208366394043,
-0.005222064442932606,
0.0023767254315316677,
0.014881717972457409,
0.007342476397752762,
-0.0247510839253664,
-0.10927758365869522,
0.03535573184490204,
0.031855370849370956,
-0.0123755419626832,
0.028872812166810036,
0.0495435930788517,
-0.060313936322927475,
-0.000727516133338213,
-0.01270693726837635,
-0.04850798100233078,
-0.02620093710720539,
-0.006001361180096865,
-0.011899161152541637,
0.045939669013023376,
0.017884988337755203,
0.029763435944914818,
-0.02205849625170231,
-0.04003668949007988,
-0.017097923904657364,
-0.0019715428352355957,
-0.047803767025470734,
0.003236281918361783,
-0.039850279688835144,
0.037737634032964706,
-0.0028531060088425875,
-0.03951888531446457,
0.008600742556154728,
-0.0004184512363281101,
0.02092968113720417,
-0.12990693747997284,
-0.02752651832997799,
0.01876525580883026,
-0.03570783883333206,
-0.030446939170360565,
0.01455032266676426,
0.05505303665995598,
-0.04606394097208977,
0.023052683100104332,
0.02644948475062847,
-0.0021165283396840096,
0.004106194246560335,
-0.02961845137178898,
0.06052105873823166,
-0.04759664461016655,
-0.03806903213262558,
-0.016145162284374237,
0.01770893484354019,
0.033843740820884705,
-0.006493275985121727,
0.03471365198493004,
0.12684153020381927,
-0.02425399050116539,
-0.04366132616996765,
0.00903569906949997,
0.017128992825746536,
-0.008688769303262234,
0.04016096144914627,
-0.008414332754909992,
-0.012406609952449799,
0.056254345923662186,
-0.026511620730161667,
0.04589824378490448,
-0.05538443103432655,
0.017916055396199226,
0.050786323845386505,
-0.019241636618971825,
-0.011899161152541637,
-0.03794475644826889,
-0.01656976342201233,
0.006493275985121727,
0.002071220427751541,
-0.05828414112329483,
0.02218277007341385,
0.021085023880004883,
-0.015347742475569248,
0.06449779868125916,
0.0032647610642015934,
-0.07108428329229355,
0.04144512116909027,
-0.018941311165690422,
0.014156791381537914,
0.0005074489745311439,
-0.007021436933428049,
0.013897888362407684,
0.03313952684402466,
0.01127779483795166,
-0.011640258133411407,
-0.026925865560770035,
-0.03647419065237045,
-0.02137499488890171,
0.012986551970243454,
-0.056130070239305496,
-0.02777506597340107,
-0.06723181158304214,
0.0026498676743358374,
-0.017242910340428352,
0.046353910118341446,
-0.043495628982782364,
0.011163877323269844,
0.021478556096553802,
-0.018216382712125778,
0.04190078750252724,
0.04200435057282448,
-0.034216560423374176,
0.010112733580172062,
-0.035790689289569855,
-0.024316126480698586,
0.014705664478242397,
0.06661044806241989,
-0.0066641513258218765,
-0.0047120265662670135,
-0.01649727113544941,
-0.017170416191220284,
0.006990368943661451,
-0.039187490940093994,
0.013587205670773983,
0.003961208742111921,
-0.04535972699522972,
-0.054307397454977036,
-0.03811045363545418,
-0.01896202191710472,
0.01180595625191927,
0.021602828055620193,
-0.03980885446071625,
0.04156939312815666,
0.09105084836483002,
-0.00038349939859472215,
-0.012199487537145615,
-0.00080259790411219,
-0.034485820680856705,
0.007036971393972635,
0.0010932160075753927,
0.08197890222072601,
0.03349163383245468,
0.03498291224241257,
-0.018930954858660698,
-0.06039678677916527,
-0.028458567336201668,
-0.028002899140119553,
0.009646709077060223,
0.04395129531621933,
-0.08781974017620087,
0.00009967748337658122,
-0.022244906052947044,
-0.0039456747472286224,
-0.011650614440441132,
0.03394730016589165,
0.048300858587026596,
-0.04796946421265602,
-0.019666237756609917,
0.0029540781397372484,
-0.011360643431544304,
0.041010163724422455,
-0.03624635562300682,
0.03023981675505638,
0.01368041057139635,
0.06971728056669235,
-0.007306229788810015,
-0.05853268876671791,
-0.012365185655653477,
-0.007756720297038555,
-0.08641131222248077,
0.0013540603686124086,
0.0208779014647007,
0.04511117935180664,
0.022099921479821205,
-0.015088840387761593,
-0.05074489861726761,
0.0027340108063071966,
-0.009594928473234177,
-0.053271789103746414,
0.053396061062812805,
-0.004828532692044973,
0.03104759380221367,
0.05882265791296959,
0.028748538345098495,
0.004199399147182703,
0.025351736694574356,
0.002220089314505458,
-0.07978340983390808,
0.058739811182022095,
0.01735682599246502,
-0.016859734430909157,
-0.04540115222334862,
-0.0338851660490036,
0.03889751806855202,
-0.023384077474474907,
0.013473288156092167,
-0.03767549991607666,
-0.023901883512735367,
-0.02516532689332962,
0.017512168735265732,
-0.0625508576631546,
0.02713298611342907,
0.039042502641677856,
0.035790689289569855,
-0.01461245957762003,
0.018734188750386238,
0.07009010016918182,
-0.0626337006688118,
0.026387346908450127,
-0.07124998420476913,
0.032393887639045715,
0.044158417731523514,
-0.0004106841515749693,
0.0384211391210556,
-0.08856537938117981,
-0.03407157585024834,
0.014964567497372627,
0.0005744399968534708,
0.09751305729150772,
-0.013649342581629753,
-0.0016440311446785927,
-0.06284082680940628,
-0.032269611954689026,
0.052153330296278,
0.049626439809799194,
-0.013183318078517914,
-0.03976742923259735,
-0.0430399589240551,
0.03282884135842323,
-0.0384211391210556,
0.08098471909761429,
-0.0625922828912735,
-0.015948396176099777,
0.03400943800806999,
0.018827393651008606,
0.006545056588947773,
-0.02659446932375431,
0.00250876578502357,
-0.06047963351011276,
-0.0364949032664299,
0.021996360272169113,
-0.03179323300719261,
0.007166422437876463,
-0.013317947275936604,
-0.03498291224241257,
-0.01901380345225334,
-0.014053230173885822,
-0.0008284881478175521,
-0.05989969149231911,
0.03753051161766052,
0.018495997413992882,
-0.03220747783780098,
-0.02779577672481537,
0.014995635487139225,
0.019241636618971825,
0.021478556096553802,
0.014156791381537914,
0.021602828055620193,
0.00048641316243447363,
0.011816312558948994,
0.0007624679710716009,
-0.007891349494457245,
0.01447783038020134,
-0.03887680545449257,
-0.004326261579990387,
-0.024274703115224838,
0.011619546450674534,
-0.006602014880627394,
0.01864098384976387,
-0.018899885937571526,
-0.003596156369894743,
-0.043744172900915146,
0.10670927166938782,
-0.02686372771859169,
0.009688133373856544,
-0.045856818556785583,
0.084712915122509,
-0.0024039100389927626,
0.004538561683148146,
0.02048436924815178,
0.033325936645269394,
0.02388117089867592,
-0.08197890222072601,
0.013846107758581638,
-0.006902341730892658,
-0.009662242606282234,
0.02386045828461647,
-0.013721834868192673,
-0.021085023880004883,
0.02243131585419178,
0.044531237334012985,
0.048052310943603516,
0.034216560423374176,
0.010299143381416798,
-0.034506529569625854,
0.06826741993427277,
-0.013017619960010052,
0.027547230944037437,
0.009817584417760372,
0.03701270744204521,
-0.003282884368672967,
-0.023529063910245895,
-0.0809018686413765,
0.006451851222664118,
-0.04577397182583809,
-0.03258029744029045,
-0.0017670098459348083,
-0.030011983588337898,
0.009879721328616142,
0.055881526321172714,
-0.04080304130911827,
0.023943306878209114,
-0.0010038946056738496,
0.002728832885622978,
-0.015689494088292122,
0.026656605303287506,
0.002466046717017889,
0.0017087567830458283,
0.0306333489716053,
0.022099921479821205,
0.08023907989263535,
-0.01846493035554886,
0.05186335742473602,
0.061101000756025314,
-0.01947982795536518,
-0.04223218187689781,
0.059651147574186325,
-0.039829567074775696,
-0.024978917092084885,
0.016134805977344513,
0.020204754546284676,
-0.0046006981283426285,
0.018941311165690422,
-0.007616912946105003,
-0.06685899198055267,
-0.002040151972323656,
0.07290695607662201,
-0.04904649779200554,
-0.03523145988583565,
-0.020940037444233894,
0.05671001225709915,
-0.0035081293899565935,
-0.008983918465673923,
-0.036204930394887924,
-0.017222197726368904,
0.027816489338874817,
0.045028332620859146,
-0.03272528201341629,
-0.06843312084674835,
-0.08061189949512482,
0.038524698466062546,
-0.00876644067466259,
-0.062012337148189545,
-0.01785391941666603,
0.02464752271771431,
0.022120634093880653,
0.033988725394010544,
0.010842838324606419,
0.03158611059188843,
0.004587753210216761,
-0.043619900941848755,
0.05960972234606743,
0.057331379503011703,
0.021934224292635918,
0.03115115500986576,
0.018081754446029663,
-0.007254449184983969,
0.04515260457992554,
0.015865547582507133,
-0.09743020683526993,
-0.0028065035585314035,
0.011319219134747982,
-0.04003668949007988,
0.03663988783955574,
-0.011899161152541637,
-0.08715695142745972,
-0.010174870491027832,
0.0011566471075639129,
0.01996656507253647,
-0.019220925867557526,
-0.02112644724547863,
-0.0039741541258990765,
0.017097923904657364,
-0.007741186302155256,
-0.031234003603458405,
-0.0123755419626832,
0.07472962886095047,
-0.01819567009806633,
-0.06159809231758118,
-0.06271655112504959,
0.054058849811553955,
0.0032673501409590244,
-0.01578269898891449,
0.06429067999124527,
-0.03641205281019211,
0.006022073328495026,
0.07124998420476913,
-0.023114819079637527,
0.050413504242897034,
0.0061670588329434395,
-0.009952213615179062,
-0.018527066335082054,
0.02425399050116539,
0.025641707703471184,
-0.018703119829297066,
0.019686950370669365,
0.010128268040716648,
0.018413148820400238,
-0.004227878525853157,
-0.020629355683922768,
0.05049635097384453,
0.08048762381076813,
-0.024875355884432793,
0.04014025256037712,
-0.006886807736009359,
-0.016466202214360237,
0.05356175824999809,
-0.060023967176675797,
-0.008921781554818153,
0.003671238198876381,
0.0008653817349113524,
0.011484917253255844,
0.011132809333503246,
0.028127172961831093,
0.05853268876671791,
-0.03510718420147896,
0.010780702345073223,
0.01869276352226734,
-0.03608065843582153,
0.020152974873781204,
-0.007119819987565279,
0.04473835974931717,
0.054804492741823196,
-0.008481647819280624,
0.02228633128106594,
0.036826297640800476,
0.043744172900915146,
0.03929105028510094,
-0.007684227544814348,
-0.02620093710720539,
-0.01984229125082493,
0.03498291224241257,
0.01447783038020134,
0.0332845114171505,
0.017046144232153893,
-0.00009652210428612307,
-0.028582841157913208,
0.004745683632791042,
-0.023694761097431183,
-0.08032192289829254,
0.02334265410900116,
-0.0377790592610836,
-0.030964745208621025,
-0.06317222118377686,
-0.001066678436473012,
0.0345272421836853,
-0.015989821404218674,
0.05004068464040756,
0.0067625343799591064,
-0.03614279627799988,
0.000808423210401088,
0.027485094964504242,
0.013286878354847431,
-0.016528338193893433,
-0.03599781170487404,
0.02831358276307583,
-0.047389522194862366,
-0.002559251617640257,
-0.020826119929552078,
-0.0016388531075790524,
-0.05414170026779175,
0.03564570099115372,
0.011567765846848488,
0.031378988176584244,
-0.02075362764298916,
-0.04888080060482025,
-0.02245202846825123,
-0.01284156646579504,
-0.0008310771663673222,
-0.04109301045536995,
0.05389315262436867,
-0.010133445262908936,
0.002124295337125659,
-0.003306185593828559,
-0.026843015104532242,
-0.04092731326818466,
-0.06192949041724205,
-0.007145710289478302,
0.018599558621644974,
0.008554140105843544,
-0.049336470663547516,
-0.03690914809703827,
-0.0038006894756108522,
0.0011553525691851974,
-0.04627106338739395,
0.03769621253013611,
0.027340108528733253,
-0.042957112193107605,
0.011308862827718258,
-0.047389522194862366,
0.04188007488846779,
0.04946074262261391,
0.004113961476832628,
-0.03011554479598999,
-0.005014942493289709,
-0.02922491915524006,
0.04627106338739395,
0.06996582448482513,
-0.017450030893087387,
0.01656976342201233,
-0.016414420679211617,
-0.05629577115178108,
0.007761898450553417,
0.02245202846825123,
-0.010231828317046165,
-0.050786323845386505,
0.015917329117655754,
-0.03792404383420944,
0.02644948475062847,
0.025268888100981712,
-0.02506176568567753,
0.07199562340974808,
-0.015989821404218674,
-0.026698030531406403,
0.002891941461712122,
0.006472563836723566,
0.021085023880004883,
-0.03833828866481781,
0.02450253628194332,
0.04979213699698448,
-0.0046343556605279446,
-0.03270456939935684,
-0.0047819302417337894,
0.03102688118815422,
-0.03881467133760452,
0.012240912765264511,
-0.006182592827826738,
-0.033553771674633026,
0.01851671002805233,
0.012945127673447132,
-0.003347609890624881,
0.028085747733712196,
0.008160607889294624,
-0.03322237357497215,
-0.029577026143670082,
0.024150429293513298,
0.034485820680856705,
0.03864897042512894,
0.044282689690589905,
0.014115367084741592,
0.08185462653636932,
0.03506576269865036,
-0.01851671002805233,
-0.00987454317510128,
0.019272705540060997,
-0.041382983326911926,
0.006747000385075808,
0.009941857308149338,
-0.021437130868434906,
-0.12187060713768005,
0.0352107472717762,
0.006203304976224899,
0.02568313293159008,
-0.006933410186320543,
-0.039974551647901535,
-0.04523545131087303,
-0.0495435930788517,
0.027319395914673805,
0.006948944181203842,
0.01819567009806633,
0.016880445182323456,
0.021727101877331734,
-0.020639710128307343,
-0.016020890325307846,
0.04941931739449501,
0.09676741808652878,
0.005846019368618727,
-0.023570487275719643,
0.04457266256213188,
-0.0024090881925076246,
0.02073291502892971,
0.0534789115190506,
0.02270057611167431,
-0.052153330296278,
0.01982157863676548,
0.0032673501409590244,
0.02725725993514061,
0.06594765931367874,
-0.05045492947101593,
-0.011702395044267178,
-0.028748538345098495,
0.02789933793246746,
0.08123326301574707,
-0.015813767910003662,
0.0273608211427927,
-0.017563948407769203,
0.05310609191656113,
-0.014829938299953938,
-0.05592295154929161,
0.00957939401268959,
0.08889678120613098,
0.04287426173686981,
-0.09345345944166183,
-0.026304498314857483,
0.04573254659771919,
-0.0391046404838562,
0.05555013194680214,
-0.05973399430513382,
-0.07982483506202698,
0.03419584780931473,
-0.052360452711582184,
-0.005732102319598198,
-0.017108280211687088,
0.026822304353117943,
-0.03933247551321983,
0.00704214908182621,
0.00834701769053936,
-0.03247673436999321,
0.017315402626991272,
0.019438402727246284,
0.015057772397994995,
0.09303922206163406,
0.012655156664550304,
0.008155430667102337,
0.01935555413365364,
-0.02765079215168953,
-0.004906203132122755,
0.00515216076746583,
-0.0443655401468277,
-0.056005798280239105,
-0.019345197826623917,
-0.02178923785686493,
0.03272528201341629,
-0.002454396104440093,
0.049999259412288666,
0.014767801389098167,
-0.02644948475062847,
-0.021105734631419182
]
|
41,445 | pyglove.core.symbolic.base | contains | Returns if a value contains values of specific type.
Example::
@pg.members([
('x', pg.typing.Any()),
('y', pg.typing.Any())
])
class A(pg.Object):
pass
# Test if a symbolic tree contains a value.
assert pg.contains(A('a', 'b'), 'a')
assert not pg.contains(A('a', 'b'), A)
# Test if a symbolic tree contains a type.
assert pg.contains({'x': A(1, 2)}, type=A)
assert pg.contains({'x': A(1, 2)}, type=int)
assert pg.contains({'x': A(1, 2)}, type=(int, float))
Args:
x: The source value to query against.
value: Value of sub-node to contain. Applicable when `type` is None.
type: A type or a tuple of types for the sub-nodes. Applicable if
not None.
Returns:
True if `x` itself or any of its sub-nodes equal to `value` or
is an instance of `value_type`.
| def contains(
x: Any,
value: Any = None,
type: Optional[Union[ # pylint: disable=redefined-builtin
Type[Any],
Tuple[Type[Any]]]]=None
) -> bool:
"""Returns if a value contains values of specific type.
Example::
@pg.members([
('x', pg.typing.Any()),
('y', pg.typing.Any())
])
class A(pg.Object):
pass
# Test if a symbolic tree contains a value.
assert pg.contains(A('a', 'b'), 'a')
assert not pg.contains(A('a', 'b'), A)
# Test if a symbolic tree contains a type.
assert pg.contains({'x': A(1, 2)}, type=A)
assert pg.contains({'x': A(1, 2)}, type=int)
assert pg.contains({'x': A(1, 2)}, type=(int, float))
Args:
x: The source value to query against.
value: Value of sub-node to contain. Applicable when `type` is None.
type: A type or a tuple of types for the sub-nodes. Applicable if
not None.
Returns:
True if `x` itself or any of its sub-nodes equal to `value` or
is an instance of `value_type`.
"""
if type is not None:
def _contains(k, v, p):
del k, p
if isinstance(v, type):
return TraverseAction.STOP
return TraverseAction.ENTER
else:
def _contains(k, v, p):
del k, p
if v == value:
return TraverseAction.STOP
return TraverseAction.ENTER
return not traverse(x, _contains)
| (x: Any, value: Optional[Any] = None, type: Union[NoneType, Type[Any], Tuple[Type[Any]]] = None) -> bool | [
0.04028073698282242,
-0.04840587452054024,
0.003763144602999091,
0.028802068904042244,
0.04357678443193436,
0.04932570084929466,
-0.01854025386273861,
-0.01973794586956501,
-0.027518145740032196,
-0.04231202229857445,
0.019373847171664238,
0.029779385775327682,
0.056569334119558334,
-0.02100270614027977,
-0.005576448515057564,
-0.01113373413681984,
-0.017773732542991638,
0.04016575962305069,
0.030545907095074654,
0.008719189092516899,
-0.009116822853684425,
0.04633626341819763,
-0.0018983399495482445,
0.015895752236247063,
0.0423886738717556,
-0.07040505856275558,
0.00017097036470659077,
0.00350683880969882,
-0.04917239397764206,
0.0617433600127697,
0.006860373076051474,
-0.027173209935426712,
-0.01892351545393467,
-0.0793350413441658,
0.02903202548623085,
0.010424701496958733,
-0.016307758167386055,
0.05641603097319603,
0.012743430212140083,
-0.00013324311294127256,
-0.056837618350982666,
-0.00034044362837448716,
-0.027633123099803925,
0.015071741305291653,
-0.011785278096795082,
-0.002531918464228511,
0.03457015007734299,
0.023168131709098816,
-0.060823533684015274,
0.014688480645418167,
0.016307758167386055,
-0.03200230002403259,
-0.02613840438425541,
-0.017984526231884956,
-0.02776726521551609,
-0.005202768836170435,
-0.030833354219794273,
0.05522792041301727,
0.08883991837501526,
0.05147196352481842,
0.06511605530977249,
0.024337077513337135,
-0.005495005752891302,
-0.005863894242793322,
0.007071166764944792,
-0.015272953547537327,
0.01562746986746788,
-0.0479842871427536,
-0.05020720139145851,
-0.005126116797327995,
-0.01523462776094675,
-0.020945217460393906,
0.0037152371369302273,
0.0462212860584259,
0.01242724061012268,
-0.02178839221596718,
0.023263948038220406,
0.09305579215288162,
0.0018468393245711923,
-0.002112726680934429,
0.04652789607644081,
-0.03794284537434578,
-0.035470813512802124,
-0.06423455476760864,
-0.04683450236916542,
0.1033271849155426,
-0.017486287280917168,
0.0097971111536026,
0.08899322152137756,
0.03732962906360626,
-0.00808680895715952,
-0.018214482814073563,
0.04710278660058975,
0.025965938344597816,
0.011344527825713158,
0.011469087563455105,
0.09635183215141296,
-0.06983016431331635,
-0.037502095103263855,
0.0038206337485462427,
0.0294344499707222,
0.028572112321853638,
0.093745656311512,
-0.0119960717856884,
0.04618296027183533,
0.02282319776713848,
0.00559082068502903,
-0.021117685362696648,
-0.0014204613398760557,
0.022861523553729057,
-0.034589312970638275,
-0.06607420742511749,
-0.012963805347681046,
-0.032673005014657974,
-0.00415119668468833,
-0.005150070879608393,
-0.07347115129232407,
0.005126116797327995,
-0.07143986225128174,
-0.03821112960577011,
0.026598317548632622,
0.05576448515057564,
0.011775696650147438,
0.03939923644065857,
0.05545787885785103,
-0.028974536806344986,
-0.01722758449614048,
-0.01605863869190216,
-0.043116871267557144,
-0.0038661460857838392,
-0.0239154901355505,
0.02700074203312397,
-0.01966129243373871,
0.04917239397764206,
0.013212925754487514,
0.06933192908763885,
-0.06553764641284943,
-0.017505450174212456,
-0.02033199928700924,
0.011890674941241741,
-0.023053154349327087,
0.02759479731321335,
0.05503629148006439,
-0.07994826138019562,
0.011066663078963757,
0.014516012743115425,
-0.004280547145754099,
0.0059309653006494045,
-0.008129925467073917,
0.005696217529475689,
-0.02738400362432003,
-0.05266007035970688,
0.014985508285462856,
0.017505450174212456,
-0.07193810492753983,
-0.05787242203950882,
0.039629194885492325,
-0.01844443939626217,
-0.0057441252283751965,
-0.020197859033942223,
0.012408076785504818,
0.0849306508898735,
-0.030028505250811577,
0.019440917298197746,
-0.03562411665916443,
0.040127433836460114,
-0.022593239322304726,
0.05128033086657524,
0.009955205954611301,
-0.03290296345949173,
0.0017737800953909755,
-0.02081107534468174,
-0.02081107534468174,
0.04579969868063927,
-0.027997221797704697,
-0.006309435237199068,
-0.01330874115228653,
-0.023072317242622375,
0.007828107103705406,
-0.0372721403837204,
-0.02592761069536209,
-0.002238484099507332,
-0.029147004708647728,
-0.030354276299476624,
0.002359451027587056,
-0.0006425611209124327,
0.012867990881204605,
-0.05009222403168678,
0.026962416246533394,
0.0067597669549286366,
-0.07561741024255753,
-0.04315519705414772,
0.011689462698996067,
-0.02573598176240921,
-0.0030493210069835186,
-0.007123865187168121,
0.004579969681799412,
-0.026674970984458923,
-0.05875392258167267,
0.01985292322933674,
-0.011986490339040756,
-0.09765492379665375,
0.0244712196290493,
0.013854887336492538,
-0.031504061073064804,
-0.024126283824443817,
0.01722758449614048,
0.006946607027202845,
0.04951732978224754,
-0.026253383606672287,
-0.07025175541639328,
-0.06672575324773788,
0.008000575006008148,
0.025678491219878197,
0.002263635629788041,
-0.010951684787869453,
-0.08968309313058853,
-0.031408246606588364,
0.011785278096795082,
-0.0005701008485630155,
0.026579154655337334,
0.030315950512886047,
0.021213499829173088,
0.02408795803785324,
0.08677030354738235,
-0.014726806432008743,
0.00047518385690636933,
0.012963805347681046,
0.004242220893502235,
-0.047447722405195236,
0.0727812796831131,
0.026847438886761665,
0.044458284974098206,
-0.025103600695729256,
-0.03928425908088684,
-0.04150717332959175,
0.032845474779605865,
0.06741562485694885,
0.017764151096343994,
0.01973794586956501,
0.021117685362696648,
-0.009528828784823418,
-0.055802810937166214,
-0.04396004602313042,
-0.034091074019670486,
-0.03271133080124855,
-0.010424701496958733,
0.031868159770965576,
0.0042589888907969,
-0.012465566396713257,
-0.027939733117818832,
-0.02786307968199253,
-0.0043595945462584496,
-0.06450283527374268,
0.0004003281646873802,
-0.03027762472629547,
-0.038460247218608856,
-0.08692361414432526,
0.04752437397837639,
-0.003753563156351447,
-0.04016575962305069,
-0.012561381794512272,
0.07695882022380829,
0.06810548901557922,
-0.036831390112638474,
-0.0350300632417202,
0.007775409147143364,
0.03529834374785423,
0.028035547584295273,
-0.033152081072330475,
-0.014659736305475235,
0.02738400362432003,
0.04729441553354263,
0.017974944785237312,
-0.008091599680483341,
0.047179438173770905,
0.007938294671475887,
-0.012321843765676022,
0.011631974019110203,
0.006453158333897591,
-0.04376841336488724,
0.007904759608209133,
0.0335928313434124,
-0.06611253321170807,
0.010654658079147339,
-0.019622966647148132,
-0.02380051277577877,
0.04024241119623184,
-0.017812058329582214,
-0.02138596773147583,
0.018885189667344093,
-0.032558027654886246,
0.002209739526733756,
-0.02652166597545147,
-0.048137590289115906,
0.08117469400167465,
0.012331425212323666,
-0.01253263745456934,
-0.0037248185835778713,
0.0023678347934037447,
0.033726975321769714,
0.02506527490913868,
0.04162215068936348,
-0.03010515682399273,
0.01572328619658947,
0.03928425908088684,
0.024892807006835938,
-0.002500778529793024,
-0.004769205115735531,
0.028514623641967773,
0.009682132862508297,
0.0014132752548903227,
-0.011095408350229263,
-0.026176732033491135,
0.024816153571009636,
-0.025141926482319832,
-0.018818119540810585,
-0.07285793125629425,
-0.033324550837278366,
-0.023532230406999588,
-0.027997221797704697,
0.005384818185120821,
-0.009567154571413994,
0.01175653375685215,
-0.02554435096681118,
-0.0387093685567379,
-0.0062471553683280945,
0.058025725185871124,
-0.03349701687693596,
-0.01692097634077072,
0.03259635344147682,
-0.03376530110836029,
0.061590053141117096,
0.03763623908162117,
0.021730903536081314,
-0.009442594833672047,
-0.0035954678896814585,
0.07554075866937637,
0.06323807686567307,
0.03355450555682182,
-0.007871224544942379,
0.054346419870853424,
-0.009658179245889187,
-0.02198002301156521,
0.04599132761359215,
-0.00605073431506753,
-0.0002494191285222769,
0.008388626389205456,
0.07178480178117752,
0.033707812428474426,
-0.025506025180220604,
0.02311064302921295,
-0.006031570956110954,
-0.04116223752498627,
-0.015445421449840069,
-0.024030469357967377,
0.0452631339430809,
-0.029760222882032394,
-0.018243227154016495,
0.03269216790795326,
0.13590437173843384,
-0.019680455327033997,
-0.009246173314750195,
0.01098043005913496,
-0.05338826775550842,
0.035183366388082504,
-0.052008528262376785,
0.00602198950946331,
0.03476177901029587,
0.007684384472668171,
0.03225141763687134,
0.0058303591795265675,
-0.0363139882683754,
0.027192372828722,
0.05101205036044121,
-0.03639063984155655,
-0.009332407265901566,
-0.01118164137005806,
-0.03777037933468819,
0.004527271259576082,
0.05300500616431236,
0.029108678922057152,
0.032941289246082306,
-0.023359762504696846,
-0.009016216732561588,
0.01605863869190216,
0.07074999064207077,
-0.008819795213639736,
-0.040127433836460114,
-0.0140752624720335,
0.016039475798606873,
0.0028002012986689806,
-0.02640668861567974,
-0.0029870409052819014,
-0.05392483249306679,
-0.051510289311409,
-0.01789829134941101,
0.008048482239246368,
-0.020849402993917465,
0.00813471619039774,
0.028763743117451668,
-0.011277456767857075,
-0.029971016570925713,
-0.017524613067507744,
0.014918437227606773,
0.01432438287883997,
0.019718782976269722,
-0.011986490339040756,
0.007315495517104864,
0.015742449089884758,
-0.016451481729745865,
-0.09014300256967545,
-0.03096749447286129,
-0.009993532672524452,
0.007363403216004372,
-0.06787553429603577,
0.030641723424196243,
0.0404723696410656,
-0.011699044145643711,
-0.042350348085165024,
0.035662442445755005,
0.01301171351224184,
0.000035200882848585024,
0.046489566564559937,
0.014410615898668766,
0.007847269997000694,
0.02970273233950138,
-0.054384745657444,
0.03250053897500038,
0.011162478476762772,
-0.04545476287603378,
-0.07404603809118271,
0.03278798609972,
0.00955757312476635,
0.0016228711465373635,
-0.013644094578921795,
-0.03849857300519943,
-0.060440272092819214,
0.004321268759667873,
0.0202361848205328,
-0.058294009417295456,
0.01607780158519745,
-0.06883368641138077,
0.006175294052809477,
0.009888135828077793,
0.025889284908771515,
-0.023781349882483482,
0.029836874455213547,
0.07193810492753983,
0.01605863869190216,
-0.06948523223400116,
-0.005926174111664295,
0.016001150012016296,
0.02585095912218094,
-0.006362133659422398,
-0.010865451768040657,
-0.0884566530585289,
0.03096749447286129,
0.04993891716003418,
0.02196086011826992,
0.006496275309473276,
-0.023206457495689392,
-0.04093228280544281,
-0.10440031439065933,
0.0008449708693660796,
-0.00621362030506134,
-0.0031283684074878693,
0.02360888198018074,
0.05890722572803497,
0.04487987235188484,
-0.046872828155756,
0.005696217529475689,
-0.018798954784870148,
0.033037103712558746,
0.07879847288131714,
0.010769636370241642,
-0.014899274334311485,
0.022401610389351845,
-0.07304956018924713,
-0.029204493388533592,
0.018846863880753517,
0.038460247218608856,
0.008441325277090073,
-0.001628859550692141,
-0.022420773282647133,
-0.03872853145003319,
0.04357678443193436,
0.031504061073064804,
0.03639063984155655,
-0.016049057245254517,
-0.0019198984373360872,
-0.0015258581843227148,
-0.012618870474398136,
0.03840275853872299,
0.03018181025981903,
-0.04112391173839569,
-0.010098929516971111,
-0.022784870117902756,
-0.0003970345132984221,
0.03066088631749153,
0.05729753151535988,
0.06852708011865616,
-0.005403981078416109,
0.03451266139745712,
0.03399525582790375,
-0.004005078226327896,
0.041967086493968964,
-0.017457541078329086,
-0.040970608592033386,
0.03591156378388405,
-0.025371883064508438,
0.039514217525720596,
0.05426976829767227,
-0.054423071444034576,
0.00778978131711483,
0.03863271698355675,
0.0900663509964943,
-0.028112199157476425,
-0.029587754979729652,
-0.08906987309455872,
-0.02747981809079647,
-0.0009060531156137586,
0.026061752811074257,
0.040204085409641266,
0.004656622186303139,
0.042235370725393295,
-0.008992263115942478,
-0.019536733627319336,
-0.026195894926786423,
-0.01765875332057476,
0.038747694343328476,
0.005801614373922348,
-0.027997221797704697,
-0.016623949632048607,
0.044649913907051086,
-0.001699523301795125,
0.01591491512954235,
-0.012331425212323666,
0.05323496460914612,
-0.0020528421737253666,
0.042043738067150116,
-0.007617313880473375,
-0.00917431153357029,
0.006113014183938503,
-0.01344288233667612,
0.029108678922057152,
0.04434330761432648,
-0.03056506998836994,
0.030526744201779366,
0.0369463674724102,
0.042925238609313965,
-0.028802068904042244,
0.07538745552301407,
0.04875080659985542,
-0.00457517895847559,
-0.0062519460916519165,
-0.005073418375104666,
0.017294656485319138,
0.019278032705187798,
0.04806093871593475,
0.019105564802885056,
-0.007665221579372883,
0.01354827918112278,
0.008647328242659569,
-0.023283110931515694,
-0.06250987946987152,
-0.025965938344597816,
-0.044190000742673874,
0.09136944264173508,
0.006692696362733841,
0.025007784366607666,
0.005413562525063753,
-0.022478261962532997,
-0.036160681396722794,
-0.028763743117451668,
-0.006060315761715174,
-0.05415479093790054,
0.04556974023580551,
-0.06128344684839249,
-0.028667928650975227,
-0.07795530557632446,
-0.012015234678983688,
0.026272546499967575,
0.01320334430783987,
0.039150118827819824,
0.022995663806796074,
-0.021539272740483284,
0.014123170636594296,
-0.06193498894572258,
0.037597909569740295,
0.03418688848614693,
0.035566627979278564,
0.009974369779229164,
-0.008283229544758797,
0.046604547649621964,
-0.0037320046685636044,
0.031178288161754608,
-0.003365511307492852,
0.024126283824443817,
-0.020945217460393906,
-0.030718374997377396,
0.004402711521834135,
0.005063836928457022,
-0.027039067819714546,
-0.01113373413681984,
0.0038493783213198185,
0.032462213188409805,
0.008886866271495819,
0.011842766776680946,
-0.052008528262376785,
0.06047859787940979,
0.01610654592514038,
0.013375811278820038,
0.022516587749123573,
-0.019565477967262268,
-0.006448367610573769,
0.016949720680713654,
0.02052363008260727,
-0.04848252609372139,
-0.047447722405195236,
-0.015713704749941826,
0.022689055651426315,
0.010156418196856976,
-0.0009623445803299546,
0.0093180350959301,
-0.03301794081926346,
0.014880111441016197,
-0.07676719129085541,
0.000989891472272575,
-0.04411334916949272,
-0.001889956183731556,
0.015617888420820236,
-0.017984526231884956,
0.004474572837352753,
-0.02874458022415638,
-0.08163461089134216,
-0.013950702734291553,
-0.023244783282279968,
0.01325125154107809,
0.023723861202597618,
-0.07109493017196655,
-0.05545787885785103,
-0.05334994196891785,
0.027824753895401955,
0.0042494069784879684,
0.044956523925065994,
0.027537308633327484,
-0.027939733117818832,
-0.011382853612303734,
0.03466596454381943,
0.03087168000638485,
0.03579658269882202,
0.004510503727942705,
0.01161281019449234,
0.06109181419014931,
0.060823533684015274,
0.02129015326499939,
0.05668431147933006,
-0.04093228280544281,
0.03997413069009781,
0.0170359555631876,
-0.020389489829540253,
-0.004817112814635038,
0.01961338520050049,
0.017543775960803032,
-0.005945337470620871,
0.0006389680784195662,
-0.029453612864017487,
0.005375236738473177,
0.04721776396036148,
-0.009361151605844498,
0.003401441965252161,
-0.01210146863013506,
-0.026655808091163635,
-0.014583083800971508,
-0.055879466235637665,
-0.034972574561834335,
0.017888709902763367,
-0.06745395064353943,
-0.008177832700312138,
0.008355091325938702,
-0.012168538756668568,
0.002361846389248967,
0.05039883032441139,
0.014813040383160114,
-0.00964380707591772,
-0.00460631912574172,
-0.016691019758582115,
-0.002388195600360632,
-0.07776366919279099,
-0.0588688999414444,
-0.04376841336488724,
0.006913071498274803,
0.023723861202597618,
-0.010127673856914043,
-0.01083670649677515,
0.0020911681931465864,
0.052468441426754,
0.036256495863199234,
0.022957338020205498,
-0.000992286833934486,
0.00808680895715952,
0.0006874745595268905,
0.03978249803185463,
0.03347785398364067,
0.03428270295262337,
-0.016135290265083313,
0.032193928956985474,
0.10194744169712067,
0.04162215068936348,
-0.039245933294296265,
0.01287757232785225,
-0.032078951597213745,
-0.050475481897592545,
-0.025391045957803726,
0.006501066032797098,
-0.029951853677630424,
0.029147004708647728,
-0.037195488810539246,
0.005533331539481878,
-0.00607468793168664,
0.010213907808065414,
0.04691115394234657,
-0.03888183459639549,
-0.013002132065594196,
0.009461757726967335,
0.0580640509724617,
-0.04453493654727936,
0.0029247610364109278,
-0.015435840003192425,
0.03228974714875221,
0.03483843058347702,
0.012360169552266598,
0.07002180069684982,
0.005763288587331772,
0.001819292432628572,
-0.06753060221672058,
-0.020466141402721405,
-0.09083287417888641,
-0.01394112128764391,
0.0406256727874279,
0.06438785791397095,
-0.0016588018042966723,
-0.09849809855222702,
-0.021328479051589966,
0.016528133302927017,
-0.01648980751633644,
0.02217165380716324,
0.003001413308084011,
0.008738352917134762,
-0.033746138215065,
0.016767671331763268,
-0.01006060279905796,
0.024260425940155983,
0.06595923006534576,
0.04093228280544281,
-0.0326346792280674,
-0.023570556193590164,
-0.038364432752132416,
-0.027115721255540848,
-0.06898698955774307,
0.013806980103254318,
0.004910532385110855,
-0.052966680377721786,
0.005921383388340473,
-0.030890842899680138,
-0.06113013997673988,
0.05197020247578621
]
|
41,447 | pyglove.core.detouring.class_detour | detour | Context manager for detouring object creation.
At times, we want to replace an object of a class to an object of a different
class. Usually, we do so by passing the object as a function argument using
dependency injection. However, it's not always possible to expose those
internal objects as parameters to the class, as we cannot predict what needs
to be customized in future. Also, exposing too many arguments will hurt
usability, it's big burden to figure out 20 arguments of a function for a user
to get started.
`pg.detour` provides another option for object replacement in Python, which
creates a context in which some source classes can be detoured to specified
destination classes or functions. For example, the code snippet below will
detour instantation of class A to class B, and vice-versa::
class A:
pass
class B:
pass
# Exchange class A and class B.
with pg.detour([(A, B), (B, A)]):
a = A() # a is a B object.
b = B() # b is an A object.
Detour destination can be a function, which allows users to intercept the
arguments passed to the class constructor. For example::
class Foo:
def __init__(self, value):
self.value = value
class Bar:
def __init__(self, value):
self.value = value
def detoured_foo(cls, value):
# cls is the original class before detour.
return Bar(value + 1)
with pg.detour([(Foo, detoured_foo)]):
f = Foo(1) # f will be Bar(2).
Detour can be nested. The outer scope mappings take precedence over the
mappings from the inner loop, allowing users to change object creation
behaviors from the outside. For example, the following code will detour
class A to class C::
with pg.detour([(A, C)]):
with pg.detour([A, B]):
a = A() # a is a C object.
Detour is transisive across the inner and outer scope. For example, the code
below will detour class A to class C through B::
with pg.detour([(B, C)]):
a1 = A() # a1 is an A object.
with pg.detour([A, B]):
a2 = A() # a2 is a C object. (A -> B -> C)
Detour is thread-sfe.
Args:
mappings: A sequence of tuple (src_cls, dest_cls_or_fn) as mappings for the
detour - 'src_cls' is the source class to be detoured, while
'dest_cls_or_fn' is the destination class or function. When it's a class,
its `__init__` method should have the same signature as the `__init__` of
the original class. When it's a function, it should accept a positional
argument `cls`, for passing the original class that is being detoured,
followed by all the arguments that the original class should accept. For
example, a class with `__init__(self, x, *args, y, **kwargs)` can be
detoured to a function with signature `(cls, x, *args, y, **kwargs)`.
Yields:
Resolved detour mappings.
Raises:
TypeError: If the first item in each mapping is not a class, or the second
item in each mapping is neither a class nor a function.
| def get_original_new(self, src_cls):
"""Returns the original new method of source cls."""
if not _is_detoured_new(src_cls.__new__):
orig_new = src_cls.__new__
else:
# NOTE(daiyip): there are usually 3 patterns in implementing __new__.
# 1) call super.__new__ to return an instance.
# 2) explicitly call object.__new__ to return an instance.
# 3) return an instance from another class.
#
# The following code aims to support case #1 by mimicing the call
# convention of super.__new__ without access to the super object.
# We implement this by maintaining a call history of `__new__` method
# returned by `get_original_new` for each top-most call to
# `_maybe_detour_new`. Based on the history, we always return the next
# __new__ along the inheritance hierarchy. For example, for code:
#
# ```
# class A:
# def __new__(cls, *args, **kwargs):
# return super(A, cls).__new__(cls, *args, **kwargs)
#
# class B:
# def __new__(cls, *args, **kwargs):
# return super(A, cls).__new__(cls, *args, **kwargs)
#
# class C(A, B):
# pass
# ```
# when we detour A and B to other classes, their `__new__` method will be
# replaced with `_maybe_detoured_new`. As we create an object of C, it
# will call `C.__new__`, which inherits the `_maybe_detoured_new` assigned
# to `A.__new__`. `_maybe_detoured_new` calls `get_original_new` on class
# C, which should return the original `A.__new__`. It then executes
# `super(A, cls).__new__`, which triggers `_maybe_detoured_new` method
# again assigned to `B.__new__`. In such case, we cannot differentiate the
# first call to `_maybe_detoured_new` (C.__new__) from this call, since
# both take class C as the cls argument. However, by assuming that nested
# `_maybe_detoured_new` call should always reflect the `super.__new__`
# call convention, we can store the call history for these invoked __new__
# methods, and return the one that is one-step closer to `object.__new__`.
# This may not work for the most complicated __new__ customization, but
# should work well for most __new__ implementations.
orig_new = self._original_new.get(src_cls, object.__new__)
if orig_new is object.__new__ or orig_new in self._new_stack:
for base in src_cls.__bases__:
base_new = self.get_original_new(base)
if base_new is not object.__new__ and base_new not in self._new_stack:
orig_new = base_new
break
return orig_new
| (mappings: Sequence[Tuple[Type[Any], Union[Type[Any], function]]]) | [
-0.002370885806158185,
-0.042800597846508026,
0.06517817080020905,
0.002043050481006503,
-0.0879945158958435,
-0.029397986829280853,
0.00236714631319046,
0.054607655853033066,
0.05209466814994812,
-0.02102135494351387,
0.009837555699050426,
0.005803808569908142,
-0.019096724689006805,
0.009822596795856953,
-0.007224844302982092,
0.018059618771076202,
-0.01503804698586464,
-0.028959210962057114,
-0.009673014283180237,
-0.06246573477983475,
0.00922426674515009,
0.04024771973490715,
0.04834512993693352,
-0.016045236960053444,
-0.00046744593419134617,
0.08137299120426178,
-0.03370596840977669,
0.012385447509586811,
0.026107167825102806,
-0.0007011689012870193,
-0.0507783405482769,
-0.0437978133559227,
0.008062507957220078,
0.06254551559686661,
0.055923983454704285,
-0.014559382572770119,
-0.03308769315481186,
0.04375792667269707,
-0.0410853810608387,
-0.011727283708751202,
-0.003924052696675062,
-0.08496297150850296,
-0.02626672200858593,
-0.05293232947587967,
0.023235179483890533,
0.025927668437361717,
-0.0073644546791911125,
-0.0030863897409290075,
-0.04902323707938194,
-0.012664668262004852,
0.0024032953660935163,
-0.04343881458044052,
0.023135457187891006,
0.033845577389001846,
-0.003766990965232253,
0.04850468412041664,
0.02175929583609104,
0.009029809385538101,
-0.04607146978378296,
0.012594862841069698,
-0.00438277330249548,
0.032628972083330154,
0.002067980822175741,
-0.05149633809924126,
-0.05177555978298187,
-0.038871556520462036,
-0.03601951524615288,
-0.07084236294031143,
0.011148896999657154,
0.02120085433125496,
-0.06553716957569122,
-0.01302366703748703,
0.012176032178103924,
0.018328865990042686,
0.051935113966464996,
0.029517652466893196,
0.005719045177102089,
-0.00988741684705019,
0.07088225334882736,
-0.01344249863177538,
-0.04555291682481766,
-0.0611095204949379,
0.016563791781663895,
0.0060331691056489944,
0.030534815043210983,
0.0025316872633993626,
-0.007763342000544071,
0.0016690936172381043,
-0.0018361276015639305,
-0.025768112391233444,
-0.021958740428090096,
-0.01856819912791252,
-0.005973335821181536,
-0.02197868376970291,
0.03296802565455437,
-0.027822382748126984,
-0.0154070183634758,
0.031571920961141586,
0.07626723498106003,
-0.007374427281320095,
0.01607515476644039,
0.034723129123449326,
-0.07259746640920639,
-0.03230986371636391,
0.007035372778773308,
-0.008960003964602947,
-0.007324566133320332,
0.05520598962903023,
-0.06577649712562561,
-0.030794091522693634,
-0.031571920961141586,
-0.029776928946375847,
-0.028959210962057114,
0.06035163253545761,
-0.017969869077205658,
-0.029776928946375847,
0.006347292568534613,
0.008396575227379799,
-0.0008170955115929246,
-0.010171623900532722,
-0.009189363569021225,
0.0012976299040019512,
-0.045951806008815765,
-0.030395204201340675,
-0.016115043312311172,
-0.016633596271276474,
0.03492257371544838,
-0.062425848096609116,
0.035640571266412735,
0.01518763042986393,
-0.002333490177989006,
0.02915865369141102,
-0.054128993302583694,
0.06577649712562561,
0.009533404372632504,
0.01390121877193451,
-0.05795830860733986,
0.04248148575425148,
-0.047746796160936356,
-0.004547314252704382,
-0.00814727135002613,
-0.0034827839117497206,
0.08137299120426178,
0.06366239488124847,
-0.06984514743089676,
0.011388229206204414,
0.021619686856865883,
0.06517817080020905,
0.010799870826303959,
0.0038841641508042812,
-0.030395204201340675,
0.018398672342300415,
0.026166999712586403,
0.07303624600172043,
0.020113887265324593,
-0.01254500262439251,
-0.03209047392010689,
0.012275753542780876,
-0.053690217435359955,
0.00972287543118,
-0.015367128886282444,
-0.019136613234877586,
0.01282422337681055,
-0.06326351314783096,
0.028480546548962593,
0.00035744032356888056,
0.021160965785384178,
-0.07068280875682831,
-0.01520757470279932,
0.01721198298037052,
-0.047746796160936356,
0.018358783796429634,
0.057838644832372665,
-0.0044625503942370415,
-0.010371067561209202,
0.03815355896949768,
-0.02421245351433754,
-0.023055680096149445,
0.005305199883878231,
0.012275753542780876,
0.018628032878041267,
-0.01859811507165432,
0.0029393001459538937,
0.009074683301150799,
0.02120085433125496,
0.059673525393009186,
0.014828631654381752,
0.0027373633347451687,
-0.029876651242375374,
0.03448379784822464,
-0.026027388870716095,
0.02574816904962063,
0.031352534890174866,
0.000009090849744097795,
0.04611136019229889,
0.030056150630116463,
-0.03825328126549721,
0.08001676946878433,
-0.00686085969209671,
0.11974593997001648,
-0.01727181486785412,
0.04946201294660568,
0.02534928172826767,
-0.07311602681875229,
0.022038517519831657,
0.025987500324845314,
-0.0036897065583616495,
0.007309607695788145,
-0.03873194754123688,
-0.027463383972644806,
0.06306406855583191,
0.03011598438024521,
0.030654480680823326,
0.02758304961025715,
-0.01658373512327671,
-0.007748384028673172,
0.0789397731423378,
0.0021278138738125563,
-0.050937894731760025,
0.011817033402621746,
0.01944575086236,
0.017122233286499977,
-0.10841754078865051,
0.07343513518571854,
-0.01278433483093977,
-0.008072479628026485,
-0.015935543924570084,
-0.008984934538602829,
-0.018737725913524628,
-0.04391748085618019,
-0.05528576672077179,
-0.028001882135868073,
0.024711061269044876,
0.026845108717679977,
0.02744343876838684,
0.004250641912221909,
0.027862271293997765,
0.0018872350919991732,
-0.03548101708292961,
0.06346295028924942,
-0.05309188738465309,
0.0025678363163024187,
0.034204576164484024,
0.05743975564837456,
0.022038517519831657,
-0.03330707922577858,
-0.020263468846678734,
-0.006257542874664068,
0.020423024892807007,
0.017989812418818474,
0.011328396387398243,
-0.023175345733761787,
-0.025768112391233444,
-0.008705712854862213,
-0.005838711280375719,
-0.02714427374303341,
-0.05285255238413811,
-0.029876651242375374,
-0.005240380764007568,
-0.03488268703222275,
-0.008925100788474083,
0.03530151769518852,
0.014489577151834965,
0.03915077820420265,
-0.03480290621519089,
-0.026545943692326546,
0.027642883360385895,
-0.038353003561496735,
-0.00431795371696353,
0.05939430370926857,
0.1558053344488144,
-0.013113416731357574,
-0.03950977697968483,
0.05105756223201752,
-0.019306140020489693,
-0.08703718334436417,
-0.011986560188233852,
0.03793417289853096,
-0.018109478056430817,
-0.08639896661043167,
-0.02281634695827961,
0.06118929758667946,
-0.008561116643249989,
-0.03298797085881233,
-0.04042721912264824,
0.020243525505065918,
-0.02021360956132412,
-0.06852882355451584,
0.00684091541916132,
0.0037121439818292856,
-0.025249559432268143,
-0.005230408161878586,
0.0017675688723102212,
0.03366607800126076,
0.05704087018966675,
0.013153305277228355,
-0.07124125212430954,
0.0032658888958394527,
-0.03859233483672142,
-0.022577015683054924,
-0.02381356619298458,
-0.0480659082531929,
-0.030654480680823326,
0.016563791781663895,
0.016154931858181953,
-0.011218702420592308,
-0.031532034277915955,
-0.042242154479026794,
0.027463383972644806,
0.0010988095309585333,
-0.015746071934700012,
0.04403714835643768,
0.04643046855926514,
-0.031751420348882675,
-0.010191568173468113,
0.020881744101643562,
-0.01665353961288929,
0.015905626118183136,
0.04475514218211174,
0.06282473355531693,
-0.008905156515538692,
0.04339892789721489,
-0.056881316006183624,
-0.005634281784296036,
-0.0038816710002720356,
-0.02509000524878502,
-0.012395420111715794,
0.013452470302581787,
-0.04124493524432182,
-0.016424180939793587,
-0.06378206610679626,
0.002575315535068512,
0.0062675150111317635,
-0.012973805889487267,
-0.03641840070486069,
-0.003258409909904003,
-0.023354845121502876,
-0.0621466264128685,
-0.0015805904986336827,
-0.057838644832372665,
0.061468515545129776,
0.013621998019516468,
-0.02516978234052658,
-0.02219807170331478,
0.0032633959781378508,
-0.013592081144452095,
0.07730434089899063,
0.02171940729022026,
-0.031192978844046593,
-0.027642883360385895,
-0.01570618338882923,
-0.10889620333909988,
-0.02263684757053852,
-0.02879965491592884,
0.02285623736679554,
0.001335025648586452,
-0.0038841641508042812,
0.006586624775081873,
0.03548101708292961,
-0.07463179528713226,
0.006247570738196373,
0.004477508831769228,
-0.02039310708642006,
0.02491050586104393,
0.019605305045843124,
0.005120714195072651,
-0.0009099614107981324,
0.004116017371416092,
-0.05763920024037361,
-0.04930245876312256,
-0.00484149344265461,
-0.044954586774110794,
0.04292026162147522,
0.0013898726319894195,
-0.043598372489213943,
-0.04698891192674637,
-0.024551507085561752,
0.0015992883127182722,
-0.016663512215018272,
0.021659575402736664,
0.0692468211054802,
-0.008227048441767693,
-0.06569672375917435,
0.021819129586219788,
0.02014380320906639,
-0.005644253920763731,
0.04100560396909714,
0.03825328126549721,
0.05819764360785484,
0.0339851900935173,
-0.03181125223636627,
-0.026585832238197327,
0.003587491810321808,
-0.0035226724576205015,
0.002394569804891944,
-0.004268093034625053,
-0.032708749175071716,
0.029796874150633812,
-0.020223580300807953,
-0.013731691986322403,
0.02359417825937271,
0.05289244279265404,
0.01390121877193451,
-0.027543161064386368,
-0.02692488580942154,
-0.0008364166133105755,
0.08943051099777222,
0.05289244279265404,
-0.03631867840886116,
-0.030036205425858498,
-0.03360624611377716,
0.005694114603102207,
0.020782023668289185,
-0.0405668281018734,
0.0189271979033947,
0.020223580300807953,
0.004836507141590118,
-0.01370177511125803,
0.009927305392920971,
0.0013811469543725252,
0.004445099271833897,
0.03845272585749626,
0.005569462664425373,
-0.01625465415418148,
0.04096571356058121,
0.019266251474618912,
-0.07746389508247375,
0.0047567300498485565,
-0.035421181470155716,
0.029996316879987717,
0.02766282670199871,
-0.01542696263641119,
0.01300372276455164,
0.021121077239513397,
-0.0313325896859169,
-0.034683242440223694,
-0.006102974060922861,
0.047268133610486984,
-0.010211512446403503,
0.07766333967447281,
-0.030255593359470367,
-0.05380988121032715,
-0.015127796679735184,
0.03717628866434097,
-0.009842542000114918,
-0.039350222796201706,
0.0692468211054802,
-0.023973120376467705,
-0.00011429053120082244,
0.013871301896870136,
0.031751420348882675,
0.018827475607395172,
0.031232867389917374,
0.06075052171945572,
0.0012234618188813329,
-0.010012068785727024,
0.01230567041784525,
-0.027762548997998238,
-0.008102396503090858,
0.06988503783941269,
-0.010969397611916065,
0.030255593359470367,
0.05217444524168968,
0.04391748085618019,
-0.057838644832372665,
-0.034723129123449326,
0.029118765145540237,
-0.03661784529685974,
-0.04427647963166237,
0.011188785545527935,
0.05712064728140831,
0.01010680478066206,
0.00530021358281374,
-0.0246113408356905,
-0.09653070569038391,
-0.023015791550278664,
0.04491470009088516,
-0.052812665700912476,
0.007010442670434713,
0.004460057709366083,
0.004307981580495834,
-0.034942518919706345,
0.03282841667532921,
-0.024970337748527527,
-0.041324712336063385,
-0.017780397087335587,
0.023314956575632095,
0.02285623736679554,
-0.01702251099050045,
0.05373010411858559,
-0.027762548997998238,
0.04331915080547333,
-0.026645664125680923,
0.03412479907274246,
-0.02189890667796135,
-0.008376630954444408,
-0.014090689830482006,
-0.008002674207091331,
0.03183119744062424,
-0.07283680140972137,
0.01933605782687664,
-0.00551960151642561,
-0.021799186244606972,
-0.011976588517427444,
0.03055476024746895,
-0.05133678391575813,
0.006307404022663832,
0.010700149461627007,
0.011916754767298698,
0.05201489105820656,
0.0189271979033947,
-0.002527947537600994,
0.009533404372632504,
-0.01322311069816351,
-0.0324295274913311,
-0.0014035843778401613,
-0.001528236549347639,
-0.013951079919934273,
0.03195086494088173,
-0.043159596621990204,
0.07874033600091934,
0.02007399871945381,
-0.011607617139816284,
-0.06864848732948303,
0.0010046971729025245,
0.007808216847479343,
-0.010710121132433414,
-0.004671966191381216,
0.015028075315058231,
0.015067963860929012,
0.0019769847858697176,
-0.03627879172563553,
0.014280161820352077,
0.010680205188691616,
0.01304361131042242,
0.01761087030172348,
-0.0066015832126140594,
0.006771109998226166,
0.02674538642168045,
-0.0377945601940155,
0.011408173479139805,
-0.038831669837236404,
-0.04471525549888611,
0.09318005293607712,
-0.030654480680823326,
0.02303573489189148,
0.00040169188287109137,
-0.04042721912264824,
-0.04052693769335747,
-0.062385957688093185,
0.016204793006181717,
0.03360624611377716,
0.022577015683054924,
0.05807797610759735,
0.012724502012133598,
0.0013574629556387663,
-0.003941504284739494,
0.020801967009902,
0.027782494202256203,
0.02267673797905445,
0.012554974295198917,
0.025449004024267197,
0.03440402075648308,
-0.049142904579639435,
-0.031133145093917847,
0.01435993891209364,
0.026067279279232025,
0.08009655028581619,
-0.01662362366914749,
0.006461972836405039,
0.026386387646198273,
0.03278852626681328,
0.013422554358839989,
0.014290133491158485,
0.006466958671808243,
0.0023285041097551584,
-0.04096571356058121,
0.02124074287712574,
0.027104385197162628,
-0.07435257732868195,
0.0013562164967879653,
-0.005379991140216589,
-0.012674640864133835,
-0.07012437283992767,
-0.04124493524432182,
-0.03576023876667023,
-0.062784843146801,
0.014698993414640427,
0.057399868965148926,
-0.013203166425228119,
-0.00996220763772726,
0.08296854048967361,
-0.018189257010817528,
-0.05069856345653534,
-0.006372223142534494,
0.046869244426488876,
-0.020442968234419823,
0.03250930830836296,
-0.023354845121502876,
0.026246776804327965,
-0.04850468412041664,
0.023873398080468178,
-0.00790793914347887,
-0.0005260324687696993,
0.01461921539157629,
-0.04148427024483681,
0.020861800760030746,
-0.06501861661672592,
0.028819600120186806,
-0.0031985766254365444,
0.05109744891524315,
-0.033327024430036545,
0.0583970844745636,
-0.06130896136164665,
0.0053251441568136215,
0.0040611703880131245,
-0.10514666885137558,
-0.007543954066932201,
0.007868049666285515,
0.05057889595627785,
-0.0751902386546135,
-0.032230086624622345,
0.010829787701368332,
0.005669184494763613,
-0.06457983702421188,
0.024770895019173622,
-0.005295227747410536,
0.03203064203262329,
-0.034284353256225586,
-0.03671756759285927,
0.0077733141370117664,
-0.03763500601053238,
0.04078621417284012,
-0.03155197575688362,
-0.03324724733829498,
0.0018822490237653255,
0.018588144332170486,
0.01186689455062151,
0.03917072340846062,
0.0702839270234108,
-0.0437978133559227,
-0.029178598895668983,
-0.0013412581756711006,
-0.02905893325805664,
-0.0421224869787693,
-0.10562533140182495,
0.07012437283992767,
-0.03434418886899948,
0.006995484232902527,
0.007783286273479462,
0.0032633959781378508,
0.08951028436422348,
-0.02530939318239689,
-0.009583264589309692,
-0.00441019656136632,
-0.05309188738465309,
-0.02233768254518509,
0.049103014171123505,
0.037256065756082535,
-0.018687864765524864,
0.05253344401717186,
0.012644723989069462,
0.02417256496846676,
0.042641039937734604,
0.035780180245637894,
0.06992492824792862,
0.06812993437051773,
-0.0010408462258055806,
0.024711061269044876,
-0.021320519968867302,
-0.007374427281320095,
-0.05213455855846405,
-0.02014380320906639,
-0.016464069485664368,
-0.009358891285955906,
-0.056003764271736145,
0.026605775579810143,
0.036039456725120544,
0.011627561412751675,
0.023614121600985527,
0.018089534714818,
0.016862956807017326,
-0.020682301372289658,
0.010321206413209438,
0.015576545149087906,
0.08288875967264175,
0.04447592422366142,
0.0071301087737083435,
-0.006217654328793287,
-0.08584052324295044,
0.04188315570354462,
0.0032559167593717575,
0.05436832457780838,
0.041763488203287125,
-0.026825163513422012,
0.01855822652578354,
-0.0903080627322197,
-0.0019458215683698654,
-0.02197868376970291,
-0.03793417289853096,
0.037654951214790344,
-0.03019576147198677,
-0.006776096299290657,
-0.0065267919562757015,
0.00022141356021165848,
0.015257434919476509,
-0.027044551447033882,
-0.010979370214045048,
0.026326555758714676,
-0.028041770681738853,
-0.024790840223431587,
0.04487480968236923,
0.06605572253465652,
-0.03394529968500137,
0.00814727135002613,
-0.02451161853969097,
0.0286201573908329,
-0.01457932684570551,
-0.032369695603847504,
-0.0007204900030046701,
-0.0050957840867340565,
-0.0038692057132720947,
0.05747964605689049,
-0.003093868726864457,
0.03988872095942497,
0.009328974410891533,
0.016125015914440155,
-0.04355848208069801,
-0.022716626524925232,
-0.019535500556230545,
0.0014771291753277183,
0.04168371111154556,
-0.022277850657701492,
-0.025010228157043457,
-0.012046393007040024,
0.026805220171809196,
-0.02586783468723297,
-0.012734473682940006,
0.011248619295656681,
0.004240669310092926,
-0.07423290610313416,
0.02167951874434948,
0.01746128685772419,
0.08584052324295044,
-0.017890090122818947,
-0.017969869077205658,
0.05337110534310341,
0.027742603793740273,
-0.004200780764222145,
0.020881744101643562,
0.03392535448074341,
-0.005868627689778805,
0.010176609270274639,
-0.02509000524878502,
-0.03645829111337662,
-0.04575236141681671,
0.022477293387055397,
-0.014649132266640663,
-0.005818767007440329,
0.009892402216792107,
-0.01230567041784525,
-0.04419670253992081,
0.04487480968236923,
0.03643834590911865,
0.029836762696504593,
-0.007150053046643734,
0.025269504636526108,
0.03019576147198677
]
|
41,536 | pyglove.core.symbolic.diff | diff | Inspect the symbolic diff between two objects.
For example::
@pg.members([
('x', pg.Any()),
('y', pg.Any())
])
class A(pg.Object):
pass
@pg.members([
('z', pg.Any().noneable())
])
class B(A):
pass
# Diff the same object.
pg.diff(A(1, 2), A(1, 2))
>> No diff
# Diff the same object with mode 'same'.
pg.diff(A(1, 2), A(1, 2), mode='same')
>> A(1, 2)
# Diff different objects of the same type.
pg.diff(A(1, 2), A(1, 3))
>> A(
>> y = Diff(
>> left=2,
>> right=3
>> )
>> )
# Diff objects of different type.
pg.diff(A(1, 2), B(1, 3))
>> Diff(
>> left = A(
>> x = 1,
>> y = 2
>> ),
>> right = B(
>> x = 1,
>> y = 3,
>> z = None
>> )
# Diff objects of different type with collapse.
pg.diff(A(1, 2), B(1, 3), collapse=True)
>> A|B (
>> y = Diff(
>> left = 2,
>> right = 3,
>> ),
>> z = Diff(
>> left = MISSING,
>> right = None
>> )
>> )
# Diff objects of different type with collapse and flatten.
# Object type is included in key '_type'.
pg.diff(A(1, pg.Dict(a=1)), B(1, pg.Dict(a=2)), collapse=True, flatten=True)
>> {
>> 'y.a': Diff(1, 2),
>> 'z', Diff(MISSING, None),
>> '_type': Diff(A, B)
>> }
Args:
left: The left object to compare.
right: The right object to compare.
flatten: If True, returns a level-1 dict with diff keys flattened. Otherwise
preserve the hierarchy of the diff result.
collapse: One of a boolean value, string or a callable object that indicates
whether to collapse two different values. The default value 'same_type'
means only collapse when the two values are of the same type.
mode: Diff mode, should be one of ['diff', 'same', 'both']. For 'diff' mode
(the default), the return value contains only different values. For 'same'
mode, the return value contains only same values. For 'both', the return
value contains both different and same values.
Returns:
A `Diff` object when flatten is False. Otherwise a dict of string (key path)
to `Diff`.
| def diff(
left: Any,
right: Any,
flatten: bool = False,
collapse: Union[bool, str, Callable[[Any, Any], bool]] = 'same_type',
mode: str = 'diff') -> object_utils.Nestable[Diff]:
"""Inspect the symbolic diff between two objects.
For example::
@pg.members([
('x', pg.Any()),
('y', pg.Any())
])
class A(pg.Object):
pass
@pg.members([
('z', pg.Any().noneable())
])
class B(A):
pass
# Diff the same object.
pg.diff(A(1, 2), A(1, 2))
>> No diff
# Diff the same object with mode 'same'.
pg.diff(A(1, 2), A(1, 2), mode='same')
>> A(1, 2)
# Diff different objects of the same type.
pg.diff(A(1, 2), A(1, 3))
>> A(
>> y = Diff(
>> left=2,
>> right=3
>> )
>> )
# Diff objects of different type.
pg.diff(A(1, 2), B(1, 3))
>> Diff(
>> left = A(
>> x = 1,
>> y = 2
>> ),
>> right = B(
>> x = 1,
>> y = 3,
>> z = None
>> )
# Diff objects of different type with collapse.
pg.diff(A(1, 2), B(1, 3), collapse=True)
>> A|B (
>> y = Diff(
>> left = 2,
>> right = 3,
>> ),
>> z = Diff(
>> left = MISSING,
>> right = None
>> )
>> )
# Diff objects of different type with collapse and flatten.
# Object type is included in key '_type'.
pg.diff(A(1, pg.Dict(a=1)), B(1, pg.Dict(a=2)), collapse=True, flatten=True)
>> {
>> 'y.a': Diff(1, 2),
>> 'z', Diff(MISSING, None),
>> '_type': Diff(A, B)
>> }
Args:
left: The left object to compare.
right: The right object to compare.
flatten: If True, returns a level-1 dict with diff keys flattened. Otherwise
preserve the hierarchy of the diff result.
collapse: One of a boolean value, string or a callable object that indicates
whether to collapse two different values. The default value 'same_type'
means only collapse when the two values are of the same type.
mode: Diff mode, should be one of ['diff', 'same', 'both']. For 'diff' mode
(the default), the return value contains only different values. For 'same'
mode, the return value contains only same values. For 'both', the return
value contains both different and same values.
Returns:
A `Diff` object when flatten is False. Otherwise a dict of string (key path)
to `Diff`.
"""
def _should_collapse(left, right):
if isinstance(left, dict):
if isinstance(right, dict):
return True
elif isinstance(left, list):
return isinstance(right, list)
if (isinstance(left, (dict, base.Symbolic))
and isinstance(right, (dict, base.Symbolic))):
if collapse == 'same_type':
return type(left) is type(right)
elif callable(collapse):
return collapse(left, right)
elif isinstance(collapse, bool):
return collapse
else:
raise ValueError(f'Unsupported `collapse` value: {collapse!r}')
else:
return False
def _add_child_diff(diff_container, key, value, child_has_diff):
if ((mode != 'same' and child_has_diff)
or (mode != 'diff' and not child_has_diff)):
diff_container[key] = value
def _get_container_ops(container):
if isinstance(container, dict):
return container.__contains__, container.__getitem__, container.items
else:
assert isinstance(container, base.Symbolic)
return container.sym_hasattr, container.sym_getattr, container.sym_items
def _diff(x, y) -> Tuple[object_utils.Nestable[Diff], bool]:
if x is y or x == y:
return (Diff(x, y), False)
if not _should_collapse(x, y):
return (Diff(x, y), True)
diff_value, has_diff = {}, False
if isinstance(x, list):
assert isinstance(y, list)
def _child(l, index):
return l[i] if index < len(l) else Diff.MISSING
for i in range(max(len(x), len(y))):
child_diff, child_has_diff = _diff(_child(x, i), _child(y, i))
has_diff = has_diff or child_has_diff
_add_child_diff(diff_value, str(i), child_diff, child_has_diff)
diff_value = Diff(pg_list.List, pg_list.List, children=diff_value)
else:
assert isinstance(x, (dict, base.Symbolic))
assert isinstance(y, (dict, base.Symbolic))
x_haskey, _, x_items = _get_container_ops(x)
y_haskey, y_getitem, y_items = _get_container_ops(y)
for k, xv in x_items():
yv = y_getitem(k) if y_haskey(k) else Diff.MISSING
child_diff, child_has_diff = _diff(xv, yv)
has_diff = has_diff or child_has_diff
_add_child_diff(diff_value, k, child_diff, child_has_diff)
for k, yv in y_items():
if not x_haskey(k):
child_diff, _ = _diff(Diff.MISSING, yv)
has_diff = True
_add_child_diff(diff_value, k, child_diff, True)
xt, yt = type(x), type(y)
same_type = xt is yt
if not same_type:
has_diff = True
if flatten:
# Put type difference with key '_type'. Since symbolic
# fields will not start with underscore, so there should be
# no clash.
if not same_type or mode != 'diff':
diff_value['_type'] = Diff(xt, yt)
else:
diff_value = Diff(xt, yt, children=diff_value)
return diff_value, has_diff
diff_value, has_diff = _diff(left, right)
if not has_diff and mode == 'diff':
diff_value = Diff()
if flatten:
diff_value = object_utils.flatten(diff_value)
return diff_value
| (left: Any, right: Any, flatten: bool = False, collapse: Union[bool, str, Callable[[Any, Any], bool]] = 'same_type', mode: str = 'diff') -> Union[Any, pyglove.core.symbolic.diff.Diff] | [
0.04428994655609131,
-0.08160186558961868,
0.055824216455221176,
0.01977449655532837,
-0.02069805935025215,
-0.04153978452086449,
-0.006464936770498753,
-0.006454674992710352,
0.014756474643945694,
0.02487461268901825,
-0.013360869139432907,
0.004776869900524616,
0.03612155094742775,
0.013412178494036198,
-0.03870752453804016,
-0.002102387137711048,
-0.05143216252326965,
-0.0002887735900003463,
0.04708115756511688,
0.03716825693845749,
0.02193973772227764,
-0.023889480158686638,
0.013504534028470516,
0.04769686609506607,
-0.02310958318412304,
-0.05541374161839485,
0.02752215974032879,
0.0032145101577043533,
-0.029348760843276978,
0.05184263363480568,
-0.024464141577482224,
-0.04847676306962967,
-0.01011813897639513,
-0.04999551177024841,
-0.05799971893429756,
-0.09055016189813614,
-0.022268114611506462,
0.062227580696344376,
-0.05093959718942642,
-0.018317321315407753,
-0.0449056550860405,
-0.008702009916305542,
-0.017742659896612167,
-0.023561103269457817,
-0.0017201349837705493,
-0.0051719495095312595,
-0.02245282754302025,
-0.014776998199522495,
-0.060955118387937546,
-0.01824548840522766,
0.026064982637763023,
-0.07056016474962234,
0.007065252400934696,
0.05504431948065758,
-0.033330339938402176,
0.017178259789943695,
-0.00411241827532649,
0.033556099981069565,
-0.025716081261634827,
0.006644518114626408,
-0.025675034150481224,
0.04835362359881401,
-0.07918008416891098,
0.002069036243483424,
-0.05890275537967682,
-0.04539822041988373,
-0.0506112203001976,
-0.02105722203850746,
-0.018060775473713875,
0.004715299233794212,
-0.08940083533525467,
0.012622019276022911,
0.04572660103440285,
0.0264754556119442,
-0.0029323105700314045,
-0.029636090621352196,
0.03938480466604233,
0.027830014005303383,
0.0659218281507492,
-0.05639887601137161,
-0.05471593886613846,
0.0019946382381021976,
-0.017496377229690552,
0.00856347568333149,
0.029595043510198593,
0.08710219711065292,
0.05315614491701126,
0.06235072389245033,
0.05167844519019127,
-0.026721738278865814,
-0.060955118387937546,
-0.026229171082377434,
0.00503341481089592,
-0.011626624502241611,
-0.018974076956510544,
0.03720930218696594,
-0.022350208833813667,
-0.004966713488101959,
-0.0126528050750494,
0.01530035026371479,
0.04523403197526932,
0.03133954852819443,
-0.04314062371850014,
0.03232468292117119,
-0.006459805648773909,
-0.012827255763113499,
-0.025161944329738617,
-0.03082646057009697,
0.01201657298952341,
-0.01928192935883999,
-0.05968265235424042,
0.03657307103276253,
0.01696276292204857,
-0.00961017981171608,
0.042935390025377274,
0.02713221125304699,
-0.010082222521305084,
-0.03099064901471138,
0.011421388015151024,
-0.030703319236636162,
0.008599392138421535,
0.03720930218696594,
0.009646096266806126,
-0.013986838981509209,
0.024217858910560608,
0.010138662531971931,
0.032057877629995346,
0.03887171298265457,
-0.009743583388626575,
0.07589630782604218,
0.04901037737727165,
0.012519401498138905,
-0.0272963996976614,
0.07704562693834305,
0.023458484560251236,
0.021426647901535034,
0.0017855539917945862,
0.044700417667627335,
-0.03710668534040451,
0.01315563265234232,
0.008696879260241985,
-0.0707654058933258,
0.05414127930998802,
0.0481073372066021,
-0.12010415643453598,
0.012529662810266018,
-0.024689901620149612,
0.026557549834251404,
-0.00547467265278101,
0.07027283310890198,
-0.011636885814368725,
-0.020031042397022247,
0.028363626450300217,
-0.011831860058009624,
0.016193127259612083,
-0.005900537595152855,
-0.048394668847322464,
-0.016654908657073975,
0.025244038552045822,
0.019138265401124954,
-0.015618465840816498,
-0.002135738031938672,
0.042319681495428085,
0.011441911570727825,
0.022801728919148445,
0.008199181407690048,
0.04318167269229889,
-0.06423889845609665,
-0.037517156451940536,
0.01987711526453495,
0.03887171298265457,
-0.0017727266531437635,
0.00916892196983099,
-0.054182328283786774,
-0.0017201349837705493,
0.06571659445762634,
0.008737926371395588,
-0.0013064559316262603,
-0.028876718133687973,
-0.013330083340406418,
-0.025839222595095634,
-0.029964469373226166,
0.0012217960320413113,
-0.00393027113750577,
-0.027111686766147614,
-0.006916455924510956,
-0.026495978236198425,
-0.05763029307126999,
0.05229415372014046,
0.023232724517583847,
-0.04708115756511688,
-0.030087610706686974,
0.0006670173024758697,
0.03638835623860359,
-0.005469541531056166,
-0.00967688113451004,
-0.03870752453804016,
-0.03181159496307373,
0.02193973772227764,
0.039507947862148285,
-0.09506535530090332,
-0.019179312512278557,
0.03464385122060776,
-0.005900537595152855,
0.003678856883198023,
0.004035454709082842,
-0.02702959254384041,
0.03513641655445099,
0.004356136079877615,
-0.04203234985470772,
-0.019538475200533867,
-0.016336793079972267,
-0.006767659913748503,
-0.0032683846075087786,
0.012539925053715706,
0.004769173450767994,
-0.011185366660356522,
-0.015618465840816498,
-0.016860144212841988,
-0.03279672563076019,
0.04868200048804283,
-0.030251799151301384,
-0.030559653416275978,
0.03226311132311821,
-0.01255018636584282,
-0.0065316385589540005,
0.02575712837278843,
0.03318667411804199,
0.04753267765045166,
-0.04289434105157852,
-0.001797098433598876,
-0.034664373844861984,
0.00018503316096030176,
-0.044084712862968445,
0.020020781084895134,
-0.05635783076286316,
-0.015064328908920288,
0.006567554548382759,
0.052253108471632004,
-0.009543477557599545,
-0.021036699414253235,
-0.030374940484762192,
0.0015072025125846267,
0.020913556218147278,
0.01359689049422741,
-0.07121691852807999,
0.047122206538915634,
-0.027768442407250404,
-0.024443617090582848,
-0.017352711409330368,
-0.00021918572019785643,
-0.03579317405819893,
0.02834310382604599,
-0.002952834125608206,
0.0308880303055048,
-0.040164701640605927,
-0.02475147135555744,
-0.030498081818223,
0.015556895174086094,
-0.03554689139127731,
0.06033940985798836,
-0.04958503693342209,
-0.051473211497068405,
0.05397709086537361,
-0.033658716827631,
-0.029923420399427414,
0.04699906334280968,
-0.01751689985394478,
-0.0156595129519701,
0.014428096823394299,
-0.05574212223291397,
-0.062391769140958786,
-0.01706537976861,
0.05237624794244766,
-0.05927218124270439,
0.03138059750199318,
0.03406919166445732,
-0.03667568787932396,
0.04482356086373329,
-0.04318167269229889,
-0.03384343162178993,
-0.03601893410086632,
-0.05102169141173363,
-0.019302453845739365,
-0.028445720672607422,
0.024525711312890053,
-0.03400762006640434,
-0.05077540874481201,
-0.013750817626714706,
-0.02938980795443058,
0.07117587327957153,
0.02938980795443058,
0.04190921038389206,
0.023396912962198257,
0.029861850664019585,
0.07523954659700394,
-0.0010005258955061436,
-0.046629637479782104,
0.0023602149449288845,
0.014941186644136906,
-0.0063725803047418594,
-0.024464141577482224,
0.1269179880619049,
-0.010733847506344318,
-0.002083146246150136,
-0.049215614795684814,
0.06038045510649681,
-0.04036993905901909,
0.06846676021814346,
0.03435651957988739,
-0.03380238264799118,
0.06846676021814346,
0.0006416834658011794,
0.023848433047533035,
-0.0032350337132811546,
-0.03550584241747856,
-0.03776343911886215,
0.015751870349049568,
0.04835362359881401,
0.0449056550860405,
0.009117613546550274,
0.020687798038125038,
-0.027542682364583015,
0.09383393824100494,
-0.018071036785840988,
-0.022596493363380432,
0.06493669748306274,
0.0361625999212265,
0.08275119215250015,
0.01748611405491829,
-0.01130850799381733,
-0.024505188688635826,
0.08882617950439453,
0.011975525878369808,
-0.0019920726772397757,
-0.009112481959164143,
0.04465937241911888,
-0.014756474643945694,
-0.021426647901535034,
-0.005736348684877157,
0.04786105453968048,
0.013566105626523495,
0.0037686475552618504,
-0.036593593657016754,
0.042155493050813675,
0.018071036785840988,
0.06296642869710922,
0.04314062371850014,
0.04831257462501526,
0.06579869240522385,
-0.043427955359220505,
0.04880513995885849,
-0.011493220925331116,
-0.040944598615169525,
-0.023027488961815834,
-0.009343372657895088,
-0.06452622264623642,
-0.05492117628455162,
-0.00987185537815094,
-0.004227863159030676,
0.0030862377025187016,
0.0065316385589540005,
-0.01902538537979126,
0.0017393758753314614,
0.015505585819482803,
-0.04691696912050247,
-0.02624969556927681,
-0.0272963996976614,
-0.029738709330558777,
-0.05422337353229523,
0.010620967485010624,
-0.014335740357637405,
0.02393052726984024,
-0.039117999374866486,
-0.03193473443388939,
0.03507484868168831,
-0.0014687207294628024,
0.015351659618318081,
0.01608024723827839,
0.037024591118097305,
0.0067420052364468575,
0.007275619078427553,
-0.03480803966522217,
0.020903294906020164,
0.012037096545100212,
0.032673586159944534,
0.034377045929431915,
-0.03177054598927498,
0.03971318155527115,
-0.018132608383893967,
-0.002437178511172533,
-0.014469143934547901,
0.01769135147333145,
0.05237624794244766,
-0.08784104138612747,
-0.013032491318881512,
-0.002385869389399886,
-0.01075437106192112,
-0.035321131348609924,
-0.024833565577864647,
0.054839082062244415,
0.015238779596984386,
0.012591233476996422,
-0.02189869061112404,
-0.003091368591412902,
-0.008019600063562393,
0.02425890602171421,
0.03743506222963333,
-0.038522813469171524,
0.03318667411804199,
0.04289434105157852,
-0.02167293056845665,
-0.05040598288178444,
0.04318167269229889,
0.006054464727640152,
-0.042648058384656906,
0.020615965127944946,
0.042483869940042496,
0.030292846262454987,
0.007701484020799398,
0.04724534600973129,
-0.008609653450548649,
0.02719378098845482,
-0.006269962526857853,
0.007660436909645796,
-0.020708320662379265,
-0.04913352057337761,
0.033391911536455154,
-0.00662912568077445,
0.03480803966522217,
0.012201284989714622,
-0.029143523424863815,
0.02255544625222683,
-0.035977885127067566,
-0.0010839031310752034,
-0.046670686453580856,
0.018399415537714958,
-0.028917765244841576,
0.017239831387996674,
0.07166843861341476,
-0.01111353375017643,
0.02938980795443058,
0.047286394983530045,
-0.05968265235424042,
-0.04753267765045166,
0.011123795993626118,
0.03445914015173912,
0.0006012775702401996,
-0.021529264748096466,
0.011267460882663727,
0.058204952627420425,
0.012745160609483719,
0.04806629195809364,
-0.002165240701287985,
-0.06247386336326599,
-0.04190921038389206,
-0.012026834301650524,
0.013873958960175514,
-0.06025731563568115,
0.0417039729654789,
0.011657409369945526,
-0.039179567247629166,
-0.04765582084655762,
0.015967367216944695,
-0.039179567247629166,
0.020226016640663147,
0.029964469373226166,
-0.006116035394370556,
-0.02680383250117302,
0.03109326772391796,
0.01957952231168747,
-0.013853435404598713,
-0.020687798038125038,
0.04671173170208931,
0.018584128469228745,
0.02817891538143158,
0.0016508677508682013,
-0.06822047382593155,
-0.07392603904008865,
-0.05574212223291397,
-0.038687001913785934,
-0.035813696682453156,
-0.015782654285430908,
-0.05590631067752838,
0.024936184287071228,
-0.03657307103276253,
-0.0013340346049517393,
0.009630703367292881,
0.045357175171375275,
0.010600443929433823,
-0.07207891345024109,
-0.0002834823390003294,
-0.031401120126247406,
0.009456252679228783,
-0.005041111260652542,
0.0021588271483778954,
-0.012078143656253815,
-0.05254043638706207,
0.025346657261252403,
-0.05233520269393921,
0.003691683989018202,
0.02403314597904682,
0.04024679586291313,
0.03177054598927498,
0.04305852949619293,
0.0016701086424291134,
0.033556099981069565,
-0.014766735956072807,
-0.019230620935559273,
-0.02245282754302025,
-0.034377045929431915,
-0.03589579090476036,
0.09999102354049683,
0.03265305981040001,
-0.050488077104091644,
0.00567990867421031,
0.04494670405983925,
0.018266011029481888,
0.036367833614349365,
-0.05028283968567848,
0.006444413214921951,
-0.04946189746260643,
0.01428443193435669,
-0.06920560449361801,
0.022083403542637825,
-0.01050808746367693,
0.0025333829689770937,
0.008065777830779552,
0.03595736250281334,
-0.06809733062982559,
0.008065777830779552,
-0.009984735399484634,
0.011493220925331116,
-0.00415859604254365,
-0.003909747581928968,
0.027645301073789597,
-0.011339293792843819,
0.013145371340215206,
-0.03423338010907173,
0.0269064512103796,
0.053566619753837585,
0.025182466953992844,
-0.01915878802537918,
0.035485319793224335,
0.010805679485201836,
0.05311509966850281,
0.040287844836711884,
-0.019702663645148277,
0.034110236912965775,
0.01912800408899784,
-0.00011400222865631804,
-0.001548249740153551,
0.01856360398232937,
0.050693314522504807,
-0.04814838618040085,
0.0013853436103090644,
0.0011422671377658844,
-0.016747264191508293,
0.07269462198019028,
-0.02425890602171421,
0.014674380421638489,
0.014428096823394299,
0.029020382091403008,
-0.04589078947901726,
0.06891828030347824,
0.004666555672883987,
0.04049307852983475,
0.024464141577482224,
-0.010600443929433823,
0.02774791792035103,
-0.012775946408510208,
0.05364871397614479,
0.0024012622889131308,
-0.04851781204342842,
0.04736848920583725,
0.012868302874267101,
-0.06403365731239319,
0.018809886649250984,
-0.03076488897204399,
-0.0545927993953228,
-0.022411780431866646,
0.0019394810078665614,
0.005551636219024658,
0.00077220075763762,
0.019723188132047653,
0.019795021042227745,
-0.024936184287071228,
0.025962363928556442,
0.044413089752197266,
-0.002001051791012287,
-0.04605497792363167,
-0.009646096266806126,
0.05155530571937561,
-0.01075437106192112,
0.007203786633908749,
0.047122206538915634,
-0.018132608383893967,
0.007460331544280052,
0.0018394284415990114,
-0.05492117628455162,
0.019764235243201256,
-0.02354057878255844,
0.011298246681690216,
-0.03183211758732796,
-0.027727395296096802,
-0.027111686766147614,
0.04556241258978844,
0.001797098433598876,
0.013145371340215206,
0.00916892196983099,
0.03152426332235336,
0.022678587585687637,
0.039959464222192764,
-0.049379803240299225,
0.0385843850672245,
-0.05254043638706207,
0.010867251083254814,
0.016398362815380096,
-0.006049333605915308,
-0.036532022058963776,
0.004494670312851667,
0.001360971829853952,
-0.025449274107813835,
-0.026044460013508797,
-0.05668620765209198,
0.07626572996377945,
-0.03363819420337677,
0.013124847784638405,
0.009107351303100586,
-0.048599906265735626,
0.019035646691918373,
-0.009584525600075722,
0.021005913615226746,
-0.003958491142839193,
0.01428443193435669,
-0.060749880969524384,
0.03909747302532196,
-0.024361522868275642,
0.00587488291785121,
0.0899754986166954,
-0.011924216523766518,
-0.08972921967506409,
-0.022965917363762856,
0.049667131155729294,
-0.10048358887434006,
-0.0024076758418232203,
0.012970920652151108,
-0.012447568587958813,
0.026783309876918793,
0.048435717821121216,
-0.00042490282794460654,
0.024689901620149612,
-0.01775292120873928,
-0.03519798815250397,
0.016583075746893883,
0.05422337353229523,
0.025244038552045822,
-0.014828307554125786,
-0.003040059469640255,
0.01340191625058651,
0.0473274402320385,
-0.022309161722660065,
-0.02977975644171238,
0.0481894314289093,
0.0005785092362202704,
-0.011924216523766518,
0.05828704684972763,
-0.011513744480907917,
0.09366974979639053,
0.04106774181127548,
-0.016203388571739197,
-0.013350607827305794,
0.04806629195809364,
0.022288639098405838,
-0.07253043353557587,
-0.029348760843276978,
0.03265305981040001,
0.08849780261516571,
0.03275568038225174,
-0.022370733320713043,
-0.016059724614024162,
0.05143216252326965,
-0.022637540474534035,
-0.006418758537620306,
-0.019959209486842155,
0.009912902489304543,
0.020862247794866562,
0.008953424170613289,
0.02245282754302025,
-0.046506498008966446,
0.02961556799709797,
-0.04108826443552971,
0.04958503693342209,
-0.039959464222192764,
-0.040287844836711884,
-0.02415628731250763,
-0.031236931681632996,
0.007778447587043047,
-0.014017624780535698,
0.00824022851884365,
0.03429495170712471,
-0.0020202926825731993,
-0.006059595383703709,
-0.0024769429583102465,
0.05738401040434837,
-0.003114457707852125,
-0.04141664132475853,
0.01651124283671379,
0.04322271794080734,
-0.014346002601087093,
-0.02795315533876419,
0.05553688481450081,
0.02366372011601925,
-0.06407470256090164,
0.011380340903997421,
-0.04445413500070572,
-0.0048461370170116425,
0.043756332248449326,
-0.008696879260241985,
-0.009281801991164684,
-0.032776203006505966,
0.007906720042228699,
0.08151977509260178,
0.021755024790763855,
0.034664373844861984,
0.049831323325634,
0.06760476529598236,
-0.025900794193148613,
-0.028055772185325623,
-0.0513911172747612,
0.005813312251120806,
0.09358765184879303,
0.03216049447655678,
0.0022473351564258337,
-0.000806834374088794,
-0.031195884570479393,
-0.02510037273168564,
-0.0417039729654789,
0.008363370783627033,
0.051924727857112885,
0.012755422852933407,
0.016008414328098297,
-0.034992754459381104,
0.02327377162873745,
-0.0124578308314085,
-0.006095511838793755,
-0.0166754312813282,
0.03004656359553337,
-0.04297643527388573,
-0.06542926281690598,
0.020051565021276474,
-0.06304852664470673,
-0.04363319277763367,
-0.013915007002651691,
0.02360215038061142,
0.060298360884189606,
-0.031031696125864983,
-0.038851190358400345,
-0.004522890318185091,
-0.07117587327957153,
0.038132864981889725,
-0.009794891811907291,
-0.015803178772330284,
0.055618979036808014,
-0.018953552469611168,
0.044413089752197266,
-0.02454623579978943,
0.05738401040434837
]
|
41,537 | pyglove.core.hyper.object_template | dna_spec | Returns the DNASpec from a (maybe) hyper value.
Example::
hyper = pg.Dict(x=pg.oneof([1, 2, 3]), y=pg.oneof(['a', 'b']))
spec = pg.dna_spec(hyper)
assert spec.space_size == 6
assert len(spec.decision_points) == 2
print(spec.decision_points)
# Select a partial space with `where` argument.
spec = pg.dna_spec(hyper, where=lambda x: len(x.candidates) == 2)
assert spec.space_size == 2
assert len(spec.decision_points) == 1
See also:
* :class:`pyglove.DNASpec`
* :class:`pyglove.DNA`
Args:
value: A (maybe) hyper value.
where: Function to filter hyper primitives. If None, all hyper primitives
from `value` will be included in the encoding/decoding process. Otherwise
only the hyper primitives on which 'where' returns True will be included.
`where` can be very useful to partition a search space into separate
optimization processes. Please see 'Template' docstr for details.
Returns:
A DNASpec object, which represents the search space from algorithm's view.
| def dna_spec(
value: Any,
where: Optional[Callable[[base.HyperPrimitive], bool]] = None
) -> geno.DNASpec:
"""Returns the DNASpec from a (maybe) hyper value.
Example::
hyper = pg.Dict(x=pg.oneof([1, 2, 3]), y=pg.oneof(['a', 'b']))
spec = pg.dna_spec(hyper)
assert spec.space_size == 6
assert len(spec.decision_points) == 2
print(spec.decision_points)
# Select a partial space with `where` argument.
spec = pg.dna_spec(hyper, where=lambda x: len(x.candidates) == 2)
assert spec.space_size == 2
assert len(spec.decision_points) == 1
See also:
* :class:`pyglove.DNASpec`
* :class:`pyglove.DNA`
Args:
value: A (maybe) hyper value.
where: Function to filter hyper primitives. If None, all hyper primitives
from `value` will be included in the encoding/decoding process. Otherwise
only the hyper primitives on which 'where' returns True will be included.
`where` can be very useful to partition a search space into separate
optimization processes. Please see 'Template' docstr for details.
Returns:
A DNASpec object, which represents the search space from algorithm's view.
"""
return template(value, where).dna_spec()
| (value: Any, where: Optional[Callable[[pyglove.core.hyper.base.HyperPrimitive], bool]] = None) -> pyglove.core.geno.base.DNASpec | [
0.09935785830020905,
0.029632406309247017,
-0.01417835894972086,
-0.08149822801351547,
0.0016025828663259745,
0.016155675053596497,
0.00465853838250041,
-0.0463256910443306,
-0.015481382608413696,
-0.018023645505309105,
-0.005608470179140568,
0.07238616794347763,
-0.025459084659814835,
0.015736520290374756,
-0.01041508000344038,
-0.022543225437402725,
0.0358286015689373,
0.1059185341000557,
0.005289548542350531,
-0.020611470565199852,
0.0059729525819420815,
0.015991657972335815,
-0.03242069482803345,
0.005348776932805777,
-0.011508526280522346,
-0.027190374210476875,
-0.011645207181572914,
-0.026169823482632637,
-0.026424961164593697,
0.000961321871727705,
0.09396351873874664,
-0.03591972216963768,
-0.013431170023977757,
-0.013230704702436924,
-0.003530921647325158,
0.0002844669797923416,
0.03499029576778412,
0.06772080063819885,
-0.1008157879114151,
0.014797979034483433,
-0.01880728267133236,
-0.036029066890478134,
-0.017968973144888878,
-0.012920894660055637,
-0.015016667544841766,
0.010651993565261364,
0.04428458958864212,
0.03460758924484253,
-0.058462951332330704,
0.051355548202991486,
-0.0020422395318746567,
-0.018606817349791527,
0.017385803163051605,
-0.011909456923604012,
0.005585690028965473,
-0.018014533445239067,
-0.0364299975335598,
0.05073592811822891,
0.08091505616903305,
0.028721200302243233,
0.0009698644280433655,
0.007234972435981035,
-0.015034891664981842,
-0.05653119459748268,
-0.003879457712173462,
-0.016583941876888275,
0.06068629026412964,
-0.007868260145187378,
-0.053979817777872086,
-0.025677774101495743,
-0.00026410724967718124,
-0.02564132586121559,
0.013467618264257908,
0.036830928176641464,
0.05204806104302406,
0.0037587229162454605,
-0.028848769143223763,
-0.012437956407666206,
0.07530202716588974,
-0.04563317447900772,
0.0350814163684845,
-0.0022586507257074118,
-0.029523061588406563,
-0.07522913068532944,
-0.02560487762093544,
0.033659934997558594,
0.035937946289777756,
0.052120957523584366,
0.09629620611667633,
0.0251857228577137,
-0.01337649766355753,
-0.028192700818181038,
0.04701820760965347,
0.03958277031779289,
0.0018861955031752586,
0.05758819356560707,
0.04694531112909317,
0.025677774101495743,
-0.003950076177716255,
-0.018953075632452965,
0.00906649511307478,
-0.01799630932509899,
0.018825506791472435,
0.03435245156288147,
-0.044649071991443634,
-0.021139970049262047,
-0.01145385392010212,
0.024219844490289688,
-0.04129583761096001,
-0.04446683079004288,
-0.09068317711353302,
-0.04381076246500015,
0.006838597822934389,
-0.014734194613993168,
0.03509964048862457,
-0.0031094891019165516,
0.009394529275596142,
0.00044649073970504105,
-0.028575407341122627,
-0.03969211503863335,
-0.024055827409029007,
0.029049234464764595,
-0.044175244867801666,
-0.004371508955955505,
-0.001015994232147932,
0.025805341079831123,
-0.038890253752470016,
-0.05201161280274391,
-0.07909264415502548,
0.019955402240157127,
0.05496392026543617,
0.052631232887506485,
-0.004688152577728033,
0.014078126288950443,
0.04085845872759819,
0.021231090649962425,
-0.02877587266266346,
-0.050517238676548004,
-0.007239528466016054,
-0.04566962271928787,
-0.0034489131066948175,
-0.025404412299394608,
0.010806898586452007,
-0.09994103014469147,
0.035682812333106995,
-0.0011891232570633292,
-0.017549820244312286,
-0.06695538759231567,
0.012966454960405827,
0.05252188816666603,
-0.014925546944141388,
0.02024698816239834,
0.06156104803085327,
-0.032894521951675415,
-0.010023261420428753,
-0.04851258546113968,
0.0003792893257923424,
-0.07727023214101791,
-0.014670410193502903,
-0.007253196556121111,
0.02611515112221241,
0.004120927304029465,
-0.01087979506701231,
0.02826559729874134,
-0.010816010646522045,
0.04563317447900772,
-0.04501355439424515,
-0.0024192507844418287,
0.0517200268805027,
-0.024693671613931656,
0.005722370930016041,
0.05139199644327164,
-0.044649071991443634,
0.019718488678336143,
0.03147304058074951,
-0.026898788288235664,
0.009503873996436596,
-0.011462965980172157,
0.0023269911762326956,
-0.09789992868900299,
0.05376112833619118,
0.04884061962366104,
-0.010770450346171856,
0.10030551254749298,
0.01720356196165085,
0.007572118192911148,
0.02265257015824318,
0.03706784173846245,
0.03497207164764404,
-0.00773157924413681,
-0.0023577443789690733,
0.02070259116590023,
-0.022579673677682877,
0.03160060942173004,
-0.0044922432862222195,
-0.049241550266742706,
0.030543610453605652,
-0.009768123738467693,
-0.022470328956842422,
0.02298060432076454,
-0.014606625773012638,
-0.0543443001806736,
-0.03034314513206482,
-0.0112807247787714,
-0.03161883354187012,
0.003786059096455574,
0.0285207349807024,
-0.006574348080903292,
-0.03280340135097504,
-0.02877587266266346,
-0.024183396250009537,
-0.0005339095368981361,
0.02775532193481922,
-0.00820085033774376,
0.029340820387005806,
-0.10467929393053055,
0.03400619328022003,
-0.0026311061810702085,
-0.012328611686825752,
-0.034079089760780334,
-0.031290799379348755,
0.03899959847331047,
0.09644199907779694,
0.009089275263249874,
0.0364299975335598,
-0.01303935144096613,
0.004079923033714294,
-0.006414887495338917,
-0.010579097084701061,
-0.07756181806325912,
0.022889483720064163,
-0.036994945257902145,
0.052995715290308,
-0.0410771481692791,
0.007877372205257416,
0.02788289077579975,
-0.004583363886922598,
-0.01834256760776043,
-0.010816010646522045,
-0.0011150878854095936,
0.025021705776453018,
0.009813684038817883,
-0.007667794823646545,
0.002235870575532317,
-0.011863896623253822,
-0.005954728461802006,
-0.032056212425231934,
0.0017540707485750318,
0.02095772884786129,
-0.04556027799844742,
-0.0636385977268219,
-0.03783325478434563,
0.005945616401731968,
-0.011180492118000984,
0.0011179352877661586,
-0.024219844490289688,
-0.0063738832250237465,
-0.049715377390384674,
0.0410771481692791,
0.03034314513206482,
-0.07843657582998276,
-0.00887514278292656,
0.0032142777927219868,
0.01546315848827362,
-0.008519772440195084,
0.008091505616903305,
-0.013576962985098362,
0.003107211086899042,
0.017814069986343384,
0.022889483720064163,
-0.07100114226341248,
0.05270412936806679,
0.023472655564546585,
-0.08514305204153061,
0.009540322236716747,
0.0031778295524418354,
0.04508645087480545,
0.025258619338274002,
0.06250870227813721,
0.00046300634858198464,
-0.024274516850709915,
-0.012948230840265751,
-0.016665950417518616,
0.04162387177348137,
-0.0035650918725878,
0.013868548907339573,
-0.031236127018928528,
0.07639547437429428,
-0.004597031977027655,
0.02041100524365902,
-0.014734194613993168,
-0.04428458958864212,
0.017968973144888878,
-0.034334227442741394,
0.0064741154201328754,
0.01485265139490366,
0.007025395054370165,
-0.03258471190929413,
-0.007116515655070543,
-0.01918998919427395,
0.01588231325149536,
0.026807667687535286,
0.03453469276428223,
0.09206821024417877,
-0.08339353650808334,
0.06593483686447144,
0.05376112833619118,
-0.019846057519316673,
-0.01720356196165085,
-0.03863511607050896,
-0.010478864423930645,
0.007367097306996584,
0.021905381232500076,
0.0676843523979187,
0.02416517212986946,
-0.007093735504895449,
-0.03278517723083496,
-0.027117477729916573,
0.00802772119641304,
0.029595958068966866,
-0.049496687948703766,
0.0635657012462616,
-0.02467544749379158,
-0.0324571430683136,
0.006916050333529711,
-0.01020550262182951,
0.009777235798537731,
-0.012119034305214882,
-0.025586653500795364,
0.06546100974082947,
-0.02544086053967476,
0.05226675048470497,
0.0317828506231308,
0.036357101052999496,
-0.018178550526499748,
0.005635806359350681,
0.03181929886341095,
0.007708799093961716,
-0.03316788375377655,
-0.03579215332865715,
0.04596120864152908,
-0.019499799236655235,
0.018825506791472435,
-0.03347769379615784,
0.019372230395674706,
-0.05962929129600525,
-0.005581133998930454,
-0.028593631461262703,
-0.008515216410160065,
0.002192588523030281,
0.03422488272190094,
0.09833730757236481,
0.04552382975816727,
0.04636213928461075,
0.03626598045229912,
-0.006451335269957781,
0.03739587590098381,
0.007225860375910997,
-0.04694531112909317,
-0.01652015745639801,
0.026935236528515816,
0.02893988974392414,
0.007225860375910997,
-0.026643650606274605,
-0.014151022769510746,
-0.016374364495277405,
-0.01939045451581478,
-0.021522676572203636,
-0.016210347414016724,
-0.01964559219777584,
-0.024748343974351883,
0.0037928931415081024,
-0.01661127805709839,
-0.01438793633133173,
0.06516942381858826,
-0.0583171583712101,
-0.062180668115615845,
-0.013312713243067265,
-0.01993717812001705,
0.0544171966612339,
-0.0012119034072384238,
0.011554086580872536,
0.017732061445713043,
0.056604091078042984,
-0.08922524750232697,
-0.05328730121254921,
0.018825506791472435,
0.03863511607050896,
-0.06075918674468994,
-0.02396470680832863,
-0.025459084659814835,
-0.044102348387241364,
0.009631442837417126,
0.068960040807724,
0.01580030471086502,
0.0056221382692456245,
-0.049970515072345734,
-0.0019260607659816742,
-0.04876772314310074,
-0.014898210763931274,
0.04428458958864212,
-0.059519946575164795,
0.023691345006227493,
0.036029066890478134,
0.002717670751735568,
-0.06834042072296143,
0.06341990828514099,
0.012948230840265751,
-0.03147304058074951,
0.0027541187591850758,
-0.05015275627374649,
-0.04643503576517105,
-0.005658586509525776,
0.03136369585990906,
0.02137688361108303,
-0.020374557003378868,
0.023928258568048477,
0.03165528178215027,
-0.02307172492146492,
-0.028338493779301643,
0.05325085297226906,
-0.06560680270195007,
0.012966454960405827,
0.06695538759231567,
0.08674677461385727,
0.06320121884346008,
0.09403641521930695,
-0.02086660824716091,
0.022087622433900833,
-0.050298549234867096,
-0.006328322924673557,
-0.011134931817650795,
-0.032475367188453674,
-0.018606817349791527,
-0.002977364230901003,
0.003927296027541161,
-0.010068821720778942,
-0.0011259083403274417,
0.02637028880417347,
0.0006486644851975143,
-0.03867156431078911,
0.03482627868652344,
0.015198908746242523,
0.0464714840054512,
-0.00555835384875536,
0.009307964704930782,
0.0704544186592102,
0.0007864843355491757,
0.011344509199261665,
-0.07060021162033081,
0.08055057376623154,
-0.070162832736969,
0.06815817952156067,
0.021741366013884544,
0.022196967154741287,
0.01999185048043728,
-0.0031641614623367786,
0.012109922245144844,
-0.0398014597594738,
-0.0004345311608631164,
0.03925473615527153,
0.02678944356739521,
-0.0020262934267520905,
-0.054198507219552994,
-0.07471885532140732,
0.06411242485046387,
-0.0009328466840088367,
0.03950987383723259,
-0.017513372004032135,
0.009968589060008526,
0.03772391006350517,
0.02053857408463955,
0.027409063652157784,
0.011645207181572914,
0.05018920451402664,
-0.02121286652982235,
0.020939504727721214,
-0.0129117825999856,
-0.00999592524021864,
-0.02906745858490467,
0.028374942019581795,
0.02079371176660061,
-0.019445126876235008,
0.017385803163051605,
0.020811935886740685,
0.00883413851261139,
-0.011608758941292763,
0.013084911741316319,
-0.0056403623893857,
0.00815529003739357,
-0.02906745858490467,
0.035518795251846313,
0.0029272479005157948,
-0.05908257141709328,
0.01893485151231289,
0.04818455129861832,
0.06987124681472778,
-0.024402085691690445,
0.04982472211122513,
-0.04665372520685196,
-0.012857111170887947,
-0.03867156431078911,
-0.024493206292390823,
-0.06495073437690735,
-0.022543225437402725,
-0.050808824598789215,
-0.026224495843052864,
0.007253196556121111,
-0.030780524015426636,
0.05328730121254921,
0.013977893628180027,
0.01434237603098154,
0.05857229605317116,
-0.007740691304206848,
0.043081801384687424,
0.06837686896324158,
0.03438889980316162,
-0.03242069482803345,
-0.007740691304206848,
-0.004724600818008184,
-0.0162285715341568,
0.01647459715604782,
0.014424384571611881,
-0.004253052175045013,
-0.017695613205432892,
-0.017886964604258537,
0.015645399689674377,
-0.041769664734601974,
0.013740980066359043,
-0.04012949392199516,
0.045706070959568024,
-0.03482627868652344,
0.03203798830509186,
0.0874028354883194,
0.03375105559825897,
-0.041259389370679855,
-0.025932909920811653,
0.01405079010874033,
0.021139970049262047,
0.029176803305745125,
0.03870801255106926,
0.023636672645807266,
0.01284799911081791,
-0.007412657607346773,
0.028065131977200508,
0.014715970493853092,
0.004344172775745392,
-0.024238068610429764,
-0.001587775768712163,
0.0021527232602238655,
0.005002518650144339,
-0.048403240740299225,
0.05223030224442482,
-0.007330649066716433,
-0.039400529116392136,
0.0018224111991003156,
0.03134547173976898,
-0.020483901724219322,
-0.015217132866382599,
0.0009214566671289504,
0.01703043282032013,
-0.019973626360297203,
0.07916554063558578,
-0.02598758228123188,
0.053979817777872086,
0.03823418542742729,
0.029012786224484444,
-0.02957773394882679,
0.0024238068144768476,
-0.00717118801549077,
-0.008907034993171692,
0.016073666512966156,
-0.020720815286040306,
0.05139199644327164,
-0.04129583761096001,
0.01012349408119917,
-0.06549745798110962,
0.0064285555854439735,
-0.06721052527427673,
0.010761338286101818,
-0.03280340135097504,
-0.016292355954647064,
-0.0022028395906090736,
-0.013476730324327946,
0.03823418542742729,
0.018451912328600883,
0.03599261865019798,
0.025276843458414078,
-0.036830928176641464,
-0.014670410193502903,
-0.013522290624678135,
0.018697937950491905,
-0.032639384269714355,
0.017722949385643005,
0.0033053981605917215,
0.016656838357448578,
-0.04479486495256424,
-0.03165528178215027,
-0.015909649431705475,
0.000643538951408118,
-0.03355059027671814,
0.02974175103008747,
0.0192264374345541,
0.07154785841703415,
0.07457306236028671,
0.032511815428733826,
0.028302045539021492,
-0.07624968141317368,
-0.030270248651504517,
-0.13114070892333984,
0.02230631187558174,
0.036958497017621994,
-0.04727334529161453,
-0.0084514319896698,
-0.02332686260342598,
-0.016292355954647064,
-0.00623264629393816,
-0.06684604287147522,
-0.04621634632349014,
-0.030452489852905273,
0.021559124812483788,
-0.02310817316174507,
-0.0038589555770158768,
-0.02544086053967476,
0.02505815401673317,
-0.05361533537507057,
0.03528188169002533,
-0.0064695593900978565,
-0.048111654818058014,
0.009225956164300442,
0.07865526527166367,
0.06422176957130432,
-0.03998370096087456,
0.01931755803525448,
-0.0664086639881134,
-0.012319499626755714,
0.010378631763160229,
-0.041769664734601974,
-0.01605544239282608,
0.05485457554459572,
-0.013103135861456394,
-0.004847613628953695,
0.03562813997268677,
0.056640539318323135,
0.011189604178071022,
0.019846057519316673,
-0.04184256121516228,
-0.047054655849933624,
-0.038343530148267746,
0.027919339016079903,
0.002874853555113077,
0.016419924795627594,
-0.02979642152786255,
-0.055000368505716324,
0.021540900692343712,
-0.006364771164953709,
0.02762775309383869,
-0.009749899618327618,
-0.02112174592912197,
0.02361844852566719,
0.05489102378487587,
-0.011526750400662422,
-0.01580030471086502,
-0.04082201048731804,
-0.021941829472780228,
0.018916627392172813,
-0.00969522725790739,
-0.040676217526197433,
-0.0033486804459244013,
0.01107114739716053,
-0.015709184110164642,
0.011590534821152687,
-0.034115538001060486,
-0.009225956164300442,
-0.005439897533506155,
-0.07843657582998276,
-0.008100617676973343,
0.050517238676548004,
0.01417835894972086,
-0.015217132866382599,
0.07176654785871506,
0.017267346382141113,
0.03147304058074951,
-0.021777814254164696,
-0.025021705776453018,
-0.07271420210599899,
0.01775028556585312,
-0.04002014920115471,
0.008542552590370178,
0.013230704702436924,
-0.02928614802658558,
-0.030069783329963684,
-0.0037541668862104416,
0.03723185881972313,
-0.03444357216358185,
-0.05631250515580177,
0.008943482302129269,
-0.021577348932623863,
0.013431170023977757,
0.03958277031779289,
0.010469752363860607,
0.004724600818008184,
-0.011335397139191628,
0.02095772884786129,
0.00054387585259974,
0.013403833843767643,
0.0015103232581168413,
0.018105654045939445,
0.06801238656044006,
-0.04661727696657181,
-0.0063738832250237465,
0.08441408723592758,
-0.039910804480314255,
-0.027135701850056648,
-0.02011941932141781,
0.000555550679564476,
-0.019754936918616295,
0.050006963312625885,
0.027117477729916573,
0.022051174193620682,
-0.02278013899922371,
-0.013303601182997227,
0.07027217745780945,
-0.008948038332164288,
-0.01179100014269352,
0.03269405663013458,
-0.020265212282538414,
-0.032092660665512085,
-0.03668513521552086,
-0.01999185048043728,
0.006004844792187214,
0.0232357420027256,
-0.05336019769310951,
-0.017941636964678764,
-0.021231090649962425,
0.019809609279036522,
-0.0031596054323017597,
-0.007754359394311905,
0.012984679080545902,
-0.042316388338804245,
-0.03355059027671814,
0.07347961515188217,
0.01863415353000164,
-0.018916627392172813,
0.029176803305745125,
-0.0006065212073735893,
-0.0008217935101129115,
-0.002296237973496318,
0.031290799379348755,
-0.015736520290374756,
-0.029049234464764595,
0.02483946457505226,
0.023600224405527115,
0.036830928176641464,
0.01145385392010212,
0.031236127018928528,
0.0001848038809839636,
0.03921828791499138,
-0.01284799911081791,
0.026497857645154,
-0.05274057760834694,
0.0464714840054512,
0.026989908888936043,
0.009130279533565044,
-0.03114500641822815,
-0.054490093141794205,
-0.019117092713713646,
0.015599839389324188
]
|
41,538 | pyglove.core.object_utils.docstr_utils | docstr | Gets structure docstring of a Python symbol. | def docstr(symbol: Any) -> Optional[DocStr]:
"""Gets structure docstring of a Python symbol."""
docstr_text = getattr(symbol, '__doc__', None)
return DocStr.parse(docstr_text) if docstr_text else None
| (symbol: Any) -> Optional[pyglove.core.object_utils.docstr_utils.DocStr] | [
0.043831586837768555,
-0.004699992015957832,
0.008874845691025257,
-0.019937770441174507,
0.03788001090288162,
-0.03054557368159294,
0.01147428248077631,
0.028637569397687912,
0.06889820843935013,
-0.02895265258848667,
0.009680058807134628,
-0.053004007786512375,
0.0047174966894090176,
-0.06959839165210724,
-0.029687846079468727,
0.03654966130852699,
0.020795496180653572,
-0.021268121898174286,
-0.09277451783418655,
0.053704194724559784,
0.02538170851767063,
0.03812507539987564,
0.008402220904827118,
-0.034834206104278564,
-0.025609267875552177,
0.05927066504955292,
0.030808143317699432,
-0.02147817611694336,
-0.05111350864171982,
-0.05839543417096138,
0.06599244475364685,
-0.04691239818930626,
0.019202575087547302,
0.015649136155843735,
-0.013662360608577728,
0.0574851930141449,
0.033433835953474045,
0.031018197536468506,
-0.03626958653330803,
-0.060846082866191864,
-0.031158234924077988,
0.05359916761517525,
-0.007470099255442619,
-0.053634174168109894,
-0.016638146713376045,
0.012857148423790932,
-0.035219307988882065,
0.02434893511235714,
-0.05314404517412186,
0.010205197148025036,
0.06165129318833351,
0.023298658430576324,
-0.07316933572292328,
-0.04635225236415863,
0.004984442610293627,
-0.06175632402300835,
0.011115438304841518,
0.04782263934612274,
0.03546437248587608,
0.008415348827838898,
0.04428670555353165,
0.05002822354435921,
-0.010222702287137508,
-0.023998843505978584,
-0.01306720357388258,
0.010502776131033897,
0.011115438304841518,
-0.027692319825291634,
0.039105337113142014,
-0.029057679697871208,
-0.0159292109310627,
-0.002193548483774066,
-0.0648021250963211,
0.023298658430576324,
0.012638340704143047,
-0.07653022557497025,
-0.013758636079728603,
-0.10754842311143875,
0.015964219346642494,
-0.05286397412419319,
-0.029932910576462746,
0.04939805716276169,
-0.054229333996772766,
-0.010047655552625656,
-0.005015075672417879,
-0.04050570726394653,
0.02497910149395466,
0.04330644756555557,
-0.010205197148025036,
-0.0040610735304653645,
0.008454734459519386,
-0.01698824018239975,
-0.016900716349482536,
0.04572208598256111,
-0.01768842525780201,
-0.0200077872723341,
0.01431003212928772,
-0.05636489763855934,
-0.012997184880077839,
-0.0032055347692221403,
-0.02326364815235138,
0.01836235262453556,
-0.0007499638595618308,
0.07131385058164597,
-0.03889527916908264,
0.0068443091586232185,
0.04432171583175659,
-0.015736659988760948,
0.014318784698843956,
-0.04141594469547272,
-0.017924737185239792,
-0.03556939959526062,
0.007417585700750351,
0.014931446872651577,
0.04806770384311676,
0.008612276054918766,
-0.001837985822930932,
0.020375385880470276,
0.02671205997467041,
-0.04869787022471428,
0.00447024405002594,
-0.03315376117825508,
-0.03103570267558098,
-0.02657202258706093,
0.050833433866500854,
0.02237091213464737,
-0.01551785133779049,
0.016025485470891,
0.01233200915157795,
-0.0047875153832137585,
0.06830305606126785,
0.021005552262067795,
-0.0006482182070612907,
0.00336307636462152,
0.03977051004767418,
-0.019710209220647812,
0.030755629763007164,
0.00988136138767004,
-0.0312457587569952,
-0.0014474138151854277,
0.043131399899721146,
0.006542354356497526,
-0.05801033228635788,
-0.00427769310772419,
-0.052233804017305374,
0.03633960336446762,
-0.06406693160533905,
-0.020427899435162544,
0.01749587431550026,
0.032050970941782,
0.00820529367774725,
-0.04698241874575615,
0.004021687898784876,
0.019622687250375748,
-0.014546344988048077,
-0.032821174710989,
0.00680492352694273,
0.012515808455646038,
0.007863953709602356,
0.012086944654583931,
0.015377814881503582,
-0.03485171124339104,
-0.01194690726697445,
-0.07751048356294632,
0.03525431826710701,
0.02179325930774212,
-0.024646515026688576,
-0.05622486025094986,
0.029687846079468727,
-0.0246640183031559,
-0.041976094245910645,
0.01899251900613308,
-0.07082372158765793,
0.03105320781469345,
0.047472547739744186,
0.014441316947340965,
-0.017198296263813972,
0.12127204984426498,
-0.02287854626774788,
-0.08745311200618744,
0.057730257511138916,
0.015185263939201832,
-0.06242149695754051,
0.016401834785938263,
-0.0030742499511688948,
0.03450161963701248,
-0.002579744439572096,
0.022195866331458092,
0.0037613066378980875,
0.005264516454190016,
0.00005035999129177071,
-0.0019747407641261816,
-0.048802897334098816,
-0.014721390791237354,
0.00017996944370679557,
-0.057800278067588806,
0.0071243830025196075,
0.03476418927311897,
-0.0007324592443183064,
0.02041039429605007,
0.06263155490159988,
0.012962175533175468,
-0.0007072963053360581,
0.033048734068870544,
0.002984538907185197,
0.012979680672287941,
0.045932140201330185,
0.0021180598996579647,
-0.08983374387025833,
0.047402527183294296,
0.003159585176035762,
-0.035989511758089066,
0.03749490901827812,
-0.03276865929365158,
0.036619678139686584,
-0.008415348827838898,
-0.04050570726394653,
0.022335903719067574,
-0.05247887223958969,
-0.0015043038874864578,
0.052058760076761246,
-0.018257325515151024,
0.04043568670749664,
0.010730336420238018,
-0.009119910188019276,
-0.005890307016670704,
0.01705825887620449,
0.010170187801122665,
0.008397844620049,
-0.05583975836634636,
0.03276865929365158,
-0.0407857783138752,
0.0035862603690475225,
-0.03544686734676361,
0.021635718643665314,
-0.08913356065750122,
-0.03275115787982941,
0.00699747446924448,
0.07407958060503006,
-0.07491980493068695,
-0.006625500973314047,
0.0042470600455999374,
-0.010625308379530907,
0.05226881429553032,
-0.05387924239039421,
0.00181719905231148,
0.002921084640547633,
-0.00017436248890589923,
0.011999421752989292,
-0.025731801986694336,
0.019115053117275238,
-0.009925123304128647,
0.01696198247373104,
-0.020182834938168526,
0.038860272616147995,
-0.02181076444685459,
-0.03136828914284706,
0.021005552262067795,
0.014388803392648697,
0.023981338366866112,
-0.03348635137081146,
0.04586212337017059,
0.042361196130514145,
0.011027914471924305,
0.037074800580739975,
-0.005789655260741711,
-0.019150061532855034,
0.0030173601116985083,
0.0105815464630723,
0.03616455942392349,
0.056399907916784286,
-0.034134022891521454,
0.013478562235832214,
-0.02837499976158142,
0.00991637073457241,
-0.024261413142085075,
0.0485578328371048,
0.016244294121861458,
0.09795588999986649,
0.029057679697871208,
0.021128084510564804,
-0.04215114191174507,
0.03991054743528366,
0.021390654146671295,
0.05170866847038269,
0.03889527916908264,
-0.005535838194191456,
0.016690662130713463,
0.02251094952225685,
0.032996222376823425,
0.04225616902112961,
0.030685611069202423,
0.0027897998224943876,
0.02900516614317894,
0.04782263934612274,
0.06350678205490112,
0.043446484953165054,
-0.026169417425990105,
0.03672470524907112,
0.012165715917944908,
0.015649136155843735,
0.06854812055826187,
0.018082279711961746,
0.057275138795375824,
-0.015762915834784508,
0.03469416871666908,
0.0012001609429717064,
-0.04999321326613426,
0.008139651268720627,
-0.05076341703534126,
-0.05611983314156532,
0.030510563403367996,
0.023806292563676834,
0.07625015079975128,
-0.02212584763765335,
0.058430444449186325,
-0.038020048290491104,
-0.02900516614317894,
0.027709823101758957,
0.06165129318833351,
-0.03352136164903641,
-0.04407665133476257,
0.06690268218517303,
-0.09144417196512222,
-0.010914134792983532,
-0.04043568670749664,
-0.07019355148077011,
-0.04162600263953209,
0.06431199610233307,
0.033311303704977036,
-0.005417681764811277,
-0.0419410839676857,
0.04201110452413559,
-0.006271032616496086,
0.002237310167402029,
-0.0001907730766106397,
-0.006818051915615797,
-0.059130627661943436,
-0.0597958043217659,
-0.05762523040175438,
0.06392689794301987,
0.008651661686599255,
0.043131399899721146,
0.006931832060217857,
-0.024944093078374863,
-0.002363124629482627,
0.04320141673088074,
-0.04533698409795761,
0.039805520325899124,
-0.04113587364554405,
0.014318784698843956,
0.007706411648541689,
-0.009575030766427517,
0.02205582894384861,
0.0289351474493742,
0.0067611620761454105,
0.00133144564460963,
0.08241178095340729,
-0.006643005646765232,
-0.05195373296737671,
0.008949240669608116,
0.03240106254816055,
-0.023858806118369102,
-0.0000316074765578378,
-0.011386759579181671,
0.02499660663306713,
-0.0353243350982666,
0.04649228975176811,
0.019797733053565025,
0.005089470185339451,
-0.061161164194345474,
0.007898963056504726,
-0.023683760315179825,
-0.034204039722681046,
-0.05429935082793236,
0.03935040161013603,
0.010161436162889004,
-0.03303122892975807,
-0.012104448862373829,
-0.1095089465379715,
0.007719540502876043,
-0.008844212628901005,
0.03844016045331955,
0.035534393042325974,
-0.0005814818432554603,
-0.03392396494746208,
-0.0800311490893364,
-0.00008232644904637709,
0.02408636547625065,
0.03271614760160446,
0.030195480212569237,
-0.009067396633327007,
-0.0304755549877882,
0.058115359395742416,
-0.036444634199142456,
-0.0033565121702849865,
0.026992134749889374,
-0.016226788982748985,
-0.056820016354322433,
0.05822038650512695,
0.06914327293634415,
-0.016541872173547745,
-0.0737995058298111,
-0.03539435565471649,
-0.024909082800149918,
0.04320141673088074,
-0.02753477729856968,
-0.019850246608257294,
-0.04323642700910568,
0.02212584763765335,
-0.012200724333524704,
-0.0485578328371048,
-0.005124479532241821,
-0.036444634199142456,
0.018782464787364006,
0.023701263591647148,
0.0617213137447834,
0.08815330266952515,
-0.019605182111263275,
-0.009067396633327007,
0.007509484887123108,
-0.06868815422058105,
0.05170866847038269,
0.07618013769388199,
-0.016655651852488518,
0.047717612236738205,
0.026922116056084633,
0.020235348492860794,
0.01674317568540573,
0.054544415324926376,
-0.060530997812747955,
0.06424198299646378,
0.0012439225101843476,
-0.03334631398320198,
0.008612276054918766,
-0.02748226374387741,
0.02321113459765911,
-0.01539531908929348,
0.02289605140686035,
-0.015789173543453217,
0.055104564875364304,
0.06494216620922089,
-0.003334631444886327,
0.04029564931988716,
0.002973598428070545,
0.0427112877368927,
-0.005474572069942951,
0.030002929270267487,
0.035726942121982574,
-0.04915299266576767,
0.02914520353078842,
-0.008874845691025257,
0.09767581522464752,
0.01809978298842907,
-0.0043433355167508125,
-0.08885348588228226,
0.03054557368159294,
-0.029565313830971718,
-0.032418567687273026,
-0.017837215214967728,
-0.01705825887620449,
0.02946028672158718,
0.012183220125734806,
-0.021215608343482018,
-0.015097740106284618,
0.025329194962978363,
0.025451727211475372,
0.02664204128086567,
-0.019675200805068016,
-0.004181417636573315,
0.05790530517697334,
-0.030230490490794182,
0.01626179739832878,
-0.00828844029456377,
0.03173588961362839,
-0.02007780596613884,
-0.05006323382258415,
0.0028423138428479433,
-0.011903146281838417,
-0.04890792816877365,
-0.05857048183679581,
-0.04722748324275017,
-0.08472239226102829,
0.018957510590553284,
0.010485270991921425,
-0.00879607442766428,
0.00439803721383214,
-0.030195480212569237,
-0.022738510742783546,
-0.03717982769012451,
-0.0324360728263855,
0.07807063311338425,
0.03035302273929119,
-0.06007587909698486,
0.04250123351812363,
0.06305166333913803,
0.0041639129631221294,
0.0497131384909153,
-0.04124090075492859,
0.022213371470570564,
-0.01809978298842907,
-0.04449675977230072,
0.0121394582092762,
-0.030195480212569237,
0.0330137275159359,
-0.02097054198384285,
-0.023473704233765602,
0.013338525779545307,
0.017705930396914482,
-0.008883598260581493,
-0.03154333680868149,
-0.037845004349946976,
0.025154149159789085,
0.005811536218971014,
0.031910933554172516,
0.01100165769457817,
0.022405922412872314,
0.009364975616335869,
0.007080621551722288,
-0.022020820528268814,
-0.05177868530154228,
-0.007561998907476664,
-0.056960053741931915,
-0.036444634199142456,
0.04316641017794609,
-0.057205118238925934,
-0.03275115787982941,
0.006411069538444281,
-0.04659731686115265,
-0.0006509533268399537,
0.07569000869989395,
0.021915793418884277,
-0.005015075672417879,
0.0025206662248820066,
-0.001592920976690948,
0.04992319643497467,
-0.006923079956322908,
0.015859192237257957,
-0.053459130227565765,
0.04589712992310524,
0.005185745656490326,
0.023298658430576324,
0.02632695809006691,
-0.03756492957472801,
0.03476418927311897,
0.07082372158765793,
-0.0071243830025196075,
-0.013347277417778969,
0.0020666399504989386,
-0.006577363237738609,
-0.007544494234025478,
0.019535163417458534,
-0.039945557713508606,
-0.01159681472927332,
-0.00991637073457241,
0.04908297210931778,
-0.008769817650318146,
-0.0003145362716168165,
0.048417795449495316,
-0.011955659836530685,
-0.013058451004326344,
-0.0034243424888700247,
0.004840029403567314,
-0.019937770441174507,
0.004400225356221199,
0.028322486206889153,
0.025539251044392586,
-0.05016826093196869,
0.008222797885537148,
-0.005605856887996197,
-0.0023718769662082195,
-0.027709823101758957,
0.05534962937235832,
-0.0012778377858921885,
0.058360423892736435,
0.04379657655954361,
0.023036088794469833,
0.004752506036311388,
-0.01150929182767868,
0.001538219046778977,
0.05209377035498619,
-0.017793452367186546,
0.05209377035498619,
0.010721583850681782,
0.020182834938168526,
-0.016585633158683777,
-0.019220080226659775,
-0.030125461518764496,
-0.012156963348388672,
-0.054404377937316895,
-0.019535163417458534,
-0.035411860793828964,
0.0308606568723917,
-0.031280767172575,
0.00918117631226778,
0.026291949674487114,
-0.0404006764292717,
0.03441409766674042,
0.019027529284358025,
-0.0023871934972703457,
-0.004268941003829241,
0.028199953958392143,
-0.0050675892271101475,
0.04456678032875061,
0.03619956597685814,
0.06620249897241592,
0.041030846536159515,
-0.008769817650318146,
0.048732880502939224,
-0.005470195785164833,
-0.02104056067764759,
-0.02333366684615612,
-0.02772732824087143,
-0.05219879746437073,
-0.034659162163734436,
0.009601287543773651,
0.06942334771156311,
-0.056329887360334396,
0.022090839222073555,
-0.026221930980682373,
0.027394739910960197,
0.03392396494746208,
-0.0029889149591326714,
-0.010065160691738129,
-0.03858019784092903,
0.04169601947069168,
-0.020322872325778008,
-0.005391424987465143,
-0.003921036142855883,
-0.04992319643497467,
-0.019395126029849052,
0.004664983134716749,
0.024839065968990326,
-0.029757864773273468,
-0.04372655600309372,
0.023438695818185806,
-0.025014111772179604,
-0.006516097113490105,
-0.0021454107481986284,
0.08598272502422333,
0.018344849348068237,
0.02760479599237442,
-0.04505690932273865,
0.022475941106677055,
-0.03441409766674042,
0.05713510140776634,
-0.001592920976690948,
-0.02791987918317318,
0.00918117631226778,
-0.002929836977273226,
-0.055104564875364304,
-0.004124527797102928,
-0.0070193554274737835,
0.0105815464630723,
0.042676281183958054,
-0.012323257513344288,
-0.037704966962337494,
-0.08535256236791611,
0.0020961789414286613,
-0.027884870767593384,
0.007982109673321247,
-0.07954102009534836,
-0.04936304688453674,
-0.029407773166894913,
-0.07117380946874619,
-0.03788001090288162,
-0.020252853631973267,
-0.015509098768234253,
0.005417681764811277,
-0.04047069698572159,
-0.030002929270267487,
0.0648021250963211,
-0.0024506477639079094,
-0.030755629763007164,
0.007750173565000296,
0.02321113459765911,
0.022966070100665092,
0.0368647426366806,
0.0033018102403730154,
0.01147428248077631,
0.02798989787697792,
0.025644278153777122,
-0.01268210168927908,
-0.08031122386455536,
-0.06599244475364685,
0.037845004349946976,
-0.00002762448821158614,
-0.0005634301924146712,
0.036234576255083084,
-0.0446367971599102,
-0.05251387879252434,
-0.01855490356683731,
-0.0008768723928369582,
-0.005308277904987335,
-0.008419725112617016,
-0.06088108941912651,
0.00008936932135839015,
0.00004940270446240902,
0.0768803209066391,
-0.03313625976443291,
0.04866286367177963,
0.022160857915878296,
0.028024906292557716,
0.022738510742783546,
0.02811243012547493,
-0.02485656924545765,
-0.0007089373539201915,
-0.021565699949860573,
-0.03903531655669212,
0.012515808455646038,
0.009575030766427517,
-0.04071576148271561,
-0.028585055842995644,
-0.04750755801796913,
0.009601287543773651,
-0.05247887223958969,
-0.031158234924077988,
0.04400663077831268,
-0.0042492481879889965,
-0.004144220147281885,
-0.020375385880470276,
-0.013531076721847057,
0.02888263389468193,
-0.007120006717741489,
-0.005829040426760912,
0.046947408467531204,
-0.04551202803850174,
0.04215114191174507,
0.01648060604929924,
0.027569787576794624,
-0.035026758909225464,
0.02027035690844059,
-0.01809978298842907,
0.035989511758089066,
-0.0032055347692221403,
0.020480412989854813,
-0.00972381979227066,
-0.006621125154197216,
0.029792875051498413,
0.023176126182079315,
-0.014966455288231373,
0.08423226326704025,
-0.03658466786146164,
0.006861813832074404,
0.028077421709895134,
-0.020060302689671516,
-0.009154919534921646,
-0.0018161049811169505,
0.010318977758288383,
-0.038790252059698105,
0.01894000545144081,
-0.01462511532008648,
-0.00028527071117423475,
-0.014126233756542206,
-0.03296121209859848,
0.019115053117275238,
-0.05398426949977875,
0.05871051922440529,
-0.00968881044536829,
-0.002807304495945573,
-0.01488768495619297,
-0.025014111772179604,
0.021338140591979027,
0.038020048290491104,
-0.057590220123529434,
-0.021828269585967064,
-0.08101141452789307,
0.027832355350255966
]
|
41,540 | pyglove.core.symbolic.flags | enable_type_check | Returns a context manager to enable or disable runtime type check.
`enable_type_check` is thread-safe and can be nested. For example,
in the following code, runtime type check with be `a` but not on `b`::
with pg.enable_type_check(False):
with pg.enable_type_check(True):
a = pg.Dict(x=1, value_spec=pg.typing.Dict([('x', pg.typing.Int())]))
b = pg.Dict(y=1, value_spec=pg.typing.Dict([('x', pg.typing.Int())]))
Args:
enabled: If True, enable runtime type check in current scope.
Otherwise, disable runtime type check.
Returns:
A context manager for allowing/disallowing runtime type check.
| def enable_type_check(enabled: bool = True) -> ContextManager[None]:
"""Returns a context manager to enable or disable runtime type check.
`enable_type_check` is thread-safe and can be nested. For example,
in the following code, runtime type check with be `a` but not on `b`::
with pg.enable_type_check(False):
with pg.enable_type_check(True):
a = pg.Dict(x=1, value_spec=pg.typing.Dict([('x', pg.typing.Int())]))
b = pg.Dict(y=1, value_spec=pg.typing.Dict([('x', pg.typing.Int())]))
Args:
enabled: If True, enable runtime type check in current scope.
Otherwise, disable runtime type check.
Returns:
A context manager for allowing/disallowing runtime type check.
"""
return thread_local.thread_local_value_scope(
_TLS_ENABLE_TYPE_CHECK, enabled, True
)
| (enabled: bool = True) -> ContextManager[NoneType] | [
0.08106972277164459,
-0.008604374714195728,
0.002618935192003846,
0.0483916699886322,
0.03842407837510109,
0.05022883415222168,
-0.007128780707716942,
-0.009356830269098282,
-0.010270525701344013,
-0.06101728230714798,
0.03463248535990715,
-0.036684636026620865,
-0.018987281247973442,
-0.01807847060263157,
-0.03459339961409569,
-0.016651736572384834,
-0.0821642056107521,
0.017189204692840576,
0.039264485239982605,
-0.0706721618771553,
0.009855209849774837,
0.07125849276781082,
0.03134904429316521,
0.0171403456479311,
-0.000484637392219156,
-0.003818466095253825,
-0.00012199913908261806,
0.02538803592324257,
0.02038469724357128,
-0.019769052043557167,
0.032932132482528687,
0.04397466033697128,
-0.03774002939462662,
-0.01957360841333866,
-0.03654782846570015,
-0.04858711361885071,
-0.04045668616890907,
0.07399468868970871,
0.014277106150984764,
-0.050971515476703644,
-0.054841283708810806,
0.017023079097270966,
0.02355087362229824,
0.004211795050650835,
-0.03947947174310684,
-0.03885405510663986,
0.0005951847997494042,
-0.007397514767944813,
0.0342806912958622,
-0.009669538587331772,
0.0723920613527298,
-0.03678235784173012,
0.021107835695147514,
0.03408524766564369,
-0.036411017179489136,
-0.016466066241264343,
-0.030000489205121994,
-0.013133764266967773,
0.005741136148571968,
-0.006249287631362677,
0.05749930813908577,
0.04127754643559456,
-0.038580432534217834,
0.04198114201426506,
-0.034808386117219925,
-0.04573364555835724,
-0.06418345868587494,
0.026150263845920563,
0.03146631270647049,
0.022085050120949745,
-0.052261438220739365,
-0.039850812405347824,
-0.01350510586053133,
-0.0022121695801615715,
0.0019275558879598975,
-0.010260753333568573,
-0.03459339961409569,
-0.003747618058696389,
0.0018701445078477263,
0.019798368215560913,
0.025016695261001587,
0.027870161458849907,
0.005506604444235563,
0.026853857561945915,
0.020267430692911148,
0.02951188199222088,
-0.0215769000351429,
0.042098406702280045,
0.05046336352825165,
-0.013221713714301586,
0.0364501066505909,
0.051987819373607635,
0.008951285853981972,
-0.0012508347863331437,
0.002562745474278927,
-0.02198733016848564,
0.03611785173416138,
0.00182983442209661,
-0.09349989891052246,
-0.010338930413126945,
0.027733352035284042,
0.028808288276195526,
0.03934266045689583,
-0.01926090009510517,
0.02220231667160988,
0.01715988852083683,
0.03213081881403923,
-0.06488705426454544,
0.06199449673295021,
0.05112786963582039,
0.001736999023705721,
-0.10811902582645416,
-0.01319239754229784,
0.011961107142269611,
0.0067867557518184185,
-0.0017284484347328544,
-0.05366862937808037,
-0.031974464654922485,
-0.02220231667160988,
-0.004890959244221449,
-0.01508819404989481,
0.026912491768598557,
0.023629050701856613,
-0.0161826740950346,
0.017355332151055336,
0.03754458576440811,
0.038306813687086105,
-0.021870063617825508,
0.07407286763191223,
-0.006322578527033329,
-0.007016401272267103,
0.040808483958244324,
0.007671135012060404,
0.043388329446315765,
-0.008438248187303543,
-0.016417205333709717,
-0.03744686394929886,
0.04604635387659073,
0.040495775640010834,
-0.02163553237915039,
-0.01717943325638771,
-0.011648398824036121,
-0.03250215947628021,
-0.05812472477555275,
0.008120653219521046,
-0.00659619877114892,
-0.05910194292664528,
0.04217658191919327,
-0.0197592806071043,
-0.005169465206563473,
0.03312757611274719,
-0.030938616022467613,
0.011726575903594494,
0.048118047416210175,
-0.06762325018644333,
0.047140832990407944,
-0.004822554066777229,
-0.009840551763772964,
0.027420641854405403,
-0.0591801181435585,
-0.0476880744099617,
0.02697112411260605,
-0.05910194292664528,
-0.0764181837439537,
0.06539520621299744,
0.006547337863594294,
-0.020775582641363144,
-0.048196226358413696,
-0.0009729393059387803,
0.005692275241017342,
0.010397563688457012,
0.019984038546681404,
0.046554505825042725,
0.009376374073326588,
0.08138243854045868,
0.012322676368057728,
0.005726477596908808,
0.003495985409244895,
-0.016466066241264343,
0.025036238133907318,
0.015918826684355736,
0.05441131070256233,
-0.03942083939909935,
-0.015518167987465858,
0.028085147961974144,
0.02032606489956379,
0.017501914873719215,
-0.004910503514111042,
0.017501914873719215,
0.011609310284256935,
-0.04635906219482422,
0.004610009957104921,
0.04968159273266792,
-0.05046336352825165,
-0.01320216991007328,
0.061877232044935226,
-0.02738155424594879,
-0.0034666690044105053,
-0.07731722295284271,
0.07141484320163727,
-0.02794833853840828,
0.04862619936466217,
-0.005677617155015469,
-0.016124041751027107,
-0.022710468620061874,
-0.04546002671122551,
-0.025016695261001587,
-0.0041336179710924625,
-0.012977410107851028,
0.014208700507879257,
-0.04065212979912758,
-0.03279532492160797,
-0.009102754294872284,
0.08443134278059006,
0.0388149656355381,
-0.012811283580958843,
0.03783775120973587,
0.02286682277917862,
-0.023902669548988342,
-0.012977410107851028,
0.006840502377599478,
0.0038477827329188585,
-0.05628756433725357,
-0.0316617526113987,
0.05378589406609535,
-0.01668105460703373,
-0.0022512581199407578,
0.006742781028151512,
-0.044326454401016235,
-0.05875014513731003,
0.04057395085692406,
-0.0007103129173628986,
-0.03519926965236664,
0.0044365543872118,
0.030332742258906364,
-0.06363621354103088,
0.06508249789476395,
0.015156598761677742,
-0.0033054284285753965,
-0.042684733867645264,
0.046828124672174454,
0.01130637340247631,
0.017648495733737946,
0.000716420472599566,
-0.06047004088759422,
0.01934885047376156,
0.03455431014299393,
0.03818954899907112,
0.010075083002448082,
0.05015065521001816,
-0.03910813108086586,
-0.037603218108415604,
-0.02196778543293476,
-0.005184123758226633,
-0.03213081881403923,
-0.06344077736139297,
-0.019026368856430054,
-0.004683301318436861,
-0.0023392075672745705,
-0.014150068163871765,
0.018127331510186195,
0.050346098840236664,
-0.013241258449852467,
0.04323197528719902,
0.02794833853840828,
-0.034808386117219925,
0.02321862056851387,
-0.01607518084347248,
-0.015283636748790741,
-0.02222186140716076,
-0.15096011757850647,
0.01664196513593197,
0.09412531554698944,
0.04057395085692406,
-0.007553868927061558,
0.0016087396070361137,
-0.014413915574550629,
0.07446375489234924,
0.004114073701202869,
0.02321862056851387,
-0.02163553237915039,
-0.010573462583124638,
0.0012129676761105657,
0.0032541246619075537,
-0.07802081853151321,
-0.01957360841333866,
-0.057382043451070786,
0.022651834413409233,
-0.007930097170174122,
-0.03762276470661163,
-0.07434649020433426,
0.03232625871896744,
0.07493282109498978,
-0.011814525350928307,
0.055818501859903336,
-0.004074985161423683,
-0.003048909595236182,
-0.027440186589956284,
0.008223260752856731,
0.0124008534476161,
0.06676330417394638,
0.08404045552015305,
0.028827831149101257,
0.05370771512389183,
0.08466587960720062,
-0.021127380430698395,
-0.005360022187232971,
-0.03168129920959473,
-0.016964446753263474,
0.017609408125281334,
-0.020501963794231415,
0.05902376398444176,
0.008877995423972607,
-0.015264092944562435,
0.06871773302555084,
-0.030625905841588974,
0.024254467338323593,
-0.0189286470413208,
-0.008316096849739552,
0.055466704070568085,
-0.04233293980360031,
-0.007011515088379383,
0.03801364824175835,
0.015127282589673996,
-0.027850616723299026,
-0.024078568443655968,
0.06801413744688034,
0.0006510692765004933,
0.024860341101884842,
0.006630401127040386,
-0.03934266045689583,
0.009884526021778584,
0.01791234500706196,
-0.0168862696737051,
-0.0034129221457988024,
0.0174921415746212,
0.03244352713227272,
-0.008374729193747044,
-0.05308229848742485,
-0.027459731325507164,
0.056365739554166794,
0.02253456972539425,
-0.005179237574338913,
-0.04135572165250778,
-0.04346650838851929,
-0.04061304032802582,
0.009899184107780457,
0.004942263010889292,
0.06989038735628128,
0.026932034641504288,
-0.0028070490807294846,
-0.02761608548462391,
-0.030919071286916733,
0.02226094901561737,
0.014912295155227184,
-0.04764898493885994,
0.02093193680047989,
0.023042721673846245,
-0.005105946678668261,
-0.009435007348656654,
0.024313099682331085,
0.04612452909350395,
-0.0020875746849924326,
0.020404241979122162,
-0.03203309699892998,
-0.02126418985426426,
0.028866920620203018,
-0.07465919852256775,
0.042723823338747025,
0.007446375675499439,
-0.016876496374607086,
-0.0070848059840500355,
-0.029687780886888504,
0.022026417776942253,
0.0061027053743600845,
0.031603120267391205,
-0.060821838676929474,
-0.0032370234839618206,
-0.015156598761677742,
0.09201452881097794,
0.08513493835926056,
0.004429225344210863,
0.021166469901800156,
-0.03168129920959473,
0.0030562388710677624,
-0.06336259841918945,
-0.020228343084454536,
-0.005189009942114353,
0.011189107783138752,
-0.009513184428215027,
-0.0013021385530009866,
-0.00879981741309166,
0.02572028897702694,
0.002528542885556817,
0.0103096142411232,
0.007392628584057093,
-0.07497190684080124,
0.0257593784481287,
-0.02800697088241577,
0.010397563688457012,
0.029394615441560745,
0.004956921096891165,
0.04542093724012375,
-0.059610091149806976,
-0.04995521157979965,
0.036723725497722626,
0.00007458896288881078,
-0.01888955943286419,
-0.008448020555078983,
0.043075621128082275,
0.005066857673227787,
-0.008482223376631737,
-0.005692275241017342,
-0.004153162240982056,
-0.016319483518600464,
-0.052613236010074615,
0.03181810677051544,
0.00849688146263361,
0.022143684327602386,
0.05617029592394829,
0.02702975645661354,
-0.045772735029459,
-0.035121094435453415,
0.01634880155324936,
-0.02794833853840828,
0.027811529114842415,
-0.023101354017853737,
0.02988322451710701,
-0.051362402737140656,
0.009713513776659966,
0.019935179501771927,
0.008589716628193855,
0.06672421842813492,
-0.0333230197429657,
-0.017150117084383965,
-0.030625905841588974,
-0.012107688933610916,
-0.0087460707873106,
-0.03308848664164543,
0.005477288272231817,
0.025896187871694565,
0.028143782168626785,
0.0241958349943161,
0.030313197523355484,
0.06512158364057541,
-0.026443427428603172,
-0.06527793407440186,
0.05714751034975052,
0.00440968107432127,
0.021850518882274628,
-0.032560791820287704,
0.025993909686803818,
0.06222902983427048,
0.043075621128082275,
-0.043036531656980515,
0.0036132510285824537,
-0.017062166705727577,
-0.003371390514075756,
-0.0244499109685421,
0.0565611831843853,
0.00849688146263361,
-0.04166843369603157,
-0.0697731226682663,
-0.0022793530952185392,
0.047453541308641434,
0.008663007989525795,
0.004890959244221449,
0.016583332791924477,
-0.009855209849774837,
0.007031059358268976,
0.03328393027186394,
-0.020404241979122162,
0.023609505966305733,
-0.03981172293424606,
0.013895992189645767,
0.04295835644006729,
-0.04284108802676201,
0.004351048264652491,
-0.005892604123800993,
-0.009058780036866665,
0.007431717123836279,
0.0228863675147295,
0.04710174724459648,
0.02988322451710701,
-0.056717537343502045,
-0.06535611301660538,
0.036411017179489136,
0.004602680914103985,
0.009772146120667458,
0.013260802254080772,
-0.032267626374959946,
0.014785257168114185,
0.032599881291389465,
0.005936578847467899,
0.023023176938295364,
-0.04491278529167175,
-0.026853857561945915,
-0.023355429992079735,
0.027186110615730286,
-0.0023563087452203035,
0.022417303174734116,
0.017443280667066574,
0.0007231388590298593,
0.016563788056373596,
0.07524552941322327,
0.0017308914102613926,
0.009102754294872284,
0.016573559492826462,
-0.01655401661992073,
0.043114710599184036,
-0.012830828316509724,
0.007446375675499439,
0.0288864653557539,
-0.010211893357336521,
0.014140295796096325,
0.02315998636186123,
0.052535057067871094,
-0.052886854857206345,
0.0279287938028574,
-0.04252837970852852,
-0.05429404601454735,
0.01636834442615509,
0.06860046833753586,
-0.046202708035707474,
0.032951679080724716,
0.01064186729490757,
-0.0034080359619110823,
0.03367481753230095,
0.030762717127799988,
0.04202022776007652,
0.14009349048137665,
-0.022339126095175743,
-0.008780273608863354,
-0.043427418917417526,
0.026853857561945915,
-0.012967638671398163,
-0.014453004114329815,
-0.07215753197669983,
-0.002115669660270214,
-0.035121094435453415,
0.06304989010095596,
0.003151517128571868,
0.04139481112360954,
-0.008834020234644413,
-0.03459339961409569,
0.020208798348903656,
0.012371537275612354,
-0.027498820796608925,
-0.016436750069260597,
-0.041746608912944794,
-0.008931742049753666,
-0.026580238714814186,
-0.03965536877512932,
-0.012430170550942421,
-0.02386358194053173,
-0.0501115657389164,
0.028339223936200142,
-0.0017333345022052526,
0.019944950938224792,
0.006063616834580898,
0.017863484099507332,
-0.025622567161917686,
-0.07950618118047714,
0.018205508589744568,
-0.029453249648213387,
-0.09334354102611542,
-0.008237919770181179,
0.0863076001405716,
-0.023746315389871597,
-0.008193944580852985,
0.029140541329979897,
-0.07372107356786728,
0.024410821497440338,
-0.06414436548948288,
-0.0002400283410679549,
0.027088390663266182,
-0.04166843369603157,
0.020228343084454536,
-0.023257708176970482,
0.005535921081900597,
-0.02673659287393093,
-0.04772716388106346,
-0.07618365436792374,
-0.014785257168114185,
-0.009576703421771526,
-0.060548219829797745,
0.03494519367814064,
0.011941562406718731,
-0.04874346777796745,
0.06437890231609344,
-0.06140816956758499,
0.06066548451781273,
0.05996188893914223,
-0.02671704813838005,
0.020150166004896164,
0.02507532760500908,
-0.004717503674328327,
0.027401098981499672,
0.020482419058680534,
0.010534374043345451,
-0.03404615819454193,
0.03873678669333458,
-0.03973354771733284,
-0.007837261073291302,
-0.009801463223993778,
-0.027713807299733162,
0.023433607071638107,
-0.0032125930301845074,
-0.008780273608863354,
-0.03631329536437988,
-0.007104350253939629,
-0.009811234660446644,
0.030391374602913857,
0.025661656633019447,
0.04968159273266792,
-0.004106744658201933,
-0.05214417353272438,
0.008208602666854858,
0.0032834410667419434,
-0.010211893357336521,
-0.022417303174734116,
0.07938891649246216,
0.01719897799193859,
-0.034456588327884674,
0.026247985661029816,
-0.02161598764359951,
0.03046955168247223,
-0.0124008534476161,
-0.04346650838851929,
-0.03517972677946091,
-0.016944902017712593,
0.04381830617785454,
-0.003354289336130023,
-0.052300527691841125,
0.020169710740447044,
-0.0198863185942173,
-0.012479030527174473,
-0.0009918728610500693,
0.04901708662509918,
0.024958061054348946,
-0.029101451858878136,
-0.028221959248185158,
-0.010798221454024315,
-0.009938272647559643,
0.003012264147400856,
-0.025309858843684196,
0.028397858142852783,
-0.03148585557937622,
0.048196226358413696,
0.045577291399240494,
-0.017892800271511078,
-0.00440968107432127,
0.0009259108919650316,
-0.036977801471948624,
-0.036039676517248154,
0.091545470058918,
-0.038619522005319595,
0.013358524069190025,
0.04522549360990524,
-0.04045668616890907,
-0.04612452909350395,
0.022632291540503502,
-0.02765517495572567,
0.09115458279848099,
0.00254808715544641,
0.000680996454320848,
-0.013260802254080772,
0.022124139592051506,
0.10421016812324524,
0.0010999771766364574,
0.005223212298005819,
0.006410527974367142,
-0.04585091024637222,
-0.004617339000105858,
-0.038287270814180374,
-0.019896090030670166,
-0.050971515476703644,
-0.025876643136143684,
-0.003923516720533371,
0.041824787855148315,
-0.06965585798025131,
0.04565546661615372,
-0.047531720250844955,
0.06269808858633041,
-0.05214417353272438,
0.00440479489043355,
0.03046955168247223,
-0.02892555296421051,
0.04897799715399742,
-0.0483916699886322,
-0.05785110592842102,
0.01464844774454832,
0.0228863675147295,
0.029648691415786743,
-0.051675111055374146,
-0.07004674524068832,
-0.018195737153291702,
-0.0012618283508345485,
0.02540758065879345,
0.006552224047482014,
0.0010346260387450457,
-0.04522549360990524,
-0.009733057580888271,
-0.037016890943050385,
-0.013905764557421207,
-0.0030391374602913857,
-0.0014096321538090706,
0.0009833222720772028,
0.0301959328353405,
-0.00889265350997448,
-0.02919917367398739,
-0.0009289646404795349,
0.029140541329979897,
-0.0004718114505521953,
-0.010612551122903824,
-0.009376374073326588,
-0.039850812405347824,
0.011472499929368496,
0.0270688459277153,
0.01920226775109768,
0.03613739833235741,
0.05245688185095787,
0.02005244418978691,
0.00400902284309268,
0.023042721673846245,
0.049720682203769684,
0.009845437481999397,
-0.047140832990407944,
0.02163553237915039,
-0.035707421600818634,
0.08130425959825516,
-0.029120996594429016,
-0.04104301333427429,
0.00660597113892436,
0.035726968199014664,
0.036411017179489136,
-0.04581182077527046,
0.05589667707681656,
-0.06801413744688034,
0.009576703421771526,
0.02511441707611084,
0.030723627656698227,
-0.061838142573833466,
0.004104301333427429,
0.035707421600818634,
-0.011071842163801193,
0.03201355040073395,
0.008281894028186798,
-0.0031637323554605246,
0.04706265777349472,
0.008936627767980099,
-0.02992231212556362,
-0.011159791611135006,
0.0361960306763649,
0.019563836976885796,
0.03725142031908035,
-0.02796788327395916,
-0.052222348749637604,
-0.04612452909350395,
-0.013690777122974396,
-0.02988322451710701,
-0.00002191098428738769,
-0.01255720853805542,
0.015010016970336437,
-0.03117314726114273,
-0.0508151613175869,
0.0043876939453184605,
0.0286323893815279
]
|
41,541 | pyglove.core.symbolic.base | eq | Compares if two values are equal. Use symbolic equality if possible.
Example::
@pg.members([
('x', pg.typing.Any())
])
class A(pg.Object):
def sym_eq(self, right):
if super().sym_eq(right):
return True
return pg.eq(self.x, right)
class B:
pass
assert pg.eq(1, 1)
assert pg.eq(A(1), A(1))
# This is True since A has override `sym_eq`.
assert pg.eq(A(1), 1)
# Objects of B are compared by references.
assert not pg.eq(A(B()), A(B()))
Args:
left: The left-hand value to compare.
right: The right-hand value to compare.
Returns:
True if left and right is equal or symbolically equal. Otherwise False.
| def eq(left: Any, right: Any) -> bool:
"""Compares if two values are equal. Use symbolic equality if possible.
Example::
@pg.members([
('x', pg.typing.Any())
])
class A(pg.Object):
def sym_eq(self, right):
if super().sym_eq(right):
return True
return pg.eq(self.x, right)
class B:
pass
assert pg.eq(1, 1)
assert pg.eq(A(1), A(1))
# This is True since A has override `sym_eq`.
assert pg.eq(A(1), 1)
# Objects of B are compared by references.
assert not pg.eq(A(B()), A(B()))
Args:
left: The left-hand value to compare.
right: The right-hand value to compare.
Returns:
True if left and right is equal or symbolically equal. Otherwise False.
"""
# NOTE(daiyip): the default behavior for dict/list/tuple comparison is that
# it compares the elements using __eq__, __ne__. For symbolic comparison on
# these container types, we need to change the behavior by using symbolic
# comparison on their items.
if left is right:
return True
if ((isinstance(left, list) and isinstance(right, list))
or (isinstance(left, tuple) and isinstance(right, tuple))):
if len(left) != len(right):
return False
for x, y in zip(left, right):
if ne(x, y):
return False
return True
elif isinstance(left, dict):
if (not isinstance(right, dict)
or len(left) != len(right)
or set(left.keys()) != set(right.keys())):
return False
# NOTE(daiyip): pg.Dict.__getitem__ will trigger inferred value
# evaluation, therefore we always get its symbolic form during traversal.
left_items = left.sym_items if isinstance(left, Symbolic) else left.items
right_item = (
right.sym_getattr if isinstance(right, Symbolic) else right.__getitem__)
for k, v in left_items():
if ne(v, right_item(k)):
return False
return True
# We compare sym_eq with Symbolic.sym_eq to avoid endless recursion.
elif (hasattr(left, 'sym_eq')
and not inspect.isclass(left)
and left.sym_eq.__code__ is not Symbolic.sym_eq.__code__):
return left.sym_eq(right)
elif (hasattr(right, 'sym_eq')
and not inspect.isclass(right)
and right.sym_eq.__code__ is not Symbolic.sym_eq.__code__):
return right.sym_eq(left)
# Compare two maybe callable objects.
return pg_typing.callable_eq(left, right)
| (left: Any, right: Any) -> bool | [
0.06581022590398788,
-0.04691882058978081,
0.027349956333637238,
0.017042912542819977,
-0.029633957892656326,
-0.03544074296951294,
-0.03960227221250534,
0.018639778718352318,
0.04831244796514511,
-0.007621404714882374,
0.018997864797711372,
-0.03822799772024155,
0.10413500666618347,
0.0635262280702591,
-0.04057006910443306,
-0.030330771580338478,
-0.025453072041273117,
0.029382331296801567,
-0.021678661927580833,
-0.022123849019408226,
-0.03486006334424019,
0.02253032475709915,
0.03505362197756767,
0.0432024784386158,
-0.0216012392193079,
0.027504803612828255,
0.03935064375400543,
0.035750437527894974,
-0.04498322680592537,
0.10808362066745758,
-0.00433815224096179,
-0.0653843954205513,
0.021523814648389816,
-0.0067068361677229404,
0.0432024784386158,
-0.024194935336709023,
-0.01751713454723358,
0.04211854562163353,
-0.08392739295959473,
-0.03636982664465904,
-0.035382673144340515,
0.009755398146808147,
0.012078111991286278,
-0.02231740951538086,
-0.035266537219285965,
-0.03571172431111336,
-0.0169848445802927,
-0.01144904363900423,
0.03137599304318428,
-0.014497606083750725,
0.024891750887036324,
-0.09538611769676208,
0.006334234494715929,
0.055551573634147644,
-0.036679524928331375,
0.024659479036927223,
-0.01723647303879261,
0.038479626178741455,
-0.022394832223653793,
0.0004736158880405128,
-0.0030364645645022392,
-0.021194763481616974,
-0.035750437527894974,
-0.026053106412291527,
-0.008661787025630474,
-0.011555501259863377,
-0.054699912667274475,
-0.03795701637864113,
-0.009305372834205627,
-0.02733059972524643,
-0.07173314690589905,
0.002136412775143981,
0.005439021624624729,
0.011991010047495365,
-0.05109970644116402,
-0.010897398926317692,
-0.035247184336185455,
0.054235368967056274,
0.001817039679735899,
-0.0649198517203331,
0.0006290683522820473,
-0.04866085574030876,
-0.019955983385443687,
-0.03588593006134033,
-0.06882975250482559,
0.05702262744307518,
0.04773176833987236,
0.055899981409311295,
0.040260374546051025,
-0.022607747465372086,
-0.010761907324194908,
-0.017933286726474762,
0.036563389003276825,
-0.033582571893930435,
0.008308541029691696,
0.0021872222423553467,
0.024291716516017914,
-0.03064046800136566,
-0.012261993251740932,
0.010887721553444862,
0.040995899587869644,
0.002231982769444585,
-0.02005276270210743,
0.05079001188278198,
-0.013268503360450268,
0.02913070283830166,
-0.006068089976906776,
-0.05617096275091171,
-0.0045389700680971146,
-0.03307931497693062,
-0.09732171148061752,
0.022510968148708344,
0.0049478644505143166,
-0.003210667986422777,
0.03151148557662964,
0.015842843800783157,
-0.00020021309319417924,
-0.015610572881996632,
0.01128451805561781,
-0.015184742398560047,
0.00995863601565361,
0.08586298674345016,
-0.0012085370253771544,
0.0007645599544048309,
0.08222407102584839,
0.004701076075434685,
0.06414561718702316,
0.016762251034379005,
-0.08415966480970383,
0.05179651826620102,
0.10576090216636658,
0.01940433867275715,
-0.014294368214905262,
0.09530869126319885,
0.02504659816622734,
0.04177013784646988,
0.027408024296164513,
0.05516445264220238,
0.017149370163679123,
-0.017807472497224808,
0.0046599446795880795,
-0.021910933777689934,
-0.0299242977052927,
0.017294541001319885,
-0.040028102695941925,
0.010307042859494686,
-0.08996645361185074,
-0.004640588536858559,
0.03139534965157509,
0.04006681591272354,
0.0005604152102023363,
-0.02731124311685562,
0.041808851063251495,
0.042544376105070114,
-0.0570613369345665,
-0.021794797852635384,
-0.002281582448631525,
-0.013113655149936676,
-0.019510796293616295,
0.04602844640612602,
-0.015475081279873848,
-0.008565007708966732,
-0.0224141888320446,
-0.011003856547176838,
-0.009687652811408043,
-0.03151148557662964,
-0.004408317152410746,
-0.03662145510315895,
0.026149887591600418,
0.014391148462891579,
-0.0030388839077204466,
-0.05191265419125557,
-0.05791299790143967,
-0.04676397144794464,
0.012610401026904583,
-0.0005468055605888367,
0.01049092411994934,
0.0164041668176651,
-0.03007914498448372,
-0.016810642555356026,
0.02707897312939167,
-0.07099761813879013,
-0.03648596256971359,
-0.013171723112463951,
0.02194964699447155,
0.05346113070845604,
-0.008550490252673626,
-0.024659479036927223,
0.030001720413565636,
0.017691336572170258,
-0.05466119945049286,
-0.0063052005134522915,
-0.02483368292450905,
0.035750437527894974,
0.04184756055474281,
-0.024156223982572556,
0.01917206682264805,
-0.0035082658287137747,
-0.017100980505347252,
0.05737103149294853,
-0.028821008279919624,
-0.0325760617852211,
0.015252487733960152,
-0.0027751591987907887,
-0.011768416501581669,
-0.047422073781490326,
-0.004793016705662012,
0.019259169697761536,
0.05779686197638512,
-0.04091847687959671,
-0.04118945822119713,
-0.03712470829486847,
-0.005385792814195156,
-0.008439193479716778,
0.004359927494078875,
0.03851833939552307,
0.012629756703972816,
-0.0337374173104763,
0.012261993251740932,
0.017159048467874527,
0.08764373511075974,
-0.02554985322058201,
-0.029401686042547226,
-0.008240795694291592,
0.025453072041273117,
-0.013955638743937016,
-0.040724918246269226,
0.07037822902202606,
-0.005216428078711033,
-0.07386229932308197,
0.028453245759010315,
0.03902159258723259,
0.03019528090953827,
-0.049938347190618515,
0.016626760363578796,
-0.0337374173104763,
0.002413444919511676,
0.03112436644732952,
-0.023343274369835854,
0.016191251575946808,
0.0096441013738513,
0.04355088621377945,
-0.03840220347046852,
0.01532991137355566,
0.011226450093090534,
-0.06906202435493469,
0.03592463955283165,
0.013665299862623215,
-0.028066126629710197,
-0.009295694530010223,
-0.01765262521803379,
-0.06097123771905899,
0.018813982605934143,
-0.013568520545959473,
-0.009184397757053375,
0.015610572881996632,
-0.047422073781490326,
0.009063422679901123,
0.04986092448234558,
0.015697674825787544,
0.001072440529242158,
0.038131218403577805,
-0.004456707276403904,
0.044363833963871,
0.03207280859351158,
-0.013762080110609531,
-0.023652968928217888,
0.0296920258551836,
0.012232959270477295,
-0.009247304871678352,
0.012271671555936337,
-0.055551573634147644,
-0.020072119310498238,
0.08702434599399567,
0.0015327491564676166,
0.03193731606006622,
0.039679694920778275,
-0.0174397099763155,
-0.01359755452722311,
-0.043667022138834,
-0.028840363025665283,
-0.012513620778918266,
-0.004013939760625362,
-0.051370687782764435,
-0.032382503151893616,
0.04269922152161598,
-0.03193731606006622,
-0.04107332229614258,
0.04784790426492691,
-0.0725460946559906,
0.06646832823753357,
-0.0012424099259078503,
0.040376510471105576,
0.03375677391886711,
0.014236300252377987,
0.07471396028995514,
-0.032730910927057266,
-0.026149887591600418,
0.016258997842669487,
0.035866573452949524,
0.044325124472379684,
0.02638215757906437,
0.0845467820763588,
0.025569207966327667,
0.049822211265563965,
-0.004393800627440214,
0.01008444931358099,
0.053848251700401306,
0.03336965665221214,
0.019094644114375114,
-0.028317753225564957,
0.0012774926144629717,
0.0032663163729012012,
0.05872594937682152,
0.028821008279919624,
-0.001584768295288086,
-0.02696283720433712,
-0.054351504892110825,
0.02936297468841076,
0.03367935121059418,
-0.006774581968784332,
0.04978350177407265,
-0.03654403239488602,
0.029885584488511086,
-0.032750263810157776,
-0.07444298267364502,
-0.023536833003163338,
0.05168038234114647,
0.05284174159169197,
0.02756287157535553,
0.03356321528553963,
0.0021763346157968044,
0.10436727851629257,
0.007974650710821152,
0.005085775628685951,
-0.0016767090419307351,
0.01748809963464737,
0.07572047412395477,
0.0035542361438274384,
-0.031201789155602455,
0.02446591854095459,
-0.000491459621116519,
0.016733217984437943,
-0.08090786635875702,
0.004016359336674213,
0.007568175904452801,
-0.04815760254859924,
0.010229619219899178,
0.007906905375421047,
0.008860185742378235,
-0.06073896959424019,
0.002784837270155549,
0.02661442942917347,
-0.0374344065785408,
-0.011884552426636219,
0.024504631757736206,
0.004006681498140097,
0.027949990704655647,
-0.015842843800783157,
0.008565007708966732,
0.08036590367555618,
0.01133290771394968,
-0.04606715962290764,
-0.002794515108689666,
0.004884957801550627,
-0.0027751591987907887,
-0.029053280130028725,
0.014516961760818958,
-0.01917206682264805,
-0.009813466109335423,
-0.021097984164953232,
-0.049318958073854446,
-0.036331117153167725,
-0.0427379347383976,
-0.03749247267842293,
0.025085309520363808,
-0.020846357569098473,
0.028840363025665283,
0.027059616521000862,
-0.033234164118766785,
0.09112780541181564,
-0.0026324091013520956,
0.010868364945054054,
0.02014954201877117,
0.011961976066231728,
-0.0007077018963173032,
0.020827000960707664,
0.02314971573650837,
0.04490580037236214,
0.004749466199427843,
-0.06263585388660431,
-0.0112070944160223,
-0.010742551647126675,
0.023769104853272438,
-0.03666016831994057,
-0.018746236339211464,
-0.017691336572170258,
0.010723195970058441,
-0.10947724431753159,
-0.028937144204974174,
0.047654345631599426,
0.02351747825741768,
0.00010592845501378179,
-0.02671120874583721,
0.010607060045003891,
0.02781449817121029,
0.044441260397434235,
0.007660117000341415,
-0.000059353202232159674,
0.04657041281461716,
-0.027156395837664604,
-0.01443953812122345,
-0.05771943926811218,
-0.006755226291716099,
-0.03582786023616791,
0.017381642013788223,
0.038363490253686905,
-0.010936111211776733,
0.07568176090717316,
-0.00031483659404329956,
0.038731254637241364,
-0.002925167791545391,
-0.014662131667137146,
0.012668468989431858,
0.03125985711812973,
-0.0016984845278784633,
0.012087790295481682,
0.025027241557836533,
-0.01128451805561781,
0.03666016831994057,
-0.03878932073712349,
-0.044363833963871,
0.038963526487350464,
-0.008482744917273521,
0.0441315621137619,
-0.032847046852111816,
-0.003868770319968462,
-0.06449402123689651,
-0.024156223982572556,
0.03886674717068672,
-0.01980113610625267,
0.012465231120586395,
-0.016500946134328842,
-0.04866085574030876,
-0.04451868310570717,
0.030698534101247787,
0.042312104254961014,
-0.006518115755170584,
0.03816993162035942,
0.024311071261763573,
-0.0007125408737920225,
0.0009611438144929707,
0.02707897312939167,
-0.018475253134965897,
-0.027717718854546547,
-0.047538209706544876,
-0.013636265881359577,
-0.011487755924463272,
-0.04595102369785309,
0.024059444665908813,
-0.02384652942419052,
-0.03867318481206894,
-0.04018295183777809,
-0.022220630198717117,
-0.05740974470973015,
0.09136007726192474,
0.0006460048025473952,
0.02396266534924507,
0.00007855793228372931,
0.04637685418128967,
-0.0017347768880426884,
-0.0007488332921639085,
-0.023207783699035645,
0.02924683876335621,
0.023904597386717796,
0.03768603131175041,
-0.038982879370450974,
-0.009024711325764656,
-0.07603016495704651,
-0.052299775183200836,
-0.05640323460102081,
0.013549163937568665,
0.019646288827061653,
-0.02016889862716198,
0.06039056181907654,
-0.04494451358914375,
0.02111734077334404,
0.023536833003163338,
0.0005235179560258985,
-0.02328520640730858,
-0.008995677344501019,
-0.03056304343044758,
-0.041228171437978745,
0.040531355887651443,
-0.008860185742378235,
-0.031569551676511765,
-0.03162762150168419,
-0.022723883390426636,
-0.019772101193666458,
-0.02564663253724575,
0.0021799637470394373,
0.07061050087213516,
0.007626243866980076,
0.06240357831120491,
0.07684312015771866,
-0.02148510329425335,
0.012271671555936337,
-0.02254968136548996,
-0.0501319095492363,
0.040376510471105576,
-0.00207108655013144,
-0.03218894451856613,
0.04498322680592537,
-0.023304563015699387,
0.033466435968875885,
0.06112608686089516,
0.05020933225750923,
-0.03532460704445839,
-0.034085825085639954,
-0.060545407235622406,
0.02901456691324711,
-0.067010298371315,
-0.00019159364455845207,
-0.0009085198398679495,
-0.007476235274225473,
-0.008550490252673626,
0.003953452687710524,
0.0019271266646683216,
0.05044160410761833,
-0.05473862215876579,
0.003977647516876459,
0.008579524233937263,
-0.04544776678085327,
-0.012562010437250137,
-0.04688010737299919,
0.04835116118192673,
0.008506939746439457,
-0.010723195970058441,
0.056016117334365845,
0.04262179881334305,
0.00784399826079607,
0.02827904187142849,
0.00450025824829936,
0.013336248695850372,
-0.0003493143885862082,
0.02042052522301674,
0.0017069526948034763,
-0.012387807480990887,
0.03224701061844826,
0.018843015655875206,
0.002779998118057847,
-0.0374344065785408,
0.07235253602266312,
-0.010897398926317692,
-0.062442291527986526,
0.011429687961935997,
-0.006692319177091122,
0.030369484797120094,
0.05431279167532921,
-0.0069487858563661575,
0.0169848445802927,
-0.007200412917882204,
0.024523986503481865,
-0.08121756464242935,
0.018078455701470375,
-0.018494609743356705,
0.03780216723680496,
-0.024175580590963364,
0.062326155602931976,
0.029208127409219742,
0.0023819913621991873,
0.04370573163032532,
0.029653314501047134,
-0.023769104853272438,
0.042195968329906464,
-0.0224141888320446,
-0.0390409491956234,
0.04544776678085327,
-0.042195968329906464,
-0.09159234911203384,
0.008018202148377895,
0.014313723891973495,
-0.017710693180561066,
0.021620595827698708,
-0.01980113610625267,
-0.02934361808001995,
-0.01589123345911503,
0.03935064375400543,
-0.025588564574718475,
-0.03184053674340248,
-0.06604249775409698,
0.030930805951356888,
0.03162762150168419,
-0.055667709559202194,
0.023672325536608696,
-0.001727518392726779,
-0.030756602063775063,
0.05477733537554741,
0.03031141683459282,
-0.0510609932243824,
-0.01008444931358099,
0.00024346154532395303,
0.008840830065310001,
-0.11752932518720627,
0.006469726096838713,
-0.01668482832610607,
0.012620078399777412,
0.013762080110609531,
0.014071774668991566,
-0.0036461767740547657,
0.02957588993012905,
-0.008468227460980415,
0.017459066584706306,
-0.05586126819252968,
0.027020905166864395,
-0.028201617300510406,
-0.00450025824829936,
0.02876294031739235,
-0.039408713579177856,
0.02340134233236313,
-0.03362128511071205,
0.009373118169605732,
-0.041344307363033295,
0.015058928169310093,
-0.008874702267348766,
0.008294024504721165,
0.05024804174900055,
0.013587876223027706,
0.012929773889482021,
-0.06592636555433273,
-0.011661958880722523,
-0.019065609201788902,
0.030117856338620186,
-0.023575546219944954,
-0.0012448295019567013,
-0.11234192550182343,
0.015252487733960152,
0.010703839361667633,
0.0034114860463887453,
0.11210965365171432,
-0.03064046800136566,
-0.02767900750041008,
-0.052415911108255386,
0.06286812573671341,
-0.030756602063775063,
0.030214635655283928,
0.007887548767030239,
-0.040260374546051025,
0.047538209706544876,
0.012058756314218044,
-0.013955638743937016,
0.04819631204009056,
-0.01580413244664669,
-0.010229619219899178,
-0.011061924509704113,
0.032343789935112,
0.014468572102487087,
-0.052183639258146286,
-0.02003340795636177,
-0.002801773604005575,
0.03205345198512077,
-0.03499555587768555,
-0.05156424641609192,
0.0005564835155382752,
-0.0025453073903918266,
0.016142861917614937,
0.021659307181835175,
0.012010366655886173,
0.022723883390426636,
0.013442706316709518,
-0.011052247136831284,
-0.0025961166247725487,
0.00596163235604763,
-0.052532047033309937,
-0.009813466109335423,
-0.009319889359176159,
0.010336076840758324,
0.03818928822875023,
-0.0179042536765337,
-0.002600955544039607,
-0.01612350530922413,
-0.0029880746733397245,
-0.0496673658490181,
-0.01556218322366476,
-0.02802741341292858,
-0.0011873665498569608,
0.009392473846673965,
0.03290511295199394,
0.02028503455221653,
-0.05524187907576561,
-0.020091475918889046,
-0.06201646104454994,
0.03842156007885933,
-0.015717031434178352,
-0.01497182622551918,
-0.03356321528553963,
-0.024891750887036324,
-0.012058756314218044,
-0.0000620373320998624,
-0.008898897096514702,
-0.0010004605865105987,
-0.03019528090953827,
0.01204907801002264,
-0.01665579341351986,
0.06015828996896744,
0.03166633099317551,
-0.014304046519100666,
0.019007541239261627,
0.06240357831120491,
-0.010297364555299282,
-0.067010298371315,
0.0005492250784300268,
-0.010955466888844967,
-0.0441315621137619,
0.017313895747065544,
-0.01765262521803379,
0.028956498950719833,
0.043125055730342865,
-0.03768603131175041,
0.010171551257371902,
-0.019704356789588928,
-0.04428641125559807,
0.06937172263860703,
-0.026537006720900536,
0.042195968329906464,
0.03468586131930351,
0.012920095585286617,
-0.02885971963405609,
0.00680361595004797,
0.02053666114807129,
0.01686870865523815,
0.08222407102584839,
0.033350300043821335,
0.05071258544921875,
-0.08330800384283066,
0.00242917169816792,
0.0026541845872998238,
-0.04057006910443306,
-0.009169881232082844,
0.08168210089206696,
0.0360407754778862,
0.017594557255506516,
0.05516445264220238,
-0.04649299010634422,
0.04955122992396355,
0.012213603593409061,
-0.01032639853656292,
0.003900223644450307,
0.015881557017564774,
-0.021291544660925865,
0.03555687889456749,
0.0247175469994545,
0.025085309520363808,
-0.01109095849096775,
0.0031284051947295666,
0.06356493383646011,
-0.040492646396160126,
-0.029324263334274292,
-0.03642789646983147,
-0.04916410893201828,
-0.03497619926929474,
0.04308634251356125,
-0.03290511295199394,
0.007471396122127771,
-0.035363320261240005,
-0.013142689131200314,
-0.014758910983800888,
0.06906202435493469
]
|
41,543 | pyglove.core.hyper.evolvable | evolve | An evolvable symbolic value.
Example::
@pg.symbolize
@dataclasses.dataclass
class Foo:
x: int
y: int
@pg.symbolize
@dataclasses.dataclass
class Bar:
a: int
b: int
# Defines possible transitions.
def node_transform(location, value, parent):
if isinstance(value, Foo)
return Bar(value.x, value.y)
if location.key == 'x':
return random.choice([1, 2, 3])
if location.key == 'y':
return random.choice([3, 4, 5])
v = pg.evolve(Foo(1, 3), node_transform)
See also:
* :class:`pyglove.hyper.Evolvable`
* :func:`pyglove.oneof`
* :func:`pyglove.manyof`
* :func:`pyglove.permutate`
* :func:`pyglove.floatv`
Args:
initial_value: The initial value to evolve.
node_transform: A callable object that takes information of the value to
operate (e.g. location, old value, parent node) and returns a new value as
a replacement for the node. Such information allows users to not only
access the mutation node, but the entire symbolic tree if needed, allowing
complex mutation rules to be written with ease - for example - check
adjacent nodes while modifying a list element. This function is designed
to take care of both node replacements and node insertions. When insertion
happens, the old value for the location will be `pg.MISSING_VALUE`. See
`pg.composing.SeenObjectReplacer` as an example.
weights: An optional callable object that returns the unnormalized (e.g.
the sum of all probabilities don't have to sum to 1.0) mutation
probabilities for all the nodes in the symbolic tree, based on (mutation
type, location, old value, parent node), If None, all the locations and
mutation types will be sampled uniformly.
name: An optional name of the decision point.
hints: An optional hints for the decision point.
Returns:
A `pg.hyper.Evolvable` object.
| def evolve(
initial_value: symbolic.Symbolic,
node_transform: Callable[
[
object_utils.KeyPath, # Location.
Any, # Old value.
# pg.MISSING_VALUE for insertion.
symbolic.Symbolic, # Parent node.
],
Any # Replacement.
],
*,
weights: Optional[Callable[
[
MutationType, # Mutation type.
object_utils.KeyPath, # Location.
Any, # Value.
symbolic.Symbolic, # Parent.
],
float # Mutation weight.
]] = None, # pylint: disable=bad-whitespace
name: Optional[str] = None,
hints: Optional[Any] = None) -> Evolvable:
"""An evolvable symbolic value.
Example::
@pg.symbolize
@dataclasses.dataclass
class Foo:
x: int
y: int
@pg.symbolize
@dataclasses.dataclass
class Bar:
a: int
b: int
# Defines possible transitions.
def node_transform(location, value, parent):
if isinstance(value, Foo)
return Bar(value.x, value.y)
if location.key == 'x':
return random.choice([1, 2, 3])
if location.key == 'y':
return random.choice([3, 4, 5])
v = pg.evolve(Foo(1, 3), node_transform)
See also:
* :class:`pyglove.hyper.Evolvable`
* :func:`pyglove.oneof`
* :func:`pyglove.manyof`
* :func:`pyglove.permutate`
* :func:`pyglove.floatv`
Args:
initial_value: The initial value to evolve.
node_transform: A callable object that takes information of the value to
operate (e.g. location, old value, parent node) and returns a new value as
a replacement for the node. Such information allows users to not only
access the mutation node, but the entire symbolic tree if needed, allowing
complex mutation rules to be written with ease - for example - check
adjacent nodes while modifying a list element. This function is designed
to take care of both node replacements and node insertions. When insertion
happens, the old value for the location will be `pg.MISSING_VALUE`. See
`pg.composing.SeenObjectReplacer` as an example.
weights: An optional callable object that returns the unnormalized (e.g.
the sum of all probabilities don't have to sum to 1.0) mutation
probabilities for all the nodes in the symbolic tree, based on (mutation
type, location, old value, parent node), If None, all the locations and
mutation types will be sampled uniformly.
name: An optional name of the decision point.
hints: An optional hints for the decision point.
Returns:
A `pg.hyper.Evolvable` object.
"""
return Evolvable(
initial_value=initial_value, node_transform=node_transform,
weights=weights, name=name, hints=hints)
| (initial_value: pyglove.core.symbolic.base.Symbolic, node_transform: Callable[[pyglove.core.object_utils.value_location.KeyPath, Any, pyglove.core.symbolic.base.Symbolic], Any], *, weights: Optional[Callable[[pyglove.core.hyper.evolvable.MutationType, pyglove.core.object_utils.value_location.KeyPath, Any, pyglove.core.symbolic.base.Symbolic], float]] = None, name: Optional[str] = None, hints: Optional[Any] = None) -> pyglove.core.hyper.evolvable.Evolvable | [
0.10759588330984116,
-0.08435456454753876,
-0.015621215105056763,
-0.035223934799432755,
0.025775006040930748,
-0.017478615045547485,
-0.004510149825364351,
-0.06957156211137772,
0.021850651130080223,
0.019774172455072403,
0.03373801335692406,
-0.015602164901793003,
0.03482387959957123,
0.03651935234665871,
-0.021031489595770836,
0.05867480859160423,
-0.036633655428886414,
0.018183475360274315,
0.04476811736822128,
0.059474918991327286,
-0.015373561531305313,
-0.049340181052684784,
-0.04221538081765175,
0.0037886209320276976,
-0.011077728122472763,
-0.01388764102011919,
0.01276367623358965,
0.058179501444101334,
-0.04781615734100342,
-0.0641612857580185,
0.019231239333748817,
-0.05680788308382034,
0.012639849446713924,
-0.028594443574547768,
0.02918500266969204,
-0.019774172455072403,
0.017792945727705956,
0.06892385333776474,
0.022898415103554726,
-0.031909190118312836,
-0.00996328704059124,
0.01658325269818306,
-0.05383604019880295,
-0.012735100463032722,
0.022155456244945526,
0.04728275164961815,
0.0013108962448313832,
0.08412595838308334,
-0.01411624439060688,
-0.024022381752729416,
0.003295695409178734,
-0.05501715838909149,
0.043701302260160446,
0.01742146536707878,
0.05128330737352371,
0.012887503020465374,
0.028708744794130325,
0.0445014126598835,
0.07902049273252487,
-0.017611967399716377,
0.07300060242414474,
0.018707357347011566,
0.006315161939710379,
-0.022803165018558502,
-0.03202349320054054,
0.007205761969089508,
0.028080087155103683,
-0.015725992619991302,
-0.05585537105798721,
0.04221538081765175,
-0.032194942235946655,
-0.000381005258532241,
0.014506774954497814,
-0.019736072048544884,
-0.021183891221880913,
0.017059510573744774,
0.004176769871264696,
0.0066485414281487465,
-0.01683090627193451,
-0.05737939104437828,
-0.001358521869406104,
-0.00626753643155098,
-0.05795089900493622,
-0.05433134734630585,
-0.01824062690138817,
-0.029070701450109482,
-0.036386001855134964,
-0.008448791690170765,
0.01936459168791771,
-0.011144403368234634,
0.0022003052290529013,
-0.012582698836922646,
-0.0018490661168470979,
0.07532473653554916,
0.03808147460222244,
0.040500856935977936,
0.010858649387955666,
-0.10889130085706711,
0.07917289435863495,
-0.01040144357830286,
0.05143570899963379,
0.11056772619485855,
-0.03329985961318016,
0.021888751536607742,
0.013859066180884838,
-0.014725852757692337,
-0.02129819430410862,
0.031166229397058487,
0.02291746623814106,
-0.061341844499111176,
-0.055283863097429276,
0.06812373548746109,
0.013582836836576462,
0.009058400057256222,
-0.03905303776264191,
0.00029572556377388537,
0.02108864113688469,
0.027165673673152924,
-0.011925464496016502,
0.020250428467988968,
0.012106441892683506,
-0.003679082030430436,
-0.00952036865055561,
-0.000037747053283965215,
-0.018955010920763016,
0.02889924868941307,
0.04210108146071434,
-0.009491792879998684,
-0.04221538081765175,
-0.007963010109961033,
0.004226777236908674,
-0.01760244183242321,
-0.04015795513987541,
0.07669635862112045,
0.0303470678627491,
0.007948721759021282,
0.0013799533480778337,
0.0037981460336595774,
-0.0030766173731535673,
0.013192307204008102,
0.0070866975001990795,
0.0012102869804948568,
0.02263171225786209,
-0.001647847704589367,
-0.0023015099577605724,
-0.003100430127233267,
0.03299505636096001,
0.036138348281383514,
-0.02731807716190815,
0.011849263682961464,
0.00602940795943141,
0.019297916442155838,
0.06111324205994606,
0.016468951478600502,
-0.01143968291580677,
0.008248764090240002,
-0.013601887039840221,
-0.06522809714078903,
-0.04210108146071434,
0.009753734804689884,
-0.03973884880542755,
-0.001722858170978725,
0.020364731550216675,
0.028956398367881775,
-0.0016585635021328926,
-0.0526549257338047,
0.012858927249908447,
-0.011754011735320091,
-0.05566486716270447,
0.03109002858400345,
0.007586766965687275,
-0.0420248806476593,
-0.032575950026512146,
0.010010913014411926,
0.09243187308311462,
0.04507292062044144,
0.04892107471823692,
-0.0445014126598835,
0.011296805925667286,
-0.008301151916384697,
-0.028784947469830513,
-0.039091140031814575,
-0.03608119860291481,
-0.0333760604262352,
-0.02640366367995739,
0.013258982449769974,
-0.04991168901324272,
0.03966264799237251,
0.009682295843958855,
-0.020955288782715797,
0.03202349320054054,
-0.04267258942127228,
0.0002896235091611743,
0.024860592558979988,
-0.00394340418279171,
0.006915245205163956,
-0.03255689889192581,
0.03592879697680473,
-0.03749091550707817,
0.05779849737882614,
-0.03478578105568886,
-0.021602997556328773,
0.04918777942657471,
-0.005686503369361162,
-0.028632543981075287,
-0.010553845204412937,
-0.008929810486733913,
-0.00457682553678751,
0.005524576175957918,
-0.03627169877290726,
-0.054788555949926376,
0.04861627146601677,
-0.011573034338653088,
0.001968130236491561,
-0.03263309970498085,
-0.024212883785367012,
0.01043954398483038,
-0.002524159848690033,
0.03482387959957123,
-0.007134323474019766,
0.020231379196047783,
-0.04263448715209961,
0.05425514653325081,
-0.01283035147935152,
0.107291080057621,
-0.05886531248688698,
-0.03006131388247013,
-0.06732362508773804,
-0.023431822657585144,
-0.055360063910484314,
0.04453951492905617,
-0.0536455400288105,
-0.006362787913531065,
-0.07745836675167084,
0.04914967715740204,
0.03482387959957123,
0.05368363857269287,
0.02295556664466858,
-0.043358396738767624,
0.04412040859460831,
-0.0631706714630127,
-0.03345226123929024,
-0.04290119186043739,
-0.01753576658666134,
-0.053950343281030655,
-0.034557174891233444,
0.07768697291612625,
0.014725852757692337,
-0.05890341103076935,
-0.0049911686219275,
-0.014535350725054741,
-0.035223934799432755,
-0.018316827714443207,
-0.0031813939567655325,
0.018669256940484047,
-0.015183059498667717,
-0.018745457753539085,
0.039091140031814575,
0.03810052573680878,
0.007239099591970444,
0.005186433903872967,
-0.04827336594462395,
-0.04812096431851387,
0.0906030461192131,
-0.011049152351915836,
-0.03196633979678154,
-0.016707079485058784,
0.016554677858948708,
0.02108864113688469,
0.028289640322327614,
-0.011401582509279251,
0.021355343982577324,
0.01017284020781517,
0.0003863631282001734,
0.031909190118312836,
-0.013382809236645699,
-0.015221159905195236,
0.0027884822338819504,
0.04130097106099129,
-0.012868452817201614,
-0.026879919692873955,
-0.021679198369383812,
-0.02520349808037281,
-0.00832496490329504,
-0.04911157861351967,
0.020745735615491867,
-0.03632885217666626,
0.01149683352559805,
0.017450040206313133,
-0.0031075740698724985,
0.026727518066763878,
-0.003402853151783347,
0.016078421846032143,
0.010830074548721313,
0.07338161021471024,
0.022307857871055603,
-0.026060760021209717,
0.011553984135389328,
0.0044006104581058025,
-0.022441208362579346,
0.022860314697027206,
-0.0025884544011205435,
-0.008705969899892807,
0.004591113422065973,
0.016468951478600502,
0.006153234746307135,
0.01950746960937977,
-0.030423268675804138,
-0.0032837889157235622,
0.02594645693898201,
-0.015268785879015923,
0.01764054223895073,
-0.05231202021241188,
0.00809636153280735,
0.031413882970809937,
-0.057684194296598434,
0.046520739793777466,
-0.07090507447719574,
0.03528108447790146,
0.004729227628558874,
-0.03583354502916336,
0.05657928064465523,
-0.08481176942586899,
-0.008101124316453934,
-0.02482249215245247,
-0.016202248632907867,
0.015221159905195236,
0.053950343281030655,
0.021869702264666557,
-0.018012022599577904,
-0.010877699591219425,
0.00009934414265444502,
0.07040976732969284,
0.06358977407217026,
-0.06294206529855728,
-0.040500856935977936,
0.03396661952137947,
-0.010572895407676697,
-0.0008852418977767229,
-0.0318901389837265,
0.037929072976112366,
0.023298470303416252,
0.014744902960956097,
-0.014697277918457985,
0.0021074353717267513,
0.008296389132738113,
0.025622602552175522,
-0.04492051899433136,
0.026918020099401474,
-0.06892385333776474,
-0.04320599511265755,
0.06149424612522125,
-0.07909668982028961,
0.003679082030430436,
-0.011144403368234634,
0.005010218825191259,
0.011944514699280262,
-0.03055662102997303,
-0.024098582565784454,
-0.03678605705499649,
0.012220743112266064,
0.012677949853241444,
-0.01177306193858385,
-0.0026217924896627665,
0.032271143049001694,
-0.016802331432700157,
-0.03762426972389221,
0.014535350725054741,
0.07863948494195938,
-0.029127851128578186,
0.015525964088737965,
-0.04602543264627457,
-0.015649789944291115,
0.002540828660130501,
-0.005515051074326038,
-0.011134878732264042,
-0.02727997675538063,
-0.012887503020465374,
0.00010127893619937822,
0.01577361673116684,
0.06564720720052719,
0.040577057749032974,
-0.004233920946717262,
-0.01566884107887745,
0.02470819093286991,
0.005134045612066984,
0.08077311515808105,
0.010391918011009693,
0.04568253085017204,
-0.016411801800131798,
-0.03857678174972534,
-0.0022586467675864697,
0.030994776636362076,
0.013639988377690315,
-0.022726962342858315,
0.012639849446713924,
0.01862163096666336,
-0.040462758392095566,
-0.10127119719982147,
-0.022441208362579346,
0.029489805921912193,
0.07932529598474503,
-0.012677949853241444,
0.0015466432087123394,
-0.004910205025225878,
-0.0899934396147728,
0.055702969431877136,
0.011201553978025913,
-0.012906553223729134,
0.08747880905866623,
0.00017904270498547703,
0.011068202555179596,
-0.06259915977716446,
-0.01179211214184761,
0.003176631173118949,
-0.041834376752376556,
-0.027660980820655823,
-0.015306886285543442,
0.015268785879015923,
-0.012887503020465374,
0.005500763189047575,
0.02196495234966278,
0.007986822165548801,
0.038291025906801224,
0.02865159511566162,
-0.000759629241656512,
0.0420248806476593,
-0.03316650539636612,
-0.005386461969465017,
0.015021132305264473,
0.03644315153360367,
-0.02059333398938179,
0.02129819430410862,
-0.0061627598479390144,
0.005786517169326544,
-0.0505593977868557,
0.02287936583161354,
-0.009991862811148167,
0.032614048570394516,
0.038214825093746185,
0.003040898125618696,
-0.018364453688263893,
0.03651935234665871,
-0.015859343111515045,
-0.02154584787786007,
-0.002450339961796999,
-0.0049864063039422035,
0.015030656941235065,
-0.03280455246567726,
-0.0004560156667139381,
0.07387691736221313,
-0.038214825093746185,
0.020269479602575302,
0.0008929810719564557,
-0.011220604181289673,
0.0001317891146754846,
-0.021984003484249115,
-0.015621215105056763,
-0.03743376582860947,
-0.013878116384148598,
-0.027680031955242157,
-0.0265751164406538,
0.042443983256816864,
-0.04164387285709381,
0.00008207984501495957,
-0.03779572248458862,
0.02773718163371086,
-0.05017838999629021,
-0.01964082010090351,
-0.03985314816236496,
0.05505525693297386,
-0.0245367381721735,
0.03404282033443451,
-0.022860314697027206,
0.011163453571498394,
-0.012592223472893238,
-0.050216492265462875,
-0.04069136083126068,
-0.01932649128139019,
-0.07833468168973923,
0.01482110470533371,
-0.020745735615491867,
0.06713312864303589,
0.006896195001900196,
0.013678088784217834,
0.044691916555166245,
0.06198955327272415,
0.006124659441411495,
0.0485781691968441,
0.01494493056088686,
-0.07227669656276703,
0.025641653686761856,
0.012706524692475796,
0.002000277629122138,
-0.05936061963438988,
-0.04854007065296173,
0.05097850412130356,
-0.010915799997746944,
0.06698071956634521,
-0.01671660505235195,
-0.001440676162019372,
0.007758219260722399,
-0.009525131434202194,
-0.026060760021209717,
0.01482110470533371,
-0.029985113069415092,
0.0020288529340177774,
-0.019659871235489845,
-0.02644176408648491,
0.0033838029485195875,
0.03754806891083717,
-0.0384434312582016,
0.07338161021471024,
-0.012611273676156998,
0.01103962678462267,
-0.01436389796435833,
0.019145512953400612,
0.08732639998197556,
-0.010258566588163376,
-0.09426070004701614,
-0.041377171874046326,
-0.023031767457723618,
0.019583670422434807,
0.020479032769799232,
0.0240414310246706,
-0.024898692965507507,
-0.03737661615014076,
-0.06389457732439041,
-0.019383642822504044,
-0.019755123183131218,
0.0018966917414218187,
-0.024060482159256935,
0.01230646949261427,
0.05356933921575546,
-0.04678744450211525,
-0.003159962361678481,
0.0068771447986364365,
-0.009648958221077919,
-0.12923698127269745,
-0.019736072048544884,
0.002364613814279437,
0.056655481457710266,
-0.005086420103907585,
0.0318901389837265,
0.010315717197954655,
-0.040119852870702744,
0.07521043717861176,
-0.007572479546070099,
-0.029261203482747078,
-0.0662568137049675,
-0.0642755851149559,
0.003693369682878256,
0.019755123183131218,
0.030994776636362076,
-0.025889307260513306,
-0.0886218249797821,
-0.012573173269629478,
0.0339285172522068,
-0.02207925356924534,
0.022555511444807053,
-0.034728627651929855,
0.0035481113009154797,
0.05875100940465927,
-0.00223483401350677,
0.09227947145700455,
0.05977972224354744,
-0.02379377745091915,
-0.008101124316453934,
0.024403385818004608,
0.01788819581270218,
0.06157044693827629,
-0.00013417040463536978,
0.06599011272192001,
-0.0067628431133925915,
0.004724465310573578,
0.013735239394009113,
-0.03368086367845535,
0.023850928992033005,
-0.032404497265815735,
-0.0844307616353035,
-0.026537016034126282,
-0.06621871143579483,
0.0041100941598415375,
-0.0531502328813076,
0.03349035978317261,
0.022612661123275757,
-0.015468813478946686,
0.07642965018749237,
-0.029242152348160744,
0.06023693084716797,
-0.029870811849832535,
0.0021824457217007875,
-0.04629213735461235,
0.03059472143650055,
0.006515190005302429,
-0.03741471469402313,
0.002284840913489461,
0.044653814285993576,
0.0531502328813076,
0.0006149662658572197,
-0.0692286565899849,
0.0003170082636643201,
0.059513021260499954,
-0.003919591661542654,
-0.048425767570734024,
-0.004881629720330238,
0.03255689889192581,
-0.012201692909002304,
0.07216239720582962,
0.00836306530982256,
0.018926436081528664,
0.003693369682878256,
-0.019812272861599922,
-0.004283927846699953,
0.0035957370419055223,
0.032899804413318634,
-0.006491377018392086,
0.02312701940536499,
0.031032877042889595,
0.001160280080512166,
-0.0032218757551163435,
0.005824617575854063,
-0.03973884880542755,
-0.0526549257338047,
-0.05082609876990318,
-0.013897166587412357,
0.041377171874046326,
-0.02623221091926098,
-0.020078977569937706,
-0.0378909707069397,
0.002519397297874093,
-0.014163870364427567,
-0.033852316439151764,
0.0036647941451519728,
0.03935784101486206,
-0.01517353393137455,
0.032899804413318634,
0.0084821293130517,
-0.016106996685266495,
-0.0027813382912427187,
-0.005195959005504847,
0.023641375824809074,
0.01889786124229431,
0.03699560835957527,
-0.0012692237505689263,
0.006748555693775415,
0.038595832884311676,
0.0010394299170002341,
-0.006434226408600807,
0.04198677837848663,
0.009644195437431335,
0.005857955664396286,
0.006505664438009262,
-0.023469923064112663,
0.0019407455110922456,
-0.013106580823659897,
0.038710132241249084,
-0.054864756762981415,
0.04069136083126068,
-0.004000555258244276,
0.02097433991730213,
0.016802331432700157,
0.017269063740968704,
0.03465242683887482,
0.029508857056498528,
-0.010572895407676697,
0.0039005412254482508,
0.027375226840376854,
0.008639293722808361,
0.052121520042419434,
-0.045187223702669144,
-0.05825570225715637,
0.019174089655280113,
0.024479586631059647,
-0.005548389162868261,
-0.059513021260499954,
0.012687474489212036,
0.06404698640108109,
-0.03636695072054863,
0.00667235441505909,
0.034519076347351074,
0.035890694707632065,
-0.019621770828962326,
0.015068757347762585,
0.005915106739848852,
-0.05497905611991882,
-0.032575950026512146,
0.0002771217841655016,
0.08854562044143677,
-0.034766729921102524,
-0.00996328704059124,
-0.002857539337128401,
-0.051626212894916534,
-0.024060482159256935,
-0.022860314697027206,
0.01735478825867176,
-0.056693580001592636,
-0.02806103602051735,
0.024517687037587166,
-0.008220188319683075,
0.08496417105197906,
0.06968586146831512,
0.007991584949195385,
0.0096108578145504,
0.04023415595293045,
-0.01721191219985485,
-0.030613772571086884,
-0.018183475360274315,
0.024841543287038803,
-0.012401720508933067,
0.025260647758841515,
0.010544320568442345,
-0.0561220720410347,
-0.013763814233243465,
0.04126286879181862,
0.006858094595372677,
-0.03461432829499245,
0.015821242704987526,
-0.005524576175957918,
0.016221297904849052,
-0.0313376821577549,
-0.09327008575201035,
0.06633301079273224,
-0.00006280633533606306,
-0.005415037274360657,
0.011582559905946255,
0.014963981695473194,
-0.01946936920285225,
0.03619549795985222,
0.01946936920285225,
0.04408230632543564,
0.07715356349945068,
-0.015097333118319511,
0.009139363653957844,
0.025603553280234337,
-0.02802293561398983,
-0.05616017431020737,
0.05516956001520157,
-0.029985113069415092,
0.008915523067116737,
-0.0028194389306008816,
0.04869247227907181,
-0.03459527716040611,
-0.0773821696639061,
0.06400888413190842,
-0.021564897149801254,
-0.03400471806526184,
0.011630184948444366,
0.01781199499964714,
0.04812096431851387,
-0.011220604181289673,
0.022612661123275757,
0.038957785815000534,
0.024517687037587166,
0.06919055432081223,
-0.026727518066763878,
-0.04705414921045303,
0.014754428528249264,
-0.036633655428886414,
-0.06633301079273224,
-0.001963367685675621,
-0.009120313450694084,
0.0631706714630127,
-0.02918500266969204,
-0.008158274926245213,
-0.011658760719001293,
0.015926020219922066,
0.02516539767384529
]
|
41,544 | pyglove.core.object_utils.common_traits | explicit_method_override | Decorator that marks a member method as explicitly overridden.
In PyGlove, many methods are managed by the framework - for example -
``pg.Object.__init__``. It's easy for users to override these methods
unconsciously. Therefore, we introduce this decorator to catch error at
the first place when such overrides incidentally take place, while allowing
advanced users to override them.
Usage::
class Foo(pg.Object):
@pg.explicit_method_override
def __init__(self, *args, **kwargs):
...
Args:
method: method to explicitly overriden.
Returns:
The original method with an explicit overriden stamp.
| def explicit_method_override(method):
"""Decorator that marks a member method as explicitly overridden.
In PyGlove, many methods are managed by the framework - for example -
``pg.Object.__init__``. It's easy for users to override these methods
unconsciously. Therefore, we introduce this decorator to catch error at
the first place when such overrides incidentally take place, while allowing
advanced users to override them.
Usage::
class Foo(pg.Object):
@pg.explicit_method_override
def __init__(self, *args, **kwargs):
...
Args:
method: method to explicitly overriden.
Returns:
The original method with an explicit overriden stamp.
"""
setattr(method, '__explicit_override__', True)
return method
| (method) | [
-0.010623493231832981,
-0.022064877673983574,
0.04343909025192261,
0.09400292485952377,
-0.03373345360159874,
-0.06877553462982178,
-0.026245208457112312,
0.010114583186805248,
0.07793591171503067,
-0.021465091034770012,
0.02430044673383236,
-0.018093563616275787,
0.0017039392841979861,
-0.01712118089199066,
-0.06888458132743835,
-0.0019447626546025276,
-0.025118336081504822,
0.04013117775321007,
-0.017757318913936615,
-0.011341420002281666,
0.031243430450558662,
0.013876881450414658,
0.027008572593331337,
0.023700660094618797,
-0.009787427261471748,
0.0764818787574768,
-0.04456596449017525,
0.04180331155657768,
0.04034928232431412,
0.005834287963807583,
-0.0073791928589344025,
-0.03529653325676918,
0.027935516089200974,
0.061396338045597076,
0.06277766823768616,
-0.03169781342148781,
-0.007170176599174738,
0.071320079267025,
-0.12584613263607025,
-0.025027459487318993,
-0.022264806553721428,
0.01386779360473156,
0.06212335452437401,
-0.04107629507780075,
0.0330246165394783,
-0.001376782893203199,
0.04743766784667969,
0.04191236197948456,
0.017920896410942078,
-0.03164329007267952,
0.009351219050586224,
-0.007242877967655659,
0.056743450462818146,
0.003723675385117531,
-0.028044568374753,
0.034060608595609665,
0.026372436434030533,
0.045620135962963104,
-0.01594887115061283,
0.053835391998291016,
-0.0030920817516744137,
-0.026372436434030533,
0.004948239773511887,
-0.07110197842121124,
0.024754829704761505,
-0.0191204696893692,
-0.03624165058135986,
0.00938756950199604,
0.025409141555428505,
-0.008796870708465576,
-0.019629379734396935,
0.021755896508693695,
0.012822710908949375,
0.02995298057794571,
0.029534947127103806,
0.018284404650330544,
-0.0210834089666605,
0.020410921424627304,
0.0121683981269598,
0.01756647787988186,
0.002059494610875845,
-0.029571298509836197,
0.024245919659733772,
0.025808999314904213,
-0.03556916490197182,
-0.06285037100315094,
-0.029262317344546318,
-0.042312219738960266,
-0.006961159873753786,
-0.012050258927047253,
-0.029916629195213318,
0.04202141612768173,
0.02386423759162426,
0.009505709633231163,
-0.005175431724637747,
-0.0019356750417500734,
0.04812833294272423,
-0.04013117775321007,
-0.023246275261044502,
-0.0334608219563961,
-0.013195306062698364,
0.0608510784804821,
0.04064008593559265,
-0.04394800215959549,
0.03416966274380684,
0.025536369532346725,
0.04398435354232788,
-0.0025104705709964037,
-0.012204748578369617,
0.04289383068680763,
0.001773232826963067,
-0.038713499903678894,
-0.044529613107442856,
-0.005375360604375601,
0.034224189817905426,
-0.028462601825594902,
-0.029407719150185585,
-0.027008572593331337,
0.03845904394984245,
0.0447840690612793,
-0.021628668531775475,
-0.04024022817611694,
-0.04024022817611694,
-0.04136710241436958,
-0.035623691976070404,
-0.08804140985012054,
0.014658421277999878,
0.06012406572699547,
0.03238847851753235,
-0.04220316931605339,
-0.0412943996489048,
0.014376703649759293,
-0.033715277910232544,
-0.00040582154178991914,
0.0017130268970504403,
-0.02111975848674774,
0.05441700294613838,
0.02808091975748539,
0.02599075436592102,
-0.009687462821602821,
-0.0003217605408281088,
-0.004766486119478941,
0.07226520031690598,
0.06150539219379425,
0.00411898922175169,
-0.002312813652679324,
-0.03164329007267952,
0.03402426093816757,
-0.0004086614353582263,
-0.03269745782017708,
-0.009223991073668003,
0.020974356681108475,
0.006484056822955608,
-0.02864435501396656,
0.015712592750787735,
0.027353905141353607,
-0.052017856389284134,
0.015676241368055344,
-0.0043007428757846355,
-0.03029831312596798,
0.012522817589342594,
-0.046056341379880905,
0.006861195433884859,
-0.018884191289544106,
0.01639416813850403,
-0.01354063767939806,
-0.03456952050328255,
-0.032624758780002594,
-0.0004734111425932497,
0.032497528940439224,
-0.033006440848112106,
0.0030443714931607246,
0.02499110996723175,
-0.004189418628811836,
0.1243194118142128,
0.07902643084526062,
0.011832154355943203,
0.04507487267255783,
-0.0006230737781152129,
0.0873870924115181,
0.05147259682416916,
-0.06404994428157806,
0.011132403276860714,
-0.04234857112169266,
-0.006352285388857126,
-0.004314374178647995,
0.04067643731832504,
-0.03613260015845299,
-0.03138883411884308,
0.033406298607587814,
0.07386463135480881,
0.007174720522016287,
0.03980402275919914,
-0.00010770316293928772,
0.021101584658026695,
-0.06437709927558899,
-0.04612904414534569,
-0.006061479914933443,
-0.006838476285338402,
0.03395155817270279,
0.007329210638999939,
0.020756252110004425,
0.041403453797101974,
0.04307558387517929,
0.04794657975435257,
0.08237069845199585,
0.02439132332801819,
-0.041003596037626266,
-0.0721561461687088,
-0.006724880542606115,
0.01054170448333025,
-0.014767473563551903,
-0.002263967413455248,
-0.022919118404388428,
-0.04500217363238335,
-0.01617606356739998,
0.10679837316274643,
0.0206471998244524,
-0.043148286640644073,
0.021319687366485596,
0.025718122720718384,
-0.000034575768950162455,
-0.06455884873867035,
0.02090165577828884,
0.03733217343688011,
0.012959025800228119,
0.012559168040752411,
-0.0408581905066967,
0.005134536884725094,
-0.024445848539471626,
-0.015758030116558075,
0.01573076657950878,
-0.05525306984782219,
0.010178197175264359,
-0.011377770453691483,
-0.015267295762896538,
0.018666086718440056,
0.010650756768882275,
0.0010592822218313813,
-0.02320992574095726,
-0.024264095351099968,
0.08026235550642014,
0.018020860850811005,
0.06339562684297562,
-0.052490416914224625,
0.004734679125249386,
-0.009292148984968662,
0.025318264961242676,
0.020847128704190254,
0.03595084697008133,
0.009264885447919369,
-0.0017005313420668244,
-0.06481330841779709,
0.036059897392988205,
0.01799359917640686,
-0.002319629304111004,
-0.05906989425420761,
0.05376269295811653,
-0.00722470274195075,
0.07968074083328247,
-0.028244497254490852,
0.03802283853292465,
0.024591252207756042,
-0.012640957720577717,
0.061614442616701126,
-0.006029672920703888,
-0.04798293113708496,
0.03360622748732567,
0.007601840887218714,
0.0782267153263092,
0.0016573648899793625,
-0.08237069845199585,
0.02539096772670746,
0.018847839906811714,
0.033842504024505615,
0.031752340495586395,
-0.04372989758849144,
0.01664862222969532,
-0.04743766784667969,
-0.012368327006697655,
0.03991307318210602,
0.005993322469294071,
0.03704136610031128,
0.0046528903767466545,
-0.054053496569395065,
0.01895689219236374,
-0.018502509221434593,
0.06699434667825699,
-0.02211940288543701,
-0.005529850721359253,
0.04798293113708496,
0.006683985702693462,
0.01808447577059269,
0.023664308711886406,
-0.006138725206255913,
-0.027917340397834778,
0.04754672199487686,
0.00446659279987216,
0.02464577741920948,
-0.02133786305785179,
0.027753762900829315,
0.005502588115632534,
-0.0426030270755291,
0.033406298607587814,
0.06194160133600235,
-0.017457425594329834,
-0.0417306087911129,
-0.004598364233970642,
-0.02268284000456333,
-0.04282113164663315,
-0.02708127535879612,
0.034969378262758255,
-0.12490101903676987,
-0.032061319798231125,
0.038713499903678894,
0.00941483210772276,
-0.04889169707894325,
0.0032079496886581182,
0.028898810967803,
0.025227388367056847,
-0.036496106535196304,
0.04056738689541817,
-0.023464379832148552,
0.008187996223568916,
-0.0913129672408104,
-0.004784661345183849,
0.056270889937877655,
0.041003596037626266,
-0.029026037082076073,
0.0043007428757846355,
0.002342348452657461,
0.00435981247574091,
-0.019102295860648155,
0.046492550522089005,
-0.07077482342720032,
-0.014876525849103928,
-0.00269449595361948,
-0.000742917531169951,
-0.001820943085476756,
0.04180331155657768,
0.02499110996723175,
0.01344976108521223,
-0.011205105111002922,
-0.02333715185523033,
0.02286459319293499,
0.03142518550157547,
-0.02704492397606373,
0.038313642144203186,
0.019847484305500984,
0.0042166817001998425,
0.01338614709675312,
-0.07989884912967682,
-0.0391133576631546,
-0.009060412645339966,
0.05365363880991936,
-0.056743450462818146,
0.015876170247793198,
-0.014067722484469414,
-0.0019277232931926847,
-0.05968785658478737,
-0.061614442616701126,
-0.042166817933321,
-0.02620885707437992,
-0.008465169928967953,
0.031025325879454613,
0.04798293113708496,
-0.018702438101172447,
0.012613694183528423,
-0.04987316578626633,
0.013404321856796741,
-0.01354063767939806,
-0.07081117480993271,
-0.010614405386149883,
-0.009951005689799786,
0.022846417501568794,
0.018756963312625885,
-0.009010430425405502,
0.04223951697349548,
0.032224901020526886,
0.06761231273412704,
0.07190169394016266,
-0.04060373827815056,
0.0016834919806569815,
-0.019065944477915764,
0.03438776731491089,
-0.027263028547167778,
0.022228455170989037,
0.012786360457539558,
-0.0005850191228091717,
-0.04445691034197807,
-0.02308269776403904,
-0.007301947567611933,
-0.05485321208834648,
-0.06103283166885376,
-0.033969733864068985,
-0.027390256524086,
-0.03802283853292465,
-0.031407009810209274,
0.006093286909162998,
0.007410999853163958,
0.026463313028216362,
-0.0042394008487463,
0.03317001834511757,
-0.01995653659105301,
0.017702793702483177,
0.016930339857935905,
-0.0022651031613349915,
-0.02273736521601677,
0.04133075103163719,
-0.060269467532634735,
-0.012922675348818302,
0.01886601559817791,
-0.011377770453691483,
-0.006952072028070688,
0.05906989425420761,
-0.0050118532963097095,
0.05598008632659912,
-0.0734647735953331,
-0.011286893859505653,
-0.015458136796951294,
0.01639416813850403,
0.022028526291251183,
-0.03213402256369591,
0.08680548518896103,
0.023936938494443893,
-0.04420245811343193,
-0.01099608838558197,
-0.032443005591630936,
-0.022464735433459282,
0.04333003982901573,
0.05038207769393921,
0.0020038324873894453,
0.015240033157169819,
-0.007038405165076256,
0.034278713166713715,
-0.06423169374465942,
0.012631869874894619,
-0.00869690626859665,
-0.02789916656911373,
0.028462601825594902,
-0.0276083592325449,
-0.01573985442519188,
-0.016857638955116272,
-0.003305642167106271,
0.031752340495586395,
-0.016703149303793907,
-0.0056161838583648205,
0.016530482098460197,
0.05416255071759224,
-0.032443005591630936,
0.016248764470219612,
0.011495910584926605,
0.03042553924024105,
0.018329842016100883,
-0.0669216439127922,
-0.0508546344935894,
-0.036841437220573425,
-0.043402742594480515,
0.037404876202344894,
0.07749970257282257,
-0.0038100082892924547,
0.05198150873184204,
-0.03791378438472748,
-0.03698684275150299,
-0.026099806651473045,
0.03791378438472748,
-0.012940851040184498,
0.011741277761757374,
-0.0534718856215477,
-0.009741988964378834,
0.08367931842803955,
-0.09014974534511566,
-0.01799359917640686,
-0.07059306651353836,
-0.005538938567042351,
0.02255561202764511,
-0.0003086969954892993,
0.03951321542263031,
0.0012484195176512003,
0.016612272709608078,
-0.03533288463950157,
0.009587498381733894,
-0.002828539116308093,
0.02155596762895584,
0.049836814403533936,
-0.007879015058279037,
-0.045402031391859055,
-0.0030580030288547277,
0.00971472542732954,
-0.0016346457414329052,
-0.002946679014712572,
0.004530206322669983,
-0.03380615636706352,
0.01145047228783369,
0.009305780753493309,
0.007065668236464262,
-0.016621360555291176,
0.03317001834511757,
0.021501442417502403,
-0.08702358603477478,
0.018547946587204933,
-0.06881188601255417,
0.028099095448851585,
0.011514085344970226,
0.015367260202765465,
-0.04569283500313759,
0.01093247439712286,
0.05408984795212746,
0.03533288463950157,
0.03491485118865967,
0.0521632619202137,
0.001547176856547594,
-0.024027815088629723,
0.015003752894699574,
0.03676873818039894,
-0.0065158638171851635,
-0.08927732706069946,
-0.03360622748732567,
-0.008987711742520332,
-0.004250760655850172,
0.026590541005134583,
-0.0756094679236412,
0.03146153315901756,
0.006275040563195944,
0.02012011408805847,
-0.015394523739814758,
0.033406298607587814,
0.01703939214348793,
-0.007601840887218714,
0.0011666304199025035,
0.014267651364207268,
0.06081472709774971,
0.0030784502159804106,
0.02333715185523033,
0.03715042024850845,
0.05398079752922058,
-0.008224346674978733,
-0.014422141946852207,
-0.006175076123327017,
-0.0002501950948499143,
0.030062032863497734,
0.05950610339641571,
-0.014903788454830647,
0.022719189524650574,
0.0036623335909098387,
-0.04772847518324852,
-0.07459164410829544,
-0.05263581871986389,
0.01708483137190342,
-0.044965822249650955,
-0.03644157946109772,
0.05219961330294609,
-0.018066300079226494,
0.00577067444100976,
-0.027917340397834778,
-0.052490416914224625,
0.0007236062083393335,
0.013640602119266987,
0.02717215195298195,
-0.008360662497580051,
-0.05456240847706795,
-0.026499664410948753,
0.03589631989598274,
-0.010123671032488346,
-0.03791378438472748,
0.058924492448568344,
0.023318976163864136,
0.04678335785865784,
-0.0412943996489048,
-0.09247618913650513,
0.03051641583442688,
-0.03335177153348923,
0.020792603492736816,
-0.017639178782701492,
-0.05459875985980034,
0.05790667235851288,
0.018020860850811005,
-0.026117980480194092,
-0.0360780730843544,
-0.05979691073298454,
-0.06037852168083191,
-0.018702438101172447,
-0.04234857112169266,
-0.028262672945857048,
-0.052308663725852966,
-0.01939310133457184,
-0.006724880542606115,
0.07546406239271164,
-0.026881346479058266,
-0.025590896606445312,
-0.08695088326931,
-0.02786281518638134,
0.007106562610715628,
-0.09298510104417801,
0.024264095351099968,
0.07684539258480072,
0.01025998592376709,
-0.01047809049487114,
0.02920779027044773,
-0.016094274818897247,
-0.00239005871117115,
0.050018567591905594,
0.00845153909176588,
-0.016930339857935905,
0.014785649254918098,
-0.06150539219379425,
-0.021701371297240257,
-0.008901379071176052,
0.025027459487318993,
0.00839246902614832,
-0.02464577741920948,
0.015558101236820221,
0.011205105111002922,
0.015112805180251598,
0.00699751079082489,
-0.0032079496886581182,
-0.014394879341125488,
-0.015558101236820221,
0.03167963773012161,
0.034714922308921814,
-0.05558022856712341,
0.020029237493872643,
0.01177762821316719,
-0.011986644938588142,
0.013304357416927814,
0.00015434849774464965,
0.005797937512397766,
0.010578054934740067,
-0.00032431643921881914,
-0.06081472709774971,
-0.032970089465379715,
-0.011850330047309399,
0.0391133576631546,
0.010359950363636017,
0.013513374142348766,
-0.029625823721289635,
-0.033497173339128494,
-0.009060412645339966,
0.003319273702800274,
-0.013549725525081158,
0.031188905239105225,
-0.030843572691082954,
-0.005861551035195589,
0.042930182069540024,
-0.002880793297663331,
0.0158670824021101,
-0.022810067981481552,
-0.01086886040866375,
0.015185507014393806,
-0.02177407220005989,
-0.005220870021730661,
0.020810779184103012,
-0.04791022837162018,
0.020283693447709084,
0.0054526058956980705,
-0.008601485751569271,
-0.018611561506986618,
-0.02377336099743843,
0.02117428556084633,
-0.006365917157381773,
-0.018884191289544106,
0.01877513900399208,
-0.06772135943174362,
-0.0007332618697546422,
0.02682681940495968,
0.057615865021944046,
-0.05012762174010277,
-0.014040459878742695,
0.029098739847540855,
0.024500375613570213,
0.04634714871644974,
0.01755739003419876,
-0.01995653659105301,
-0.05132719501852989,
0.05772491917014122,
-0.015485400334000587,
-0.009596586227416992,
-0.061359990388154984,
-0.0356600396335125,
0.016403255984187126,
-0.031279779970645905,
-0.013895057141780853,
-0.06157809495925903,
-0.004675609525293112,
-0.04202141612768173,
0.045183926820755005,
0.01595795899629593,
0.014603895135223866,
-0.017802758142352104,
-0.03269745782017708,
0.012895412743091583,
-0.04707416146993637,
-0.018020860850811005,
0.05376269295811653,
0.056961555033922195,
-0.021592319011688232,
-0.055834680795669556,
-0.018275316804647446,
0.01045082788914442,
-0.003142063971608877,
0.029262317344546318,
0.006838476285338402,
-0.03317001834511757,
0.022973645478487015,
-0.010096408426761627,
0.02929866872727871,
-0.002919415943324566,
-0.01493105199187994,
0.022046701982617378,
0.015848906710743904,
-0.009923742152750492,
0.018720611929893494,
0.04343909025192261,
-0.03507842868566513,
0.03751392662525177,
-0.01573076657950878,
0.021537791937589645,
-0.06583112478256226,
-0.007061124313622713,
0.02864435501396656,
-0.0412943996489048,
-0.017411988228559494,
-0.03733217343688011,
-0.04860089346766472,
0.024409497156739235,
0.006870283279567957,
-0.02342802844941616,
-0.023573432117700577,
-0.028753407299518585,
0.04423880577087402,
0.03560551628470421,
0.027462957426905632,
-0.0040008495561778545,
0.02199217677116394,
0.03933146223425865,
0.001773232826963067,
-0.05445335432887077,
0.014676596969366074,
-0.03791378438472748,
0.01590343378484249,
-0.04950965940952301,
-0.05772491917014122,
-0.012331976555287838,
-0.0029830296989530325,
0.08993164449930191,
-0.007883558981120586,
0.018111739307641983,
0.04482042044401169,
0.02577264979481697,
0.057179659605026245,
0.0029216879047453403,
0.024264095351099968,
0.018884191289544106,
0.04289383068680763,
0.03535106033086777,
-0.025536369532346725,
0.0035441936925053596,
0.03665968403220177,
0.05125449225306511,
-0.043002884835004807,
-0.09720178693532944,
-0.022755540907382965,
-0.0005253812996670604,
-0.02886245958507061,
-0.03291556239128113,
0.02555454522371292,
0.06295941770076752,
0.05550752580165863
]
|
41,546 | pyglove.core.hyper.numerical | floatv | A continuous value within a range.
Example::
# A continuous value within [0.0, 1.0]
v = pg.floatv(0.0, 1.0)
See also:
* :class:`pyglove.hyper.Float`
* :func:`pyglove.oneof`
* :func:`pyglove.manyof`
* :func:`pyglove.permutate`
* :func:`pyglove.evolve`
.. note::
Under symbolic mode (by default), `pg.floatv` returns a ``pg.hyper.Float``
object. Under dynamic evaluate mode, which is called under the context of
:meth:`pyglove.hyper.DynamicEvaluationContext.collect` or
:meth:`pyglove.hyper.DynamicEvaluationContext.apply`, it evaluates to
a concrete candidate value.
Args:
min_value: Minimum acceptable value (inclusive).
max_value: Maximum acceptable value (inclusive).
scale: An optional string as the scale of the range. Supported values
are None, 'linear', 'log', and 'rlog'.
If None, the feasible space is unscaled.
If `linear`, the feasible space is mapped to [0, 1] linearly.
If `log`, the feasible space is mapped to [0, 1] logarithmically with
formula `x -> log(x / min) / log(max / min)`.
If `rlog`, the feasible space is mapped to [0, 1] "reverse"
logarithmically, resulting in values close to `max_value` spread
out more than the points near the `min_value`, with formula:
x -> 1.0 - log((max + min - x) / min) / log (max / min).
`min_value` must be positive if `scale` is not None.
Also, it depends on the search algorithm to decide whether this
information is used or not.
name: A name that can be used to identify a decision point in the search
space. This is needed when the code to instantiate the same hyper
primitive may be called multiple times under a
`pg.DynamicEvaluationContext.collect` context or a
`pg.DynamicEvaluationContext.apply` context.
hints: An optional value which acts as a hint for the controller.
Returns:
In symbolic mode, this function returns a `Float`.
In dynamic evaluate mode, this function returns a float value that is no
less than the `min_value` and no greater than the `max_value`.
If evaluated under an `pg.DynamicEvaluationContext.apply` scope,
this function will return a chosen float value from the controller
decisions.
If evaluated under a `pg.DynamicEvaluationContext.collect`
scope, it will return `min_value`.
| def floatv(min_value: float,
max_value: float,
scale: Optional[str] = None,
*,
name: Optional[str] = None,
hints: Optional[Any] = None) -> Any:
"""A continuous value within a range.
Example::
# A continuous value within [0.0, 1.0]
v = pg.floatv(0.0, 1.0)
See also:
* :class:`pyglove.hyper.Float`
* :func:`pyglove.oneof`
* :func:`pyglove.manyof`
* :func:`pyglove.permutate`
* :func:`pyglove.evolve`
.. note::
Under symbolic mode (by default), `pg.floatv` returns a ``pg.hyper.Float``
object. Under dynamic evaluate mode, which is called under the context of
:meth:`pyglove.hyper.DynamicEvaluationContext.collect` or
:meth:`pyglove.hyper.DynamicEvaluationContext.apply`, it evaluates to
a concrete candidate value.
Args:
min_value: Minimum acceptable value (inclusive).
max_value: Maximum acceptable value (inclusive).
scale: An optional string as the scale of the range. Supported values
are None, 'linear', 'log', and 'rlog'.
If None, the feasible space is unscaled.
If `linear`, the feasible space is mapped to [0, 1] linearly.
If `log`, the feasible space is mapped to [0, 1] logarithmically with
formula `x -> log(x / min) / log(max / min)`.
If `rlog`, the feasible space is mapped to [0, 1] "reverse"
logarithmically, resulting in values close to `max_value` spread
out more than the points near the `min_value`, with formula:
x -> 1.0 - log((max + min - x) / min) / log (max / min).
`min_value` must be positive if `scale` is not None.
Also, it depends on the search algorithm to decide whether this
information is used or not.
name: A name that can be used to identify a decision point in the search
space. This is needed when the code to instantiate the same hyper
primitive may be called multiple times under a
`pg.DynamicEvaluationContext.collect` context or a
`pg.DynamicEvaluationContext.apply` context.
hints: An optional value which acts as a hint for the controller.
Returns:
In symbolic mode, this function returns a `Float`.
In dynamic evaluate mode, this function returns a float value that is no
less than the `min_value` and no greater than the `max_value`.
If evaluated under an `pg.DynamicEvaluationContext.apply` scope,
this function will return a chosen float value from the controller
decisions.
If evaluated under a `pg.DynamicEvaluationContext.collect`
scope, it will return `min_value`.
"""
return Float(
min_value=min_value, max_value=max_value,
scale=scale, name=name, hints=hints)
| (min_value: float, max_value: float, scale: Optional[str] = None, *, name: Optional[str] = None, hints: Optional[Any] = None) -> Any | [
0.06222626194357872,
-0.06493009626865387,
-0.04272819310426712,
0.006497769616544247,
0.036558881402015686,
0.030256282538175583,
0.008506604470312595,
-0.07532652467489243,
-0.03772038593888283,
0.014195127412676811,
0.011377047747373581,
-0.007716399151831865,
0.007764001842588186,
0.003177480772137642,
0.00780684407800436,
0.04051942750811577,
0.006597735453397036,
-0.031532034277915955,
0.016927523538470268,
0.060169823467731476,
-0.0007336767739616334,
-0.00037606139085255563,
0.008554207161068916,
-0.004384209401905537,
0.00844472087919712,
-0.01713697612285614,
0.04211887717247009,
0.03158915787935257,
-0.05956051126122475,
-0.03918654844164848,
-0.005469551309943199,
-0.01584218069911003,
0.03299819678068161,
-0.003351230639964342,
-0.003355991095304489,
-0.023668067529797554,
0.02816176228225231,
-0.007692597806453705,
-0.06584406644105911,
-0.007825884968042374,
-0.026010120287537575,
0.007449823897331953,
-0.0671769455075264,
0.012376704253256321,
-0.0184317696839571,
0.03827257826924324,
0.06161694601178169,
-0.0009401534916833043,
-0.006440646480768919,
-0.007854446768760681,
0.01877450756728649,
-0.026390941813588142,
-0.015251907519996166,
-0.00041890382999554276,
-0.03663504496216774,
0.03088463842868805,
0.028580665588378906,
0.027419161051511765,
-0.0022301869466900826,
-0.02781902253627777,
0.032217513769865036,
0.015480400994420052,
-0.012233896180987358,
-0.07269885390996933,
-0.030599020421504974,
0.04954490065574646,
0.02397272363305092,
-0.015347113832831383,
-0.06055064499378204,
0.017079852521419525,
-0.03332189470529556,
0.0040319496765732765,
0.027780940756201744,
0.010167938657104969,
0.029323268681764603,
0.045051202178001404,
0.016480058431625366,
0.06687228381633759,
-0.03174148499965668,
-0.06493009626865387,
0.07837309688329697,
0.007178488653153181,
0.020278753712773323,
-0.09848048537969589,
-0.010748691856861115,
-0.024258339777588844,
-0.07292734831571579,
0.0056361607275903225,
0.057009004056453705,
0.030027788132429123,
-0.03122737631201744,
0.025096148252487183,
-0.0070213996805250645,
0.07959172874689102,
0.02781902253627777,
0.007887768559157848,
0.020621493458747864,
-0.014680675230920315,
0.019574234262108803,
0.04356599971652031,
0.036577921360731125,
0.09451993554830551,
-0.03789175674319267,
0.02243039570748806,
-0.01245286874473095,
-0.048783257603645325,
0.0000703627520124428,
0.0004929855349473655,
0.0509539395570755,
0.013633416034281254,
-0.0612742081284523,
-0.022335190325975418,
0.0198217686265707,
0.03554970398545265,
-0.07772570103406906,
0.037053950130939484,
-0.0260482020676136,
0.045622434467077255,
-0.002180204028263688,
0.004655545111745596,
-0.013195470906794071,
-0.009977527894079685,
-0.018346084281802177,
0.004467514343559742,
-0.0039748260751366615,
0.020507246255874634,
0.039262715727090836,
0.005055407527834177,
-0.042766273021698,
0.027799982577562332,
0.05986516550183296,
-0.032350800931453705,
-0.03143683075904846,
0.04821202531456947,
0.024753408506512642,
-0.00519345561042428,
-0.018945878371596336,
0.04897366836667061,
0.04211887717247009,
0.035740114748477936,
-0.008525645360350609,
0.011643623001873493,
-0.03983394801616669,
-0.0038129768799990416,
0.002939467318356037,
0.021326012909412384,
0.0742221474647522,
0.012605197727680206,
-0.0617692768573761,
0.03640655055642128,
-0.0042104595340788364,
0.018355604261159897,
0.0476788729429245,
-0.017222659662365913,
0.02147834189236164,
-0.07189913094043732,
0.0023718050215393305,
-0.07311776280403137,
0.002872823504731059,
0.04531778022646904,
-0.020507246255874634,
0.02431546337902546,
0.04508928582072258,
-0.00045609346125274897,
-0.009458658285439014,
-0.018174713477492332,
-0.02583875134587288,
0.012529033236205578,
-0.026600394397974014,
0.095357745885849,
0.012319580651819706,
-0.015232866629958153,
-0.006669139489531517,
0.03335997834801674,
0.03743477165699005,
-0.007497426588088274,
0.010996226221323013,
-0.02311587519943714,
0.036825455725193024,
0.019345741719007492,
-0.011843553744256496,
-0.02488669566810131,
-0.01902204193174839,
-0.04566051810979843,
0.004572240170091391,
0.050420790910720825,
-0.027533406391739845,
0.009539582766592503,
-0.03838682547211647,
-0.016384853050112724,
0.011719786562025547,
-0.02408697083592415,
0.009610987268388271,
-0.028237927705049515,
-0.01681327633559704,
-0.011605540290474892,
-0.0171655360609293,
-0.017070330679416656,
0.020373959094285965,
-0.007506947033107281,
0.021687794476747513,
0.0030775151681154966,
0.02947559766471386,
-0.04234737157821655,
-0.015232866629958153,
0.034102581441402435,
0.026714639738202095,
-0.002946607768535614,
0.02747628279030323,
-0.009249206632375717,
-0.075707346200943,
0.01630868762731552,
-0.07875391840934753,
0.04223312437534332,
-0.015328072011470795,
-0.03362655267119408,
-0.0027895187959074974,
-0.004572240170091391,
0.024220257997512817,
0.05895119532942772,
0.10876266658306122,
-0.08073419332504272,
0.04169997200369835,
0.010120335966348648,
0.07795419543981552,
0.003912942484021187,
-0.0366160050034523,
-0.04630791395902634,
0.026505189016461372,
-0.056285444647073746,
0.04958298057317734,
-0.03956736996769905,
-0.021173685789108276,
-0.007373659405857325,
-0.034083541482686996,
0.05731366202235222,
0.0688144788146019,
0.08073419332504272,
-0.008844583295285702,
0.0004311020311433822,
-0.022735053673386574,
0.026010120287537575,
-0.04135723412036896,
0.024505874142050743,
-0.025419846177101135,
-0.055942703038454056,
-0.001587550388649106,
0.02760957181453705,
-0.02993258275091648,
0.02229710854589939,
-0.03941504284739494,
-0.03299819678068161,
-0.02124984934926033,
0.004717428237199783,
0.0015863602748140693,
0.030960801988840103,
-0.030941760167479515,
-0.01474731881171465,
0.02136409655213356,
-0.0002234352141385898,
-0.039872027933597565,
-0.04825010523200035,
-0.0008098410908132792,
0.08180049806833267,
0.015289990231394768,
-0.03608285263180733,
-0.04977339133620262,
-0.02361094392836094,
0.04630791395902634,
0.033531349152326584,
-0.013471567071974277,
0.015328072011470795,
-0.016537180170416832,
-0.04520353302359581,
0.043261341750621796,
-0.03922463208436966,
0.012252937071025372,
-0.022392313927412033,
0.03882477059960365,
0.003793935989961028,
-0.031303539872169495,
-0.057808730751276016,
-0.030027788132429123,
0.018593618646264076,
-0.0002927566529251635,
0.0354735404253006,
-0.038196414709091187,
-0.03530216962099075,
-0.014690196141600609,
-0.017108414322137833,
-0.028028475120663643,
0.0041200146079063416,
-0.02136409655213356,
0.00030495485407300293,
0.0481739416718483,
0.018346084281802177,
0.049125995486974716,
-0.036920659244060516,
-0.006711982190608978,
-0.05917968600988388,
0.08431392163038254,
-0.0444038063287735,
0.00005258611781755462,
0.048554763197898865,
0.008430439978837967,
-0.0417761355638504,
0.005379105918109417,
-0.07544077187776566,
-0.03701586648821831,
-0.0044437129981815815,
-0.0563616082072258,
0.003663028357550502,
-0.03250312805175781,
-0.018050948157906532,
0.05834187939763069,
0.0021087999921292067,
0.003558302531018853,
-0.012119649909436703,
-0.001113308360800147,
-0.018231837078928947,
-0.0013435864821076393,
0.06245475262403488,
-0.027628611773252487,
0.02572450414299965,
-0.05247722566127777,
-0.0008913607452996075,
-0.04352791607379913,
0.004496075678616762,
0.005064928438514471,
-0.005241058301180601,
-0.03177956864237785,
0.008658932521939278,
0.07951556146144867,
0.02993258275091648,
-0.042918603867292404,
-0.01737498864531517,
0.05613311380147934,
0.10274568945169449,
-0.03313148394227028,
-0.033988334238529205,
0.0401386059820652,
0.02899957075715065,
-0.0031727205496281385,
0.015994509682059288,
-0.013385881669819355,
0.018250878900289536,
0.03697778284549713,
-0.06523475050926208,
0.06234050914645195,
-0.045736681669950485,
-0.022373273968696594,
-0.02231615036725998,
-0.03166532143950462,
-0.028447378426790237,
-0.009834719821810722,
-0.04230928793549538,
0.0359686054289341,
-0.0688144788146019,
0.02913285791873932,
-0.04676490277051926,
-0.0035345011856406927,
-0.0030679944902658463,
-0.03718723729252815,
-0.02324916236102581,
0.007078522816300392,
0.010320267640054226,
0.014204648323357105,
0.004153336398303509,
0.05106818675994873,
0.052591472864151,
0.028599707409739494,
-0.03122737631201744,
-0.022220944985747337,
0.008339994587004185,
-0.06927146017551422,
-0.01586122252047062,
-0.018403207883238792,
0.01297649834305048,
-0.04394682124257088,
0.06070297583937645,
0.03532120957970619,
0.039757780730724335,
-0.01972656324505806,
0.004748370032757521,
-0.0075735910795629025,
0.009192083030939102,
0.0434136688709259,
-0.023420533165335655,
0.019669439643621445,
0.01948854885995388,
0.024505874142050743,
-0.007859207689762115,
-0.00631687929853797,
0.02745724283158779,
-0.0167942363768816,
-0.010453554801642895,
0.0824098065495491,
0.008854104205965996,
-0.005298181436955929,
-0.002248037839308381,
0.00035791288246400654,
0.06687228381633759,
-0.020526288077235222,
0.003217943012714386,
-0.005512393545359373,
-0.043489836156368256,
0.06397803872823715,
-0.009939445182681084,
0.009415815584361553,
0.07883008569478989,
0.04428955912590027,
-0.0036035249941051006,
-0.07098516076803207,
-0.007406981661915779,
-0.014014237560331821,
-0.0012329102028161287,
-0.04904983192682266,
-0.010501157492399216,
-0.03052285686135292,
-0.04238545149564743,
0.004753130488097668,
-0.02231615036725998,
-0.0006777435773983598,
0.04946873337030411,
0.01667998917400837,
-0.0056361607275903225,
0.05567612871527672,
-0.004998284392058849,
0.03029436431825161,
0.0013102645752951503,
0.010348828509449959,
0.0008151963702403009,
0.004596041515469551,
-0.005388626828789711,
0.011786431074142456,
-0.005226777400821447,
-0.004660305101424456,
0.016165880486369133,
0.0194980688393116,
-0.023325327783823013,
0.019536152482032776,
-0.0676720142364502,
0.02572450414299965,
-0.003829638008028269,
-0.026847928762435913,
-0.031303539872169495,
-0.05034462362527847,
-0.008644651621580124,
-0.034216828644275665,
-0.06458735466003418,
0.015404236502945423,
-0.025419846177101135,
0.03808216750621796,
0.027552448213100433,
0.05141092464327812,
-0.05034462362527847,
-0.10350733250379562,
-0.01750827580690384,
0.017793891951441765,
-0.026714639738202095,
-0.005117291118949652,
0.04394682124257088,
-0.03402641788125038,
-0.07509803026914597,
-0.03882477059960365,
0.040557507425546646,
0.06245475262403488,
-0.010082254186272621,
-0.0178605355322361,
-0.06283557415008545,
0.04029093310236931,
-0.014233210124075413,
-0.0008633941179141402,
-0.04436572641134262,
-0.018860192969441414,
0.035854361951351166,
-0.020164508372545242,
0.05331503227353096,
0.036920659244060516,
-0.02193532884120941,
0.06706269830465317,
-0.07852543145418167,
0.036806415766477585,
0.0909402146935463,
0.017041770741343498,
0.0262957364320755,
0.028809159994125366,
0.04451805353164673,
-0.008416159078478813,
0.027628611773252487,
-0.01926005631685257,
-0.029437515884637833,
0.010415473021566868,
0.012938416562974453,
-0.05506681278347969,
-0.04535586014389992,
0.06877639144659042,
-0.04508928582072258,
0.04695531353354454,
0.005674242973327637,
-0.011310403235256672,
-0.006050304509699345,
-0.07106132060289383,
0.013642936013638973,
0.045622434467077255,
-0.010424993000924587,
0.038805726915597916,
0.04234737157821655,
-0.05163941904902458,
-0.012890813872218132,
-0.03452148288488388,
0.009358692914247513,
0.009834719821810722,
0.022449437528848648,
0.00857324805110693,
-0.00324412458576262,
-0.008325713686645031,
0.007078522816300392,
-0.049011748284101486,
-0.07951556146144867,
-0.032826829701662064,
0.02524847723543644,
-0.020393000915646553,
-0.010244103148579597,
0.0018291340675204992,
-0.01262423861771822,
-0.03191285580396652,
-0.045393943786621094,
0.014299853704869747,
0.07075666636228561,
0.025324640795588493,
-0.028961488977074623,
0.038329701870679855,
0.012405266053974628,
-0.029304226860404015,
-0.0003281611716374755,
-0.0357210710644722,
-0.015289990231394768,
-0.06588214635848999,
-0.04318517819046974,
0.006892872042953968,
0.05122051388025284,
-0.0018422248540446162,
0.08279062807559967,
0.0530865415930748,
-0.06656762957572937,
0.0411287397146225,
0.009173042140901089,
0.01889827474951744,
-0.05064928159117699,
-0.0005685548530891538,
-0.0007675936794839799,
0.014947250485420227,
-0.0021837742533534765,
-0.02100231498479843,
-0.0359686054289341,
-0.013585813343524933,
0.04288052022457123,
-0.03625422343611717,
-0.02370614930987358,
-0.019155330955982208,
-0.00663581769913435,
0.10541144013404846,
0.01865074224770069,
-0.0843900814652443,
0.015109099447727203,
-0.03052285686135292,
0.014594990760087967,
0.05556188151240349,
-0.04531778022646904,
0.01409992203116417,
0.039034221321344376,
0.027628611773252487,
0.040100522339344025,
0.021782999858260155,
0.027857106178998947,
0.016594303771853447,
0.00815434381365776,
-0.05167750269174576,
-0.056285444647073746,
-0.06367338448762894,
0.005012565292418003,
-0.02193532884120941,
-0.053010378032922745,
-0.006764344871044159,
0.04870709031820297,
-0.02745724283158779,
0.003908182494342327,
-0.02184012345969677,
0.04592709243297577,
-0.007449823897331953,
-0.004922119900584221,
-0.014118963852524757,
0.02749532461166382,
-0.03332189470529556,
-0.03945312649011612,
-0.0343310721218586,
0.0338360071182251,
0.0678243413567543,
0.05487640202045441,
-0.07966789603233337,
0.011148554272949696,
0.004367548506706953,
-0.02111656218767166,
-0.03379792347550392,
-0.0002049891627393663,
0.037377648055553436,
-0.05613311380147934,
0.021535465493798256,
-0.0709470808506012,
0.0035083196125924587,
-0.004381829407066107,
-0.08819829672574997,
0.03149395063519478,
0.005479071754962206,
0.03052285686135292,
0.019916974008083344,
0.02429642342031002,
0.03438819572329521,
0.042804356664419174,
0.0094015346840024,
-0.02079286240041256,
0.012091088108718395,
-0.025400806218385696,
0.05986516550183296,
0.010548760183155537,
0.013909511268138885,
-0.025172311812639236,
-0.027323955669999123,
0.0005373155581764877,
-0.013633416034281254,
0.016403893008828163,
-0.031075049191713333,
0.013128827325999737,
-0.01543279830366373,
-0.006592974998056889,
0.03252217173576355,
0.005931297317147255,
0.015927866101264954,
-0.011224718764424324,
-0.009901363402605057,
0.03589244186878204,
0.03391217067837715,
-0.011253280565142632,
0.04611750319600105,
-0.012462389655411243,
-0.017660604789853096,
-0.020754780620336533,
0.08873145282268524,
0.028104638680815697,
-0.007368899416178465,
0.039872027933597565,
-0.009787117131054401,
-0.03275066241621971,
0.021516423672437668,
0.02770477719604969,
-0.02020259015262127,
-0.03754901513457298,
0.015128141269087791,
0.023458614945411682,
-0.05579037591814995,
0.014404579997062683,
0.05411475896835327,
0.005788489244878292,
-0.03554970398545265,
0.016127798706293106,
-0.030256282538175583,
0.0198217686265707,
-0.04059559106826782,
0.0014506925363093615,
-0.0014863945543766022,
-0.018488891422748566,
-0.0069261942990124226,
0.016718070954084396,
0.004710288252681494,
0.011938759125769138,
0.0389961376786232,
0.03029436431825161,
-0.0846947431564331,
-0.012786087580025196,
0.08309528976678848,
0.003396453335881233,
-0.014537867158651352,
0.02593395672738552,
0.012767046689987183,
-0.045051202178001404,
-0.09033089876174927,
-0.024029847234487534,
0.053962431848049164,
0.0719372108578682,
0.015442319214344025,
-0.019669439643621445,
-0.026333818212151527,
-0.05567612871527672,
-0.020945191383361816,
-0.0003900447045452893,
-0.05331503227353096,
0.0021230808924883604,
0.03730148449540138,
0.018641220405697823,
0.017098892480134964,
-0.006497769616544247,
-0.038805726915597916,
0.07723063230514526,
0.016946563497185707,
-0.014414099976420403,
0.05003996938467026,
0.00024277382181026042,
0.022011492401361465,
-0.0650443434715271,
0.06393995881080627,
0.010358349420130253,
-0.020945191383361816,
-0.034921348094940186,
0.008673213422298431,
0.01574697531759739,
-0.027742858976125717,
0.025058066472411156,
-0.0077021182514727116,
0.034578606486320496,
0.013176430016756058,
-0.006535851862281561,
0.05487640202045441,
-0.03897709771990776,
0.010006089694797993,
-0.020354919135570526,
-0.035778194665908813,
-0.00809722114354372,
0.004888798110187054,
0.016718070954084396,
0.0071451663970947266,
0.0645492747426033,
-0.0584942102432251,
-0.012129169888794422,
-0.018622180446982384,
-0.0335884727537632,
0.003156059654429555,
0.03122737631201744,
-0.05674242973327637,
-0.01444266177713871,
-0.018764987587928772,
0.009701431728899479,
-0.02479149028658867,
-0.09901363402605057,
0.012881292961537838,
0.0027561967726796865,
0.020507246255874634,
0.017765330150723457,
-0.05438133329153061,
0.05925585329532623,
-0.004486555233597755,
-0.017289303243160248,
0.0232682041823864,
0.01596594788134098,
0.06211201474070549,
-0.041966550052165985,
-0.027971351519227028,
0.022011492401361465,
0.008201946504414082,
-0.04428955912590027,
0.0045317779295146465,
0.035283129662275314,
-0.004819774068892002,
0.013033621944487095,
-0.03360751271247864,
0.02901861071586609,
-0.024658203125,
0.07327008992433548
]
|
41,548 | pyglove.core.object_utils.formatting | format | Formats a (maybe) hierarchical value with flags.
Args:
value: The value to format.
compact: If True, this object will be formatted into a single line.
verbose: If True, this object will be formatted with verbosity.
Subclasses should define `verbosity` on their own.
root_indent: The start indent level for this object if the output is a
multi-line string.
list_wrap_threshold: A threshold in number of characters for wrapping a
list value in a single line.
strip_object_id: If True, format object as '<class-name>(...)' other than
'object at <address>'.
include_keys: A set of keys to include from the top-level dict or object.
exclude_keys: A set of keys to exclude from the top-level dict or object.
Applicable only when `include_keys` is set to None.
**kwargs: Keyword arguments that will be passed through unto child
``Formattable`` objects.
Returns:
A string representation for `value`.
| def format(value: Any, # pylint: disable=redefined-builtin
compact: bool = False,
verbose: bool = True,
root_indent: int = 0,
list_wrap_threshold: int = 80,
strip_object_id: bool = False,
include_keys: Optional[Set[str]] = None,
exclude_keys: Optional[Set[str]] = None,
**kwargs) -> str:
"""Formats a (maybe) hierarchical value with flags.
Args:
value: The value to format.
compact: If True, this object will be formatted into a single line.
verbose: If True, this object will be formatted with verbosity.
Subclasses should define `verbosity` on their own.
root_indent: The start indent level for this object if the output is a
multi-line string.
list_wrap_threshold: A threshold in number of characters for wrapping a
list value in a single line.
strip_object_id: If True, format object as '<class-name>(...)' other than
'object at <address>'.
include_keys: A set of keys to include from the top-level dict or object.
exclude_keys: A set of keys to exclude from the top-level dict or object.
Applicable only when `include_keys` is set to None.
**kwargs: Keyword arguments that will be passed through unto child
``Formattable`` objects.
Returns:
A string representation for `value`.
"""
exclude_keys = exclude_keys or set()
def _indent(text, indent: int) -> str:
return ' ' * 2 * indent + text
def _should_include_key(key: str) -> bool:
if include_keys:
return key in include_keys
return key not in exclude_keys
def _format_child(v):
return format(v, compact=compact, verbose=verbose,
root_indent=root_indent + 1,
list_wrap_threshold=list_wrap_threshold,
strip_object_id=strip_object_id,
**kwargs)
if isinstance(value, common_traits.Formattable):
return value.format(compact=compact,
verbose=verbose,
root_indent=root_indent,
list_wrap_threshold=list_wrap_threshold,
strip_object_id=strip_object_id,
include_keys=include_keys,
exclude_keys=exclude_keys,
**kwargs)
elif isinstance(value, (list, tuple)):
# Always try compact representation if length is not too long.
open_bracket, close_bracket = bracket_chars(
BracketType.SQUARE if isinstance(value, list) else BracketType.ROUND)
s = [open_bracket]
s.append(', '.join([_format_child(elem) for elem in value]))
s.append(close_bracket)
s = [''.join(s)]
if not compact and len(s[-1]) > list_wrap_threshold:
s = [f'{open_bracket}\n']
s.append(',\n'.join([
_indent(_format_child(elem), root_indent + 1)
for elem in value
]))
s.append('\n')
s.append(_indent(close_bracket, root_indent))
elif isinstance(value, dict):
if compact or not value:
s = ['{']
s.append(', '.join([
f'{k!r}: {_format_child(v)}'
for k, v in value.items() if _should_include_key(k)
]))
s.append('}')
else:
s = ['{\n']
s.append(',\n'.join([
_indent(f'{k!r}: {_format_child(v)}', root_indent + 1)
for k, v in value.items() if _should_include_key(k)
]))
s.append('\n')
s.append(_indent('}', root_indent))
else:
if isinstance(value, str):
s = [repr(value)]
else:
s = [repr(value) if compact else str(value)]
if strip_object_id and 'object at 0x' in s[-1]:
s = [f'{value.__class__.__name__}(...)']
return ''.join(s)
| (value: Any, compact: bool = False, verbose: bool = True, root_indent: int = 0, list_wrap_threshold: int = 80, strip_object_id: bool = False, include_keys: Optional[Set[str]] = None, exclude_keys: Optional[Set[str]] = None, **kwargs) -> str | [
0.04187146946787834,
-0.041441820561885834,
-0.009755036793649197,
-0.04730070009827614,
0.02628684602677822,
-0.02093573473393917,
-0.0014219993026927114,
-0.05034731701016426,
0.018924186006188393,
-0.04804282635450363,
-0.026970382779836655,
0.03111065924167633,
0.00027661852072924376,
-0.029157698154449463,
0.01120022777467966,
0.04230112209916115,
-0.0006121310289017856,
-0.026482142508029938,
0.09241408109664917,
0.04335571825504303,
0.08741450309753418,
-0.0030905597377568483,
0.02158021181821823,
0.02581813558936119,
0.02693132311105728,
-0.0626119077205658,
0.03859049826860428,
0.010946342721581459,
-0.05569842830300331,
0.016268160194158554,
0.008344023488461971,
0.005429229699075222,
-0.012889537960290909,
-0.008900617249310017,
-0.028376514092087746,
-0.04581645131111145,
-0.06393992155790329,
0.033200327306985855,
-0.055503133684396744,
-0.0214044451713562,
-0.044918086379766464,
0.0105557506904006,
-0.06370556354522705,
-0.047730352729558945,
0.0010307969059795141,
0.053550172597169876,
0.051675330847501755,
0.06686936318874359,
-0.04464467242360115,
-0.015750626102089882,
0.029860764741897583,
-0.03116924688220024,
-0.03075912594795227,
-0.0015867803012952209,
-0.07534521073102951,
-0.04007474705576897,
-0.0017918411176651716,
-0.008666262030601501,
0.049136482179164886,
-0.02058420144021511,
-0.002839116146788001,
0.08319611102342606,
0.006073706783354282,
0.009686683304607868,
-0.0601121187210083,
-0.05023014172911644,
-0.01975419372320175,
0.015213561244308949,
-0.03941074013710022,
-0.01090728398412466,
-0.02964593842625618,
-0.011063520796597004,
0.040621574968099594,
-0.005800292361527681,
-0.016336513683199883,
0.002914793323725462,
-0.022087981924414635,
0.026911793276667595,
0.00138171948492527,
-0.057377975434064865,
-0.010868224315345287,
0.001086944481357932,
-0.00626412034034729,
-0.03409868851304054,
0.03777025267481804,
0.018269944936037064,
-0.0005422516260296106,
0.045972686260938644,
0.05897940322756767,
0.077844999730587,
-0.02540801465511322,
0.00028333181398920715,
0.012664947658777237,
0.027380503714084625,
-0.04730070009827614,
0.025603311136364937,
0.034567397087812424,
-0.053081464022397995,
0.0010899959597736597,
0.012928597629070282,
0.05983870476484299,
-0.04351195693016052,
-0.004093893337994814,
-0.01432496402412653,
-0.03954744711518288,
-0.022341866046190262,
-0.02657978981733322,
0.034215863794088364,
0.05046449601650238,
0.0433947779238224,
-0.06218225881457329,
-0.07940737158060074,
-0.008358670398592949,
-0.045738331973552704,
0.030095119029283524,
-0.003803390311077237,
-0.0552687793970108,
-0.018504299223423004,
0.029899822548031807,
-0.10288195312023163,
-0.003063706448301673,
-0.015037794597446918,
-0.000011881780665135011,
-0.002619408071041107,
-0.03823896497488022,
0.014217551797628403,
-0.024099530652165413,
0.036852363497018814,
0.016502514481544495,
0.032321494072675705,
0.00466269301250577,
0.019422190263867378,
-0.04585551097989082,
-0.03607117757201195,
0.05909658223390579,
0.01786958798766136,
-0.010809635743498802,
-0.023845646530389786,
-0.017635231837630272,
0.047144461423158646,
0.05546407401561737,
-0.07034563273191452,
0.026540732011198997,
-0.01946124993264675,
-0.02193174511194229,
-0.017986765131354332,
0.06425239890813828,
0.047144461423158646,
-0.03298550099134445,
0.030856773257255554,
0.0008007137221284211,
0.020330317318439484,
0.06999409943819046,
-0.0006054177065379918,
0.014276140369474888,
-0.04136370122432709,
-0.015926390886306763,
-0.0762435719370842,
0.06647877395153046,
-0.005116756074130535,
0.022322336211800575,
0.0102628068998456,
0.019734663888812065,
-0.004921460058540106,
0.00742613198235631,
0.03528999537229538,
-0.017576642334461212,
-0.016727104783058167,
-0.02575954794883728,
-0.0089982645586133,
0.002325243316590786,
-0.028435103595256805,
-0.03671565651893616,
0.07487650215625763,
0.009696448221802711,
0.02640402317047119,
-0.030778655782341957,
0.0338643342256546,
-0.046089865267276764,
-0.023630820214748383,
-0.055503133684396744,
-0.016033804044127464,
0.01235247403383255,
0.007689781486988068,
-0.009750154800713062,
-0.030309945344924927,
0.04292606934905052,
-0.03304408863186836,
0.05362829193472862,
-0.003129618940874934,
-0.0031637956853955984,
-0.022810576483607292,
0.02888428419828415,
0.017186051234602928,
-0.025427544489502907,
-0.015369798056781292,
-0.0005480495165102184,
-0.06667406857013702,
0.027380503714084625,
0.01403202023357153,
-0.07104869931936264,
-0.0276343896985054,
0.024040941148996353,
-0.05862786993384361,
0.00502887275069952,
0.0008165815379470587,
0.004535750485956669,
-0.023259757086634636,
-0.03581729158759117,
0.028571810573339462,
-0.02292775548994541,
-0.037906959652900696,
-0.02823980711400509,
-0.004836018197238445,
0.007655604742467403,
-0.03441116213798523,
0.08061820268630981,
-0.0036178589798510075,
-0.06393992155790329,
0.02240045554935932,
0.001175438053905964,
0.0009642741642892361,
-0.001618515932932496,
0.01388554833829403,
-0.03224337473511696,
0.007953431457281113,
0.031618427485227585,
-0.015731096267700195,
0.048316240310668945,
-0.03212619945406914,
0.05023014172911644,
-0.06093236431479454,
-0.03612976521253586,
0.03316126763820648,
-0.012870009057223797,
-0.010106570087373257,
0.028337454423308372,
-0.04452749714255333,
0.017439935356378555,
-0.010594810359179974,
0.029040521010756493,
-0.06007305905222893,
0.0035421818029135466,
-0.01403202023357153,
0.022849636152386665,
-0.05698738247156143,
-0.0011437024222686887,
-0.001229144399985671,
0.014735085889697075,
0.01109281461685896,
0.023025402799248695,
0.026657909154891968,
0.03806319832801819,
-0.023044932633638382,
-0.03792649134993553,
-0.022029392421245575,
-0.024919774383306503,
-0.014569084160029888,
0.014510495588183403,
0.008861557580530643,
-0.038317080587148666,
-0.07639981061220169,
-0.035153284668922424,
0.05312051996588707,
0.019256189465522766,
0.018621476367115974,
0.006386180408298969,
-0.03859049826860428,
0.006156707648187876,
0.03528999537229538,
-0.07034563273191452,
-0.03886391222476959,
0.007787429261952639,
0.03392292186617851,
-0.06702560186386108,
0.029372524470090866,
0.04499620571732521,
0.007123422808945179,
-0.007865548133850098,
-0.002024975838139653,
-0.022127041593194008,
-0.024158120155334473,
-0.036676596850156784,
-0.03905920684337616,
0.0464804582297802,
0.029196757823228836,
-0.023025402799248695,
-0.0011998499976471066,
-0.009945450350642204,
0.03154030814766884,
0.07054092735052109,
-0.025798605754971504,
-0.01287977397441864,
-0.014373788610100746,
0.029099108651280403,
0.0014281022595241666,
-0.02675555646419525,
-0.059369996190071106,
0.01249894592911005,
-0.05886222422122955,
0.02663837932050228,
0.0046846638433635235,
0.08272740244865417,
0.006796301808208227,
0.025388484820723534,
0.009784331545233727,
-0.006625418085604906,
-0.025954842567443848,
-0.005312052089720964,
0.010672928765416145,
-0.00897385273128748,
0.031130187213420868,
0.06101047992706299,
-0.026599319651722908,
0.02482212521135807,
-0.027849214151501656,
-0.020662320777773857,
-0.04245735704898834,
0.015389327891170979,
0.028220277279615402,
-0.02187315560877323,
-0.013602368533611298,
-0.05065979063510895,
0.027321916073560715,
0.06269002705812454,
-0.05417511984705925,
0.030075589194893837,
0.010838929563760757,
0.02894287183880806,
-0.013758605346083641,
-0.00611764844506979,
-0.03087630309164524,
0.019842077046632767,
0.04198864847421646,
-0.002878175349906087,
-0.009374209679663181,
0.02236139588057995,
0.013328954577445984,
-0.07526709139347076,
-0.032907381653785706,
0.04847247526049614,
0.05651867389678955,
-0.000332613562932238,
-0.010272571817040443,
-0.039078738540410995,
-0.009095912799239159,
0.07253294438123703,
0.020564673468470573,
0.03204808011651039,
0.030544299632310867,
-0.011971646919846535,
0.011141639202833176,
0.015867803245782852,
-0.0017491200705990195,
-0.026443082839250565,
-0.054018884897232056,
-0.011209992691874504,
-0.056674908846616745,
-0.014696026220917702,
0.007308953907340765,
0.03564152494072914,
-0.020388906821608543,
0.03380574285984039,
0.018728889524936676,
0.03228243440389633,
-0.03618835657835007,
-0.034918930381536484,
-0.057963863015174866,
0.04409784451127052,
0.009984510019421577,
-0.02841557376086712,
-0.010311630554497242,
0.05995588377118111,
-0.07382190227508545,
-0.0069671859964728355,
0.03741871938109398,
0.03989898040890694,
0.023435523733496666,
-0.03894202783703804,
0.006464298814535141,
0.04972236976027489,
0.04921460151672363,
0.017615702003240585,
0.00015761000395286828,
-0.04257453605532646,
0.0010735179530456662,
0.060502711683511734,
0.008036431856453419,
0.0034152395091950893,
-0.028435103595256805,
-0.03538764268159866,
0.01208882499486208,
0.0309348925948143,
0.002656026044860482,
-0.03946932777762413,
0.016307219862937927,
0.023689409717917442,
-0.005292522720992565,
-0.02982170507311821,
-0.0032345906365662813,
0.058315396308898926,
-0.04269171506166458,
0.01299695111811161,
-0.02210751175880432,
0.0013231306802481413,
-0.054018884897232056,
0.07655604928731918,
0.004162246827036142,
-0.01623886451125145,
0.045035265386104584,
0.04909742251038551,
-0.03905920684337616,
-0.05065979063510895,
0.01546744629740715,
0.029099108651280403,
-0.041441820561885834,
-0.0589403435587883,
0.07886053621768951,
-0.07405626028776169,
-0.027048500254750252,
0.018084412440657616,
-0.019480779767036438,
-0.027614859864115715,
0.045191504061222076,
0.001319468836300075,
-0.02511507086455822,
-0.025779075920581818,
-0.00867602601647377,
0.06464298814535141,
0.0033102678135037422,
0.000620064907707274,
-0.04901930317282677,
0.03157936781644821,
-0.0008031549514271319,
-0.024099530652165413,
-0.018973009660840034,
0.020154550671577454,
-0.03818037360906601,
0.038492847234010696,
0.01917807012796402,
0.01593615673482418,
0.008431905880570412,
0.011063520796597004,
-0.009652506560087204,
0.03480175510048866,
0.04909742251038551,
-0.00852955412119627,
0.03116924688220024,
0.027927333489060402,
-0.002271536970511079,
0.055425014346838,
-0.04323854297399521,
0.00947185792028904,
0.022634809836745262,
-0.0505816750228405,
-0.04593362659215927,
-0.016482984647154808,
0.05589372664690018,
0.018514065071940422,
0.008754144422709942,
0.0216973889619112,
0.013123893178999424,
0.01105375587940216,
0.013133658096194267,
-0.021892685443162918,
0.025154128670692444,
0.00389615586027503,
0.017273934558033943,
-0.04034816101193428,
-0.039020147174596786,
0.04175429418683052,
-0.01282118447124958,
-0.019324542954564095,
0.08264928311109543,
0.039664626121520996,
0.05362829193472862,
0.01235247403383255,
-0.053745467215776443,
-0.09217973053455353,
-0.025271307677030563,
0.016727104783058167,
-0.04523056000471115,
-0.018611712381243706,
-0.04409784451127052,
0.005370641127228737,
0.02087714709341526,
0.05011296272277832,
0.021716918796300888,
0.040035687386989594,
0.000809257966466248,
-0.056909263134002686,
0.021384915336966515,
-0.06112765893340111,
-0.004328248556703329,
0.021541152149438858,
0.007557956501841545,
-0.011307640001177788,
-0.08249304443597794,
-0.018084412440657616,
-0.016561103984713554,
0.04194958880543709,
-0.004877518396824598,
0.017391111701726913,
0.013036010786890984,
0.006303179543465376,
-0.007929018698632717,
0.06464298814535141,
0.06909573823213577,
0.004687104839831591,
-0.026950852945446968,
0.00020994323131162673,
0.020447494462132454,
0.039742741733789444,
0.02210751175880432,
-0.04976142942905426,
0.007411484606564045,
-0.026501672342419624,
-0.002201962750405073,
0.024919774383306503,
-0.03880532085895538,
-0.024451063945889473,
0.018836302682757378,
-0.0038863911759108305,
0.02759533002972603,
-0.012323180213570595,
-0.0005739872576668859,
0.030954422429203987,
0.0052876402623951435,
-0.0034030333627015352,
-0.027028970420360565,
0.028220277279615402,
0.01594592072069645,
0.012098588980734348,
0.027302386239171028,
0.000071862836193759,
0.016199806705117226,
-0.021853625774383545,
0.02128726802766323,
-0.015965450555086136,
0.007548191584646702,
0.08061820268630981,
0.057729508727788925,
0.007372425403445959,
-0.025271307677030563,
0.030192766338586807,
0.01910971663892269,
0.06640065461397171,
-0.0015123236225917935,
0.01285047922283411,
-0.009725742973387241,
-0.0005028872983530164,
-0.005326699465513229,
0.049331776797771454,
0.0708143413066864,
0.007880195043981075,
-0.026364965364336967,
0.017898881807923317,
0.017098167911171913,
0.022087981924414635,
0.00399868655949831,
0.01976395957171917,
0.06542417407035828,
0.008978735655546188,
-0.0744859054684639,
0.04581645131111145,
0.032321494072675705,
-0.01043857354670763,
0.025954842567443848,
0.025427544489502907,
0.03933262079954147,
-0.049331776797771454,
0.00362518266774714,
-0.0025046716909855604,
-0.01008704025298357,
0.0031442660838365555,
0.03591494262218475,
-0.07112681865692139,
0.03911779448390007,
-0.005106991156935692,
-0.008055961690843105,
-0.036207884550094604,
-0.029392052441835403,
0.05874504894018173,
-0.04944895580410957,
0.06116671860218048,
0.036325063556432724,
0.0589403435587883,
0.03601258993148804,
-0.01156152505427599,
-0.009901508688926697,
-0.02341599389910698,
-0.0017454583430662751,
0.03765307739377022,
0.009139854460954666,
0.052495572715997696,
0.008500260300934315,
-0.00641059223562479,
-0.026364965364336967,
0.02794686332345009,
0.00410365778952837,
-0.04409784451127052,
0.024333886802196503,
0.003988921642303467,
0.07518897205591202,
0.011991176754236221,
0.022166099399328232,
0.09452328085899353,
-0.01952960342168808,
0.008339140564203262,
-0.024841655045747757,
0.01593615673482418,
0.07112681865692139,
-0.021033383905887604,
-0.04788658767938614,
-0.02505648136138916,
-0.02046702429652214,
0.004970284178853035,
0.0033908274490386248,
-0.03927403315901756,
-0.06972068548202515,
0.06390086561441422,
0.00247171544469893,
-0.08921122550964355,
-0.003205296117812395,
-0.029489701613783836,
0.008016902022063732,
-0.03964509442448616,
0.0006182339857332408,
-0.024861184880137444,
-0.06839267164468765,
0.034020569175481796,
0.02952876128256321,
-0.03029041551053524,
0.013084834441542625,
-0.09342962503433228,
-0.020017843693494797,
0.013084834441542625,
0.0014244404155761003,
-0.04894118756055832,
0.04487903043627739,
-0.013455896638333797,
-0.07671228051185608,
-0.04683198779821396,
0.07698569446802139,
-0.05378452688455582,
-0.01467649731785059,
-0.004159805364906788,
-0.050503555685281754,
-0.022634809836745262,
0.057963863015174866,
-0.018367592245340347,
0.037848372012376785,
-0.05358923226594925,
-0.05370641127228737,
-0.009037324227392673,
0.0626119077205658,
0.04921460151672363,
0.020427964627742767,
-0.055151600390672684,
0.04241829738020897,
0.005272992886602879,
-0.04370725154876709,
-0.02329881675541401,
0.038492847234010696,
0.0006676682969555259,
-0.00446739699691534,
-0.014901087619364262,
0.04140276089310646,
0.08858627825975418,
-0.013446131721138954,
-0.026364965364336967,
0.0068695382215082645,
-0.009237502701580524,
0.04460561275482178,
-0.08272740244865417,
-0.03659847751259804,
-0.006898832507431507,
0.12444263696670532,
-0.006830479018390179,
-0.07479838281869888,
0.019217129796743393,
-0.016375573351979256,
-0.04347289726138115,
0.02593531273305416,
-0.003280973294749856,
-0.056909263134002686,
-0.007245482876896858,
-0.012450122274458408,
-0.01023351214826107,
-0.03821943327784538,
-0.003027088474482298,
-0.04917554184794426,
-0.020213140174746513,
-0.040504395961761475,
-0.043433837592601776,
-0.012743066065013409,
-0.0008855454507283866,
0.05722173675894737,
0.061322953552007675,
-0.017908645793795586,
0.020545143634080887,
0.01270400732755661,
0.024021413177251816,
0.021541152149438858,
0.043551016598939896,
0.008480730466544628,
0.020506083965301514,
-0.0038351258262991905,
0.04534773901104927,
0.009242384694516659,
0.0015318532241508365,
0.11459971219301224,
-0.021384915336966515,
-0.028845224529504776,
-0.043785370886325836,
-0.04499620571732521,
-0.0012059530708938837,
0.0087053207680583,
0.018221119418740273,
-0.009701330214738846,
-0.00873461551964283,
0.07464214414358139,
0.03177466616034508,
-0.014705791138112545,
0.019265953451395035,
0.040035687386989594,
0.041793350130319595,
0.023396465927362442,
-0.027673447504639626,
-0.028454631567001343,
0.023669879883527756,
0.044683732092380524,
-0.03300502896308899,
-0.01716652140021324,
0.04093404859304428,
0.0208185575902462,
-0.0447227917611599,
0.005233933683484793,
-0.0004726774350274354,
-0.008344023488461971,
0.024451063945889473,
0.05554219335317612,
-0.029274875298142433,
-0.01364142820239067,
-0.016727104783058167,
-0.00900314748287201,
0.03794601932168007,
0.059448111802339554,
-0.009833155199885368,
0.01223529689013958,
-0.015916626900434494,
0.0006127413362264633,
-0.03501657769083977,
-0.006859773304313421,
0.09257031977176666,
0.007709310855716467,
-0.07159552723169327,
0.019969020038843155,
0.02689226344227791,
-0.042496416717767715,
-0.028552280738949776,
-0.06768960505723953,
-0.004269659519195557,
0.023103520274162292,
0.028806164860725403,
0.04687104746699333,
-0.04730070009827614,
0.015399092808365822
]
|
41,549 | pyglove.core.symbolic.base | from_json | Deserializes a (maybe) symbolic value from JSON value.
Example::
@pg.members([
('x', pg.typing.Any())
])
class A(pg.Object):
pass
a1 = A(1)
json = a1.to_json()
a2 = pg.from_json(json)
assert pg.eq(a1, a2)
Args:
json_value: Input JSON value.
allow_partial: Whether to allow elements of the list to be partial.
root_path: KeyPath of loaded object in its object tree.
force_dict: If True, "_type" keys will be stripped before loading. As a
result, JSONConvertible objects will be returned as dict.
**kwargs: Allow passing through keyword arguments to from_json of specific
types.
Returns:
Deserialized value, which is
* pg.Dict for dict.
* pg.List for list.
* symbolic.Object for dict with '_type' property.
* value itself.
| def from_json(json_value: Any,
*,
allow_partial: bool = False,
root_path: Optional[object_utils.KeyPath] = None,
force_dict: bool = False,
**kwargs) -> Any:
"""Deserializes a (maybe) symbolic value from JSON value.
Example::
@pg.members([
('x', pg.typing.Any())
])
class A(pg.Object):
pass
a1 = A(1)
json = a1.to_json()
a2 = pg.from_json(json)
assert pg.eq(a1, a2)
Args:
json_value: Input JSON value.
allow_partial: Whether to allow elements of the list to be partial.
root_path: KeyPath of loaded object in its object tree.
force_dict: If True, "_type" keys will be stripped before loading. As a
result, JSONConvertible objects will be returned as dict.
**kwargs: Allow passing through keyword arguments to from_json of specific
types.
Returns:
Deserialized value, which is
* pg.Dict for dict.
* pg.List for list.
* symbolic.Object for dict with '_type' property.
* value itself.
"""
assert Symbolic.DictType is not None
if isinstance(json_value, Symbolic):
return json_value
if force_dict:
json_value = object_utils.json_conversion.strip_types(json_value)
kwargs.update({
'allow_partial': allow_partial,
'root_path': root_path,
})
if isinstance(json_value, list):
if (json_value
and json_value[0] == object_utils.JSONConvertible.TUPLE_MARKER):
if len(json_value) < 2:
raise ValueError(
object_utils.message_on_path(
f'Tuple should have at least one element '
f'besides \'{object_utils.JSONConvertible.TUPLE_MARKER}\'. '
f'Encountered: {json_value}', root_path))
return tuple([
from_json(v, allow_partial=allow_partial,
root_path=object_utils.KeyPath(i, root_path))
for i, v in enumerate(json_value[1:])
])
return Symbolic.ListType(json_value, **kwargs) # pytype: disable=not-callable # pylint: disable=not-callable
elif isinstance(json_value, dict):
if object_utils.JSONConvertible.TYPE_NAME_KEY not in json_value:
return Symbolic.DictType.from_json(json_value, **kwargs)
return object_utils.from_json(json_value, **kwargs)
return json_value
| (json_value: Any, *, allow_partial: bool = False, root_path: Optional[pyglove.core.object_utils.value_location.KeyPath] = None, force_dict: bool = False, **kwargs) -> Any | [
0.023403575643897057,
-0.009486064314842224,
0.008358419872820377,
-0.06002235785126686,
0.006770814768970013,
0.07691724598407745,
0.031969718635082245,
0.029417680576443672,
0.05796489864587784,
-0.04569929093122482,
0.014481333084404469,
0.07189229875802994,
-0.025006018579006195,
0.0021365901920944452,
-0.02595561370253563,
0.04162394255399704,
0.029753996059298515,
0.08427660912275314,
0.025896264240145683,
0.03464045748114586,
0.01604420877993107,
-0.012077669613063335,
-0.001093024155125022,
0.08039909601211548,
0.0024382846895605326,
-0.0944056287407875,
0.023364009335637093,
0.016716839745640755,
0.00830401573330164,
0.008971700444817543,
0.055313944816589355,
-0.013966969214379787,
0.04300876706838608,
0.00740387849509716,
-0.0014787974068894982,
-0.030584892258048058,
-0.029477030038833618,
0.07988473027944565,
-0.06971614807844162,
0.00821499153971672,
-0.011731462553143501,
-0.005989376455545425,
-0.045817989856004715,
-0.00830401573330164,
-0.008729355409741402,
0.02253311313688755,
-0.033789776265621185,
0.030842075124382973,
0.004762815311551094,
-0.018586356192827225,
0.004982904065400362,
-0.057213135063648224,
-0.0165585745126009,
0.006147642619907856,
-0.00512880552560091,
-0.03737054392695427,
-0.04577842354774475,
0.054918281733989716,
0.005089239217340946,
-0.006968647241592407,
0.026113878935575485,
0.012829432263970375,
-0.05202992632985115,
-0.041980039328336716,
0.013650436885654926,
-0.032068636268377304,
-0.021187853068113327,
-0.04383966326713562,
-0.021088935434818268,
-0.019694218412041664,
-0.09029071778059006,
0.03830035775899887,
0.04300876706838608,
0.03139600530266762,
0.050645098090171814,
-0.004710884299129248,
0.002999634016305208,
-0.0008605710463598371,
-0.022908994928002357,
-0.04241527244448662,
-0.004807327874004841,
-0.010455443523824215,
-0.037034228444099426,
-0.07003267854452133,
-0.10817477107048035,
0.06073455512523651,
0.006909297313541174,
0.026331495493650436,
0.05919146165251732,
0.034383274614810944,
-0.023304659873247147,
-0.05313778668642044,
-0.024531221017241478,
0.018635815009474754,
-0.019466709345579147,
-0.025282982736825943,
0.02625236287713051,
-0.050565965473651886,
-0.011098398827016354,
0.012423875741660595,
0.04740064963698387,
0.02122741937637329,
-0.040357813239097595,
-0.01670694723725319,
0.0028487867675721645,
-0.026845859363675117,
0.006038834806531668,
0.009728409349918365,
0.05495784804224968,
-0.00030880403937771916,
-0.0901324525475502,
-0.003511525457724929,
-0.007314853835850954,
-0.017429037019610405,
0.04554102197289467,
0.06219851225614548,
0.017963184043765068,
-0.0426526702940464,
0.024907100945711136,
-0.005697573535144329,
-0.0014553047949448228,
-0.0010256374953314662,
0.06457250565290451,
0.02524341642856598,
0.011128073558211327,
0.023482708260416985,
0.020178906619548798,
-0.046728018671274185,
0.011276448145508766,
0.052069492638111115,
0.03471959009766579,
0.07177360355854034,
-0.0047751800157129765,
0.04162394255399704,
0.01791372522711754,
0.008650222793221474,
-0.042494405061006546,
-0.010534576140344143,
-0.00560854934155941,
-0.024669703096151352,
0.023799240589141846,
0.00943660642951727,
0.02294856123626232,
-0.05927059426903725,
-0.040159981697797775,
-0.02514450065791607,
0.017349902540445328,
0.014451658353209496,
-0.0028834075201302767,
0.02597539685666561,
0.004812273662537336,
0.024867534637451172,
0.030387060716748238,
0.05337518826127052,
-0.04245483875274658,
-0.03665834665298462,
-0.018556680530309677,
-0.04656975343823433,
0.013195422478020191,
-0.019773351028561592,
0.022196797654032707,
0.0273602232336998,
-0.042296573519706726,
0.019793134182691574,
-0.025639081373810768,
0.006706519052386284,
0.04395836219191551,
-0.04423533007502556,
-0.019160069525241852,
-0.016835538670420647,
0.008961808867752552,
0.003509052563458681,
0.025817131623625755,
0.022453980520367622,
0.0349767729640007,
-0.024175122380256653,
0.03806295618414879,
0.0036524811293929815,
-0.0051881554536521435,
0.010969807393848896,
0.02071305364370346,
-0.01662781462073326,
-0.04676758497953415,
-0.050961632281541824,
0.02405642159283161,
0.03584723547101021,
-0.016716839745640755,
0.02201874926686287,
0.06053671985864639,
0.0008166769403032959,
-0.026212796568870544,
0.0009879256831482053,
0.07280232757329941,
-0.042375706136226654,
-0.02005031518638134,
-0.024076204746961594,
0.03301823139190674,
0.020208582282066345,
-0.09044898301362991,
0.03109925612807274,
-0.09424736350774765,
-0.09907447546720505,
0.0007431080448441207,
-0.034798722714185715,
-0.030327709391713142,
-0.032662130892276764,
0.02059435471892357,
0.0018930089427158237,
0.051278162747621536,
-0.032266467809677124,
-0.04941853880882263,
-0.02413555607199669,
0.016548682004213333,
0.008660114370286465,
-0.02777567133307457,
-0.07034920901060104,
0.03523395583033562,
-0.047123681753873825,
-0.03901255503296852,
-0.03990279883146286,
-0.0022330335341393948,
0.00468615535646677,
-0.013670220039784908,
-0.004018471110612154,
0.011771028861403465,
-0.014530790969729424,
-0.0345415398478508,
0.010039995424449444,
0.02253311313688755,
-0.013818594627082348,
0.031198173761367798,
-0.008482065051794052,
-0.0004574874765239656,
-0.030762940645217896,
0.044789258390665054,
-0.00537609588354826,
0.02819111943244934,
-0.06152588129043579,
0.017349902540445328,
-0.0010602581314742565,
0.021583518013358116,
-0.029833128675818443,
-0.01604420877993107,
-0.009837216697633266,
-0.03191037103533745,
0.03533286973834038,
0.008571089245378971,
-0.021801132708787918,
0.003019417403265834,
-0.03382934257388115,
0.0223154965788126,
0.03938843682408333,
0.0517529621720314,
0.03394804522395134,
-0.06746085733175278,
-0.0699535459280014,
0.0304266270250082,
-0.015084722079336643,
-0.006815326865762472,
0.05123859643936157,
-0.007705572992563248,
-0.00005726321251131594,
-0.0407930463552475,
0.06682778894901276,
-0.02271116152405739,
-0.03299844637513161,
-0.020455872640013695,
0.026826076209545135,
-0.021464817225933075,
0.03250386565923691,
-0.03392826020717621,
-0.07442455738782883,
0.06900394707918167,
-0.019981075078248978,
-0.001843550824560225,
0.025797348469495773,
-0.009599817916750908,
0.03942800313234329,
0.03849818930029869,
-0.00797264650464058,
-0.02726130746304989,
-0.0364605151116848,
0.032464299350976944,
-0.04728194698691368,
-0.009782813489437103,
-0.015440820716321468,
0.003026836086064577,
0.06714432686567307,
0.02575778216123581,
-0.03009031154215336,
0.11466366797685623,
-0.05523481220006943,
0.015351795591413975,
0.029378114268183708,
0.011177531443536282,
0.030842075124382973,
-0.0646912008523941,
-0.059151895344257355,
0.008022104389965534,
-0.03244451805949211,
0.02809220366179943,
-0.034897640347480774,
0.05123859643936157,
0.06591776013374329,
0.017043262720108032,
-0.030584892258048058,
-0.012067778035998344,
-0.03181145340204239,
-0.019842591136693954,
0.03260278329253197,
-0.0030317818745970726,
-0.003825584426522255,
-0.0063652582466602325,
-0.013353688642382622,
-0.02415533922612667,
-0.02848786860704422,
-0.010198261588811874,
-0.028111986815929413,
0.057846199721097946,
-0.035926368087530136,
-0.03948735073208809,
0.02777567133307457,
-0.010554359294474125,
0.0018373685888946056,
0.024412520229816437,
0.009218990802764893,
0.03687596321105957,
0.026727160438895226,
0.002327003749087453,
0.03331498056650162,
-0.05195079371333122,
0.022572679445147514,
0.027736105024814606,
0.028725268319249153,
-0.05361258611083031,
0.009639385156333447,
0.019773351028561592,
-0.013066831044852734,
-0.02597539685666561,
-0.037232059985399246,
-0.002564402762800455,
-0.009011266753077507,
0.05828143283724785,
-0.047321517020463943,
-0.0073395827785134315,
0.022097881883382797,
0.05452261492609978,
-0.021939614787697792,
0.08720453083515167,
-0.02880440093576908,
-0.04150524362921715,
0.03373042866587639,
-0.011424822732806206,
0.023482708260416985,
-0.07402889430522919,
-0.02779545448720455,
0.0013922456419095397,
-0.04154480993747711,
-0.0007981301750987768,
-0.046015821397304535,
0.049537237733602524,
0.0008815907058306038,
-0.044710125774145126,
-0.04383966326713562,
0.02506536804139614,
-0.009688843041658401,
-0.0013551521115005016,
-0.05305865406990051,
0.027201958000659943,
-0.011533630080521107,
0.01408566813915968,
0.0006534652202390134,
-0.008135857991874218,
-0.0036549540236592293,
0.026826076209545135,
0.0054601747542619705,
-0.0054206084460020065,
0.023185959085822105,
-0.05100119858980179,
0.06619472801685333,
0.02253311313688755,
-0.04969550296664238,
-0.01334379706531763,
-0.041584376245737076,
0.05246515944600105,
-0.008699680678546429,
0.009293178096413612,
0.00042533970554359257,
-0.020633921027183533,
-0.03272148221731186,
-0.01877429708838463,
-0.032484084367752075,
0.047638047486543655,
0.014590141363441944,
0.05020986869931221,
-0.027340440079569817,
0.02233527973294258,
0.01564854383468628,
-0.019615083932876587,
0.04629278555512428,
0.006454282905906439,
0.006914243102073669,
-0.014956130646169186,
0.015292446129024029,
-0.026489760726690292,
-0.007621494121849537,
0.09147771447896957,
-0.024669703096151352,
-0.014214259572327137,
0.0662342980504036,
0.07082400470972061,
0.01479786541312933,
-0.04866677522659302,
-0.014867106452584267,
0.037845343351364136,
0.04063478112220764,
-0.06662996113300323,
0.04918114095926285,
-0.03121795691549778,
-0.019763458520174026,
0.08206088840961456,
0.007987484335899353,
-0.01075219176709652,
-0.014590141363441944,
0.021247202530503273,
0.02706347592175007,
0.007661060430109501,
0.01992172561585903,
0.002880934625864029,
0.057846199721097946,
0.05309822037816048,
-0.07216926664113998,
0.050565965473651886,
-0.025124717503786087,
-0.0498933382332325,
0.009639385156333447,
0.008116074837744236,
-0.052069492638111115,
0.019160069525241852,
-0.010781866498291492,
0.011800703592598438,
0.07557198405265808,
-0.01545071229338646,
0.012611816637217999,
0.03562961891293526,
0.007636331487447023,
0.0388740710914135,
0.057529669255018234,
0.04593668878078461,
0.0004207029996905476,
-0.009624547325074673,
-0.011830379255115986,
0.10983656346797943,
-0.02364097349345684,
-0.08490967750549316,
-0.009204152971506119,
0.005875622853636742,
0.01120720710605383,
-0.02385859005153179,
0.05040770024061203,
0.07311886548995972,
-0.029180282726883888,
-0.012730516493320465,
-0.06255461275577545,
-0.03412609174847603,
0.05060553178191185,
-0.005079347640275955,
0.039645615965127945,
-0.047638047486543655,
-0.015401254408061504,
0.003929446451365948,
-0.002082186285406351,
0.008754084818065166,
-0.014421983622014523,
0.017201529815793037,
0.04558058828115463,
0.028032854199409485,
-0.04031824693083763,
-0.03295888006687164,
-0.06073455512523651,
-0.002833949401974678,
-0.01920952834188938,
0.028309820219874382,
-0.02688542567193508,
0.060655418783426285,
0.017656544223427773,
-0.019595300778746605,
0.023977288976311684,
-0.0035980772227048874,
-0.01439230889081955,
-0.03952691704034805,
0.020228365436196327,
-0.002168737817555666,
0.00704283406957984,
-0.001796565717086196,
0.020831754431128502,
0.0086353849619627,
-0.04435402899980545,
0.052386026829481125,
-0.008096291683614254,
0.00020896049682050943,
0.005351366940885782,
0.028250468894839287,
0.04668845236301422,
-0.03865645453333855,
-0.01933811977505684,
0.014619816094636917,
-0.0011876127682626247,
-0.04850850999355316,
-0.010119128040969372,
0.0020302552729845047,
0.07699637860059738,
0.08712539821863174,
0.04091174528002739,
0.004164372570812702,
0.04130740836262703,
0.04063478112220764,
0.008571089245378971,
-0.027142608538269997,
-0.06757955253124237,
-0.07030963897705078,
-0.04922070726752281,
0.05072423443198204,
-0.030050745233893394,
-0.01791372522711754,
-0.03527352213859558,
0.014738515019416809,
-0.014550574123859406,
0.07414758950471878,
-0.05270255729556084,
0.034383274614810944,
0.020732838660478592,
-0.0073296912014484406,
0.02565886452794075,
0.007438499014824629,
-0.0163112822920084,
0.05535351112484932,
-0.00813091266900301,
0.025896264240145683,
-0.016222259029746056,
0.03849818930029869,
0.10524684935808182,
0.012077669613063335,
0.017191637307405472,
0.0345415398478508,
-0.009728409349918365,
-0.0032642348669469357,
-0.028863750398159027,
-0.0052376133389770985,
-0.013116289861500263,
-0.0010720044374465942,
-0.04004128277301788,
0.03932908549904823,
0.03183123841881752,
-0.0665508285164833,
-0.0632668063044548,
0.04209873825311661,
0.031475137919187546,
-0.009431661106646061,
-0.017478493973612785,
-0.016004642471671104,
0.05084293335676193,
-0.01140503864735365,
-0.03052554279565811,
0.033690862357616425,
0.0165585745126009,
-0.026648027822375298,
0.07201100140810013,
-0.005272233858704567,
-0.021900048479437828,
0.0030317818745970726,
-0.03280061483383179,
0.02789437212049961,
-0.04182177409529686,
0.01489678118377924,
0.004478431306779385,
-0.05143642798066139,
-0.025381900370121002,
-0.008704626932740211,
-0.020159123465418816,
-0.009758084081113338,
-0.018437981605529785,
0.03230603411793709,
-0.003870096756145358,
0.027854805812239647,
0.034818507730960846,
0.05768793448805809,
0.08981592208147049,
0.029734212905168533,
-0.048548076301813126,
-0.002900717779994011,
0.0594288595020771,
0.04918114095926285,
-0.003397771855816245,
-0.03299844637513161,
0.0026385898236185312,
-0.041663508862257004,
0.014639599248766899,
0.0010540758958086371,
-0.0290022324770689,
-0.04815240949392319,
0.04174264147877693,
0.02162308432161808,
-0.029833128675818443,
0.007853947579860687,
0.021880265325307846,
0.00268804794177413,
-0.01140503864735365,
0.06081368774175644,
-0.0513177290558815,
0.021741783246397972,
0.02344314195215702,
0.003002106910571456,
-0.04629278555512428,
-0.014461549930274487,
-0.0010584034025669098,
-0.01106872409582138,
0.013254771940410137,
-0.031079472973942757,
-0.021702216938138008,
-0.015104505233466625,
0.018714947625994682,
-0.010692842304706573,
0.004812273662537336,
-0.00496312091127038,
-0.015223205089569092,
-0.04918114095926285,
-0.01081154216080904,
-0.05638223886489868,
-0.01277997437864542,
0.01197875291109085,
-0.05788576602935791,
-0.014372525736689568,
0.04091174528002739,
-0.06825218349695206,
-0.07189229875802994,
-0.02081197127699852,
-0.011266556568443775,
0.027498707175254822,
0.05923102796077728,
-0.060971952974796295,
-0.029773779213428497,
-0.049260273575782776,
0.08965765684843063,
-0.045105792582035065,
0.03562961891293526,
-0.010584034956991673,
-0.0027201958000659943,
0.022355062887072563,
0.07988473027944565,
0.011078615672886372,
0.051871661096811295,
-0.011780920438468456,
-0.014075776562094688,
0.02656889334321022,
-0.007250558119267225,
0.05507654696702957,
-0.0336117297410965,
-0.02405642159283161,
0.017102612182497978,
0.01187983714044094,
-0.04708411544561386,
-0.009624547325074673,
0.009822379797697067,
0.004918608348816633,
0.0064048245549201965,
-0.00856119766831398,
-0.030782725661993027,
0.04740064963698387,
0.024511437863111496,
-0.0304266270250082,
-0.0450662262737751,
-0.017745567485690117,
0.025104934349656105,
-0.012898674234747887,
-0.006300962530076504,
-0.02504558488726616,
0.07509718835353851,
0.03121795691549778,
-0.034383274614810944,
0.004307800903916359,
-0.018714947625994682,
-0.016271715983748436,
0.027597622945904732,
-0.11054875701665878,
-0.05689660459756851,
0.034798722714185715,
0.04668845236301422,
-0.037113361060619354,
-0.04391879588365555,
0.0071071297861635685,
0.0002254980499856174,
-0.02150438353419304,
0.00591024337336421,
-0.06172371655702591,
-0.038043174892663956,
-0.01930844411253929,
0.03285996615886688,
0.0172707699239254,
0.05543264374136925,
0.011484172195196152,
-0.010015266016125679,
0.029338547959923744,
0.003721722401678562,
0.022651812061667442,
0.017577409744262695,
0.002554511185735464,
-0.007023050915449858,
0.017963184043765068,
-0.021187853068113327,
-0.021187853068113327,
0.031277306377887726,
0.02029760554432869,
-0.024115772917866707,
-0.020109666511416435,
0.002335658995434642,
-0.04645105078816414,
0.023502491414546967,
-0.020732838660478592,
0.04391879588365555,
-0.028527434915304184,
-0.01748838648200035,
0.011523738503456116,
0.022691378369927406,
0.06694649159908295,
-0.019160069525241852,
0.009090399369597435,
0.0287846177816391,
-0.014471441507339478,
-0.016291499137878418,
0.04300876706838608,
0.05879579484462738,
-0.029219849035143852,
-0.010188370011746883,
-0.03466023877263069,
-0.014827540144324303,
-0.003464540233835578,
0.03926973417401314,
0.019051261246204376,
0.03515481948852539,
0.02130655199289322,
0.07252536714076996,
-0.025500599294900894,
0.015391362830996513,
-0.03871580585837364,
0.02385859005153179,
-0.025718213990330696,
0.015678219497203827,
0.02646997757256031,
0.011998536065220833,
-0.013779028318822384,
0.03562961891293526,
-0.03001117892563343,
-0.008625493384897709,
0.06583862751722336,
0.037845343351364136,
-0.05946842581033707,
0.023166175931692123,
-0.028626350685954094,
-0.034403059631586075,
-0.11094442009925842,
-0.03485807403922081,
-0.010089453309774399,
-0.010524684563279152,
-0.04403749853372574,
-0.01818079873919487,
-0.07189229875802994,
0.010692842304706573
]
|
41,550 | pyglove.core.symbolic.base | from_json_str | Deserialize (maybe) symbolic object from JSON string.
Example::
@pg.members([
('x', pg.typing.Any())
])
class A(pg.Object):
pass
a1 = A(1)
json_str = a1.to_json_str()
a2 = pg.from_json_str(json_str)
assert pg.eq(a1, a2)
Args:
json_str: JSON string.
allow_partial: If True, allow a partial symbolic object to be created.
Otherwise error will be raised on partial value.
root_path: The symbolic path used for the deserialized root object.
force_dict: If True, "_type" keys will be stripped before loading. As a
result, JSONConvertible objects will be returned as dict.
**kwargs: Additional keyword arguments that will be passed to
``pg.from_json``.
Returns:
A deserialized value.
| def from_json_str(json_str: str,
*,
allow_partial: bool = False,
root_path: Optional[object_utils.KeyPath] = None,
force_dict: bool = False,
**kwargs) -> Any:
"""Deserialize (maybe) symbolic object from JSON string.
Example::
@pg.members([
('x', pg.typing.Any())
])
class A(pg.Object):
pass
a1 = A(1)
json_str = a1.to_json_str()
a2 = pg.from_json_str(json_str)
assert pg.eq(a1, a2)
Args:
json_str: JSON string.
allow_partial: If True, allow a partial symbolic object to be created.
Otherwise error will be raised on partial value.
root_path: The symbolic path used for the deserialized root object.
force_dict: If True, "_type" keys will be stripped before loading. As a
result, JSONConvertible objects will be returned as dict.
**kwargs: Additional keyword arguments that will be passed to
``pg.from_json``.
Returns:
A deserialized value.
"""
return from_json(
json.loads(json_str),
allow_partial=allow_partial,
root_path=root_path,
force_dict=force_dict,
**kwargs)
| (json_str: str, *, allow_partial: bool = False, root_path: Optional[pyglove.core.object_utils.value_location.KeyPath] = None, force_dict: bool = False, **kwargs) -> Any | [
-0.022192278876900673,
0.028911709785461426,
0.03890005126595497,
-0.06566880643367767,
-0.012185776606202126,
0.04845253750681877,
0.045328911393880844,
0.06828393787145615,
0.05509932339191437,
-0.05273844301700592,
-0.013475180603563786,
0.07758217304944992,
-0.03762880712747574,
0.03574010357260704,
-0.08281243592500687,
0.022955024614930153,
-0.021247927099466324,
0.04038922116160393,
0.02540670894086361,
-0.004490213468670845,
-0.014492175541818142,
0.03475942835211754,
0.016498925164341927,
0.11099771410226822,
-0.002329099690541625,
-0.03857316076755524,
0.017052823677659035,
0.029202278703451157,
0.04231424629688263,
-0.005466347094625235,
0.06959149986505508,
-0.04100668430328369,
0.04605533555150032,
0.04852518066763878,
-0.03966279700398445,
-0.04445720091462135,
-0.0010487758554518223,
0.03713846951723099,
-0.0955248698592186,
0.008104177191853523,
-0.011077978648245335,
0.05408233031630516,
-0.006551444064825773,
-0.022882383316755295,
-0.0018591935513541102,
0.011377628892660141,
-0.05328326299786568,
0.04195103421807289,
0.012912201695144176,
0.024861890822649002,
0.018478432670235634,
-0.06345321238040924,
-0.015300323255360126,
-0.023808574303984642,
0.003053254447877407,
-0.02320927381515503,
-0.01682581566274166,
0.048379894345998764,
0.0012871340150013566,
-0.06476077437400818,
-0.019141294062137604,
-0.016934778541326523,
-0.010260751470923424,
-0.02388121746480465,
0.006056567188352346,
-0.06802968680858612,
-0.015627214685082436,
-0.045147303491830826,
0.007518497295677662,
-0.054409220814704895,
-0.0889144018292427,
0.04754450544714928,
0.05226626992225647,
0.03490471467375755,
0.032144300639629364,
-0.0296018123626709,
-0.033088650554418564,
-0.03791937604546547,
-0.0219743512570858,
-0.01833314634859562,
-0.008576353080570698,
-0.02417178638279438,
-0.04140621796250343,
-0.08760683983564377,
-0.13119232654571533,
0.041696786880493164,
-0.012049572542309761,
-0.011223264038562775,
0.0391542986035347,
0.013684027828276157,
-0.011668198741972446,
-0.05095870420336723,
-0.024916373193264008,
0.022682616487145424,
0.023826735094189644,
-0.021356889978051186,
0.036539170891046524,
-0.024952692911028862,
0.041805751621723175,
0.004839805420488119,
-0.004333578050136566,
0.04082507640123367,
-0.04155150055885315,
-0.02273709699511528,
-0.02369961142539978,
-0.032707277685403824,
0.020212771371006966,
-0.011531994678080082,
0.03374243527650833,
0.0028988891281187534,
-0.05618896335363388,
-0.018224183470010757,
-0.041515178978443146,
-0.003470948664471507,
0.07707367837429047,
0.023663289844989777,
0.024898212403059006,
-0.054300256073474884,
0.05887673422694206,
0.012122214771807194,
0.025733601301908493,
-0.012067733332514763,
0.020575983449816704,
0.04089771956205368,
0.019940361380577087,
0.005657033529132605,
0.019922202453017235,
-0.056406889110803604,
0.049360569566488266,
0.01499159261584282,
0.06661316007375717,
0.08397471159696579,
0.00946168415248394,
0.06839290261268616,
-0.003103196155279875,
0.02215595729649067,
-0.006655867677181959,
0.02475292608141899,
-0.02246468886733055,
-0.032344065606594086,
0.017552239820361137,
0.029638133943080902,
-0.004226884804666042,
-0.04576476663351059,
-0.006147370208054781,
-0.001547057880088687,
0.027931036427617073,
-0.03588538616895676,
-0.016117552295327187,
0.005620712414383888,
0.023663289844989777,
-0.012213017791509628,
0.017597641795873642,
0.08637191355228424,
-0.05270212143659592,
-0.03279808163642883,
-0.03143603727221489,
-0.05916730314493179,
0.006428860127925873,
-0.01389287505298853,
0.010660285130143166,
0.024861890822649002,
-0.05084973946213722,
0.030891217291355133,
0.011141541413962841,
-0.030455362051725388,
0.0869530513882637,
-0.07663781940937042,
-0.033960361033678055,
0.0004531642480287701,
0.013148290105164051,
0.03762880712747574,
-0.004871586803346872,
0.02473476715385914,
0.014710103161633015,
-0.0024834650103002787,
0.05400968715548515,
0.022501010447740555,
-0.05557150021195412,
-0.0011009876616299152,
0.07896237820386887,
0.0008370911236852407,
-0.017552239820361137,
-0.03317945450544357,
0.03744720295071602,
0.010823730379343033,
-0.023082150146365166,
0.039880722761154175,
0.016208354383707047,
-0.027477020397782326,
-0.03842787444591522,
-0.006328976713120937,
0.05150352045893669,
-0.019795076921582222,
0.015609053894877434,
-0.019795076921582222,
0.029474688693881035,
0.0032870725262910128,
-0.10460517555475235,
0.04060715064406395,
-0.05015963688492775,
-0.048597823828458786,
-0.0057614571414887905,
-0.05095870420336723,
-0.010850971564650536,
-0.06991839408874512,
-0.018124300986528397,
0.01632639765739441,
0.010042823851108551,
-0.022373884916305542,
-0.03699318692088127,
-0.004095220007002354,
-0.0064788018353283405,
0.025624636560678482,
-0.01145935244858265,
0.015155038796365261,
0.05702435225248337,
0.02389937825500965,
0.022501010447740555,
-0.028893548995256424,
0.016190193593502045,
0.044566165655851364,
0.025370387360453606,
0.013148290105164051,
-0.006197311915457249,
-0.014492175541818142,
-0.014337810687720776,
-0.00037030642852187157,
0.015200439840555191,
0.020485181361436844,
0.010578561574220657,
-0.014664702117443085,
-0.0001536558847874403,
-0.05687906593084335,
0.09443522989749908,
-0.00983397662639618,
0.005747836548835039,
-0.04416663199663162,
0.0439487025141716,
-0.03995336592197418,
0.039808083325624466,
-0.030146630480885506,
-0.06773911416530609,
-0.01833314634859562,
-0.022010672837495804,
0.045910049229860306,
-0.008844222873449326,
-0.030691450461745262,
-0.003139517502859235,
-0.04754450544714928,
0.05600735545158386,
0.02972893789410591,
0.02226492203772068,
0.05473611131310463,
-0.10634859651327133,
-0.057569168508052826,
0.05509932339191437,
0.018033497035503387,
-0.02991054393351078,
0.06712165474891663,
-0.005711515434086323,
-0.0036502848379313946,
-0.03555849567055702,
0.060910724103450775,
-0.026223937049508095,
-0.03944487124681473,
-0.015790659934282303,
0.03401484340429306,
-0.0026446403935551643,
0.012349222786724567,
0.0362667590379715,
-0.060329582542181015,
0.07409533858299255,
0.0006844284362159669,
-0.01371126901358366,
-0.005870420951396227,
-0.02208331599831581,
0.010542240925133228,
0.0410793237388134,
-0.024516839534044266,
-0.055644143372774124,
-0.021847227588295937,
0.04442087933421135,
-0.02533406764268875,
0.029311243444681168,
-0.01494619157165289,
0.012812318280339241,
0.016662370413541794,
0.025279585272073746,
-0.03479574993252754,
0.056043677031993866,
-0.04852518066763878,
-0.01775200664997101,
0.01255807001143694,
0.0015674886526539922,
-0.009933860041201115,
-0.0706448182463646,
-0.08658984303474426,
-0.018124300986528397,
-0.038645803928375244,
0.015926863998174667,
-0.027967356145381927,
0.04794403910636902,
0.04976010322570801,
0.029020672664046288,
-0.019831398501992226,
-0.026332901790738106,
-0.050595492124557495,
0.012539909221231937,
0.006419779732823372,
0.014374131336808205,
0.005802318453788757,
-0.0449293777346611,
0.006728510372340679,
-0.023481683805584908,
0.01690753921866417,
-0.005248419474810362,
-0.02406282350420952,
0.024535000324249268,
-0.042859066277742386,
-0.03475942835211754,
0.024571320042014122,
-0.0078726289793849,
-0.005189397372305393,
-0.0078726289793849,
-0.0033687951508909464,
0.0009000857826322317,
0.024335233494639397,
-0.009561567567288876,
0.007477635983377695,
-0.04507466033101082,
0.01813337951898575,
0.03842787444591522,
0.00518031744286418,
-0.029583651572465897,
-0.018006255850195885,
-0.01116878166794777,
-0.0812869444489479,
-0.029347563162446022,
-0.017915453761816025,
0.045910049229860306,
0.002369961002841592,
0.08230393379926682,
-0.026623470708727837,
-0.039226941764354706,
0.024099145084619522,
0.03704766929149628,
-0.029202278703451157,
0.061491865664720535,
-0.06661316007375717,
-0.06486973911523819,
-0.0018989199306815863,
-0.026060491800308228,
-0.016172032803297043,
-0.05310165509581566,
-0.01977691613137722,
0.026786915957927704,
0.04071611166000366,
-0.01565445587038994,
-0.09472580254077911,
-0.004456162452697754,
-0.02255549095571041,
-0.08956818282604218,
-0.05807766690850258,
-0.018414869904518127,
0.029656294733285904,
0.03677525743842125,
-0.014773664996027946,
0.03810098394751549,
-0.008349345996975899,
0.02415362559258938,
-0.006937357131391764,
-0.009443523362278938,
-0.0009767009178176522,
-0.018224183470010757,
0.04431191459298134,
-0.013348056934773922,
-0.0003232023154851049,
-0.03612147644162178,
0.05132191628217697,
0.013565984554588795,
-0.056624818593263626,
-0.008712558075785637,
-0.018206022679805756,
0.03781041502952576,
-0.015981346368789673,
0.009284617379307747,
0.010460518300533295,
-0.004263205919414759,
-0.005965764168649912,
-0.012458186596632004,
-0.041878391057252884,
0.030782252550125122,
0.03223510459065437,
0.036339402198791504,
-0.03773777186870575,
0.03267095610499382,
0.005425485782325268,
-0.03659365326166153,
0.06730326265096664,
-0.01930474117398262,
-0.011486592702567577,
-0.01614479161798954,
-0.005720595829188824,
0.00019352411618456244,
0.0706448182463646,
0.07249720394611359,
-0.02972893789410591,
-0.02072126977145672,
0.05219362676143646,
0.05081341788172722,
0.017152706161141396,
-0.061564505100250244,
-0.047144971787929535,
0.016290077939629555,
0.03208981826901436,
-0.009852137416601181,
0.03065512888133526,
-0.030219273641705513,
-0.03208981826901436,
0.040752433240413666,
0.030600646510720253,
-0.017452357336878777,
-0.049723781645298004,
0.016090311110019684,
0.02780391089618206,
-0.004762622993439436,
0.0026718813460320234,
0.029856061562895775,
0.06040222570300102,
0.0017899562371894717,
-0.03256199508905411,
0.061964038759469986,
-0.05495404079556465,
-0.026895880699157715,
0.0028988891281187534,
0.02646002545952797,
-0.02132057026028633,
-0.018759921193122864,
-0.0012156266020610929,
0.022882383316755295,
0.018868885934352875,
-0.03555849567055702,
0.002399472054094076,
-0.013021165505051613,
0.025297746062278748,
0.06058383360505104,
0.0515761636197567,
0.03813730552792549,
0.027477020397782326,
-0.011904287151992321,
0.001064666430465877,
0.05760549008846283,
-0.031781088560819626,
-0.056406889110803604,
-0.0035231604706496,
0.0573512427508831,
0.015155038796365261,
-0.04511098191142082,
0.07627461105585098,
-0.013438859954476357,
-0.002531136618927121,
0.008108717389404774,
-0.011595556512475014,
-0.06254518032073975,
0.04042554274201393,
0.008458309806883335,
0.015273083001375198,
-0.06679476797580719,
-0.008126878179609776,
-0.0053074415773153305,
-0.006837473716586828,
-0.0009999691974371672,
0.022119637578725815,
0.006533283740282059,
0.0382462702691555,
0.02760414406657219,
-0.034160129725933075,
-0.018369467929005623,
-0.05706067383289337,
-0.015436528250575066,
-0.0019182156538590789,
0.02972893789410591,
-0.016662370413541794,
0.061964038759469986,
0.02206515520811081,
0.008635375648736954,
0.02636922150850296,
0.020902875810861588,
-0.019558988511562347,
-0.03316129371523857,
0.08528228104114532,
0.022519171237945557,
0.008045155555009842,
0.016653290018439293,
0.0291296374052763,
-0.013647707179188728,
-0.003924964461475611,
0.04917896166443825,
-0.02417178638279438,
0.01758856140077114,
0.020521502941846848,
0.0025265964213758707,
0.030019506812095642,
-0.039699118584394455,
0.0024630343541502953,
0.0020090187899768353,
0.02246468886733055,
-0.027640465646982193,
0.0021611140109598637,
0.015073315240442753,
0.05103134736418724,
0.07017263770103455,
0.0314905159175396,
-0.019341060891747475,
0.05840455740690231,
0.051067668944597244,
0.011522914282977581,
-0.058041345328092575,
-0.04136989638209343,
-0.057278599590063095,
-0.056697458028793335,
0.0025924285873770714,
-0.04812564700841904,
0.014719183556735516,
-0.035104479640722275,
0.03686606138944626,
0.010487758554518223,
0.06624994426965714,
-0.03499551862478256,
0.013012085109949112,
0.06327160447835922,
-0.010623963549733162,
0.0029647215269505978,
0.013920116238296032,
0.003913613967597485,
0.06011165678501129,
-0.032907046377658844,
0.02206515520811081,
-0.026024170219898224,
0.013311735354363918,
0.030055828392505646,
0.024407874792814255,
0.01968611404299736,
0.05408233031630516,
-0.017525000497698784,
0.024970853701233864,
-0.017070984467864037,
-0.008249462582170963,
-0.012785077095031738,
0.04020761698484421,
-0.03283440321683884,
-0.033687952905893326,
0.010869131423532963,
-0.04888839274644852,
-0.04950585216283798,
0.047072332352399826,
-0.005257499869912863,
-0.02130240947008133,
-0.02302766777575016,
-0.054409220814704895,
0.018959688022732735,
0.003268911736086011,
0.01294852327555418,
0.01928658038377762,
-0.00218721991404891,
-0.009734093211591244,
0.05491771921515465,
0.01596318557858467,
0.02722277119755745,
0.010342474095523357,
-0.024843730032444,
0.02388121746480465,
-0.04097036272287369,
-0.03190821036696434,
0.012340142391622066,
-0.04594637081027031,
-0.022791579365730286,
0.024571320042014122,
0.014664702117443085,
0.02972893789410591,
-0.016371799632906914,
0.0012315171770751476,
0.02368145063519478,
-0.019540827721357346,
0.02360880747437477,
0.037592485547065735,
0.09152953326702118,
0.02847585454583168,
-0.06828393787145615,
0.015581812709569931,
0.019359221681952477,
0.06744854897260666,
0.01094177458435297,
-0.035794585943222046,
-0.01777924783527851,
-0.00575691694393754,
-0.02664163149893284,
0.0167077723890543,
-0.07140756398439407,
-0.036720775067806244,
0.048597823828458786,
-0.0013018895406275988,
-0.05321061983704567,
0.02587888576090336,
0.0429680310189724,
0.002181544667109847,
0.03744720295071602,
0.04594637081027031,
-0.04278642311692238,
0.017334312200546265,
-0.015400206670165062,
-0.04216896370053291,
-0.029547329992055893,
-0.006546903867274523,
-0.005189397372305393,
-0.024589480832219124,
-0.019177615642547607,
-0.0007338026189245284,
-0.036157798022031784,
0.008994047529995441,
0.05368279665708542,
-0.010696605779230595,
0.0109871756285429,
0.01852383464574814,
-0.01427424792200327,
-0.05509932339191437,
-0.07122595608234406,
-0.05746020749211311,
-0.01026983093470335,
-0.0012371923075988889,
-0.06083808094263077,
-0.023191113024950027,
0.019704274833202362,
-0.03526792675256729,
-0.0544455423951149,
-0.0006662678206339478,
0.01710730604827404,
0.04500202089548111,
0.025261424481868744,
-0.03159948065876961,
-0.01892336830496788,
-0.05480875447392464,
0.07336890697479248,
-0.028348729014396667,
0.05996637046337128,
-0.010188108310103416,
-0.017025582492351532,
0.061673469841480255,
0.03258015587925911,
0.0008853303152136505,
0.022228600457310677,
0.002635560231283307,
-0.01337529718875885,
0.0353768914937973,
-0.031127305701375008,
0.04253217577934265,
-0.03517712280154228,
0.019631631672382355,
0.030691450461745262,
0.014483095146715641,
-0.024298911914229393,
-0.03143603727221489,
0.045147303491830826,
-0.030164791271090508,
0.014119883067905903,
0.0012973493430763483,
-0.049832746386528015,
0.016280997544527054,
-0.01663512922823429,
-0.005143995862454176,
-0.026387382298707962,
0.02359064668416977,
0.010959935374557972,
0.02351800538599491,
0.018551073968410492,
-0.004317687824368477,
0.029692616313695908,
0.024426035583019257,
-0.02026725374162197,
-0.004170132800936699,
0.002096416661515832,
0.004699060693383217,
-0.030782252550125122,
-0.07685574889183044,
-0.009933860041201115,
0.06581409275531769,
0.04024393856525421,
-0.00011882437684107572,
-0.008272162638604641,
0.029274921864271164,
0.014374131336808205,
0.004771703388541937,
0.016498925164341927,
0.017525000497698784,
-0.028820905834436417,
-0.0005601416924037039,
0.025261424481868744,
-0.002730903448536992,
0.049651138484478,
0.03659365326166153,
-0.0008949781185947359,
-0.00019919931946787983,
-0.02417178638279438,
0.007967972196638584,
0.008362965658307076,
-0.012022331357002258,
0.03087305650115013,
-0.004247315227985382,
-0.045328911393880844,
-0.014646541327238083,
0.025297746062278748,
0.06279943138360977,
0.021429533138871193,
-0.0019136754563078284,
0.03762880712747574,
-0.016162952408194542,
0.009715932421386242,
-0.029492849484086037,
0.0004804052005056292,
-0.030219273641705513,
-0.06007533520460129,
-0.024898212403059006,
0.011804403737187386,
0.06439756602048874,
-0.01660788804292679,
-0.056697458028793335,
0.05800502374768257,
-0.005048652645200491,
-0.04863414540886879,
-0.002129332860931754,
0.04314963519573212,
-0.041043005883693695,
-0.027731269598007202,
-0.031853727996349335,
-0.04547419399023056,
0.026405543088912964,
-0.026296580210328102,
0.038173627108335495,
0.0262784194201231,
-0.005352843087166548,
0.07427693903446198,
0.024026501923799515,
0.004385789856314659,
-0.033869557082653046,
0.057169634848833084,
-0.052229948341846466,
0.019450025632977486,
0.03323393687605858,
0.007613840512931347,
-0.018414869904518127,
0.053937043994665146,
0.00011960471601923928,
0.011604636907577515,
0.03612147644162178,
0.021429533138871193,
-0.0630899965763092,
0.059675801545381546,
-0.0214840155094862,
-0.01094177458435297,
-0.09152953326702118,
-0.05560782179236412,
-0.0030850355979055166,
0.003359714988619089,
-0.05244787409901619,
-0.026223937049508095,
-0.039880722761154175,
0.020793911069631577
]
|
41,551 | pyglove.core.symbolic.functor | functor | Function/Decorator for creating symbolic function from regular function.
Example::
# Create a symbolic function without specifying the
# validation rules for arguments.
@pg.functor
def foo(x, y):
return x + y
f = foo(1, 2)
assert f() == 3
# Create a symbolic function with specifying the
# the validation rules for argument 'a', 'args', and 'kwargs'.
@pg.functor([
('a', pg.typing.Int()),
('b', pg.typing.Float()),
('args', pg.List(pg.typing.Int())),
(pg.typing.StrKey(), pg.typing.Int())
])
def bar(a, b, c, *args, **kwargs):
return a * b / c + sum(args) + sum(kwargs.values())
See :class:`pyglove.Functor` for more details on symbolic function.
Args:
args: A list of tuples that defines the schema for function arguments.
Please see `functor_class` for detailed explanation of `args`.
returns: Optional value spec for return value.
base_class: Optional base class derived from `symbolic.Functor`. If None,
returning functor will inherit from `symbolic.Functor`.
**kwargs: Keyword arguments for infrequently used options: Acceptable
keywords are: * `serialization_key`: An optional string to be used as the
serialization key for the class during `sym_jsonify`. If None,
`cls.__type_name__` will be used. This is introduced for scenarios when we
want to relocate a class, before the downstream can recognize the new
location, we need the class to serialize it using previous key. *
`additional_keys`: An optional list of strings as additional keys to
deserialize an object of the registered class. This can be useful when we
need to relocate or rename the registered class while being able to load
existing serialized JSON values.
Returns:
A function that converts a regular function into a symbolic function.
| def functor(
args: Optional[List[Union[
Tuple[Union[str, pg_typing.KeySpec], pg_typing.ValueSpec, str],
Tuple[Union[str, pg_typing.KeySpec], pg_typing.ValueSpec, str, Any]]]
] = None, # pylint: disable=bad-continuation
returns: Optional[pg_typing.ValueSpec] = None,
base_class: Optional[Type[Functor]] = None,
**kwargs):
"""Function/Decorator for creating symbolic function from regular function.
Example::
# Create a symbolic function without specifying the
# validation rules for arguments.
@pg.functor
def foo(x, y):
return x + y
f = foo(1, 2)
assert f() == 3
# Create a symbolic function with specifying the
# the validation rules for argument 'a', 'args', and 'kwargs'.
@pg.functor([
('a', pg.typing.Int()),
('b', pg.typing.Float()),
('args', pg.List(pg.typing.Int())),
(pg.typing.StrKey(), pg.typing.Int())
])
def bar(a, b, c, *args, **kwargs):
return a * b / c + sum(args) + sum(kwargs.values())
See :class:`pyglove.Functor` for more details on symbolic function.
Args:
args: A list of tuples that defines the schema for function arguments.
Please see `functor_class` for detailed explanation of `args`.
returns: Optional value spec for return value.
base_class: Optional base class derived from `symbolic.Functor`. If None,
returning functor will inherit from `symbolic.Functor`.
**kwargs: Keyword arguments for infrequently used options: Acceptable
keywords are: * `serialization_key`: An optional string to be used as the
serialization key for the class during `sym_jsonify`. If None,
`cls.__type_name__` will be used. This is introduced for scenarios when we
want to relocate a class, before the downstream can recognize the new
location, we need the class to serialize it using previous key. *
`additional_keys`: An optional list of strings as additional keys to
deserialize an object of the registered class. This can be useful when we
need to relocate or rename the registered class while being able to load
existing serialized JSON values.
Returns:
A function that converts a regular function into a symbolic function.
"""
if inspect.isfunction(args):
assert returns is None
return functor_class(
typing.cast(Callable[..., Any], args),
base_class=base_class,
add_to_registry=True,
**kwargs,
)
return lambda fn: functor_class( # pylint: disable=g-long-lambda # pytype: disable=wrong-arg-types
fn, args, returns,
base_class=base_class,
add_to_registry=True,
**kwargs)
| (args: Optional[List[Union[Tuple[Union[str, pyglove.core.typing.class_schema.KeySpec], pyglove.core.typing.class_schema.ValueSpec, str], Tuple[Union[str, pyglove.core.typing.class_schema.KeySpec], pyglove.core.typing.class_schema.ValueSpec, str, Any]]]] = None, returns: Optional[pyglove.core.typing.class_schema.ValueSpec] = None, base_class: Optional[Type[pyglove.core.symbolic.functor.Functor]] = None, **kwargs) | [
-0.04445495456457138,
-0.03527488932013512,
0.05172087624669075,
-0.015703771263360977,
0.014981084503233433,
0.024415066465735435,
-0.05351782590150833,
-0.003435199847444892,
0.019600415602326393,
-0.005136929918080568,
0.0153326615691185,
0.05722891539335251,
0.016807332634925842,
0.007866534404456615,
-0.008848019875586033,
0.008901732973754406,
0.04406431317329407,
-0.03308729827404022,
-0.027989432215690613,
0.025586988776922226,
-0.008047206327319145,
0.05172087624669075,
0.022969694808125496,
-0.015342427417635918,
0.030313747003674507,
0.029141822829842567,
-0.0013818927109241486,
0.016797564923763275,
0.0010565619450062513,
-0.012969283387064934,
0.022618116810917854,
-0.006548120640218258,
-0.04507998004555702,
-0.010791459120810032,
0.04629096761345863,
-0.023594720289111137,
0.004345881752669811,
0.06027591601014137,
-0.012031745165586472,
-0.006191660650074482,
0.001355036161839962,
-0.031856779009103775,
-0.04875200614333153,
-0.007392882369458675,
0.005903562996536493,
0.02091882936656475,
0.0007562566897831857,
0.028106624260544777,
-0.018741004168987274,
-0.0682840570807457,
-0.012588407844305038,
-0.06683868914842606,
0.06449484080076218,
-0.006074468605220318,
0.03269665688276291,
-0.012061042711138725,
0.015586578287184238,
-0.0029859626665711403,
0.010625436902046204,
0.023106418550014496,
0.0051466962322592735,
0.022872034460306168,
-0.024063490331172943,
-0.028712118044495583,
0.026856573298573494,
-0.003940591588616371,
-0.02326267585158348,
-0.0429314523935318,
-0.060940004885196686,
0.0064211622811853886,
-0.07043258100748062,
0.011748529970645905,
0.05379127338528633,
-0.04363460838794708,
0.007617500610649586,
-0.009575588628649712,
0.032130226492881775,
-0.07695628702640533,
-0.010342221707105637,
-0.03152473270893097,
-0.005747306626290083,
-0.0546506866812706,
-0.08609729260206223,
-0.02056725136935711,
-0.025196349248290062,
-0.035509273409843445,
0.0014758907491341233,
-0.004853715188801289,
-0.07730786502361298,
-0.04351741448044777,
-0.09469139575958252,
-0.024102553725242615,
0.027208149433135986,
0.02529400959610939,
-0.015049447305500507,
-0.05613512173295021,
0.0038258410058915615,
0.026837041601538658,
0.08273777365684509,
-0.008862669579684734,
0.04273613169789314,
0.08070644736289978,
0.0040797577239573,
0.033712323755025864,
0.0395914725959301,
-0.015147107653319836,
-0.027090957388281822,
-0.010019943118095398,
-0.034610796719789505,
0.007973960600793362,
-0.046603478491306305,
-0.0029517814982682467,
0.08828487992286682,
0.016719438135623932,
-0.007881183177232742,
0.01586979255080223,
-0.012744665145874023,
-0.01235402375459671,
-0.02918088808655739,
-0.02394629642367363,
-0.010703565552830696,
-0.0067727393470704556,
0.031055964529514313,
0.003305800026282668,
-0.011445783078670502,
-0.020313335582613945,
0.022442329674959183,
0.02363378368318081,
0.024043956771492958,
0.033927176147699356,
0.04023602977395058,
0.02529400959610939,
-0.011836424469947815,
0.06867469847202301,
0.02502056024968624,
0.02046959102153778,
0.025098688900470734,
0.009297257289290428,
-0.0652761235833168,
0.049806736409664154,
0.011357888579368591,
0.009409566409885883,
-0.023028289899230003,
0.04125169664621353,
-0.03443501144647598,
0.015225235372781754,
-0.0027320459485054016,
-0.027618322521448135,
0.027559727430343628,
-0.03945474699139595,
0.006553004030138254,
0.007851885631680489,
0.05254122242331505,
0.05379127338528633,
-0.01116256881505251,
0.003435199847444892,
-0.006479758769273758,
-0.007749341893941164,
-0.03714996576309204,
0.04562687501311302,
-0.010527776554226875,
0.03048953413963318,
-0.03162239491939545,
-0.03820469602942467,
-0.009497460909187794,
-0.01565494015812874,
0.06047123670578003,
-0.047775402665138245,
-0.0025782310403883457,
0.03281385079026222,
-0.023868169635534286,
-0.03476705402135849,
0.05148649215698242,
0.024473663419485092,
-0.00856480561196804,
0.003786776913329959,
0.029688721522688866,
0.012744665145874023,
0.030997367575764656,
-0.00897497870028019,
0.05054895207285881,
-0.024903368204832077,
-0.10445742309093475,
0.0014429304283112288,
0.022442329674959183,
0.04297051578760147,
-0.06394794583320618,
0.007578436750918627,
0.04273613169789314,
-0.0060061062686145306,
-0.04230642691254616,
0.005420144647359848,
0.018994921818375587,
-0.015293597243726254,
0.03146613761782646,
-0.04433776065707207,
-0.05320531129837036,
0.057072658091783524,
0.022266540676355362,
0.012490748427808285,
-0.001984944799914956,
0.023516591638326645,
0.043439287692308426,
0.005844966974109411,
-0.02750113047659397,
-0.01676826737821102,
0.019922694191336632,
0.03207163140177727,
-0.01009807176887989,
-0.04039228707551956,
0.03937662020325661,
-0.004135912284255028,
-0.051017723977565765,
0.059807147830724716,
-0.04562687501311302,
-0.02904416248202324,
0.0323646105825901,
0.016074879094958305,
-0.009057989344000816,
-0.019278137013316154,
0.040470413863658905,
-0.010469180531799793,
0.010195732116699219,
-0.023887701332569122,
0.059455569833517075,
-0.04257987439632416,
0.060783751308918,
-0.012402853928506374,
-0.011572741903364658,
-0.01373103354126215,
0.02443459816277027,
-0.04902545362710953,
0.03841954842209816,
-0.008144865743815899,
0.008579454384744167,
-0.04758008196949959,
0.05957276374101639,
0.053361568599939346,
0.02921995148062706,
0.025235412642359734,
-0.016494818031787872,
0.0015015265671536326,
0.011846190318465233,
0.013555244542658329,
-0.014502549543976784,
0.0012079353909939528,
0.03791171684861183,
0.027266746386885643,
-0.013486882671713829,
0.00008285863441415131,
-0.04355647787451744,
0.0014246191130951047,
-0.0006234997417777777,
0.01893632486462593,
-0.003496237564831972,
0.006894814781844616,
-0.030098894611001015,
-0.035958509892225266,
-0.003989421762526035,
0.0071877953596413136,
0.01722727157175541,
0.01848708838224411,
-0.009463279508054256,
0.04062667116522789,
0.05058801919221878,
-0.06742464751005173,
-0.017110079526901245,
-0.03162239491939545,
0.03601710498332977,
0.04578313231468201,
-0.018789835274219513,
-0.02119227685034275,
0.025274476036429405,
-0.019326966255903244,
-0.002128993859514594,
-0.017256569117307663,
-0.03242320939898491,
-0.006758090574294329,
0.048126980662345886,
-0.06672149151563644,
-0.019864097237586975,
-0.03779452294111252,
-0.05523664504289627,
-0.03304823487997055,
-0.03638821467757225,
0.06480735540390015,
-0.0035450677387416363,
0.001866531791165471,
0.025469796732068062,
-0.04125169664621353,
0.09414449334144592,
-0.022579053416848183,
0.018545685335993767,
0.027676919475197792,
0.04070479795336723,
0.035099100321531296,
-0.04468933865427971,
-0.03437641263008118,
0.03656400367617607,
-0.08078457415103912,
-0.004868364427238703,
0.003945474978536367,
0.02367284893989563,
-0.014150972478091717,
-0.003874670946970582,
-0.05195526033639908,
-0.010146901942789555,
-0.03173958510160446,
-0.08805049955844879,
0.037403881549835205,
-0.0235751885920763,
0.014082610607147217,
-0.08515974879264832,
-0.030001234263181686,
-0.0012805702863261104,
0.045705005526542664,
-0.05429910868406296,
-0.060041531920433044,
0.049806736409664154,
0.03847814351320267,
0.018965624272823334,
0.023692380636930466,
-0.05058801919221878,
0.02115321345627308,
-0.002170499414205551,
0.010059007443487644,
-0.008061855100095272,
-0.0498848631978035,
0.028106624260544777,
0.04652535170316696,
0.01640692539513111,
0.034278754144907,
0.056213248521089554,
0.04918171092867851,
-0.047462888062000275,
0.053361568599939346,
0.07640939205884933,
-0.0025294008664786816,
-0.008623401634395123,
-0.03437641263008118,
-0.002895626937970519,
0.01912187971174717,
0.03459126502275467,
0.024317406117916107,
-0.060627494007349014,
-0.009961347095668316,
-0.0018689733697101474,
-0.022286072373390198,
0.0975821390748024,
-0.03697417676448822,
0.044806528836488724,
-0.009897868148982525,
-0.059768084436655045,
0.0018140394240617752,
0.023204078897833824,
0.011172334663569927,
-0.05433817207813263,
-0.0023816898465156555,
0.006616482976824045,
-0.07351864874362946,
0.049806736409664154,
-0.045392490923404694,
-0.023692380636930466,
-0.007851885631680489,
0.08609729260206223,
0.024766642600297928,
0.010840289294719696,
0.03048953413963318,
-0.0005963380099274218,
0.006162362638860941,
0.06191660836338997,
-0.029649656265974045,
0.004438659176230431,
-0.0005056970403529704,
-0.046603478491306305,
0.012275895103812218,
0.05230683833360672,
-0.0056008161045610905,
-0.07586249709129333,
0.026094822213053703,
0.00026414048625156283,
-0.0266417209059,
0.03269665688276291,
-0.014629507437348366,
0.03656400367617607,
0.04621283710002899,
-0.033028703182935715,
0.03134894371032715,
0.042853325605392456,
-0.0410173125565052,
-0.043673671782016754,
-0.0060109891928732395,
0.038614869117736816,
-0.011807125993072987,
-0.008257175795733929,
-0.04648628830909729,
0.038712527602910995,
-0.0027198384050279856,
-0.020137546584010124,
-0.01844802498817444,
0.0033131244126707315,
0.0032667359337210655,
0.07676097005605698,
-0.009336321614682674,
0.008076503872871399,
-0.01750071905553341,
0.022207943722605705,
-0.013770097866654396,
0.019717607647180557,
0.06277602165937424,
0.032130226492881775,
-0.00044099712977185845,
-0.05617418512701988,
-0.0034791468642652035,
0.022969694808125496,
0.06316666305065155,
-0.037130434066057205,
-0.03459126502275467,
-0.019014453515410423,
0.02380957268178463,
0.041095439344644547,
0.044572144746780396,
0.005776604637503624,
0.06336198002099991,
0.03470845893025398,
0.10187918692827225,
0.022012624889612198,
-0.01517640519887209,
0.014072844758629799,
0.06347917020320892,
0.017324931919574738,
-0.050353631377220154,
-0.05109585076570511,
0.050705209374427795,
-0.035235822200775146,
-0.02714955434203148,
-0.060940004885196686,
0.007524723652750254,
-0.0001560275413794443,
0.050080183893442154,
-0.020801637321710587,
-0.00895056314766407,
0.007241508923470974,
-0.0009625640232115984,
-0.02529400959610939,
-0.004502138122916222,
0.04218923673033714,
0.0067483242601156235,
0.030723920091986656,
0.010205497965216637,
0.08297216147184372,
-0.016524117439985275,
0.016602246090769768,
0.021407131105661392,
0.0426580049097538,
-0.004550968296825886,
0.02625107951462269,
-0.048986390233039856,
-0.0015369284665212035,
0.029454335570335388,
0.023418931290507317,
-0.004753613378852606,
0.004726756829768419,
-0.044298697263002396,
-0.04937703162431717,
-0.038614869117736816,
0.05297092720866203,
0.0009314347989857197,
-0.04246268421411514,
-0.015947921201586723,
0.053947530686855316,
-0.012012212537229061,
-0.025547925382852554,
0.0005786370602436364,
0.017666742205619812,
0.09359759837388992,
-0.036192893981933594,
-0.04207204282283783,
-0.046876925975084305,
-0.05133023485541344,
0.02597763016819954,
-0.01104537583887577,
0.0035694828256964684,
0.02597763016819954,
0.06875282526016235,
0.019190242514014244,
0.03449360653758049,
0.006836218759417534,
0.025782309472560883,
0.03881018981337547,
-0.029649656265974045,
0.06851844489574432,
0.0434783510863781,
0.000028401589588611387,
0.03804843872785568,
-0.0044435421004891396,
0.04672067239880562,
0.010625436902046204,
-0.015947921201586723,
-0.02488383650779724,
-0.025489330291748047,
-0.03894691541790962,
-0.019414860755205154,
0.0641823261976242,
0.028165221214294434,
-0.04590032622218132,
0.02470804750919342,
0.009018925949931145,
-0.044259633868932724,
-0.008999393321573734,
-0.005991457495838404,
0.005639880429953337,
0.02326267585158348,
0.009062872268259525,
-0.05031456798315048,
0.00935585331171751,
0.044298697263002396,
-0.0022266539745032787,
-0.11836424469947815,
-0.07480776309967041,
0.006675078999251127,
-0.018115978688001633,
-0.044259633868932724,
-0.006054936442524195,
0.014248632825911045,
-0.02556745707988739,
0.059807147830724716,
-0.030548131093382835,
0.05875241756439209,
-0.010527776554226875,
-0.005801019724458456,
0.02218841202557087,
-0.030098894611001015,
0.024063490331172943,
-0.0395914725959301,
0.02123134210705757,
0.010410584509372711,
0.012959517538547516,
0.05297092720866203,
-0.03207163140177727,
0.03162239491939545,
0.07226859778165817,
-0.02894650213420391,
0.061486903578042984,
-0.028067560866475105,
-0.02349705994129181,
0.015156873501837254,
-0.06390887498855591,
-0.00014198887220118195,
-0.030997367575764656,
-0.07597968727350235,
-0.014902956783771515,
0.053556889295578,
-0.003054324770346284,
-0.05019737780094147,
-0.03410296514630318,
0.029434803873300552,
0.07101854681968689,
-0.04832230135798454,
-0.00872594490647316,
-0.033927176147699356,
0.020176611840724945,
0.07281549274921417,
-0.0005835201009176672,
-0.004604681394994259,
0.03662259876728058,
0.07246391475200653,
-0.004187183920294046,
-0.03326308727264404,
-0.02714955434203148,
0.024786176159977913,
0.03670072928071022,
-0.03431781753897667,
-0.0040675499476492405,
-0.025313541293144226,
0.016738969832658768,
0.015401024371385574,
-0.023965829983353615,
-0.010762161575257778,
-0.07789383083581924,
-0.036681197583675385,
-0.011426251381635666,
-0.033302150666713715,
-0.004677926655858755,
0.000026055453417939134,
0.005776604637503624,
-0.024688515812158585,
0.08078457415103912,
-0.10539495944976807,
-0.002692981855943799,
-0.04726756736636162,
0.0031055964063853025,
-0.041993916034698486,
-0.04582219570875168,
-0.03638821467757225,
-0.03824375942349434,
-0.02818475291132927,
0.02818475291132927,
-0.002093591960147023,
-0.0071877953596413136,
-0.08062831312417984,
0.03431781753897667,
-0.020078951492905617,
-0.04418150335550308,
-0.03035281039774418,
-0.04300958290696144,
0.0016174981137737632,
0.011846190318465233,
-0.01690499112010002,
-0.08484724164009094,
0.0031715170480310917,
0.026309676468372345,
0.007055954076349735,
0.046876925975084305,
0.01517640519887209,
0.048361364752054214,
0.003298475407063961,
0.0075051914900541306,
0.02281343750655651,
-0.0008002038230188191,
-0.020215675234794617,
-0.07078415900468826,
-0.005136929918080568,
-0.009453513659536839,
-0.0038844370283186436,
0.013438052497804165,
0.0044240099377930164,
0.05086146667599678,
0.03152473270893097,
-0.029454335570335388,
-0.0329115092754364,
-0.000877111277077347,
0.020352398976683617,
-0.017422592267394066,
0.029610592871904373,
-0.059494633227586746,
-0.016660841181874275,
0.06730745732784271,
-0.02164151519536972,
-0.014942021109163761,
-0.02253999002277851,
-0.02925901487469673,
-0.0010205497965216637,
-0.0004709055938292295,
0.052150581032037735,
-0.03548974171280861,
0.019239071756601334,
-0.010625436902046204,
0.07508121430873871,
-0.006430928595364094,
0.02115321345627308,
0.03617336228489876,
0.02349705994129181,
0.013311094604432583,
0.038751594722270966,
-0.014316994696855545,
0.04269706830382347,
-0.0755109190940857,
0.03728669136762619,
0.00738311605527997,
0.02566511742770672,
-0.0351576954126358,
0.031134093180298805,
0.027676919475197792,
-0.06172128766775131,
-0.01379939541220665,
-0.012686068192124367,
-0.004267753567546606,
0.022344669327139854,
-0.015947921201586723,
0.01676826737821102,
0.0213290024548769,
-0.0011908449232578278,
-0.04621283710002899,
0.01790112629532814,
-0.012393088079988956,
0.04789259284734726,
0.03527488932013512,
-0.010527776554226875,
0.026212016120553017,
-0.008149749599397182,
0.03504050523042679,
-0.02322361059486866,
-0.007778640370815992,
-0.04187672212719917,
-0.06258069723844528,
0.008428080938756466,
0.023438462987542152,
-0.05699453130364418,
-0.05406472459435463,
0.022715777158737183,
-0.030782515183091164,
0.05672108381986618,
-0.04066573455929756,
-0.049220774322748184,
-0.0022132256999611855,
-0.05558822304010391,
0.016807332634925842,
0.08195649832487106,
-0.013135305605828762,
-0.0023389633279293776,
0.08687857538461685,
-0.006650663912296295,
0.0193855632096529,
0.05730704590678215,
-0.01907305046916008,
-0.007695628795772791,
-0.06812780350446701,
0.053674083203077316,
-0.020840700715780258,
0.018789835274219513,
-0.022305604070425034,
0.007534489501267672,
0.038302354514598846,
0.05965089052915573,
-0.07125292718410492,
-0.0370718352496624,
0.03701324015855789,
-0.02101648971438408,
0.006562769878655672,
0.02291109785437584,
-0.04918171092867851,
0.07125292718410492,
-0.004170093219727278,
0.004116380121558905,
-0.02367284893989563,
-0.003589014755561948,
-0.01073286309838295,
-0.014824828132987022,
-0.023829104378819466,
0.06789341568946838,
0.046915993094444275,
-0.0323646105825901,
-0.0033790452871471643,
-0.014004481956362724,
-0.027130022644996643,
-0.017559316009283066,
-0.03982585668563843,
-0.03410296514630318,
-0.0056301141157746315,
-0.038927383720874786,
0.03443501144647598,
-0.026309676468372345,
0.007334285881370306,
0.07777663320302963,
-0.025059623643755913,
-0.018819132819771767,
-0.02808709256350994,
0.0635182335972786,
-0.0024891160428524017,
-0.017393292859196663,
0.0323646105825901,
-0.024415066465735435,
-0.03634915128350258,
-0.002425636863335967,
0.013877524062991142,
-0.00738311605527997,
-0.0031373361125588417,
-0.029317611828446388,
-0.03607570379972458,
-0.006723909173160791,
-0.00266124214977026,
0.020938361063599586,
-0.08140959590673447,
0.03914223611354828,
-0.03214975818991661,
-0.02515728399157524,
0.036231957376003265
]
|
41,552 | pyglove.core.symbolic.functor | functor_class | Returns a functor class from a function.
Args:
func: Function to be wrapped into a functor.
args: Symbolic args specification. `args` is a list of tuples, each
describes an argument from the input function. Each tuple is the format of
(<argumment-name>, <value-spec>, [description], [metadata-objects]).
`argument-name` - a `str` or `pg_typing.StrKey` object. When
`pg_typing.StrKey` is used, it describes the wildcard keyword argument.
`value-spec` - a `pg_typing.ValueSpec` object or equivalent, e.g.
primitive values which will be converted to ValueSpec implementation
according to its type and used as its default value. `description` - a
string to describe the agument. `metadata-objects` - an optional list of
any type, which can be used to generate code according to the schema.
There are notable rules in filling the `args`: 1) When `args` is None or
arguments from the function signature are missing from it, `schema.Field`
for these fields will be automatically generated and inserted into `args`.
That being said, every arguments in input function will have a
`schema.Field` counterpart in `Functor.__schema__.fields` sorted by the
declaration order of each argument in the function signature ( other than
the order in `args`). 2) Default argument values are specified along with
function definition as regular python functions, instead of being set at
`schema.Field` level. But validation rules can be set using `args` and
apply to argument values.
For example::
@pg.functor([('c', pg.typing.Int(min_value=0), 'Arg c')])
def foo(a, b, c=1, **kwargs):
return a + b + c + sum(kwargs.values())
assert foo.schema.fields() == [
pg.typing.Field('a', pg.Any(), 'Argument a'.),
pg.typing.Field('b', pg.Any(), 'Argument b'.),
pg.typing.Field('c', pg.typing.Int(), 'Arg c.),
pg.typing.Filed(
pg.typing.StrKey(), pg.Any(), 'Other arguments.')
]
# Prebind a=1, b=2, with default value c=1.
assert foo(1, 2)() == 4
returns: Optional schema specification for the return value.
base_class: Optional base class (derived from `symbolic.Functor`). If None,
returned type will inherit from `Functor` directly.
auto_doc: If True, the descriptions of argument fields will be inherited
from funciton docstr if they are not explicitly specified through
``args``.
auto_typing: If True, the value spec for constraining each argument will be
inferred from its annotation. Otherwise the value specs for all arguments
will be ``pg.typing.Any()``.
serialization_key: An optional string to be used as the serialization key
for the class during `sym_jsonify`. If None, `cls.__type_name__` will be
used. This is introduced for scenarios when we want to relocate a class,
before the downstream can recognize the new location, we need the class to
serialize it using previous key.
additional_keys: An optional list of strings as additional keys to
deserialize an object of the registered class. This can be useful when we
need to relocate or rename the registered class while being able to load
existing serialized JSON values.
add_to_registry: If True, the newly created functor class will be added to
the registry for deserialization.
Returns:
`symbolic.Functor` subclass that wraps input function.
Raises:
KeyError: names of symbolic arguments are not compatible with
function signature.
TypeError: types of symbolic arguments are not compatible with
function signature.
ValueError: default values of symbolic arguments are not compatible
with function signature.
| def functor_class(
func: types.FunctionType,
args: Optional[List[Union[
Tuple[Tuple[str, pg_typing.KeySpec], pg_typing.ValueSpec, str],
Tuple[Tuple[str, pg_typing.KeySpec], pg_typing.ValueSpec, str, Any]]]
] = None, # pylint: disable=bad-continuation
returns: Optional[pg_typing.ValueSpec] = None,
base_class: Optional[Type[Functor]] = None,
*,
auto_doc: bool = False,
auto_typing: bool = False,
serialization_key: Optional[str] = None,
additional_keys: Optional[List[str]] = None,
add_to_registry: bool = False,
) -> Type[Functor]:
"""Returns a functor class from a function.
Args:
func: Function to be wrapped into a functor.
args: Symbolic args specification. `args` is a list of tuples, each
describes an argument from the input function. Each tuple is the format of
(<argumment-name>, <value-spec>, [description], [metadata-objects]).
`argument-name` - a `str` or `pg_typing.StrKey` object. When
`pg_typing.StrKey` is used, it describes the wildcard keyword argument.
`value-spec` - a `pg_typing.ValueSpec` object or equivalent, e.g.
primitive values which will be converted to ValueSpec implementation
according to its type and used as its default value. `description` - a
string to describe the agument. `metadata-objects` - an optional list of
any type, which can be used to generate code according to the schema.
There are notable rules in filling the `args`: 1) When `args` is None or
arguments from the function signature are missing from it, `schema.Field`
for these fields will be automatically generated and inserted into `args`.
That being said, every arguments in input function will have a
`schema.Field` counterpart in `Functor.__schema__.fields` sorted by the
declaration order of each argument in the function signature ( other than
the order in `args`). 2) Default argument values are specified along with
function definition as regular python functions, instead of being set at
`schema.Field` level. But validation rules can be set using `args` and
apply to argument values.
For example::
@pg.functor([('c', pg.typing.Int(min_value=0), 'Arg c')])
def foo(a, b, c=1, **kwargs):
return a + b + c + sum(kwargs.values())
assert foo.schema.fields() == [
pg.typing.Field('a', pg.Any(), 'Argument a'.),
pg.typing.Field('b', pg.Any(), 'Argument b'.),
pg.typing.Field('c', pg.typing.Int(), 'Arg c.),
pg.typing.Filed(
pg.typing.StrKey(), pg.Any(), 'Other arguments.')
]
# Prebind a=1, b=2, with default value c=1.
assert foo(1, 2)() == 4
returns: Optional schema specification for the return value.
base_class: Optional base class (derived from `symbolic.Functor`). If None,
returned type will inherit from `Functor` directly.
auto_doc: If True, the descriptions of argument fields will be inherited
from funciton docstr if they are not explicitly specified through
``args``.
auto_typing: If True, the value spec for constraining each argument will be
inferred from its annotation. Otherwise the value specs for all arguments
will be ``pg.typing.Any()``.
serialization_key: An optional string to be used as the serialization key
for the class during `sym_jsonify`. If None, `cls.__type_name__` will be
used. This is introduced for scenarios when we want to relocate a class,
before the downstream can recognize the new location, we need the class to
serialize it using previous key.
additional_keys: An optional list of strings as additional keys to
deserialize an object of the registered class. This can be useful when we
need to relocate or rename the registered class while being able to load
existing serialized JSON values.
add_to_registry: If True, the newly created functor class will be added to
the registry for deserialization.
Returns:
`symbolic.Functor` subclass that wraps input function.
Raises:
KeyError: names of symbolic arguments are not compatible with
function signature.
TypeError: types of symbolic arguments are not compatible with
function signature.
ValueError: default values of symbolic arguments are not compatible
with function signature.
"""
if not inspect.isfunction(func):
raise TypeError(f'{func!r} is not a function.')
class _Functor(base_class or Functor):
"""Functor wrapper for input function."""
# The schema for function-based Functor will be inferred from the function
# signature. Therefore we do not infer the schema automatically during class
# creation.
auto_schema = False
# Do not infer symbolic fields from annotations, since this functor is
# created from function definition which does not have class-level
# attributes.
infer_symbolic_fields_from_annotations = True
def _call(self, *args, **kwargs):
return func(*args, **kwargs)
cls = typing.cast(Type[Functor], _Functor)
cls.__name__ = func.__name__
cls.__qualname__ = func.__qualname__
cls.__module__ = getattr(func, '__module__', 'wrapper')
cls.__doc__ = func.__doc__
# Enable automatic registration for subclass.
cls.auto_register = True
# Apply function schema.
schema = schema_utils.function_schema(
func, args, returns, auto_doc=auto_doc, auto_typing=auto_typing)
cls.apply_schema(schema)
# Register functor class for deserialization if needed.
if add_to_registry:
cls.register_for_deserialization(serialization_key, additional_keys)
return cls
| (func: function, args: Optional[List[Union[Tuple[Tuple[str, pyglove.core.typing.class_schema.KeySpec], pyglove.core.typing.class_schema.ValueSpec, str], Tuple[Tuple[str, pyglove.core.typing.class_schema.KeySpec], pyglove.core.typing.class_schema.ValueSpec, str, Any]]]] = None, returns: Optional[pyglove.core.typing.class_schema.ValueSpec] = None, base_class: Optional[Type[pyglove.core.symbolic.functor.Functor]] = None, *, auto_doc: bool = False, auto_typing: bool = False, serialization_key: Optional[str] = None, additional_keys: Optional[List[str]] = None, add_to_registry: bool = False) -> Type[pyglove.core.symbolic.functor.Functor] | [
-0.022150719538331032,
-0.033665962517261505,
0.024399027228355408,
0.003497096011415124,
0.01663747802376747,
0.02398846670985222,
-0.05818229541182518,
-0.0143402935937047,
0.034858543425798416,
-0.029755864292383194,
-0.006456553470343351,
0.06784024089574814,
-0.011427268385887146,
0.016520174220204353,
0.0005098404362797737,
0.022815436124801636,
0.006505429279059172,
-0.006524980068206787,
-0.022248471155762672,
0.020586678758263588,
0.022834986448287964,
0.026334526017308235,
0.014829055406153202,
0.021231845021247864,
0.03904235363006592,
0.013724451884627342,
0.001974600600078702,
0.008196547627449036,
-0.0011595891555771232,
-0.038279883563518524,
-0.007482954766601324,
0.009574858471751213,
-0.05235624313354492,
0.003963864408433437,
0.019648253917694092,
-0.03403742238879204,
0.03935515880584717,
0.04883715510368347,
0.01922791823744774,
-0.005107568576931953,
-0.017566125839948654,
-0.02889564260840416,
-0.07644246518611908,
-0.023734308779239655,
0.03182821720838547,
0.06197509169578552,
0.008670647628605366,
0.038866396993398666,
-0.021994315087795258,
-0.051300518214702606,
-0.019785108044743538,
-0.052121639251708984,
0.0662762001156807,
-0.001830415683798492,
0.03130035474896431,
-0.029775414615869522,
0.0012866674223914742,
-0.02187701128423214,
-0.01862185262143612,
0.044105932116508484,
-0.017536800354719162,
0.05716566741466522,
-0.024653183296322823,
-0.0011760848574340343,
0.008827051147818565,
-0.00322338892146945,
-0.039863474667072296,
-0.04125155881047249,
-0.042580991983413696,
0.002517127199098468,
-0.04637379199266434,
0.018348146229982376,
0.05732207000255585,
-0.025552505627274513,
0.048798054456710815,
-0.040469538420438766,
0.01908128894865513,
-0.06002004072070122,
-0.009599296376109123,
-0.020840834826231003,
0.004970714915543795,
-0.054115790873765945,
-0.09298218786716461,
-0.03669629245996475,
0.000869386363774538,
-0.027351152151823044,
-0.009628621861338615,
-0.004828974138945341,
-0.035366859287023544,
-0.020606229081749916,
-0.07573864609003067,
-0.02488778904080391,
-0.00752205541357398,
0.03304034844040871,
-0.012082209810614586,
-0.059238020330667496,
-0.006437002681195736,
0.005425264127552509,
0.050909508019685745,
-0.01894443668425083,
0.024008017033338547,
0.060450151562690735,
-0.02005881443619728,
0.028973843902349472,
0.03018597513437271,
-0.02518104575574398,
-0.03835808485746384,
-0.0009359802934341133,
-0.03151540830731392,
0.018680505454540253,
-0.03360731154680252,
-0.007898402400314808,
0.0563836470246315,
0.037771571427583694,
0.006495654117316008,
-0.010967831127345562,
0.010449742898344994,
0.0017155564855784178,
-0.029853615909814835,
-0.026217222213745117,
0.014066586270928383,
-0.010703899897634983,
-0.004982934333384037,
0.007693122606724501,
-0.022913187742233276,
-0.03151540830731392,
0.0439104288816452,
0.02639317698776722,
0.00774688646197319,
0.029716763645410538,
0.051026809960603714,
0.012375467456877232,
-0.015288492664694786,
0.06048925220966339,
0.031046196818351746,
-0.009604183956980705,
0.020703980699181557,
0.03251248598098755,
-0.09634487330913544,
0.0807044729590416,
0.03740011155605316,
0.02938440442085266,
0.01976555772125721,
0.02697969228029251,
-0.044536042958498,
0.008001042529940605,
-0.00611930713057518,
-0.06639350205659866,
0.004528385121375322,
-0.04207267984747887,
-0.014956134371459484,
-0.002430371707305312,
0.03200417011976242,
0.025552505627274513,
-0.005708746612071991,
-0.01922791823744774,
-0.002375385956838727,
-0.053411971777677536,
-0.04011762887239456,
0.0028641484677791595,
-0.030127324163913727,
0.03403742238879204,
-0.0009818017715588212,
-0.071085624396801,
-0.001450402894988656,
-0.008919916115701199,
0.048211537301540375,
-0.05771308019757271,
-0.008387165144085884,
0.03188686817884445,
-0.008641322143375874,
-0.04582637548446655,
0.043089307844638824,
0.03839718550443649,
-0.011837828904390335,
0.036872245371341705,
0.01213108655065298,
0.0100880591198802,
0.035660114139318466,
-0.03239518031477928,
0.05591443553566933,
0.002385161118581891,
-0.07472202181816101,
0.017742080613970757,
0.023929813876748085,
0.024399027228355408,
-0.04656929522752762,
0.025532955303788185,
0.05431129410862923,
-0.02068443037569523,
-0.035073600709438324,
0.0038612240459769964,
0.020332522690296173,
-0.0005874314811080694,
0.025220148265361786,
-0.02678418718278408,
-0.033978771418333054,
0.0694824829697609,
0.0392378568649292,
0.032668888568878174,
-0.001390529447235167,
0.03239518031477928,
0.08219031244516373,
-0.002898361999541521,
-0.046608395874500275,
-0.025963066145777702,
0.017546575516462326,
0.037576064467430115,
-0.028524182736873627,
-0.05740027502179146,
0.04101695120334625,
-0.042893800884485245,
-0.05998094007372856,
0.051535122096538544,
-0.02277633547782898,
-0.02828957699239254,
0.04175987094640732,
-0.010469294153153896,
-0.031241701915860176,
-0.043011102825403214,
0.07761549204587936,
0.029169348999857903,
-0.024320824071764946,
-0.012297265231609344,
0.04653019458055496,
-0.020039264112710953,
0.028934743255376816,
-0.023108692839741707,
-0.0043939752504229546,
-0.02426217310130596,
0.03759561479091644,
-0.054037585854530334,
0.008841714821755886,
-0.01651039905846119,
0.0315740592777729,
-0.04754681885242462,
0.060841161757707596,
0.0344284325838089,
0.03450663760304451,
-0.025005090981721878,
0.02136869914829731,
-0.030928894877433777,
0.027214298024773598,
-0.02938440442085266,
-0.033450908958911896,
-0.007263011299073696,
0.03663764148950577,
0.02437947504222393,
0.0034531073179095984,
-0.015552423894405365,
-0.019530951976776123,
0.008538682013750076,
-0.009413566440343857,
0.025630708783864975,
0.02306959219276905,
0.0020857942290604115,
-0.05286455526947975,
-0.03573831915855408,
0.00004815074862563051,
0.01721421629190445,
0.020019713789224625,
-0.008362727239727974,
0.01806466281414032,
0.07566044479608536,
0.026217222213745117,
-0.06557238101959229,
-0.015171189792454243,
-0.029560359194874763,
0.03390057012438774,
0.030655186623334885,
0.04336301237344742,
-0.00881238840520382,
0.024144869297742844,
-0.028328677639365196,
-0.019384322687983513,
-0.023519253358244896,
-0.049931980669498444,
-0.02076263353228569,
0.062248796224594116,
-0.07319708168506622,
-0.024731384590268135,
-0.048367939889431,
-0.043284811079502106,
-0.033744167536497116,
-0.02336284890770912,
0.05278635397553444,
-0.03472169116139412,
-0.00004700521094491705,
0.01653972454369068,
-0.0489935576915741,
0.07718538492918015,
-0.022952288389205933,
0.03257113695144653,
0.0039858585223555565,
0.011036258190870285,
0.010351990349590778,
-0.07038180530071259,
-0.04778142645955086,
0.034545738250017166,
-0.08829006552696228,
-0.009017668664455414,
-0.018152641132473946,
0.02549385465681553,
-0.011485920287668705,
0.01852410100400448,
-0.029521258547902107,
-0.02087993547320366,
-0.031456757336854935,
-0.039589766412973404,
0.06318721920251846,
-0.023597456514835358,
0.026021717116236687,
-0.06037195026874542,
-0.002368054585531354,
-0.01588478311896324,
0.06197509169578552,
-0.034154728055000305,
-0.056344546377658844,
0.059355322271585464,
0.04344121366739273,
0.0273902527987957,
0.01852410100400448,
-0.03472169116139412,
0.058338697999715805,
-0.014262091368436813,
-0.0037292581982910633,
0.000002916346829806571,
-0.06572879105806351,
0.023792961612343788,
0.004020072054117918,
0.004305997863411903,
0.013792878948152065,
0.03610977530479431,
0.050909508019685745,
-0.01384175568819046,
0.04535716399550438,
0.0531773641705513,
-0.0190617386251688,
-0.002534233732149005,
-0.0072190226055681705,
0.026041269302368164,
-0.00617307098582387,
0.025513404980301857,
0.006334362551569939,
-0.0370091013610363,
-0.024516329169273376,
0.03792797401547432,
-0.017184890806674957,
0.11425313353538513,
-0.033255401998758316,
0.046491093933582306,
-0.02957990951836109,
-0.01701871119439602,
0.012033334001898766,
0.063421830534935,
-0.026354076340794563,
-0.03704820200800896,
-0.01108513493090868,
0.013812429271638393,
-0.05337287113070488,
0.06365643441677094,
-0.07542583346366882,
-0.035660114139318466,
0.004259565379470587,
0.06557238101959229,
0.04586547613143921,
-0.000315862795105204,
-0.005395938642323017,
-0.015053885988891125,
0.015083212405443192,
0.06514227390289307,
-0.049619175493717194,
-0.022893637418746948,
-0.04375402256846428,
-0.02068443037569523,
-0.0060802060179412365,
0.03262978792190552,
0.030342379584908485,
-0.05998094007372856,
0.032160576432943344,
0.019003087654709816,
-0.028543733060359955,
0.010205361992120743,
0.003379792906343937,
-0.0038367859087884426,
0.05669645592570305,
-0.032962147146463394,
0.02326509729027748,
0.04778142645955086,
-0.006094868760555983,
-0.028230924159288406,
0.027839913964271545,
0.026745086535811424,
-0.017712755128741264,
-0.0068084620870649815,
-0.020019713789224625,
0.02297184057533741,
-0.004860743414610624,
0.017546575516462326,
-0.031339455395936966,
-0.024008017033338547,
-0.02568935975432396,
0.06490766257047653,
0.0423072874546051,
0.0305965356528759,
0.011857379227876663,
0.013079285621643066,
-0.040391337126493454,
0.019315896555781364,
0.08578760176897049,
0.03845583647489548,
0.001263451180420816,
-0.04054773971438408,
0.019413648173213005,
0.01479972992092371,
0.06353913247585297,
-0.027155647054314613,
-0.044614244252443314,
-0.00904699508100748,
0.017927810549736023,
0.0365203358232975,
0.04852434620261192,
0.0007856857846491039,
0.055523425340652466,
0.01721421629190445,
0.08046986907720566,
0.023245546966791153,
0.010762550868093967,
0.009134972468018532,
0.04864164814352989,
0.003592404769733548,
-0.018905336037278175,
-0.07210224866867065,
-0.003081647912040353,
-0.024907339364290237,
-0.03204327076673508,
-0.055523425340652466,
-0.029521258547902107,
0.007233685813844204,
0.05286455526947975,
-0.024731384590268135,
-0.007072394248098135,
0.013734227977693081,
0.007996154949069023,
-0.029325753450393677,
0.020528027787804604,
0.02768351137638092,
0.023343298584222794,
0.016451748088002205,
0.043480318039655685,
0.09337319433689117,
-0.029931819066405296,
0.024711834266781807,
0.039061903953552246,
0.03945291414856911,
-0.012981533072888851,
0.0004032290889881551,
-0.04305020347237587,
-0.0015628181863576174,
0.02308914251625538,
0.0045430478639900684,
-0.015200515277683735,
-0.0012145749060437083,
-0.05755667760968208,
-0.06619799882173538,
0.02207251638174057,
0.0637737363576889,
0.013636475428938866,
-0.03372461721301079,
-0.006925765424966812,
0.06475125998258591,
-0.018387246876955032,
-0.043558519333601,
-0.01976555772125721,
0.016226915642619133,
0.07374449074268341,
0.0009536979487165809,
-0.028015868738293648,
-0.04082144796848297,
-0.04262009263038635,
0.04363672062754631,
-0.014526022598147392,
0.0035142027772963047,
0.015816355124115944,
0.059941839426755905,
0.015591525472700596,
0.04531806334853172,
0.007678459398448467,
0.00904699508100748,
0.035679664462804794,
-0.03753696382045746,
0.09133994579315186,
0.05740027502179146,
-0.012531871907413006,
0.027859464287757874,
-0.020645329728722572,
0.03349000960588455,
0.048328839242458344,
-0.026921041309833527,
-0.04637379199266434,
-0.021349148824810982,
-0.008641322143375874,
-0.06979528814554214,
0.04305020347237587,
0.009892554022371769,
-0.045591771602630615,
-0.023949364200234413,
0.013959058560431004,
-0.00432799244299531,
-0.02506374381482601,
-0.00010325108451070264,
-0.018563201650977135,
0.008724411018192768,
0.009511318989098072,
-0.04844614490866661,
0.006994192022830248,
0.048602547496557236,
0.005410601384937763,
-0.10299204289913177,
-0.07796739786863327,
-0.004486840218305588,
0.010918955318629742,
-0.018035337328910828,
0.002651536837220192,
0.0035728542134165764,
0.021896561607718468,
0.056227244436740875,
-0.03130035474896431,
0.058338697999715805,
0.015972759574651718,
-0.023597456514835358,
-0.001256119692698121,
-0.02367565780878067,
0.04414503276348114,
-0.03841673582792282,
0.034780342131853104,
0.004748328123241663,
0.021935662254691124,
0.04852434620261192,
-0.04351941868662834,
0.024535879492759705,
0.09650127589702606,
-0.02185746096074581,
0.07061640918254852,
-0.018172191455960274,
-0.018201516941189766,
0.02508329413831234,
-0.019384322687983513,
-0.03759561479091644,
-0.014477146789431572,
-0.08015705645084381,
-0.006016667000949383,
0.07472202181816101,
-0.009413566440343857,
-0.02467273361980915,
-0.037165503948926926,
0.02520059607923031,
0.04297200217843056,
-0.025943515822291374,
-0.012258164584636688,
-0.02076263353228569,
0.040704146027565,
0.06557238101959229,
-0.004931614268571138,
-0.001594587811268866,
0.01855342648923397,
0.05435039475560188,
0.008123233914375305,
-0.04543536528944969,
-0.03800617530941963,
0.028348227962851524,
0.040078528225421906,
-0.0521998405456543,
-0.014936583116650581,
-0.03118305094540119,
0.01660815067589283,
-0.01002940721809864,
0.007453628815710545,
-0.026530031114816666,
-0.08351974189281464,
-0.052512649446725845,
0.004758103284984827,
-0.020938588306307793,
-0.040078528225421906,
-0.009907216764986515,
-0.014789954759180546,
-0.03208237513899803,
0.04246369004249573,
-0.09110534191131592,
-0.016256242990493774,
-0.039394259452819824,
0.008494692854583263,
-0.06803574413061142,
-0.031456757336854935,
-0.04707760736346245,
-0.006886664312332869,
-0.022131167352199554,
0.025415653362870216,
0.005943352356553078,
-0.017888709902763367,
-0.089072085916996,
0.042189981788396835,
-0.017976686358451843,
-0.022189820185303688,
-0.036657191812992096,
-0.03292304649949074,
-0.02979496493935585,
0.02617812156677246,
0.02015656791627407,
-0.06592429429292679,
0.009511318989098072,
0.018709830939769745,
0.007487842347472906,
0.046491093933582306,
0.01791803538799286,
-0.0016361325979232788,
-0.020606229081749916,
-0.0053568375296890736,
0.05083130672574043,
-0.0006506651407107711,
-0.032453831285238266,
-0.05751757696270943,
0.029032494872808456,
0.0008443372789770365,
-0.02068443037569523,
-0.010703899897634983,
0.005591443739831448,
0.001674011698924005,
0.04606098309159279,
-0.04211178049445152,
0.0002572113007772714,
-0.001604363089427352,
0.028367778286337852,
-0.03433068096637726,
0.006994192022830248,
-0.05384208261966705,
-0.018054887652397156,
0.04875895008444786,
-0.0005852931644767523,
-0.00479476060718298,
-0.02957990951836109,
-0.02156420424580574,
-0.005997116677463055,
0.0014039704110473394,
0.058221396058797836,
-0.04723401367664337,
0.020117467269301414,
-0.02146645076572895,
0.09556285291910172,
-0.01534714363515377,
0.0053421747870743275,
0.02940395474433899,
0.01319658849388361,
-0.0007282561855390668,
0.031163500621914864,
-0.03859269246459007,
0.0423072874546051,
-0.052317142486572266,
0.051026809960603714,
-0.000670215638820082,
-0.013988384045660496,
-0.040665045380592346,
0.040274035185575485,
0.01745859906077385,
-0.03730235621333122,
-0.007673571817576885,
-0.008480030111968517,
-0.0012353473575785756,
0.01138816773891449,
0.026041269302368164,
0.02609992027282715,
0.019139941781759262,
0.017546575516462326,
-0.038768645375967026,
0.011505470611155033,
-0.020723532885313034,
0.025923965498805046,
0.023734308779239655,
-0.016373544931411743,
0.006217059679329395,
0.044184133410453796,
0.047194913029670715,
-0.05098770931363106,
-0.008084132336080074,
-0.03343135863542557,
-0.06909147650003433,
0.02105589024722576,
0.001126597635447979,
-0.0461391843855381,
-0.050714001059532166,
0.032668888568878174,
-0.029227999970316887,
0.06514227390289307,
-0.04082144796848297,
-0.06615889817476273,
-0.043284811079502106,
-0.0573611743748188,
0.02789856679737568,
0.08453637361526489,
0.007189697120338678,
0.013783103786408901,
0.07354898750782013,
-0.03622708097100258,
0.023147793486714363,
0.04015672951936722,
0.01894443668425083,
-0.028309127315878868,
-0.048016034066677094,
0.053529273718595505,
-0.013255240395665169,
0.020586678758263588,
0.014027484692633152,
0.009281600825488567,
-0.010850528255105019,
0.05345107242465019,
-0.0031598499044775963,
-0.014359843917191029,
0.04320660978555679,
-0.029521258547902107,
-0.008802613243460655,
0.011407718062400818,
-0.014672651886940002,
0.057830385863780975,
0.0060899811796844006,
0.03509315103292465,
-0.020840834826231003,
-0.0017228879733011127,
-0.007346101105213165,
-0.0392378568649292,
0.014183889143168926,
0.09345139563083649,
0.05208253860473633,
-0.04946276918053627,
-0.02308914251625538,
-0.008988343179225922,
-0.06361733376979828,
0.010293339379131794,
-0.06678451597690582,
-0.03859269246459007,
0.017184890806674957,
-0.06924787908792496,
0.013362768106162548,
0.004369537346065044,
0.04625648632645607,
0.07296247035264969,
-0.028758788481354713,
0.022815436124801636,
-0.019579827785491943,
0.037458762526512146,
0.01750747486948967,
-0.02999047003686428,
0.03550371155142784,
-0.014369619078934193,
-0.03642258420586586,
0.010498619638383389,
0.0019269463373348117,
-0.03544506058096886,
0.009657948277890682,
-0.02246352657675743,
-0.061544980853796005,
-0.02025431953370571,
-0.04140796139836311,
0.006818237714469433,
-0.061662282794713974,
0.06651080399751663,
-0.007531831040978432,
-0.0060802060179412365,
0.03350955992937088
]
|
41,554 | pyglove.core.typing.type_conversion | get_converter | Get converter from source type to destination type. | def get_converter(
src: Type[Any], dest: Union[Type[Any], Tuple[Type[Any], ...]]
) -> Optional[Callable[[Any], Any]]:
"""Get converter from source type to destination type."""
dest_types = dest if isinstance(dest, tuple) else (dest,)
for dest in dest_types:
converter = _TYPE_CONVERTER_REGISTRY.get_converter(src, dest)
if converter is not None:
return converter
return None
| (src: Type[Any], dest: Union[Type[Any], Tuple[Type[Any], ...]]) -> Optional[Callable[[Any], Any]] | [
-0.005433232989162207,
-0.06130380555987358,
-0.019117454066872597,
-0.040229443460702896,
-0.048922616988420486,
-0.00822746753692627,
0.08309318870306015,
0.03488558903336525,
0.05784158781170845,
0.023313509300351143,
0.01841183938086033,
0.030595453456044197,
-0.0029377092141658068,
-0.010828833095729351,
0.04090683534741402,
0.07233020663261414,
-0.02438604272902012,
0.04719151183962822,
0.00041043254896067083,
0.023068895563483238,
0.008232171647250652,
-0.040718670934438705,
0.05389014631509781,
-0.006049470044672489,
-0.03319211304187775,
0.03343672677874565,
0.01785675622522831,
-0.014996664598584175,
-0.052347201853990555,
0.01277633011341095,
0.010386648587882519,
-0.03622155264019966,
0.028544466942548752,
0.031724438071250916,
-0.010160851292312145,
0.08738332241773605,
-0.008048711344599724,
0.08655539900064468,
-0.06533051282167435,
-0.05193324014544487,
-0.03441518172621727,
-0.020284069702029228,
0.018656453117728233,
-0.003372838255017996,
0.04011654853820801,
0.008617907762527466,
-0.07707194238901138,
-0.08580274879932404,
-0.049562375992536545,
-0.018383614718914032,
0.0292971208691597,
-0.05483096465468407,
0.026342948898673058,
-0.004047876223921776,
0.041697122156620026,
0.022184526547789574,
-0.036428533494472504,
0.0893402248620987,
-0.012729289010167122,
0.070072241127491,
-0.015975115820765495,
-0.011214569211006165,
-0.0031470414251089096,
0.019399700686335564,
-0.03996601700782776,
-0.023181794211268425,
-0.016520792618393898,
-0.0550943948328495,
-0.004755842965096235,
0.05614811182022095,
-0.05343855172395706,
0.008627315983176231,
-0.02982398122549057,
0.002098027616739273,
0.06254568696022034,
-0.016313811764121056,
0.055320192128419876,
-0.008923674002289772,
0.04278847575187683,
-0.01875053346157074,
0.0419229194521904,
-0.005254477262496948,
-0.036786045879125595,
-0.03864886984229088,
0.03765159845352173,
-0.01172261219471693,
-0.04816996306180954,
0.0332861952483654,
0.008420335128903389,
-0.011684979312121868,
-0.03208194673061371,
-0.09528620541095734,
-0.022504404187202454,
0.013406679034233093,
-0.0071596368215978146,
0.002980045974254608,
-0.04034234210848808,
0.028939610347151756,
0.02833748608827591,
0.006566920783370733,
-0.00032575876684859395,
-0.012418818660080433,
-0.007818210870027542,
0.041546594351530075,
0.03275933861732483,
-0.05358908325433731,
0.036974210292100906,
0.03748225048184395,
-0.05023976415395737,
-0.005988316610455513,
-0.013632475398480892,
-0.02636176533997059,
-0.003937330096960068,
-0.02342640794813633,
0.006049470044672489,
-0.029071325436234474,
-0.01271047256886959,
0.01415933482348919,
-0.01310561690479517,
0.003210546914488077,
-0.05246010050177574,
0.06134143844246864,
0.01424400880932808,
0.01996419206261635,
0.013557210564613342,
-0.021676482632756233,
0.04369166120886803,
-0.04075630381703377,
0.013670108281075954,
0.017320487648248672,
0.04519697278738022,
-0.000014488989108940586,
-0.03584522753953934,
0.0671745166182518,
-0.0003980842884629965,
0.019286802038550377,
-0.037595149129629135,
0.05637390911579132,
-0.03125402703881264,
-0.0028953722212463617,
0.020284069702029228,
0.017207590863108635,
0.03127284348011017,
-0.056449174880981445,
-0.022523220628499985,
0.005419120658189058,
0.05174507573246956,
0.05212140455842018,
0.02242913842201233,
0.04083156958222389,
-0.07093779742717743,
0.004170182626694441,
-0.0015311838360503316,
0.03657906502485275,
-0.007625342812389135,
-0.013707741163671017,
-0.012155389413237572,
0.05919636785984039,
0.0016958273481577635,
-0.031366925686597824,
0.01271047256886959,
0.009869197383522987,
-0.038761768490076065,
-0.06326071172952652,
0.06894326210021973,
0.01623854599893093,
0.014479213394224644,
0.0067268600687384605,
0.046627018600702286,
-0.014676785096526146,
-0.07334629446268082,
0.007954629138112068,
-0.0026295906864106655,
-0.009323522448539734,
0.025928987190127373,
-0.0058989389799535275,
0.021168440580368042,
-0.011073446832597256,
0.025176331400871277,
0.02210926078259945,
0.01925857737660408,
0.02685099095106125,
-0.028469201177358627,
0.022015178576111794,
0.043315332382917404,
0.04060577228665352,
0.019126862287521362,
0.023558123037219048,
-0.021224889904260635,
-0.06017481908202171,
0.02754719741642475,
0.0482075959444046,
-0.022184526547789574,
-0.031197577714920044,
-0.0338883213698864,
-0.015260093845427036,
-0.02423551306128502,
0.056110478937625885,
-0.004546510521322489,
0.031536273658275604,
-0.017311079427599907,
0.021732931956648827,
0.02180819772183895,
0.09370563179254532,
-0.03426465019583702,
-0.02801760658621788,
0.02440485917031765,
0.06243278831243515,
-0.0061858887784183025,
-0.031178761273622513,
0.03424583375453949,
-0.03428346663713455,
-0.004443020559847355,
-0.0527987964451313,
0.003702125046402216,
-0.026004252955317497,
-0.01734871231019497,
-0.06450258940458298,
-0.03706829249858856,
0.02933475375175476,
0.02835630252957344,
-0.03339909389615059,
-0.025458578020334244,
0.0537019819021225,
0.09566253423690796,
-0.027641279622912407,
-0.06326071172952652,
-0.011120487004518509,
0.0071831573732197285,
-0.0309905968606472,
0.0350361205637455,
-0.007705312222242355,
0.023990899324417114,
0.020528683438897133,
0.01186373457312584,
-0.010932323522865772,
0.019700761884450912,
0.007503035943955183,
0.011214569211006165,
0.02160121686756611,
-0.02570319175720215,
0.026907440274953842,
-0.03227011114358902,
0.047266777604818344,
0.016596056520938873,
-0.022240974009037018,
0.026474662125110626,
-0.012785738334059715,
0.0010149091249331832,
0.02066039852797985,
0.027566013857722282,
0.006717451848089695,
-0.005193324293941259,
-0.0508042573928833,
-0.018186042085289955,
-0.0585942417383194,
-0.0792546421289444,
-0.07312049716711044,
0.018223674967885017,
-0.024461308494210243,
-0.002733080880716443,
0.040568139404058456,
0.022730201482772827,
0.07379788905382156,
-0.04504644125699997,
-0.051030054688453674,
-0.01779089868068695,
-0.040229443460702896,
-0.0026248865760862827,
0.020528683438897133,
-0.011318059638142586,
0.002827162854373455,
0.009709257632493973,
0.032364193350076675,
0.02163884975016117,
-0.0482075959444046,
0.024329595267772675,
0.016097422689199448,
0.06333597749471664,
-0.05193324014544487,
-0.017659183591604233,
0.016172688454389572,
-0.031555090099573135,
-0.029748715460300446,
0.006929136347025633,
0.006524583790451288,
0.012503492645919323,
-0.13148894906044006,
-0.009271777234971523,
-0.02276783436536789,
0.06405099481344223,
0.008401518687605858,
0.005814264994114637,
0.0029941583052277565,
-0.00805811956524849,
0.07820092141628265,
-0.025985436514019966,
-0.03262762352824211,
0.04865919053554535,
-0.008759030140936375,
-0.04948711022734642,
-0.026587560772895813,
0.03356844186782837,
0.029428835958242416,
-0.036635514348745346,
-0.004043172113597393,
-0.06156723201274872,
-0.06484128534793854,
-0.04147132858633995,
0.027114421129226685,
-0.030557820573449135,
-0.04730440676212311,
-0.05031502991914749,
0.016652505844831467,
0.000015352632544818334,
-0.014037027955055237,
0.014102885499596596,
0.08595328032970428,
0.006929136347025633,
0.051669809967279434,
-0.03691776096820831,
0.048884984105825424,
-0.0060212453827261925,
0.0016546663828194141,
0.011073446832597256,
0.0527987964451313,
-0.06563157588243484,
0.012654023244976997,
0.04960000887513161,
0.042336881160736084,
-0.040078915655612946,
0.011195752769708633,
0.03228892758488655,
0.010207892395555973,
0.04060577228665352,
-0.002980045974254608,
0.05189560726284981,
-0.026342948898673058,
0.005743703339248896,
-0.022579669952392578,
0.029090141877532005,
0.009285889565944672,
-0.00044894733582623303,
0.010358423925936222,
-0.0005101006245240569,
0.04816996306180954,
-0.006632777862250805,
-0.034829139709472656,
0.03541244938969612,
-0.031084679067134857,
-0.01229651179164648,
-0.06231988966464996,
-0.010207892395555973,
0.0034292873460799456,
-0.017819123342633247,
0.010019728913903236,
-0.006929136347025633,
-0.026004252955317497,
0.04719151183962822,
-0.06239515542984009,
0.015786953270435333,
0.0416218601167202,
0.008326252922415733,
-0.04372929409146309,
-0.0018181338673457503,
0.07368499040603638,
-0.03821609169244766,
-0.0439174585044384,
-0.00025122822262346745,
0.020058274269104004,
-0.0027001521084457636,
0.10800608992576599,
-0.00973748229444027,
-0.05833081528544426,
-0.12584403157234192,
-0.04177238792181015,
0.00395849859341979,
0.01811077632009983,
-0.04060577228665352,
-0.007150228600949049,
0.02946646884083748,
0.003443399677053094,
-0.05061609297990799,
0.07643218338489532,
0.03985311836004257,
-0.08949075639247894,
-0.029786348342895508,
0.020246436819434166,
-0.03163035586476326,
-0.012494084425270557,
0.0010072649456560612,
-0.0013865329092368484,
0.014309865422546864,
-0.04519697278738022,
0.04572383314371109,
-0.0585942417383194,
-0.00849089678376913,
0.0841469019651413,
0.004179590847343206,
0.01704765111207962,
-0.02654992789030075,
0.0145732956007123,
0.01302094291895628,
0.0318937823176384,
-0.05885767191648483,
0.044481948018074036,
0.0844479650259018,
0.05915873497724533,
0.028469201177358627,
0.018223674967885017,
0.023783918470144272,
0.027810627594590187,
0.028393935412168503,
-0.011826101690530777,
-0.0335872583091259,
0.005038088653236628,
-0.05754052475094795,
0.006581033114343882,
-0.06134143844246864,
0.0011025229468941689,
0.016746588051319122,
-0.018552962690591812,
0.00032370074768550694,
-0.052535366266965866,
0.046777550131082535,
-0.04372929409146309,
0.030407289043068886,
0.06333597749471664,
-0.05648680776357651,
0.01623854599893093,
-0.015862219035625458,
-0.044971175491809845,
0.040229443460702896,
-0.10017847269773483,
-0.01459211204200983,
0.022372689098119736,
0.01637026108801365,
0.016887711361050606,
0.052874062210321426,
-0.01900455541908741,
0.006275266408920288,
0.006900911685079336,
-0.01751806028187275,
-0.03215721249580383,
-0.06506708264350891,
-0.048922616988420486,
-0.02376510202884674,
0.025928987190127373,
-0.030520187690854073,
-0.03640971705317497,
-0.015269502066075802,
0.01751806028187275,
0.01409347727894783,
-0.03505493700504303,
0.05716419592499733,
-0.0005101006245240569,
-0.02559029310941696,
0.012494084425270557,
-0.041998185217380524,
0.00720197381451726,
0.030689535662531853,
-0.04425615444779396,
0.05866950750350952,
-0.050051603466272354,
-0.0018099016742780805,
-0.016332628205418587,
0.0625833198428154,
-0.04602489247918129,
0.0179414302110672,
0.012400002218782902,
0.04707861319184303,
-0.005372080020606518,
0.022730201482772827,
-0.030539004132151604,
0.0044289082288742065,
-0.01106403861194849,
0.01017025951296091,
-0.014996664598584175,
0.020246436819434166,
0.03622155264019966,
-0.01194840855896473,
0.013905313797295094,
0.029861614108085632,
-0.012823371216654778,
-0.03936389088630676,
-0.005682550370693207,
0.00430424977093935,
0.00048716814490035176,
-0.05697603523731232,
0.04117026552557945,
-0.005009864456951618,
0.07970623672008514,
0.010762975551187992,
-0.06905616074800491,
0.003843247890472412,
-0.04339059814810753,
0.04339059814810753,
-0.0514063835144043,
0.010207892395555973,
0.014319273643195629,
0.052874062210321426,
0.014610928483307362,
-0.023520490154623985,
-0.01745220273733139,
0.021996362134814262,
-0.08520062267780304,
-0.015128378756344318,
0.028243403881788254,
-0.03543126583099365,
0.03257117420434952,
0.011120487004518509,
0.032345376908779144,
-0.01001032069325447,
0.008039303123950958,
0.008824887685477734,
-0.012070715427398682,
0.04312716796994209,
-0.034810323268175125,
-0.005287406034767628,
-0.00733368843793869,
-0.03567587956786156,
0.026342948898673058,
0.0007979326182976365,
0.024197880178689957,
-0.0037985590752214193,
0.037294089794158936,
0.002674279734492302,
0.006722155958414078,
-0.021187257021665573,
-0.05720182880759239,
0.018976330757141113,
-0.01286100409924984,
-0.008119272999465466,
-0.0012383537832647562,
-0.021582400426268578,
-0.05291169509291649,
-0.014582703821361065,
-0.014959031715989113,
-0.022485587745904922,
0.0014735587174072862,
0.0058518978767097,
0.012851595878601074,
-0.000060565260355360806,
0.06642185896635056,
0.0016887711826711893,
0.004045524168759584,
-0.028393935412168503,
0.011383917182683945,
-0.01219302136451006,
0.004480653442442417,
-0.04275084286928177,
-0.02045341767370701,
-0.030689535662531853,
0.06924431771039963,
-0.07300759851932526,
0.04075630381703377,
-0.060551147907972336,
0.03469742462038994,
-0.018223674967885017,
-0.007357208989560604,
0.008594387210905552,
-0.020923826843500137,
-0.006867982912808657,
0.07688377797603607,
-0.03657906502485275,
-0.005494386423379183,
0.04090683534741402,
0.02702033892273903,
0.004920486360788345,
-0.009008347056806087,
0.0021086118649691343,
-0.03240182623267174,
0.02180819772183895,
-0.06804007291793823,
0.03215721249580383,
0.020039457827806473,
-0.00004318214996601455,
-0.09483461081981659,
0.0084720803424716,
0.0179414302110672,
-0.009144766256213188,
0.012437635101377964,
0.04967527464032173,
-0.020585132762789726,
-0.01596570760011673,
-0.06326071172952652,
-0.02636176533997059,
-0.03639090061187744,
-0.054943863302469254,
0.008199242874979973,
0.021055541932582855,
0.044632479548454285,
-0.02734021656215191,
-0.006980881094932556,
0.023840367794036865,
-0.04470774531364441,
-0.017376936972141266,
0.049750540405511856,
0.015739912167191505,
-0.04143369570374489,
-0.04011654853820801,
-0.008081640116870403,
-0.015871627256274223,
-0.04500880837440491,
0.0729699656367302,
-0.013971170410513878,
-0.0006920904270373285,
-0.07123886048793793,
0.02767891250550747,
0.008015782572329044,
0.03720000758767128,
0.0006538695888593793,
0.0445195809006691,
0.015514114871621132,
0.015213052742183208,
-0.039552055299282074,
-0.014206375926733017,
-0.03520546853542328,
-0.08166313916444778,
0.06066404655575752,
-0.0065622166730463505,
0.06454022228717804,
0.005814264994114637,
0.01203308254480362,
-0.0006150607950985432,
0.027434298768639565,
-0.023012446239590645,
0.0005389132420532405,
0.010828833095729351,
0.017339304089546204,
0.016342036426067352,
0.0029306530486792326,
0.0633736103773117,
0.0055602435022592545,
-0.06273385137319565,
-0.006576329004019499,
0.018741125240921974,
-0.011844918131828308,
-0.0018345981370657682,
0.025006985291838646,
-0.000133331777760759,
0.03755751624703407,
0.018543554469943047,
0.01464856043457985,
0.030689535662531853,
0.021093174815177917,
0.03650379925966263,
0.0010948787676170468,
-0.046627018600702286,
0.006665706634521484,
-0.008505009114742279,
0.044783011078834534,
-0.03080243244767189,
0.041847653687000275,
-0.01925857737660408,
0.02472473867237568,
-0.008754326030611992,
-0.007926405407488346,
0.046100158244371414,
0.024329595267772675,
0.009850380942225456,
0.01557997241616249,
0.05396541208028793,
0.01343490369617939,
-0.028393935412168503,
0.0019733691588044167,
-0.018778758123517036,
-0.06762611120939255,
-0.010988772846758366,
-0.02705797180533409,
-0.013199699111282825,
-0.00728664780035615,
-0.014498029835522175,
-0.04553566873073578,
-0.057766322046518326,
0.019136270508170128,
0.053175121545791626,
0.006656298413872719,
-0.014977848157286644,
0.0029000763315707445,
0.0003948502126149833,
-0.001058422029018402,
-0.054793331772089005,
0.07767406105995178,
-0.02323824353516102,
0.020905010402202606,
0.03142337501049042,
-0.04960000887513161,
0.07097543030977249,
-0.06514234840869904,
0.057728689163923264,
0.033681340515613556,
0.032872237265110016,
-0.023821551352739334,
-0.02737784944474697,
-0.03014385886490345,
-0.06073931232094765,
0.003777390578761697,
-0.02013353817164898,
0.011082855053246021,
0.056110478937625885,
-0.014168743044137955,
-0.0011948408791795373,
-0.005475569982081652,
0.03738817200064659,
-0.0422239825129509,
-0.010377240367233753,
0.012164797633886337,
0.028920793905854225,
-0.017038242891430855,
-0.006402277387678623,
-0.04030470922589302,
0.04060577228665352,
0.01623854599893093,
-0.03524310141801834,
-0.015805769711732864,
-0.03063308633863926,
0.05614811182022095,
-0.007822914980351925,
0.03879940137267113,
0.000537149200681597,
-0.07598058879375458,
0.005376784130930901,
-0.003278756281360984,
0.05197087302803993,
0.06800244003534317,
-0.027641279622912407,
-0.03394477069377899,
0.0032881645020097494,
0.004003187175840139,
0.018251899629831314,
0.001756980549544096,
0.028092872351408005,
0.04896024987101555,
0.004967527464032173,
0.006689227186143398,
0.025834904983639717,
0.04128316417336464,
-0.014319273643195629,
-0.026342948898673058,
-0.05328802019357681,
0.05358908325433731,
0.032533541321754456,
0.09573780000209808,
0.013670108281075954,
-0.03507375344634056,
0.05057846009731293,
-0.008288620971143246,
-0.012127164751291275,
-0.023332325741648674,
0.021036725491285324,
-0.013162066228687763,
0.025176331400871277,
-0.0055602435022592545,
-0.008105160668492317,
-0.08738332241773605,
-0.01269165612757206,
-0.023369958624243736,
-0.04312716796994209,
0.04500880837440491,
-0.01146859023720026,
0.03127284348011017,
0.0020333463326096535,
-0.028111688792705536,
0.024179063737392426,
-0.02017117105424404,
-0.01219302136451006,
0.023031262680888176
]
|
41,555 | pyglove.core.symbolic.flags | get_load_handler | Returns global load handler. | def get_load_handler() -> Optional[Callable[..., Any]]:
"""Returns global load handler."""
return _LOAD_HANDLER
| () -> Optional[Callable[..., Any]] | [
-0.016670288518071175,
-0.05853474885225296,
-0.02412319928407669,
0.021173637360334396,
0.021577445790171623,
0.037677135318517685,
0.09122572094202042,
0.026335369795560837,
-0.03409552574157715,
-0.04652582108974457,
0.02686207741498947,
-0.04290909692645073,
0.002071715658530593,
-0.04052135348320007,
-0.009796757251024246,
0.0029210313223302364,
-0.03288409858942032,
0.02547508105635643,
-0.009831870906054974,
-0.05583098158240318,
-0.010428806766867638,
0.01741645857691765,
0.0500723160803318,
-0.0606766901910305,
-0.01987442560493946,
0.027687251567840576,
0.01159634068608284,
0.014747806824743748,
0.04715786874294281,
-0.033884841948747635,
0.023122454062104225,
-0.0515119843184948,
-0.020576702430844307,
0.02396518550813198,
-0.0009036323754116893,
0.0326031893491745,
0.03290165588259697,
0.04793037101626396,
-0.029794082045555115,
-0.059061456471681595,
-0.0636262521147728,
-0.014124536886811256,
0.05576075613498688,
-0.03732599690556526,
0.03428865224123001,
0.017328673973679543,
-0.03133909031748772,
0.01205282099545002,
0.014194764196872711,
0.0017589832423254848,
0.0033204511273652315,
0.01586267165839672,
-0.014159650541841984,
0.020401133224368095,
0.0032173043582588434,
0.0606064647436142,
0.007022764999419451,
-0.025106385350227356,
-0.020067552104592323,
0.03521916642785072,
0.03430620953440666,
0.008365869522094727,
0.01685463637113571,
0.04280375316739082,
0.03290165588259697,
0.004319000523537397,
-0.00978797860443592,
-0.006939369719475508,
0.0003843317972496152,
0.027652138844132423,
-0.02321023866534233,
-0.00801034178584814,
-0.024913258850574493,
-0.022665975615382195,
0.03307722508907318,
-0.039643511176109314,
-0.015344741754233837,
-0.04912424087524414,
0.01689852960407734,
0.04445410519838333,
0.008194688707590103,
-0.02472013421356678,
0.011008184403181076,
0.0378878191113472,
0.03460467606782913,
-0.08237703889608383,
-0.01908436417579651,
-0.00489398930221796,
-0.006022021174430847,
-0.014572237618267536,
-0.07640768587589264,
0.004035895224660635,
-0.007558251265436411,
0.02670406550168991,
-0.007843551225960255,
-0.05291653424501419,
0.020260676741600037,
0.04835173860192299,
0.03750156611204147,
-0.05653325840830803,
-0.021419433876872063,
-0.007852328941226006,
-0.0035421072971075773,
-0.001366147305816412,
0.05484779551625252,
-0.010850172489881516,
0.06120339781045914,
0.03423598036170006,
-0.016231365501880646,
0.003996392246335745,
0.037396226078271866,
-0.046490706503391266,
-0.011613897979259491,
0.05895611271262169,
-0.028881121426820755,
-0.0015252567827701569,
-0.019611071795225143,
0.017082875594496727,
-0.012684869579970837,
0.03834429755806923,
-0.11713972687721252,
0.02607201598584652,
-0.026194913312792778,
-0.03627258166670799,
0.08687160909175873,
0.013299361802637577,
-0.0027344892732799053,
-0.026300255209207535,
0.04153965786099434,
-0.007215891033411026,
0.09958281368017197,
0.04326023533940315,
-0.034499332308769226,
-0.028407085686922073,
-0.05119595676660538,
-0.03693974390625954,
0.025369739159941673,
0.0970546156167984,
0.01973397098481655,
0.025387296453118324,
-0.05944770574569702,
0.007444131188094616,
-0.02306978404521942,
-0.054496657103300095,
0.06141408160328865,
0.012158161960542202,
0.04111829027533531,
0.011877251788973808,
0.02108585275709629,
0.02700253203511238,
0.06482012569904327,
-0.031760454177856445,
-0.019786641001701355,
0.051617324352264404,
-0.05727064982056618,
-0.005363637115806341,
-0.0004693731025326997,
0.0409076064825058,
0.007821604609489441,
-0.06906889379024506,
0.005907901097089052,
-0.00697009451687336,
-0.02686207741498947,
-0.13251957297325134,
-0.004117096308618784,
0.034200865775346756,
0.01434399839490652,
0.0033555650152266026,
0.042066365480422974,
0.026335369795560837,
-0.09979349374771118,
0.01630159467458725,
-0.038133613765239716,
0.035271838307380676,
0.09824848175048828,
0.06555750966072083,
-0.01598556898534298,
0.007430963218212128,
0.022525519132614136,
0.03151465952396393,
0.07802291959524155,
-0.012158161960542202,
-0.024474335834383965,
-0.013536379672586918,
0.005008109379559755,
0.07535427063703537,
0.025562865659594536,
-0.012535636313259602,
-0.028547540307044983,
0.011139861308038235,
-0.030829939991235733,
0.00557431997731328,
0.046315137296915054,
-0.020243121311068535,
0.012474186718463898,
0.011938700452446938,
-0.028459755703806877,
0.02076982893049717,
0.0014166234759613872,
-0.0024689408019185066,
0.029829194769263268,
0.02868799678981304,
-0.009217379614710808,
0.03760690614581108,
-0.03609701246023178,
0.02730100043118,
0.057692017406225204,
0.04301443696022034,
-0.0834304541349411,
0.012140605598688126,
-0.018838567659258842,
-0.0621514730155468,
-0.07096504420042038,
0.08715251833200455,
0.021015625447034836,
0.006180033553391695,
-0.09340278059244156,
0.0242636539041996,
-0.061940789222717285,
-0.003967862576246262,
0.06022021174430847,
0.04505103826522827,
0.03135664761066437,
0.008163964375853539,
0.004915935453027487,
0.009305164217948914,
-0.016477162018418312,
-0.01631915010511875,
-0.0049642170779407024,
0.011877251788973808,
0.03760690614581108,
0.0393977127969265,
0.027494125068187714,
0.002208879217505455,
0.0363779254257679,
-0.036026787012815475,
0.032971881330013275,
0.0879250168800354,
0.049966976046562195,
-0.005368025973439217,
0.07303676009178162,
0.025071272626519203,
0.0029912590980529785,
0.0032919212244451046,
0.019453059881925583,
0.037361111491918564,
-0.031163521111011505,
0.03170778602361679,
-0.02245529182255268,
0.01424743514508009,
0.005780613515526056,
0.03060169890522957,
0.006118583958595991,
-0.03488558530807495,
-0.018856124952435493,
0.03421842306852341,
-0.0014199153520166874,
0.003912996966391802,
-0.010446363128721714,
0.021893471479415894,
-0.009349056519567966,
0.04775480180978775,
0.03679928928613663,
0.038590095937252045,
-0.04912424087524414,
-0.012860438786447048,
0.026581166312098503,
-0.019172148779034615,
0.005736721213907003,
0.012491744011640549,
0.08251748979091644,
0.0027696029283106327,
-0.025439966470003128,
-0.009366612881422043,
-0.021717902272939682,
-0.06503080576658249,
-0.0280735045671463,
0.02106829546391964,
0.028723109513521194,
0.025281954556703568,
0.026142243295907974,
-0.0020245315972715616,
0.02837197110056877,
0.018382087349891663,
-0.11102991551160812,
0.04013510420918465,
-0.04199613630771637,
-0.034938257187604904,
-0.021647673100233078,
-0.0864502415060997,
0.00020670521189458668,
-0.010077668353915215,
-0.06798036396503448,
0.039187029004096985,
0.017223332077264786,
-0.01731111668050289,
-0.021296534687280655,
-0.025808662176132202,
0.06425829976797104,
0.01084139384329319,
-0.022981999441981316,
-0.04712275415658951,
0.021559888496994972,
-0.010209345258772373,
-0.0024382162373512983,
-0.026440711691975594,
0.03474513068795204,
-0.056322578340768814,
-0.04666627570986748,
0.03018033318221569,
-0.03830918297171593,
0.04740366339683533,
-0.0014627103228121996,
-0.009594853036105633,
0.017249666154384613,
0.03226960450410843,
0.004029311705380678,
0.03492069989442825,
0.01866299845278263,
0.037536680698394775,
-0.056322578340768814,
0.07486267387866974,
0.016231365501880646,
0.0021320676896721125,
0.020278234034776688,
-0.00939294882118702,
0.04157476872205734,
-0.035394735634326935,
-0.023298023268580437,
0.005354858469218016,
-0.06229192763566971,
-0.05228448659181595,
-0.0004054549499414861,
-0.01969885639846325,
0.02001488022506237,
0.0364130362868309,
0.038871005177497864,
0.02515905722975731,
0.00007146212010411546,
-0.03305966779589653,
0.01166656892746687,
-0.00746168801560998,
-0.010060111060738564,
0.02563309296965599,
-0.04304955154657364,
-0.02305222675204277,
0.015292070806026459,
0.013738284818828106,
0.04224193096160889,
-0.10899331420660019,
-0.01143832877278328,
-0.07605654746294022,
-0.06439875811338425,
0.014774142764508724,
0.0025830608792603016,
-0.049054015427827835,
-0.02802083268761635,
0.013905075378715992,
0.0470525287091732,
0.023245353251695633,
0.02565065026283264,
-0.01771492511034012,
-0.06281863152980804,
-0.007457298692315817,
0.00647850101813674,
0.06942003220319748,
0.01973397098481655,
0.023315580561757088,
-0.01182458084076643,
-0.02680940553545952,
-0.024333881214261055,
-0.042663298547267914,
0.015634430572390556,
0.004503348376601934,
0.011657790280878544,
0.029758967459201813,
0.022104153409600258,
-0.008892576210200787,
-0.024509450420737267,
-0.001338714617304504,
0.023122454062104225,
0.06046601012349129,
-0.030549028888344765,
-0.055585186928510666,
0.01987442560493946,
-0.047860145568847656,
-0.024316323921084404,
0.033726830035448074,
-0.053934838622808456,
-0.004972995724529028,
0.05396994948387146,
-0.0030900167766958475,
-0.037396226078271866,
0.015248178504407406,
0.051933348178863525,
-0.00418951828032732,
-0.03690463304519653,
0.05488291010260582,
0.04210147634148598,
0.04473501443862915,
0.04322512075304985,
0.003342397278174758,
0.03400773927569389,
0.010235680267214775,
-0.03109329380095005,
0.030900167301297188,
0.002431632485240698,
0.0076723708771169186,
0.006526782643049955,
-0.0668216124176979,
-0.045718200504779816,
0.046771615743637085,
-0.09368368983268738,
-0.036483265459537506,
-0.034955814480781555,
0.03732599690556526,
0.047860145568847656,
0.03672906383872032,
-0.0280735045671463,
-0.04231216013431549,
-0.0028683606069535017,
0.002752046100795269,
-0.003948110621422529,
-0.0019455254077911377,
0.006267818156629801,
0.00526707386597991,
-0.0008866240968927741,
0.05066924914717674,
-0.012939444743096828,
0.006158087402582169,
-0.0348329171538353,
0.022718645632267,
0.0047359773889184,
-0.03693974390625954,
-0.03370927274227142,
-0.03209403529763222,
0.004788647871464491,
0.016038240864872932,
0.021805686876177788,
-0.011087190359830856,
-0.0515470951795578,
0.04322512075304985,
-0.01771492511034012,
0.03123374842107296,
0.027968162670731544,
-0.023420922458171844,
-0.04013510420918465,
0.07191311568021774,
0.013685613870620728,
-0.07605654746294022,
-0.06099271401762962,
-0.041328974068164825,
0.041188519448041916,
0.0029363937210291624,
0.009717751294374466,
-0.03957328200340271,
-0.05063413828611374,
-0.008194688707590103,
-0.0094719547778368,
-0.021261421963572502,
-0.02730100043118,
0.03149710223078728,
0.04322512075304985,
-0.04473501443862915,
-0.03046124428510666,
0.025281954556703568,
0.048913560807704926,
-0.017943164333701134,
-0.035851217806339264,
0.037396226078271866,
0.008304419927299023,
0.015713436529040337,
-0.01850498653948307,
-0.01911947876214981,
0.016670288518071175,
0.012026485055685043,
-0.003952499944716692,
-0.015221843495965004,
0.03154977411031723,
-0.023157568648457527,
0.01280776783823967,
0.026581166312098503,
0.0021079268772155046,
0.03925725817680359,
-0.037817589938640594,
-0.013536379672586918,
0.018575213849544525,
0.01878589764237404,
0.03862521052360535,
-0.04136408865451813,
-0.03153221681714058,
0.06755900382995605,
0.01274631917476654,
-0.04031067341566086,
0.05537450313568115,
0.006280985660851002,
0.05123107135295868,
0.030584141612052917,
0.04150454327464104,
0.04613956809043884,
0.026001788675785065,
-0.015485197305679321,
-0.02226216532289982,
0.03093528002500534,
0.003623307915404439,
-0.0895402580499649,
-0.041925907135009766,
-0.006180033553391695,
-0.03999464958906174,
0.0005843160324729979,
0.007957670837640762,
0.037080198526382446,
-0.02730100043118,
0.03690463304519653,
0.019979767501354218,
-0.014308883808553219,
0.010033776052296162,
-0.005403140094131231,
0.005170511081814766,
0.01699509099125862,
0.026897190138697624,
-0.004942270927131176,
0.028424642980098724,
-0.0591316819190979,
-0.039959535002708435,
-0.010191787965595722,
-0.007602143567055464,
0.026036901399493217,
-0.004757923539727926,
-0.0014023584080860019,
0.023262910544872284,
0.018698113039135933,
-0.036623720079660416,
0.0017370370915159583,
-0.013597829267382622,
0.033603932708501816,
-0.04273352771997452,
-0.027248328551650047,
-0.06917423754930496,
-0.03715042769908905,
-0.02105073817074299,
-0.03613212704658508,
0.00655750697478652,
0.047087639570236206,
0.012921888381242752,
-0.08567773550748825,
-0.04606933891773224,
0.06496057659387589,
-0.0006852682563476264,
-0.039362598210573196,
0.006008853670209646,
-0.0017787347314879298,
0.013676835224032402,
-0.09333255141973495,
0.010525369085371494,
-0.0666811540722847,
0.015028717927634716,
-0.006267818156629801,
-0.01197381503880024,
0.02105073817074299,
-0.011613897979259491,
-0.03174290060997009,
-0.07865496724843979,
0.0439273975789547,
-0.011921144090592861,
-0.021015625447034836,
-0.03588632866740227,
0.03655349463224411,
-0.02152477577328682,
-0.036623720079660416,
-0.028284186497330666,
0.030355902388691902,
0.03862521052360535,
-0.06945514678955078,
-0.012842881493270397,
0.05885077267885208,
0.034815359860658646,
0.009840649552643299,
0.03599167242646217,
-0.028249073773622513,
-0.0052451277151703835,
0.012983337044715881,
0.026651393622159958,
0.03841452673077583,
-0.03820384293794632,
-0.06137896701693535,
0.01661761850118637,
0.05955304950475693,
0.004547240678220987,
-0.011236424557864666,
-0.03369171544909477,
0.018294302746653557,
0.01669662445783615,
-0.04189079627394676,
0.04080226644873619,
0.003869104664772749,
-0.03760690614581108,
0.045086152851581573,
0.030250560492277145,
-0.03823895752429962,
-0.03423598036170006,
0.028705552220344543,
-0.01666150987148285,
-0.0409778356552124,
0.03095283731818199,
0.015274514444172382,
0.008690671995282173,
-0.0036364756524562836,
-0.03248028829693794,
-0.0094719547778368,
-0.03135664761066437,
-0.038906119763851166,
0.012640977278351784,
-0.009928434155881405,
0.013922631740570068,
0.020067552104592323,
0.03743133693933487,
-0.02364916168153286,
0.04462967440485954,
-0.0004836380830965936,
-0.018926352262496948,
0.018136290833353996,
0.05073947831988335,
-0.011499778367578983,
0.02637048251926899,
0.00940172653645277,
-0.0064653330482542515,
-0.027564354240894318,
0.012123048305511475,
0.01941794529557228,
-0.03851986676454544,
0.0064653330482542515,
0.02075227163732052,
-0.05414551869034767,
0.03851986676454544,
-0.02745901234447956,
0.052249372005462646,
0.009436841122806072,
0.034938257187604904,
0.015713436529040337,
0.014063087292015553,
0.007084214594215155,
-0.03862521052360535,
-0.006996429990977049,
0.043576259166002274,
0.04304955154657364,
-0.03033834509551525,
0.058745432645082474,
0.052389826625585556,
-0.04438387602567673,
-0.0007022765348665416,
-0.022472849115729332,
-0.028758224099874496,
0.0094719547778368,
-0.02608957327902317,
-0.02686207741498947,
0.013071121647953987,
-0.01372950617223978,
0.0007055684691295028,
-0.00908570270985365,
-0.0651361495256424,
0.00031355550163425505,
-0.029829194769263268,
0.037220656871795654,
0.004656970966607332,
-0.01749546453356743,
-0.029039133340120316,
-0.060887373983860016,
-0.029829194769263268,
-0.06534682959318161,
0.034358877688646317,
-0.0036540324799716473,
0.032058924436569214,
-0.04715786874294281,
-0.015256957150995731,
0.016547391191124916,
-0.0295833982527256,
0.021138522773981094,
0.0409427210688591,
0.046947184950113297,
0.0026949860621243715,
0.04561286047101021,
-0.044348761439323425,
-0.012351288460195065,
-0.02333313785493374,
0.050142545253038406,
-0.004547240678220987,
-0.01501993928104639,
0.07261539250612259,
-0.02017289400100708,
0.006588231772184372,
0.022648418322205544,
0.003041735151782632,
0.033603932708501816,
-0.028477312996983528,
-0.00993721280246973,
0.003959083929657936,
-0.07187800109386444,
-0.02394763007760048,
0.027564354240894318,
0.01221083290874958,
-0.02970629744231701,
-0.012307396158576012,
-0.0409427210688591,
-0.002778381574898958,
0.013782177120447159,
-0.04926469922065735,
0.004534072708338499,
-0.06917423754930496,
0.021120965480804443,
0.005912290420383215,
-0.06123851239681244,
0.01910192146897316,
0.00005400808367994614,
-0.009436841122806072,
-0.038449641317129135,
-0.08125339448451996,
0.02621247060596943,
-0.05958816409111023,
0.027652138844132423,
-0.05200357735157013,
-0.012000150047242641,
0.02926737442612648,
-0.04901890084147453,
0.06092248857021332,
0.043154891580343246,
-0.014203542843461037,
-0.02094539813697338,
0.0013793149264529347,
0.06046601012349129,
0.0013496876927092671,
-0.0064521655440330505,
-0.03488558530807495,
0.07254516333341599,
0.035078711807727814,
-0.03697485849261284,
0.02849487029016018,
-0.02773992344737053,
-0.022402621805667877,
-0.04993186146020889,
-0.0020058772061020136,
-0.038133613765239716,
0.025545308366417885,
0.028846008703112602,
0.03837941214442253,
0.0001610298058949411,
-0.012316174805164337,
0.01850498653948307,
0.00485448632389307,
0.0832899957895279,
-0.036167241632938385,
0.05045856907963753,
0.026651393622159958,
-0.008506324142217636,
-0.03665883466601372,
-0.0197164136916399,
-0.042066365480422974,
0.007294897455722094,
-0.02333313785493374,
0.012623420916497707,
-0.03880077600479126,
-0.01174557488411665,
-0.07089481502771378,
-0.019049251452088356,
0.09986372292041779,
-0.000006991046120674582,
0.002997842850163579,
0.004687695764005184
]
|
41,556 | pyglove.core.symbolic.flags | get_save_handler | Returns global save handler. | def get_save_handler() -> Optional[Callable[..., Any]]:
"""Returns global save handler."""
return _SAVE_HANDLER
| () -> Optional[Callable[..., Any]] | [
-0.02366434969007969,
-0.03113269805908203,
-0.0378839448094368,
0.052505820989608765,
0.024503882974386215,
-0.034508321434259415,
0.023839252069592476,
0.0626501813530922,
0.01983397826552391,
-0.032794274389743805,
0.009575928561389446,
-0.053555238991975784,
-0.014516932889819145,
-0.029226258397102356,
0.016493333503603935,
0.011972096748650074,
-0.019659074023365974,
-0.01902942545711994,
0.001449506962671876,
-0.04071737080812454,
0.014000969007611275,
-0.008058646693825722,
0.03324902430176735,
-0.05359021946787834,
-0.02354191616177559,
0.038828421384096146,
0.02063853107392788,
0.05138644203543663,
0.05449971184134483,
0.0004033695731777698,
0.02509855106472969,
-0.07604774087667465,
0.027424758300185204,
0.007603899110108614,
0.002249687211588025,
0.04463519528508186,
-0.036344803869724274,
0.10543140769004822,
-0.05082675442099571,
-0.07541808485984802,
-0.05712325498461723,
0.011062602512538433,
0.043550796806812286,
-0.001981867477297783,
0.03129011020064354,
0.05470959469676018,
-0.025535808876156807,
0.012418098747730255,
0.06607827544212341,
-0.015723761171102524,
-0.011814684607088566,
0.047643523663282394,
-0.044600214809179306,
0.024888668209314346,
-0.024416431784629822,
0.010835228487849236,
0.03323153033852577,
-0.009549693204462528,
-0.011158798821270466,
-0.007359035313129425,
0.02971598505973816,
0.027039973065257072,
0.06439921259880066,
0.0064407954923808575,
0.04655912518501282,
0.017910046502947807,
-0.046209320425987244,
0.004975984804332256,
0.0227548535913229,
0.07212991267442703,
-0.034350909292697906,
-0.07541808485984802,
-0.021635476499795914,
-0.0005542232538573444,
0.010013185441493988,
-0.06310492753982544,
0.006025401409715414,
-0.033843692392110825,
-0.005456967279314995,
0.06775734573602676,
0.03144752234220505,
-0.0405074879527092,
-0.006003538612276316,
0.05470959469676018,
0.025553299114108086,
-0.06275512278079987,
0.002060573548078537,
0.02376929111778736,
-0.050406988710165024,
0.005675595719367266,
-0.06086617335677147,
0.012584256939589977,
0.016650747507810593,
0.007682605646550655,
-0.035960014909505844,
-0.07835645228624344,
-0.04627928137779236,
0.03130760043859482,
0.04257134348154068,
-0.03310909867286682,
-0.06324484944343567,
0.024468902498483658,
-0.003572389716282487,
0.005172750446945429,
0.039108265191316605,
-0.015067876316606998,
0.06254523992538452,
0.012068293057382107,
-0.03242697939276695,
-0.02037617564201355,
0.048797883093357086,
-0.013248886913061142,
-0.0035352229606360197,
0.04253636300563812,
-0.007735076360404491,
-0.005133397411555052,
-0.05110659822821617,
0.04064740985631943,
0.029768455773591995,
-0.029995830729603767,
-0.12669958174228668,
0.05047694966197014,
-0.05152636393904686,
0.02035868540406227,
0.08213435858488083,
-0.0035614583175629377,
0.05383508279919624,
0.01749028079211712,
0.022544970735907555,
-0.006007911171764135,
0.032654352486133575,
0.0303806159645319,
0.002093367977067828,
-0.01059036422520876,
-0.0019414210692048073,
0.003672958817332983,
0.030538028106093407,
0.05995668098330498,
-0.037674061954021454,
0.01867961883544922,
-0.05740309879183769,
0.007861880585551262,
-0.019536642357707024,
-0.04942753165960312,
0.04708383232355118,
0.01825985312461853,
-0.0014527863822877407,
0.01135993655771017,
0.01866212859749794,
0.009024984203279018,
0.058277614414691925,
0.004226088989526033,
-0.04533480480313301,
0.05918710678815842,
-0.07408882677555084,
-0.0005408322322182357,
0.009873263537883759,
0.06992614269256592,
0.013310102745890617,
-0.018557187169790268,
-0.007993058301508427,
0.006742503028362989,
0.014805521816015244,
-0.11067849397659302,
0.026322871446609497,
0.06247527897357941,
-0.007651997730135918,
0.0029777202289551497,
0.05519932508468628,
0.01588992029428482,
-0.09087949246168137,
0.02126818150281906,
-0.05978177860379219,
0.02380427159368992,
0.02850915677845478,
0.07548804581165314,
0.018364794552326202,
0.02221265621483326,
0.020603550598025322,
0.03732425719499588,
0.09514712542295456,
-0.033983614295721054,
-0.03284674510359764,
0.03781398385763168,
0.033074118196964264,
0.025413377210497856,
-0.008574609644711018,
0.005111534148454666,
-0.02709244377911091,
0.012627982534468174,
-0.015076621435582638,
0.0068080914206802845,
0.023052189499139786,
-0.0655185878276825,
0.0012756972573697567,
-0.005570654291659594,
0.009768321178853512,
-0.0024224037770181894,
0.0089987488463521,
0.0018594353459775448,
0.01772639900445938,
-0.005465712398290634,
0.006327108945697546,
0.008762630634009838,
-0.028351744636893272,
0.012321902438998222,
0.05292558670043945,
0.011351191438734531,
-0.07471847534179688,
0.027547191828489304,
0.021355632692575455,
-0.033966124057769775,
-0.07989560067653656,
0.05964185670018196,
0.06107605621218681,
0.006711895111948252,
-0.013659908436238766,
0.03022320382297039,
-0.03480565920472145,
0.04043752700090408,
0.012925316579639912,
0.015854939818382263,
0.014779286459088326,
0.009243613108992577,
0.01995640993118286,
-0.008390962146222591,
-0.007468349765986204,
-0.040962234139442444,
0.06188061088323593,
-0.051071617752313614,
-0.016353411599993706,
0.05299554765224457,
-0.03641476482152939,
-0.009164907038211823,
0.04732869938015938,
-0.05271570384502411,
0.01267170812934637,
0.004239206667989492,
0.022405048832297325,
-0.004547473043203354,
0.07090559601783752,
-0.0141234016045928,
-0.006646306253969669,
0.04757356271147728,
0.02114574797451496,
0.024801217019557953,
0.0168081596493721,
0.017682673409581184,
0.025518318638205528,
-0.004669904708862305,
0.07331925630569458,
0.02733730711042881,
-0.0019206514116376638,
-0.0008493717177771032,
0.0002008649316849187,
0.0481332503259182,
-0.04047250747680664,
0.03704441338777542,
-0.017402829602360725,
0.020411156117916107,
-0.021233199164271355,
0.050267066806554794,
0.02759966254234314,
0.010476677678525448,
-0.051036637276411057,
-0.0441104881465435,
0.01313520036637783,
-0.035697661340236664,
0.030835364013910294,
0.017507771030068398,
0.06282508373260498,
0.04704885184764862,
-0.03921320661902428,
-0.027827035635709763,
-0.037674061954021454,
-0.07842641323804855,
-0.029890889301896095,
0.035295385867357254,
0.0008116583339869976,
-0.039632976055145264,
0.021740417927503586,
0.010975150391459465,
0.0943775549530983,
0.02445141226053238,
-0.03994780033826828,
0.03275929391384125,
-0.01315269060432911,
-0.023332033306360245,
0.031220149248838425,
-0.09038976579904556,
-0.008425942622125149,
0.03024069406092167,
-0.037009432911872864,
0.058277614414691925,
0.026200439780950546,
-0.0071622696705162525,
-0.048692937940359116,
-0.053800102323293686,
0.09850525856018066,
0.013292612507939339,
-0.010948915034532547,
-0.02403164468705654,
0.013065239414572716,
0.0141234016045928,
0.02745974063873291,
0.0058548711240291595,
0.02891143225133419,
-0.04456523433327675,
-0.006204676814377308,
0.02786201611161232,
-0.020446136593818665,
0.01668572798371315,
-0.0027503464370965958,
0.05589893460273743,
0.01379108615219593,
0.006856189575046301,
-0.007354662753641605,
-0.0038106946740299463,
0.0004894545418210328,
0.060131583362817764,
-0.0339486338198185,
0.04194169119000435,
0.03286423534154892,
-0.02009633183479309,
0.020795943215489388,
-0.03272431343793869,
-0.011762212961912155,
-0.025081060826778412,
-0.027914486825466156,
0.0016189441084861755,
-0.07681731134653091,
-0.04792336747050285,
0.025850633159279823,
-0.012767904438078403,
0.018504716455936432,
0.04134702309966087,
0.056843411177396774,
0.017525261268019676,
0.02231759764254093,
-0.03303913772106171,
-0.005706204101443291,
0.02627040073275566,
0.0070617008022964,
0.008128607645630836,
-0.05072181299328804,
-0.007232230622321367,
0.011333701200783253,
0.016729453578591347,
0.031185168772935867,
-0.060656290501356125,
-0.007306564599275589,
-0.06793224811553955,
-0.08087505400180817,
-0.020166292786598206,
-0.013519986532628536,
-0.04669904708862305,
0.003320966847240925,
0.004586826078593731,
0.012444334104657173,
-0.029611043632030487,
0.00933106429874897,
0.001511816051788628,
-0.024241527542471886,
-0.013624927960336208,
0.010616599582135677,
0.0919988751411438,
0.01736784726381302,
0.025395886972546577,
0.019659074023365974,
-0.06132092326879501,
-0.005299554672092199,
-0.01438575517386198,
0.04533480480313301,
-0.003659841138869524,
-0.010467932559549809,
0.05397500470280647,
0.016764434054493904,
0.0030782893300056458,
-0.039597995579242706,
-0.03440338000655174,
0.027494721114635468,
-0.0018266411498188972,
-0.019151857122778893,
-0.03246195986866951,
0.055374227464199066,
-0.03742919862270355,
-0.004451276268810034,
0.029278729110956192,
-0.044600214809179306,
-0.0057892827317118645,
0.016878120601177216,
-0.012872845865786076,
-0.06205551326274872,
0.0071360343135893345,
0.0557590126991272,
-0.003646723460406065,
-0.06541364639997482,
0.05114157870411873,
0.006532619707286358,
0.0838833823800087,
0.016134783625602722,
-0.008906925097107887,
0.047223757952451706,
-0.020953355357050896,
-0.03242697939276695,
0.016615765169262886,
-0.028456686064600945,
0.04138200357556343,
0.013712379150092602,
-0.06390948593616486,
-0.04155690595507622,
0.01591615565121174,
-0.047363679856061935,
-0.012514295056462288,
0.04512492194771767,
0.000833521131426096,
0.026375342160463333,
0.042781226336956024,
-0.031867291778326035,
-0.027809545397758484,
-0.03233952820301056,
0.06002664193511009,
-0.003976852633059025,
-0.0020693186670541763,
-0.0008061925764195621,
0.002557953353971243,
-0.00887194462120533,
0.0662531778216362,
-0.024014154449105263,
0.046209320425987244,
-0.005736812017858028,
-0.03179733082652092,
-0.01045044232159853,
-0.01057287398725748,
-0.03795390948653221,
0.007350290194153786,
0.0341934971511364,
-0.015933645889163017,
-0.036729589104652405,
0.028211820870637894,
-0.03781398385763168,
0.016537059098482132,
-0.032794274389743805,
0.007481467444449663,
0.04876290261745453,
-0.044880058616399765,
-0.017638947814702988,
0.08136478066444397,
0.03774402290582657,
-0.039388108998537064,
-0.031849801540374756,
-0.013318847864866257,
0.0325494110584259,
-0.007184132467955351,
0.034875620156526566,
-0.05226095765829086,
-0.046454183757305145,
-0.07178010791540146,
-0.0159074105322361,
-0.02996085025370121,
-0.029086336493492126,
0.02495862916111946,
0.06348972022533417,
-0.03576762229204178,
-0.029138807207345963,
0.002557953353971243,
0.0190644059330225,
-0.020691001787781715,
0.004643669351935387,
0.013572457246482372,
0.014377010054886341,
0.031062737107276917,
-0.04498500004410744,
-0.03247945010662079,
0.0011915253708139062,
-0.015330230817198753,
0.009925734251737595,
-0.033826202154159546,
-0.005024082958698273,
-0.019239308312535286,
-0.002544835675507784,
0.04890282452106476,
-0.05271570384502411,
0.04085729271173477,
-0.0087320227175951,
-0.038443636149168015,
0.009847027249634266,
-0.03216462582349777,
0.03300415724515915,
0.0018222685903310776,
0.0007723051821812987,
0.04117212072014809,
0.01222570613026619,
-0.053380336612463,
0.031989723443984985,
0.013406299985945225,
0.02457384392619133,
0.046838968992233276,
0.0016222235281020403,
-0.015732506290078163,
0.043585777282714844,
-0.027144914492964745,
-0.037254296243190765,
0.019134366884827614,
-0.022912267595529556,
-0.12977787852287292,
-0.10375234484672546,
-0.017507771030068398,
-0.05180621147155762,
-0.007411506026983261,
0.006676914636045694,
0.023297052830457687,
-0.051736246794462204,
0.025395886972546577,
0.005233966279774904,
-0.04078733175992966,
0.030957795679569244,
-0.04208161309361458,
0.02590310573577881,
0.011709742248058319,
0.007184132467955351,
-0.01057287398725748,
0.03498056158423424,
-0.05719321593642235,
-0.03165740519762039,
-0.020673511549830437,
-0.003522105049341917,
0.05771792307496071,
-0.002566698705777526,
0.008006175979971886,
0.02049860917031765,
0.016213489696383476,
-0.01918683759868145,
0.029855908825993538,
-0.01789255626499653,
0.028544137254357338,
-0.014035949483513832,
-0.0352604053914547,
-0.005028455518186092,
-0.030310655012726784,
-0.027809545397758484,
-0.02814185991883278,
-0.041591886430978775,
0.01683439500629902,
0.01960660330951214,
-0.06803718954324722,
-0.02485368773341179,
0.02193281054496765,
0.0022955993190407753,
-0.03431592881679535,
0.021198218688368797,
-0.022684892639517784,
0.04484507814049721,
-0.08927039057016373,
0.016589529812335968,
-0.03165740519762039,
0.03209466487169266,
0.04117212072014809,
0.0003252098977100104,
0.017324121668934822,
-0.05876734107732773,
-0.02153053507208824,
-0.04404052346944809,
0.03952803462743759,
0.00035308502265252173,
-0.022824816405773163,
-0.004261069465428591,
0.022579951211810112,
-0.037674061954021454,
-0.026078008115291595,
-0.026480283588171005,
0.03991281986236572,
0.06653302907943726,
-0.0686318576335907,
-0.005430731922388077,
0.032391998916864395,
0.0121557442471385,
0.0013522172812372446,
-0.034875620156526566,
-0.014656854793429375,
0.01201582234352827,
0.02945363149046898,
-0.013965988531708717,
0.02051609940826893,
-0.057647962123155594,
-0.05726317688822746,
0.035155463963747025,
0.05981675907969475,
-0.05481453612446785,
0.017647692933678627,
-0.009890753775835037,
0.09507716447114944,
-0.00264540477655828,
-0.06810715049505234,
0.0686318576335907,
-0.04536978527903557,
-0.0438656210899353,
-0.009742085821926594,
0.012890336103737354,
-0.06083119288086891,
-0.015968626365065575,
0.038128811866045,
-0.03377373144030571,
-0.035295385867357254,
0.06425929069519043,
-0.044600214809179306,
-0.014875482767820358,
-0.0016987434355542064,
-0.01591615565121174,
-0.030835364013910294,
-0.0688767209649086,
-0.0011926185106858611,
0.017297886312007904,
-0.007485840003937483,
-0.0006580717745237052,
0.026060517877340317,
0.03431592881679535,
-0.006602580659091473,
-0.029401160776615143,
0.01327512226998806,
-0.005811145529150963,
0.028159350156784058,
0.0378839448094368,
-0.037779003381729126,
0.0031220149248838425,
-0.00821168627589941,
-0.009951969608664513,
-0.024014154449105263,
0.00459557119756937,
-0.014455716125667095,
-0.05733313784003258,
0.010240558534860611,
0.026707658544182777,
-0.06646306067705154,
0.07164018601179123,
-0.0012931876117363572,
0.004031509626656771,
0.00841282494366169,
0.012732923962175846,
0.008268529549241066,
0.020603550598025322,
0.02982092835009098,
-0.006239657290279865,
0.002457384252920747,
0.03275929391384125,
0.06555356830358505,
-0.011814684607088566,
0.033581338822841644,
0.015426427125930786,
-0.08507272601127625,
-0.05152636393904686,
-0.010153107345104218,
-0.034770675003528595,
0.014368264935910702,
-0.004394432995468378,
0.0025207865983247757,
0.03177984058856964,
-0.03573264181613922,
0.012199470773339272,
-0.029138807207345963,
-0.05621375888586044,
-0.02653275430202484,
-0.017271650955080986,
0.03571515157818794,
-0.02205524407327175,
0.010529148392379284,
-0.07597777992486954,
-0.004709257744252682,
-0.004219530150294304,
-0.07828649133443832,
0.03690449148416519,
0.00562312500551343,
0.014210852794349194,
-0.024468902498483658,
-0.019659074023365974,
-0.004175804555416107,
0.004490629304200411,
0.05044196918606758,
0.049077726900577545,
-0.006825581658631563,
0.0000028054478207195643,
-0.0033253394067287445,
-0.014604384079575539,
0.004634924232959747,
0.0141234016045928,
0.05397500470280647,
0.027547191828489304,
-0.009733340702950954,
0.048692937940359116,
-0.006213421933352947,
-0.00348275201395154,
0.007656370289623737,
0.001931582810357213,
0.012732923962175846,
-0.010476677678525448,
-0.03338894620537758,
0.016878120601177216,
-0.017184199765324593,
-0.025273455306887627,
0.018557187169790268,
-0.01405343972146511,
0.012846610508859158,
0.02284230664372444,
-0.03510299324989319,
0.03190227225422859,
-0.0006575252045877278,
-0.01485799252986908,
0.0053913788869977,
-0.03207717463374138,
0.011648526415228844,
-0.0038697244599461555,
-0.05502442270517349,
0.0189419724047184,
0.00867517851293087,
-0.02116323821246624,
-0.035557739436626434,
-0.036449745297431946,
-0.007455232087522745,
-0.0514913834631443,
0.016633257269859314,
-0.06642808020114899,
-0.02667267620563507,
0.015566349029541016,
-0.06716267764568329,
0.06272014230489731,
0.012260686606168747,
-0.023314543068408966,
-0.02600804716348648,
0.04771348461508751,
0.027949467301368713,
-0.02126818150281906,
-0.021233199164271355,
-0.03627483919262886,
0.0560038760304451,
0.043305933475494385,
-0.012531785294413567,
0.06121598184108734,
-0.04036756604909897,
-0.028981393203139305,
-0.04033258557319641,
0.024906158447265625,
-0.015129092149436474,
0.04533480480313301,
0.03506801277399063,
0.005417614243924618,
0.004648041911423206,
-0.016790669411420822,
0.009121181443333626,
-0.017691418528556824,
0.03875846043229103,
0.019291779026389122,
0.055654071271419525,
0.052645742893218994,
-0.013327592983841896,
-0.017289141193032265,
0.0096546346321702,
-0.012907826341688633,
0.027966957539319992,
-0.007901233620941639,
0.08360353857278824,
-0.021233199164271355,
0.013450025580823421,
-0.03589005395770073,
-0.030782893300056458,
0.08178454637527466,
0.002284667920321226,
-0.014333284460008144,
-0.007586408872157335
]
|
41,557 | pyglove.core.typing.callable_signature | get_signature | Gets signature from a python callable. | def get_signature(func: Callable, auto_typing: bool = False) -> Signature: # pylint:disable=g-bare-generic
"""Gets signature from a python callable."""
return Signature.from_callable(func, auto_typing)
| (func: Callable, auto_typing: bool = False) -> pyglove.core.typing.callable_signature.Signature | [
-0.002587556140497327,
-0.03521926701068878,
0.02257097139954567,
0.031032860279083252,
-0.023515140637755394,
0.036377210170030594,
0.04303983226418495,
-0.0025986903347074986,
-0.0033981159795075655,
-0.019008072093129158,
-0.018776483833789825,
0.028895119205117226,
-0.03643065318465233,
-0.050949472934007645,
-0.04421558976173401,
-0.011891178786754608,
0.016897054389119148,
0.002750113606452942,
-0.003565126797184348,
0.013316338881850243,
0.020023498684167862,
0.010189894586801529,
0.013681536540389061,
0.0034671472385525703,
0.024673083797097206,
0.015845997259020805,
0.05062881112098694,
0.010252244770526886,
0.025225332006812096,
-0.0038835611194372177,
-0.015801461413502693,
-0.010368038900196552,
0.022232497110962868,
0.02754121832549572,
-0.028627902269363403,
0.02260660007596016,
0.004921255633234978,
0.06701815128326416,
-0.0036029827315360308,
-0.07061667740345001,
-0.04496379941701889,
0.01831330731511116,
0.022143423557281494,
-0.0438949279487133,
0.019542507827281952,
-0.019560322165489197,
-0.013663722202181816,
0.02438805066049099,
-0.025065002962946892,
0.006912026088684797,
0.02150210179388523,
-0.02973240055143833,
0.002845866372808814,
-0.016362618654966354,
-0.007103532087057829,
-0.025848839432001114,
0.05301595479249954,
-0.014135805889964104,
-0.02075389213860035,
0.05889473855495453,
0.02613387256860733,
0.05447674170136452,
-0.00570954754948616,
-0.010920288972556591,
0.017449302598834038,
0.004796554334461689,
-0.01013645064085722,
-0.024370236322283745,
-0.03429291397333145,
-0.0005594866815954447,
0.02891293354332447,
-0.013850773684680462,
0.06356213986873627,
-0.0173156950622797,
0.016077587381005287,
-0.09292043745517731,
-0.033633776009082794,
-0.03454231470823288,
0.01893681474030018,
-0.03464920446276665,
0.0003838468110188842,
-0.03879998251795769,
-0.015632223337888718,
-0.030159948393702507,
-0.011125155724585056,
0.014011104591190815,
-0.02909107878804207,
0.014705870300531387,
-0.014518817886710167,
0.01923966035246849,
-0.00919228233397007,
-0.005366618279367685,
-0.03587840497493744,
0.02531440556049347,
-0.012568130157887936,
-0.058324676007032394,
0.03065875545144081,
-0.0173156950622797,
0.04222036525607109,
-0.02939392626285553,
0.01126767136156559,
0.030516238883137703,
-0.04382367059588432,
-0.014581169001758099,
-0.010421482846140862,
-0.015845997259020805,
0.05597316101193428,
0.04589015245437622,
0.012879883870482445,
-0.006030208431184292,
0.05301595479249954,
0.007312852423638105,
0.03336656093597412,
-0.0013093657325953245,
0.061068106442689896,
-0.02005912736058235,
0.02976802922785282,
-0.03195921331644058,
-0.000896848738193512,
-0.004335604142397642,
-0.010742143727838993,
-0.002888175891712308,
-0.05436985567212105,
-0.009245725348591805,
-0.0007253841613419354,
0.042719170451164246,
0.017511654645204544,
0.0026788555551320314,
0.01982753910124302,
-0.01180210616439581,
0.055616870522499084,
0.050058744847774506,
-0.009842511266469955,
0.02768373303115368,
-0.005304267629981041,
-0.03039153851568699,
0.05964294821023941,
0.041685931384563446,
-0.06466663628816605,
0.02112799696624279,
-0.009673274122178555,
0.024494938552379608,
0.051947083324193954,
-0.0008166835177689791,
0.010430390015244484,
0.014233785681426525,
0.005776351783424616,
-0.06067618727684021,
0.024031760171055794,
-0.03837243467569351,
0.03769548237323761,
-0.007442007306963205,
-0.04022514075040817,
0.010759958066046238,
-0.03769548237323761,
-0.03926315903663635,
0.050130005925893784,
-0.038123030215501785,
0.003433744888752699,
-0.019399991258978844,
-0.03539741411805153,
0.008617764338850975,
0.0026588141918182373,
-0.09648333489894867,
0.0469946525990963,
-0.006248435936868191,
0.006056929938495159,
0.016246823593974113,
-0.03333092853426933,
-0.03635939583182335,
-0.06751696020364761,
0.05789712443947792,
-0.009575294330716133,
-0.0015264799585565925,
0.06901337206363678,
0.029643328860402107,
-0.012131675146520138,
0.08258802443742752,
-0.004734203685075045,
-0.017003940418362617,
0.06121062487363815,
-0.021395215764641762,
-0.03334874287247658,
0.03464920446276665,
0.052695292979478836,
0.04435810446739197,
0.014634612016379833,
0.023408252745866776,
0.007922998629510403,
-0.051056358963251114,
-0.04108023643493652,
0.04222036525607109,
0.040937721729278564,
-0.023853616788983345,
0.008435165509581566,
-0.010947010479867458,
-0.05672137066721916,
0.03855057805776596,
-0.025670694187283516,
0.007958628237247467,
0.05682825669646263,
0.012541408650577068,
0.009361520409584045,
-0.005794166121631861,
-0.03165636584162712,
0.017021754756569862,
0.031781069934368134,
0.03883561119437218,
-0.025955727323889732,
-0.01916840299963951,
0.02998180501163006,
-0.07115111500024796,
-0.027363073080778122,
0.0041552321054041386,
-0.0036898283287882805,
-0.10311032831668854,
0.01993442513048649,
-0.016371525824069977,
0.0076246061362326145,
-0.02713148482143879,
0.09562823921442032,
0.012024788185954094,
-0.02524314634501934,
-0.00152870686724782,
0.05347913131117821,
0.005642742849886417,
0.01686142385005951,
-0.009628737345337868,
-0.02335480973124504,
-0.05846719071269035,
0.04246976971626282,
-0.007183697074651718,
0.007148068398237228,
-0.022766930982470512,
-0.006912026088684797,
0.000206954384339042,
0.03783799707889557,
-0.020842965692281723,
0.030480610206723213,
-0.04760034382343292,
0.01538282074034214,
0.030124319717288017,
0.05860970541834831,
0.06042678654193878,
-0.045355718582868576,
-0.0030640941113233566,
0.024851227179169655,
0.045569490641355515,
-0.014207064174115658,
-0.020005684345960617,
0.03140696510672569,
-0.023924874141812325,
-0.01258594449609518,
0.0064622098580002785,
0.00887607503682375,
0.03826554864645004,
-0.027701547369360924,
-0.04328923672437668,
0.0366978719830513,
0.03568244352936745,
-0.009539664722979069,
0.051875825971364975,
0.0023915967904031277,
0.013984383083879948,
-0.011632869020104408,
-0.04378804191946983,
-0.0327608659863472,
0.028111280873417854,
-0.04054580256342888,
0.05910851061344147,
0.045569490641355515,
-0.04036765918135643,
-0.01059962809085846,
-0.04435810446739197,
-0.02994617447257042,
-0.05337224155664444,
-0.00868902262300253,
0.006230621598660946,
0.01073323655873537,
-0.0045738727785646915,
-0.014688055962324142,
-0.041935332119464874,
0.03495204821228981,
0.00566055765375495,
-0.0915665328502655,
0.08422695845365524,
0.023675471544265747,
0.01886555552482605,
0.014189249835908413,
-0.012701738625764847,
-0.008795909583568573,
-0.006604725960642099,
0.0692627802491188,
0.0029104440473020077,
0.031264446675777435,
0.0452844612300396,
0.014367394149303436,
-0.09121023863554001,
0.05493991822004318,
-0.06908462941646576,
0.03286775201559067,
0.03976196423172951,
-0.03197702765464783,
-0.03610999137163162,
0.057327061891555786,
-0.023693285882472992,
-0.044678766280412674,
-0.06292081624269485,
-0.04599703848361969,
-0.007241594605147839,
-0.06730318069458008,
0.028556644916534424,
-0.008933971635997295,
-0.03252927586436272,
0.0018360069952905178,
0.05540309473872185,
-0.02105673961341381,
0.010332410223782063,
0.03872872516512871,
0.08885873109102249,
0.038087401539087296,
0.007415285799652338,
0.024477124214172363,
0.0013739432906731963,
-0.0011523754801601171,
-0.0737520307302475,
-0.05960731953382492,
-0.03080127201974392,
-0.023960502818226814,
0.06317021697759628,
-0.04991623014211655,
-0.017021754756569862,
0.07446461170911789,
-0.008929518051445484,
-0.03564681485295296,
0.054726146161556244,
0.015195769257843494,
-0.01073323655873537,
-0.05508243665099144,
-0.04350300878286362,
0.02887730486690998,
-0.05134138837456703,
0.05953605845570564,
0.06641245633363724,
-0.05483303219079971,
0.022410642355680466,
0.014411930926144123,
-0.044571880251169205,
0.06701815128326416,
-0.03131789341568947,
0.05575938522815704,
-0.05312284082174301,
-0.02709585428237915,
0.025991356000304222,
0.08166167140007019,
0.003992674872279167,
0.001888337079435587,
0.0607118159532547,
-0.016487320885062218,
-0.05618693307042122,
0.04475002363324165,
-0.08308683335781097,
-0.0017836767947301269,
-0.06527233123779297,
0.056543223559856415,
0.0617450587451458,
0.043574266135692596,
0.011739755980670452,
0.008127865381538868,
0.009370427578687668,
-0.004956884775310755,
-0.04033203050494194,
-0.05390667915344238,
-0.04129401221871376,
-0.03676912933588028,
0.011855550110340118,
0.00406615948304534,
0.024530567228794098,
-0.04222036525607109,
0.013485576957464218,
0.0010388080263510346,
-0.020076941698789597,
0.02353295497596264,
-0.031121931970119476,
0.022481899708509445,
-0.003781127743422985,
-0.05073569715023041,
0.020326344296336174,
-0.003079681657254696,
0.00937933474779129,
0.027933137491345406,
-0.003326857928186655,
-0.03420384228229523,
-0.01375279389321804,
0.034934233874082565,
-0.03454231470823288,
-0.006720520090311766,
0.030159948393702507,
-0.023782357573509216,
0.04475002363324165,
-0.01675453782081604,
-0.014634612016379833,
0.05426296964287758,
0.002607597503811121,
-0.011098433285951614,
0.03406132385134697,
-0.008528691716492176,
-0.06794450432062149,
-0.013984383083879948,
-0.018179697915911674,
0.01358355674892664,
-0.029643328860402107,
0.0010104161920025945,
-0.02442367933690548,
0.05422734096646309,
0.09698214381933212,
-0.06527233123779297,
0.0027746083214879036,
-0.07125800102949142,
-0.05860970541834831,
0.01957813650369644,
0.03381192311644554,
-0.033117156475782394,
0.057469576597213745,
0.011908993124961853,
0.07973770052194595,
-0.029963988810777664,
0.08415570110082626,
0.024334607645869255,
0.005379979033023119,
0.04592578113079071,
-0.0569351427257061,
0.013886403292417526,
-0.012568130157887936,
-0.057469576597213745,
0.01734241656959057,
-0.015329377725720406,
-0.03940567374229431,
0.06580676138401031,
0.0438949279487133,
-0.024530567228794098,
0.06466663628816605,
-0.052730921655893326,
-0.014340672641992569,
0.0377311110496521,
-0.03154947981238365,
0.002338153077289462,
0.04934616759419441,
0.052802179008722305,
-0.009325890801846981,
0.08073531836271286,
0.01452772505581379,
0.07453586906194687,
-0.018108440563082695,
0.019845353439450264,
-0.008127865381538868,
0.010403668507933617,
-0.04300420358777046,
-0.01897244341671467,
0.012942234985530376,
0.022998519241809845,
0.0008790342253632843,
-0.028218168765306473,
-0.03076564148068428,
0.004039437975734472,
-0.010145357809960842,
0.03780236840248108,
0.023336995393037796,
-0.045569490641355515,
0.0003432074736338109,
0.09598452597856522,
-0.056471966207027435,
-0.01214058231562376,
0.0197206512093544,
-0.017395859584212303,
0.03940567374229431,
0.04200659319758415,
0.01141909509897232,
-0.016549671068787575,
-0.0013193864142522216,
0.011811013333499432,
-0.0007610131870023906,
-0.05155516415834427,
0.056650109589099884,
0.003157620085403323,
0.01916840299963951,
-0.03416821360588074,
-0.018224233761429787,
-0.05818215757608414,
0.0293226670473814,
-0.08629343658685684,
0.05073569715023041,
0.03146040812134743,
-0.02746995911002159,
0.037980515509843826,
-0.0075132655911147594,
0.04667399078607559,
0.0158638134598732,
-0.06334836035966873,
-0.04257665574550629,
-0.02650797739624977,
-0.041008979082107544,
-0.009054220281541348,
0.02205435186624527,
0.02483341284096241,
-0.060141753405332565,
0.009308076463639736,
-0.00021182555065024644,
-0.037125419825315475,
0.0014262734912335873,
-0.035753700882196426,
-0.003738818224519491,
-0.022410642355680466,
0.049025505781173706,
-0.01975628174841404,
-0.014135805889964104,
0.038978125900030136,
-0.06644808501005173,
-0.05497554689645767,
-0.019328732043504715,
-0.025474736467003822,
0.028182540088891983,
0.011784291826188564,
-0.014153620228171349,
0.06548610329627991,
-0.011891178786754608,
0.03794488683342934,
0.012844255194067955,
0.030124319717288017,
0.045605119317770004,
0.06124625355005264,
0.029482997953891754,
-0.010074099525809288,
0.023194478824734688,
-0.02064700610935688,
0.033081527799367905,
-0.03475609049201012,
0.010964824818074703,
0.035931847989559174,
-0.0737520307302475,
0.0007226006709970534,
0.04877610132098198,
-0.04118712618947029,
0.052944693714380264,
0.008978508412837982,
0.051768939942121506,
0.02191183529794216,
0.005518041551113129,
-0.07688738405704498,
0.004014942795038223,
-0.0057140011340379715,
-0.0002112688380293548,
0.04236288368701935,
-0.041685931384563446,
0.01167740486562252,
-0.031264446675777435,
0.043574266135692596,
0.013654814101755619,
-0.003776674158871174,
-0.04507068544626236,
0.005820888094604015,
0.009967212565243244,
0.0012581490445882082,
0.014509910717606544,
-0.06441723555326462,
0.02335480973124504,
0.06388279795646667,
0.029073264449834824,
-0.04503505676984787,
-0.06252889335155487,
-0.020076941698789597,
0.020451046526432037,
0.048170410096645355,
-0.03830117732286453,
-0.021484287455677986,
0.03472046181559563,
0.019008072093129158,
-0.04417996108531952,
-0.060070496052503586,
-0.006818499881774187,
0.01488401461392641,
-0.017173178493976593,
-0.024637453258037567,
0.015373913571238518,
0.010831216350197792,
-0.009504036046564579,
0.00982469692826271,
-0.03862183541059494,
-0.10318158566951752,
-0.000954745861236006,
-0.06131751090288162,
-0.009308076463639736,
-0.008591042831540108,
0.0079319067299366,
-0.020896408706903458,
-0.014839478768408298,
0.026472346857190132,
0.029892731457948685,
-0.012977863661944866,
-0.059179771691560745,
-0.025118445977568626,
-0.0068274070508778095,
-0.03140696510672569,
-0.016335897147655487,
0.04792100563645363,
0.021894020959734917,
-0.004680760204792023,
0.002100997604429722,
0.04752908647060394,
-0.03436417132616043,
-0.004315562546253204,
0.013129286468029022,
-0.016799073666334152,
-0.05910851061344147,
-0.004110695794224739,
0.02987491711974144,
0.005945589393377304,
-0.0007047861581668258,
0.01779668591916561,
0.030106505379080772,
-0.0005940022529102862,
0.03651972487568855,
0.030640941113233566,
-0.010091914795339108,
0.009717809967696667,
-0.02150210179388523,
-0.06117499619722366,
-0.005112761631608009,
0.0521252267062664,
-0.022998519241809845,
-0.003473827615380287,
-0.0016144390683621168,
0.035343967378139496,
-0.03423947095870972,
0.03420384228229523,
-0.025082817301154137,
-0.04161467403173447,
0.0360209196805954,
0.01712864264845848,
0.07325322926044464,
0.023960502818226814,
-0.002194523811340332,
-0.052766550332307816,
0.03954819217324257,
0.034791719168424606,
-0.026418903842568398,
-0.03138915076851845,
-0.029215781018137932,
0.0415077842772007,
-0.033829737454652786,
0.008515330962836742,
0.07061667740345001,
-0.0025786489713937044,
-0.0030863622669130564,
-0.03032027930021286,
-0.020914223045110703,
-0.026828637346625328,
-0.04571200907230377,
0.02290944755077362,
-0.028075652197003365,
0.0021544410847127438,
-0.04257665574550629,
-0.03094378672540188,
0.03673350065946579,
-0.04695902392268181,
-0.029518626630306244,
-0.044464994221925735,
-0.04589015245437622,
0.031157560646533966,
-0.042754799127578735,
0.01516013965010643,
-0.006279611494392157,
0.014848385937511921,
-0.04749345779418945,
0.007401925045996904,
-0.009361520409584045,
0.038123030215501785,
0.05312284082174301,
-0.030035248026251793,
0.027220556512475014,
0.026116058230400085,
0.01630917564034462,
-0.06634119898080826,
-0.03236894682049751,
-0.05148390680551529,
-0.03937004506587982,
0.040830835700035095,
0.008519784547388554,
-0.0006290745222941041,
-0.0541917085647583,
0.023479511961340904,
-0.02909107878804207,
0.030159948393702507,
-0.011846642941236496,
-0.00945059210062027,
0.03420384228229523,
-0.017965923994779587,
0.032226432114839554,
0.034934233874082565,
-0.037267934530973434,
-0.00679177837446332,
0.023817986249923706,
-0.004210902377963066,
0.044464994221925735,
0.013316338881850243,
-0.0005224659107625484,
-0.02727399952709675,
-0.010385854169726372,
0.007825018838047981,
-0.00869347620755434,
-0.030124319717288017,
-0.05251714587211609,
0.0034916421864181757,
0.008697929792106152,
-0.025937912985682487,
-0.043645527213811874,
-0.026828637346625328,
0.060141753405332565,
-0.01916840299963951,
0.012300912290811539,
-0.04197096452116966,
-0.05397793650627136,
0.045355718582868576,
-0.02976802922785282,
0.03937004506587982,
0.04417996108531952,
0.019204031676054,
0.052659664303064346,
-0.03983322158455849,
0.02312322147190571,
0.060248639434576035,
0.012051509693264961,
-0.022766930982470512,
-0.02891293354332447,
0.012479057535529137,
-0.01785903610289097,
0.03354470431804657,
0.008942878805100918,
-0.0031175375916063786,
-0.02750558778643608,
0.008595496416091919,
0.06716066598892212,
-0.01402891892939806,
0.06445286422967911,
0.10396542400121689,
-0.0289841927587986,
-0.002792422892525792,
0.01913277432322502,
0.03687601536512375,
-0.052909065037965775,
-0.0351480096578598,
0.07417958229780197,
-0.027772806584835052,
-0.07086608558893204,
-0.007869555614888668,
-0.030480610206723213,
-0.022321568801999092,
0.048704843968153,
-0.01824204809963703,
-0.000327898160321638,
-0.03133570775389671,
-0.030017433688044548,
0.004591687582433224,
-0.08429821580648422,
-0.04250539839267731,
-0.009219003841280937,
-0.04524883255362511,
0.020914223045110703
]
|
41,558 | pyglove.core.symbolic.base | gt | Returns True if a value is symbolically greater than the other value.
Refer to :func:`pyglove.lt` for the definition of symbolic comparison.
Args:
left: The left-hand value to compare.
right: The right-hand value to compare.
Returns:
True if the left value is symbolically greater than the right value.
| def gt(left: Any, right: Any) -> bool:
"""Returns True if a value is symbolically greater than the other value.
Refer to :func:`pyglove.lt` for the definition of symbolic comparison.
Args:
left: The left-hand value to compare.
right: The right-hand value to compare.
Returns:
True if the left value is symbolically greater than the right value.
"""
return lt(right, left) # pylint: disable=arguments-out-of-order
| (left: Any, right: Any) -> bool | [
0.02404763549566269,
0.01885513961315155,
-0.015223843976855278,
-0.0067364429123699665,
0.011825433000922203,
-0.01856187731027603,
-0.023564612492918968,
0.02761855348944664,
0.05209745839238167,
-0.061930425465106964,
0.045024625957012177,
-0.02299533598124981,
0.05692768841981888,
0.003044768702238798,
-0.04084992781281471,
0.03308706358075142,
-0.03189675509929657,
-0.0017412541201338172,
0.005382254254072905,
-0.0297231525182724,
-0.03441537544131279,
0.018527375534176826,
0.01569824106991291,
-0.04830228164792061,
0.0377102792263031,
0.04323054105043411,
0.02334035187959671,
-0.012144573032855988,
-0.02270207181572914,
0.0747305303812027,
-0.0387108288705349,
-0.058480262756347656,
0.006037785205990076,
-0.057514216750860214,
0.004394644871354103,
-0.001727237831801176,
-0.011523543857038021,
0.03329407051205635,
-0.039849381893873215,
-0.005886840634047985,
-0.014016286469995975,
-0.051269419491291046,
-0.009901967830955982,
-0.03612320497632027,
-0.058135244995355606,
-0.06593261659145355,
0.01940716616809368,
-0.0482332780957222,
0.03393235057592392,
-0.0072194659151136875,
0.0367097333073616,
-0.0822518840432167,
0.0030878956895321608,
0.03351833298802376,
-0.08998025208711624,
0.017475076019763947,
0.03605420142412186,
0.06103338301181793,
-0.05937730520963669,
0.02908487245440483,
0.021063243970274925,
0.03588169440627098,
-0.050441380590200424,
-0.05178694427013397,
0.044955622404813766,
0.013257251121103764,
-0.042229995131492615,
-0.02887786366045475,
-0.009401693940162659,
0.009505198337137699,
-0.07141837477684021,
0.02095974050462246,
-0.011756430380046368,
0.04947533458471298,
-0.05872177332639694,
-0.0029002930968999863,
-0.006055036094039679,
-0.00922056008130312,
-0.002449615625664592,
-0.04226449504494667,
0.01187718566507101,
-0.029619649052619934,
0.07114236056804657,
-0.0195451732724905,
-0.028360338881611824,
0.02944714017212391,
0.044127583503723145,
0.02853284776210785,
0.030533941462635994,
-0.0038383062928915024,
-0.053857043385505676,
0.030827205628156662,
0.010980143211781979,
-0.054650578647851944,
0.01654353179037571,
-0.0035083843395113945,
0.00637848861515522,
0.04015989601612091,
-0.03819330409169197,
0.009298188611865044,
0.07997477799654007,
0.018837889656424522,
0.0034803517628461123,
0.025462202727794647,
0.014154293574392796,
0.03846931457519531,
0.004025908652693033,
-0.021408261731266975,
-0.01878613792359829,
-0.04133295267820358,
-0.06510457396507263,
-0.030292430892586708,
0.06824421882629395,
-0.00831057969480753,
0.021925784647464752,
0.056893184781074524,
0.049026813358068466,
0.0029002930968999863,
0.03598519787192345,
-0.0015827622264623642,
0.0056841433979570866,
-0.02271932363510132,
0.03526066616177559,
-0.003208651440218091,
-0.026825016364455223,
0.052890997380018234,
0.05209745839238167,
0.01921740733087063,
-0.09874366223812103,
0.03974587842822075,
0.07535155862569809,
0.023029837757349014,
-0.021891282871365547,
0.07328145951032639,
0.016215765848755836,
-0.022443309426307678,
0.02734254114329815,
0.0692792683839798,
0.05658267065882683,
-0.014568313024938107,
-0.00728846900165081,
-0.018320364877581596,
-0.012731101363897324,
0.002852853387594223,
-0.019234657287597656,
-0.002643687417730689,
-0.10426392406225204,
0.032690294086933136,
0.05023437365889549,
0.06127489358186722,
0.0034156611654907465,
-0.011937563307583332,
0.010307361371815205,
-0.006671752315014601,
-0.002695439849048853,
0.0054253810085356236,
-0.0012841074494645,
-0.016785042360424995,
-0.007676612585783005,
0.014818449504673481,
0.021494515240192413,
-0.005675517953932285,
-0.012981237843632698,
0.0024603973142802715,
0.012963986955583096,
-0.0662086233496666,
0.024358149617910385,
0.025738215073943138,
0.015016834251582623,
0.06358650326728821,
0.012032442726194859,
-0.014654566533863544,
-0.03338032588362694,
-0.027722058817744255,
-0.01844112016260624,
-0.0472327284514904,
-0.021908534690737724,
0.031379230320453644,
0.010177980177104473,
0.02713553048670292,
0.03043043613433838,
-0.04926832765340805,
-0.03974587842822075,
-0.04512812942266464,
-0.009996847249567509,
-0.0011223810724914074,
-0.000447982078185305,
-0.01921740733087063,
-0.010333238169550896,
0.029188377782702446,
-0.02768755704164505,
-0.004631843883544207,
0.000800545618403703,
-0.029964664950966835,
0.07638660818338394,
0.004847479052841663,
-0.011342410929501057,
0.014395805075764656,
0.0008350472198799253,
0.04778475686907768,
-0.018941394984722137,
-0.007991439662873745,
-0.0038188991602510214,
-0.025703713297843933,
0.04668070375919342,
-0.007210840471088886,
-0.02187403291463852,
-0.02095974050462246,
-0.017906345427036285,
-0.07500654458999634,
-0.014939205721020699,
-0.006162853445857763,
-0.01047987025231123,
0.03884883597493172,
0.004502462688833475,
0.030999714508652687,
-0.05251147970557213,
0.0066933161579072475,
-0.013007113710045815,
-0.037813786417245865,
0.10295286029577255,
-0.07590358704328537,
0.032845549285411835,
0.009229185990989208,
0.05013086646795273,
0.025427700951695442,
-0.014835700392723083,
0.06020534411072731,
-0.00558926397934556,
-0.0073660979978740215,
0.037813786417245865,
0.0897042378783226,
0.04443809762597084,
-0.011014644987881184,
-0.058480262756347656,
-0.05116591602563858,
-0.0022641695104539394,
0.03286280110478401,
-0.02704927697777748,
0.025151686742901802,
0.002272794721648097,
0.08342494070529938,
-0.03826230764389038,
0.014852951280772686,
0.011126775294542313,
-0.07479953020811081,
-0.02102874219417572,
-0.014680443331599236,
-0.006930514704436064,
0.057721223682165146,
-0.04526613652706146,
-0.06424203515052795,
-0.031517237424850464,
-0.002324547152966261,
-0.030257929116487503,
0.002035596175119281,
-0.0327937975525856,
-0.07321245968341827,
0.03657172620296478,
0.023926880210638046,
0.007680925074964762,
0.05002736300230026,
-0.0458526648581028,
0.04661170020699501,
0.03712375462055206,
-0.003036143258213997,
0.02635924518108368,
-0.0029304821509867907,
0.02894686721265316,
-0.016517654061317444,
-0.048819806426763535,
-0.06262045353651047,
-0.08038879930973053,
-0.020062698051333427,
0.008401147089898586,
0.010505746118724346,
0.0733504667878151,
-0.007715426851063967,
0.010643752291798592,
-0.01830311492085457,
-0.008345081470906734,
-0.03629571199417114,
-0.07293644547462463,
0.007439413573592901,
-0.07107335329055786,
0.05382253974676132,
-0.023029837757349014,
-0.04768124967813492,
0.025341447442770004,
-0.04260951280593872,
0.020493967458605766,
0.0363302156329155,
0.016086384654045105,
0.022046541795134544,
0.039366357028484344,
-0.010833511129021645,
0.03393235057592392,
-0.02284007892012596,
0.06820972263813019,
0.035019151866436005,
0.03260403871536255,
-0.028791610151529312,
-0.010376364924013615,
-0.016664287075400352,
0.023029837757349014,
0.0077844299376010895,
0.013214124366641045,
0.009660456329584122,
-0.041091438382864,
0.03527791425585747,
-0.046094175428152084,
-0.02544495090842247,
0.002676032716408372,
-0.016733290627598763,
0.028118828311562538,
0.02368536777794361,
-0.015663739293813705,
-0.01842387020587921,
-0.02334035187959671,
0.0071461498737335205,
0.007534293457865715,
0.007680925074964762,
-0.01907940022647381,
0.016664287075400352,
-0.034380871802568436,
-0.035295166075229645,
-0.05233897268772125,
0.0059040910564363,
0.04919932410120964,
0.02803257293999195,
-0.012532716616988182,
0.0237716231495142,
0.11744354665279388,
-0.006615687161684036,
0.012411961331963539,
0.056306660175323486,
0.023116091266274452,
0.07141837477684021,
-0.015094462782144547,
-0.050579387694597244,
-0.04374806582927704,
0.0020474561024457216,
0.007245342247188091,
-0.026687009260058403,
0.03664072975516319,
0.0281878300011158,
-0.05958431214094162,
-0.002161742653697729,
0.04702572152018547,
0.03650272265076637,
-0.03695124387741089,
0.017889095470309258,
0.03553667664527893,
-0.006305172573775053,
0.009099804796278477,
-0.0010722458828240633,
0.03381159529089928,
0.026169486343860626,
0.013817902654409409,
0.0631379783153534,
0.03132747858762741,
-0.0013563452521339059,
-0.03519166260957718,
-0.007003830745816231,
-0.04771575331687927,
-0.035139910876750946,
0.028049824759364128,
0.025824468582868576,
-0.06127489358186722,
0.015266970731317997,
-0.0019493420841172338,
-0.04574916139245033,
0.028757108375430107,
0.028722606599330902,
-0.06055035814642906,
-0.007284156512469053,
-0.015163466334342957,
0.028895113617181778,
-0.0168971735984087,
-0.018389368429780006,
0.0404014065861702,
0.021132247522473335,
-0.005515947937965393,
0.0011838371865451336,
0.0140939150005579,
0.02039046213030815,
-0.015465355478227139,
-0.018527375534176826,
0.0035428861156105995,
-0.02901587076485157,
0.0003051237727049738,
-0.05578913539648056,
-0.05458157882094383,
0.04333404451608658,
-0.01370577234774828,
0.008664221502840519,
-0.02130475640296936,
-0.03329407051205635,
-0.012860482558608055,
0.0005460961256176233,
0.04543864727020264,
0.035070907324552536,
-0.03132747858762741,
-0.023323101922869682,
0.029050372540950775,
0.03898683935403824,
0.04119494557380676,
0.047060221433639526,
-0.02741154469549656,
0.039918385446071625,
-0.058997783809900284,
0.010540247894823551,
-0.09722559154033661,
-0.026876768097281456,
-0.016560781747102737,
-0.004881980363279581,
0.016379648819565773,
0.06741618365049362,
0.07086634635925293,
-0.029464391991496086,
0.0033703779336065054,
-0.056237656623125076,
-0.01086801290512085,
-0.05979132279753685,
0.010014098137617111,
-0.03034418262541294,
-0.00735747255384922,
-0.013507387600839138,
-0.04191948100924492,
0.04430009052157402,
-0.014680443331599236,
0.0009159104083664715,
0.02629024162888527,
0.017699334770441055,
0.060446854680776596,
-0.000616177509073168,
-0.010773133486509323,
-0.06406952440738678,
0.024703165516257286,
0.01363676879554987,
-0.0021509609650820494,
0.013412508182227612,
0.030447687953710556,
-0.0346396341919899,
-0.031655244529247284,
0.027980821207165718,
0.02144276164472103,
-0.01821685954928398,
0.06641563773155212,
-0.04688771441578865,
-0.05789373442530632,
0.01851012371480465,
0.03626121208071709,
0.0020787231624126434,
0.0018156482838094234,
-0.07997477799654007,
-0.07052133232355118,
-0.05475408583879471,
-0.03168974444270134,
0.05285649746656418,
-0.042022984474897385,
-0.010669629089534283,
-0.0253069456666708,
0.028377590700984,
-0.06572560220956802,
0.02370261959731579,
-0.016698788851499557,
-0.018182357773184776,
-0.006792508065700531,
0.03664072975516319,
-0.005559075158089399,
-0.0017541921697556973,
-0.001911605941131711,
0.016483154147863388,
-0.012420586310327053,
0.055685628205537796,
-0.022753823548555374,
0.015948377549648285,
-0.03967687487602234,
-0.053443022072315216,
0.016767792403697968,
-0.004748286679387093,
-0.013145120814442635,
0.02544495090842247,
0.06465605646371841,
0.007193589583039284,
-0.0923953652381897,
0.02466866560280323,
0.004159602802246809,
-0.03643371909856796,
-0.0009735928615555167,
-0.09142931550741196,
-0.0043666125275194645,
0.05647916719317436,
0.009065303020179272,
-0.0034221303649246693,
0.016793668270111084,
-0.011307909153401852,
-0.01697480119764805,
0.03386334702372551,
0.0038318370934575796,
0.0693482756614685,
-0.0010830276878550649,
-0.00597309460863471,
0.08363194763660431,
-0.005330501589924097,
0.08211387693881989,
-0.023719869554042816,
-0.04098793491721153,
0.020804481580853462,
0.016655661165714264,
-0.06475955992937088,
0.06862373650074005,
0.0326385423541069,
0.01844112016260624,
0.018906893208622932,
0.022598566487431526,
-0.03629571199417114,
0.011575296521186829,
-0.0004442084755282849,
0.032897304743528366,
-0.035070907324552536,
-0.003907309379428625,
-0.04340304806828499,
0.019389916211366653,
-0.05047588422894478,
-0.008634032681584358,
0.016595283523201942,
0.03127572685480118,
-0.02052846923470497,
0.021839531138539314,
0.024289146065711975,
0.024496156722307205,
-0.04499012604355812,
-0.026963023468852043,
0.0455421507358551,
-0.022132795304059982,
0.04198848083615303,
0.015137589536607265,
0.0012819512048736215,
0.01709555648267269,
-0.07014181464910507,
0.05917029455304146,
0.01205831952393055,
-0.008215700276196003,
0.018941394984722137,
-0.04119494557380676,
-0.007193589583039284,
0.02089073695242405,
-0.001943951123394072,
-0.03388059884309769,
0.015473980456590652,
-0.007659361697733402,
-0.050717394798994064,
-0.03546767309308052,
0.06931377202272415,
-0.0404014065861702,
0.08183786273002625,
0.05865276977419853,
0.01842387020587921,
0.006706254091113806,
-0.010842137038707733,
0.02922287955880165,
0.006460430100560188,
-0.0319485068321228,
-0.006111101247370243,
-0.005421068519353867,
0.0009924608748406172,
0.01667291298508644,
0.01725081540644169,
0.0346396341919899,
0.02832583710551262,
0.03288005292415619,
-0.02677326463162899,
0.039573367685079575,
0.006977954413741827,
-0.0118081821128726,
0.024703165516257286,
-0.03750327229499817,
-0.01907940022647381,
-0.011739179491996765,
0.039780378341674805,
-0.03182775154709816,
0.014887453056871891,
-0.01153216976672411,
0.004549902398139238,
0.01655215583741665,
0.044265590608119965,
0.008560717105865479,
0.0037455831188708544,
-0.03877983242273331,
-0.011471791192889214,
0.04926832765340805,
-0.04709472507238388,
0.026825016364455223,
0.0014307394158095121,
-0.00826745294034481,
0.03388059884309769,
-0.03595069795846939,
0.0360197015106678,
0.04309253394603729,
0.008159635588526726,
0.011627049185335636,
-0.09004925191402435,
0.004756912123411894,
-0.028688104823231697,
0.013654019683599472,
0.005106240976601839,
-0.03902134299278259,
-0.021322006359696388,
0.03370809182524681,
-0.013628143817186356,
-0.014387179166078568,
-0.0017692866967990994,
0.029895661398768425,
0.022236300632357597,
0.05144193023443222,
-0.025324195623397827,
-0.0012204950908198953,
-0.028774358332157135,
-0.037744782865047455,
0.021839531138539314,
0.015818996354937553,
0.035174410790205,
0.06955528259277344,
-0.0417814739048481,
0.01970043033361435,
-0.019855687394738197,
0.001595700392499566,
-0.039642371237277985,
-0.021770527586340904,
-0.05951530858874321,
0.0665881410241127,
-0.03491564840078354,
-0.06431103497743607,
-0.03584719076752663,
0.009505198337137699,
0.016491778194904327,
-0.00025391043163836,
0.03484664484858513,
-0.10612700879573822,
0.028584599494934082,
-0.029947413131594658,
0.0217360258102417,
-0.012903609313070774,
0.026618007570505142,
0.0039569055661559105,
0.04926832765340805,
0.0076722996309399605,
-0.004838853608816862,
0.006374176125973463,
0.09908867627382278,
0.015491231344640255,
-0.008543466217815876,
-0.0331043116748333,
0.02404763549566269,
0.01082488615065813,
-0.012446463108062744,
-0.02061472274363041,
-0.03877983242273331,
0.054064054042100906,
-0.019734932109713554,
0.039090346544981,
0.011325160041451454,
-0.03877983242273331,
-0.009444820694625378,
0.008388208225369453,
0.004670658148825169,
-0.023806124925613403,
-0.012851856648921967,
0.021270254626870155,
-0.0232713483273983,
0.028722606599330902,
-0.10571299493312836,
-0.008427022956311703,
-0.0013347817584872246,
0.01961417682468891,
0.048336781561374664,
-0.016095010563731194,
-0.014421680942177773,
0.02284007892012596,
0.035174410790205,
-0.04143645614385605,
-0.012213576585054398,
0.016931673511862755,
0.03251778706908226,
-0.048750802874565125,
0.11330334842205048,
-0.020062698051333427,
-0.014723570086061954,
0.026928521692752838,
-0.03439812362194061,
0.03231077641248703,
-0.026186736300587654,
-0.03455338254570961,
-0.0030145798809826374,
0.008362332358956337,
0.015335974283516407,
0.01482707541435957,
-0.04336854815483093,
-0.03177599981427193,
-0.061723414808511734,
0.016233015805482864,
-0.01135103590786457,
0.01738019473850727,
0.019941940903663635,
-0.0013692834181711078,
-0.008841042406857014,
0.030188925564289093,
-0.035709187388420105,
-0.012273954227566719,
-0.017121434211730957,
0.009763960726559162,
-0.030119922012090683,
-0.03905584290623665,
-0.03317331522703171,
-0.017259439453482628,
0.05068289488554001,
0.004317016340792179,
0.04212648794054985,
-0.03327682241797447,
-0.015025459229946136,
0.06979679316282272,
-0.05164893716573715,
0.0004164454585406929,
0.006822697352617979,
0.016526279971003532,
-0.05088990181684494,
-0.022408807650208473,
-0.024513406679034233,
-0.007081459276378155,
0.0073315962217748165,
0.004420521203428507,
0.020097199827432632,
-0.05054488778114319,
0.025962475687265396,
-0.029636899009346962,
-0.021201251074671745,
0.0767316222190857,
0.041884977370500565,
0.07034882158041,
0.03239702805876732,
0.04530064016580582,
-0.04388607293367386,
-0.0015838404651731253,
-0.015077211894094944,
-0.043851569294929504,
0.02727353759109974,
-0.049233824014663696,
-0.016724664717912674,
0.041884977370500565,
0.015965629369020462,
0.015577485784888268,
-0.05206295847892761,
0.07521355152130127,
0.08521902561187744,
0.006719192024320364,
-0.020873485133051872,
-0.06099887937307358,
-0.018130606040358543,
-0.02908487245440483,
0.023926880210638046,
-0.03251778706908226,
-0.001766052097082138,
-0.018544625490903854,
0.012843231670558453,
-0.05327051505446434,
0.05216646194458008
]
|
41,559 | pyglove.core.symbolic.base | sym_hash | Returns hash of value. Use symbolic hashing function if possible.
Example::
@pg.symbolize
class A:
def __init__(self, x):
self.x = x
assert hash(A(1)) != hash(A(1))
assert pg.hash(A(1)) == pg.hash(A(1))
assert pg.hash(pg.Dict(x=[A(1)])) == pg.hash(pg.Dict(x=[A(1)]))
Args:
x: Value for computing hash.
Returns:
The hash value for `x`.
| def sym_hash(x: Any) -> int:
"""Returns hash of value. Use symbolic hashing function if possible.
Example::
@pg.symbolize
class A:
def __init__(self, x):
self.x = x
assert hash(A(1)) != hash(A(1))
assert pg.hash(A(1)) == pg.hash(A(1))
assert pg.hash(pg.Dict(x=[A(1)])) == pg.hash(pg.Dict(x=[A(1)]))
Args:
x: Value for computing hash.
Returns:
The hash value for `x`.
"""
if isinstance(x, Symbolic):
return x.sym_hash()
if inspect.isfunction(x):
return hash(x.__code__.co_code)
if inspect.ismethod(x):
return hash((sym_hash(x.__self__), x.__code__.co_code)) # pytype: disable=attribute-error
return hash(x)
| (x: Any) -> int | [
0.056128740310668945,
-0.049680061638355255,
0.013473779894411564,
0.05681323632597923,
0.003796255448833108,
-0.01699533686041832,
-0.019508160650730133,
-0.004037180449813604,
0.0012170083355158567,
-0.035305626690387726,
0.013987152837216854,
-0.007421386893838644,
0.028928998857736588,
-0.0013093253364786506,
-0.03771938011050224,
-0.04550102725625038,
-0.0038052620366215706,
0.07122369855642319,
0.017031362280249596,
-0.005791203584522009,
0.001403894042596221,
0.04823901504278183,
0.00008260683534899727,
-0.009880171157419682,
-0.011987701058387756,
0.006196497939527035,
0.07666364312171936,
0.05544424429535866,
0.012329949997365475,
0.0393405556678772,
-0.005566040053963661,
-0.01210478600114584,
-0.00263441214337945,
0.002121039666235447,
0.01013235468417406,
-0.056705158203840256,
-0.010681753046810627,
0.06985470652580261,
-0.013464773073792458,
-0.04867132753133774,
0.03539569303393364,
-0.004944588989019394,
-0.023038722574710846,
-0.015311113558709621,
0.0055165039375424385,
-0.003188314149156213,
-0.02619101107120514,
0.015878524631261826,
-0.027361860498785973,
-0.1018819510936737,
-0.010915922932326794,
-0.08631865680217743,
0.02478599175810814,
0.033252134919166565,
0.06560362130403519,
0.03559383749961853,
0.03298193961381912,
-0.02914515510201454,
0.008308530785143375,
0.026227036491036415,
0.005908288527280092,
0.029037076979875565,
0.006926027126610279,
-0.043087273836135864,
0.03404471278190613,
-0.02874886803328991,
-0.05933506786823273,
-0.01781493052840233,
-0.03608018904924393,
-0.043663691729307175,
0.013113518245518208,
-0.03238750994205475,
0.018238238990306854,
-0.012257897295057774,
0.0014219071017578244,
-0.018445389345288277,
0.02165171504020691,
0.011078041046857834,
0.03973684459924698,
-0.005102203227579594,
0.024137521162629128,
-0.05548027157783508,
-0.06318986415863037,
-0.04434819146990776,
-0.08538197726011276,
0.011717504821717739,
0.08113089203834534,
-0.005007634870707989,
-0.050436608493328094,
0.0013250868069007993,
-0.028082383796572685,
-0.009020047262310982,
-0.0005882394616492093,
0.029883692041039467,
-0.011555387638509274,
-0.06160471588373184,
0.02759603038430214,
-0.02561459317803383,
0.04733835905790329,
-0.0151760159060359,
0.043087273836135864,
0.01469866931438446,
-0.0563448965549469,
0.0366746187210083,
-0.014941846020519733,
-0.014869793318212032,
0.043843824416399,
-0.06023572385311127,
-0.044312164187431335,
-0.012239884585142136,
-0.02561459317803383,
0.05040058493614197,
-0.018607506528496742,
-0.05742568150162697,
0.060271747410297394,
0.006313582882285118,
0.008132902905344963,
-0.015689387917518616,
0.012338955886662006,
-0.0026907031424343586,
-0.028514698147773743,
0.06318986415863037,
-0.03898029401898384,
0.022084029391407967,
0.06708069145679474,
0.04618552327156067,
0.017805924639105797,
-0.021993964910507202,
-0.04701412469148636,
0.07406976073980331,
0.0323154553771019,
0.022246146574616432,
-0.020300734788179398,
0.08884048461914062,
0.0007475425954908133,
0.00907408632338047,
0.0224803164601326,
0.05800209939479828,
0.05756978690624237,
-0.048779405653476715,
0.03377451375126839,
-0.010051296092569828,
-0.03213532641530037,
-0.018751610070466995,
0.03689077869057655,
0.002659180201590061,
-0.04287111759185791,
0.017076395452022552,
0.027704108506441116,
0.02242627739906311,
0.036332372575998306,
0.022894617170095444,
0.07392565906047821,
0.04287111759185791,
-0.0817793607711792,
0.04135802015662193,
-0.03454907611012459,
-0.010006262920796871,
-0.020480865612626076,
-0.011321217752993107,
0.014194303192198277,
0.011717504821717739,
-0.0015817731618881226,
-0.08948895335197449,
-0.0393405556678772,
-0.022516343742609024,
0.01041155681014061,
0.013915100134909153,
0.020426826551556587,
-0.013725963421165943,
-0.06693658232688904,
-0.060415852814912796,
-0.061748821288347244,
0.009047066792845726,
0.06131650507450104,
0.04982416331768036,
-0.03595409914851189,
0.020174643024802208,
0.047950804233551025,
-0.010762812569737434,
0.04387985169887543,
-0.08062652498483658,
-0.01044758316129446,
-0.010474602691829205,
-0.011213138699531555,
0.041754309087991714,
0.02433566376566887,
0.004638366866856813,
0.03272975608706474,
0.031018514186143875,
-0.046797968447208405,
-0.01981438137590885,
-0.009727060794830322,
0.010429570451378822,
0.031847115606069565,
-0.0219219122081995,
-0.03717898577451706,
-0.007497942540794611,
-0.047698620706796646,
0.02817244827747345,
0.02664133720099926,
-0.03735911846160889,
-0.014941846020519733,
-0.005966830998659134,
-0.0073943673633039,
-0.05998354032635689,
0.022066015750169754,
-0.032873861491680145,
0.02076907455921173,
-0.05061674118041992,
0.011870616115629673,
-0.039520684629678726,
-0.05558834969997406,
0.03206327185034752,
-0.020462853834033012,
0.02696557343006134,
0.03912439942359924,
-0.013852054253220558,
0.060343801975250244,
-0.016779178753495216,
0.052490100264549255,
-0.005930805113166571,
-0.02415553294122219,
0.036314357072114944,
0.0533907525241375,
-0.04751849174499512,
0.029091116040945053,
0.035179536789655685,
0.001828327076509595,
-0.08552607893943787,
0.029181180521845818,
0.02350706234574318,
0.05749773606657982,
0.009862158447504044,
0.021219402551651,
-0.047878753393888474,
0.019706303253769875,
0.021543636918067932,
0.013897087424993515,
-0.011168106459081173,
0.007565491367131472,
0.06318986415863037,
0.040853653103113174,
0.031594932079315186,
-0.009168654680252075,
-0.0337204746901989,
-0.006376628298312426,
0.07277282327413559,
-0.050436608493328094,
-0.0550839826464653,
-0.042078543454408646,
-0.04330343008041382,
0.010816851630806923,
-0.09078589826822281,
0.012122799642384052,
-0.0012721733655780554,
-0.015302106738090515,
0.028208475559949875,
-0.006944040302187204,
0.02995574288070202,
-0.022696474567055702,
0.009177661500871181,
-0.007047615479677916,
-0.03175704926252365,
0.037467196583747864,
-0.04953595623373985,
-0.03436894714832306,
0.06704466789960861,
-0.013581858016550541,
0.02746993862092495,
0.03298193961381912,
-0.07493439316749573,
-0.008412105962634087,
-0.004483004100620747,
-0.013149544596672058,
0.013825034722685814,
0.018985779955983162,
0.050508663058280945,
0.02312878891825676,
0.02102125808596611,
0.006736889947205782,
-0.020606957376003265,
0.01088890340179205,
-0.04874338209629059,
-0.03703488036990166,
0.07543876022100449,
-0.022768527269363403,
-0.040025051683187485,
-0.013906093314290047,
-0.022011976689100266,
0.026479220017790794,
0.020138617604970932,
-0.025272343307733536,
0.0120147205889225,
0.05245407298207283,
0.06963855028152466,
-0.0330900177359581,
0.005489484407007694,
0.034981392323970795,
0.03528761491179466,
0.000022762616936233826,
0.08494965732097626,
0.03080235794186592,
-0.008966008201241493,
-0.03905234485864639,
-0.0008820777293294668,
0.045969367027282715,
-0.00506617734208703,
-0.003998902626335621,
0.04921172186732292,
0.012429021298885345,
0.07889726758003235,
-0.03669263422489166,
0.04279906675219536,
0.028064370155334473,
-0.04016915708780289,
-0.025470487773418427,
-0.0479147806763649,
-0.034531064331531525,
0.04312330111861229,
-0.01630183309316635,
0.02503817342221737,
-0.010501622222363949,
0.015302106738090515,
0.015959585085511208,
-0.043411511927843094,
-0.020300734788179398,
-0.024371691048145294,
0.004347905982285738,
-0.0095199104398489,
0.03840387612581253,
-0.0037219515070319176,
0.05047263577580452,
0.02516426518559456,
-0.037142958492040634,
0.020426826551556587,
0.03840387612581253,
0.06455886363983154,
-0.059443145990371704,
-0.027109676972031593,
-0.0016605802811682224,
-0.011987701058387756,
0.02746993862092495,
-0.0024385200813412666,
-0.03923247754573822,
-0.03552178293466568,
-0.07695185393095016,
-0.01979636959731579,
-0.0493197999894619,
0.003472020151093602,
0.025794724002480507,
-0.011501348577439785,
0.0003405596944503486,
-0.02759603038430214,
0.04550102725625038,
-0.016707126051187515,
0.02076907455921173,
-0.04420408606529236,
-0.05173354968428612,
0.0330900177359581,
0.05829031020402908,
-0.02179582044482231,
-0.027307821437716484,
-0.030460109934210777,
0.01604064367711544,
0.019778355956077576,
-0.053570885211229324,
0.0382237434387207,
0.028910985216498375,
-0.03330617398023605,
-0.03220737725496292,
-0.008439125493168831,
-0.05202176049351692,
-0.017535727471113205,
0.040277235209941864,
0.049031589180231094,
0.033450279384851456,
0.042835090309381485,
-0.0025601082015782595,
-0.014779727905988693,
0.07345731556415558,
-0.03571992740035057,
0.03445901349186897,
-0.026857495307922363,
-0.042907144874334335,
0.034332919865846634,
0.028280528262257576,
-0.03078434430062771,
0.06862981617450714,
0.026533259078860283,
-0.04503268748521805,
-0.04301522299647331,
0.03685475140810013,
0.002767258556559682,
-0.005394916050136089,
-0.008060851134359837,
0.041430070996284485,
0.008290518075227737,
-0.07961779087781906,
-0.016563022509217262,
0.01781493052840233,
-0.009546929970383644,
0.05335472896695137,
-0.030910436064004898,
-0.02656928449869156,
-0.006390138063579798,
-0.009889177978038788,
0.01156439445912838,
0.004701412748545408,
-0.011132080107927322,
-0.057461708784103394,
0.0010250565828755498,
-0.03771938011050224,
-0.046221550554037094,
0.054723720997571945,
-0.027650069445371628,
0.08696712553501129,
0.0022020984906703234,
0.017778905108571053,
-0.000989030348137021,
0.03586403280496597,
-0.05713747441768646,
-0.050256479531526566,
0.02638915553689003,
-0.016391897574067116,
0.01309550553560257,
0.0006895629921928048,
0.03170301020145416,
-0.009258720092475414,
0.022264160215854645,
-0.030514148995280266,
-0.0012699217768386006,
0.0650632232427597,
-0.01730155758559704,
0.027451926842331886,
-0.04913966730237007,
0.038872215896844864,
-0.007281785365194082,
0.009150641970336437,
0.05710144713521004,
0.027325835078954697,
0.021417545154690742,
-0.017148448154330254,
0.0196702778339386,
0.02516426518559456,
0.03238750994205475,
0.019976500421762466,
-0.003059971146285534,
0.06441475450992584,
0.022210121154785156,
-0.0044019450433552265,
-0.06077611446380615,
0.052994467318058014,
-0.05897480621933937,
-0.04006107896566391,
-0.04049339145421982,
-0.04139404743909836,
-0.029307272285223007,
0.005169752519577742,
0.03847592696547508,
-0.034531064331531525,
0.010645727626979351,
0.022912630811333656,
-0.06517130136489868,
-0.0757269635796547,
-0.051409315317869186,
-0.050508663058280945,
0.019310016185045242,
0.049103643745183945,
0.024713939055800438,
0.033450279384851456,
0.06394641846418381,
-0.02939733862876892,
0.013545832596719265,
0.022894617170095444,
-0.003165797796100378,
-0.01578846015036106,
0.004221814218908548,
-0.06203702837228775,
-0.04694207385182381,
0.025326382368803024,
-0.003296392736956477,
0.05526411533355713,
0.0027402390260249376,
0.07796058803796768,
0.005178758874535561,
0.03649448975920677,
0.004818497691303492,
0.006534243002533913,
0.013491792604327202,
-0.020733049139380455,
0.007988798432052135,
-0.014734695665538311,
0.04344753548502922,
0.009339779615402222,
0.00770058948546648,
0.014734695665538311,
-0.007205229718238115,
-0.01596859097480774,
-0.03825977072119713,
-0.040277235209941864,
0.011168106459081173,
-0.01802208088338375,
0.016058655455708504,
0.022029990330338478,
0.046870019286870956,
0.015671374276280403,
-0.012708224356174469,
-0.017103414982557297,
0.008398596197366714,
-0.058614544570446014,
-0.03595409914851189,
0.051265209913253784,
0.00888494960963726,
0.001078532892279327,
0.005273327697068453,
0.0028663305565714836,
-0.04254688322544098,
-0.027181729674339294,
-0.0190398208796978,
-0.01044758316129446,
-0.03503543138504028,
0.021057285368442535,
-0.011591413989663124,
0.024677911773324013,
0.014356420375406742,
0.030243951827287674,
-0.040025051683187485,
0.05317459627985954,
0.037791430950164795,
-0.02829854004085064,
0.01813916675746441,
-0.05767786502838135,
0.049031589180231094,
0.0006118816090747714,
0.053642936050891876,
-0.029631508514285088,
-0.03314405679702759,
0.03029799275100231,
-0.015752434730529785,
-0.020174643024802208,
-0.03186513110995293,
0.025506513193249702,
-0.0018260754877701402,
-0.021957937628030777,
0.019724316895008087,
-0.01731957122683525,
0.02619101107120514,
-0.029361311346292496,
-0.046978097409009933,
-0.011582407169044018,
-0.011375256814062595,
0.04643770679831505,
-0.0705391988158226,
-0.022894617170095444,
-0.07983394712209702,
0.04730233550071716,
0.0332341231405735,
0.0151760159060359,
0.03276578336954117,
0.008605746552348137,
0.0011764789232984185,
0.06120842695236206,
-0.10779023915529251,
-0.02626306377351284,
-0.018445389345288277,
0.0007160197128541768,
-0.034152790904045105,
0.026082932949066162,
-0.010870890691876411,
0.00030256336322054267,
0.060415852814912796,
0.0630817860364914,
0.000593868549913168,
0.02345302328467369,
-0.008376079611480236,
-0.034206829965114594,
0.012897362001240253,
-0.029433364048600197,
-0.07017894089221954,
-0.009186668321490288,
0.014329400844871998,
-0.05317459627985954,
0.046365655958652496,
-0.008299523964524269,
-0.00683596171438694,
-0.005169752519577742,
0.041033785790205,
-0.04135802015662193,
0.007245759479701519,
-0.07486233860254288,
-0.005430941935628653,
-0.01986842229962349,
0.008398596197366714,
0.01610368862748146,
-0.009961230680346489,
-0.028262514621019363,
0.01360887847840786,
0.006146961823105812,
-0.014671649783849716,
0.0009670769795775414,
0.03040607087314129,
0.03073030523955822,
-0.00475995521992445,
0.06808942556381226,
0.025956841185688972,
0.02458784729242325,
-0.0027154709678143263,
0.0050706807523965836,
-0.08934485167264938,
-0.03571992740035057,
0.01561733614653349,
0.0024542815517634153,
-0.015572302974760532,
-0.027253782376646996,
0.016941295936703682,
0.019760342314839363,
0.031468842178583145,
-0.04658181220293045,
0.005057170987129211,
-0.042835090309381485,
0.02721775695681572,
-0.013807022012770176,
0.01223087776452303,
0.0190398208796978,
0.04892351105809212,
-0.0025826245546340942,
0.05566040053963661,
-0.019147899001836777,
-0.05425538122653961,
-0.05973135679960251,
-0.020084578543901443,
0.01641891710460186,
-0.008569720201194286,
0.04784272611141205,
-0.0508689247071743,
0.0061784847639501095,
0.014095230959355831,
-0.02862277626991272,
0.08206757158041,
-0.027181729674339294,
0.008632766082882881,
-0.032243404537439346,
0.02363315410912037,
0.011150093749165535,
-0.002425010083243251,
0.021183375269174576,
-0.01866154558956623,
0.0035598338581621647,
-0.04647373408079147,
0.0021435560192912817,
-0.014752708375453949,
-0.03991697356104851,
-0.02619101107120514,
0.05742568150162697,
0.015860512852668762,
-0.025794724002480507,
-0.06019969657063484,
-0.028280528262257576,
-0.028190461918711662,
0.03426086902618408,
-0.023164814338088036,
-0.08783175051212311,
0.013455767184495926,
-0.0008893955964595079,
0.006336099002510309,
-0.012383989058434963,
-0.030424082651734352,
0.015419191680848598,
-0.01117711327970028,
0.016581036150455475,
0.008484158664941788,
0.012906367890536785,
-0.025578565895557404,
-0.045392949134111404,
-0.06535143405199051,
0.005678622052073479,
0.07435797154903412,
-0.046365655958652496,
-0.04982416331768036,
-0.0002230525278719142,
-0.057605814188718796,
-0.012609152123332024,
0.01284332200884819,
-0.01441045943647623,
0.00750694889575243,
-0.005723654292523861,
0.0020129610784351826,
-0.02305673621594906,
0.004850020166486502,
-0.06971059739589691,
-0.013113518245518208,
-0.0019825641065835953,
0.007016092538833618,
-0.047374386340379715,
0.005115713458508253,
-0.02458784729242325,
0.04953595623373985,
0.07853700965642929,
-0.04081762582063675,
-0.012050746940076351,
0.015824485570192337,
0.060992270708084106,
0.07695185393095016,
0.026154983788728714,
-0.002688451437279582,
-0.025848763063549995,
-0.0062865628860890865,
0.03208128735423088,
0.010294471867382526,
-0.05011237412691116,
-0.04834709316492081,
-0.015761440619826317,
0.06037982553243637,
0.05512000992894173,
0.008925478905439377,
-0.0491756945848465,
0.005665111821144819,
-0.03303597867488861,
0.04906761646270752,
0.013996158726513386,
-0.0359000563621521,
0.06996278464794159,
0.008799387142062187,
-0.04161020368337631,
0.014752708375453949,
0.07097151130437851,
0.0034630135633051395,
0.03829579800367355,
0.029685547575354576,
0.019147899001836777,
0.015374159440398216,
-0.03501741588115692,
0.06455886363983154,
0.034909337759017944,
0.03647647798061371,
0.013185570947825909,
-0.02440771646797657,
-0.010429570451378822,
0.05151739344000816,
0.0060208700597286224,
0.0006968808593228459,
-0.062073055654764175,
-0.05148136615753174,
0.08876843005418777,
-0.003136526560410857,
-0.0508689247071743,
0.06848570704460144,
0.042582910507917404,
-0.03220737725496292,
-0.01309550553560257,
0.057785943150520325,
-0.013302655890583992,
-0.029469391331076622,
0.030838383361697197,
0.037215013056993484,
-0.02320083975791931,
-0.0004936708137392998,
0.018058108165860176,
-0.011618433520197868,
-0.03462113067507744,
0.007142184302210808,
-0.022660447284579277,
-0.017778905108571053,
0.00782217737287283,
-0.06120842695236206,
0.032297443598508835,
0.030694279819726944
]
|
41,562 | pyglove.core.symbolic.base | is_abstract | Returns if the input value is abstract.
Example::
@pg.symbolize
class Foo:
def __init__(self, x):
pass
class Bar(pg.PureSymbolic):
pass
assert not pg.is_abstract(1)
assert not pg.is_abstract(Foo(1))
assert pg.is_abstract(Foo.partial())
assert pg.is_abstract(Bar())
assert pg.is_abstract(Foo(Bar()))
assert pg.is_abstract(Foo(pg.oneof([1, 2])))
Args:
x: Value to query against.
Returns:
True if value itself is partial/PureSymbolic or its child and nested
child fields contain partial/PureSymbolic values.
| def is_abstract(x: Any) -> bool:
"""Returns if the input value is abstract.
Example::
@pg.symbolize
class Foo:
def __init__(self, x):
pass
class Bar(pg.PureSymbolic):
pass
assert not pg.is_abstract(1)
assert not pg.is_abstract(Foo(1))
assert pg.is_abstract(Foo.partial())
assert pg.is_abstract(Bar())
assert pg.is_abstract(Foo(Bar()))
assert pg.is_abstract(Foo(pg.oneof([1, 2])))
Args:
x: Value to query against.
Returns:
True if value itself is partial/PureSymbolic or its child and nested
child fields contain partial/PureSymbolic values.
"""
return object_utils.is_partial(x) or is_pure_symbolic(x)
| (x: Any) -> bool | [
0.0688442662358284,
-0.04383721202611923,
0.003916710615158081,
0.046719763427972794,
0.03286854922771454,
-0.007852139882743359,
-0.004379977472126484,
-0.03818441927433014,
0.010837636888027191,
-0.04102953523397446,
0.05716432258486748,
0.053570497781038284,
0.02983625791966915,
0.038970571011304855,
0.0012213399168103933,
-0.04248952865600586,
-0.0025643459521234035,
0.0712401494383812,
0.00015924798208288848,
0.015545177273452282,
-0.04365003481507301,
0.04664488881826401,
-0.020365023985505104,
0.01450633630156517,
0.020758099853992462,
0.029162416234612465,
0.030921893194317818,
0.048254627734422684,
0.005938238929957151,
0.05240998789668083,
-0.05166127532720566,
-0.016013123095035553,
-0.000005872178007848561,
0.023210138082504272,
0.0015009378548711538,
-0.0015816586092114449,
-0.01711747609078884,
0.09066928178071976,
-0.02787088416516781,
-0.0012950415257364511,
-0.025044487789273262,
0.06959298253059387,
-0.052746910601854324,
0.002147873630747199,
-0.04604591801762581,
-0.03281239792704582,
-0.0017197027336806059,
0.0048666419461369514,
-0.011904554441571236,
-0.006321955006569624,
0.02584935538470745,
-0.04058030620217323,
-0.022742191329598427,
0.008404316380620003,
0.005049141123890877,
0.03603186830878258,
0.029480619356036186,
0.06846990436315536,
-0.004293407779186964,
0.010500716045498848,
-0.03882082924246788,
0.046607453376054764,
0.037529297173023224,
-0.0904446691274643,
0.013233521953225136,
0.0025081923231482506,
-0.04185311868786812,
-0.060121744871139526,
-0.027814731001853943,
-0.009630335494875908,
-0.046120788902044296,
-0.01707068271934986,
0.03286854922771454,
0.03430982679128647,
0.017772601917386055,
-0.030266769230365753,
-0.001058143679983914,
0.037735193967819214,
0.001402669120579958,
-0.044174134731292725,
-0.058661751449108124,
-0.05574176833033562,
-0.07322423905134201,
-0.03975671902298927,
-0.0623304508626461,
-0.02092655934393406,
-0.0021431942004710436,
0.034047774970531464,
0.08078625798225403,
0.014590566977858543,
0.012690704315900803,
-0.014131979085505009,
0.012035579420626163,
0.040692612528800964,
-0.00994853861629963,
0.020963996648788452,
0.005662150681018829,
-0.0555545873939991,
-0.020458614453673363,
-0.033448804169893265,
-0.01481518056243658,
0.09972872585058212,
0.021787581965327263,
-0.03371085226535797,
-0.020963996648788452,
0.04705668240785599,
0.02635473757982254,
-0.010257383808493614,
-0.008474508300423622,
-0.06596171855926514,
-0.080411896109581,
-0.007295283488929272,
-0.03225086256861687,
0.0022250849287956953,
-0.009452516213059425,
0.008357521146535873,
0.029742669314146042,
-0.014403387904167175,
-0.03045394830405712,
-0.04200286418199539,
-0.0011926782317459583,
0.0481797531247139,
-0.01000469271093607,
0.03378572687506676,
0.0602714866399765,
0.021581685170531273,
0.021581685170531273,
0.025662176311016083,
-0.08497905731201172,
0.025699611753225327,
0.036818016320466995,
0.048479240387678146,
-0.018549391999840736,
0.019447850063443184,
-0.01771644875407219,
0.08954621106386185,
0.04125414788722992,
-0.008731878362596035,
-0.03777262941002846,
-0.05851200968027115,
-0.0028989275451749563,
-0.002048435155302286,
0.02030887082219124,
0.028451137244701385,
-0.03359854593873024,
0.027758575975894928,
-0.04862898215651512,
-0.009995333850383759,
0.016368763521313667,
0.013420701026916504,
0.055217668414115906,
0.0011745452648028731,
-0.002261350629851222,
0.002990177134051919,
-0.047543346881866455,
-0.0021373447962105274,
-0.013935442082583904,
0.005844649858772755,
-0.044473618268966675,
-0.01640619896352291,
-0.023266291245818138,
0.0054843309335410595,
-0.019560156390070915,
-0.002515211468562484,
-0.05270947515964508,
-0.05854944512248039,
-0.05851200968027115,
-0.11380454897880554,
0.027739858254790306,
0.04320080578327179,
-0.013205445371568203,
-0.009761360473930836,
-0.03719237446784973,
0.025269102305173874,
0.012831088155508041,
0.0469818115234375,
0.0037973844446241856,
0.028020625934004784,
-0.004597572609782219,
-0.0016073957085609436,
0.061431996524333954,
-0.06854478269815445,
-0.06281711906194687,
-0.012222758494317532,
0.036911606788635254,
-0.037941087037324905,
-0.025100640952587128,
-0.045596688985824585,
0.06869452446699142,
0.010416485369205475,
-0.04810488224029541,
-0.013729545287787914,
-0.006738427095115185,
-0.03255034610629082,
0.03075343370437622,
-0.061843786388635635,
0.06510069221258163,
0.006644838023930788,
-0.022817064076662064,
0.043462853878736496,
-0.05997200310230255,
-0.03769775852560997,
-0.004078152123838663,
0.013046343810856342,
-0.05738893896341324,
-0.021506814286112785,
-0.03198881074786186,
-0.05985969677567482,
0.011221352964639664,
-0.059298157691955566,
-0.027328066527843475,
-0.014946205541491508,
-0.0543566457927227,
0.07580730319023132,
0.018352854996919632,
0.02360321395099163,
0.025063205510377884,
-0.006635479163378477,
0.04282644763588905,
0.016219019889831543,
-0.004099209792912006,
0.027234476059675217,
0.02667294070124626,
0.031071636825799942,
0.07105296850204468,
-0.03281239792704582,
0.03412264585494995,
0.05678996816277504,
-0.01689286343753338,
-0.03719237446784973,
0.010107641108334064,
-0.011305583640933037,
0.04331311210989952,
-0.021993476897478104,
0.06854478269815445,
0.024258337914943695,
-0.01133366022258997,
-0.007772588636726141,
-0.010715970769524574,
0.0013745923060923815,
-0.028245240449905396,
0.00032756244763731956,
-0.047767963260412216,
-0.026092687621712685,
-0.0350211039185524,
-0.07651858776807785,
-0.01970990002155304,
0.06918118894100189,
-0.027440372854471207,
-0.038783393800258636,
0.003212451469153166,
-0.07951343804597855,
0.010772124864161015,
-0.06959298253059387,
-0.009836232289671898,
0.017314014956355095,
-0.021095020696520805,
0.031314969062805176,
0.06861965358257294,
0.009209183976054192,
0.002585403388366103,
0.007842781022191048,
-0.0017770262202247977,
0.03893313556909561,
0.009995333850383759,
-0.02401500567793846,
0.018418367952108383,
0.022798344492912292,
0.009167068637907505,
0.012737499549984932,
0.0336921364068985,
0.012438013218343258,
0.011970067396759987,
-0.010191870853304863,
-0.02399628795683384,
0.023247573524713516,
0.01645299233496189,
-0.013664033263921738,
0.02309783175587654,
-0.051736146211624146,
-0.0161815844476223,
0.012278911657631397,
0.04361259937286377,
-0.0035119373351335526,
-0.0013313073432072997,
-0.03320547193288803,
-0.018671058118343353,
-0.00681329844519496,
0.007501179818063974,
0.03221342712640762,
0.004358920268714428,
-0.020589638501405716,
0.006415544077754021,
0.0008072074269875884,
0.03945723548531532,
0.08467956632375717,
0.060121744871139526,
-0.036836735904216766,
-0.026991143822669983,
-0.034590594470500946,
0.055816639214754105,
0.0005024573765695095,
0.05993456766009331,
0.005063179414719343,
-0.04409926384687424,
0.015198896639049053,
-0.03912031278014183,
0.02513807639479637,
0.008015920408070087,
0.00190337176900357,
-0.006415544077754021,
0.040093641728162766,
-0.02287321723997593,
0.04260183498263359,
-0.005367344245314598,
-0.024146031588315964,
0.02276090905070305,
-0.05136178806424141,
-0.004644367378205061,
0.008483867160975933,
-0.038034677505493164,
0.05851200968027115,
-0.025269102305173874,
-0.03919518366456032,
-0.07101553678512573,
0.01890503242611885,
-0.024576541036367416,
0.0032732845284044743,
0.013439418748021126,
0.010229307226836681,
0.010051487013697624,
-0.0030580293387174606,
0.0647263377904892,
0.013308393768966198,
-0.043575163930654526,
-0.04132901877164841,
0.015124025754630566,
-0.028675751760601997,
0.027908319607377052,
-0.011801606975495815,
0.029237287119030952,
-0.017239142209291458,
0.0390080064535141,
-0.01624709740281105,
0.015067871659994125,
0.016677606850862503,
-0.05933559685945511,
-0.01486197579652071,
0.05053820461034775,
0.02133835293352604,
0.004113248083740473,
-0.055816639214754105,
-0.03024805150926113,
-0.04282644763588905,
-0.004082831554114819,
-0.016078636050224304,
0.005105294287204742,
0.04035569354891777,
-0.02676653116941452,
0.040917228907346725,
0.1193450316786766,
-0.09710822254419327,
-0.02584935538470745,
0.027009861543774605,
-0.03809083253145218,
-0.007800665218383074,
0.008876942098140717,
0.04383721202611923,
0.05383254587650299,
-0.006111379247158766,
-0.02298552356660366,
-0.015601330436766148,
-0.06090789660811424,
-0.043949518352746964,
-0.016537223011255264,
-0.006892849691212177,
0.03195137530565262,
-0.011118404567241669,
0.01684606820344925,
0.008577456697821617,
0.02399628795683384,
-0.06109507381916046,
0.01643427461385727,
-0.05963508039712906,
-0.05124948173761368,
-0.027103452011942863,
0.029274722561240196,
0.02105758525431156,
-0.05532997474074364,
-0.008072074502706528,
0.018437085673213005,
0.007781947497278452,
-0.034590594470500946,
-0.02818908728659153,
-0.03414136543869972,
-0.01532056275755167,
0.009410400874912739,
-0.0028334150556474924,
-0.11425377428531647,
0.04035569354891777,
-0.005063179414719343,
-0.04424900561571121,
0.051436662673950195,
-0.04746847599744797,
0.030491383746266365,
0.016808632761240005,
0.06116994470357895,
-0.039981335401535034,
0.018006574362516403,
0.009836232289671898,
0.07401039451360703,
-0.03934492915868759,
-0.08026215434074402,
-0.028937801718711853,
0.00541413901373744,
0.0010464449878782034,
0.07026682049036026,
-0.016967734321951866,
-0.00014754933363292366,
-0.005489010363817215,
0.07037913054227829,
0.015807226300239563,
-0.01590081676840782,
0.06277967989444733,
-0.02541884407401085,
0.024838590994477272,
0.001840198994614184,
0.02103886753320694,
0.03582597151398659,
0.04125414788722992,
-0.03045394830405712,
-0.03288726881146431,
-0.008184381760656834,
-0.020458614453673363,
0.011511479504406452,
-0.032643936574459076,
0.003137580119073391,
-0.012606474570930004,
-0.051436662673950195,
0.00288488925434649,
0.022030914202332497,
0.025100640952587128,
-0.04035569354891777,
0.026429608464241028,
0.10377177596092224,
0.034796491265296936,
0.04177824780344963,
0.021469376981258392,
0.026429608464241028,
0.03105291910469532,
-0.042339783161878586,
0.00043343528523109853,
0.02768370509147644,
-0.014618643559515476,
-0.05465613305568695,
-0.033841878175735474,
-0.003703795140609145,
-0.04832949861884117,
0.036930326372385025,
0.06307916343212128,
0.006897529121488333,
-0.016949016600847244,
-0.03167060762643814,
-0.08026215434074402,
-0.0032732845284044743,
0.03453443944454193,
-0.05667766183614731,
0.036293916404247284,
0.007524576969444752,
0.026410890743136406,
0.021413223817944527,
0.01333647035062313,
0.049901798367500305,
-0.015751073136925697,
0.0026228392962366343,
0.0067618247121572495,
0.035788536071777344,
0.04619566351175308,
0.0072765653021633625,
-0.019120287150144577,
0.009363606572151184,
0.019466567784547806,
-0.02204963192343712,
-0.020196564495563507,
0.056640222668647766,
-0.006368749774992466,
-0.02257373183965683,
0.013392624445259571,
-0.007912972941994667,
-0.018118882551789284,
-0.010650458745658398,
0.0036991157103329897,
-0.008076753467321396,
0.02809549868106842,
0.031614452600479126,
-0.06521300226449966,
0.017295297235250473,
0.026934990659356117,
0.03584468737244606,
-0.03270009160041809,
0.02307911403477192,
0.006855413783341646,
0.03674314543604851,
-0.00934020895510912,
0.030060872435569763,
0.009920462034642696,
0.010257383808493614,
-0.003032292239367962,
-0.00020326419326011091,
0.02841370180249214,
-0.02390269935131073,
0.009920462034642696,
0.03240060433745384,
0.011249429546296597,
0.022611167281866074,
0.01952272094786167,
0.07217603921890259,
-0.006003751419484615,
-0.026841402053833008,
-0.06846990436315536,
-0.009354246780276299,
-0.034796491265296936,
-0.021918606013059616,
0.0425269640982151,
-0.03749186173081398,
0.042227476835250854,
0.0024099235888570547,
-0.0035142770502716303,
-0.0000017502289892945555,
-0.036630839109420776,
0.06772119551897049,
0.004443150479346514,
0.02175014652311802,
0.04657001793384552,
-0.03075343370437622,
0.03810954838991165,
0.008909698575735092,
0.015563894994556904,
0.008820788003504276,
-0.00795040838420391,
0.025194231420755386,
0.0015243352390825748,
0.009873667731881142,
-0.043350547552108765,
-0.009695848450064659,
0.013420701026916504,
0.04241465404629707,
-0.00788489542901516,
0.029667798429727554,
0.0022566711995750666,
0.009630335494875908,
-0.009911103174090385,
0.03328034281730652,
-0.06098276749253273,
0.05720175802707672,
0.0017080041579902172,
0.04241465404629707,
0.035694945603609085,
-0.03225086256861687,
-0.007800665218383074,
-0.004588213749229908,
-0.0178100373595953,
0.08340675383806229,
-0.02420218475162983,
0.02257373183965683,
-0.022611167281866074,
0.019560156390070915,
0.004946192726492882,
0.0561535619199276,
-0.008254573680460453,
-0.023640649393200874,
0.012606474570930004,
0.048778727650642395,
-0.001393310260027647,
0.05911098048090935,
-0.02257373183965683,
-0.030828304588794708,
0.0002303173387190327,
-0.04102953523397446,
-0.03389803320169449,
-0.001007839455269277,
-0.08003754168748856,
-0.04402439296245575,
-0.03792237117886543,
0.05207306891679764,
0.03541417792439461,
0.06135712191462517,
0.08587750792503357,
-0.029443183913826942,
-0.05985969677567482,
-0.007828742265701294,
0.046944376081228256,
0.026785248890519142,
-0.042938753962516785,
-0.00860553327947855,
0.007398231420665979,
0.01419749204069376,
-0.05117461085319519,
0.014468900859355927,
-0.055404845625162125,
-0.07824062556028366,
0.06356582790613174,
-0.0015138064045459032,
-0.04297619313001633,
0.014000954106450081,
0.029274722561240196,
-0.010940585285425186,
0.05854944512248039,
0.0025666856672614813,
-0.06180635094642639,
0.002957420889288187,
0.04095466434955597,
0.0036523211747407913,
-0.06064584478735924,
-0.01961630955338478,
-0.00648573599755764,
-0.030491383746266365,
0.034365978091955185,
-0.020046820864081383,
0.024539105594158173,
-0.03533930703997612,
0.015985047444701195,
0.005353305954486132,
0.02745909057557583,
-0.017679013311862946,
0.013261599466204643,
0.017220424488186836,
-0.008661686442792416,
-0.019260670989751816,
-0.04331311210989952,
0.02757139876484871,
0.02105758525431156,
-0.012896601110696793,
0.00658400496467948,
0.004941513296216726,
-0.054993052035570145,
-0.022030914202332497,
0.04054287075996399,
0.011249429546296597,
0.031913939863443375,
-0.08190932869911194,
0.0028006588108837605,
-0.018203113228082657,
0.035095974802970886,
0.023715520277619362,
0.005797855090349913,
0.02584935538470745,
-0.035694945603609085,
0.004038376733660698,
-0.015582612715661526,
-0.017033247277140617,
0.04331311210989952,
0.002739825751632452,
-0.03964441269636154,
0.048778727650642395,
0.06929349154233932,
-0.0011324301594868302,
-0.014431464485824108,
-0.028844211250543594,
-0.034272391349077225,
0.0294057484716177,
-0.07135245949029922,
-0.037435706704854965,
0.040917228907346725,
0.055217668414115906,
0.030060872435569763,
-0.01730465516448021,
-0.030884457752108574,
0.00934020895510912,
0.008062715642154217,
0.003647641744464636,
0.047019246965646744,
0.037435706704854965,
-0.05810021609067917,
0.015395434573292732,
-0.013523649424314499,
-0.0010423504281789064,
0.03022933378815651,
0.02562474086880684,
-0.04934026300907135,
0.03215727210044861,
-0.035189565271139145,
-0.010725329630076885,
-0.018642982468008995,
-0.01383249368518591,
-0.0694432333111763,
-0.010294819250702858,
0.018876954913139343,
-0.006953682750463486,
-0.049602311104536057,
-0.031726762652397156,
-0.023565776646137238,
0.017819397151470184,
0.0451848991215229,
0.0712401494383812,
-0.06289198994636536,
-0.021020149812102318,
0.08992056548595428,
0.0528966523706913,
-0.016780555248260498,
0.001442444627173245,
-0.01302762608975172,
-0.0007709416095167398,
0.03410392999649048,
0.037454426288604736,
0.06614889204502106,
-0.0717642530798912,
0.02176886424422264,
0.06049610301852226,
-0.009761360473930836,
-0.03329906240105629,
0.016808632761240005,
-0.051436662673950195,
-0.0534956231713295,
0.0017969139153137803,
-0.03301829472184181,
0.05222281068563461,
0.03912031278014183,
-0.008366880007088184,
0.0013160990783944726,
-0.01236314233392477,
-0.0294057484716177,
0.042938753962516785,
0.001179809682071209,
-0.03533930703997612,
0.004719238728284836,
-0.022854499518871307,
-0.010715970769524574,
0.03792237117886543,
0.05338331684470177,
0.014319158159196377,
0.03206368163228035,
-0.012175963260233402,
0.029499337077140808,
0.013439418748021126,
-0.0013628937304019928,
-0.021993476897478104,
-0.02809549868106842,
-0.07883960008621216,
-0.02736550197005272,
0.02931215800344944,
-0.03870851919054985,
0.018184393644332886,
-0.05330844596028328,
0.017688371241092682,
-0.003039311384782195,
-0.043350547552108765,
0.10317280888557434,
-0.01590081676840782,
0.008572776801884174,
0.021918606013059616,
0.051212046295404434,
0.017931703478097916,
0.01627517305314541,
0.016013123095035553,
0.04574643447995186,
-0.029667798429727554,
-0.006626120302826166,
0.00325690652243793,
-0.020065538585186005,
-0.05465613305568695,
-0.002795979380607605,
0.009101556614041328,
-0.02103886753320694,
-0.03799724206328392,
-0.057950474321842194,
-0.03990646451711655,
0.004894718527793884
]
|
41,563 | pyglove.core.symbolic.base | is_deterministic | Returns if the input value is deterministic.
Example::
@pg.symbolize
def foo(x, y):
pass
assert pg.is_deterministic(1)
assert pg.is_deterministic(foo(1, 2))
assert not pg.is_deterministic(pg.oneof([1, 2]))
assert not pg.is_deterministic(foo(pg.oneof([1, 2]), 3))
Args:
x: Value to query against.
Returns:
True if value itself is not NonDeterministic and its child and nested
child fields do not contain NonDeterministic values.
| def is_deterministic(x: Any) -> bool:
"""Returns if the input value is deterministic.
Example::
@pg.symbolize
def foo(x, y):
pass
assert pg.is_deterministic(1)
assert pg.is_deterministic(foo(1, 2))
assert not pg.is_deterministic(pg.oneof([1, 2]))
assert not pg.is_deterministic(foo(pg.oneof([1, 2]), 3))
Args:
x: Value to query against.
Returns:
True if value itself is not NonDeterministic and its child and nested
child fields do not contain NonDeterministic values.
"""
return not contains(x, type=NonDeterministic)
| (x: Any) -> bool | [
0.054419852793216705,
0.0004421497869770974,
0.01629645936191082,
0.04911059886217117,
0.07314971834421158,
-0.03144995495676994,
-0.04494430869817734,
-0.00044531829189509153,
0.005585777573287487,
-0.011125467717647552,
0.004122506827116013,
0.07156431674957275,
-0.00243110372684896,
-0.022361544892191887,
0.004117897711694241,
-0.0014621187001466751,
-0.023854773491621017,
0.062088776379823685,
0.04682467132806778,
0.003385110292583704,
-0.007401616312563419,
0.06942586600780487,
-0.03207674250006676,
0.01959630846977234,
0.02326485514640808,
-0.0012835306115448475,
-0.007696574553847313,
0.03373588249087334,
-0.01842569187283516,
0.09269072115421295,
0.01800168864428997,
-0.020057180896401405,
0.0037630258593708277,
0.0265647042542696,
-0.018803607672452927,
-0.01273852214217186,
-0.009733632206916809,
0.08347327262163162,
-0.012351389043033123,
-0.06267869472503662,
-0.032648224383592606,
0.03572685271501541,
-0.001843490987084806,
0.03220578655600548,
-0.041552286595106125,
-0.04623475298285484,
0.012480434030294418,
0.043063949793577194,
-0.08996235579252243,
-0.02586417831480503,
0.08369448781013489,
-0.03521067649126053,
0.05626334249973297,
0.02368885837495327,
0.007019091863185167,
-0.006244825664907694,
0.03685138374567032,
0.054972898215055466,
0.029348375275731087,
0.04439126327633858,
-0.016886377707123756,
0.05283445119857788,
-0.0021419059485197067,
-0.04365386441349983,
-0.014102705754339695,
-0.013457483612000942,
-0.04206846281886101,
-0.01381696481257677,
-0.026527835056185722,
0.0018699910724535584,
-0.0239653829485178,
-0.0005838681245222688,
-0.0103972889482975,
0.06559140980243683,
-0.030048903077840805,
-0.052355144172906876,
-0.010747551918029785,
0.06039276346564293,
-0.033883363008499146,
0.014711057767271996,
-0.03849209100008011,
-0.07222797721624374,
-0.022490588948130608,
-0.05180209502577782,
-0.022416850551962852,
-0.01931978575885296,
0.011770689859986305,
0.014904623851180077,
0.03749660402536392,
0.04313768818974495,
0.0028090192936360836,
0.011383556760847569,
-0.0011147359618917108,
0.006779437884688377,
0.004760815296322107,
0.061978165060281754,
0.045386746525764465,
-0.015227234922349453,
0.010176070034503937,
-0.031191866844892502,
0.001146996975876391,
0.1031617522239685,
0.06341608613729477,
0.0126740001142025,
0.01094111893326044,
0.020868318155407906,
-0.011807559058070183,
-0.02726523019373417,
0.0052862102165818214,
-0.07853271067142487,
-0.05788561701774597,
0.022011281922459602,
0.023062070831656456,
-0.07491946965456009,
0.022527460008859634,
-0.08362074941396713,
0.000981082790531218,
-0.008111360482871532,
-0.0531294085085392,
-0.014406881295144558,
0.03259291872382164,
0.0503641739487648,
-0.01917230524122715,
-0.007341702468693256,
0.012139387428760529,
-0.02956959418952465,
0.012849131599068642,
0.023227985948324203,
-0.05025356262922287,
0.07646800577640533,
0.013319222256541252,
0.05025356262922287,
0.03467606380581856,
0.06684498488903046,
-0.010968770831823349,
0.046197883784770966,
0.02435251511633396,
0.002192602027207613,
0.015992283821105957,
-0.00928658526390791,
-0.029680203646421432,
0.0033205880317837,
0.02575356885790825,
-0.0028574110474437475,
0.01272930484265089,
0.028684718534350395,
-0.04763580486178398,
-0.02134762518107891,
-0.003067108104005456,
-0.01589089259505272,
0.05180209502577782,
0.018527083098888397,
-0.028647849336266518,
0.0009154084837064147,
-0.04723023623228073,
-0.0016948594711720943,
-0.022822417318820953,
-0.011844429187476635,
-0.03065725415945053,
-0.023633554577827454,
-0.05814370512962341,
0.08288335055112839,
0.011696949601173401,
0.012019560672342777,
-0.01266478281468153,
-0.023781033232808113,
-0.0022755591198801994,
-0.051949575543403625,
0.0022052759304642677,
0.020647099241614342,
-0.007424659561365843,
0.05139652639627457,
-0.03686982020735741,
0.017264293506741524,
0.024481559172272682,
0.046750929206609726,
-0.013946008868515491,
0.007908576168119907,
-0.005014295224100351,
0.009457108564674854,
-0.015171930193901062,
-0.05301880091428757,
-0.028445065021514893,
-0.03845522180199623,
0.03368058055639267,
-0.03452858701348305,
0.0034450236707925797,
-0.03578215837478638,
0.03163430467247963,
-0.015992283821105957,
-0.0498848631978035,
-0.003034846857190132,
0.04133106768131256,
-0.014618882909417152,
0.006765611935406923,
-0.026472529396414757,
0.0012766175204887986,
-0.05567342787981033,
-0.03248231112957001,
-0.04383821412920952,
0.03782843425869942,
-0.08642285317182541,
0.006585871335119009,
-0.02586417831480503,
-0.04037244990468025,
-0.027726104483008385,
-0.05368245765566826,
-0.041552286595106125,
0.05515724793076515,
-0.010996423661708832,
-0.04752519726753235,
-0.061904426664114,
0.0029541943222284317,
0.044833701103925705,
-0.011521818116307259,
-0.0031316301319748163,
-0.00547977676615119,
0.004465856589376926,
0.030860038474202156,
0.007986924611032009,
0.09055227786302567,
-0.006751785520464182,
0.0708269253373146,
0.04299020767211914,
0.07595182955265045,
0.0031569781713187695,
-0.023062070831656456,
0.0435432568192482,
-0.038823917508125305,
-0.0752144306898117,
0.019356654956936836,
0.01723664067685604,
-0.043211426585912704,
-0.028703153133392334,
0.05298192799091339,
-0.0402987115085125,
0.041847243905067444,
0.03180021792650223,
0.021402928978204727,
-0.012637129984796047,
-0.000948821718338877,
0.04147854447364807,
0.03871330991387367,
-0.020923621952533722,
-0.015153495594859123,
-0.01450827345252037,
0.019098566845059395,
0.013568093068897724,
-0.03911887854337692,
-0.01095955353230238,
-0.04107297956943512,
-0.08391571044921875,
-0.011236077174544334,
-0.015964630991220474,
0.022564329206943512,
-0.029108721762895584,
-0.006281695328652859,
0.05135965719819069,
0.08111359924077988,
0.05519411712884903,
-0.03782843425869942,
-0.04125732555985451,
-0.026638444513082504,
0.0674348995089531,
-0.011531035415828228,
-0.08177725970745087,
-0.010756769217550755,
0.0093418899923563,
0.006521349307149649,
-0.025679828599095345,
-0.03078629821538925,
-0.02121858112514019,
-0.01850864849984646,
-0.011107033118605614,
-0.021863803267478943,
0.023080507293343544,
-0.024997737258672714,
-0.01450827345252037,
0.0012028778437525034,
0.06201503425836563,
-0.024407820776104927,
0.00015122386685106903,
0.041957855224609375,
-0.027597058564424515,
-0.023467639461159706,
0.0019494916778057814,
-0.07410833239555359,
-0.09313315898180008,
-0.008590667508542538,
0.017264293506741524,
-0.01674811542034149,
0.004806902725249529,
0.04118358716368675,
-0.04833633080124855,
-0.01034198421984911,
0.01998344250023365,
0.0563739538192749,
-0.0563739538192749,
0.014084271155297756,
-0.00985345896333456,
0.06972082704305649,
0.03285100683569908,
0.04276898875832558,
0.0031201085075736046,
0.004843772388994694,
0.05917605757713318,
-0.026380354538559914,
-0.013227047398686409,
-0.0020082530099898577,
0.05176522582769394,
-0.0076136174611747265,
0.032095178961753845,
-0.0043575516901910305,
0.006733350455760956,
0.0479307658970356,
-0.01704307459294796,
-0.007871706038713455,
-0.03144995495676994,
-0.006240217015147209,
0.027173057198524475,
-0.013171742670238018,
0.03956131637096405,
-0.009678327478468418,
0.017310379073023796,
-0.07661548256874084,
-0.008429362438619137,
0.008286491967737675,
0.001111855497583747,
-0.036556426435709,
0.019467264413833618,
0.027338970452547073,
-0.048963118344545364,
0.06297364830970764,
0.09224828332662582,
-0.020057180896401405,
0.026214441284537315,
0.021292319521307945,
-0.0020047964062541723,
0.08996235579252243,
0.002359668491408229,
0.06459592282772064,
-0.016471590846776962,
0.03596650809049606,
-0.04737771674990654,
0.017780469730496407,
0.022638069465756416,
0.0065582189708948135,
0.030989082530140877,
0.032242655754089355,
0.0823671743273735,
0.013863052241504192,
-0.004364464897662401,
-0.008023794740438461,
0.010692247189581394,
0.00965989287942648,
0.008940931409597397,
0.03215048089623451,
0.003795286873355508,
-0.014711057767271996,
0.059360407292842865,
0.08745521306991577,
-0.07200675457715988,
0.020923621952533722,
-0.024702778086066246,
-0.01891421712934971,
-0.022361544892191887,
0.005387602373957634,
-0.003661633934825659,
0.03447328135371208,
-0.03299848735332489,
-0.023209551349282265,
0.025218956172466278,
0.0025601480156183243,
-0.021144840866327286,
0.034417975693941116,
-0.054714810103178024,
-0.04380134493112564,
0.0038736353162676096,
0.034583888947963715,
0.05755378678441048,
0.02916402742266655,
-0.018351951614022255,
0.0695364773273468,
-0.004661727696657181,
-0.03312753140926361,
0.036464251577854156,
0.026232875883579254,
-0.003622459713369608,
-0.034971024841070175,
-0.029348375275731087,
0.010581637732684612,
-0.008876408450305462,
-0.0026269746012985706,
-0.005424472037702799,
-0.03329344466328621,
0.004090245347470045,
0.01699698716402054,
-0.009042322635650635,
-0.04026184231042862,
-0.029551159590482712,
0.010305114090442657,
-0.011844429187476635,
0.01674811542034149,
-0.0301410760730505,
-0.02669374831020832,
-0.013171742670238018,
0.008793451823294163,
0.00201862258836627,
0.02545860968530178,
0.0383446104824543,
-0.0036455034278333187,
-0.0471196286380291,
-0.0329800546169281,
-0.05040104314684868,
0.012886001728475094,
-0.03344092518091202,
0.03408614918589592,
-0.026878098025918007,
0.03414145112037659,
0.0012846827739849687,
0.08118733763694763,
0.000586172507610172,
-0.041552286595106125,
0.01889578253030777,
0.0019598612561821938,
0.0062309992499649525,
-0.0072495280764997005,
0.03220578655600548,
0.0029680205043405294,
0.02040744386613369,
-0.026730619370937347,
-0.05228140205144882,
0.03926635533571243,
-0.011862863786518574,
0.05467794090509415,
-0.00035919269430451095,
0.005530472844839096,
-0.017559250816702843,
-0.026656879112124443,
0.053203146904706955,
-0.002031296491622925,
0.0221771951764822,
-0.0495530366897583,
-0.0265647042542696,
0.04475995898246765,
0.022564329206943512,
0.017181335017085075,
0.04697214812040329,
0.09733632206916809,
0.039082009345293045,
-0.014038183726370335,
0.04081488773226738,
-0.02575356885790825,
-0.05135965719819069,
-0.06172007694840431,
0.026066962629556656,
0.0056871697306632996,
-0.00012976447760593146,
-0.03710947185754776,
0.05685326084494591,
-0.042105332016944885,
-0.02599322237074375,
-0.03956131637096405,
-0.06577575951814651,
-0.009632240049540997,
0.0038575048092752695,
-0.04656657949090004,
0.02792888693511486,
0.006963787134736776,
0.05530472844839096,
-0.025772003456950188,
-0.008770408108830452,
-0.011411208659410477,
-0.01103329285979271,
0.00794544629752636,
0.0006244825781323016,
-0.0038736353162676096,
0.03165274113416672,
-0.028537239879369736,
0.02971707470715046,
-0.004253855440765619,
-0.009705979377031326,
0.003638590220361948,
0.008120577782392502,
0.052945058792829514,
-0.07373964041471481,
-0.039782535284757614,
0.004624858032912016,
0.045128658413887024,
-0.02984611876308918,
-0.03262978792190552,
-0.03637207671999931,
0.03327501192688942,
0.006424565799534321,
0.06806168705224991,
-0.028592543676495552,
0.00633700005710125,
0.03686982020735741,
0.045792315155267715,
-0.03926635533571243,
-0.0044105518609285355,
0.11481261253356934,
0.014729492366313934,
-0.024997737258672714,
-0.010793639346957207,
0.023633554577827454,
0.04527613893151283,
-0.030601950362324715,
-0.034860413521528244,
-0.01736568473279476,
-0.03436267003417015,
-0.012296084314584732,
0.011798341758549213,
-0.030989082530140877,
-0.014720275066792965,
0.02219563163816929,
0.034436412155628204,
-0.09025731682777405,
-0.014010530896484852,
-0.03288787975907326,
0.029495855793356895,
-0.010489463806152344,
0.00986267626285553,
0.021052666008472443,
0.009056149050593376,
0.06876221299171448,
-0.027762973681092262,
-0.034417975693941116,
0.03451015055179596,
-0.032795704901218414,
0.05102783069014549,
-0.02202971652150154,
0.029071852564811707,
0.05611586570739746,
0.008272665552794933,
-0.02477651834487915,
-0.022933026775717735,
0.019282914698123932,
-0.02641722559928894,
-0.015448453836143017,
0.016646722331643105,
-0.0016983160749077797,
0.01840725727379322,
0.0161674153059721,
0.020444314926862717,
-0.034583888947963715,
0.04885251075029373,
0.0471196286380291,
-0.010996423661708832,
0.04383821412920952,
-0.022361544892191887,
0.011798341758549213,
0.03244544193148613,
-0.07528816908597946,
0.03956131637096405,
-0.05327688902616501,
0.009742849506437778,
0.03926635533571243,
-0.002850497839972377,
0.014600448310375214,
0.0007085918332450092,
-0.025163650512695312,
0.046750929206609726,
-0.04269525036215782,
0.0044151609763503075,
-0.008208143524825573,
-0.005945258308202028,
-0.04944242537021637,
0.06371104717254639,
0.010618507862091064,
0.02588261291384697,
0.013706355355679989,
0.038160260766744614,
0.008609103038907051,
0.007959271781146526,
-0.001732881530188024,
-0.0651489719748497,
0.019614743068814278,
-0.04877876862883568,
-0.05504664033651352,
-0.05486229062080383,
-0.06039276346564293,
-0.03508163243532181,
-0.017485512420535088,
0.0023308638483285904,
-0.026638444513082504,
-0.0015923152677714825,
0.05176522582769394,
0.02204815112054348,
0.004562640096992254,
-0.030860038474202156,
0.009669110178947449,
0.023043636232614517,
-0.012895219027996063,
0.024979302659630775,
0.015946196392178535,
0.030565079301595688,
0.0052862102165818214,
0.03144995495676994,
-0.05600525438785553,
-0.047303978353738785,
0.00866901595145464,
0.03356996923685074,
-0.011991908773779869,
0.017135247588157654,
-0.010489463806152344,
-0.009954851120710373,
0.011890516616404057,
0.06776672601699829,
-0.034971024841070175,
-0.009964068420231342,
0.05714821815490723,
-0.03447328135371208,
-0.025808872655034065,
0.05276070907711983,
-0.03133934736251831,
-0.05368245765566826,
0.005387602373957634,
-0.024278774857521057,
-0.03804965317249298,
-0.008963975124061108,
0.01813073270022869,
0.01451749075204134,
-0.008493884466588497,
-0.037164777517318726,
-0.018333517014980316,
-0.004223898518830538,
-0.07322345674037933,
-0.024481559172272682,
-0.09335438162088394,
0.007821010425686836,
-0.0039911577478051186,
-0.02040744386613369,
0.0007592878537252545,
0.014194880612194538,
-0.08561171591281891,
-0.029329940676689148,
0.021273884922266006,
-0.00916215032339096,
0.005940649658441544,
-0.058807361871004105,
0.021716322749853134,
-0.04612414166331291,
-0.017927950248122215,
-0.04527613893151283,
-0.008088316768407822,
0.023209551349282265,
-0.010977988131344318,
0.06584949791431427,
-0.0173841193318367,
-0.03299848735332489,
0.041441675275564194,
0.010000938549637794,
-0.055230990052223206,
0.049663644284009933,
0.0059775193221867085,
0.0026891923043876886,
0.02986455336213112,
0.013586528599262238,
-0.028316020965576172,
0.0615725964307785,
-0.02424190565943718,
-0.07573060691356659,
0.029495855793356895,
0.0700157880783081,
-0.020794577896595,
-0.03257448598742485,
-0.006843959912657738,
-0.010636942461133003,
-0.004889859817922115,
0.01383539941161871,
0.04925807937979698,
0.04413317143917084,
-0.0718224048614502,
0.06131450831890106,
-0.0542723722755909,
-0.04413317143917084,
0.0675823763012886,
0.008927104994654655,
-0.025569219142198563,
0.07698418200016022,
-0.013107220642268658,
0.027578623965382576,
0.002288233023136854,
-0.01661907136440277,
-0.061904426664114,
-0.03423362597823143,
-0.012425129301846027,
0.00042198659502901137,
-0.04007749259471893,
-0.04461248219013214,
-0.03900826722383499,
-0.016692809760570526,
0.02149510383605957,
0.06160946562886238,
-0.018582388758659363,
-0.027578623965382576,
0.11820463836193085,
0.0487418994307518,
0.031560566276311874,
-0.01919073984026909,
-0.009807371534407139,
-0.01389992143958807,
0.0463084913790226,
-0.0015462280716747046,
0.01850864849984646,
-0.000805951189249754,
0.007774922996759415,
0.0519864447414875,
-0.02149510383605957,
-0.02737583965063095,
0.03338561952114105,
0.0064337835647165775,
-0.03823400288820267,
0.0006406130851246417,
0.024702778086066246,
-0.02984611876308918,
0.04026184231042862,
0.015568280592560768,
-0.014664970338344574,
-0.026085397228598595,
-0.008816495537757874,
-0.025126781314611435,
-0.018075428903102875,
-0.04804137349128723,
-0.013300786726176739,
-0.010812073945999146,
0.01341139618307352,
0.028445065021514893,
-0.03491571918129921,
0.034971024841070175,
0.030012032017111778,
0.014959928579628468,
0.04450187087059021,
0.010489463806152344,
0.014065835624933243,
-0.05781187489628792,
-0.023375464603304863,
-0.09962224960327148,
0.005088035017251968,
-0.03535815700888634,
0.00513412244617939,
-0.008904061280190945,
-0.04383821412920952,
0.03364371135830879,
0.037164777517318726,
-0.04627162218093872,
0.03981940448284149,
0.02162414789199829,
-0.012858348898589611,
0.016241155564785004,
0.0006797873065806925,
-0.03878704831004143,
-0.037054166197776794,
0.04206846281886101,
0.04984799399971962,
0.013457483612000942,
0.028942808508872986,
-0.024592168629169464,
-0.03517380729317665,
-0.059102319180965424,
-0.010636942461133003,
0.019246045500040054,
-0.0347682386636734,
-0.005535081494599581,
-0.05272383987903595,
0.0006100802565924823,
0.03779156506061554
]
|
41,564 | pyglove.core.object_utils.hierarchical | is_partial | Returns True if a value is partially bound. | def is_partial(value: Any) -> bool:
"""Returns True if a value is partially bound."""
def _check_full_bound(path: KeyPath, value: Any) -> bool:
del path
if MISSING_VALUE == value:
return False
elif (isinstance(value, common_traits.MaybePartial)
and not isinstance(value, (dict, list))):
return not value.is_partial
return True
return not traverse(value, _check_full_bound)
| (value: Any) -> bool | [
0.055572737008333206,
-0.018147971481084824,
-0.03935244306921959,
0.01002914272248745,
-0.00925633404403925,
0.03228428587317467,
0.010723801329731941,
-0.04299940541386604,
0.04713262617588043,
-0.07356441020965576,
0.022229094058275223,
-0.0022750089410692453,
0.00339731783606112,
-0.05123111605644226,
0.03349994122982025,
0.041992150247097015,
0.034958723932504654,
0.03851885348558426,
0.024504104629158974,
-0.009013202972710133,
0.005218627396970987,
0.03518448770046234,
-0.020249316468834877,
0.054843343794345856,
-0.0001782777690095827,
-0.04310360550880432,
0.044458188116550446,
-0.04668109863996506,
0.0755094587802887,
0.05123111605644226,
-0.0001170202303910628,
0.00784530770033598,
0.018113238736987114,
-0.029002021998167038,
0.018200071528553963,
-0.014631260186433792,
0.0402902327477932,
0.03115546517074108,
-0.07148043066263199,
-0.06508956849575043,
-0.029505649581551552,
-0.002698316937312484,
-0.10211490839719772,
0.018599500879645348,
0.04546544700860977,
0.016185559332370758,
0.046055905520915985,
0.06529796868562698,
0.01404948253184557,
0.06074794754385948,
0.010463304817676544,
-0.014709409326314926,
-0.02163863368332386,
-0.00697698350995779,
-0.041992150247097015,
0.043694064021110535,
-0.02554609254002571,
0.08884691447019577,
-0.009126085788011551,
0.028324728831648827,
-0.008861246518790722,
-0.0011993725784122944,
0.03893565014004707,
-0.0544612817466259,
0.00778886629268527,
0.002188176615163684,
0.01773117668926716,
-0.0321279875934124,
-0.0499112643301487,
-0.01553431712090969,
-0.07543998956680298,
0.0018896901747211814,
-0.008084096945822239,
0.050744857639074326,
-0.05123111605644226,
-0.038796715438365936,
-0.01910312846302986,
0.024174140766263008,
0.04779255390167236,
-0.03039134107530117,
-0.038310457020998,
-0.06272772699594498,
-0.018130606040358543,
-0.041992150247097015,
-0.03855358809232712,
0.046854764223098755,
-0.053176164627075195,
0.04907767474651337,
0.1118401363492012,
0.04424979165196419,
-0.031659092754125595,
0.03198905661702156,
0.00826210342347622,
0.035740215331315994,
0.03824099153280258,
0.018564768135547638,
0.04539598152041435,
-0.02870679274201393,
-0.06644415110349655,
-0.058872368186712265,
0.012712263502180576,
-0.048452481627464294,
0.029349351301789284,
0.00541834207251668,
0.06495063751935959,
0.014249197207391262,
0.039665039628744125,
-0.017774593085050583,
-0.03530605509877205,
-0.004311228636652231,
0.012217318639159203,
-0.04789675399661064,
-0.022072795778512955,
0.0466463677585125,
0.006121684331446886,
0.05869870260357857,
-0.0055312239564955235,
-0.021256571635603905,
0.029870346188545227,
-0.0021501872688531876,
0.029331985861063004,
-0.009482098743319511,
-0.004671583417803049,
-0.03264898434281349,
0.07377281039953232,
0.010376472026109695,
-0.00827078614383936,
0.026831211522221565,
-0.015612466260790825,
0.024486737325787544,
-0.013676103204488754,
0.0321279875934124,
-0.040324967354536057,
0.01408421527594328,
-0.028255263343453407,
0.051717378199100494,
-0.004649875219911337,
-0.013215892016887665,
-0.0029132270719856024,
-0.00814053788781166,
-0.04727156087756157,
0.004732365719974041,
0.04713262617588043,
-0.018981562927365303,
0.06022695451974869,
0.0045283096842467785,
0.010280956514179707,
0.046194836497306824,
0.015421434305608273,
0.014153681695461273,
-0.022038063034415245,
0.008045022375881672,
-0.026084452867507935,
0.029766147956252098,
-0.030113477259874344,
-0.01088009960949421,
0.0329442135989666,
-0.035809680819511414,
-0.011331628076732159,
-0.03386463597416878,
0.020648745819926262,
-0.00407026894390583,
-0.01993671990931034,
-0.008344593457877636,
-0.018200071528553963,
0.025129297748208046,
-0.02566765807569027,
-0.05380135774612427,
0.010532770305871964,
0.035549186170101166,
0.012408350594341755,
0.007176698185503483,
0.01164422556757927,
0.04084596037864685,
0.050953254103660583,
0.010115974582731724,
-0.024972999468445778,
-0.04622957110404968,
-0.04091542959213257,
-0.023027952760457993,
-0.004871297627687454,
-0.02314951829612255,
-0.029088854789733887,
-0.02650124952197075,
0.0008732083369977772,
0.04661163315176964,
0.0036122279707342386,
-0.05189104378223419,
0.045326512306928635,
0.015430117957293987,
-0.05435708537697792,
-0.00785399042069912,
0.04675056412816048,
0.016888901591300964,
-0.026588082313537598,
-0.028394196182489395,
0.0846094936132431,
-0.013146425597369671,
0.029123587533831596,
-0.032544784247875214,
-0.08280337601900101,
-0.14296086132526398,
0.00918686855584383,
0.03471559286117554,
-0.044458188116550446,
0.03365623950958252,
0.010576186701655388,
0.012443083338439465,
0.04147115349769592,
-0.047723088413476944,
-0.0798858106136322,
-0.0466463677585125,
0.03106863424181938,
0.016211610287427902,
0.03534078598022461,
-0.024295706301927567,
-0.05470441281795502,
-0.04873034358024597,
-0.042860474437475204,
0.015438800677657127,
0.04945973679423332,
0.022593790665268898,
0.08801332116127014,
-0.011019031517207623,
0.01404948253184557,
-0.002450844505801797,
-0.02320161834359169,
0.02792530134320259,
-0.009291066788136959,
-0.0004813771229237318,
0.04911240562796593,
0.03193695843219757,
0.010958248749375343,
0.028515761718153954,
0.010654335841536522,
-0.006994349882006645,
0.012703580781817436,
-0.028428928926587105,
0.06581895798444748,
-0.012920661829411983,
0.03379517048597336,
-0.010055191814899445,
-0.05685785785317421,
-0.014396811835467815,
-0.007814915850758553,
-0.0002736577298492193,
-0.014457594603300095,
0.03124229796230793,
0.020579278469085693,
-0.021221838891506195,
-0.02962721511721611,
0.03910931572318077,
-0.004754073917865753,
-0.025424527004361153,
0.0023596705868840218,
-0.043659333139657974,
-0.00742851197719574,
-0.016888901591300964,
0.04556964337825775,
0.03657380864024162,
-0.04324253648519516,
-0.0012265077093616128,
-0.01725359819829464,
0.08405376225709915,
-0.013432973064482212,
-0.009403949603438377,
0.013389556668698788,
0.01997145265340805,
-0.018981562927365303,
0.011540026403963566,
0.03601808100938797,
-0.038032591342926025,
0.0366780050098896,
-0.046715833246707916,
0.002667925553396344,
0.0003139534092042595,
0.07377281039953232,
0.03692113608121872,
0.05053645744919777,
-0.0017811496509239078,
0.01732306368649006,
-0.038761984556913376,
0.011722374707460403,
-0.0027916617691516876,
-0.015056738629937172,
-0.005275068338960409,
-0.014309979975223541,
-0.028342096135020256,
0.013667420484125614,
0.0002742004580795765,
0.035531818866729736,
-0.08592934161424637,
0.020249316468834877,
0.037129536271095276,
-0.035566553473472595,
0.04105436056852341,
0.026779113337397575,
-0.10232330113649368,
0.00826210342347622,
-0.024625670164823532,
0.025372428819537163,
-0.03910931572318077,
-0.02162126824259758,
-0.021395504474639893,
0.04786201938986778,
-0.013346140272915363,
0.014501010999083519,
0.008427084423601627,
-0.030877601355314255,
0.002229421865195036,
-0.03577494993805885,
-0.022229094058275223,
-0.000496301450766623,
-0.004858273081481457,
0.043555133044719696,
-0.008136196061968803,
-0.003442904679104686,
-0.027404306456446648,
-0.02247222512960434,
0.035479720681905746,
-0.05630213022232056,
0.03827572241425514,
-0.01640264131128788,
0.001096801832318306,
-0.02474723383784294,
-0.005513857584446669,
0.09523777663707733,
0.004953788593411446,
-0.03758106380701065,
0.028046865016222,
-0.019415725022554398,
-0.05831664055585861,
0.04661163315176964,
0.029870346188545227,
0.002143674995750189,
-0.011253478936851025,
-0.003983436618000269,
-0.000823279726319015,
0.05633686110377312,
-0.013155109249055386,
0.052585702389478683,
-0.010272272862493992,
0.07682930678129196,
-0.006238908041268587,
0.033169977366924286,
-0.007502319756895304,
-0.002435648813843727,
0.02231592684984207,
0.08988890051841736,
-0.026900678873062134,
-0.020440347492694855,
0.009395265951752663,
0.031016534194350243,
-0.01718413271009922,
-0.013120375573635101,
-0.00662097055464983,
0.04553491249680519,
0.004940763581544161,
-0.02012775093317032,
-0.0028850066009908915,
0.10329582542181015,
-0.01119269710034132,
-0.05512120947241783,
0.021135006099939346,
0.007306946441531181,
0.0399429053068161,
-0.03541025519371033,
-0.013702153228223324,
-0.012208635918796062,
0.004031194373965263,
-0.02167336829006672,
-0.036365408450365067,
0.019068395718932152,
0.024677768349647522,
-0.01236493419855833,
-0.06481170654296875,
0.016159510239958763,
0.022645890712738037,
-0.029401451349258423,
0.01123611256480217,
0.04716736078262329,
-0.034125134348869324,
0.0037012312095612288,
-0.03858831897377968,
-0.033222075551748276,
0.005522540770471096,
0.03771999478340149,
-0.06456857174634933,
-0.07092470675706863,
-0.014544427394866943,
0.021135006099939346,
-0.035636018961668015,
-0.04869561269879341,
-0.021273938938975334,
-0.03464612737298012,
-0.006568871438503265,
0.028342096135020256,
-0.026674913242459297,
-0.013337456621229649,
0.03054763935506344,
0.07266135513782501,
-0.06255406141281128,
-0.015838230028748512,
0.052412036806344986,
0.051717378199100494,
-0.03039134107530117,
0.05519067496061325,
0.011513976380228996,
0.02248959243297577,
0.0027590994723141193,
0.0014620405854657292,
-0.06870179623365402,
-0.023010587319731712,
-0.011105864308774471,
-0.0026896337512880564,
-0.011366361752152443,
-0.03176329284906387,
-0.03973450884222984,
0.017479361966252327,
-0.04949446767568588,
0.05866397172212601,
0.008691923692822456,
0.012911978177726269,
-0.002368353772908449,
0.012634114362299442,
-0.03363887220621109,
0.010610919445753098,
-0.0578998439013958,
0.05984489247202873,
0.023045320063829422,
-0.06547163426876068,
-0.05123111605644226,
-0.027074342593550682,
-0.0091695012524724,
-0.043589867651462555,
-0.008657190948724747,
-0.0008846051059663296,
0.00581342913210392,
0.03125966340303421,
-0.02488616667687893,
-0.013250624760985374,
0.09266754239797592,
-0.04706316068768501,
-0.005700547248125076,
0.026779113337397575,
0.0057613300159573555,
-0.0035080290399491787,
0.009421315975487232,
0.04379826411604881,
0.0008238223963417113,
-0.04188795015215874,
-0.02816843055188656,
0.01120137982070446,
-0.0004944020183756948,
-0.010324372909963131,
-0.028237897902727127,
-0.07585678994655609,
-0.0017073421040549874,
-0.0016530718421563506,
-0.016237659379839897,
-0.0013459022156894207,
0.036330677568912506,
-0.005440049804747105,
-0.06022695451974869,
0.006751219276338816,
0.017991673201322556,
-0.06884072721004486,
0.0542876161634922,
0.003868383588269353,
0.05998382344841957,
-0.02806423231959343,
-0.0023227666970342398,
-0.00722011411562562,
-0.0033647555392235518,
0.05046699196100235,
0.023027952760457993,
0.03235375136137009,
0.03282264620065689,
0.02316688559949398,
-0.0038618710823357105,
-0.01557773258537054,
-0.011140597052872181,
-0.02809896506369114,
-0.0009850050555542111,
0.014605210162699223,
-0.03544498607516289,
-0.09190341085195541,
0.028359463438391685,
-0.005791721399873495,
-0.01002914272248745,
-0.012547282502055168,
0.01236493419855833,
-0.007263530511409044,
0.0386577844619751,
0.017531462013721466,
-0.016645772382616997,
0.004589092452079058,
0.028515761718153954,
0.06693041324615479,
0.04553491249680519,
0.006004460621625185,
0.04115855693817139,
0.06370025128126144,
0.0051621864549815655,
-0.020179850980639458,
-0.056441061198711395,
-0.007237480487674475,
-0.0025246520526707172,
-0.031016534194350243,
0.007580468896776438,
0.03594861552119255,
0.006104317959398031,
0.05418341979384422,
0.04490971937775612,
0.038831450045108795,
0.04060283303260803,
0.046021174639463425,
-0.02415677346289158,
0.015404067933559418,
-0.06102581322193146,
0.017297014594078064,
0.01757487840950489,
0.008401035331189632,
-0.017027834430336952,
-0.021447602659463882,
0.012226002290844917,
-0.030044011771678925,
-0.05338456109166145,
-0.02401784248650074,
-0.021412869915366173,
0.050918519496917725,
0.06359605491161346,
0.06974378228187561,
0.019415725022554398,
0.024643035605549812,
0.010610919445753098,
-0.017939575016498566,
-0.051578447222709656,
-0.051647912710905075,
0.01164422556757927,
0.0014468448935076594,
0.003727280767634511,
0.07578732073307037,
-0.009152134880423546,
0.03278791531920433,
0.045257046818733215,
0.02636231668293476,
-0.05991435796022415,
-0.013459022156894207,
-0.004550017882138491,
-0.018912097439169884,
-0.022593790665268898,
0.038032591342926025,
-0.057170454412698746,
-0.02571975812315941,
-0.017548829317092896,
-0.00918686855584383,
0.021030807867646217,
-0.015508267097175121,
0.03349994122982025,
0.030877601355314255,
-0.009838110767304897,
0.0640823096036911,
0.008288152515888214,
-0.02162126824259758,
-0.02474723383784294,
-0.025233495980501175,
-0.010567503049969673,
0.027525871992111206,
0.024434637278318405,
-0.036469608545303345,
0.03775472939014435,
-0.017062567174434662,
-0.03935244306921959,
0.038032591342926025,
-0.018790531903505325,
-0.023583680391311646,
-0.006291007623076439,
-0.048521947115659714,
-0.07655144482851028,
-0.033204711973667145,
-0.05029332637786865,
0.07814916223287582,
-0.028359463438391685,
0.04313833639025688,
0.04539598152041435,
0.021343404427170753,
0.061303675174713135,
-0.044666588306427,
-0.015933746472001076,
-0.0116181755438447,
0.029331985861063004,
0.011835256591439247,
-0.04261734336614609,
0.061199478805065155,
0.044562388211488724,
-0.05296776443719864,
0.03183275833725929,
0.006291007623076439,
-0.004593434277921915,
-0.038796715438365936,
0.026657547801733017,
0.006508088670670986,
0.062171999365091324,
-0.021412869915366173,
0.03127703070640564,
0.01324194110929966,
0.06422124803066254,
0.02474723383784294,
-0.06818079948425293,
0.017739860340952873,
0.051613178104162216,
0.02797739952802658,
-0.030825503170490265,
-0.007749791722744703,
-0.0018386761657893658,
-0.01642000675201416,
-0.009699178859591484,
-0.050849054008722305,
-0.002290204633027315,
-0.03445509821176529,
0.005752646829932928,
-0.010958248749375343,
0.0038618710823357105,
0.014292613603174686,
-0.020614013075828552,
0.019415725022554398,
-0.04595170542597771,
-0.03990817070007324,
-0.07634304463863373,
0.017818009480834007,
-0.002739562187343836,
-0.031589627265930176,
0.03900511562824249,
-0.015482217073440552,
-0.010055191814899445,
-0.010914833284914494,
-0.04497918486595154,
-0.012877245433628559,
0.041332222521305084,
-0.09836374223232269,
-0.03129439800977707,
-0.030130842700600624,
0.05439181625843048,
0.002837248845025897,
0.04504865035414696,
-0.02634495124220848,
-0.04185321927070618,
0.012694897130131721,
0.01628107577562332,
0.008401035331189632,
0.06540216505527496,
0.017045199871063232,
-0.02240275964140892,
0.03461139649152756,
0.014978589490056038,
0.09593243896961212,
-0.046889498829841614,
-0.02012775093317032,
-0.006812002044171095,
0.0010045423405244946,
-0.08280337601900101,
-0.0018028577324002981,
-0.03924824669957161,
0.06363078206777573,
0.005709230434149504,
-0.014995955862104893,
-0.03942191228270531,
0.02089187502861023,
0.028324728831648827,
-0.01762697845697403,
-0.03917878121137619,
-0.027525871992111206,
-0.022541692480444908,
-0.024469370022416115,
-0.012278101406991482,
-0.03785892575979233,
0.004893005825579166,
0.009985726326704025,
0.006851076614111662,
0.035809680819511414,
-0.04150588810443878,
-0.01207838673144579,
0.03287474811077118,
-0.016298441216349602,
0.01828690432012081,
-0.03193695843219757,
0.02471250109374523,
0.006781610660254955,
-0.021204473450779915,
0.03747686371207237,
-0.06345711648464203,
-0.02631021849811077,
0.05112691968679428,
-0.021916497498750687,
-0.07342547923326492,
0.01041988842189312,
0.06623575836420059,
0.060574281960725784,
0.00764125119894743,
-0.014978589490056038,
0.00038640419370494783,
0.005700547248125076,
-0.030721303075551987,
-0.004493576940149069,
0.03297894448041916,
-0.02247222512960434,
-0.034003566950559616,
0.009490781463682652,
-0.0019048858666792512,
-0.003570982487872243,
0.07175830006599426,
0.019606756046414375,
-0.04018603637814522,
-0.03454193100333214,
-0.020336149260401726,
-0.034889258444309235,
-0.016993101686239243,
0.05442655086517334,
-0.019884619861841202,
0.002826394746080041,
0.027404306456446648,
-0.0155690498650074,
-0.037199001759290695,
0.030617104843258858,
-0.018599500879645348,
0.00580908777192235,
-0.021360771730542183,
-0.028498394414782524,
0.023757345974445343,
0.02710907533764839,
0.015681931748986244,
-0.021291304379701614,
0.017019150778651237,
0.03615701198577881,
0.014422861859202385,
-0.03502818942070007,
0.025198763236403465,
-0.09377899765968323,
-0.03264898434281349,
0.03844938799738884,
0.0068467347882688046,
0.07939954847097397,
-0.020996075123548508,
-0.027682170271873474,
-0.008366301655769348,
-0.022628523409366608,
0.0337604396045208,
-0.02247222512960434,
-0.02226382866501808,
0.03377780318260193,
0.07050791382789612,
-0.005700547248125076,
-0.01193945575505495,
0.03211062401533127,
-0.01197418849915266,
-0.04716736078262329,
-0.013424289412796497,
-0.03256215155124664,
-0.026970144361257553,
-0.11850886046886444,
-0.019467825070023537,
0.03054763935506344,
0.05998382344841957,
-0.01636790856719017,
0.03594861552119255,
-0.04539598152041435,
0.038102056831121445
]
|
41,565 | pyglove.core.symbolic.base | is_pure_symbolic | Returns if the input value is pure symbolic.
Example::
class Bar(pg.PureSymbolic):
pass
@pg.symbolize
def foo(x, y):
pass
assert not pg.is_pure_symbolic(1)
assert not pg.is_pure_symbolic(foo(1, 2))
assert pg.is_pure_symbolic(Bar())
assert pg.is_pure_symbolic(foo(Bar(), 1))
assert pg.is_pure_symbolic(foo(pg.oneof([1, 2]), 1))
Args:
x: Value to query against.
Returns:
True if value itself is PureSymbolic or its child and nested
child fields contain PureSymbolic values.
| def is_pure_symbolic(x: Any) -> bool:
"""Returns if the input value is pure symbolic.
Example::
class Bar(pg.PureSymbolic):
pass
@pg.symbolize
def foo(x, y):
pass
assert not pg.is_pure_symbolic(1)
assert not pg.is_pure_symbolic(foo(1, 2))
assert pg.is_pure_symbolic(Bar())
assert pg.is_pure_symbolic(foo(Bar(), 1))
assert pg.is_pure_symbolic(foo(pg.oneof([1, 2]), 1))
Args:
x: Value to query against.
Returns:
True if value itself is PureSymbolic or its child and nested
child fields contain PureSymbolic values.
"""
def _check_pure_symbolic(k, v, p):
del k, p
if (isinstance(v, PureSymbolic)
or (isinstance(v, Symbolic) and v.sym_puresymbolic)):
return TraverseAction.STOP
else:
return TraverseAction.ENTER
return not traverse(x, _check_pure_symbolic)
| (x: Any) -> bool | [
0.05535364896059036,
-0.03199009597301483,
0.036914411932229996,
0.055928751826286316,
0.07526658475399017,
0.004951275885105133,
-0.0362853929400444,
-0.013083589263260365,
0.05503015220165253,
-0.022339150309562683,
0.04417508468031883,
0.06027796491980553,
0.035171132534742355,
-0.0034281520638614893,
0.0036123646423220634,
-0.02683214098215103,
0.0019263698486611247,
0.04881185293197632,
0.005059107672423124,
0.04460641369223595,
-0.012265864759683609,
0.09704860299825668,
-0.020182514563202858,
-0.000996320741251111,
0.024513758718967438,
-0.017657455056905746,
0.023633131757378578,
0.05740245059132576,
-0.022033628076314926,
0.003518011886626482,
0.03234953433275223,
0.04435480758547783,
-0.00039875294896773994,
0.017909061163663864,
0.03835216909646988,
-0.01646231859922409,
-0.002929429989308119,
0.08238348364830017,
-0.027586964890360832,
-0.06825751811265945,
-0.0483805276453495,
0.03292463719844818,
-0.058588601648807526,
0.035961899906396866,
-0.03145093470811844,
-0.01833140291273594,
-0.022051598876714706,
0.0539877787232399,
-0.013245336711406708,
-0.04600822553038597,
0.0251248050481081,
0.03134310618042946,
0.003931366838514805,
0.01470106653869152,
0.011376253329217434,
0.02009265497326851,
0.03333799168467522,
0.04111985117197037,
0.002767682308331132,
-0.006627161521464586,
-0.0235252995043993,
0.03283477574586868,
-0.020218459889292717,
-0.09323854744434357,
0.020488038659095764,
-0.03186429291963577,
-0.011475098319351673,
-0.035961899906396866,
-0.0304624792188406,
-0.012364710681140423,
-0.08152082562446594,
-0.0029159511905163527,
-0.0025183213874697685,
-0.021260833367705345,
0.00460082245990634,
-0.09345421195030212,
0.050860658288002014,
-0.018762730062007904,
-0.010208074934780598,
-0.024891169741749763,
-0.07706377655267715,
-0.0590558722615242,
-0.03209792822599411,
-0.037022244185209274,
-0.10394983738660812,
0.042054396122694016,
0.04633172228932381,
0.01212208904325962,
0.0270837489515543,
0.06401613354682922,
-0.005054614972323179,
0.027353327721357346,
0.006096988450735807,
0.026436759158968925,
-0.00146920804399997,
0.009237589314579964,
0.03380526229739189,
-0.06721514463424683,
0.004158263094723225,
-0.03484763577580452,
-0.012032229453325272,
0.03213386982679367,
0.0018758237129077315,
-0.013047645799815655,
0.04435480758547783,
0.045684732496738434,
0.021099084988236427,
-0.04248572140932083,
0.011852510273456573,
-0.05503015220165253,
-0.04273733124136925,
0.003185530658811331,
0.008334497921168804,
-0.04661927372217178,
-0.010459682904183865,
0.003520258469507098,
-0.010675346478819847,
-0.013371140696108341,
-0.005319701042026281,
-0.03369743004441261,
-0.0077009862288832664,
0.057905666530132294,
-0.01657913625240326,
0.03585406765341759,
0.04528934881091118,
0.027119692414999008,
0.03475777804851532,
0.003942599520087242,
-0.02702983282506466,
0.09517952054738998,
-0.000982280122116208,
0.06487879157066345,
0.01169974822551012,
0.05387994647026062,
-0.036159589886665344,
0.05661168694496155,
-0.005679140333086252,
-0.0031900235917419195,
0.0028440633323043585,
-0.03209792822599411,
-0.001935355830937624,
0.029689684510231018,
-0.029186468571424484,
0.0174328051507473,
-0.012418626807630062,
0.04546906799077988,
-0.03288869187235832,
0.018780702725052834,
0.011232477612793446,
-0.010612444952130318,
0.04762570187449455,
-0.005458984058350325,
0.01384739764034748,
0.056072525680065155,
-0.04356404021382332,
0.04780542477965355,
-0.02248292602598667,
-0.029276328161358833,
-0.027137665078043938,
-0.015123407356441021,
-0.040508806705474854,
0.018043851479887962,
0.018978392705321312,
-0.03448819741606712,
-0.07526658475399017,
-0.07864531129598618,
0.01991293579339981,
-0.06491473317146301,
0.003003564430400729,
0.0643036887049675,
-0.018421262502670288,
-0.03306841477751732,
-0.02794640325009823,
0.019679300487041473,
0.021961739286780357,
-0.0010929200798273087,
0.010639402084052563,
-0.015222253277897835,
-0.0172530859708786,
-0.011457126587629318,
0.0008884889539331198,
-0.08432445675134659,
-0.0869843065738678,
-0.005378110334277153,
0.04359998553991318,
0.03759734705090523,
-0.043060824275016785,
-0.04165901243686676,
0.07210351526737213,
-0.013254323042929173,
-0.07278645038604736,
0.015096449293196201,
0.005009684711694717,
0.035961899906396866,
0.05010583624243736,
-0.08439633995294571,
0.06595710664987564,
0.001088427030481398,
-0.021907823160290718,
-0.027461159974336624,
-0.007269659079611301,
-0.0485602468252182,
0.003392208134755492,
0.0050770798698067665,
-0.08835016936063766,
-0.013613762333989143,
0.005989156663417816,
0.0009014062816277146,
0.02426215074956417,
-0.022123487666249275,
-0.012715164572000504,
-0.017190182581543922,
-0.056036584079265594,
0.07339750230312347,
-0.016866687685251236,
0.04942290112376213,
0.013559846207499504,
-0.011421183124184608,
0.026472702622413635,
0.024873197078704834,
-0.029851431027054787,
-0.014925715513527393,
0.01915811374783516,
0.025825710967183113,
0.017953991889953613,
0.004018980544060469,
-0.021961739286780357,
0.0742601528763771,
-0.02012859843671322,
-0.07045009732246399,
0.005427532829344273,
0.010118215344846249,
0.06157194823026657,
-0.013056631200015545,
0.00563870370388031,
-0.02420823462307453,
0.05366428196430206,
0.07584168761968613,
0.022806420922279358,
0.031001636758446693,
-0.05039338767528534,
-0.03457805886864662,
-0.031145412474870682,
-0.016785813495516777,
-0.04090419039130211,
0.021386636421084404,
0.05226247012615204,
0.03748951479792595,
-0.03533288091421127,
-0.02864730916917324,
0.01648927666246891,
-0.043995365500450134,
0.028395703062415123,
-0.04683493822813034,
0.05326889827847481,
0.009188166819512844,
-0.0008233405533246696,
0.010091257281601429,
0.06707137078046799,
0.030606254935264587,
-0.036123648285865784,
0.03734574094414711,
0.0029541414696723223,
-0.006029593758285046,
-0.0077369301579892635,
-0.08425256609916687,
-0.01735193096101284,
0.03964615240693092,
0.01923000067472458,
0.017819201573729515,
0.010594472289085388,
-0.01386537030339241,
-0.015437916852533817,
0.01738787442445755,
-0.027586964890360832,
0.01753165014088154,
0.012867925688624382,
0.02099125273525715,
0.04701465740799904,
-0.01086405199021101,
-0.007053995504975319,
0.019499581307172775,
0.06257838010787964,
-0.002945155603811145,
-0.023111945018172264,
0.0016770088113844395,
-0.020290346816182137,
-0.03323015943169594,
-0.006555273663252592,
-0.016183752566576004,
0.05183114483952522,
0.02528655342757702,
0.04086824506521225,
-0.015446902252733707,
0.03849594667553902,
0.07027037441730499,
0.037813011556863785,
-0.0798674076795578,
-0.010702304542064667,
-0.03384120762348175,
0.0382443368434906,
0.0071663204580545425,
0.035171132534742355,
-0.010621430352330208,
0.01657913625240326,
-0.005261292215436697,
0.0051624467596411705,
0.021063141524791718,
-0.0073370542377233505,
0.031648628413677216,
-0.019373776391148567,
0.04615200310945511,
-0.010253005661070347,
0.06088901311159134,
-0.006411497946828604,
0.01905028149485588,
0.03394903987646103,
-0.10632213950157166,
0.03301449865102768,
0.022213347256183624,
-0.021943766623735428,
0.02877311408519745,
-0.007435900159180164,
0.01659710891544819,
-0.0609249584376812,
0.000025062465283554047,
-0.03493749722838402,
-0.042234115302562714,
-0.023758936673402786,
0.00009351037442684174,
0.06336914002895355,
-0.015923159196972847,
0.04848835617303848,
0.018016893416643143,
-0.004034705925732851,
0.02959982492029667,
0.036914411932229996,
-0.01342505682259798,
0.03907104954123497,
-0.05132792890071869,
0.013074603863060474,
0.025628020986914635,
0.021009225398302078,
-0.03630336746573448,
-0.047481928020715714,
0.010998841375112534,
-0.03928671404719353,
-0.03846000134944916,
0.02862933836877346,
0.005867846310138702,
0.0052253482863307,
-0.010855065658688545,
-0.049207236617803574,
0.015024561434984207,
-0.0052523063495755196,
0.026472702622413635,
-0.00033922080183401704,
0.027982346713542938,
-0.022986141964793205,
0.033409878611564636,
0.08037061989307404,
-0.02336355298757553,
-0.005449998192489147,
-0.017927033826708794,
-0.0031967631075531244,
-0.03123527206480503,
0.009857621975243092,
0.059523142874240875,
-0.015995047986507416,
0.0020151063799858093,
-0.04194656386971474,
-0.022932225838303566,
-0.009012939408421516,
-0.07727944105863571,
-0.020272374153137207,
0.02521466463804245,
0.017738327383995056,
-0.018906505778431892,
0.04676304757595062,
-0.026760254055261612,
0.055281758308410645,
-0.030606254935264587,
-0.026239067316055298,
-0.0018499890575185418,
-0.0008104232256300747,
0.030660169199109077,
-0.0031877770088613033,
-0.006878769025206566,
-0.02870122529566288,
0.020595870912075043,
0.021458525210618973,
-0.024603618308901787,
0.029276328161358833,
-0.024513758718967438,
-0.011169575154781342,
-0.010882023721933365,
0.008280581794679165,
0.02519669383764267,
-0.107256680727005,
0.003504532855004072,
0.0023408483248203993,
-0.0270837489515543,
0.047302208840847015,
-0.04248572140932083,
-0.015590677969157696,
-0.012876912020146847,
0.005530871916562319,
-0.045505013316869736,
-0.0038437535986304283,
0.015276169404387474,
0.046475496143102646,
-0.007714465260505676,
-0.06387235969305038,
-0.04338432103395462,
-0.013056631200015545,
0.010288949124515057,
0.03653700277209282,
-0.04679899290204048,
0.06836535036563873,
-0.010693318210542202,
0.0592355914413929,
0.004434581845998764,
0.009408323094248772,
0.06265026330947876,
0.0028508026152849197,
0.02332760952413082,
0.027101721614599228,
0.01046866923570633,
-0.0004818732850253582,
0.042917050421237946,
-0.04848835617303848,
-0.011295379139482975,
0.02523263730108738,
-0.0033248132094740868,
-0.007957086898386478,
-0.012310795485973358,
0.005148967728018761,
-0.016686968505382538,
-0.09769559651613235,
0.03414672985672951,
0.001291734864935279,
0.028880946338176727,
-0.05125604197382927,
0.023255720734596252,
0.05452693626284599,
0.042126283049583435,
0.014952673576772213,
0.021548384800553322,
-0.010648388415575027,
0.04528934881091118,
-0.06865289807319641,
-0.02178202010691166,
0.02853947877883911,
-0.02945604920387268,
-0.05556930974125862,
0.036213506013154984,
-0.022141458466649055,
-0.03479372337460518,
-0.001851112232543528,
0.0364651158452034,
-0.015357042662799358,
0.025628020986914635,
-0.010935939848423004,
-0.08065817505121231,
-0.012418626807630062,
-0.013685650192201138,
-0.05330484360456467,
0.06017013266682625,
-0.008473780937492847,
0.010594472289085388,
0.0059082829393446445,
0.017522664740681648,
0.015060505829751492,
0.010315907187759876,
0.019391749054193497,
0.0022509885020554066,
-0.03371540457010269,
0.059559088200330734,
-0.05208275094628334,
-0.034416310489177704,
-0.04661927372217178,
0.023812850937247276,
-0.05492231994867325,
0.01434162724763155,
0.0690123438835144,
-0.02688605710864067,
0.020631814375519753,
-0.006110467482358217,
0.028916889801621437,
-0.024603618308901787,
0.003834767732769251,
-0.0015231239376589656,
0.003949339035898447,
0.05812133103609085,
0.011888453736901283,
-0.013856383971869946,
-0.00028488371754065156,
0.027101721614599228,
0.03935860097408295,
-0.005256799515336752,
-0.007395463064312935,
0.04244977980852127,
0.011654818430542946,
0.03978992626070976,
0.04507368430495262,
0.03150485083460808,
-0.018762730062007904,
-0.012760094366967678,
-0.00820869393646717,
-0.023938655853271484,
-0.01089101005345583,
0.012158033438026905,
0.02535844035446644,
-0.009255561046302319,
0.021099084988236427,
0.03738168254494667,
0.07857342809438705,
-0.038567833602428436,
-0.018762730062007904,
-0.06390830129384995,
-0.012831982225179672,
-0.026400813832879066,
-0.047302208840847015,
0.033499740064144135,
-0.028251927345991135,
0.011025799438357353,
-0.014979631640017033,
-0.03116338513791561,
0.03533288091421127,
-0.08159271627664566,
0.05204680562019348,
0.04097607731819153,
-0.006384539883583784,
0.013550860807299614,
0.0058229160495102406,
-0.03118135593831539,
-0.009623986668884754,
-0.0035831602290272713,
-0.02330963686108589,
-0.003974050283432007,
-0.001284995349124074,
0.03146890923380852,
0.0380646176636219,
0.006092495750635862,
0.03132513165473938,
-0.02442389912903309,
0.03921482339501381,
-0.023291664198040962,
0.007966073229908943,
-0.023812850937247276,
-0.03889133036136627,
0.0059397341683506966,
0.04600822553038597,
-0.09079436212778091,
0.049171291291713715,
-0.016075922176241875,
0.037813011556863785,
0.04316865652799606,
-0.055209871381521225,
-0.012499500997364521,
-0.023974599316716194,
-0.04884779825806618,
0.0690123438835144,
-0.08655297756195068,
-0.013182435184717178,
-0.029743600636720657,
0.009956467896699905,
-0.029312273487448692,
0.02697591669857502,
-0.042198169976472855,
0.0006088002701289952,
0.06455529481172562,
0.03590798377990723,
0.0434921532869339,
0.06998282670974731,
-0.009480210952460766,
0.024819280952215195,
-0.002848556265234947,
-0.03143296390771866,
-0.0198769923299551,
0.0015208774711936712,
-0.02012859843671322,
-0.06559766829013824,
-0.0024531730450689793,
0.028521506115794182,
0.016749870032072067,
0.019391749054193497,
0.08029873669147491,
-0.07763887941837311,
-0.009722832590341568,
-0.007085446733981371,
0.017199169844388962,
-0.005081572569906712,
-0.04942290112376213,
-0.012490514665842056,
-0.027964375913143158,
0.008505231700837612,
0.013245336711406708,
0.056899238377809525,
0.010244019329547882,
-0.09776747971773148,
0.039430487900972366,
0.009120771661400795,
-0.06696353852748871,
0.008343484252691269,
-0.022123487666249275,
0.004077389370650053,
0.04661927372217178,
0.015788370743393898,
-0.057833779603242874,
-0.02262670174241066,
0.08116138726472855,
-0.03200806677341461,
-0.0365549735724926,
0.016956547275185585,
0.017594551667571068,
-0.058624546974897385,
0.002641878556460142,
-0.02356124483048916,
0.01736091636121273,
-0.05930747836828232,
-0.02000279538333416,
0.011969327926635742,
0.021332720294594765,
-0.011636846698820591,
0.026418786495923996,
0.0382443368434906,
0.022411039099097252,
-0.037705179303884506,
-0.04155118018388748,
-0.026472702622413635,
0.006366568151861429,
-0.01903230883181095,
0.0036123646423220634,
0.056971125304698944,
-0.061320338398218155,
-0.011888453736901283,
0.0311274416744709,
-0.0014635918196290731,
0.04935101047158241,
-0.08058628439903259,
-0.021925795823335648,
-0.0311274416744709,
0.006928191985934973,
0.006407005246728659,
0.015312112867832184,
0.015860257670283318,
-0.02356124483048916,
0.0380646176636219,
-0.01482686959207058,
-0.03978992626070976,
0.03766923397779465,
0.01753165014088154,
-0.03482966497540474,
0.056863293051719666,
0.04284515976905823,
0.022249290719628334,
-0.06962338835000992,
-0.0331762433052063,
-0.024801310151815414,
0.02866528183221817,
-0.06933583319187164,
-0.011529014445841312,
0.0734693855047226,
0.03838811442255974,
0.04776947945356369,
-0.005449998192489147,
-0.019733216613531113,
-0.009039897471666336,
-0.006901233922690153,
0.03587203845381737,
0.06451934576034546,
0.035225048661231995,
-0.03479372337460518,
0.03813650831580162,
0.016722911968827248,
-0.02082950621843338,
0.04363592714071274,
0.0035337372682988644,
-0.018762730062007904,
0.01739686168730259,
-0.028072206303477287,
0.006321638356894255,
-0.0074224211275577545,
-0.028827030211687088,
-0.07303805649280548,
0.018439235165715218,
0.01833140291273594,
-0.01732497289776802,
-0.06189544126391411,
-0.043779704719781876,
-0.004540167283266783,
-0.01130436547100544,
0.04284515976905823,
-0.005108530633151531,
-0.020613841712474823,
-0.03734574094414711,
0.049962058663368225,
0.07814209908246994,
-0.00693717785179615,
0.015986060723662376,
0.003086684737354517,
0.01824154332280159,
0.04942290112376213,
0.039574265480041504,
0.056935179978609085,
-0.04503773897886276,
-0.03578218072652817,
-0.0209013931453228,
0.03236750513315201,
-0.0451815165579319,
0.03630336746573448,
-0.05308917909860611,
-0.04787731170654297,
-0.006622668355703354,
-0.06897639483213425,
-0.009992411360144615,
-0.016695953905582428,
-0.020595870912075043,
0.0012007518671453,
0.004423349630087614,
-0.011115659028291702,
-0.006321638356894255,
-0.0004748529754579067,
-0.013559846207499504,
0.012993729673326015,
-0.010971883311867714,
-0.004344722256064415,
0.02244698256254196,
0.027137665078043938,
0.008352469652891159,
0.03556651622056961,
-0.03238547965884209,
0.048955630511045456,
0.028485562652349472,
0.008258117362856865,
-0.012427613139152527,
0.04352809488773346,
-0.06944366544485092,
-0.016129836440086365,
0.015222253277897835,
-0.04288110509514809,
-0.024513758718967438,
-0.06531011313199997,
0.021009225398302078,
0.012903870083391666,
-0.06782618910074234,
0.05298134684562683,
-0.00014019536320120096,
0.007620112504810095,
0.029078636318445206,
0.010127201676368713,
-0.0015287401620298624,
-0.002583469729870558,
0.03986181691288948,
0.03921482339501381,
-0.05844482406973839,
-0.002113952301442623,
-0.04068852588534355,
-0.018034866079688072,
-0.01515036541968584,
0.02264467440545559,
0.010333878919482231,
0.009426294825971127,
0.0019083978841081262,
-0.04424697533249855,
-0.06300970166921616,
0.00648787897080183
]
|
41,566 | pyglove.core.hyper.iter | iterate | Iterate a hyper value based on an algorithm.
Example::
hyper_dict = pg.Dict(x=pg.oneof([1, 2, 3]), y=pg.oneof(['a', 'b']))
# Get all examples from the hyper_dict.
assert list(pg.iter(hyper_dict)) == [
pg.Dict(x=1, y='a'),
pg.Dict(x=1, y='b'),
pg.Dict(x=2, y='a'),
pg.Dict(x=2, y='b'),
pg.Dict(x=3, y='a'),
pg.Dict(x=3, y='b'),
]
# Get the first two examples.
assert list(pg.iter(hyper_dict, 2)) == [
pg.Dict(x=1, y='a'),
pg.Dict(x=1, y='b'),
]
# Random sample examples, which is equivalent to `pg.random_sample`.
list(pg.iter(hyper_dict, 2, pg.geno.Random()))
# Iterate examples with feedback loop.
for d, feedback in pg.iter(
hyper_dict, 10,
pg.evolution.regularized_evolution(pg.evolution.mutators.Uniform())):
feedback(d.x)
# Only materialize selected parts.
assert list(
pg.iter(hyper_dict, where=lambda x: len(x.candidates) == 2)) == [
pg.Dict(x=pg.oneof([1, 2, 3]), y='a'),
pg.Dict(x=pg.oneof([1, 2, 3]), y='b'),
]
``pg.iter`` distinguishes from `pg.sample` in that it's designed
for simple in-process iteration, which is handy for quickly generating
examples from algorithms without maintaining trail states. On the contrary,
`pg.sample` is designed for distributed sampling, with parallel workers and
failover handling.
Args:
hyper_value: A hyper value that represents a space of instances.
num_examples: An optional integer as the max number of examples to
propose. If None, propose will return an iterator of infinite examples.
algorithm: An optional DNA generator. If None, Sweeping will be used, which
iterates examples in order.
where: Function to filter hyper primitives. If None, all hyper primitives
from `value` will be included in the encoding/decoding process. Otherwise
only the hyper primitives on which 'where' returns True will be included.
`where` can be useful to partition a search space into separate
optimization processes. Please see 'Template' docstr for details.
force_feedback: If True, always return the Feedback object together
with the example, this is useful when the user want to pass different
DNAGenerators to `pg.iter` and want to handle them uniformly.
Yields:
A tuple of (example, feedback_fn) if the algorithm needs a feedback or
`force_feedback` is True, otherwise the example.
Raises:
ValueError: when `hyper_value` is a constant value.
| def iterate(hyper_value: Any,
num_examples: Optional[int] = None,
algorithm: Optional[geno.DNAGenerator] = None,
where: Optional[Callable[[base.HyperPrimitive], bool]] = None,
force_feedback: bool = False):
"""Iterate a hyper value based on an algorithm.
Example::
hyper_dict = pg.Dict(x=pg.oneof([1, 2, 3]), y=pg.oneof(['a', 'b']))
# Get all examples from the hyper_dict.
assert list(pg.iter(hyper_dict)) == [
pg.Dict(x=1, y='a'),
pg.Dict(x=1, y='b'),
pg.Dict(x=2, y='a'),
pg.Dict(x=2, y='b'),
pg.Dict(x=3, y='a'),
pg.Dict(x=3, y='b'),
]
# Get the first two examples.
assert list(pg.iter(hyper_dict, 2)) == [
pg.Dict(x=1, y='a'),
pg.Dict(x=1, y='b'),
]
# Random sample examples, which is equivalent to `pg.random_sample`.
list(pg.iter(hyper_dict, 2, pg.geno.Random()))
# Iterate examples with feedback loop.
for d, feedback in pg.iter(
hyper_dict, 10,
pg.evolution.regularized_evolution(pg.evolution.mutators.Uniform())):
feedback(d.x)
# Only materialize selected parts.
assert list(
pg.iter(hyper_dict, where=lambda x: len(x.candidates) == 2)) == [
pg.Dict(x=pg.oneof([1, 2, 3]), y='a'),
pg.Dict(x=pg.oneof([1, 2, 3]), y='b'),
]
``pg.iter`` distinguishes from `pg.sample` in that it's designed
for simple in-process iteration, which is handy for quickly generating
examples from algorithms without maintaining trail states. On the contrary,
`pg.sample` is designed for distributed sampling, with parallel workers and
failover handling.
Args:
hyper_value: A hyper value that represents a space of instances.
num_examples: An optional integer as the max number of examples to
propose. If None, propose will return an iterator of infinite examples.
algorithm: An optional DNA generator. If None, Sweeping will be used, which
iterates examples in order.
where: Function to filter hyper primitives. If None, all hyper primitives
from `value` will be included in the encoding/decoding process. Otherwise
only the hyper primitives on which 'where' returns True will be included.
`where` can be useful to partition a search space into separate
optimization processes. Please see 'Template' docstr for details.
force_feedback: If True, always return the Feedback object together
with the example, this is useful when the user want to pass different
DNAGenerators to `pg.iter` and want to handle them uniformly.
Yields:
A tuple of (example, feedback_fn) if the algorithm needs a feedback or
`force_feedback` is True, otherwise the example.
Raises:
ValueError: when `hyper_value` is a constant value.
"""
if isinstance(hyper_value, dynamic_evaluation.DynamicEvaluationContext):
dynamic_evaluation_context = hyper_value
spec = hyper_value.dna_spec
t = None
else:
t = object_template.template(hyper_value, where)
if t.is_constant:
raise ValueError(
f'\'hyper_value\' is a constant value: {hyper_value!r}.')
dynamic_evaluation_context = None
spec = t.dna_spec()
if algorithm is None:
algorithm = geno.Sweeping()
# NOTE(daiyip): algorithm can continue if it's already set up with the same
# DNASpec, or we will setup the algorithm with the DNASpec from the template.
if algorithm.dna_spec is None:
algorithm.setup(spec)
elif symbolic.ne(spec, algorithm.dna_spec):
raise ValueError(
f'{algorithm!r} has been set up with a different DNASpec. '
f'Existing: {algorithm.dna_spec!r}, New: {spec!r}.')
count = 0
while num_examples is None or count < num_examples:
try:
count += 1
dna = algorithm.propose()
if t is not None:
example = t.decode(dna)
else:
assert dynamic_evaluation_context is not None
example = lambda: dynamic_evaluation_context.apply(dna)
if force_feedback or algorithm.needs_feedback:
yield example, Feedback(algorithm, dna)
else:
yield example
except StopIteration:
return
| (hyper_value: Any, num_examples: Optional[int] = None, algorithm: Optional[pyglove.core.geno.dna_generator.DNAGenerator] = None, where: Optional[Callable[[pyglove.core.hyper.base.HyperPrimitive], bool]] = None, force_feedback: bool = False) | [
0.12208487838506699,
-0.006660901475697756,
-0.08658672124147415,
-0.03927583247423172,
0.0028282597195357084,
0.016569804400205612,
-0.05164822190999985,
-0.050049204379320145,
0.048090409487485886,
-0.0022611087188124657,
0.021986471489071846,
0.06048278510570526,
-0.004302352666854858,
0.05016912892460823,
-0.05324723571538925,
0.021746618673205376,
0.0008095019147731364,
0.08722633123397827,
0.006615929305553436,
0.004437269642949104,
-0.01974784955382347,
-0.008834564127027988,
-0.03383917734026909,
0.006690883077681065,
0.036477554589509964,
-0.03583794832229614,
-0.007055658381432295,
-0.016689730808138847,
-0.009783979505300522,
0.04071494936943054,
0.0593634732067585,
-0.07959102839231491,
-0.026643605902791023,
-0.008444803766906261,
0.0045621925964951515,
-0.024984626099467278,
-0.03895603120326996,
0.07471402734518051,
-0.05332718789577484,
0.035658057779073715,
0.03242005035281181,
-0.04401291906833649,
-0.010198724456131458,
-0.010603475384414196,
-0.031240778043866158,
0.03765682876110077,
-0.003083102870732546,
0.05084871128201485,
-0.023465560749173164,
-0.056884996592998505,
0.016569804400205612,
-0.04601169005036354,
0.04357318952679634,
0.024444958195090294,
-0.018188808113336563,
-0.0021674162708222866,
-0.03965559974312782,
0.014271218329668045,
0.06396064162254333,
-0.018488623201847076,
0.029541822150349617,
-0.03347939997911453,
-0.019947726279497147,
0.02066728286445141,
0.017499232664704323,
-0.01439114473760128,
0.002533441176638007,
-0.01048354897648096,
-0.03196033462882042,
-0.02952183410525322,
0.014611009508371353,
0.032819803804159164,
0.03365929052233696,
-0.017789054661989212,
-0.01881842128932476,
0.05928352102637291,
-0.0268234945833683,
-0.013081950135529041,
0.0642004981637001,
-0.08810579031705856,
0.03569803386926651,
0.04952952265739441,
-0.0634809359908104,
-0.07259532809257507,
-0.0014366160612553358,
0.020077645778656006,
0.00842981319874525,
-0.0023785363882780075,
0.07655289769172668,
0.027782903984189034,
-0.011502922512590885,
-0.01212254073470831,
0.0723155066370964,
0.020847171545028687,
0.04193419590592384,
0.0235854871571064,
0.025004614144563675,
-0.03228013589978218,
0.005311731714755297,
-0.024105167016386986,
0.05560578405857086,
-0.03519834205508232,
0.05512607842683792,
-0.004812038969248533,
0.015530443750321865,
-0.0422540009021759,
-0.026223864406347275,
0.00396755849942565,
0.04031519219279289,
-0.0438929907977581,
-0.10601476579904556,
-0.006590944714844227,
-0.000827615731395781,
-0.01281211618334055,
0.005371694918721914,
0.0333394855260849,
0.010028828866779804,
0.031660519540309906,
-0.02424508146941662,
-0.01642988994717598,
-0.009873924776911736,
0.005731473211199045,
-0.029222019016742706,
0.008869542740285397,
-0.004060002043843269,
0.011333026923239231,
0.006131227593868971,
-0.0029806660022586584,
-0.062241703271865845,
-0.03593788668513298,
0.02064729481935501,
0.02424508146941662,
-0.00877460092306137,
0.010243697091937065,
0.01862853765487671,
-0.0021936502307653427,
-0.06252153217792511,
-0.04465252533555031,
0.0009313019691035151,
-0.028482474386692047,
0.010873309336602688,
-0.04641144350171089,
0.010763376951217651,
0.005166820716112852,
0.03481857478618622,
-0.044772449880838394,
-0.0006096248980611563,
-0.011223094537854195,
0.040535058826208115,
-0.013551661744713783,
0.027103323489427567,
0.04884994029998779,
0.07907134294509888,
-0.018918359652161598,
-0.03146064281463623,
-0.0006183694931678474,
-0.016709718853235245,
-0.038836102932691574,
-0.016999540850520134,
-0.03198032081127167,
0.01476091705262661,
-0.0004531586600933224,
0.040195267647504807,
0.04952952265739441,
-0.011762762442231178,
0.04357318952679634,
-0.01609009876847267,
0.04067497327923775,
0.03341943770647049,
0.0024322534445673227,
0.025724170729517937,
-0.04441267251968384,
-0.024744775146245956,
-0.024165131151676178,
0.0239852424710989,
0.04861009120941162,
0.028442498296499252,
-0.0030131458770483732,
0.04011531546711922,
-0.02194649539887905,
-0.027922818437218666,
-0.007720249705016613,
-0.06755843013525009,
0.014501077122986317,
-0.027503076940774918,
0.00791013240814209,
0.05440652370452881,
0.030281366780400276,
0.054286595433950424,
0.008015068247914314,
-0.014241237193346024,
-0.019947726279497147,
-0.0013416744768619537,
0.05388684198260307,
0.009059425443410873,
-0.009459179826080799,
0.023565499112010002,
0.0014903330011293292,
-0.0007757726707495749,
0.09730012714862823,
-0.03941574692726135,
-0.07115621864795685,
-0.015860240906476974,
-0.04001537710428238,
-0.04001537710428238,
0.011532903648912907,
-0.0008257419103756547,
0.003185539972037077,
-0.014581028372049332,
-0.06104243919253349,
-0.026203876361250877,
-0.03066113404929638,
0.03559809550642967,
0.03683733195066452,
0.030621157959103584,
-0.06084256246685982,
0.047210950404405594,
-0.02798278257250786,
-0.017019527032971382,
-0.022726016119122505,
-0.0447324737906456,
-0.020047664642333984,
-0.006515990477055311,
-0.037197113037109375,
0.08218942582607269,
-0.018108857795596123,
0.026883458718657494,
0.0082399295642972,
-0.03559809550642967,
-0.06559963524341583,
0.08170972019433975,
-0.0014278714079409838,
0.07507380843162537,
-0.012822110205888748,
0.042493853718042374,
-0.0280427448451519,
-0.003982549533247948,
0.018808426335453987,
-0.028022756800055504,
0.04900984466075897,
0.022086409851908684,
0.0015815268270671368,
-0.004514722153544426,
-0.04888991639018059,
-0.05176814645528793,
0.004767066799104214,
-0.009029444307088852,
0.012182503938674927,
0.0021874040830880404,
-0.026163900271058083,
-0.00721555994823575,
-0.04677122086286545,
-0.025164516642689705,
-0.024764761328697205,
-0.011982627213001251,
0.014381150715053082,
0.04705104976892471,
-0.07583333551883698,
0.03967558592557907,
0.016419896855950356,
-0.03204028680920601,
0.002402271842584014,
-0.07767220586538315,
0.09378229826688766,
-0.0036202725023031235,
0.013801507651805878,
-0.010178737342357635,
-0.0030856013763695955,
0.023805351927876472,
0.03731703758239746,
-0.04924969747662544,
0.03180043399333954,
0.008199954405426979,
-0.04341328889131546,
-0.021266914904117584,
0.0471709743142128,
0.039055969566106796,
0.009329259395599365,
-0.002498462563380599,
-0.021366853266954422,
0.015310578979551792,
-0.012222479097545147,
-0.05000922828912735,
-0.039795514196157455,
-0.03180043399333954,
0.022666053846478462,
-0.01645987294614315,
0.08418820053339005,
0.04465252533555031,
-0.008269911631941795,
0.03739698976278305,
-0.018518606200814247,
0.04041513055562973,
-0.018518606200814247,
0.028902215883135796,
-0.0239852424710989,
-0.02244618907570839,
-0.01236239355057478,
0.001406634459272027,
-0.044852402061223984,
0.08274908363819122,
-0.01077337097376585,
0.0382164865732193,
0.05512607842683792,
-0.07163592427968979,
0.05652521923184395,
0.06631918996572495,
-0.02122693881392479,
-0.05748463049530983,
-0.007735240273177624,
-0.005696495063602924,
0.010983241721987724,
0.020607320591807365,
0.047450803220272064,
0.008164975792169571,
-0.0732349380850792,
0.0239852424710989,
-0.040934812277555466,
-0.014970788732171059,
0.018718482926487923,
-0.056964948773384094,
0.06551968306303024,
0.018918359652161598,
-0.02080719731748104,
0.008674662560224533,
-0.020317498594522476,
-0.002182407071813941,
0.007140606176108122,
-0.007110624574124813,
-0.00648101232945919,
-0.016070112586021423,
0.042653754353523254,
0.04333333671092987,
0.06919742375612259,
-0.02035747468471527,
0.06559963524341583,
-0.0011823974782600999,
0.022885918617248535,
-0.015260609798133373,
-0.04405289515852928,
-0.002668358152732253,
-0.014411132782697678,
-0.022506151348352432,
-0.01593019813299179,
0.011982627213001251,
-0.036057814955711365,
-0.022426201030611992,
-0.03156058117747307,
0.013751538470387459,
-0.039015993475914,
0.021107012405991554,
0.09921894967556,
0.042733706533908844,
0.0829889327287674,
0.015050739049911499,
-0.024265069514513016,
0.020177584141492844,
-0.048090409487485886,
-0.014710947871208191,
0.04237392544746399,
-0.001347920624539256,
-0.018888378515839577,
0.02454489655792713,
0.036397602409124374,
0.005991313606500626,
-0.04888991639018059,
-0.013601630926132202,
-0.0036677431780844927,
-0.04461254924535751,
0.0009862681617960334,
-0.0002279847249155864,
-0.017379306256771088,
-0.011532903648912907,
0.004067497327923775,
0.04173431918025017,
-0.0747939795255661,
-0.042893607169389725,
0.0016864623175933957,
-0.0031805429607629776,
0.07303506135940552,
0.07175584882497787,
0.040854860097169876,
0.017709102481603622,
0.033619314432144165,
-0.027603015303611755,
-0.07471402734518051,
0.051928047090768814,
0.036697421222925186,
0.0002231439430033788,
-0.03683733195066452,
-0.03251998871564865,
-0.007640298921614885,
-0.005316728726029396,
-0.002547182608395815,
0.002650868846103549,
0.010113776661455631,
-0.0009338004165329039,
0.0162500012665987,
-0.07023677974939346,
-0.029002154245972633,
0.03441882133483887,
0.0006608433905057609,
0.008154981769621372,
0.02342558652162552,
0.003025638172402978,
-0.07671279460191727,
0.0369972363114357,
0.02350553683936596,
-0.03629766404628754,
0.050129156559705734,
-0.03953567147254944,
-0.02374538965523243,
-0.06763838231563568,
0.01472094189375639,
-0.008679659105837345,
-0.012282442301511765,
-0.04097478836774826,
0.06032288074493408,
-0.030880998820066452,
0.07343481481075287,
0.10129766911268234,
-0.030841022729873657,
0.02098708599805832,
0.06935732066631317,
0.014291206374764442,
0.004717097617685795,
0.021286901086568832,
-0.053047358989715576,
0.003185539972037077,
-0.003950069658458233,
-0.015400524251163006,
-0.05308733507990837,
0.009274293668568134,
0.03138069063425064,
0.010253691114485264,
0.013911440037190914,
-0.04237392544746399,
0.03465867415070534,
0.057204801589250565,
-0.04944957420229912,
0.01053351815789938,
0.013021987862884998,
0.05800430849194527,
-0.029481859877705574,
0.021346865221858025,
0.03569803386926651,
0.03463868796825409,
-0.013441729359328747,
0.0239852424710989,
0.006236162967979908,
0.045891761779785156,
-0.05944342538714409,
0.07827183604240417,
0.05220787599682808,
-0.008399831131100655,
0.01606011763215065,
0.007670280523598194,
-0.0065209874883294106,
-0.018278753384947777,
0.028842253610491753,
0.02406519278883934,
-0.015520449727773666,
-0.002241120906546712,
-0.03271986544132233,
-0.03957564756274223,
0.05260762944817543,
0.007110624574124813,
0.057924360036849976,
-0.04593173786997795,
0.005671510472893715,
0.03196033462882042,
0.02690344676375389,
0.012852092273533344,
0.01775907352566719,
0.029062118381261826,
-0.002086216351017356,
-0.009284287691116333,
-0.009609087370336056,
-0.005606550257652998,
-0.04960947483778,
0.05828413739800453,
-0.025564270094037056,
0.04205412417650223,
0.018648525699973106,
0.004117466509342194,
-0.042733706533908844,
0.014101323671638966,
0.015430505387485027,
0.0055815656669437885,
-0.014081335626542568,
-0.05048893392086029,
-0.03222017362713814,
0.024424970149993896,
0.010943266563117504,
-0.010503537021577358,
-0.015310578979551792,
0.05888376757502556,
-0.024424970149993896,
0.07111623883247375,
-0.059323497116565704,
-0.006021295208483934,
0.007030673790723085,
-0.0025609242729842663,
-0.03967558592557907,
0.0312807522714138,
0.01915821246802807,
0.03429889678955078,
-0.0007401695474982262,
-0.012832104228436947,
0.05660517141222954,
0.007785209454596043,
-0.021406827494502068,
0.05220787599682808,
-0.014501077122986317,
0.010078798048198223,
-0.057204801589250565,
0.03843634948134422,
-0.01939806342124939,
-0.03871617838740349,
-0.01926814392209053,
0.03293973207473755,
0.00981895811855793,
-0.04405289515852928,
0.03301968425512314,
0.008669665083289146,
-0.02448493428528309,
0.0012492312816902995,
-0.022466177120804787,
0.04121464118361473,
-0.029541822150349617,
0.011203106492757797,
-0.023545512929558754,
0.053287211805582047,
0.06515990942716599,
-0.014211256057024002,
-0.07263530790805817,
0.024345019832253456,
-0.01921817474067211,
-0.03341943770647049,
0.03729705139994621,
0.05196802318096161,
0.04900984466075897,
-0.025304429233074188,
-0.029162056744098663,
0.04157441854476929,
-0.02066728286445141,
0.008035056293010712,
-0.034438807517290115,
-0.018058888614177704,
-0.028862239792943,
-0.04625153914093971,
-0.04936962202191353,
-0.003407903015613556,
0.04613161459565163,
-0.019617928192019463,
0.011392990127205849,
0.024984626099467278,
0.0158702339977026,
0.021986471489071846,
0.028262609615921974,
0.01666974276304245,
-0.0027108320500701666,
-0.046971097588539124,
-0.06947725266218185,
0.10585486888885498,
0.05096863955259323,
0.0002025316352955997,
-0.008924508467316628,
-0.017739085480570793,
-0.01913822442293167,
0.011073186993598938,
0.04193419590592384,
0.030361318960785866,
0.03543819487094879,
-0.018488623201847076,
0.03198032081127167,
-0.06683887541294098,
-0.009199339896440506,
-0.004654636140912771,
-0.0536469891667366,
-0.048250310122966766,
0.003375423140823841,
0.055485859513282776,
-0.033379461616277695,
0.08011070638895035,
0.005926353391259909,
-0.003128075273707509,
0.0698770061135292,
-0.02520449087023735,
-0.01244234386831522,
-0.03355935215950012,
-0.010833334177732468,
-0.05960332602262497,
0.0026283827610313892,
0.006376076489686966,
0.04097478836774826,
-0.0003510340175125748,
-0.05172817036509514,
-0.05496617779135704,
0.007555351126939058,
-0.055246006697416306,
0.08019065856933594,
0.03441882133483887,
0.01860854960978031,
0.034998465329408646,
-0.005436654668301344,
-0.000942545011639595,
-0.041174665093421936,
0.022586101666092873,
-0.04908979311585426,
0.026443729177117348,
0.028442498296499252,
-0.008179966360330582,
-0.05628536641597748,
-0.009524139575660229,
0.002765798242762685,
-0.029401909559965134,
0.01244234386831522,
0.011902675963938236,
-0.050928663462400436,
0.01341174729168415,
-0.054606400430202484,
-0.04593173786997795,
0.025904061272740364,
-0.019418051466345787,
-0.041174665093421936,
0.03603782504796982,
-0.0552859827876091,
-0.004504728130996227,
0.010803352110087872,
0.017319343984127045,
0.0008632188546471298,
0.02642374113202095,
0.013001999817788601,
-0.024764761328697205,
-0.019288131967186928,
0.03453874960541725,
-0.005331719294190407,
-0.07311501353979111,
0.0015228129923343658,
-0.07535363733768463,
0.03733702749013901,
0.020047664642333984,
0.023445574566721916,
0.004931965377181768,
-0.0050194114446640015,
-0.017259379848837852,
0.003025638172402978,
-0.0044047897681593895,
0.03685732185840607,
0.03445879742503166,
0.010723401792347431,
-0.037277061492204666,
-0.03685732185840607,
-0.0402352437376976,
-0.0037576877512037754,
0.03154059126973152,
-0.0014478591037914157,
-0.024365007877349854,
0.023045819252729416,
0.017429275438189507,
0.02284594252705574,
0.014770911075174809,
-0.03835639730095863,
-0.040854860097169876,
0.029621772468090057,
0.006960717029869556,
-0.005796433426439762,
0.022746004164218903,
0.0414544939994812,
-0.03210024908185005,
0.013451723381876945,
-0.002374788746237755,
-0.0055665746331214905,
0.0058913747780025005,
-0.03431888297200203,
-0.03198032081127167,
0.033939115703105927,
-0.05348708853125572,
-0.010543512180447578,
0.03230012580752373,
0.031580567359924316,
-0.017629152163863182,
0.012522295117378235,
-0.025464331731200218,
-0.09714023023843765,
0.01915821246802807,
0.0026158904656767845,
0.001722689950838685,
-0.03136070445179939,
-0.056645143777132034,
0.006820803042501211,
0.011562884785234928,
-0.07027675956487656,
-0.05140836909413338,
-0.059723250567913055,
0.0005534094525501132,
-0.06731858104467392,
0.0755535140633583,
-0.022486163303256035,
0.026463717222213745,
0.008684656582772732,
0.0183087345212698,
0.030621157959103584,
0.011682811193168163,
0.03887607902288437,
-0.044532597064971924,
-0.01049354299902916,
0.05072878673672676,
-0.03705719858407974,
-0.01865851879119873,
0.028022756800055504,
-0.06511992961168289,
-0.03148062899708748,
-0.024105167016386986,
-0.01532057300209999,
-0.021666668355464935,
0.08490775525569916,
0.003935078624635935,
0.010223709046840668,
0.01777905970811844,
0.018888378515839577,
0.045332107692956924,
-0.034838564693927765,
-0.027862856164574623,
0.014361163601279259,
-0.00687077222391963,
-0.017849016934633255,
0.0026533673517405987,
0.022965868934988976,
0.021326877176761627,
-0.02788284420967102,
-0.06156212091445923,
-0.019597942009568214,
-0.040275219827890396,
-0.05488622933626175,
0.00041693096864037216,
0.009679044596850872,
0.01040359865874052,
-0.00949915498495102,
-0.042573802173137665,
0.03545818105340004,
-0.038496311753988266,
-0.02894219197332859,
0.03082103468477726,
0.0059563349932432175,
0.012952030636370182,
-0.052407752722501755,
0.00553159648552537,
-0.029781674966216087,
0.017259379848837852,
-0.016259994357824326,
0.009274293668568134,
0.014321188442409039,
0.0593634732067585,
0.07191574573516846,
0.013251845724880695,
-0.003965060226619244,
-0.050049204379320145,
-0.038096558302640915,
-0.04976937547326088,
0.0329597182571888,
0.05432657152414322,
-0.02234625071287155,
-0.011862700805068016,
-0.021746618673205376,
-0.004482241813093424,
0.03729705139994621
]
|
41,651 | pyglove.core.symbolic.base | load | Load a symbolic value using the global load handler.
Example::
@pg.members([
('x', pg.typing.Any())
])
class A(pg.Object):
pass
a1 = A(1)
file = 'my_file.json'
a1.save(file)
a2 = pg.load(file)
assert pg.eq(a1, a2)
Args:
path: A path string for loading an object.
*args: Positional arguments that will be passed through to the global
load handler.
**kwargs: Keyword arguments that will be passed through to the global
load handler.
Returns:
Return value from the global load handler.
| def load(path: str, *args, **kwargs) -> Any:
"""Load a symbolic value using the global load handler.
Example::
@pg.members([
('x', pg.typing.Any())
])
class A(pg.Object):
pass
a1 = A(1)
file = 'my_file.json'
a1.save(file)
a2 = pg.load(file)
assert pg.eq(a1, a2)
Args:
path: A path string for loading an object.
*args: Positional arguments that will be passed through to the global
load handler.
**kwargs: Keyword arguments that will be passed through to the global
load handler.
Returns:
Return value from the global load handler.
"""
load_handler = flags.get_load_handler() or default_load_handler
value = load_handler(path, *args, **kwargs)
if flags.is_tracking_origin() and isinstance(value, Symbolic):
value.sym_setorigin(path, 'load')
return value
| (path: str, *args, **kwargs) -> Any | [
0.04104840010404587,
-0.02274840883910656,
-0.05981855094432831,
0.04737744852900505,
0.019475387409329414,
0.002217427361756563,
0.03363437205553055,
0.032657891511917114,
0.001285022939555347,
-0.0672687441110611,
0.03790196031332016,
0.02690749801695347,
-0.02307390235364437,
0.01769421249628067,
-0.07262131571769714,
-0.0009889138163998723,
-0.026672419160604477,
0.05996321514248848,
-0.02618417888879776,
-0.00865271408110857,
-0.00022801528393756598,
0.037106309086084366,
0.040216583758592606,
0.0028593738097697496,
0.0018806315492838621,
-0.03942093253135681,
0.02027103863656521,
0.03446619212627411,
-0.010958295315504074,
-0.025153446942567825,
0.07739522308111191,
-0.05688910558819771,
-0.03855294734239578,
0.01685335300862789,
-0.015894953161478043,
-0.054502151906490326,
0.011021586135029793,
0.01638319529592991,
-0.056780606508255005,
-0.050921715795993805,
-0.032296232879161835,
0.034773603081703186,
0.03743180260062218,
0.005876973737031221,
0.009466448798775673,
-0.03790196031332016,
-0.019601967185735703,
-0.008883272297680378,
0.006238633766770363,
-0.01064184308052063,
0.041446227580308914,
-0.031464412808418274,
0.00327302236109972,
-0.011139125563204288,
0.006130135618150234,
0.05967388674616814,
-0.0004724182654172182,
0.06415846943855286,
-0.01604865863919258,
0.007676231674849987,
0.035912830382585526,
-0.028679631650447845,
-0.0030108189675956964,
0.01862548664212227,
0.046256303787231445,
-0.0010380770545452833,
0.0034267278388142586,
-0.03876994550228119,
-0.030180521309375763,
-0.04896875470876694,
-0.043182194232940674,
-0.009764817543327808,
0.015433837659657001,
-0.020126374438405037,
0.0019439221359789371,
-0.009656320326030254,
-0.06473712623119354,
-0.012233146466314793,
-0.010325390845537186,
0.05811874940991402,
-0.012386851944029331,
-0.05421282351016998,
-0.014927512966096401,
-0.014538728632032871,
-0.09048731625080109,
-0.01936688832938671,
0.04567764699459076,
-0.0019416616996750236,
0.00043823011219501495,
0.02723299153149128,
-0.0054746270179748535,
0.030017772689461708,
-0.05634661763906479,
0.037106309086084366,
-0.0012172117130830884,
-0.09996280074119568,
0.09895015507936478,
0.03390561789274216,
-0.010225933976471424,
0.010461012832820415,
-0.013155379332602024,
-0.05631044879555702,
-0.052115194499492645,
0.006848934572190046,
0.007983642630279064,
0.017802709713578224,
0.07124700397253036,
-0.04209721460938454,
0.005619291216135025,
-0.008892313577234745,
-0.02133793570101261,
0.0047648693434894085,
0.005402294918894768,
0.04372468590736389,
0.014592978172004223,
0.001657984685152769,
-0.014819015748798847,
-0.011003503575921059,
-0.031428247690200806,
0.04104840010404587,
-0.06621993333101273,
0.04817310348153114,
0.0056690191850066185,
0.045894645154476166,
0.09265727549791336,
0.07168100029230118,
0.016871435567736626,
-0.057467762380838394,
0.008607505820691586,
0.004211077932268381,
0.10654501616954803,
-0.035171426832675934,
-0.008566819131374359,
0.0362202413380146,
-0.009891399182379246,
-0.0023372273426502943,
0.030596429482102394,
0.02943911775946617,
0.033670537173748016,
0.012468226253986359,
-0.002067112596705556,
-0.00044190321932546794,
-0.009502614848315716,
-0.061409853398799896,
0.04412250965833664,
0.02146451734006405,
0.03117508627474308,
0.0019507032120600343,
-0.03285680338740349,
0.034954432398080826,
0.02256757952272892,
-0.039023105055093765,
-0.004405470099300146,
0.08542407304048538,
-0.03432152792811394,
-0.032061152160167694,
-0.034176863729953766,
0.020903943106532097,
-0.034719351679086685,
0.0022954102605581284,
-0.01584070548415184,
-0.003609818173572421,
-0.014249401167035103,
-0.07602091878652573,
-0.013507998548448086,
0.05631044879555702,
0.020072124898433685,
0.0026288155931979418,
-0.004168130457401276,
0.01773037761449814,
-0.04929424822330475,
-0.04151855781674385,
-0.022459080442786217,
0.013625537976622581,
0.016790062189102173,
0.03761263191699982,
-0.025117281824350357,
0.014493521302938461,
0.028498802334070206,
0.008272971026599407,
0.052983179688453674,
-0.04622013866901398,
-0.022965405136346817,
-0.02274840883910656,
0.02065078169107437,
0.06462863087654114,
0.010723216459155083,
-0.029185956344008446,
0.04390551522374153,
0.05725076422095299,
-0.002807385055348277,
0.040216583758592606,
0.04329069331288338,
0.007463756483048201,
0.002175610512495041,
-0.04155472666025162,
-0.021211354061961174,
-0.029511449858546257,
-0.06303732097148895,
0.10690667480230331,
0.048498596996068954,
-0.01796545647084713,
0.01485518179833889,
-0.029312536120414734,
-0.03461085632443428,
-0.018878648057579994,
0.058986734598875046,
0.03007202222943306,
-0.0040573724545538425,
0.01391486544162035,
-0.06781123578548431,
-0.042820535600185394,
-0.00663645938038826,
0.024918368086218834,
0.01802874729037285,
-0.0009923044126480818,
-0.09699719399213791,
0.04564148187637329,
0.01620236411690712,
0.021066689863801003,
0.11464619636535645,
0.06198851019144058,
-0.05873357132077217,
-0.0047422656789422035,
0.01913180947303772,
-0.05395966023206711,
-0.04517132416367531,
-0.012332603335380554,
-0.024502459913492203,
0.004715141374617815,
0.037504132837057114,
-0.005090363323688507,
0.018191494047641754,
-0.05150037258863449,
0.043507687747478485,
0.02618417888879776,
0.04046974703669548,
0.0927296057343483,
0.026166096329689026,
-0.0016105168033391237,
0.045894645154476166,
0.02961994707584381,
-0.05305550992488861,
-0.01565987430512905,
-0.03231431543827057,
0.02952953241765499,
-0.01499080378562212,
-0.012667139060795307,
-0.028824295848608017,
-0.03829978406429291,
0.040397413074970245,
0.04553298279643059,
0.009195203892886639,
0.02591293305158615,
-0.02690749801695347,
0.0007640065741725266,
0.02023487351834774,
-0.029818860813975334,
-0.009127392433583736,
0.01569604128599167,
-0.014583935961127281,
0.014764766208827496,
0.02137410081923008,
0.05309167504310608,
0.02535236068069935,
-0.0005809162394143641,
-0.024375878274440765,
-0.009285618551075459,
0.05511697381734848,
-0.033851370215415955,
-0.09974581003189087,
-0.013354293070733547,
-0.014701476320624352,
0.023507894948124886,
-0.0010358166182413697,
-0.02998160757124424,
0.007527047302573919,
0.03658189997076988,
0.03133783116936684,
0.030542179942131042,
-0.019656216725707054,
0.009900440461933613,
0.04430333897471428,
-0.05819108337163925,
-0.08838968724012375,
0.03347162529826164,
-0.03880611062049866,
-0.03589474782347679,
-0.009701527655124664,
-0.03350779041647911,
0.06954720616340637,
0.008657234720885754,
-0.020307203754782677,
0.04072290658950806,
0.06629226356744766,
0.04647330194711685,
-0.04806460440158844,
-0.028082892298698425,
0.02806480973958969,
0.015017928555607796,
0.03945709764957428,
-0.023598309606313705,
0.07500826567411423,
0.02229633368551731,
0.03209731727838516,
-0.04914958402514458,
0.023363230749964714,
-0.03598516061902046,
-0.0625310018658638,
0.04535215348005295,
0.007585817016661167,
0.009394116699695587,
-0.004294711630791426,
0.027775481343269348,
-0.009936606511473656,
-0.0026672419626265764,
-0.028317971155047417,
-0.051066379994153976,
0.004629246890544891,
-0.046111639589071274,
-0.02801056019961834,
0.039854925125837326,
-0.033290795981884,
0.0025723061989992857,
-0.007043327204883099,
0.0030899320263415575,
0.025985265150666237,
0.005931222811341286,
0.02480987086892128,
-0.018571237102150917,
0.01718788780272007,
0.007079492788761854,
0.03647340461611748,
0.029167871922254562,
0.011102959513664246,
0.01769421249628067,
-0.02311006933450699,
0.033218465745449066,
-0.01386965811252594,
-0.005632853135466576,
0.07327230274677277,
-0.018164370208978653,
-0.010678009130060673,
-0.007047847844660282,
0.022820740938186646,
0.004247243516147137,
0.003408644814044237,
0.0011900871759280562,
0.06188001111149788,
-0.05403199419379234,
-0.015207800082862377,
-0.009981813840568066,
-0.053127843886613846,
-0.010406764224171638,
-0.034176863729953766,
-0.03665423393249512,
0.04018041864037514,
0.01348087377846241,
0.0004170390893705189,
-0.07081301510334015,
0.059167563915252686,
-0.016699647530913353,
-0.08853434771299362,
-0.03676273301243782,
0.03584050014615059,
0.02654583752155304,
0.01279371976852417,
0.03829978406429291,
-0.014954637736082077,
0.026799000799655914,
0.0011335777817294002,
-0.028046727180480957,
0.0065279616974294186,
0.0626394972205162,
0.004778431728482246,
0.05276618152856827,
0.054357487708330154,
0.007124700583517551,
-0.002669502282515168,
0.01784791797399521,
0.04426717385649681,
0.023182401433587074,
0.023363230749964714,
-0.0019913900177925825,
0.04527982324361801,
0.028679631650447845,
0.01931264065206051,
0.012549599632620811,
-0.015885911881923676,
-0.003985040355473757,
0.005596687085926533,
-0.0117177814245224,
0.047630611807107925,
-0.009064101614058018,
0.0312655009329319,
-0.014394065365195274,
0.035171426832675934,
0.07005352526903152,
-0.004651850555092096,
0.04231421276926994,
0.02627459354698658,
0.0010284704621881247,
-0.01167257409542799,
-0.010063187219202518,
-0.052476853132247925,
-0.00048711072304286063,
0.026057597249746323,
-0.030325183644890785,
0.007061409763991833,
0.032748304307460785,
0.006008075550198555,
0.04459266737103462,
-0.0546468161046505,
-0.058986734598875046,
0.003526184242218733,
0.019258391112089157,
0.05518930405378342,
-0.0013517040060833097,
-0.01748625747859478,
-0.044014014303684235,
-0.009538780897855759,
0.02023487351834774,
-0.04231421276926994,
0.0034719351679086685,
0.004351221024990082,
-0.00015186890959739685,
0.02681708335876465,
0.03175374120473862,
0.03811895474791527,
0.05309167504310608,
-0.028860460966825485,
-0.027124494314193726,
0.02193467505276203,
-0.024231214076280594,
0.00590409804135561,
-0.042458873242139816,
-0.014412147924304008,
-0.017477216199040413,
0.01913180947303772,
0.0005252545233815908,
-0.037142474204301834,
0.026762833818793297,
0.011573117226362228,
0.021536847576498985,
-0.03231431543827057,
-0.05822724848985672,
-0.042278043925762177,
0.02851688489317894,
0.06462863087654114,
-0.032024987041950226,
-0.068281389772892,
-0.04104840010404587,
0.08361577242612839,
-0.02426738105714321,
-0.010759382508695126,
-0.02622034400701523,
-0.011112000793218613,
0.005442981608211994,
0.01357128843665123,
-0.01059663575142622,
-0.009692486375570297,
-0.014068570919334888,
0.008905875496566296,
-0.08412209898233414,
-0.0011075835209339857,
0.019800880923867226,
-0.0020004315301775932,
0.03631065785884857,
-0.03739563748240471,
-0.025424692779779434,
-0.013444707728922367,
0.016808144748210907,
-0.06459246575832367,
-0.018001623451709747,
0.031609077006578445,
0.01377924345433712,
-0.017106514424085617,
-0.014954637736082077,
-0.06386914104223251,
-0.06093969568610191,
0.0596015565097332,
-0.0565636120736599,
0.0036708482075482607,
0.05909522995352745,
0.03177182376384735,
0.020488034933805466,
0.046943459659814835,
0.07421261817216873,
0.04622013866901398,
-0.003517142729833722,
0.020451867952942848,
0.05996321514248848,
-0.0440501794219017,
-0.026166096329689026,
0.017649004235863686,
0.03641915321350098,
-0.004012164659798145,
-0.009276577271521091,
0.019601967185735703,
-0.006885100621730089,
-0.032802555710077286,
-0.004509447142481804,
-0.011310914531350136,
0.03450235724449158,
0.0031961696222424507,
-0.012911259196698666,
0.04115689918398857,
0.01673581264913082,
-0.01352608110755682,
0.00839955173432827,
-0.05030689388513565,
0.005239548161625862,
0.02262182906270027,
0.04828159883618355,
0.007169907912611961,
0.05359800159931183,
0.02403230220079422,
0.03681698068976402,
-0.09887782484292984,
0.012513433583080769,
-0.004434854723513126,
-0.05793792009353638,
0.027775481343269348,
-0.059167563915252686,
-0.03786579519510269,
-0.05153653770685196,
-0.02641925774514675,
-0.026889415457844734,
0.053308673202991486,
0.0036075576208531857,
0.10206042975187302,
0.029095541685819626,
-0.029276371002197266,
0.011663532815873623,
0.04665413126349449,
0.046256303787231445,
0.0058588907122612,
-0.04824543371796608,
-0.008313657715916634,
-0.018399449065327644,
0.012441101484000683,
-0.022079337388277054,
-0.03310996666550636,
0.08144581317901611,
0.03699781000614166,
-0.08036083728075027,
-0.005207902751863003,
-0.012025192379951477,
0.028119059279561043,
-0.013788284733891487,
-0.00603067921474576,
-0.055044639855623245,
-0.0029949962627142668,
-0.04672646149992943,
-0.04285670071840286,
-0.07905885577201843,
0.02292924001812935,
0.0031984299421310425,
-0.029638031497597694,
-0.023146234452724457,
0.014981762506067753,
-0.02681708335876465,
-0.025605522096157074,
0.043507687747478485,
-0.043146029114723206,
-0.04061440750956535,
-0.03942093253135681,
0.01240493543446064,
-0.00590409804135561,
0.004572737496346235,
0.045569151639938354,
-0.008530653081834316,
0.022368665784597397,
-0.028354138135910034,
0.01858931966125965,
0.057106100022792816,
-0.005714226979762316,
0.04339919239282608,
0.013987197540700436,
0.00990948174148798,
0.00896464567631483,
0.04951124265789986,
-0.0488964207470417,
0.026871332898736,
-0.008358865045011044,
0.03772113099694252,
0.022874990478157997,
0.10104778409004211,
-0.014611060731112957,
0.00022561363584827632,
-0.00771239772439003,
0.016157157719135284,
-0.0009035847033374012,
-0.0023372273426502943,
0.01348087377846241,
-0.0026288155931979418,
-0.0023869555443525314,
0.012260271236300468,
0.005583125166594982,
-0.05634661763906479,
-0.05016222968697548,
-0.0076265037059783936,
-0.008363385684788227,
-0.036690399050712585,
-0.06423079967498779,
0.023327065631747246,
0.0547553114593029,
0.026871332898736,
0.021591097116470337,
-0.007301009725779295,
-0.008860668167471886,
-0.03529800847172737,
-0.036907393485307693,
0.014611060731112957,
0.005922181066125631,
0.015506168827414513,
0.031157001852989197,
0.004120662808418274,
-0.007409507874399424,
-0.0054520233534276485,
-0.03370670601725578,
-0.029131706804037094,
-0.0018116901628673077,
0.0016116470796987414,
0.026166096329689026,
0.03811895474791527,
-0.041627056896686554,
0.020614614710211754,
-0.010678009130060673,
-0.052151359617710114,
-0.04079524055123329,
-0.028733881190419197,
-0.01638319529592991,
-0.002771219238638878,
0.038335952907800674,
-0.10589402914047241,
0.03949326276779175,
0.0005679191090166569,
0.01773037761449814,
0.03282063826918602,
-0.06791973114013672,
-0.004299232270568609,
-0.06517111510038376,
0.0389869399368763,
-0.019800880923867226,
0.04828159883618355,
-0.05461064726114273,
0.0054520233534276485,
0.0957675501704216,
0.009502614848315716,
0.07479127496480942,
-0.012332603335380554,
-0.022639911621809006,
0.012829885818064213,
0.036907393485307693,
0.02737765572965145,
0.062458667904138565,
-0.030270935967564583,
0.0181101206690073,
0.01245014276355505,
-0.04914958402514458,
0.003826814005151391,
-0.04911341890692711,
0.023001570254564285,
-0.025695936754345894,
-0.025207696482539177,
-0.024430127814412117,
0.027775481343269348,
0.04036124795675278,
-0.013607454486191273,
-0.03779346123337746,
-0.02641925774514675,
0.02036145329475403,
0.005339004565030336,
-0.03090384043753147,
-0.03996342048048973,
0.007631024345755577,
-0.01629277877509594,
0.02544277533888817,
0.027685066685080528,
-0.07652723789215088,
0.0023440083023160696,
0.012097524479031563,
-0.0401080846786499,
-0.06484562158584595,
0.0753699243068695,
0.02133793570101261,
0.049547407776117325,
0.04669029638171196,
-0.00871148332953453,
-0.014638185501098633,
0.004371564369648695,
0.035948995500802994,
-0.024339713156223297,
-0.02426738105714321,
-0.027576569467782974,
0.012115607038140297,
-0.024158881977200508,
0.010741299949586391,
0.02179001085460186,
-0.012377810664474964,
-0.011645449325442314,
0.021844258531928062,
-0.025334278121590614,
-0.00036137737333774567,
-0.030542179942131042,
-0.03793812543153763,
-0.009394116699695587,
-0.04093990474939346,
-0.010108394548296928,
-0.009810025803744793,
-0.002362091327086091,
-0.018643569201231003,
-0.000983827980235219,
0.03721480444073677,
0.0005871322937309742,
-0.0633266493678093,
0.018788233399391174,
-0.07037901878356934,
0.027902062982320786,
-0.046111639589071274,
-0.01889673061668873,
0.009810025803744793,
-0.02869771420955658,
0.0343034453690052,
0.035352256149053574,
-0.0008306876407004893,
0.000696760427672416,
0.02645542286336422,
0.007549650967121124,
-0.01716076396405697,
0.028860460966825485,
-0.022603744640946388,
0.06086736544966698,
-0.031645242124795914,
-0.02974652871489525,
0.0000659040451864712,
-0.015885911881923676,
0.046437133103609085,
0.02678091637790203,
-0.022133586928248405,
0.012224105186760426,
-0.000188317455467768,
-0.020524200052022934,
-0.004129704087972641,
-0.018073955550789833,
-0.016536900773644447,
0.004642809275537729,
-0.013770201243460178,
0.0957675501704216,
-0.013236753642559052,
0.05395966023206711,
0.033616289496421814,
0.01283892709761858,
-0.0047422656789422035,
0.02092202566564083,
-0.06437546759843826,
-0.008973686955869198,
-0.006383297499269247,
-0.03790196031332016,
-0.11428453773260117,
-0.02283882349729538,
-0.06010787934064865,
-0.026762833818793297,
0.056925270706415176,
-0.029692279174923897,
-0.039854925125837326,
0.008508049882948399
]
|
41,653 | pyglove.core.symbolic.base | lt | Returns True if a value is symbolically less than the other value.
Symbolic values are comparable by their symbolic representations. For common
types such as numbers and string, symbolic comparison returns the same value
as value comparisons. For example::
assert pg.lt(False, True) == Flase < True
assert pg.lt(0.1, 1) == 0.1 < 1
assert pg.lt('a', 'ab') == 'a' < 'ab'
However, symbolic comparison can be applied on hierarchical values, for
example::
assert pg.lt(['a'], ['a', 'b'])
assert pg.lt(['a', 'b', 'c'], ['b'])
assert pg.lt({'x': 1}, {'x': 2})
assert pg.lt({'x': 1}, {'y': 1})
assert pg.lt(A(x=1), A(x=2))
Also, symbolic values of different types can be compared, for example::
assert pg.lt(pg.MISSING_VALUE, None)
assert pg.lt(None, 1)
assert pg.lt(1, 'abc')
assert pg.lt('abc', [])
assert pg.lt([], {})
assert pg.lt([], A(x=1))
The high-level idea is that a value with lower information entropy is less
than a value with higher information entropy. As a result, we know that
`pg.MISSING_VALUE` is the smallest among all values.
The order of symbolic representation are defined by the following rules:
1) If x and y are comparable by their values, they will be compared using
operator <. (e.g. bool, int, float, str)
2) If x and y are not directly comparable and are different in their types,
they will be compared based on their types. The order of different types
are: pg.MISSING_VALUE, NoneType, bool, int, float, str, list, tuple, set,
dict, functions/classes. When different functions/classes compare, their
order is determined by their qualified name.
3) If x and y are of the same type, which are symbolic containers (e.g. list,
dict, pg.Symbolic objects), their order will be determined by the order of
their first sub-nodes which are different. Therefore ['b'] is greater than
['a', 'b'], though the later have 2 elements.
4) Non-symbolic classes can define method `sym_lt` to enable symbolic
comparison.
Args:
left: The left-hand value to compare.
right: The right-hand value to compare.
Returns:
True if the left value is symbolically less than the right value.
| def lt(left: Any, right: Any) -> bool:
"""Returns True if a value is symbolically less than the other value.
Symbolic values are comparable by their symbolic representations. For common
types such as numbers and string, symbolic comparison returns the same value
as value comparisons. For example::
assert pg.lt(False, True) == Flase < True
assert pg.lt(0.1, 1) == 0.1 < 1
assert pg.lt('a', 'ab') == 'a' < 'ab'
However, symbolic comparison can be applied on hierarchical values, for
example::
assert pg.lt(['a'], ['a', 'b'])
assert pg.lt(['a', 'b', 'c'], ['b'])
assert pg.lt({'x': 1}, {'x': 2})
assert pg.lt({'x': 1}, {'y': 1})
assert pg.lt(A(x=1), A(x=2))
Also, symbolic values of different types can be compared, for example::
assert pg.lt(pg.MISSING_VALUE, None)
assert pg.lt(None, 1)
assert pg.lt(1, 'abc')
assert pg.lt('abc', [])
assert pg.lt([], {})
assert pg.lt([], A(x=1))
The high-level idea is that a value with lower information entropy is less
than a value with higher information entropy. As a result, we know that
`pg.MISSING_VALUE` is the smallest among all values.
The order of symbolic representation are defined by the following rules:
1) If x and y are comparable by their values, they will be compared using
operator <. (e.g. bool, int, float, str)
2) If x and y are not directly comparable and are different in their types,
they will be compared based on their types. The order of different types
are: pg.MISSING_VALUE, NoneType, bool, int, float, str, list, tuple, set,
dict, functions/classes. When different functions/classes compare, their
order is determined by their qualified name.
3) If x and y are of the same type, which are symbolic containers (e.g. list,
dict, pg.Symbolic objects), their order will be determined by the order of
their first sub-nodes which are different. Therefore ['b'] is greater than
['a', 'b'], though the later have 2 elements.
4) Non-symbolic classes can define method `sym_lt` to enable symbolic
comparison.
Args:
left: The left-hand value to compare.
right: The right-hand value to compare.
Returns:
True if the left value is symbolically less than the right value.
"""
# A fast type check can eliminate most
if type(left) is not type(right):
tol = _type_order(left)
tor = _type_order(right)
# When tol == tor, this means different types are treated as same symbols.
# E.g. list and pg.List.
if tol != tor:
return tol < tor
# Most symbolic nodes are leaf, which are primitive types, therefore
# we detect such types to make `lt` to run faster.
if isinstance(left, (int, float, bool, str)):
return left < right
elif isinstance(left, list):
min_len = min(len(left), len(right))
for i in range(min_len):
l, r = left[i], right[i]
if not eq(l, r):
return lt(l, r)
# `left` and `right` are equal so far, so `left` is less than `right`
# only when left has a smaller length.
return len(left) < len(right)
elif isinstance(left, dict):
lkeys = list(left.keys())
rkeys = list(right.keys())
min_len = min(len(lkeys), len(rkeys))
for i in range(min_len):
kl, kr = lkeys[i], rkeys[i]
if kl == kr:
if not eq(left[kl], right[kr]):
return lt(left[kl], right[kr])
else:
return kl < kr
# `left` and `right` are equal so far, so `left is less than `right`
# only when left has fewer keys.
return len(lkeys) < len(rkeys)
elif hasattr(left, 'sym_lt'):
return left.sym_lt(right)
return left < right
| (left: Any, right: Any) -> bool | [
0.027678096666932106,
-0.007579450961202383,
-0.003117667743936181,
0.025174258276820183,
0.028454480692744255,
0.009719359688460827,
-0.013353808782994747,
-0.0019336818950250745,
0.016410822048783302,
-0.0676230639219284,
0.04091544821858406,
-0.030104298144578934,
0.06948638707399368,
0.011490486562252045,
-0.06971929967403412,
-0.02410672977566719,
-0.028551530092954636,
0.022592781111598015,
-0.023679718375205994,
-0.021467022597789764,
-0.025873003527522087,
0.032045260071754456,
0.020185990259051323,
0.01768215000629425,
0.009792146272957325,
0.03495669737458229,
0.0505814328789711,
0.010811150074005127,
-0.05260002985596657,
0.04537965729832649,
0.0018026670441031456,
-0.011674877256155014,
0.0113060949370265,
-0.0687488242983818,
-0.001185199012979865,
-0.049222759902477264,
0.005662752315402031,
0.0008145968895405531,
-0.06700196117162704,
0.0027901306748390198,
-0.029929611831903458,
-0.030492490157485008,
-0.021602891385555267,
-0.054929181933403015,
-0.06331413239240646,
-0.0381786935031414,
-0.01580912433564663,
-0.043826889246702194,
0.03676179423928261,
-0.029929611831903458,
0.02626119554042816,
-0.08703266829252243,
0.012887977994978428,
0.012063069269061089,
-0.07309657335281372,
0.02996843121945858,
-0.009496149607002735,
0.012752111069858074,
-0.03645123913884163,
-0.008166591636836529,
0.02554303966462612,
0.022534551098942757,
-0.02538776397705078,
-0.014207830652594566,
-0.00601212540641427,
-0.02082650735974312,
-0.05275530740618706,
-0.020535362884402275,
-0.050814345479011536,
-0.016546688973903656,
-0.04530201852321625,
0.009132219478487968,
-0.024999571964144707,
0.000628992507699877,
-0.052871763706207275,
0.017827723175287247,
-0.013780820183455944,
-0.021117649972438812,
0.017827723175287247,
-0.05139663442969322,
0.025834184139966965,
-0.0003881921002175659,
0.029832562431693077,
0.005201774183660746,
-0.017788903787732124,
0.032414041459560394,
0.06754542887210846,
0.0646728053689003,
0.03654828667640686,
0.002998783951625228,
-0.04079899191856384,
0.028143927454948425,
0.017847131937742233,
-0.017235729843378067,
0.040682531893253326,
0.020166579633951187,
0.04363279417157173,
0.0014156880788505077,
-0.0029769481625407934,
-0.013635247945785522,
0.08726558834314346,
0.017235729843378067,
-0.021272927522659302,
0.04064371436834335,
0.013567314483225346,
0.005604523699730635,
-0.006817623972892761,
-0.021719347685575485,
-0.01475130021572113,
-0.03152119740843773,
-0.09743621945381165,
-0.04308932274580002,
0.014042849652469158,
-0.022146359086036682,
0.0386057049036026,
0.02837684378027916,
0.004512733314186335,
0.002998783951625228,
0.0331127867102623,
-0.024456102401018143,
-0.0013999177608639002,
0.015071558766067028,
0.029832562431693077,
0.005031940061599016,
0.0005932060885243118,
0.014343698509037495,
0.09114750474691391,
0.022437503561377525,
-0.09673747420310974,
0.03206466883420944,
0.11459431052207947,
0.042274121195077896,
-0.01511037815362215,
0.08773141354322433,
-0.01019974797964096,
-0.03319042548537254,
0.000034952452551806346,
0.08516934514045715,
0.05834527313709259,
-0.029289094731211662,
0.013974916189908981,
-0.05997567996382713,
-0.04246821627020836,
-0.001803880208171904,
-0.03177352249622345,
0.0018232897855341434,
-0.06459516286849976,
0.01580912433564663,
0.05166836827993393,
0.07829834520816803,
0.014547498896718025,
-0.031171826645731926,
0.028357433155179024,
-0.007356240414083004,
-0.02728990465402603,
-0.023097429424524307,
-0.023116840049624443,
-0.055744387209415436,
-0.012111593969166279,
0.003384549869224429,
-0.003059439128264785,
-0.039187993854284286,
-0.025310125201940536,
-0.055239737033843994,
-0.014722185209393501,
-0.023990271613001823,
0.0018536172574386,
-0.02672702632844448,
0.00558996619656682,
0.04933921620249748,
0.05337641388177872,
-0.017517168074846268,
-0.020418904721736908,
-0.02934732288122177,
0.0007678925176151097,
-0.0402943417429924,
0.001368377124890685,
0.03231699392199516,
-0.0027173447888344526,
0.01749775931239128,
0.030414851382374763,
-0.006458546034991741,
-0.05927693471312523,
-0.020166579633951187,
-0.0016886356752365828,
0.025834184139966965,
-0.0011542650172486901,
-0.01706104353070259,
-0.0043889968656003475,
0.045573752373456955,
-0.08547990024089813,
-0.0331127867102623,
0.0017966015730053186,
0.025232486426830292,
0.03099714033305645,
0.023116840049624443,
0.010374434292316437,
0.02179698646068573,
-0.026862893253564835,
0.09052640199661255,
-0.007550336420536041,
0.0007794169359840453,
0.012247460894286633,
0.001249493332579732,
0.028105108067393303,
-0.04642777517437935,
-0.04165301471948624,
-0.001414475031197071,
0.013082074001431465,
-0.04056607559323311,
-0.043361056596040726,
-0.059548668563365936,
-0.031171826645731926,
0.04708770290017128,
-0.021447613835334778,
0.033035147935152054,
-0.007914266549050808,
0.0050901691429317,
-0.00831216387450695,
-0.0763573870062828,
0.07317420840263367,
-0.015343292616307735,
-0.0023861683439463377,
-0.0390327163040638,
0.06983575969934464,
-0.013014140538871288,
-0.0018196505261585116,
0.035558395087718964,
-0.007962790317833424,
0.023175068199634552,
0.06898173689842224,
-0.021855216473340988,
0.04666069149971008,
-0.022961562499403954,
0.01774038001894951,
-0.03150178864598274,
0.016847537830471992,
0.027639277279376984,
0.0013404758647084236,
-0.0054492466151714325,
-0.020787687972187996,
0.07457170635461807,
-0.020942963659763336,
-0.004908204078674316,
0.006133435294032097,
-0.05881110578775406,
-0.013450856320559978,
-0.009855227544903755,
-0.03813987597823143,
0.006827328819781542,
-0.040371980518102646,
-0.06595383584499359,
0.024766655638813972,
-0.03121064603328705,
-0.016828127205371857,
-0.011684582568705082,
-0.02878444455564022,
-0.025620678439736366,
0.019564881920814514,
0.008656684309244156,
0.016731079667806625,
0.024339644238352776,
-0.02600887045264244,
0.015692666172981262,
0.03825633227825165,
-0.026824073866009712,
0.01596440002322197,
0.029327914118766785,
0.011422553099691868,
0.03124946542084217,
-0.06855472922325134,
-0.03627655282616615,
-0.04918393865227699,
0.060169775038957596,
0.007836627773940563,
0.032879870384931564,
0.012509490363299847,
0.02051595225930214,
0.014974510297179222,
-0.036781203001737595,
-0.031695883721113205,
-0.019817207008600235,
-0.07488225400447845,
-0.00905943289399147,
-0.06855472922325134,
0.026358243077993393,
-0.04867928847670555,
-0.11210987716913223,
0.0042021796107292175,
-0.048135820776224136,
0.043671611696481705,
0.03511197492480278,
-0.005798619706183672,
0.006885557435452938,
0.0532599575817585,
0.013528495095670223,
0.0032583875581622124,
-0.0348014235496521,
0.05124135687947273,
0.042274121195077896,
0.06673022359609604,
-0.01418842189013958,
0.08027812838554382,
-0.0021156470756977797,
0.011247865855693817,
0.00455397879704833,
-0.005167807452380657,
0.020904144272208214,
-0.035849541425704956,
0.011461371555924416,
-0.06296475976705551,
0.02076827734708786,
-0.004609781317412853,
-0.014450451359152794,
0.04553493484854698,
-0.0115196006372571,
-0.011257571168243885,
-0.017536578699946404,
0.003952281083911657,
0.04871810972690582,
0.007560041267424822,
0.06416815519332886,
-0.04363279417157173,
0.03165706619620323,
-0.02098178304731846,
-0.034005627036094666,
-0.004197326954454184,
-0.01473189052194357,
0.027484001591801643,
0.0006399104022420943,
0.027930421754717827,
0.03845042735338211,
0.08648920059204102,
0.005502623040229082,
0.000578952138312161,
0.05376460775732994,
0.03848924860358238,
0.05896637961268425,
-0.04887338727712631,
-0.04642777517437935,
0.03315160423517227,
-0.018565287813544273,
0.020438313484191895,
-0.030240165069699287,
0.05166836827993393,
-0.016071153804659843,
0.0033772713504731655,
-0.015702370554208755,
0.0020574182271957397,
0.04980504885315895,
-0.04658305272459984,
0.018157685175538063,
0.011985431425273418,
-0.03342334181070328,
0.026513520628213882,
-0.004845122806727886,
-0.01287827268242836,
0.009272938594222069,
0.027619868516921997,
0.05489036440849304,
0.10853851586580276,
-0.004527290351688862,
-0.06277066469192505,
-0.0001951575104612857,
-0.01347026601433754,
-0.036315370351076126,
0.014964805915951729,
0.01668255589902401,
-0.058733467012643814,
-0.005691866856068373,
-0.007215520832687616,
-0.04739825427532196,
-0.0009255955810658634,
-0.045418474823236465,
-0.042274121195077896,
0.021467022597789764,
0.01487746275961399,
0.031133007258176804,
-0.016177905723452568,
-0.006264450028538704,
0.07981229573488235,
0.025018980726599693,
0.023213887587189674,
0.035500168800354004,
0.0005465017165988684,
-0.016731079667806625,
-0.0033457307144999504,
0.001691061886958778,
0.06315885484218597,
-0.018012113869190216,
-0.03402503952383995,
-0.01979779824614525,
0.007856037467718124,
0.04064371436834335,
-0.005725833587348461,
0.0020404348615556955,
0.024533741176128387,
-0.01979779824614525,
-0.050969623029232025,
-0.04064371436834335,
0.05690896138548851,
0.0008340064669027925,
0.013062664307653904,
-0.01298502553254366,
0.012295984663069248,
0.02791101299226284,
0.039246220141649246,
0.03810105472803116,
-0.048291098326444626,
0.08610101044178009,
-0.051784828305244446,
0.045263200998306274,
-0.062071919441223145,
-0.034879062324762344,
-0.03231699392199516,
-0.031230054795742035,
0.019438719376921654,
0.09006056934595108,
0.04025552049279213,
0.0018985019996762276,
0.03388917073607445,
-0.07402823120355606,
-0.035131387412548065,
0.030725404620170593,
0.015255949459969997,
0.016352592036128044,
0.011344914324581623,
-0.028862083330750465,
-0.05566674843430519,
0.06195545941591263,
0.01937078684568405,
0.041458915919065475,
0.03643183037638664,
0.006298416759818792,
0.03654828667640686,
0.000801859307102859,
-0.0062741548754274845,
-0.028415661305189133,
-0.01280063483864069,
-0.02245691418647766,
0.02950260043144226,
0.01983661577105522,
0.025717727839946747,
0.01554709393531084,
-0.0016316199908033013,
0.021098241209983826,
0.025931233540177345,
-0.005424984730780125,
-0.0025644940324127674,
-0.010626758448779583,
-0.041924748569726944,
-0.02404850162565708,
0.07076741755008698,
0.008040429092943668,
-0.056831322610378265,
-0.02734813466668129,
-0.020787687972187996,
-0.014528089202940464,
-0.06327531486749649,
0.06552682816982269,
0.010170632973313332,
0.007715317886322737,
-0.00703112967312336,
0.016255544498562813,
-0.05194010213017464,
0.07375650107860565,
-0.023213887587189674,
0.027484001591801643,
-0.02189403399825096,
0.021874625235795975,
0.010908198542892933,
0.008365539833903313,
-0.014576613903045654,
0.01820620894432068,
-0.009248676709830761,
0.06909819692373276,
-0.04471972957253456,
-0.01347026601433754,
-0.023660309612751007,
-0.05815117806196213,
-0.005905372556298971,
-0.03253049775958061,
0.05566674843430519,
0.018235323950648308,
0.07352358847856522,
-0.01586735248565674,
-0.05489036440849304,
0.05943221226334572,
-0.04076017066836357,
-0.026358243077993393,
-0.03270518407225609,
-0.041769471019506454,
0.012528900057077408,
0.05632667616009712,
-0.0031152416486293077,
0.016478754580020905,
-0.019254328683018684,
-0.01718720607459545,
0.0017929623136296868,
-0.0045685358345508575,
-0.012703586369752884,
0.057180698961019516,
-0.009753326885402203,
0.04627249762415886,
0.11164405196905136,
0.03260813653469086,
0.05314349755644798,
0.009467034600675106,
-0.024844294413924217,
0.011267275549471378,
-0.013674067333340645,
-0.0597427636384964,
0.09075931459665298,
0.008287901058793068,
0.003753332421183586,
0.023563260212540627,
0.06164490804076195,
-0.003651431994512677,
0.0001758995495038107,
-0.04173064976930618,
0.03134651109576225,
-0.059238117188215256,
0.011480781249701977,
-0.06921464949846268,
0.0027707212138921022,
-0.021447613835334778,
-0.003265666076913476,
-0.023505032062530518,
0.03856688737869263,
-0.020477132871747017,
0.04390452802181244,
0.018264438956975937,
0.003733922727406025,
-0.011092589236795902,
-0.024494921788573265,
0.04996032267808914,
-0.03753817826509476,
0.02775573544204235,
0.03064776584506035,
0.021564071998000145,
0.028570938855409622,
-0.012587129138410091,
0.0612955316901207,
0.020593591034412384,
0.02688230387866497,
0.005002825986593962,
-0.04615604132413864,
0.019875435158610344,
-0.030764224007725716,
-0.014615432359278202,
-0.004221589304506779,
-0.02107883058488369,
0.031016549095511436,
-0.016265248879790306,
-0.05624903738498688,
0.0015406374586746097,
0.0009104317869059741,
0.03404444828629494,
0.06711841374635696,
-0.007293159142136574,
-0.0014169012429192662,
-0.005594818852841854,
-0.007016572169959545,
-0.0729801133275032,
-0.029172636568546295,
-0.043671611696481705,
-0.007928824052214622,
-0.01244155690073967,
0.012412442825734615,
0.0302207563072443,
0.04169183224439621,
0.041458915919065475,
0.025407172739505768,
-0.010141518898308277,
0.01041325367987156,
-0.011985431425273418,
-0.04281758889555931,
0.037654634565114975,
-0.05993686243891716,
-0.06812771409749985,
0.028512710705399513,
0.019467834383249283,
-0.016818422824144363,
0.024553149938583374,
-0.0012822470162063837,
-0.020088940858840942,
0.0046607316471636295,
0.05865582823753357,
-0.031598836183547974,
-0.03938208892941475,
-0.07220373302698135,
-0.016672851517796516,
0.030046068131923676,
-0.02744518220424652,
0.009661130607128143,
0.01758510246872902,
-0.005662752315402031,
0.02725108526647091,
-0.008714912459254265,
-0.009452478028833866,
-0.005201774183660746,
0.019011707976460457,
0.012849158607423306,
-0.06475044041872025,
0.032724592834711075,
-0.023175068199634552,
0.05073670670390129,
-0.008336425758898258,
-0.0064536938443779945,
-0.039246220141649246,
0.05687014386057854,
-0.009966832585632801,
0.012121298350393772,
-0.04704888164997101,
0.02045772410929203,
-0.0034403526224195957,
0.03994496911764145,
-0.02816333808004856,
0.04440917819738388,
-0.03633478283882141,
-0.04708770290017128,
0.004777188878506422,
0.000603820662945509,
0.02872621640563011,
0.014382517896592617,
-0.010102699510753155,
0.0510084442794323,
0.021719347685575485,
0.01269388198852539,
-0.07259192317724228,
0.009112809784710407,
-0.03767404332756996,
0.08245200663805008,
-0.035228434950113297,
-0.05228947848081589,
-0.0669243186712265,
0.03414149582386017,
-0.034316182136535645,
-0.011218751780688763,
0.062382470816373825,
-0.08874071389436722,
0.01714838668704033,
-0.043982166796922684,
0.01811886578798294,
0.016857242211699486,
0.015974104404449463,
-0.004291948862373829,
-0.002411643508821726,
0.05787944421172142,
0.021447613835334778,
-0.006778804585337639,
0.04910629987716675,
0.006769099738448858,
-0.032006438821554184,
-0.03309337794780731,
0.05562792718410492,
-0.002297612139955163,
-0.06187782064080238,
-0.00801616720855236,
-0.02133115567266941,
0.02082650735974312,
-0.012189231812953949,
-0.0012088544899597764,
0.03777109086513519,
-0.02878444455564022,
0.016915470361709595,
0.03319042548537254,
0.02544599212706089,
0.02055477164685726,
-0.009030318818986416,
-0.04402098432183266,
-0.004820860922336578,
0.03517020493745804,
-0.061761364340782166,
-0.01439222227782011,
0.01868174597620964,
-0.009835817851126194,
0.009753326885402203,
-0.01213100366294384,
-0.027115218341350555,
0.0034815978724509478,
0.03388917073607445,
-0.03707234561443329,
-0.015469455160200596,
-0.03319042548537254,
-0.003430647775530815,
-0.01714838668704033,
0.038120463490486145,
-0.005798619706183672,
0.0006192877190187573,
-0.017323072999715805,
-0.020127760246396065,
0.03714998438954353,
-0.028338024392724037,
-0.07849244028329849,
-0.04316696152091026,
-0.015731485560536385,
0.02142820507287979,
0.03975087031722069,
-0.046505413949489594,
0.007336830720305443,
-0.04332223907113075,
-0.00014784660015720874,
0.0021860068663954735,
0.014654251746833324,
0.005182364489883184,
-0.022223997861146927,
-0.008331572636961937,
0.023427393287420273,
-0.006089763715863228,
-0.03912976384162903,
-0.03716939315199852,
0.0028580643702298403,
-0.05710306018590927,
0.008598455227911472,
-0.01699310913681984,
-0.0018803054699674249,
0.03963441401720047,
-0.0026275753043591976,
0.032879870384931564,
0.0005974519299343228,
-0.03386976197361946,
0.07468815892934799,
0.002344922861084342,
0.003166191978380084,
0.06839945167303085,
0.027833374217152596,
-0.059859223663806915,
-0.03144356235861778,
-0.0041148364543914795,
0.008414063602685928,
0.07464934140443802,
0.008714912459254265,
0.04437035694718361,
-0.014421336352825165,
-0.0033991071395576,
-0.0071912589482963085,
-0.02494134195148945,
0.060790885239839554,
0.0745328813791275,
0.04076017066836357,
0.02076827734708786,
0.00388677348382771,
-0.0753869041800499,
0.0624212920665741,
-0.01195631641894579,
-0.004602502565830946,
0.02806628867983818,
-0.0016134234610944986,
0.015226835384964943,
0.03002665936946869,
-0.02210753969848156,
-0.0034330738708376884,
-0.053065862506628036,
0.014566908590495586,
0.09013820439577103,
-0.05077552795410156,
-0.004379292018711567,
-0.0386057049036026,
-0.03763522580265999,
-0.053337596356868744,
0.012732701376080513,
-0.07189317792654037,
0.04755353182554245,
-0.0033069115597754717,
-0.023873815312981606,
-0.025814775377511978,
0.06482808291912079
]
|
41,654 | pyglove.core.hyper.categorical | manyof | N choose K.
Example::
@pg.members([
('x', pg.typing.Int())
])
class A(pg.Object):
pass
# Chooses 2 distinct candidates.
v = pg.manyof(2, [1, 2, 3])
# Chooses 2 non-distinct candidates.
v = pg.manyof(2, [1, 2, 3], distinct=False)
# Chooses 2 distinct candidates sorted by their indices.
v = pg.manyof(2, [1, 2, 3], sorted=True)
# A complex type as candidate.
v1 = pg.manyof(2, ['a', {'x': 1}, A(1)])
# A hierarchical categorical choice:
v2 = pg.manyof(2, [
'foo',
'bar',
A(pg.oneof([1, 2, 3]))
])
.. note::
Under symbolic mode (by default), `pg.manyof` returns a ``pg.hyper.ManyOf``
object. Under dynamic evaluation mode, which is called under the context of
:meth:`pyglove.hyper.DynamicEvaluationContext.collect` or
:meth:`pyglove.hyper.DynamicEvaluationContext.apply`, it evaluates to
a concrete candidate value.
To use conditional search space in dynamic evaluate mode, the candidate
should be wrapped with a `lambda` function, which is not necessary under
symbolic mode. For example::
pg.manyof(2, [
lambda: pg.oneof([0, 1], name='sub_a'),
lambda: pg.floatv(0.0, 1.0, name='sub_b'),
lambda: pg.manyof(2, ['a', 'b', 'c'], name='sub_c')
], name='root')
See also:
* :class:`pyglove.hyper.ManyOf`
* :func:`pyglove.manyof`
* :func:`pyglove.floatv`
* :func:`pyglove.permutate`
* :func:`pyglove.evolve`
Args:
k: number of choices to make. Should be no larger than the length of
`candidates` unless `choice_distinct` is set to False,
candidates: Candidates to select from. Items of candidate can be any type,
therefore it can have nested hyper primitives, which forms a hierarchical
search space.
distinct: If True, each choice needs to be unique.
sorted: If True, choices are sorted by their indices in the
candidates.
name: A name that can be used to identify a decision point in the search
space. This is needed when the code to instantiate the same hyper
primitive may be called multiple times under a
`pg.DynamicEvaluationContext.collect` context or a
`pg.DynamicEvaluationContext.apply` context.
hints: An optional value which acts as a hint for the controller.
**kwargs: Keyword arguments for backward compatibility.
`choices_distinct`: Old name for `distinct`.
`choices_sorted`: Old name for `sorted`.
Returns:
In symbolic mode, this function returns a `Choices`.
In dynamic evaluate mode, this function returns a list of items in
`candidates`.
If evaluated under a `pg.DynamicEvaluationContext.apply` scope,
this function will return a list of selected candidates.
If evaluated under a `pg.DynamicEvaluationContext.collect`
scope, it will return a list of the first valid combination from the
`candidates`. For example::
# Evaluates to [0, 1, 2].
manyof(3, range(5))
# Evaluates to [0, 0, 0].
manyof(3, range(5), distinct=False)
| def manyof(k: int,
candidates: Iterable[Any],
distinct: bool = True,
sorted: bool = False, # pylint: disable=redefined-builtin
*,
name: Optional[str] = None,
hints: Optional[Any] = None,
**kwargs) -> Any:
"""N choose K.
Example::
@pg.members([
('x', pg.typing.Int())
])
class A(pg.Object):
pass
# Chooses 2 distinct candidates.
v = pg.manyof(2, [1, 2, 3])
# Chooses 2 non-distinct candidates.
v = pg.manyof(2, [1, 2, 3], distinct=False)
# Chooses 2 distinct candidates sorted by their indices.
v = pg.manyof(2, [1, 2, 3], sorted=True)
# A complex type as candidate.
v1 = pg.manyof(2, ['a', {'x': 1}, A(1)])
# A hierarchical categorical choice:
v2 = pg.manyof(2, [
'foo',
'bar',
A(pg.oneof([1, 2, 3]))
])
.. note::
Under symbolic mode (by default), `pg.manyof` returns a ``pg.hyper.ManyOf``
object. Under dynamic evaluation mode, which is called under the context of
:meth:`pyglove.hyper.DynamicEvaluationContext.collect` or
:meth:`pyglove.hyper.DynamicEvaluationContext.apply`, it evaluates to
a concrete candidate value.
To use conditional search space in dynamic evaluate mode, the candidate
should be wrapped with a `lambda` function, which is not necessary under
symbolic mode. For example::
pg.manyof(2, [
lambda: pg.oneof([0, 1], name='sub_a'),
lambda: pg.floatv(0.0, 1.0, name='sub_b'),
lambda: pg.manyof(2, ['a', 'b', 'c'], name='sub_c')
], name='root')
See also:
* :class:`pyglove.hyper.ManyOf`
* :func:`pyglove.manyof`
* :func:`pyglove.floatv`
* :func:`pyglove.permutate`
* :func:`pyglove.evolve`
Args:
k: number of choices to make. Should be no larger than the length of
`candidates` unless `choice_distinct` is set to False,
candidates: Candidates to select from. Items of candidate can be any type,
therefore it can have nested hyper primitives, which forms a hierarchical
search space.
distinct: If True, each choice needs to be unique.
sorted: If True, choices are sorted by their indices in the
candidates.
name: A name that can be used to identify a decision point in the search
space. This is needed when the code to instantiate the same hyper
primitive may be called multiple times under a
`pg.DynamicEvaluationContext.collect` context or a
`pg.DynamicEvaluationContext.apply` context.
hints: An optional value which acts as a hint for the controller.
**kwargs: Keyword arguments for backward compatibility.
`choices_distinct`: Old name for `distinct`.
`choices_sorted`: Old name for `sorted`.
Returns:
In symbolic mode, this function returns a `Choices`.
In dynamic evaluate mode, this function returns a list of items in
`candidates`.
If evaluated under a `pg.DynamicEvaluationContext.apply` scope,
this function will return a list of selected candidates.
If evaluated under a `pg.DynamicEvaluationContext.collect`
scope, it will return a list of the first valid combination from the
`candidates`. For example::
# Evaluates to [0, 1, 2].
manyof(3, range(5))
# Evaluates to [0, 0, 0].
manyof(3, range(5), distinct=False)
"""
choices_distinct = kwargs.pop('choices_distinct', distinct)
choices_sorted = kwargs.pop('choices_sorted', sorted)
return ManyOf(
num_choices=k,
candidates=list(candidates),
choices_distinct=choices_distinct,
choices_sorted=choices_sorted,
name=name,
hints=hints)
| (k: int, candidates: Iterable[Any], distinct: bool = True, sorted: bool = False, *, name: Optional[str] = None, hints: Optional[Any] = None, **kwargs) -> Any | [
0.03538806363940239,
-0.05019666627049446,
-0.10266254842281342,
-0.04280214384198189,
-0.016715919598937035,
0.027856606990098953,
0.03302103281021118,
-0.06651155650615692,
0.0067000617273151875,
-0.010348415933549404,
-0.02619381807744503,
0.06748966872692108,
-0.016285551711916924,
0.008103650994598866,
0.014994444325566292,
-0.02392459847033024,
0.08169184625148773,
-0.026839369907975197,
0.037735529243946075,
0.06713755428791046,
0.0221639983355999,
0.0034771852660924196,
-0.03847889229655266,
-0.019210103899240494,
0.02942158468067646,
-0.013664213009178638,
0.06162100285291672,
0.02996932715177536,
-0.07852276414632797,
0.017576657235622406,
-0.04014168307185173,
0.01410436350852251,
0.0311821848154068,
0.014965101145207882,
-0.05215288698673248,
-0.020383836701512337,
0.033529650419950485,
0.06342072784900665,
0.03208204731345177,
-0.01422173622995615,
0.08583903312683105,
-0.048279568552970886,
-0.002802288392558694,
-0.029225962236523628,
-0.027308864519000053,
0.005898010451346636,
0.035544559359550476,
0.09014272689819336,
-0.013419684953987598,
-0.01899491809308529,
-0.0437411330640316,
-0.02856084704399109,
-0.019092729315161705,
-0.04890555888414383,
-0.0155910924077034,
0.04198053106665611,
-0.03732472285628319,
0.004963914398103952,
0.025352641940116882,
0.03282541036605835,
-0.06052551791071892,
0.017508190125226974,
0.03695303946733475,
-0.0030052466318011284,
-0.06248174235224724,
-0.040532927960157394,
-0.007076634094119072,
-0.014906413853168488,
-0.062207870185375214,
0.009957171976566315,
-0.015141161158680916,
0.006827216129750013,
0.016412705183029175,
0.060016900300979614,
-0.01005498319864273,
0.012480698525905609,
0.012862161733210087,
0.058491047471761703,
0.025078769773244858,
-0.00894971750676632,
0.022085750475525856,
-0.01644204929471016,
-0.07371045649051666,
-0.11197416484355927,
0.0063675036653876305,
0.050587911158800125,
0.008137884549796581,
-0.02576344832777977,
0.04792744666337967,
0.007565689738839865,
0.005531218834221363,
-0.0018315131310373545,
0.01607036590576172,
0.02449190430343151,
-0.01300887856632471,
-0.001492842216975987,
-0.026409002020955086,
-0.009125777520239353,
-0.008142775855958462,
-0.012510041706264019,
-0.026663310825824738,
-0.019141634926199913,
-0.011394995264708996,
0.017870090901851654,
0.024922272190451622,
-0.053091876208782196,
-0.04225440323352814,
0.03002801351249218,
0.016109490767121315,
-0.040728550404310226,
-0.0503140389919281,
0.06541607528924942,
0.02795441634953022,
0.04487574100494385,
-0.05336574465036392,
0.022496556863188744,
-0.013664213009178638,
-0.027387112379074097,
-0.03552499786019325,
0.005594796035438776,
-0.08145710080862045,
0.019630691036581993,
0.0009096433641389012,
-0.04890555888414383,
-0.032923221588134766,
-0.006553344894200563,
0.017371254041790962,
-0.008871468715369701,
-0.03587711602449417,
-0.0016371136298403144,
0.038772325962781906,
0.03491856902837753,
0.06721580028533936,
0.02277042716741562,
-0.028854278847575188,
0.007927590981125832,
0.011375432834029198,
-0.02881515584886074,
-0.0044210623018443584,
0.017185412347316742,
-0.00901818461716175,
-0.026154693216085434,
-0.0062158964574337006,
0.02118588797748089,
0.02861953340470791,
-0.05817805230617523,
0.07950087636709213,
-0.03605317696928978,
0.012060110457241535,
0.021538008004426956,
-0.05751293525099754,
0.013996770605444908,
0.032238543033599854,
0.03343183919787407,
-0.003751056268811226,
0.00035181434941478074,
0.027700107544660568,
-0.05109652876853943,
-0.05148777365684509,
-0.024100659415125847,
0.0020222447346895933,
-0.010094107128679752,
-0.0541873574256897,
0.07347571104764938,
-0.028717344626784325,
-0.03282541036605835,
-0.022829115390777588,
-0.03216029703617096,
0.03217985853552818,
-0.04663633927702904,
0.012891504913568497,
-0.008597597479820251,
0.011091780848801136,
-0.0476144514977932,
-0.06224699318408966,
0.04421062394976616,
-0.002848748816177249,
-0.0760188028216362,
0.04460186883807182,
-0.057591184973716736,
-0.030086699873209,
-0.03708997741341591,
-0.03896794840693474,
-0.0793052539229393,
-0.00721846055239439,
0.03622923791408539,
0.004105621483176947,
0.01680395007133484,
-0.0295389574021101,
-0.019884999841451645,
-0.03939831629395485,
-0.039926499128341675,
0.028423910960555077,
0.047301456332206726,
-0.052778877317905426,
0.0002274108410347253,
-0.022457432001829147,
0.032923221588134766,
-0.041824035346508026,
0.00959527026861906,
-0.027250176295638084,
-0.0031959782354533672,
-0.03319709375500679,
0.013879397884011269,
0.026702435687184334,
0.048514313995838165,
0.009027966298162937,
-0.011502587236464024,
0.06752879172563553,
-0.05833455175161362,
-0.015747589990496635,
-0.009340961463749409,
0.004756065551191568,
0.03423389047384262,
-0.022555243223905563,
0.03458601236343384,
-0.029636768624186516,
-0.018916670233011246,
-0.024961397051811218,
-0.0311821848154068,
0.03951569274067879,
0.005120411980897188,
0.04573647677898407,
0.06349897384643555,
0.05493072420358658,
-0.017156070098280907,
-0.019640471786260605,
0.021518446505069733,
-0.007101086899638176,
0.02057945914566517,
-0.013791367411613464,
-0.020872892811894417,
0.03638573735952377,
-0.00208459934219718,
-0.03589668124914169,
0.04824044182896614,
-0.00012532049731817096,
0.014583637937903404,
-0.038459330797195435,
0.056613072752952576,
-0.04409325122833252,
-0.025743886828422546,
-0.019708940759301186,
0.005005483981221914,
-0.018163524568080902,
0.009497459046542645,
-0.01165908481925726,
0.007409192156046629,
0.04925767704844475,
0.0016823512269183993,
0.007105977740138769,
-0.0037583920639008284,
0.019259009510278702,
-0.03399914503097534,
0.00749233178794384,
-0.034938130527734756,
-0.04061117768287659,
0.0037828448694199324,
0.008025402203202248,
0.00694458931684494,
0.009668628685176373,
0.01748862862586975,
-0.06686367839574814,
0.04499311372637749,
-0.03728559613227844,
-0.029617207124829292,
0.00018507697677705437,
0.0022838895674794912,
-0.05133127421140671,
-0.02717192843556404,
-0.014974881894886494,
0.03591624274849892,
0.01838848926126957,
-0.003861093893647194,
-0.030536631122231483,
0.0037021508906036615,
0.011375432834029198,
0.04025905579328537,
-0.05050966143608093,
0.01498466357588768,
0.025665637105703354,
0.02083376795053482,
0.012676320970058441,
-0.004166753496974707,
0.006841887719929218,
0.023768100887537003,
-0.07817064225673676,
0.006533782463520765,
-0.03568149730563164,
-0.0135272778570652,
0.030164947733283043,
-0.039183132350444794,
0.06917202472686768,
-0.006088742054998875,
0.0030957218259572983,
-0.0011297183809801936,
-0.004963914398103952,
-0.000456044333986938,
0.005350267980247736,
-0.033960018306970596,
0.0316908024251461,
-0.021479321643710136,
0.083100326359272,
-0.000671840098220855,
0.024081097915768623,
-0.019660035148262978,
0.04557998105883598,
-0.06925027072429657,
0.07218460738658905,
0.033783961087465286,
-0.028228288516402245,
-0.003369593061506748,
0.07617529481649399,
0.005350267980247736,
0.0021567351650446653,
-0.049492426216602325,
-0.01138521358370781,
-0.04694933444261551,
0.019718721508979797,
-0.018721047788858414,
0.020540334284305573,
0.06381197273731232,
-0.045892976224422455,
0.002155512571334839,
-0.005487203598022461,
0.01602146029472351,
0.005183989182114601,
-0.005888229236006737,
-0.028365224599838257,
-0.07144124060869217,
-0.05903879180550575,
-0.014603199437260628,
-0.013693556189537048,
0.07339746505022049,
-0.0629512369632721,
0.007404301781207323,
0.03824414685368538,
0.020501209422945976,
0.03157342970371246,
-0.03491856902837753,
0.029499832540750504,
0.00989848468452692,
-0.04487574100494385,
-0.019014481455087662,
0.02813047729432583,
0.053561367094516754,
0.05176164209842682,
-0.026056881994009018,
0.06991538405418396,
0.023709414526820183,
0.021088076755404472,
-0.03734428435564041,
0.07226285338401794,
-0.047653574496507645,
0.049844544380903244,
-0.014417358674108982,
0.002463617594912648,
0.0017826076364144683,
-0.043154265731573105,
0.023161672055721283,
0.06479008495807648,
-0.05751293525099754,
0.008959498256444931,
-0.0029832390137016773,
0.06091676279902458,
0.014065238647162914,
-0.05242675915360451,
0.016041023656725883,
0.012529604136943817,
-0.011756896041333675,
-0.009106215089559555,
-0.03824414685368538,
0.001331453793682158,
0.08020511269569397,
0.07641004770994186,
0.013850053772330284,
-0.010573381558060646,
0.03930050507187843,
-0.008959498256444931,
0.041080668568611145,
-0.005731731653213501,
-0.03057575598359108,
0.04029817879199982,
0.0036776980850845575,
-0.029147712513804436,
-0.0025381986051797867,
0.00023474667978007346,
0.002280221553519368,
0.02893252857029438,
0.020051278173923492,
0.036444421857595444,
0.04925767704844475,
0.03002801351249218,
0.033529650419950485,
0.046205971390008926,
-0.003890437074005604,
0.004599567968398333,
-0.053874362260103226,
-0.04898380860686302,
-0.012480698525905609,
0.0009408206678926945,
0.027074117213487625,
-0.022516118362545967,
0.02668287232518196,
-0.05872579291462898,
0.04139366373419762,
0.02057945914566517,
0.007409192156046629,
-0.03982868790626526,
0.002645790809765458,
0.003912444692105055,
0.04076767340302467,
0.0031568538397550583,
-0.03881145268678665,
0.001830290537327528,
0.010583163239061832,
0.010485352016985416,
0.0017251435201615095,
0.06956326961517334,
-0.02991063892841339,
0.08505655080080032,
-0.03204292058944702,
0.02235962077975273,
-0.000008582352165831253,
0.02394416183233261,
-0.010710317641496658,
-0.02965633012354374,
-0.008147666230797768,
0.01217748410999775,
-0.04964892193675041,
-0.05931266024708748,
-0.02204662561416626,
-0.012343763373792171,
-0.011678647249937057,
0.0038195240776985884,
-0.03415564075112343,
-0.032003797590732574,
-0.015454156324267387,
-0.04225440323352814,
-0.02277042716741562,
0.018192868679761887,
0.003398936241865158,
0.009306727908551693,
-0.019034042954444885,
0.10148881375789642,
0.03086918778717518,
0.023376857861876488,
0.03740297257900238,
-0.022809552028775215,
-0.06169925257563591,
0.0683504119515419,
-0.0012972198892384768,
0.03233635425567627,
-0.015806276351213455,
0.06302948296070099,
0.0044039455242455006,
-0.04663633927702904,
-0.022144436836242676,
-0.045462608337402344,
0.02533307857811451,
0.054695975035429,
-0.02028602547943592,
0.0771925300359726,
0.015639998018741608,
-0.033157967031002045,
0.03806808590888977,
-0.0232594832777977,
-0.010289729572832584,
0.023376857861876488,
-0.013703337870538235,
0.0017703812336549163,
0.00901818461716175,
0.019024262204766273,
0.012461136095225811,
-0.03394045680761337,
-0.023768100887537003,
0.030673567205667496,
-0.005702388007193804,
-0.019963249564170837,
-0.011991643346846104,
0.09593314677476883,
-0.01876017265021801,
0.05786505714058876,
-0.02766098454594612,
-0.010700535960495472,
-0.0109352832660079,
-0.0155910924077034,
0.04135454073548317,
-0.045775603502988815,
0.008020511828362942,
-0.014642324298620224,
-0.026448126882314682,
0.03881145268678665,
-0.031827736645936966,
0.0443279966711998,
-0.0015833174111321568,
0.04413237422704697,
0.03270803764462471,
0.025783009827136993,
-0.019356820732355118,
-0.05974303185939789,
0.014661886729300022,
0.07472769170999527,
-0.020912017673254013,
-0.01962091028690338,
-0.030164947733283043,
0.08302207291126251,
-0.0254504531621933,
-0.011306964792311192,
-0.028463035821914673,
-0.005012819543480873,
-0.06752879172563553,
0.023768100887537003,
-0.015258533880114555,
0.06878077983856201,
-0.006010493263602257,
0.017948340624570847,
-0.017146289348602295,
-0.07617529481649399,
-0.027543609961867332,
0.03990693762898445,
-0.012236170470714569,
0.03403826802968979,
0.009125777520239353,
-0.009570817463099957,
0.011179810389876366,
-0.0019831203389912844,
0.004428398329764605,
0.0062158964574337006,
-0.009008403867483139,
0.02003171667456627,
-0.02515701949596405,
-0.02386591210961342,
0.060447271913290024,
-0.06479008495807648,
-0.03959393873810768,
-0.04726233333349228,
0.04941417649388313,
0.045775603502988815,
0.10853121429681778,
-0.0005260404432192445,
0.04014168307185173,
-0.024961397051811218,
-0.018603675067424774,
0.011825364083051682,
0.022066187113523483,
0.03112349659204483,
-0.036092303693294525,
0.055830586701631546,
-0.0563783273100853,
0.02443321794271469,
-0.005790418013930321,
-0.012402449734508991,
-0.019953468814492226,
-0.02363116666674614,
-0.055830586701631546,
0.026702435687184334,
-0.07312358915805817,
-0.04714495688676834,
-0.049375053495168686,
-0.017645126208662987,
0.03217985853552818,
0.04573647677898407,
-0.04831869155168533,
0.0787966325879097,
0.020070841535925865,
-0.04460186883807182,
-0.027915293350815773,
0.010739660821855068,
-0.014241298660635948,
0.04843606427311897,
0.009624614380300045,
-0.03094743750989437,
-0.023552916944026947,
-0.012539384886622429,
0.003484521061182022,
0.010641849599778652,
0.0027313753962516785,
-0.019748063758015633,
0.016715919598937035,
-0.025959070771932602,
0.03564237058162689,
0.011942737735807896,
0.01674526371061802,
0.008602487854659557,
0.03683566674590111,
0.03159299120306969,
-0.0045531075447797775,
0.008778547868132591,
0.02149888314306736,
-0.0009237037156708539,
0.02388547547161579,
0.010064763948321342,
0.021225012838840485,
-0.042176153510808945,
0.010015858337283134,
-0.062286119908094406,
0.007516784127801657,
-0.0155910924077034,
-0.05547846481204033,
-0.0007036286988295615,
0.013409904204308987,
-0.01383049227297306,
0.04788832366466522,
0.014045676216483116,
0.018955795094370842,
-0.006851668935269117,
0.01187426969408989,
0.08959498256444931,
0.06682455539703369,
-0.0448366142809391,
-0.010759223252534866,
-0.026272065937519073,
0.018496083095669746,
-0.03507506474852562,
-0.005311143584549427,
0.02210531197488308,
0.031886424869298935,
0.02881515584886074,
-0.011707990430295467,
-0.09788936376571655,
0.009937609545886517,
0.0047511751763522625,
0.03738340735435486,
-0.04655809327960014,
-0.04569735378026962,
-0.07633179426193237,
-0.04640159383416176,
-0.006147428881376982,
0.0353098139166832,
0.005242676008492708,
0.004098285920917988,
0.02069683186709881,
0.03755946829915047,
0.010367978364229202,
-0.00986914150416851,
0.008534019812941551,
-0.04667546600103378,
-0.020501209422945976,
0.014075019396841526,
-0.04088504612445831,
0.06760704517364502,
-0.02210531197488308,
0.020814206451177597,
0.002873201621696353,
0.05786505714058876,
-0.0033255780581384897,
0.02552870102226734,
0.045658230781555176,
0.03081050142645836,
0.03574018180370331,
-0.0063772848807275295,
-0.006978823337703943,
-0.025665637105703354,
0.022809552028775215,
0.00706685334444046,
0.059782154858112335,
-0.0065142204985022545,
0.009575708769261837,
0.011747115291655064,
0.04186315834522247,
-0.026409002020955086,
0.09202069789171219,
-0.025293955579400063,
-0.003482075873762369,
0.04401500150561333,
0.014808603562414646,
-0.08552604168653488,
-0.04452361911535263,
0.11103518307209015,
0.0022325387690216303,
-0.04221527650952339,
0.0396135039627552,
-0.020794643089175224,
-0.011209153570234776,
0.034879446029663086,
-0.025998195633292198,
0.06631593406200409,
-0.0355641208589077,
-0.019601348787546158,
0.04033730551600456,
-0.008651393465697765,
-0.01577693410217762,
-0.003861093893647194,
0.014622761867940426,
-0.028717344626784325,
0.009913156740367413,
0.014456483535468578,
-0.033294904977083206,
-0.03636617213487625,
0.04068942368030548,
-0.015561748296022415,
-0.011502587236464024,
0.033294904977083206,
-0.030556192621588707,
0.045345235615968704,
-0.01020169910043478,
-0.02345510572195053,
0.00815744698047638,
0.04029817879199982,
0.05293537676334381,
0.0034918568562716246,
-0.0065484545193612576,
-0.0092920558527112,
-0.09679388254880905,
0.053091876208782196,
-0.023963723331689835,
0.007081524934619665,
0.03442951291799545,
0.01151236891746521,
-0.03417520597577095,
0.04511048644781113,
-0.01047557033598423,
-0.047418829053640366,
0.00119207298848778,
0.018046151846647263,
0.030184511095285416,
0.0465189665555954,
-0.02314211055636406,
0.0015246308175846934,
0.03752034530043602,
0.0020894899498671293,
0.040845923125743866,
-0.04428887367248535,
-0.01748862862586975,
0.015581310726702213,
0.0306344423443079,
0.005893119610846043,
0.05422648414969444,
-0.017253881320357323,
0.04029817879199982,
-0.017283223569393158,
-0.04225440323352814,
-0.08388281613588333,
-0.018535206094384193,
-0.08106585592031479,
0.04557998105883598,
-0.0065240017138421535,
-0.027680546045303345,
-0.0021225011441856623,
-0.054422106593847275,
0.039437443017959595,
0.02126413770020008,
-0.016344238072633743,
-0.0047511751763522625,
0.006876121740788221,
0.003848867490887642,
-0.011483024805784225,
0.007683063391596079,
0.01955244317650795,
-0.023768100887537003,
0.010289729572832584,
0.05743468925356865,
-0.010182137601077557,
-0.015366126783192158,
0.003912444692105055,
-0.01717563159763813,
-0.0793834999203682,
-0.06283386051654816,
-0.05313099920749664,
-0.0355641208589077,
0.04221527650952339,
0.01954266056418419,
-0.024452779442071915,
-0.0015221855137497187,
-0.029949763789772987,
0.08012686669826508,
-0.021968377754092216
]
|
41,655 | pyglove.core.hyper.object_template | materialize | Materialize a (maybe) hyper value using a DNA or parameter dict.
Example::
hyper_dict = pg.Dict(x=pg.oneof(['a', 'b']), y=pg.floatv(0.0, 1.0))
# Materialize using DNA.
assert pg.materialize(
hyper_dict, pg.DNA([0, 0.5])) == pg.Dict(x='a', y=0.5)
# Materialize usign key value pairs.
# See `pg.DNA.from_dict` for more details.
assert pg.materialize(
hyper_dict, {'x': 0, 'y': 0.5}) == pg.Dict(x='a', y=0.5)
# Partially materialize.
v = pg.materialize(
hyper_dict, pg.DNA(0), where=lambda x: isinstance(x, pg.hyper.OneOf))
assert v == pg.Dict(x='a', y=pg.floatv(0.0, 1.0))
Args:
value: A (maybe) hyper value
parameters: A DNA object or a dict of string (key path) to a
string (in format of '<selected_index>/<num_choices>' for
`geno.Choices`, or '<float_value>' for `geno.Float`), or their literal
values when `use_literal_values` is set to True.
use_literal_values: Applicable when `parameters` is a dict. If True, the
values in the dict will be from `geno.Choices.literal_values` for
`geno.Choices`.
where: Function to filter hyper primitives. If None, all hyper primitives
from `value` will be included in the encoding/decoding process. Otherwise
only the hyper primitives on which 'where' returns True will be included.
`where` can be useful to partition a search space into separate
optimization processes. Please see 'Template' docstr for details.
Returns:
A materialized value.
Raises:
TypeError: if parameters is not a DNA or dict.
ValueError: if parameters cannot be decoded.
| def materialize(
value: Any,
parameters: Union[geno.DNA, Dict[str, Any]],
use_literal_values: bool = True,
where: Optional[Callable[[base.HyperPrimitive], bool]] = None) -> Any:
"""Materialize a (maybe) hyper value using a DNA or parameter dict.
Example::
hyper_dict = pg.Dict(x=pg.oneof(['a', 'b']), y=pg.floatv(0.0, 1.0))
# Materialize using DNA.
assert pg.materialize(
hyper_dict, pg.DNA([0, 0.5])) == pg.Dict(x='a', y=0.5)
# Materialize usign key value pairs.
# See `pg.DNA.from_dict` for more details.
assert pg.materialize(
hyper_dict, {'x': 0, 'y': 0.5}) == pg.Dict(x='a', y=0.5)
# Partially materialize.
v = pg.materialize(
hyper_dict, pg.DNA(0), where=lambda x: isinstance(x, pg.hyper.OneOf))
assert v == pg.Dict(x='a', y=pg.floatv(0.0, 1.0))
Args:
value: A (maybe) hyper value
parameters: A DNA object or a dict of string (key path) to a
string (in format of '<selected_index>/<num_choices>' for
`geno.Choices`, or '<float_value>' for `geno.Float`), or their literal
values when `use_literal_values` is set to True.
use_literal_values: Applicable when `parameters` is a dict. If True, the
values in the dict will be from `geno.Choices.literal_values` for
`geno.Choices`.
where: Function to filter hyper primitives. If None, all hyper primitives
from `value` will be included in the encoding/decoding process. Otherwise
only the hyper primitives on which 'where' returns True will be included.
`where` can be useful to partition a search space into separate
optimization processes. Please see 'Template' docstr for details.
Returns:
A materialized value.
Raises:
TypeError: if parameters is not a DNA or dict.
ValueError: if parameters cannot be decoded.
"""
t = template(value, where)
if isinstance(parameters, dict):
dna = geno.DNA.from_parameters(
parameters=parameters,
dna_spec=t.dna_spec(),
use_literal_values=use_literal_values)
else:
dna = parameters
if not isinstance(dna, geno.DNA):
raise TypeError(
f'\'parameters\' must be a DNA or a dict of string to DNA values. '
f'Encountered: {dna!r}.')
return t.decode(dna)
| (value: Any, parameters: Union[pyglove.core.geno.base.DNA, Dict[str, Any]], use_literal_values: bool = True, where: Optional[Callable[[pyglove.core.hyper.base.HyperPrimitive], bool]] = None) -> Any | [
0.10727464407682419,
-0.005525980144739151,
0.006065216846764088,
-0.06169246509671211,
0.007272533606737852,
0.020385999232530594,
-0.03893955051898956,
-0.03748886287212372,
-0.02658960409462452,
-0.013056201860308647,
0.027868501842021942,
0.13819722831249237,
0.010402968153357506,
0.06444113701581955,
0.007740190252661705,
-0.008312830701470375,
-0.031476136296987534,
0.11002331972122192,
0.014211026951670647,
-0.012187697924673557,
0.029777303338050842,
0.02468080259859562,
-0.0035837749019265175,
0.09620359539985657,
-0.012512193992733955,
-0.11857474595308304,
0.009453339502215385,
-0.014211026951670647,
-0.015270411968231201,
0.024566275998950005,
0.06722798943519592,
-0.036209963262081146,
-0.00879957526922226,
-0.007682926021516323,
-0.012015905231237411,
-0.013151641935110092,
0.00554506853222847,
0.08154399693012238,
-0.07348885387182236,
0.008646870963275433,
-0.04115375876426697,
0.0019923115614801645,
-0.01452597975730896,
-0.03970307111740112,
-0.017732765525579453,
0.019641567021608353,
0.024623539298772812,
0.034320250153541565,
-0.05088864639401436,
-0.02120678499341011,
0.050774119794368744,
-0.033194057643413544,
0.035274650901556015,
0.014411451295018196,
-0.037737004458904266,
0.02237115427851677,
-0.03855779021978378,
0.047338277101516724,
0.057645805180072784,
-0.017694590613245964,
0.009706255979835987,
-0.013781546615064144,
-0.06906043738126755,
-0.015146340243518353,
0.006160656921565533,
-0.0038700951263308525,
0.04165004938840866,
-0.024623539298772812,
-0.03764156624674797,
-0.0022118238266557455,
-0.004523859359323978,
-0.0012383349239826202,
0.004910391755402088,
-0.009515375830233097,
0.0187348872423172,
0.051346760243177414,
-0.023974547162652016,
-0.005941144656389952,
0.010918344371020794,
-0.04222268983721733,
0.07306892424821854,
-0.0019720306154340506,
-0.03974124789237976,
-0.11216117441654205,
-0.07314527034759521,
0.017532341182231903,
-0.032621417194604874,
-0.00042411184404045343,
0.06337220966815948,
-0.02775397337973118,
-0.025959700345993042,
0.001787115354090929,
0.006194060668349266,
0.05333191528916359,
0.012502649798989296,
0.026494164019823074,
0.045391298830509186,
0.021932128816843033,
-0.015823964029550552,
-0.027677621692419052,
0.05520254001021385,
-0.04302438721060753,
-0.018104981631040573,
0.0034167547710239887,
-0.007344113662838936,
-0.06150158494710922,
-0.02599787712097168,
0.0005639911978505552,
0.03439660370349884,
-0.04497136175632477,
-0.06287591904401779,
-0.053790025413036346,
-0.04565853253006935,
-0.015184516087174416,
-0.02162672020494938,
0.06035630404949188,
-0.045009538531303406,
-0.00722481356933713,
-0.05100317671895027,
0.004201749339699745,
0.002428949810564518,
0.020882287994027138,
-0.00687645748257637,
-0.03346129134297371,
-0.0016749732894822955,
0.011204664595425129,
0.0049485680647194386,
-0.03250689059495926,
-0.031437959522008896,
-0.01043159980326891,
0.0181813333183527,
0.0626850426197052,
-0.004077677149325609,
0.01622481271624565,
-0.013647930696606636,
0.0009526112698949873,
-0.06264686584472656,
-0.023573698475956917,
0.014840931631624699,
0.013743370771408081,
0.01539448369294405,
0.028231173753738403,
0.011786849237978458,
-0.05088864639401436,
0.042146336287260056,
-0.049437958747148514,
0.053790025413036346,
0.009515375830233097,
-0.012731705792248249,
0.045200418680906296,
0.03535100445151329,
0.003567072795704007,
0.06371579319238663,
0.044055137783288956,
-0.04145916923880577,
-0.06844962388277054,
0.049056198447942734,
-0.05046871304512024,
-0.02252385765314102,
-0.015337220393121243,
0.060318127274513245,
0.032411448657512665,
0.011414633132517338,
0.00840827077627182,
-0.014086955226957798,
0.0307889673858881,
0.031437959522008896,
0.018209965899586678,
0.051728520542383194,
-0.028822902590036392,
0.007205725647509098,
0.010469776578247547,
-0.03645810857415199,
0.02387910708785057,
0.04737645387649536,
-0.0000829135678941384,
-0.016205724328756332,
-0.03924495726823807,
-0.0017286583315581083,
-0.03256415203213692,
-0.01971791870892048,
0.011595969088375568,
0.0021652965806424618,
0.01836267113685608,
0.01138600055128336,
0.019966064020991325,
-0.005425768438726664,
0.013600210659205914,
0.05428631603717804,
-0.005712088663130999,
0.06802968680858612,
-0.01338069885969162,
-0.03390031307935715,
0.004318663384765387,
-0.020519616082310677,
-0.0030469244811683893,
0.018820783123373985,
-0.03577094152569771,
-0.023840930312871933,
0.08169670403003693,
-0.07600847631692886,
-0.07318344712257385,
-0.028612934052944183,
-0.0063372207805514336,
-0.047414630651474,
-0.03653446212410927,
0.011739129200577736,
0.0028274122159928083,
0.0058218445628881454,
-0.0642884373664856,
-0.02252385765314102,
-0.04840720444917679,
-0.040619295090436935,
0.02846023067831993,
0.00683828117325902,
-0.11307740211486816,
-0.016892893239855766,
-0.014573699794709682,
-0.012483561411499977,
-0.046154819428920746,
-0.0018205194501206279,
0.026322372257709503,
0.07337433099746704,
0.02233297750353813,
0.037584301084280014,
-0.04260445013642311,
-0.019832447171211243,
-0.028364790603518486,
-0.01298939436674118,
-0.04035206511616707,
0.05871473252773285,
-0.03588546812534332,
0.0416882261633873,
-0.024776242673397064,
0.015604452230036259,
0.0009442602167837322,
0.02195121720433235,
-0.01761823706328869,
0.009586955420672894,
0.03115164116024971,
0.03208695352077484,
-0.01128101721405983,
-0.026112403720617294,
-0.024356307461857796,
-0.01214952114969492,
0.01895439811050892,
-0.034492041915655136,
0.03764156624674797,
-0.0018479584250599146,
-0.017513252794742584,
-0.01089925691485405,
0.009648991748690605,
0.01855355128645897,
0.03420572355389595,
-0.007711558137089014,
0.050774119794368744,
0.09574548155069351,
-0.04203180968761444,
0.011882289312779903,
0.01623435690999031,
-0.027448564767837524,
-0.06909861415624619,
-0.0013731440994888544,
0.06482289731502533,
-0.0036481968127191067,
-0.04756733402609825,
-0.01241675391793251,
0.046154819428920746,
-0.015136796049773693,
-0.0162725318223238,
-0.04069564864039421,
0.018629902973771095,
0.04275715351104736,
-0.06482289731502533,
0.023974547162652016,
0.012025449424982071,
0.06329585611820221,
-0.00420413538813591,
0.05791303887963295,
0.024184515699744225,
-0.03876775875687599,
-0.023764578625559807,
0.0015019881539046764,
-0.04779639095067978,
-0.004192205145955086,
-0.0034310705959796906,
-0.010536584071815014,
0.07012936472892761,
0.009730115532875061,
-0.02044326439499855,
0.04191727936267853,
-0.023707315325737,
-0.035675499588251114,
-0.00478154793381691,
0.007420465815812349,
-0.044627778232097626,
-0.043673377484083176,
-0.04031388834118843,
0.037393420934677124,
-0.04474230855703354,
0.03361399471759796,
-0.019231174141168594,
0.09108800441026688,
0.05779850855469704,
-0.058409325778484344,
0.023955458775162697,
0.03361399471759796,
-0.03766065463423729,
-0.01603393256664276,
0.04737645387649536,
-0.024890771135687828,
0.02868928574025631,
0.027811238542199135,
0.006294272840023041,
0.01778048649430275,
-0.03096076101064682,
0.01031707227230072,
0.003385736607015133,
0.01971791870892048,
-0.00889978650957346,
-0.010584304109215736,
0.05569882690906525,
-0.03657263517379761,
-0.0174273569136858,
-0.0033308586571365595,
-0.04993424564599991,
0.008718450553715229,
-0.0071198297664523125,
0.013542946428060532,
-0.00992576777935028,
-0.003318928647786379,
0.04092470556497574,
0.05848567932844162,
0.018610814586281776,
-0.0217985138297081,
0.03267868235707283,
0.013743370771408081,
0.03496924415230751,
-0.03855779021978378,
-0.03523647412657738,
0.020767759531736374,
0.0013528630370274186,
0.009348355233669281,
-0.027276773005723953,
0.02122587338089943,
-0.00937221571803093,
0.012159065343439579,
-0.02735312469303608,
0.02924283966422081,
-0.0795588493347168,
-0.025959700345993042,
0.09994484484195709,
0.027372213080525398,
0.027066804468631744,
-0.0028632022440433502,
-0.046154819428920746,
0.03823329508304596,
-0.03974124789237976,
-0.029376454651355743,
0.017665958032011986,
0.03416754677891731,
-0.018429478630423546,
-0.00459066778421402,
-0.012006361037492752,
0.05348461866378784,
-0.035293739289045334,
-0.04394061118364334,
-0.033575817942619324,
0.006351537071168423,
-0.03229692205786705,
0.047338277101516724,
-0.03955036774277687,
-0.024585362523794174,
0.047910917550325394,
0.07757369428873062,
-0.03865322843194008,
-0.039283134043216705,
0.01566171646118164,
-0.01318027451634407,
0.07658111304044724,
-0.016329796984791756,
0.011051960289478302,
0.04478048160672188,
0.028765639290213585,
-0.013390242122113705,
-0.005401908420026302,
0.05004877597093582,
-0.020347824320197105,
-0.0439024344086647,
-0.018391301855444908,
-0.025921523571014404,
-0.0038772530388087034,
0.008484622463583946,
0.013256626203656197,
-0.028975605964660645,
0.05432448908686638,
0.003194856457412243,
0.02296288125216961,
-0.04084835201501846,
-0.04382608085870743,
-0.0018288703868165612,
-0.052072104066610336,
-0.017914101481437683,
0.03523647412657738,
0.0011411054292693734,
-0.06264686584472656,
0.07131282240152359,
0.017322372645139694,
0.03288865089416504,
0.004977199714630842,
-0.024738067761063576,
-0.03939766436815262,
-0.07772639393806458,
0.013924706727266312,
0.014106042683124542,
-0.06230328232049942,
0.08543795347213745,
0.010574759915471077,
-0.038710493594408035,
0.02716224454343319,
0.06627358496189117,
-0.02813573367893696,
-0.006809649523347616,
0.05867655947804451,
0.047490980476140976,
-0.0003504440246615559,
0.04451325163245201,
-0.04646022990345955,
0.023802755400538445,
-0.003314156550914049,
-0.009720571339130402,
-0.06520465761423111,
-0.013275714591145515,
-0.02235206589102745,
0.007577941752970219,
0.03802332654595375,
-0.015604452230036259,
0.013151641935110092,
0.056500524282455444,
-0.03273594379425049,
-0.008885471150279045,
-0.02181760035455227,
0.00898568332195282,
-0.023630961775779724,
-0.020519616082310677,
-0.0071198297664523125,
0.023172849789261818,
0.03206786513328552,
0.004526245407760143,
-0.03561823442578316,
0.0887974426150322,
-0.022504769265651703,
0.021302225068211555,
0.02410816214978695,
0.0183340385556221,
0.005721632391214371,
-0.03218239173293114,
-0.01030752807855606,
0.021932128816843033,
0.05214845761656761,
0.03538918122649193,
-0.013705194927752018,
0.030540823936462402,
-0.011042417027056217,
-0.053599145263433456,
0.05795121192932129,
-0.008150582201778889,
0.004616913385689259,
-0.027219509705901146,
-0.009792151860892773,
0.058981966227293015,
0.014926827512681484,
0.03502650558948517,
-0.010918344371020794,
0.05214845761656761,
0.008446446619927883,
0.026513252407312393,
-0.033365849405527115,
-0.036209963262081146,
-0.048063620924949646,
0.040237534791231155,
-0.017246020957827568,
0.015442203730344772,
0.014277835376560688,
0.02103499323129654,
0.014010602608323097,
0.007735418155789375,
0.03514103591442108,
0.04798727110028267,
0.05825662240386009,
-0.03993212804198265,
0.05199575424194336,
0.04069564864039421,
0.0007062565418891609,
-0.05069776624441147,
0.026036052033305168,
0.02197030559182167,
-0.049018021672964096,
0.04313891381025314,
-0.047338277101516724,
-0.013504770584404469,
-0.033747609704732895,
-0.021397665143013,
0.006256096996366978,
0.007358429953455925,
-0.028192998841404915,
0.03036903217434883,
0.04130646586418152,
-0.006761929485946894,
0.0011584039311856031,
-0.023974547162652016,
-0.011567337438464165,
0.04817815124988556,
0.029891831800341606,
-0.015556732192635536,
0.02563520334661007,
0.010737008415162563,
-0.009648991748690605,
-0.029319191351532936,
-0.09345491975545883,
-0.010441143997013569,
0.047681860625743866,
0.03380487486720085,
-0.047910917550325394,
-0.025768820196390152,
-0.027963941916823387,
-0.013667019084095955,
-0.03273594379425049,
0.02773488499224186,
-0.012941674329340458,
-0.0015687962295487523,
-0.0366680771112442,
-0.009100210852921009,
0.022791089490056038,
0.01813361421227455,
-0.031647928059101105,
0.011920465156435966,
-0.010345703922212124,
0.02008059248328209,
0.002428949810564518,
0.032392360270023346,
0.03002544678747654,
0.017322372645139694,
-0.0003987605741713196,
0.03722162917256355,
-0.05894378945231438,
0.034873802214860916,
0.017856838181614876,
0.027486741542816162,
0.005039236042648554,
-0.06543371826410294,
-0.04951431229710579,
0.007954929955303669,
0.0424899198114872,
-0.01566171646118164,
-0.03474018722772598,
0.006757157389074564,
-0.020767759531736374,
-0.013638386502861977,
0.02714315801858902,
0.04722375050187111,
0.03149522468447685,
0.04039023816585541,
-0.012025449424982071,
0.00011944922152906656,
0.029777303338050842,
-0.008551430888473988,
0.023974547162652016,
-0.026837749406695366,
-0.03935948759317398,
0.016196180135011673,
0.06749521940946579,
-0.0029538702219724655,
0.0093674436211586,
0.0038343050982803106,
0.03458748385310173,
-0.06150158494710922,
0.00406813295558095,
-0.05413360893726349,
0.006890773307532072,
-0.027104981243610382,
0.03962671756744385,
-0.008861610665917397,
-0.008312830701470375,
0.09505831450223923,
0.03288865089416504,
-0.006389712914824486,
0.0929204598069191,
-0.023440081626176834,
0.0002891535987146199,
-0.006661717314273119,
-0.007520677987486124,
-0.029319191351532936,
0.03727889433503151,
0.0386723168194294,
0.03479745239019394,
-0.003760338993743062,
0.016014844179153442,
-0.018200421705842018,
-0.012493105605244637,
-0.061081647872924805,
0.014506891369819641,
-0.0183340385556221,
0.02504347637295723,
0.0212449599057436,
0.013332978822290897,
0.04833085462450981,
-0.016597028821706772,
0.010555672459304333,
-0.09421844035387039,
0.057264044880867004,
0.01291304174810648,
-0.04321526736021042,
-0.027009541168808937,
0.032220568507909775,
-0.02103499323129654,
-0.06928949058055878,
-0.031227992847561836,
0.01204453781247139,
-0.08452173322439194,
-0.003273594658821821,
-0.03769882768392563,
-0.04573488235473633,
-0.02563520334661007,
0.02177942544221878,
-0.026475077494978905,
0.0007545730913989246,
-0.03561823442578316,
-0.04084835201501846,
0.018257686868309975,
0.02979639172554016,
0.0024003179278224707,
-0.012579001486301422,
0.03117072768509388,
-0.036782603710889816,
-0.002199893817305565,
0.039092253893613815,
-0.02750582993030548,
-0.017675502225756645,
0.05107952654361725,
-0.027963941916823387,
-0.009773063473403454,
0.012302225455641747,
0.020538704469799995,
0.0233064666390419,
-0.014382819645106792,
0.009505831636488438,
-0.029147399589419365,
-0.016014844179153442,
0.04027571156620979,
-0.001849151449277997,
0.02618875727057457,
-0.0021056465338915586,
-0.02141675353050232,
0.053637322038412094,
-0.011032872833311558,
0.05310285836458206,
-0.04859808459877968,
-0.010202543810009956,
0.06081441417336464,
-0.010651112534105778,
-0.017465533688664436,
-0.01570943556725979,
-0.053980905562639236,
-0.005444856360554695,
-0.015823964029550552,
-0.05734039843082428,
-0.0007283270824700594,
0.03685895726084709,
0.012579001486301422,
-0.036992572247982025,
-0.06215057522058487,
0.011605513282120228,
-0.019565215334296227,
0.03227783367037773,
-0.030483560636639595,
-0.01623435690999031,
0.04050476849079132,
0.010717920027673244,
0.002994432346895337,
0.07742098718881607,
0.04340614750981331,
-0.018601270392537117,
0.0520339272916317,
-0.023573698475956917,
-0.07581759244203568,
-0.014478259719908237,
-0.01509862020611763,
0.0009341197437606752,
0.027276773005723953,
0.023172849789261818,
-0.07131282240152359,
-0.024986211210489273,
-0.00779268192127347,
-0.028345702216029167,
-0.00897136703133583,
-0.016864260658621788,
-0.03607634827494621,
0.010345703922212124,
0.07024389505386353,
0.017141036689281464,
0.016138916835188866,
-0.022695649415254593,
-0.010527039878070354,
-0.014478259719908237,
-0.0027057260740548372,
0.03481654077768326,
0.02847931906580925,
0.0749395489692688,
-0.058600205928087234,
0.023039234802126884,
0.06554824113845825,
0.0017334303120151162,
0.002994432346895337,
-0.02044326439499855,
-0.016301164403557777,
-0.05356096848845482,
0.06852596998214722,
-0.00569300027564168,
0.024699890986084938,
-0.02408907562494278,
-0.020729584619402885,
0.07562671601772308,
-0.08055142313241959,
-0.009610815905034542,
0.02655142918229103,
0.027028629556298256,
-0.028402965515851974,
-0.002968186279758811,
-0.0014721631305292249,
0.015079531818628311,
0.0233064666390419,
-0.07348885387182236,
-0.03458748385310173,
-0.029490983113646507,
-0.022848354652523994,
-0.010011663660407066,
0.007873806171119213,
0.0018897134577855468,
-0.028536582365632057,
-0.05405725911259651,
0.08070413023233414,
0.00803128257393837,
-0.04161187261343002,
0.007682926021516323,
0.028727462515234947,
-0.014993635937571526,
-0.0036768289282917976,
-0.005497348494827747,
0.03075079247355461,
-0.0009126457152888179,
0.039474014192819595,
-0.027486741542816162,
0.0012478790013119578,
0.08956096321344376,
0.03493106737732887,
-0.006427889224141836,
0.011366913095116615,
-0.03790879622101784,
-0.04478048160672188,
-0.03943583741784096,
0.046765636652708054,
-0.006857369560748339,
-0.021531280130147934,
-0.025845171883702278,
-0.014478259719908237,
-0.023707315325737,
0.014745491556823254
]
|
41,656 | pyglove.core.symbolic.ref | maybe_ref | Returns a reference if a value is not symbolic or already has a parent. | def maybe_ref(value: Any) -> Optional[Ref]:
"""Returns a reference if a value is not symbolic or already has a parent."""
if isinstance(value, base.Symbolic):
if value.sym_parent is None:
return value
return Ref(value)
| (value: Any) -> Optional[pyglove.core.symbolic.ref.Ref] | [
0.06611856818199158,
-0.06415817886590958,
0.012795993126928806,
0.033611759543418884,
-0.024914760142564774,
0.013018764555454254,
0.05318000167608261,
0.0008142297156155109,
0.07249874621629715,
-0.015201924368739128,
0.02723158337175846,
-0.012662329711019993,
-0.002610881580039859,
-0.04487508162856102,
0.01912270300090313,
0.02673257514834404,
0.0015994991408661008,
0.05656613036990166,
0.01669003814458847,
0.04498201236128807,
0.022312790155410767,
0.03952856734395027,
-0.012822725810110569,
-0.07813040912151337,
-0.006010374054312706,
0.03446720167994499,
0.018766267225146294,
0.007396012544631958,
-0.05018595606088638,
0.024736542254686356,
0.04038400948047638,
-0.015362320467829704,
0.0018211567075923085,
-0.029904840514063835,
0.05866909399628639,
0.011637581512331963,
-0.03699788451194763,
0.09837587922811508,
-0.03856619447469711,
-0.053429506719112396,
-0.03493056446313858,
0.016743503510951996,
-0.06747302412986755,
-0.02635831944644451,
-0.03523353487253189,
0.02265140227973461,
0.0000730968895368278,
0.003276968142017722,
-0.018195973709225655,
0.011102929711341858,
0.07135815173387527,
-0.03970678523182869,
-0.045801810920238495,
-0.003896272974088788,
-0.01777716353535652,
0.015950435772538185,
-0.03272067382931709,
0.06668886542320251,
0.015433606691658497,
0.02967315912246704,
0.05132654309272766,
0.00830046460032463,
0.006184135563671589,
-0.03920777887105942,
0.016146475449204445,
-0.033130571246147156,
0.05553247034549713,
-0.03471670299768448,
-0.03649887815117836,
0.03724738955497742,
-0.09103333204984665,
-0.014604897238314152,
-0.029976127669215202,
0.01385638490319252,
0.06586906313896179,
-0.07356804609298706,
0.013295000419020653,
-0.05260970816016197,
0.0708591490983963,
-0.0479760617017746,
-0.02370288409292698,
-0.029708802700042725,
-0.013090050779283047,
-0.02331080660223961,
0.00950788613408804,
0.03612462058663368,
0.049116652458906174,
0.03092067874968052,
0.04205925390124321,
0.02019200474023819,
-0.026857327669858932,
-0.05082753673195839,
0.016324693337082863,
0.009935607202351093,
0.02352466620504856,
0.045730527490377426,
0.039279066026210785,
-0.05221763253211975,
0.00612621521577239,
-0.030617710202932358,
0.03756817802786827,
0.013892028480768204,
-0.051968127489089966,
0.0024660800117999315,
-0.007846010848879814,
0.008376207202672958,
0.047655269503593445,
-0.014774203300476074,
0.05403544753789902,
-0.027053365483880043,
-0.07948485761880875,
-0.0734967589378357,
0.0007707892800681293,
0.02986919693648815,
0.0014391036238521338,
-0.027391979470849037,
-0.034092944115400314,
-0.018908841535449028,
0.03113454021513462,
-0.005604929756373167,
-0.036463234573602676,
-0.001703087822534144,
-0.017875181511044502,
-0.014391036704182625,
0.06390867382287979,
0.029584050178527832,
0.004348498769104481,
-0.03297017514705658,
-0.0046826559118926525,
0.039279066026210785,
0.057635433971881866,
0.02838999591767788,
-0.0625898689031601,
-0.011218770407140255,
-0.008229177445173264,
0.07713238894939423,
-0.01990685798227787,
0.07770268619060516,
-0.04184539243578911,
-0.03104543127119541,
0.008117792196571827,
-0.02623356692492962,
-0.009356401860713959,
-0.04480379819869995,
0.007587595842778683,
0.05061367526650429,
0.0061574033461511135,
0.055176034569740295,
-0.05688691884279251,
0.01555835921317339,
-0.005221763160079718,
-0.035768184810876846,
0.02186724729835987,
0.068257175385952,
-0.03534046560525894,
0.00318340421654284,
-0.03774639591574669,
-0.0355365052819252,
-0.009677192196249962,
-0.005756414495408535,
0.038780055940151215,
0.015353409573435783,
0.036819666624069214,
-0.06362353265285492,
0.009427688084542751,
-0.011076197028160095,
-0.010550456121563911,
-0.030867213383316994,
0.034591954201459885,
0.010470259003341198,
-0.03469888120889664,
0.0041814204305410385,
-0.04587309807538986,
0.019461315125226974,
-0.016547463834285736,
0.03277413919568062,
-0.008670264855027199,
-0.013642524369060993,
-0.008959867991507053,
0.06198393180966377,
0.004900972358882427,
0.021190021187067032,
-0.0074405670166015625,
-0.0070440336130559444,
0.04790477454662323,
0.018997950479388237,
0.006767796818166971,
-0.02254447154700756,
0.08775413781404495,
0.003437363775447011,
-0.05642355605959892,
0.06155620887875557,
0.04341370239853859,
0.007480665575712919,
0.031170183792710304,
-0.06533441692590714,
0.021528633311390877,
-0.008803928270936012,
-0.053144361823797226,
0.0074628437869250774,
-0.013134605251252651,
-0.04041965305805206,
-0.027356335893273354,
0.047583986073732376,
-0.03910084813833237,
0.015870239585638046,
0.03209691122174263,
-0.0011951689375564456,
-0.04138202592730522,
0.030100880190730095,
-0.06893440335988998,
-0.006718787364661694,
-0.026696931570768356,
-0.006135126110166311,
-0.017224689945578575,
-0.026411784812808037,
-0.027890987694263458,
-0.012216786853969097,
-0.03856619447469711,
0.0538572296500206,
0.020263291895389557,
-0.024130605161190033,
0.0811244547367096,
0.025431590154767036,
0.012288074009120464,
-0.027730591595172882,
-0.018908841535449028,
-0.027391979470849037,
0.03767510876059532,
-0.0573502853512764,
0.052431490272283554,
-0.05125525966286659,
0.003227958455681801,
-0.057991866022348404,
0.03298799693584442,
-0.06957598030567169,
0.022401899099349976,
-0.007347002625465393,
0.01735835149884224,
0.03473452478647232,
-0.01444450207054615,
-0.018962306901812553,
0.030688997358083725,
0.049793876707553864,
0.023453379049897194,
0.02712465263903141,
0.04195232316851616,
-0.023649418726563454,
-0.01598607935011387,
-0.0423087552189827,
0.03569689765572548,
-0.021190021187067032,
-0.00022959383204579353,
-0.020851409062743187,
0.03503749519586563,
-0.05881166458129883,
-0.0386018380522728,
-0.05845523253083229,
0.040740445256233215,
0.012314806692302227,
-0.04583745449781418,
0.01971081830561161,
0.07199973613023758,
0.026590000838041306,
-0.0889660120010376,
-0.04352063313126564,
-0.023578131571412086,
-0.030956322327256203,
-0.04633646458387375,
0.006558391731232405,
0.03817411884665489,
-0.03660580515861511,
0.03471670299768448,
-0.013874206691980362,
-0.018784089013934135,
-0.029708802700042725,
0.025289015844464302,
0.06223343685269356,
0.0612710639834404,
-0.003323750104755163,
-0.043556276708841324,
-0.03236423805356026,
0.017634589225053787,
-0.019871214404702187,
-0.03774639591574669,
0.011111840605735779,
-0.017616767436265945,
-0.01786627061665058,
-0.02985137514770031,
0.0047227549366652966,
0.06544134765863419,
-0.00475394306704402,
-0.04419785737991333,
0.03674837946891785,
-0.003620036179199815,
0.050114668905735016,
-0.01581677421927452,
-0.027267226949334145,
0.03774639591574669,
0.023186054080724716,
0.03724738955497742,
0.011486096307635307,
0.01922963187098503,
0.032061267644166946,
-0.011236592195928097,
-0.005823246203362942,
0.055568113923072815,
-0.0372830331325531,
-0.0018601417541503906,
0.03081374801695347,
-0.03778203949332237,
0.017402905970811844,
-0.02860385552048683,
0.01088015828281641,
-0.009712835773825645,
-0.028372174128890038,
0.012787082232534885,
-0.03626719489693642,
0.01420390885323286,
0.06070076674222946,
-0.05792057886719704,
0.007823733612895012,
-0.06469283252954483,
-0.030100880190730095,
-0.06077205389738083,
0.004479933995753527,
-0.06487105041742325,
0.0111207515001297,
-0.009570262394845486,
0.0523245595395565,
-0.002535139210522175,
-0.027481088414788246,
0.03558997064828873,
-0.015870239585638046,
-0.040170151740312576,
-0.019835570827126503,
0.03170483559370041,
-0.006861361209303141,
0.009231649339199066,
-0.03992064669728279,
0.006509382277727127,
0.030564244836568832,
0.002637614030390978,
-0.0202811136841774,
0.0010993771720677614,
0.016618750989437103,
0.05881166458129883,
-0.0009918899741023779,
0.057029493153095245,
-0.03931470587849617,
-0.0444830060005188,
0.06943340599536896,
-0.03699788451194763,
-0.004883150570094585,
-0.011521739885210991,
0.03485927730798721,
-0.03471670299768448,
0.041310738772153854,
0.016378158703446388,
-0.026322675868868828,
0.07321161031723022,
0.0012775943614542484,
-0.044910725206136703,
0.00213526445440948,
-0.011379166506230831,
0.04647903889417648,
-0.051861196756362915,
0.05203941464424133,
-0.026180101558566093,
-0.028835538774728775,
-0.02635831944644451,
-0.01921181008219719,
0.04312855377793312,
-0.05813444033265114,
0.03443155810236931,
0.01745637133717537,
0.024166248738765717,
-0.01589697226881981,
0.0636591762304306,
-0.07820169627666473,
0.02099398337304592,
0.032061267644166946,
-0.021190021187067032,
-0.01087124738842249,
-0.011895996518433094,
-0.0064336396753787994,
-0.010131645947694778,
0.021118734031915665,
0.007507398258894682,
0.026607822626829147,
0.005702949594706297,
-0.045017655938863754,
0.01824943907558918,
-0.05268099531531334,
0.0222415030002594,
0.0031143450178205967,
0.014052423648536205,
0.0017264788039028645,
-0.02029893547296524,
0.020904874429106712,
0.04605131596326828,
0.0028403361793607473,
-0.012109857052564621,
-0.002996276132762432,
-0.020334579050540924,
0.0386018380522728,
0.030083058401942253,
0.01375836506485939,
-0.02457614801824093,
-0.028461281210184097,
-0.03788897022604942,
-0.03792461380362511,
-0.03211473301053047,
0.004399736411869526,
0.02625138871371746,
-0.028657320886850357,
0.02710683085024357,
0.03065335378050804,
0.026215745136141777,
-0.08041159063577652,
-0.017723698168992996,
-0.014257373288273811,
-0.018124686554074287,
0.08433236181735992,
0.0020249926019459963,
0.006594035308808088,
0.041702818125486374,
-0.012368271127343178,
0.013107872568070889,
0.03539393097162247,
0.03200780227780342,
-0.03735432028770447,
0.0660829246044159,
-0.05813444033265114,
-0.010568277910351753,
-0.020512796938419342,
-0.0076455166563391685,
-0.010559367015957832,
-0.01881973259150982,
0.008723730221390724,
0.00444206316024065,
0.05278792604804039,
-0.06244729459285736,
0.059488892555236816,
0.03863748162984848,
0.001834522932767868,
0.023489022627472878,
0.0444830060005188,
-0.02243754081428051,
-0.032631564885377884,
-0.029245438054203987,
-0.09260164201259613,
0.06144928187131882,
0.03938599303364754,
-0.024754364043474197,
-0.03432462736964226,
-0.05906116962432861,
0.02945929765701294,
0.026607822626829147,
0.011076197028160095,
0.004368548281490803,
0.026803862303495407,
0.05260970816016197,
-0.048938434571027756,
-0.04879586026072502,
0.022687045857310295,
0.023275163024663925,
-0.015433606691658497,
-0.03316621482372284,
-0.0442691445350647,
0.05727899819612503,
-0.032150376588106155,
0.026483071967959404,
0.03172265738248825,
-0.003894045250490308,
-0.011111840605735779,
-0.0012219015043228865,
-0.06130670756101608,
0.00563611788675189,
-0.06754430383443832,
-0.021528633311390877,
0.00011256920697633177,
-0.0016028407262638211,
-0.007347002625465393,
0.005337604321539402,
-0.005689583253115416,
-0.012671240605413914,
-0.016547463834285736,
0.016654394567012787,
0.028176134452223778,
-0.026714753359556198,
0.07442349195480347,
-0.03601768985390663,
0.03992064669728279,
0.025716736912727356,
-0.028532568365335464,
0.044340431690216064,
-0.017224689945578575,
0.008661354891955853,
0.01444450207054615,
0.03817411884665489,
-0.007324725855141878,
-0.0034395912662148476,
0.012662329711019993,
0.02254447154700756,
-0.06857796758413315,
-0.03425334021449089,
-0.008095514960587025,
-0.02653653733432293,
0.030956322327256203,
0.006816806737333536,
0.03131275624036789,
0.09752043336629868,
0.020227648317813873,
-0.004745032172650099,
0.03721174597740173,
0.04038400948047638,
-0.01707320474088192,
0.0372830331325531,
-0.0386018380522728,
-0.01814250834286213,
-0.016173208132386208,
-0.009534618817269802,
-0.04213053733110428,
0.018748445436358452,
-0.05610276386141777,
-0.013900939375162125,
0.011958371847867966,
-0.004188103601336479,
-0.04362756386399269,
0.020958339795470238,
-0.04772655665874481,
-0.05881166458129883,
0.027855344116687775,
0.027926631271839142,
-0.008995511569082737,
-0.005493544042110443,
-0.008835116401314735,
-0.07207102328538895,
-0.02995830588042736,
0.006037106737494469,
-0.002368060639128089,
0.018302902579307556,
0.0243088211864233,
0.04594438523054123,
-0.009534618817269802,
-0.03601768985390663,
0.00668314378708601,
-0.010969267226755619,
0.0140078691765666,
-0.014916776679456234,
0.008576701395213604,
0.06369481980800629,
0.039849359542131424,
-0.028639499098062515,
0.028710786253213882,
-0.00044053056626580656,
0.0386018380522728,
0.03441373631358147,
-0.012065302580595016,
0.04915229603648186,
-0.004941070917993784,
0.04876021668314934,
-0.047762200236320496,
0.06077205389738083,
-0.044162213802337646,
-0.010586099699139595,
-0.01981774903833866,
0.1007283478975296,
0.031865231692790985,
-0.025128621608018875,
-0.04020579531788826,
0.010381150059401989,
-0.006175225134938955,
0.015201924368739128,
0.03289888799190521,
-0.03092067874968052,
0.03072464093565941,
-0.013045497238636017,
-0.02516426518559456,
0.024665256962180138,
-0.03931470587849617,
-0.004851962439715862,
-0.024451395496726036,
0.06490669399499893,
-0.0425226166844368,
-0.013883117586374283,
0.06144928187131882,
-0.0817660391330719,
-0.04038400948047638,
-0.03503749519586563,
-0.023061301559209824,
-0.029031576588749886,
-0.006264333613216877,
0.03220384195446968,
0.005239584948867559,
-0.04676418378949165,
-0.021920712664723396,
0.0444830060005188,
0.024754364043474197,
-0.011147484183311462,
-0.010256398469209671,
0.009204916656017303,
0.011699956841766834,
0.01892666332423687,
0.022704867646098137,
0.01873062364757061,
-0.05827701464295387,
-0.016743503510951996,
-0.05200377106666565,
0.0425226166844368,
0.027071187272667885,
-0.018285080790519714,
-0.0011751194251701236,
-0.050898823887109756,
-0.011575205251574516,
-0.009703924879431725,
-0.018044488504529,
-0.12004708498716354,
-0.000899439794011414,
0.004651468247175217,
-0.01765241101384163,
-0.01546033937484026,
-0.007347002625465393,
-0.026999901980161667,
0.028853360563516617,
0.015050440095365047,
-0.004488844890147448,
-0.033986013382673264,
0.0029806820675730705,
0.06023740395903587,
0.005297505296766758,
-0.017741519957780838,
0.014569253660738468,
-0.03184740990400314,
-0.009048976935446262,
0.030564244836568832,
-0.0010520382784307003,
0.011521739885210991,
0.08718384057283401,
-0.09302936494350433,
0.0020650913938879967,
-0.06080769747495651,
0.05285921320319176,
-0.027570195496082306,
0.010844514705240726,
0.0032903344836086035,
-0.03874441236257553,
-0.05200377106666565,
0.05784929171204567,
-0.04783348739147186,
0.0017587806796655059,
0.01224351953715086,
-0.039564210921525955,
0.09502539783716202,
0.017385084182024002,
0.05218198895454407,
-0.009008877910673618,
-0.050791893154382706,
0.02372070588171482,
-0.040348365902900696,
-0.04398399591445923,
0.0018478892743587494,
0.0636591762304306,
-0.024344464763998985,
0.00021706294501200318,
0.015175191685557365,
-0.0558176189661026,
-0.017108848318457603,
0.010256398469209671,
-0.039279066026210785,
0.003818302880972624,
-0.026803862303495407,
-0.02908504195511341,
0.006420273333787918,
-0.04401963949203491,
0.0012508617946878076,
0.08026901632547379,
0.005493544042110443,
-0.021029626950621605,
0.03788897022604942,
0.021207842975854874,
-0.002960632788017392,
0.03756817802786827,
-0.024362286552786827,
-0.009917785413563251,
0.06027304753661156,
0.0279088094830513,
0.057706721127033234,
-0.05125525966286659,
0.0009289570152759552,
-0.02575238049030304,
0.039457280188798904,
0.03942163661122322,
-0.078059121966362,
-0.009320758283138275,
-0.06355224549770355,
0.03241770341992378,
0.017010828480124474,
0.007061855401843786,
0.0928867906332016,
0.011396988295018673,
0.019728640094399452,
-0.015201924368739128,
0.026679109781980515,
0.024326642975211143,
0.033130571246147156,
-0.025609808042645454,
-0.030172167345881462,
0.04013450816273689,
-0.04890279099345207,
0.02723158337175846,
-0.029601871967315674,
-0.05574633181095123,
-0.04519587382674217,
-0.011557383462786674,
-0.033914726227521896,
0.03963549807667732,
-0.05403544753789902,
-0.028051381930708885,
0.012894012033939362,
0.008844027295708656,
0.05318000167608261,
-0.0195147804915905,
0.03104543127119541,
0.03885134309530258,
0.03938599303364754,
-0.041809748858213425,
-0.002208779100328684,
0.06487105041742325,
0.04615824669599533,
0.06362353265285492,
-0.004163598641753197,
0.033986013382673264,
0.022669224068522453,
0.008113336749374866,
0.032168198376894,
0.037603821605443954,
-0.05043545737862587,
-0.0353226438164711,
0.03738996386528015,
0.03207908943295479,
-0.021403882652521133,
-0.009347490966320038,
0.045908741652965546,
-0.016814790666103363,
-0.014275195077061653,
0.016440533101558685,
-0.011200949549674988,
-0.023845456540584564,
-0.007324725855141878,
0.010211843997240067,
0.06733044981956482,
0.017928646877408028,
0.03268503025174141,
-0.032132554799318314,
-0.05221763253211975,
0.021617742255330086,
-0.018481120467185974,
0.005097011104226112,
-0.022116750478744507,
0.021047446876764297,
-0.020530618727207184,
0.011004909873008728,
-0.0034217697102576494,
-0.01785735972225666,
-0.06936211884021759,
0.013740544207394123
]
|
41,657 | pyglove.core.symbolic.object | members | Function/Decorator for declaring symbolic fields for ``pg.Object``.
Example::
@pg.members([
# Declare symbolic fields. Each field produces a symbolic attribute
# for its object, which can be accessed by `self.<field_name>`.
# Description is optional.
('x', pg.typing.Int(min_value=0, default=0), 'Description for `x`.'),
('y', pg.typing.Str(), 'Description for `y`.')
])
class A(pg.Object):
def sum(self):
return self.x + self.y
@pg.members([
# Override field 'x' inherited from class A and make it more restrictive.
('x', pg.typing.Int(max_value=10, default=5)),
# Add field 'z'.
('z', pg.typing.Bool().noneable())
])
class B(A):
pass
@pg.members([
# Declare dynamic fields: any keyword can be acceptable during `__init__`
# and can be accessed using `self.<field_name>`.
(pg.typing.StrKey(), pg.typing.Int())
])
class D(B):
pass
@pg.members([
# Declare dynamic fields: keywords started with 'foo' is acceptable.
(pg.typing.StrKey('foo.*'), pg.typing.Int())
])
class E(pg.Object):
pass
See :class:`pyglove.typing.ValueSpec` for supported value specifications.
Args:
fields: A list of pg.typing.Field or equivalent tuple representation as
(<key>, <value-spec>, [description], [metadata-objects]). `key` should be
a string. `value-spec` should be pg_typing.ValueSpec classes or
equivalent, e.g. primitive values which will be converted to ValueSpec
implementation according to its type and used as its default value.
`description` is optional only when field overrides a field from its
parent class. `metadata-objects` is an optional list of any type, which
can be used to generate code according to the schema.
metadata: Optional dict of user objects as class-level metadata which will
be attached to class schema.
init_arg_list: An optional sequence of strings as the positional argument
list for `__init__`. This is helpful when symbolic attributes are
inherited from base classes or the user want to change its order. If not
provided, the `init_arg_list` will be automatically generated from
symbolic attributes defined from ``pg.members`` in their declaration
order, from the base classes to the subclass.
**kwargs: Keyword arguments for infrequently used options. Acceptable
keywords are: * `serialization_key`: An optional string to be used as the
serialization key for the class during `sym_jsonify`. If None,
`cls.__type_name__` will be used. This is introduced for scenarios when we
want to relocate a class, before the downstream can recognize the new
location, we need the class to serialize it using previous key. *
`additional_keys`: An optional list of strings as additional keys to
deserialize an object of the registered class. This can be useful when we
need to relocate or rename the registered class while being able to load
existing serialized JSON values.
Returns:
a decorator function that register the class or function with schema
created from the fields.
Raises:
TypeError: Decorator cannot be applied on target class or keyword argument
provided is not supported.
KeyError: If type has already been registered in the registry.
ValueError: schema cannot be created from fields.
| def members(
fields: List[Union[
pg_typing.Field,
Tuple[Union[str, pg_typing.KeySpec], pg_typing.ValueSpec, str],
Tuple[Union[str, pg_typing.KeySpec], pg_typing.ValueSpec, str, Any]]],
metadata: Optional[Dict[str, Any]] = None,
init_arg_list: Optional[Sequence[str]] = None,
**kwargs
) -> pg_typing.Decorator:
"""Function/Decorator for declaring symbolic fields for ``pg.Object``.
Example::
@pg.members([
# Declare symbolic fields. Each field produces a symbolic attribute
# for its object, which can be accessed by `self.<field_name>`.
# Description is optional.
('x', pg.typing.Int(min_value=0, default=0), 'Description for `x`.'),
('y', pg.typing.Str(), 'Description for `y`.')
])
class A(pg.Object):
def sum(self):
return self.x + self.y
@pg.members([
# Override field 'x' inherited from class A and make it more restrictive.
('x', pg.typing.Int(max_value=10, default=5)),
# Add field 'z'.
('z', pg.typing.Bool().noneable())
])
class B(A):
pass
@pg.members([
# Declare dynamic fields: any keyword can be acceptable during `__init__`
# and can be accessed using `self.<field_name>`.
(pg.typing.StrKey(), pg.typing.Int())
])
class D(B):
pass
@pg.members([
# Declare dynamic fields: keywords started with 'foo' is acceptable.
(pg.typing.StrKey('foo.*'), pg.typing.Int())
])
class E(pg.Object):
pass
See :class:`pyglove.typing.ValueSpec` for supported value specifications.
Args:
fields: A list of pg.typing.Field or equivalent tuple representation as
(<key>, <value-spec>, [description], [metadata-objects]). `key` should be
a string. `value-spec` should be pg_typing.ValueSpec classes or
equivalent, e.g. primitive values which will be converted to ValueSpec
implementation according to its type and used as its default value.
`description` is optional only when field overrides a field from its
parent class. `metadata-objects` is an optional list of any type, which
can be used to generate code according to the schema.
metadata: Optional dict of user objects as class-level metadata which will
be attached to class schema.
init_arg_list: An optional sequence of strings as the positional argument
list for `__init__`. This is helpful when symbolic attributes are
inherited from base classes or the user want to change its order. If not
provided, the `init_arg_list` will be automatically generated from
symbolic attributes defined from ``pg.members`` in their declaration
order, from the base classes to the subclass.
**kwargs: Keyword arguments for infrequently used options. Acceptable
keywords are: * `serialization_key`: An optional string to be used as the
serialization key for the class during `sym_jsonify`. If None,
`cls.__type_name__` will be used. This is introduced for scenarios when we
want to relocate a class, before the downstream can recognize the new
location, we need the class to serialize it using previous key. *
`additional_keys`: An optional list of strings as additional keys to
deserialize an object of the registered class. This can be useful when we
need to relocate or rename the registered class while being able to load
existing serialized JSON values.
Returns:
a decorator function that register the class or function with schema
created from the fields.
Raises:
TypeError: Decorator cannot be applied on target class or keyword argument
provided is not supported.
KeyError: If type has already been registered in the registry.
ValueError: schema cannot be created from fields.
"""
serialization_key = kwargs.pop('serialization_key', None)
additional_keys = kwargs.pop('additional_keys', None)
if kwargs:
raise TypeError(f'Unsupported keyword arguments: {list(kwargs.keys())!r}.')
def _decorator(cls):
"""Decorator function that registers schema with an Object class."""
schema_utils.update_schema(
cls,
fields,
extend=True,
init_arg_list=init_arg_list,
metadata=metadata,
serialization_key=serialization_key,
additional_keys=additional_keys,
)
return cls
return typing.cast(pg_typing.Decorator, _decorator)
| (fields: List[Union[pyglove.core.typing.class_schema.Field, Tuple[Union[str, pyglove.core.typing.class_schema.KeySpec], pyglove.core.typing.class_schema.ValueSpec, str], Tuple[Union[str, pyglove.core.typing.class_schema.KeySpec], pyglove.core.typing.class_schema.ValueSpec, str, Any]]], metadata: Optional[Dict[str, Any]] = None, init_arg_list: Optional[Sequence[str]] = None, **kwargs) -> <function <lambda> at 0x7f2fa64d25f0> | [
0.019756605848670006,
-0.02526221051812172,
-0.0037831799127161503,
0.02089463733136654,
0.020289737731218338,
0.03067554160952568,
-0.009950070641934872,
-0.011288024485111237,
-0.021858373656868935,
-0.002975794021040201,
0.008150753565132618,
0.07451532036066055,
0.07193168252706528,
0.0156761035323143,
-0.0004088192363269627,
0.003739606821909547,
-0.022678574547171593,
0.027722815051674843,
-0.0028655794449150562,
-0.04293755441904068,
0.01584014482796192,
0.0217763539403677,
0.02645150199532509,
0.03988230600953102,
-0.006048987153917551,
0.006546234246343374,
0.03520715609192848,
0.04683351144194603,
-0.0458492711186409,
0.008509592153131962,
0.02312968671321869,
-0.025016149505972862,
0.00843269843608141,
-0.001731394324451685,
0.019818121567368507,
-0.08579309284687042,
0.02729220874607563,
0.038241900503635406,
-0.0602848194539547,
0.024524029344320297,
0.03779079020023346,
0.04347068816423416,
-0.051590681076049805,
-0.04482401907444,
0.03342321515083313,
0.025590291246771812,
0.06979916244745255,
0.0012309432495385408,
-0.011236762627959251,
-0.0657801702618599,
0.034017860889434814,
-0.0312906913459301,
0.012948933057487011,
-0.04412684589624405,
0.058357346802949905,
-0.013574336655437946,
-0.013010448776185513,
0.06639531999826431,
0.02255554497241974,
0.02089463733136654,
-0.008304541930556297,
0.005910578183829784,
-0.025651805102825165,
0.0010290967766195536,
-0.006879440974444151,
0.007776536513119936,
-0.0015993932029232383,
-0.061105020344257355,
-0.033812813460826874,
-0.04277351498603821,
-0.05675795301795006,
-0.017213981598615646,
0.06114603206515312,
0.006920451298356056,
-0.02630796656012535,
-0.014353528618812561,
-0.004670022986829281,
-0.02786635048687458,
0.01852630451321602,
-0.05712704360485077,
0.020843373611569405,
-0.03182382509112358,
-0.07668885588645935,
-0.01895691081881523,
0.04164573922753334,
0.02146877720952034,
-0.04392179846763611,
-0.008458329364657402,
-0.0006805110606364906,
-0.01818797178566456,
-0.05966966971755028,
-0.036991093307733536,
0.02116120234131813,
0.03674503415822983,
-0.08915591984987259,
-0.051754724234342575,
0.01920296996831894,
-0.004372700117528439,
-0.010011586360633373,
0.07008622586727142,
0.041707251220941544,
-0.03736018389463425,
-0.054502397775650024,
0.07738602161407471,
0.0017570257186889648,
-0.05880845710635185,
-0.06951209157705307,
-0.014681609347462654,
-0.012251761741936207,
-0.014978932216763496,
-0.02099716104567051,
-0.03161877393722534,
0.04219937324523926,
0.011431559920310974,
0.03266452997922897,
0.003396147396415472,
0.02614392712712288,
0.00030052699730731547,
0.0285430159419775,
-0.04839189723134041,
0.06762562692165375,
-0.008914566598832607,
-0.010288404300808907,
0.007407445926219225,
0.023785848170518875,
-0.015142972581088543,
0.05462542921304703,
0.012651610188186169,
0.010980449616909027,
0.012764387764036655,
0.011769893579185009,
0.034284427762031555,
-0.044577959924936295,
0.04716159403324127,
0.03879553824663162,
0.04232240468263626,
0.05433835834264755,
-0.034797053784132004,
-0.05524057894945145,
-0.04646442085504532,
0.026389988139271736,
0.007709895260632038,
0.021550796926021576,
-0.01300019584596157,
-0.07041431218385696,
-0.01296943798661232,
-0.015686355531215668,
0.02065882831811905,
-0.007479213643819094,
-0.027333218604326248,
-0.036724526435136795,
-0.04211735352873802,
0.07025027275085449,
0.051959771662950516,
-0.05499451979994774,
-0.01528650801628828,
-0.050401389598846436,
0.030244935303926468,
-0.007566359825432301,
0.04502907022833824,
0.00454699294641614,
0.009283657185733318,
-0.07402319461107254,
0.006048987153917551,
0.007525349967181683,
0.019561808556318283,
0.026348978281021118,
-0.10933287441730499,
-0.03356675058603287,
0.03947220370173454,
0.044988058507442474,
-0.04867896810173988,
0.05077048018574715,
0.014045952819287777,
-0.014240751042962074,
0.053354114294052124,
0.01754206232726574,
-0.01869034394621849,
0.010703631676733494,
0.020094940438866615,
0.041194625198841095,
-0.013779387809336185,
-0.00631555262953043,
-0.03660149872303009,
0.02864554151892662,
0.029568267986178398,
-0.029650289565324783,
0.01929524354636669,
0.052369873970746994,
-0.0010886895470321178,
0.013174489140510559,
0.01216974202543497,
0.00037453739787451923,
-0.011564843356609344,
-0.0008612117380835116,
0.010713883675634861,
-0.01923372782766819,
0.04798179492354393,
-0.05056542903184891,
0.04724361374974251,
-0.0021530291996896267,
0.042240384966135025,
0.018372517079114914,
-0.038139376789331436,
-0.006838431116193533,
0.02173534408211708,
0.010478075593709946,
-0.002614392666146159,
-0.025590291246771812,
-0.10186903923749924,
0.03354624658823013,
-0.014158730395138264,
-0.023990897461771965,
0.011472570709884167,
-0.0414406880736351,
-0.022904129698872566,
0.04273250326514244,
-0.03836493194103241,
0.023539787158370018,
-0.0062796687707304955,
0.08066683262586594,
0.026389988139271736,
-0.0994904562830925,
-0.013676862232387066,
0.06454987078905106,
-0.061679162085056305,
-0.04045644402503967,
-0.04630038142204285,
-0.02194039337337017,
-0.0805848091840744,
-0.026266956701874733,
0.013041205704212189,
-0.04867896810173988,
0.03791382163763046,
0.023929381743073463,
-0.005403078161180019,
0.029957864433526993,
0.00582343153655529,
0.020843373611569405,
0.013625599443912506,
-0.006392446346580982,
0.03643745556473732,
-0.04724361374974251,
-0.022206958383321762,
-0.016301507130265236,
0.001053446438163519,
-0.016075951978564262,
0.0055107297375798225,
0.011636611074209213,
-0.005541487131267786,
-0.04351169615983963,
-0.002324759028851986,
0.043429676443338394,
0.01679362915456295,
-0.05437936633825302,
-0.0014251003740355372,
-0.028563521802425385,
-0.030860086902976036,
0.012262014672160149,
-0.04835088551044464,
-0.011780145578086376,
-0.05163169279694557,
-0.03118816763162613,
0.032726045697927475,
0.085054911673069,
-0.014958427287638187,
0.04810482636094093,
0.004903268069028854,
-0.04351169615983963,
-0.0049673463217914104,
0.0002680072793737054,
0.012569589540362358,
0.005920830648392439,
-0.0015314702177420259,
0.009078606963157654,
-0.00938105583190918,
-0.0005757430917583406,
-0.04168674722313881,
0.06413976848125458,
-0.05766017362475395,
0.013369286432862282,
-0.034858569502830505,
0.013266761787235737,
-0.01130853034555912,
0.09161651879549026,
0.051180582493543625,
-0.015665851533412933,
0.06135108321905136,
-0.04913007840514183,
-0.019120950251817703,
0.057168055325746536,
-0.03014240972697735,
0.05314906686544418,
-0.01219024695456028,
0.025036655366420746,
0.04183028265833855,
-0.0480228066444397,
0.037770286202430725,
-0.0514676533639431,
-0.0951433926820755,
0.0073305522091686726,
0.032049380242824554,
0.04092806205153465,
0.044372908771038055,
-0.0015532568795606494,
-0.0468745231628418,
0.02109968662261963,
-0.034961093217134476,
0.008089238777756691,
0.01580938696861267,
-0.020935647189617157,
0.09391308575868607,
-0.01562484074383974,
0.025446755811572075,
0.029404228553175926,
0.005159581080079079,
-0.05417431890964508,
0.036622002720832825,
0.019326001405715942,
0.011810903437435627,
0.03815988078713417,
-0.019818121567368507,
0.0066692642867565155,
0.03338220715522766,
-0.02194039337337017,
0.022104434669017792,
-0.017757365480065346,
0.029609279707074165,
-0.024400997906923294,
-0.07221875339746475,
-0.02126372791826725,
-0.019613072276115417,
0.048884015530347824,
0.040517959743738174,
-0.027005137875676155,
0.03551473096013069,
0.005200590938329697,
-0.044577959924936295,
-0.005895199254155159,
-0.007627875078469515,
0.013533326797187328,
-0.026656553149223328,
0.0011425152188166976,
-0.0027553648687899113,
-0.04375775530934334,
-0.024811100214719772,
0.06541108340024948,
-0.03342321515083313,
0.044003818184137344,
0.04408583790063858,
0.03918513283133507,
-0.03139321878552437,
0.005290300585329533,
-0.039841294288635254,
0.0424044243991375,
-0.06459087878465652,
-0.04527512937784195,
0.013912670314311981,
-0.03057301603257656,
-0.026533523574471474,
-0.0007631719927303493,
-0.0014199740253388882,
-0.038713518530130386,
0.021612312644720078,
-0.0024285658728331327,
-0.007499718572944403,
-0.026287462562322617,
0.016229739412665367,
0.03627341613173485,
0.0003312845656182617,
0.03859048709273338,
-0.03118816763162613,
-0.022329989820718765,
0.002711791545152664,
0.0008695418946444988,
0.01950029283761978,
0.06873289495706558,
0.03182382509112358,
-0.07668885588645935,
0.005392825696617365,
-0.03229543939232826,
-0.02542624995112419,
0.012846408411860466,
0.006330931559205055,
0.027353724464774132,
0.05770118534564972,
0.003119329223409295,
0.002660528989508748,
0.008473708294332027,
-0.008458329364657402,
-0.04211735352873802,
0.01026277244091034,
-0.009960323572158813,
-0.018372517079114914,
-0.001917221350595355,
-0.022001909092068672,
0.0015084020560607314,
-0.00459569226950407,
0.017624082043766975,
-0.03637594357132912,
0.019613072276115417,
-0.11523833125829697,
0.032356955111026764,
0.008222521282732487,
0.020781857892870903,
-0.005582497455179691,
0.0971938967704773,
-0.053887248039245605,
0.013584589585661888,
0.06200724467635155,
0.0504424013197422,
-0.033033620566129684,
-0.03311564028263092,
-0.010611359030008316,
0.02076135389506817,
-0.005464593414217234,
0.012395297177135944,
-0.004316310863941908,
-0.023170696571469307,
0.021714838221669197,
0.03155725821852684,
0.028502006083726883,
-0.011093227192759514,
0.028563521802425385,
-0.03295160084962845,
0.016004184260964394,
-0.018505798652768135,
-0.02198140323162079,
0.012743882834911346,
0.06811774522066116,
0.00871976837515831,
0.007520223502069712,
-0.014568831771612167,
0.017285749316215515,
-0.018680091947317123,
-0.06906097382307053,
0.017378022894263268,
-0.012815650552511215,
-0.037565235048532486,
0.03344372287392616,
0.00606949208304286,
-0.028050895780324936,
0.013215498998761177,
-0.01689615286886692,
-0.009052975103259087,
0.054461389780044556,
0.03030645102262497,
0.008114869706332684,
0.060694921761751175,
0.05905451625585556,
0.049827247858047485,
-0.012005701661109924,
0.0905502587556839,
0.05241088569164276,
0.004882762674242258,
-0.07398218661546707,
0.03003988415002823,
-0.026246452704072,
0.001924910699017346,
-0.0007381814648397267,
0.016106709837913513,
-0.02032049559056759,
-0.0335257425904274,
-0.039123617112636566,
-0.0602848194539547,
0.03030645102262497,
0.013236003927886486,
-0.02983483485877514,
-0.01252857968211174,
0.019120950251817703,
0.04753068462014198,
0.034653518348932266,
-0.011605853214859962,
-0.01263110525906086,
-0.005438962019979954,
0.023990897461771965,
0.021386757493019104,
-0.015224992297589779,
-0.0948973298072815,
-0.08202016353607178,
0.045726239681243896,
0.004862257745116949,
0.04449594020843506,
-0.017993172630667686,
0.06381168961524963,
0.03596584126353264,
0.025856856256723404,
-0.019633576273918152,
-0.0028245693538337946,
0.031065136194229126,
0.022186454385519028,
0.044700987637043,
0.03133170306682587,
0.027128169313073158,
-0.024667564779520035,
-0.02759978547692299,
0.009627116844058037,
0.010180752724409103,
-0.012374792248010635,
-0.03414089232683182,
-0.02261706069111824,
0.026246452704072,
0.0032756803557276726,
0.017962414771318436,
0.03067554160952568,
-0.058398354798555374,
0.03996432572603226,
-0.018034182488918304,
-0.006966587621718645,
-0.012282519601285458,
-0.02657453343272209,
0.006643633358180523,
0.011554590426385403,
0.04105108976364136,
-0.039738770574331284,
0.014876406639814377,
0.018269991502165794,
0.03842644765973091,
-0.045767251402139664,
-0.06176118180155754,
-0.021304737776517868,
0.010426812805235386,
0.01307196356356144,
0.01268236804753542,
0.016209235414862633,
0.049048058688640594,
0.010713883675634861,
-0.011605853214859962,
0.027415240183472633,
0.03389483317732811,
0.042609475553035736,
0.012549084611237049,
-0.05864441767334938,
-0.02833796665072441,
-0.04236341267824173,
0.030244935303926468,
0.03619139641523361,
0.012938681058585644,
0.06081794947385788,
-0.0069819665513932705,
0.06422178447246552,
0.06471391022205353,
-0.032315943390131,
0.002297846134752035,
0.005813179071992636,
-0.03939018398523331,
0.03789331391453743,
-0.07082441449165344,
0.0058849467895925045,
-0.03047049045562744,
-0.01611696183681488,
-0.018782617524266243,
-0.009596358984708786,
0.04037442430853844,
-0.05056542903184891,
0.01987963728606701,
-0.009309288114309311,
0.011390550062060356,
0.020740848034620285,
0.0007926480029709637,
0.00742282485589385,
0.01585039682686329,
0.042609475553035736,
0.004928898997604847,
-0.015378780663013458,
0.0014276634901762009,
0.04543916881084442,
0.022699080407619476,
-0.031003622338175774,
0.001710889395326376,
-0.040887050330638885,
0.06118704006075859,
0.0013776824343949556,
0.012764387764036655,
0.01795216277241707,
-0.02989634871482849,
-0.03344372287392616,
0.06430380791425705,
-0.02844049222767353,
-0.15345972776412964,
0.015901658684015274,
0.0011316218879073858,
-0.013297518715262413,
-0.05343613773584366,
-0.002822006121277809,
0.02448301948606968,
-0.007684263866394758,
0.05540461838245392,
-0.012795145623385906,
0.014466306194663048,
-0.008181511424481869,
0.035432711243629456,
-0.03176230937242508,
-0.02932220883667469,
-0.014189488254487514,
-0.013297518715262413,
-0.07849329710006714,
0.036006852984428406,
0.028563521802425385,
-0.02421645261347294,
-0.07746804505586624,
0.05889047682285309,
-0.012866913340985775,
-0.07878036797046661,
-0.03227493539452553,
-0.04080503061413765,
0.04269149526953697,
0.033341195434331894,
0.03961573913693428,
-0.06672340631484985,
-0.040723010897636414,
-0.001944134128279984,
-0.008458329364657402,
0.015594083815813065,
-0.00021562332403846085,
-0.01933625340461731,
-0.05712704360485077,
0.017900900915265083,
0.059915728867053986,
-0.015727365389466286,
-0.042609475553035736,
0.024134432896971703,
0.03612988069653511,
0.008489087224006653,
0.007248532027006149,
0.0628274455666542,
-0.03375129774212837,
-0.02360130101442337,
0.02458554320037365,
-0.04084604233503342,
-0.003260301426053047,
0.022063422948122025,
-0.01310272142291069,
0.0034525361843407154,
0.02187887765467167,
-0.05495350807905197,
-0.042240384966135025,
-0.012395297177135944,
-0.000258235348155722,
-0.0190286785364151,
-0.04269149526953697,
-0.03637594357132912,
-0.014486811123788357,
0.056839972734451294,
-0.024052413180470467,
-0.0024311288725584745,
0.023888371884822845,
-0.048268865793943405,
0.054092299193143845,
-0.028050895780324936,
0.000778550747781992,
0.06684643030166626,
-0.005285174120217562,
-0.003583255922421813,
0.06988117843866348,
-0.0021325242705643177,
-0.01535827573388815,
-0.05880845710635185,
0.031126651912927628,
0.008191763423383236,
0.06422178447246552,
-0.06528805196285248,
0.04601331055164337,
-0.01954130455851555,
-0.03453048691153526,
0.03266452997922897,
0.0020966404117643833,
-0.005813179071992636,
0.02421645261347294,
0.041399676352739334,
-0.037237152457237244,
-0.04219937324523926,
0.02027948573231697,
-0.017593324184417725,
-0.00766888540238142,
0.015071204863488674,
0.035473719239234924,
0.016065699979662895,
-0.010918933898210526,
0.027538269758224487,
0.030121905729174614,
-0.06364765018224716,
0.0008439105586148798,
0.02157130278646946,
-0.04625937342643738,
-0.005210843402892351,
0.012590095400810242,
0.025405745953321457,
0.015122467651963234,
-0.041194625198841095,
0.04183028265833855,
-0.0436757355928421,
0.043593715876340866,
-0.03131119906902313,
-0.0134102962911129,
-0.042445436120033264,
-0.00565426517277956,
0.039841294288635254,
0.06118704006075859,
-0.020064182579517365,
-0.04326563701033592,
0.057783205062150955,
-0.021796857938170433,
0.03332069143652916,
0.021550796926021576,
-0.0026374608278274536,
0.025200694799423218,
-0.0042189122177660465,
0.043183617293834686,
-0.02052554488182068,
0.009186258539557457,
0.0252212006598711,
-0.016034942120313644,
-0.03918513283133507,
0.04564421996474266,
-0.05314906686544418,
0.046915534883737564,
0.059341587126255035,
0.017429284751415253,
-0.022535039111971855,
0.05187775194644928,
0.015173730440437794,
0.047489672899246216,
0.022022413089871407,
0.013246255926787853,
-0.061310071498155594,
-0.03680654987692833,
0.018495546653866768,
-0.013123226352036,
-0.02817392535507679,
0.07549955695867538,
0.03155725821852684,
-0.0503193698823452,
0.012989942915737629,
-0.009058102034032345,
-0.03114715777337551,
-0.008765905164182186,
-0.04178927466273308,
-0.054502397775650024,
0.04966320842504501,
-0.05355916544795036,
0.03992331400513649,
0.02708715945482254,
-0.028419986367225647,
0.02099716104567051,
0.032151903957128525,
-0.014876406639814377,
-0.01219024695456028,
0.019664334133267403,
-0.00302193034440279,
0.016814133152365685,
0.0536411851644516,
-0.04490603879094124,
-0.032049380242824554,
0.034489478915929794,
0.00020248728105798364,
-0.04107159748673439,
-0.02153029292821884,
-0.017818881198763847,
-0.06783067435026169,
-0.04580825939774513,
-0.049622200429439545,
0.002377303084358573,
-0.06483694165945053,
0.03168028965592384,
0.021755848079919815,
-0.001601956319063902,
0.00844807643443346
]
|
41,659 | pyglove.core.symbolic.base | ne | Compares if two values are not equal. Use symbolic equality if possible.
Example::
@pg.members([
('x', pg.typing.Any())
])
class A(pg.Object):
def sym_eq(self, right):
if super().sym_eq(right):
return True
return pg.eq(self.x, right)
class B:
pass
assert pg.ne(1, 2)
assert pg.ne(A(1), A(2))
# A has override `sym_eq`.
assert not pg.ne(A(1), 1)
# Objects of B are compared by references.
assert pg.ne(A(B()), A(B()))
Args:
left: The left-hand value to compare.
right: The right-hand value to compare.
Returns:
True if left and right is not equal or symbolically equal. Otherwise False.
| def ne(left: Any, right: Any) -> bool:
"""Compares if two values are not equal. Use symbolic equality if possible.
Example::
@pg.members([
('x', pg.typing.Any())
])
class A(pg.Object):
def sym_eq(self, right):
if super().sym_eq(right):
return True
return pg.eq(self.x, right)
class B:
pass
assert pg.ne(1, 2)
assert pg.ne(A(1), A(2))
# A has override `sym_eq`.
assert not pg.ne(A(1), 1)
# Objects of B are compared by references.
assert pg.ne(A(B()), A(B()))
Args:
left: The left-hand value to compare.
right: The right-hand value to compare.
Returns:
True if left and right is not equal or symbolically equal. Otherwise False.
"""
return not eq(left, right)
| (left: Any, right: Any) -> bool | [
0.03420211374759674,
0.0006928876973688602,
0.05334441363811493,
0.02687179483473301,
-0.04957038536667824,
-0.05298152565956116,
-0.0737023800611496,
0.02685365080833435,
0.07802073657512665,
-0.0007756713312119246,
0.008174032904207706,
-0.03639758378267288,
0.05624751001596451,
0.03813944011926651,
-0.04586893692612648,
-0.038828928023576736,
-0.05036873742938042,
0.051856573671102524,
-0.014660641551017761,
-0.06517453491687775,
-0.04623182490468025,
0.04282068461179733,
0.00964372605085373,
0.04771966114640236,
-0.000015938330761855468,
0.034655723720788956,
0.023896120488643646,
0.03659716993570328,
-0.039917588233947754,
0.11525296419858932,
-0.010569088160991669,
-0.035163767635822296,
0.02923056110739708,
-0.019995082169771194,
0.06027555838227272,
-0.003365778364241123,
-0.013608268462121487,
0.0484454371035099,
-0.13296185433864594,
-0.040679652243852615,
-0.03447427973151207,
-0.015341054648160934,
0.038066864013671875,
-0.009997541084885597,
-0.04797368124127388,
-0.06103762239217758,
0.01817157492041588,
-0.05425162985920906,
0.013989300467073917,
0.02424086257815361,
0.017400439828634262,
-0.04964296519756317,
0.00819217786192894,
0.08164960891008377,
-0.06394071877002716,
0.046848732978105545,
-0.007607022300362587,
0.025855710729956627,
-0.061545662581920624,
0.02790602296590805,
-0.05250977352261543,
-0.028795097023248672,
-0.023660242557525635,
-0.059586070477962494,
0.0016817551804706454,
-0.008564136922359467,
-0.046086668968200684,
-0.04862688109278679,
0.007466403301805258,
-0.016375282779335976,
-0.08818157762289047,
0.0010654140496626496,
0.00599217414855957,
0.029157983139157295,
-0.024458594620227814,
0.004781038500368595,
-0.004962482023984194,
0.07591599225997925,
0.013680846430361271,
-0.04104253649711609,
-0.027053236961364746,
-0.04209491237998009,
0.015803735703229904,
0.014996311627328396,
-0.03619799390435219,
0.055884622037410736,
0.03291386738419533,
0.04249408841133118,
0.038212019950151443,
-0.0294845812022686,
-0.020902300253510475,
-0.02360581047832966,
0.013045793399214745,
-0.06281577050685883,
0.01617569476366043,
0.04038934037089348,
0.02346065454185009,
0.00239278725348413,
0.013998372480273247,
-0.01428868155926466,
0.04372790455818176,
0.013989300467073917,
-0.005869699642062187,
0.008146816864609718,
-0.025910142809152603,
-0.012156720273196697,
0.011485378257930279,
-0.045288316905498505,
-0.0023474262561649084,
-0.01054187212139368,
-0.07395640015602112,
0.008491559885442257,
0.016221055760979652,
0.00567011209204793,
0.030754687264561653,
0.022117972373962402,
0.019505184143781662,
-0.005166606046259403,
0.03828459605574608,
-0.0021410342305898666,
-0.0008062898996286094,
0.08905250579118729,
-0.02767014689743519,
0.004139181692153215,
0.06695268303155899,
-0.004136913456022739,
0.07722238451242447,
0.005797122605144978,
-0.05965865030884743,
0.05613864213228226,
0.10226160287857056,
0.02148292027413845,
0.0025651585310697556,
0.05973122641444206,
0.00009199756459565833,
0.05508626997470856,
0.048699457198381424,
0.06894855946302414,
0.04300212860107422,
-0.038611192256212234,
-0.012147647328674793,
-0.026563340798020363,
0.0004510573926381767,
0.056791841983795166,
-0.017400439828634262,
0.03639758378267288,
-0.0962376743555069,
0.01649322174489498,
0.04467140883207321,
0.04456254467368126,
0.01375342346727848,
-0.026781072840094566,
0.028885817155241966,
0.047501929104328156,
-0.04347388073801994,
-0.0045995949767529964,
0.003334025852382183,
0.0032251595985144377,
-0.031498607248067856,
0.04155058041214943,
0.004862688016146421,
0.0066635156981647015,
0.027851589024066925,
-0.0038760884199291468,
0.010668882168829441,
-0.05526771396398544,
0.025619832798838615,
-0.01789940893650055,
0.02344251051545143,
0.015613219700753689,
0.004018975421786308,
-0.06158195063471794,
-0.06535597890615463,
-0.02897653914988041,
0.006863103248178959,
0.015957962721586227,
0.024875914677977562,
0.005996710155159235,
-0.05479596182703972,
0.027869734913110733,
0.031262729316949844,
-0.04205862060189247,
-0.01859796792268753,
-0.005234647076576948,
0.03197035938501358,
-0.0006979907630011439,
-0.028758807107806206,
-0.040425628423690796,
0.012537751346826553,
-0.003177530597895384,
-0.040824804455041885,
0.013190948404371738,
-0.03311345353722572,
0.02754313498735428,
0.07312176376581192,
-0.01928745210170746,
0.03962727636098862,
0.019759206101298332,
-0.014751363545656204,
0.055122558027505875,
-0.009834242053329945,
-0.005502276588231325,
0.004443099722266197,
-0.02003137208521366,
0.0030164995696395636,
-0.07101701945066452,
-0.04365532472729683,
-0.019341886043548584,
0.04557862877845764,
-0.029049117118120193,
-0.003930521663278341,
0.0035381498746573925,
0.04078851640224457,
0.031516749411821365,
0.006296092178672552,
0.05004214122891426,
-0.01617569476366043,
0.018226006999611855,
0.016647448763251305,
0.018797554075717926,
0.0547596737742424,
-0.061255354434251785,
-0.003962274175137281,
0.00039378926157951355,
0.018688688054680824,
-0.003966810181736946,
-0.0313715934753418,
0.050259873270988464,
0.0038261914160102606,
-0.07185165584087372,
-0.011612389236688614,
0.06408587098121643,
-0.021827662363648415,
-0.04071594029664993,
0.02819633297622204,
-0.023388078436255455,
-0.02596457675099373,
0.026291174814105034,
-0.020611990243196487,
0.045143164694309235,
-0.023533232510089874,
0.017064768821001053,
-0.0482277050614357,
0.013100226409733295,
0.054868537932634354,
-0.05504998192191124,
0.00861403439193964,
0.045941513031721115,
-0.011712183244526386,
0.02986561320722103,
-0.00969815906137228,
-0.0711984634399414,
-0.021192610263824463,
0.023569520562887192,
-0.009122076444327831,
0.034274693578481674,
-0.05621122196316719,
0.008414446376264095,
0.05936833843588829,
0.007511764299124479,
0.0009491767268627882,
0.014270537532866001,
-0.02990190126001835,
0.04282068461179733,
0.055521734058856964,
-0.01632085070014,
-0.021301476284861565,
0.03763139992952347,
0.03371221572160721,
-0.008700219914317131,
0.020739002153277397,
-0.04209491237998009,
-0.016230128705501556,
0.02594643272459507,
0.024476738646626472,
0.01783590391278267,
0.04245779663324356,
-0.019214875996112823,
-0.01107713021337986,
-0.026926226913928986,
-0.0385386161506176,
-0.003018767572939396,
-0.010687027126550674,
-0.06223514676094055,
-0.02605529874563217,
0.02767014689743519,
-0.0018609307007864118,
-0.059186894446611404,
-0.001002475735731423,
-0.048808321356773376,
0.04967925325036049,
0.02607344277203083,
0.023261066526174545,
0.04332872852683067,
0.010641666129231453,
0.06394071877002716,
0.001180517254397273,
-0.0267447829246521,
0.003971346188336611,
0.07112588733434677,
0.04075222834944725,
0.010995481163263321,
0.05356214568018913,
-0.01676538772881031,
0.03908294811844826,
-0.016357138752937317,
0.008564136922359467,
0.07312176376581192,
0.0427481085062027,
0.0049851625226438046,
-0.03940954431891441,
0.014297754503786564,
0.0043478417210280895,
0.033748507499694824,
0.03813944011926651,
0.01729157380759716,
0.025383956730365753,
-0.04035305231809616,
0.007670527324080467,
0.03850232809782028,
0.02164621837437153,
0.06789618730545044,
-0.058497410267591476,
0.03258726745843887,
-0.06336009502410889,
-0.05338070169091225,
-0.0272709708660841,
0.05385245382785797,
0.031498607248067856,
0.03420211374759674,
0.028994685038924217,
-0.006241659168154001,
0.05817081034183502,
-0.010578161105513573,
0.009190117008984089,
-0.005343513563275337,
0.012800844386219978,
0.0322243794798851,
0.030609531328082085,
-0.026436328887939453,
0.005856091622263193,
0.005416091065853834,
-0.00023885346308816224,
-0.0966731384396553,
-0.0023814470041543245,
-0.003724129404872656,
-0.060493290424346924,
0.011376512236893177,
0.012800844386219978,
0.05632008612155914,
-0.03632500395178795,
0.02291632443666458,
0.032841287553310394,
-0.025238802656531334,
0.0016477345488965511,
0.021954672411084175,
-0.0014991775387898088,
0.04416336864233017,
-0.0014969095354899764,
-0.0034020671155303717,
-0.01952333003282547,
0.023170344531536102,
-0.01613033376634121,
0.018162501975893974,
0.005915060639381409,
-0.01008826307952404,
-0.015359198674559593,
0.01729157380759716,
-0.03857490420341492,
-0.007602485828101635,
-0.04851801320910454,
-0.06132793053984642,
-0.008768261410295963,
-0.05015100538730621,
-0.02160993032157421,
-0.010260634124279022,
-0.028214477002620697,
-0.019160442054271698,
0.03723222389817238,
-0.038320884108543396,
0.049352653324604034,
-0.019868072122335434,
-0.009607437998056412,
0.0009009807836264372,
0.03169819340109825,
0.01876126602292061,
0.04118769243359566,
0.03955470025539398,
0.01623919978737831,
-0.01861611194908619,
-0.06495679914951324,
-0.043183572590351105,
-0.007040010765194893,
0.0313715934753418,
-0.04336501657962799,
-0.04862688109278679,
-0.046050380915403366,
-0.009997541084885597,
-0.10639851540327072,
-0.039881300181150436,
0.019976938143372536,
0.04525202885270119,
-0.013435897417366505,
-0.017763325944542885,
0.025510966777801514,
0.048300281167030334,
0.026381896808743477,
0.0029280458111315966,
0.0395909883081913,
0.0026785607915371656,
-0.03868377208709717,
-0.008169497363269329,
-0.0547596737742424,
-0.019033432006835938,
-0.001364228897728026,
0.0408610962331295,
0.053525857627391815,
-0.031770769506692886,
0.08186734467744827,
-0.05283636972308159,
-0.011267646215856075,
-0.049207497388124466,
0.006114648655056953,
-0.017128273844718933,
0.029194273054599762,
0.0005213667755015194,
0.028014888986945152,
-0.039772432297468185,
-0.041478004306554794,
0.04978811740875244,
-0.058134522289037704,
-0.03694191202521324,
0.058533698320388794,
-0.005243719555437565,
0.059186894446611404,
-0.060094114392995834,
0.005720009095966816,
-0.09340715408325195,
-0.05316296964883804,
0.044090788811445236,
-0.05653781816363335,
0.0010387644870206714,
-0.025619832798838615,
-0.03763139992952347,
-0.033240463584661484,
0.05363472178578377,
0.039010368287563324,
-0.02489405870437622,
0.0547596737742424,
0.020521268248558044,
-0.0310631413012743,
0.009906819090247154,
0.004490728490054607,
-0.016810746863484383,
-0.024730760604143143,
-0.044889140874147415,
-0.06016669049859047,
-0.02881324104964733,
-0.04089738428592682,
0.02556540071964264,
-0.03416582569479942,
-0.021011166274547577,
-0.05570317804813385,
-0.0009134550346061587,
-0.05871514230966568,
0.06615433096885681,
0.007516300305724144,
-0.014252393506467342,
0.003957738168537617,
0.04655842110514641,
-0.01278270035982132,
-0.02698066085577011,
-0.006114648655056953,
0.011358368210494518,
0.005411554593592882,
0.02347879856824875,
-0.031117573380470276,
-0.016547653824090958,
-0.060348134487867355,
-0.042530376464128494,
-0.06071102246642113,
0.027452412992715836,
-0.016348065808415413,
-0.017391366884112358,
0.06560999900102615,
-0.04884461313486099,
-0.02124704420566559,
0.009716304019093513,
0.014941878616809845,
-0.01705569587647915,
0.02124704420566559,
-0.0644487589597702,
-0.05338070169091225,
0.07838362455368042,
0.016611160710453987,
-0.04075222834944725,
-0.028885817155241966,
-0.022226838394999504,
0.000682114448864013,
-0.030736543238162994,
-0.011675894260406494,
0.05882401019334793,
0.00687671173363924,
0.016012396663427353,
0.06778731942176819,
-0.034401703625917435,
0.00249031325802207,
0.00032489740988239646,
-0.03079097531735897,
0.023932408541440964,
0.015368271619081497,
-0.024676326662302017,
0.04993327334523201,
-0.008963312953710556,
0.028414065018296242,
0.046739865094423294,
0.049062345176935196,
-0.03211551532149315,
-0.012075070291757584,
-0.040933672338724136,
0.04917120933532715,
-0.05316296964883804,
-0.0026536122895777225,
0.002417735755443573,
-0.013254453428089619,
0.026799216866493225,
-0.017971986904740334,
-0.008341868408024311,
0.058243390172719955,
-0.04416336864233017,
-0.011285791173577309,
0.006531968712806702,
-0.009870531037449837,
-0.03434726968407631,
-0.042276352643966675,
0.014715074561536312,
0.03890150412917137,
0.03407510370016098,
0.062452878803014755,
0.046449556946754456,
-0.01369899045675993,
-0.0219002403318882,
0.01566765271127224,
0.03445613756775856,
-0.030718397349119186,
0.05599348992109299,
-0.006091968156397343,
0.036379437893629074,
0.020013226196169853,
-0.012428885325789452,
0.024458594620227814,
-0.014415692538022995,
0.02239013835787773,
-0.058533698320388794,
-0.03342190757393837,
0.05461451783776283,
-0.0072985682636499405,
0.05856998637318611,
0.04038934037089348,
-0.004161862190812826,
0.008545992895960808,
-0.04703017696738243,
0.027234680950641632,
-0.06666237115859985,
0.007978981360793114,
-0.003710521152243018,
0.038828928023576736,
-0.04543347284197807,
0.04623182490468025,
0.07010979950428009,
0.004266192205250263,
0.045034296810626984,
0.03449242562055588,
-0.010523728094995022,
0.002038972219452262,
-0.005066812038421631,
-0.002989283064380288,
0.03539964184165001,
-0.030319223180413246,
-0.09427808225154877,
0.006785989739000797,
-0.027089526876807213,
-0.029647881165146828,
0.01756373792886734,
-0.03527263179421425,
-0.015449920669198036,
-0.037159644067287445,
0.0192693080753088,
0.017581883817911148,
-0.0037468099035322666,
-0.02491220273077488,
0.028014888986945152,
0.044889140874147415,
-0.07108959555625916,
0.002916705561801791,
0.03055509924888611,
-0.013807856477797031,
0.0492800772190094,
0.020666424185037613,
-0.005084956530481577,
-0.012174864299595356,
-0.0002825133269652724,
0.0005463152774609625,
-0.09594736248254776,
0.017872191965579987,
-0.042131200432777405,
-0.02215426042675972,
0.0009327334119006991,
0.009752592071890831,
0.012238369323313236,
0.025764988735318184,
-0.0016738170525059104,
-0.013109298422932625,
-0.04953409731388092,
0.045034296810626984,
0.009444138035178185,
0.004404542967677116,
-0.021591786295175552,
-0.04561491683125496,
0.016475077718496323,
-0.03890150412917137,
0.004000830929726362,
-0.020140238106250763,
0.010215274058282375,
0.010351356118917465,
-0.012492390349507332,
0.03262355551123619,
0.02623674087226391,
-0.01632085070014,
-0.030428089201450348,
-0.024186428636312485,
-0.0364338718354702,
0.006173617672175169,
-0.010414861142635345,
-0.037957996129989624,
-0.07410155981779099,
0.010959192179143429,
0.01008826307952404,
0.005311761051416397,
0.092245914041996,
-0.03705077990889549,
-0.009435066021978855,
-0.04583264887332916,
0.03784913197159767,
-0.051856573671102524,
0.006518360693007708,
0.02828705497086048,
-0.02164621837437153,
0.0070309387519955635,
0.0024767047725617886,
-0.0015150539111346006,
0.052364617586135864,
0.027452412992715836,
-0.024422306567430496,
-0.011231357231736183,
0.062053702771663666,
0.004071140196174383,
0.001991343218833208,
0.011666822247207165,
-0.03561737388372421,
0.043437592685222626,
-0.03483716771006584,
-0.030428089201450348,
0.0031503140926361084,
0.005289080552756786,
0.014588063582777977,
0.04140542447566986,
-0.017318788915872574,
0.01055094413459301,
-0.016248272731900215,
-0.008355476893484592,
0.020611990243196487,
0.02805117703974247,
-0.0793997123837471,
0.018416523933410645,
-0.00040172741864807904,
-0.026926226913928986,
0.01899714209139347,
-0.013807856477797031,
0.018434667959809303,
-0.04478027671575546,
0.0009435066021978855,
-0.04329243674874306,
-0.04416336864233017,
-0.003191139083355665,
0.02385983057320118,
-0.011830121278762817,
0.04891718924045563,
0.028359631076455116,
-0.021954672411084175,
-0.0015218580374494195,
-0.04100624844431877,
0.04075222834944725,
0.021682508289813995,
0.009516716003417969,
-0.05584833398461342,
0.005710936617106199,
0.009253622964024544,
-0.0032410358544439077,
0.003792170900851488,
-0.009716304019093513,
-0.017146417871117592,
0.008146816864609718,
-0.03392994776368141,
0.04746564105153084,
-0.0022521684877574444,
0.017844976857304573,
-0.002916705561801791,
0.028232621029019356,
-0.0005420626839622855,
-0.06891227513551712,
-0.0030890770722180605,
-0.009389705024659634,
-0.0427481085062027,
-0.027579424902796745,
0.01134022418409586,
0.047102753072977066,
0.01061444915831089,
-0.05817081034183502,
0.00957114901393652,
-0.03173448145389557,
-0.04688502103090286,
0.030827265232801437,
0.0026672205422073603,
0.032550979405641556,
0.0018337141955271363,
-0.034673869609832764,
-0.07025495171546936,
0.04176831245422363,
0.006772381719201803,
0.019487040117383003,
0.07642403990030289,
0.029012829065322876,
0.0284322090446949,
-0.059948958456516266,
0.0065909381955862045,
0.0150053845718503,
-0.023224778473377228,
-0.002031034091487527,
0.04641326889395714,
0.046122957020998,
0.0208478681743145,
0.08041579276323318,
-0.03186149150133133,
0.02491220273077488,
0.021972818300127983,
-0.023896120488643646,
0.03262355551123619,
-0.006913000252097845,
-0.02385983057320118,
0.05174770951271057,
0.017010334879159927,
0.017336934804916382,
-0.014497342519462109,
0.0034701083786785603,
0.04811883717775345,
0.025129936635494232,
-0.024440450593829155,
-0.04205862060189247,
-0.051965441554784775,
-0.004381862469017506,
0.04369161278009415,
-0.018960854038596153,
0.011811977252364159,
-0.07069041579961777,
-0.012864349409937859,
0.0035222736187279224,
0.040643360465765
]
|
41,660 | pyglove.core.symbolic.flags | notify_on_change | Returns a context manager to enable or disable notification upon change.
`notify_on_change` is thread-safe and can be nested. For example, in the
following code, `_on_change` (thus `_on_bound`) method of `a` will be
triggered due to the rebind in the inner `with` statement, and those of `b`
will not be triggered as the outer `with` statement disables the
notification::
with pg.notify_on_change(False):
with pg.notify_on_change(True):
a.rebind(b=1)
b.rebind(x=2)
Args:
enabled: If True, enable change notification in current scope.
Otherwise, disable notification.
Returns:
A context manager for allowing/disallowing change notification in scope.
| def notify_on_change(enabled: bool = True) -> ContextManager[None]:
"""Returns a context manager to enable or disable notification upon change.
`notify_on_change` is thread-safe and can be nested. For example, in the
following code, `_on_change` (thus `_on_bound`) method of `a` will be
triggered due to the rebind in the inner `with` statement, and those of `b`
will not be triggered as the outer `with` statement disables the
notification::
with pg.notify_on_change(False):
with pg.notify_on_change(True):
a.rebind(b=1)
b.rebind(x=2)
Args:
enabled: If True, enable change notification in current scope.
Otherwise, disable notification.
Returns:
A context manager for allowing/disallowing change notification in scope.
"""
return thread_local.thread_local_value_scope(
_TLS_ENABLE_CHANGE_NOTIFICATION, enabled, True
)
| (enabled: bool = True) -> ContextManager[NoneType] | [
0.10448145866394043,
-0.02263764850795269,
0.008586375042796135,
0.040125325322151184,
0.02769499644637108,
-0.014551451429724693,
-0.0059187631122767925,
0.019821835681796074,
0.04279293492436409,
-0.0714697614312172,
0.004388128407299519,
-0.08210315555334091,
-0.004462228622287512,
0.032974645495414734,
-0.03614243119955063,
-0.03399352356791496,
-0.09484841674566269,
-0.051055122166872025,
0.04305228963494301,
-0.01581115648150444,
0.00604843907058239,
0.03553110361099243,
0.04371919110417366,
-0.006659766659140587,
-0.03404909744858742,
0.04268178716301918,
-0.031844612210989,
0.037902314215898514,
0.06687553972005844,
0.014560713432729244,
0.0000094886763690738,
-0.014634814113378525,
-0.00604843907058239,
-0.0494249165058136,
-0.014004960656166077,
0.014662601053714752,
-0.031307388097047806,
0.07498952746391296,
0.02876945026218891,
-0.036364734172821045,
-0.008637319318950176,
-0.026453815400600433,
0.04438609257340431,
0.028565675020217896,
-0.00790557824075222,
0.011281774379312992,
-0.021822545677423477,
0.037142787128686905,
0.0781017392873764,
0.03149263560771942,
0.07432262599468231,
-0.013967910781502724,
-0.012087615206837654,
0.00818808563053608,
-0.02747269533574581,
0.02680579200387001,
0.028565675020217896,
0.03499387949705124,
0.03265971690416336,
-0.03632768243551254,
0.047276005148887634,
0.012550742365419865,
-0.004022258333861828,
-0.015672218054533005,
-0.03212248906493187,
-0.07891684770584106,
0.024879183620214462,
0.0011057157535105944,
0.02237829752266407,
0.04186668246984482,
-0.03125181049108505,
-0.006937642581760883,
-0.023119300603866577,
-0.030547859147191048,
-0.007595282979309559,
0.009781242348253727,
-0.04512709751725197,
0.008771625347435474,
0.0015561068430542946,
0.026991043239831924,
0.02574986219406128,
-0.0054648988880217075,
0.0794355496764183,
0.05650149658322334,
0.05216662585735321,
-0.009285696782171726,
-0.015737056732177734,
0.0053861672058701515,
0.0792873427271843,
0.016190920025110245,
0.014931214973330498,
0.06331872940063477,
0.04071812704205513,
-0.006159589160233736,
0.02706514298915863,
-0.022711748257279396,
0.004193615168333054,
0.030881309881806374,
-0.0324929915368557,
-0.009531154297292233,
-0.006303158588707447,
0.027657946571707726,
-0.013745609670877457,
-0.009716404601931572,
0.040273524820804596,
0.005275016650557518,
0.03197428956627846,
-0.037661489099264145,
0.05505653843283653,
-0.01734873838722706,
-0.024156704545021057,
-0.07587873190641403,
-0.012976818718016148,
0.024045554921030998,
-0.001549159875139594,
0.021507618948817253,
-0.09329230338335037,
-0.06357807666063309,
-0.004056992474943399,
-0.05064757168292999,
-0.03956957161426544,
0.03730951249599457,
0.0015213722363114357,
-0.015134991146624088,
0.0003742645203601569,
0.026361189782619476,
0.05450078845024109,
-0.0030056943651288748,
0.1080382689833641,
-0.05361158400774002,
-0.029695704579353333,
0.044941846281290054,
0.016950448974967003,
0.03945842385292053,
0.031177710741758347,
-0.028528625145554543,
-0.024953283369541168,
0.047572407871484756,
0.05479718744754791,
-0.038458067923784256,
-0.04019942507147789,
-0.008359442465007305,
-0.021933695301413536,
0.006951536517590284,
0.025416411459445953,
-0.033771220594644547,
-0.005900238174945116,
0.040940430015325546,
-0.04019942507147789,
-0.027268918231129646,
0.05020296946167946,
-0.026861367747187614,
0.009123601950705051,
0.0021535407286137342,
-0.0638003796339035,
0.08447436988353729,
-0.04264473542571068,
-0.0051268162205815315,
0.022155996412038803,
-0.023915879428386688,
-0.014514400623738766,
0.045534648001194,
-0.025601660832762718,
-0.01978478580713272,
0.06061406433582306,
0.023638002574443817,
-0.026435289531946182,
-0.08173265308141708,
-0.010809384286403656,
-0.014727438800036907,
0.009294959716498852,
0.036864910274744034,
0.04823930934071541,
0.03860626742243767,
0.03945842385292053,
0.03301169350743294,
0.011939414776861668,
-0.006391152739524841,
-0.047016654163599014,
0.025805437937378883,
0.012124665081501007,
0.023397177457809448,
-0.011402186937630177,
0.03262266889214516,
0.017728501930832863,
0.0032048390712589025,
0.02886207588016987,
0.013958648778498173,
0.04749830812215805,
-0.023712104186415672,
-0.040532875806093216,
-0.023378651589155197,
0.025157060474157333,
-0.005011034198105335,
-0.041199781000614166,
0.019080832600593567,
-0.0429411381483078,
-0.034808628261089325,
-0.05527884140610695,
0.0494619645178318,
-0.006511565763503313,
-0.0006889014621265233,
-0.024879183620214462,
0.02041463926434517,
-0.013310270383954048,
-0.02730596996843815,
0.0059974947944283485,
-0.028843550011515617,
0.016839299350976944,
0.012041302397847176,
0.007951891049742699,
0.014282837510108948,
-0.028454523533582687,
0.06465253233909607,
0.021563194692134857,
0.0117171136662364,
0.014421775005757809,
0.06091046705842018,
-0.04060697555541992,
-0.00500640319660306,
-0.046757303178310394,
-0.012810093350708485,
-0.05309288203716278,
-0.018701069056987762,
0.02587953768670559,
-0.001568842795677483,
0.04212603345513344,
-0.018932633101940155,
0.02708366885781288,
-0.03484567627310753,
0.03697606176137924,
0.045460548251867294,
-0.006789442151784897,
-0.04538644850254059,
0.05779825150966644,
-0.048869162797927856,
0.03758738934993744,
-0.001420642132870853,
-0.05246302857995033,
-0.005983601324260235,
0.018312042579054832,
0.005404692143201828,
0.07221076637506485,
0.05813170224428177,
-0.011272511444985867,
-0.018478767946362495,
0.03654998540878296,
0.022582072764635086,
-0.0037814320530742407,
0.04735010489821434,
-0.02235977165400982,
-0.07239601761102676,
-0.037161312997341156,
0.012967556715011597,
-0.057168398052453995,
-0.05227777734398842,
-0.042718835175037384,
0.023841779679059982,
0.00022982677910476923,
-0.0031052667181938887,
0.00365638779476285,
0.05683494731783867,
-0.05879860743880272,
0.018413931131362915,
0.09329230338335037,
-0.02289699949324131,
0.013217644765973091,
-0.026639066636562347,
0.007507288828492165,
-0.006618085317313671,
-0.127378448843956,
0.001336121466010809,
0.06517123430967331,
0.03236331790685654,
-0.040273524820804596,
-0.04712780565023422,
-0.011985727585852146,
0.04138503223657608,
-0.026750216260552406,
-0.005941919516772032,
-0.048202261328697205,
0.0006506934878416359,
0.011420711874961853,
0.025953637436032295,
-0.06476368010044098,
-0.032085441052913666,
-0.036086857318878174,
0.016079770401120186,
-0.0012874931562691927,
-0.0533151812851429,
-0.04475659504532814,
0.04749830812215805,
0.02419375628232956,
-0.010040594264864922,
0.0793614462018013,
-0.015588855370879173,
-0.015172041021287441,
0.0005748564144596457,
0.041162729263305664,
0.07239601761102676,
0.08825348317623138,
0.06528238207101822,
-0.05620509386062622,
0.019747735932469368,
0.039236120879650116,
-0.04149617999792099,
0.04008827358484268,
-0.03849511966109276,
-0.0097534554079175,
0.004462228622287512,
0.009234752506017685,
0.008762363344430923,
-0.028787976130843163,
-0.041459131985902786,
0.08136215806007385,
-0.048091109842061996,
0.014986790716648102,
-0.03604980558156967,
0.028009921312332153,
0.04631270095705986,
-0.030269982293248177,
-0.006659766659140587,
-0.016042720526456833,
0.040792226791381836,
-0.014403250068426132,
0.01132808718830347,
0.038421016186475754,
0.061725568026304245,
0.006238320842385292,
-0.0117171136662364,
-0.039754822850227356,
-0.017006024718284607,
-0.008975401520729065,
-0.036105383187532425,
-0.09788652509450912,
0.016283545643091202,
0.04620155319571495,
-0.013013869524002075,
-0.049647215753793716,
-0.045868098735809326,
0.05657559633255005,
0.04005122557282448,
-0.05375978350639343,
-0.02484213374555111,
-0.06772769242525101,
-0.016487322747707367,
0.004348762799054384,
0.01410684920847416,
0.056538548320531845,
-0.036123909056186676,
-0.046386800706386566,
-0.0007375297718681395,
-0.07780534029006958,
0.03177051246166229,
0.016968974843621254,
-0.028287798166275024,
0.02704661712050438,
-0.005807613022625446,
0.012069090269505978,
-0.03134443610906601,
-0.015005315653979778,
-0.0028134966269135475,
0.035827506333589554,
-0.025842487812042236,
-0.01937723532319069,
0.003630915889516473,
0.014542188495397568,
-0.03045523352921009,
0.0351235531270504,
-0.021544668823480606,
-0.02641676552593708,
0.02315635047852993,
-0.007711065001785755,
0.05650149658322334,
0.023360127583146095,
-0.025416411459445953,
-0.07906504720449448,
0.013532571494579315,
-0.0004784681077580899,
0.08373336493968964,
0.0781017392873764,
-0.037272460758686066,
0.04453429579734802,
0.002750974614173174,
-0.030603433027863503,
-0.039236120879650116,
0.017923016101121902,
-0.008484487421810627,
0.01702454872429371,
-0.020192338153719902,
-0.004527066834270954,
-0.005381536204367876,
-0.027398593723773956,
0.04634975269436836,
-0.014199474826455116,
-0.011087261140346527,
-0.003267361083999276,
-0.022600598633289337,
-0.004858202300965786,
-0.04475659504532814,
0.00024024714366532862,
0.05739070102572441,
-0.029566029086709023,
-0.08373336493968964,
-0.03110361099243164,
0.008197348564863205,
0.005094397347420454,
0.005187022499740124,
-0.009077289141714573,
0.009818293154239655,
-0.0520184263586998,
-0.0019995509646832943,
-0.03769854083657265,
-0.04253358393907547,
-0.0012886509066447616,
-0.07339636981487274,
0.011791214346885681,
-0.03215954080224037,
0.06980250775814056,
0.005418586079031229,
-0.03719836100935936,
-0.038161665201187134,
-0.020340539515018463,
-0.0038115354254841805,
-0.033623021095991135,
-0.018673282116651535,
-0.02015528827905655,
0.010651921853423119,
-0.012967556715011597,
0.04205193370580673,
0.06057701259851456,
-0.004608113784343004,
0.06476368010044098,
-0.0168948732316494,
0.0017668296350166202,
-0.02980685420334339,
0.012828618288040161,
0.010577821172773838,
-0.020525788888335228,
0.0007560548838227987,
0.019506910815835,
0.022545022889971733,
0.02706514298915863,
-0.018219416961073875,
0.03366007283329964,
-0.0299180056899786,
-0.02043316327035427,
0.007715696003288031,
-0.010244369506835938,
0.009901655837893486,
-0.024619832634925842,
0.021544668823480606,
0.03956957161426544,
0.049239665269851685,
-0.043496888130903244,
-0.031937237828969955,
-0.03879151865839958,
-0.03760591521859169,
-0.021785495802760124,
0.05898385867476463,
-0.01354183442890644,
-0.022545022889971733,
-0.061206866055727005,
0.0208036657422781,
0.03262266889214516,
-0.006882067304104567,
0.034401074051856995,
0.0023272132966667414,
-0.04527529701590538,
-0.007590651977807283,
0.09203260391950607,
-0.046016301959753036,
0.018450981006026268,
-0.03084426000714302,
-0.012634105049073696,
-0.004314028192311525,
-0.05972485989332199,
0.01483858935534954,
0.006877436302602291,
-0.03994007408618927,
-0.035716354846954346,
0.03931022062897682,
0.03158526122570038,
0.024675408378243446,
-0.029825380071997643,
-0.07699023932218552,
0.043385740369558334,
-0.013949385844171047,
-0.03756886348128319,
-0.020988916978240013,
-0.04453429579734802,
-0.01380118541419506,
0.023841779679059982,
0.001035667839460075,
0.02432343177497387,
-0.023471277207136154,
-0.0377541147172451,
-0.04868391156196594,
0.023989979177713394,
-0.02198927104473114,
0.00517312902957201,
-0.014745964668691158,
-0.006724604405462742,
0.04823930934071541,
0.045608747750520706,
-0.024360481649637222,
-0.037420663982629776,
0.026898417621850967,
-0.014097586274147034,
0.015690743923187256,
0.026509391143918037,
0.012939768843352795,
0.040532875806093216,
-0.02002561278641224,
-0.020470215007662773,
-0.01821015402674675,
0.025861013680696487,
0.020136762410402298,
0.014820064418017864,
-0.04127388074994087,
-0.0017413576133549213,
0.0044877007603645325,
0.05713135004043579,
-0.04060697555541992,
0.006506934762001038,
-0.04709075391292572,
0.0034387181513011456,
-0.0013442261843010783,
0.004909146577119827,
0.021489093080163002,
0.08032475411891937,
-0.025842487812042236,
0.019303133711218834,
-0.02976980432868004,
0.00686354236677289,
-0.042755886912345886,
-0.006618085317313671,
-0.09010599553585052,
-0.09418150782585144,
-0.004226034041494131,
0.022859949618577957,
0.03045523352921009,
0.03621653467416763,
0.020599890500307083,
-0.030269982293248177,
0.009670091792941093,
0.02889912575483322,
-0.03358597308397293,
0.019414285197854042,
-0.043496888130903244,
0.03306727111339569,
-0.03599423170089722,
-0.006928380113095045,
-0.01671888493001461,
-0.025935113430023193,
0.00805841013789177,
0.03228921443223953,
0.009985018521547318,
0.006886698771268129,
-0.005844662897288799,
-0.01881221868097782,
0.007196994032710791,
-0.03730951249599457,
0.041162729263305664,
0.015533280558884144,
-0.009058764204382896,
0.045719899237155914,
0.0703212097287178,
0.028269274160265923,
0.020988916978240013,
0.04101452976465225,
-0.020229388028383255,
0.013449208810925484,
-0.035179127007722855,
-0.026083312928676605,
0.024823607876896858,
0.0021628031972795725,
-0.03264119103550911,
-0.03143706172704697,
-0.000685427978169173,
-0.03599423170089722,
-0.048980314284563065,
-0.06839460134506226,
0.013708559796214104,
-0.0004191299667581916,
0.00018930317310150713,
-0.003883320139721036,
0.07565642893314362,
-0.02536083571612835,
0.04401559382677078,
-0.048054058104753494,
0.026490865275263786,
0.02510148473083973,
-0.05842810496687889,
0.040125325322151184,
0.03541995584964752,
-0.01708938740193844,
0.018061954528093338,
0.011735638603568077,
0.03890267014503479,
-0.018571393564343452,
0.01827499270439148,
0.002642139559611678,
-0.02915847674012184,
-0.02562018670141697,
-0.03595718368887901,
0.0370316356420517,
-0.04720190539956093,
0.009938705712556839,
0.029084376990795135,
-0.03464190289378166,
0.01647805981338024,
0.010309207253158092,
0.003987523727118969,
0.02938077785074711,
0.015246141701936722,
-0.05342633277177811,
0.036642611026763916,
-0.039495471864938736,
-0.005339854396879673,
0.008989295922219753,
0.07617513090372086,
0.001336121466010809,
-0.04797995835542679,
0.03604980558156967,
-0.03599423170089722,
0.02512000873684883,
-0.05031412094831467,
-0.07080285996198654,
-0.01838614232838154,
-0.03564225509762764,
0.0371057353913784,
-0.0026838211342692375,
-0.023100776597857475,
0.08988369256258011,
-0.04786881059408188,
-0.01579263061285019,
-0.009341271594166756,
-0.010568558238446712,
-0.02211894653737545,
-0.023230452090501785,
0.0038948983419686556,
0.021804019808769226,
-0.0703212097287178,
0.014727438800036907,
0.01745062693953514,
0.03149263560771942,
-0.02263764850795269,
0.01483858935534954,
-0.022971101105213165,
-0.01770997792482376,
-0.006340208929032087,
-0.0208036657422781,
0.004545591771602631,
-0.04531234875321388,
0.09166210144758224,
-0.033752698451280594,
-0.01840466819703579,
0.05238892883062363,
-0.02145204320549965,
-0.02743564546108246,
-0.002755605848506093,
0.009707142598927021,
0.06794999539852142,
0.02589806355535984,
0.038680367171764374,
0.01686708629131317,
0.034012049436569214,
0.07376687228679657,
0.019154934212565422,
0.036383260041475296,
-0.011661537922918797,
-0.03864331915974617,
0.011568913236260414,
0.01650584675371647,
-0.06995070725679398,
-0.022934049367904663,
0.005330591928213835,
-0.012282128445804119,
0.043015237897634506,
-0.023600952699780464,
0.07184026390314102,
0.007914841175079346,
0.02851009927690029,
0.02747269533574581,
0.030770158395171165,
0.036383260041475296,
-0.029862429946660995,
0.05368568375706673,
-0.006386521738022566,
-0.043904442340135574,
0.048720963299274445,
0.030659008771181107,
0.015255403704941273,
-0.038828570395708084,
-0.014764489606022835,
-0.04890621453523636,
-0.009836818091571331,
-0.027806146070361137,
-0.015894519165158272,
0.041051577776670456,
-0.03295611962676048,
0.01913640834391117,
-0.015134991146624088,
0.006173483096063137,
-0.002111859153956175,
-0.024267856031656265,
-0.0572795495390892,
0.01313428208231926,
0.016107557341456413,
-0.044978898018598557,
0.031566739082336426,
0.014634814113378525,
-0.02747269533574581,
0.016542896628379822,
-0.037420663982629776,
-0.06402268260717392,
-0.06083636358380318,
0.027750570327043533,
0.05212957784533501,
0.013449208810925484,
0.014088324271142483,
0.0350865013897419,
-0.028713874518871307,
0.01027215737849474,
0.04738715663552284,
0.05820580571889877,
-0.01393086090683937,
-0.018849270418286324,
-0.02108154259622097,
0.058354005217552185,
0.011439237743616104,
-0.028306324034929276,
0.03762443736195564,
0.06257772445678711,
0.011170623824000359,
-0.04331164062023163,
0.0403105765581131,
-0.048091109842061996,
0.04516414552927017,
0.035697828978300095,
-0.0009534627315588295,
-0.004316343925893307,
0.045090045779943466,
0.015023840591311455,
-0.0016209445893764496,
-0.021563194692134857,
0.039865974336862564,
-0.001286335289478302,
0.03736508637666702,
-0.024175230413675308,
-0.010105432011187077,
0.014227261766791344,
0.004895252641290426,
-0.0003977103333454579,
0.012837881222367287,
-0.03630915656685829,
-0.021544668823480606,
-0.02928815223276615,
-0.013245432637631893,
-0.0007959995418787003,
0.0846225693821907,
-0.006428203079849482,
0.05453783646225929,
-0.05998421087861061,
-0.034382548183202744,
-0.0011491338955238461,
0.05368568375706673
]
|
41,662 | pyglove.core.hyper.categorical | oneof | N choose 1.
Example::
@pg.members([
('x', pg.typing.Int())
])
class A(pg.Object):
pass
# A single categorical choice:
v = pg.oneof([1, 2, 3])
# A complex type as candidate.
v1 = pg.oneof(['a', {'x': 1}, A(1)])
# A hierarchical categorical choice:
v2 = pg.oneof([
'foo',
'bar',
A(pg.oneof([1, 2, 3]))
])
See also:
* :class:`pyglove.hyper.OneOf`
* :func:`pyglove.manyof`
* :func:`pyglove.floatv`
* :func:`pyglove.permutate`
* :func:`pyglove.evolve`
.. note::
Under symbolic mode (by default), `pg.oneof` returns a ``pg.hyper.OneOf``
object. Under dynamic evaluation mode, which is called under the context of
:meth:`pyglove.hyper.DynamicEvaluationContext.collect` or
:meth:`pyglove.hyper.DynamicEvaluationContext.apply`, it evaluates to
a concrete candidate value.
To use conditional search space in dynamic evaluation mode, the candidate
should be wrapped with a `lambda` function, which is not necessary under
symbolic mode. For example::
pg.oneof([lambda: pg.oneof([0, 1], name='sub'), 2], name='root')
Args:
candidates: Candidates to select from. Items of candidate can be any type,
therefore it can have nested hyper primitives, which forms a hierarchical
search space.
name: A name that can be used to identify a decision point in the search
space. This is needed when the code to instantiate the same hyper
primitive may be called multiple times under a
`pg.DynamicEvaluationContext.collect` context or under a
`pg.DynamicEvaluationContext.apply` context.
hints: An optional value which acts as a hint for the controller.
Returns:
In symbolic mode, this function returns a `ChoiceValue`.
In dynamic evaluation mode, this function returns one of the items in
`candidates`.
If evaluated under a `pg.DynamicEvaluationContext.apply` scope,
this function will return the selected candidate.
If evaluated under a `pg.DynamicEvaluationContext.collect`
scope, it will return the first candidate.
| def oneof(candidates: Iterable[Any],
*,
name: Optional[str] = None,
hints: Optional[Any] = None) -> Any:
"""N choose 1.
Example::
@pg.members([
('x', pg.typing.Int())
])
class A(pg.Object):
pass
# A single categorical choice:
v = pg.oneof([1, 2, 3])
# A complex type as candidate.
v1 = pg.oneof(['a', {'x': 1}, A(1)])
# A hierarchical categorical choice:
v2 = pg.oneof([
'foo',
'bar',
A(pg.oneof([1, 2, 3]))
])
See also:
* :class:`pyglove.hyper.OneOf`
* :func:`pyglove.manyof`
* :func:`pyglove.floatv`
* :func:`pyglove.permutate`
* :func:`pyglove.evolve`
.. note::
Under symbolic mode (by default), `pg.oneof` returns a ``pg.hyper.OneOf``
object. Under dynamic evaluation mode, which is called under the context of
:meth:`pyglove.hyper.DynamicEvaluationContext.collect` or
:meth:`pyglove.hyper.DynamicEvaluationContext.apply`, it evaluates to
a concrete candidate value.
To use conditional search space in dynamic evaluation mode, the candidate
should be wrapped with a `lambda` function, which is not necessary under
symbolic mode. For example::
pg.oneof([lambda: pg.oneof([0, 1], name='sub'), 2], name='root')
Args:
candidates: Candidates to select from. Items of candidate can be any type,
therefore it can have nested hyper primitives, which forms a hierarchical
search space.
name: A name that can be used to identify a decision point in the search
space. This is needed when the code to instantiate the same hyper
primitive may be called multiple times under a
`pg.DynamicEvaluationContext.collect` context or under a
`pg.DynamicEvaluationContext.apply` context.
hints: An optional value which acts as a hint for the controller.
Returns:
In symbolic mode, this function returns a `ChoiceValue`.
In dynamic evaluation mode, this function returns one of the items in
`candidates`.
If evaluated under a `pg.DynamicEvaluationContext.apply` scope,
this function will return the selected candidate.
If evaluated under a `pg.DynamicEvaluationContext.collect`
scope, it will return the first candidate.
"""
return OneOf(candidates=list(candidates), name=name, hints=hints)
| (candidates: Iterable[Any], *, name: Optional[str] = None, hints: Optional[Any] = None) -> Any | [
0.011136741377413273,
-0.05485842004418373,
-0.023052405565977097,
-0.07930175960063934,
-0.03145364299416542,
-0.011414927430450916,
0.03679483011364937,
-0.0382784903049469,
-0.018397415056824684,
0.0057909199967980385,
-0.018768329173326492,
0.055971164256334305,
-0.0008635378908365965,
0.04017015919089317,
-0.005647189915180206,
-0.03768502548336983,
0.03288166970014572,
0.0075342231430113316,
0.014456436038017273,
0.056935545057058334,
0.053708579391241074,
0.018925968557596207,
0.04747719690203667,
0.04606771841645241,
0.008206508122384548,
-0.03890904784202576,
0.05886430665850639,
0.011656022630631924,
-0.06631971150636673,
0.0377592071890831,
-0.016858113929629326,
-0.019027970731258392,
-0.009036431089043617,
-0.007659407332539558,
-0.0057167368941009045,
0.010311453603208065,
-0.0014268659288063645,
0.09391583502292633,
-0.01850868947803974,
-0.004335076082497835,
0.03086017817258835,
-0.019751256331801414,
-0.0770762637257576,
-0.007371947634965181,
-0.07989522069692612,
-0.04091199114918709,
0.017386669293045998,
0.06576333940029144,
-0.055006783455610275,
-0.030971452593803406,
0.0022498350590467453,
-0.022199299186468124,
-0.0010095859179273248,
-0.01785031333565712,
-0.015411543659865856,
0.07173507660627365,
-0.01424315944314003,
0.022588759660720825,
0.003991979174315929,
0.06305565685033798,
-0.05085252970457077,
0.008609878830611706,
0.04491788148880005,
-0.062350913882255554,
0.006226745899766684,
-0.018063589930534363,
0.025055348873138428,
-0.008563513867557049,
-0.05637917295098305,
0.04265529662370682,
-0.037147197872400284,
-0.010367090813815594,
-0.005902194418013096,
0.03538534790277481,
0.014539891853928566,
0.03306712582707405,
-0.01198984682559967,
0.05381985381245613,
0.047848112881183624,
-0.026501920074224472,
0.025055348873138428,
-0.018202682957053185,
-0.07518459111452103,
-0.11565148830413818,
-0.03551517054438591,
0.025574631989002228,
0.001659847330302,
-0.005624007899314165,
0.08004359155893326,
-0.0190094243735075,
0.04350839927792549,
-0.027818670496344566,
0.006903666537255049,
0.035032980144023895,
0.001007267739623785,
0.003952569328248501,
-0.007789227645844221,
0.001048416132107377,
-0.008939065970480442,
0.035032980144023895,
-0.09873773157596588,
0.011201651766896248,
-0.027280842885375023,
0.04313748702406883,
-0.011396382004022598,
-0.026279371231794357,
0.005809465888887644,
0.010942010208964348,
0.04795938730239868,
-0.0387977734208107,
-0.04536297917366028,
-0.04899795353412628,
-0.024777162820100784,
0.011943482793867588,
-0.009717988781630993,
0.05912394821643829,
-0.020289083942770958,
-0.018573598936200142,
-0.051334720104932785,
0.011424200609326363,
-0.012518402189016342,
0.035997360944747925,
-0.006991759408265352,
-0.05686136335134506,
0.0515572689473629,
-0.00905497744679451,
0.01675611175596714,
-0.038760680705308914,
-0.021494559943675995,
0.03126818686723709,
0.054561685770750046,
0.06832265853881836,
0.007849501445889473,
0.05048161372542381,
-0.01984398439526558,
0.016320286318659782,
-0.011776570230722427,
-0.024851346388459206,
-0.016255376860499382,
-0.009175525046885014,
-0.02778157964348793,
-0.01008890476077795,
0.02004798874258995,
-0.017896678298711777,
0.0377592071890831,
-0.04042980074882507,
0.031101273372769356,
-0.02783721685409546,
0.03067472018301487,
0.07804064452648163,
-0.005670372396707535,
0.004483442287892103,
0.01823977567255497,
0.07132706791162491,
-0.042506929486989975,
-0.041282907128334045,
0.031676191836595535,
-0.049925241619348526,
-0.04072653502225876,
-0.033604953438043594,
-0.0026520465034991503,
-0.008827791549265385,
-0.01798013411462307,
0.048812493681907654,
-0.00982926320284605,
-0.030711812898516655,
-0.07989522069692612,
-0.007167944218963385,
0.08338183164596558,
-0.02707683853805065,
0.009189434349536896,
-0.014502800069749355,
-0.026594650000333786,
-0.02726229652762413,
-0.04606771841645241,
0.05374567210674286,
-0.008725789375603199,
-0.024053877219557762,
0.05890139937400818,
-0.07781809568405151,
0.011591113172471523,
0.001948466058820486,
-0.07685371488332748,
-0.0507783479988575,
-0.00002923133797594346,
0.043471310287714005,
0.018137773498892784,
-0.003927068784832954,
-0.019769802689552307,
0.008660879917442799,
-0.024443337693810463,
-0.024777162820100784,
0.012490583583712578,
0.033159855753183365,
-0.00831314641982317,
-0.0058651030994951725,
-0.02449897676706314,
0.010125996544957161,
-0.021309101954102516,
-0.02468443289399147,
-0.026780106127262115,
-0.02384987287223339,
-0.02598263882100582,
0.03184310346841812,
-0.016598474234342575,
0.05767737701535225,
0.021216372027993202,
-0.013547692447900772,
0.06019960343837738,
-0.06246218830347061,
0.017961587756872177,
0.013909335248172283,
-0.04962850734591484,
0.04866412654519081,
-0.017497943714261055,
-0.006537387613207102,
-0.019250519573688507,
-0.04098617658019066,
-0.04054107517004013,
0.018443778157234192,
0.01469753123819828,
-0.002370382659137249,
0.06546660512685776,
0.05445041134953499,
0.05982868745923042,
-0.010747279971837997,
-0.04384222626686096,
0.04747719690203667,
0.004314212128520012,
0.023237863555550575,
0.00290705100633204,
-0.0008496285881847143,
0.028857234865427017,
-0.057714469730854034,
-0.04554843530058861,
0.043916407972574234,
0.004281756933778524,
-0.013900062069296837,
-0.0913936048746109,
0.03171328455209732,
0.0067413910292088985,
0.023478958755731583,
-0.007446130737662315,
-0.012230942025780678,
0.024740071967244148,
-0.04473242163658142,
-0.03469915688037872,
-0.01553209125995636,
0.006834120023995638,
-0.03212129324674606,
0.0045019881799817085,
-0.0034147417172789574,
0.0630185604095459,
-0.020122172310948372,
0.028189586475491524,
-0.04718046635389328,
-0.04395350068807602,
-0.01701575331389904,
0.027929944917559624,
0.0005413049948401749,
0.007654770743101835,
0.06576333940029144,
-0.024832800030708313,
0.05879012495279312,
-0.08427202701568604,
-0.015355906449258327,
-0.026335008442401886,
0.009059613570570946,
-0.010608186013996601,
-0.018768329173326492,
-0.023571686819195747,
0.00394561467692256,
0.03377186506986618,
0.010969828814268112,
-0.00876288115978241,
-0.019918167963624,
0.018286138772964478,
0.05619371309876442,
-0.0005181227461434901,
0.013158231042325497,
-0.012982046231627464,
0.017284667119383812,
0.010515457950532436,
0.002074809279292822,
-0.026761561632156372,
-0.0029673248063772917,
-0.04298911988735199,
0.012963500805199146,
-0.020845457911491394,
-0.027151022106409073,
0.04554843530058861,
0.012509129010140896,
0.07288491725921631,
-0.012045484036207199,
-0.029988527297973633,
0.07789228111505508,
0.021105097606778145,
0.016515016555786133,
0.012907863594591618,
-0.06624552607536316,
0.05241037532687187,
0.006991759408265352,
-0.015049900859594345,
-0.024072423577308655,
-0.04310039430856705,
-0.04028143361210823,
-0.025537539273500443,
-0.0378890298306942,
0.07492495328187943,
0.03720283508300781,
-0.037814848124980927,
-0.04729174077510834,
0.04098617658019066,
0.02192111313343048,
0.0073765842244029045,
0.0028931417036801577,
0.01005181297659874,
0.016579927876591682,
0.022662943229079247,
-0.028022674843668938,
-0.01308404840528965,
0.09272890537977219,
-0.020715637132525444,
-0.0014291842235252261,
-0.10504329949617386,
-0.003734656609594822,
0.02184692956507206,
0.02869032323360443,
-0.03137946128845215,
0.00518818199634552,
-0.06001414731144905,
-0.04636445268988609,
0.033475134521722794,
0.0648360475897789,
-0.0400959774851799,
0.04699500650167465,
0.039205778390169144,
0.020140716806054115,
0.031231094151735306,
-0.01188784558326006,
0.04332294315099716,
0.005517369601875544,
-0.0018105318304151297,
-0.022347666323184967,
0.028319407254457474,
0.05656462907791138,
0.02971033938229084,
-0.013445691205561161,
0.07848574221134186,
-0.033030033111572266,
-0.01571754924952984,
-0.03228820487856865,
0.05459877848625183,
-0.058753032237291336,
0.08241745084524155,
-0.035218436270952225,
0.000046147117245709524,
0.014604802243411541,
-0.027892854064702988,
0.005327275488525629,
0.029561974108219147,
-0.07481367886066437,
-0.023682961240410805,
0.003134236903861165,
0.014753168448805809,
-0.009388801641762257,
-0.021958203986287117,
0.024220788851380348,
0.005730646196752787,
-0.039873428642749786,
-0.013204596005380154,
0.01485516969114542,
-0.07036269456148148,
-0.025166623294353485,
0.04918340966105461,
0.00714012561365962,
0.022329119965434074,
0.04302620887756348,
-0.004184391815215349,
-0.0003158578183501959,
-0.021735655143857002,
-0.014224614016711712,
0.03965087980031967,
0.009977630339562893,
-0.05715809389948845,
0.00925434473901987,
-0.0059300134889781475,
0.014780987054109573,
0.013445691205561161,
0.03390168771147728,
0.05671299621462822,
0.0031666920986026525,
-0.0309899989515543,
0.026186641305685043,
-0.004849721677601337,
0.01183220837265253,
0.007107670418918133,
-0.02229202724993229,
-0.05263292416930199,
-0.03106418251991272,
0.04981396719813347,
0.0049239047802984715,
-0.049146316945552826,
-0.0015590046532452106,
-0.0755184143781662,
0.006773846223950386,
0.05734355375170708,
0.019120698794722557,
0.010135268792510033,
0.017238302156329155,
0.02377569116652012,
0.02887577936053276,
0.01863851025700569,
-0.030433624982833862,
-0.028579046949744225,
0.06928703933954239,
0.04654990881681442,
0.018731238320469856,
0.02856050245463848,
-0.015810277312994003,
0.07796645909547806,
0.013250960037112236,
0.010422728955745697,
0.04065234959125519,
0.04310039430856705,
-0.008837064728140831,
0.01188784558326006,
0.009894173592329025,
0.03239947929978371,
-0.02410951443016529,
-0.0419134646654129,
-0.06858229637145996,
-0.004694400820881128,
-0.09888610243797302,
-0.028634684160351753,
-0.021346192806959152,
-0.04944305121898651,
-0.009003976359963417,
0.017961587756872177,
-0.014539891853928566,
0.04280366003513336,
-0.0016192784532904625,
-0.00022023114433977753,
-0.028820142149925232,
0.0012170668924227357,
-0.007617679424583912,
0.010367090813815594,
0.0015590046532452106,
-0.03705446794629097,
-0.033159855753183365,
0.04718046635389328,
-0.015031355433166027,
0.03701737895607948,
-0.018286138772964478,
0.026260824874043465,
-0.004515897482633591,
-0.06045924499630928,
-0.01105328556150198,
-0.004803357180207968,
-0.011730206198990345,
0.014678984880447388,
-0.039613787084817886,
0.08746190369129181,
-0.00002651467002579011,
-0.041023265570402145,
0.02353459596633911,
-0.0069314856082201,
0.01630174182355404,
0.017581399530172348,
-0.003764793509617448,
0.002809685654938221,
-0.0105432765558362,
0.06290728598833084,
-0.008521785959601402,
0.011841480620205402,
-0.013260233215987682,
0.020066535100340843,
-0.03111981973052025,
0.042952027171850204,
-0.028968509286642075,
0.034643519669771194,
-0.01818413846194744,
0.08241745084524155,
-0.020400358363986015,
0.02132764831185341,
-0.017739038914442062,
-0.02327495440840721,
0.006351929623633623,
-0.059717413038015366,
0.027633212506771088,
-0.03004416450858116,
0.007844865322113037,
-0.015485726296901703,
-0.04962850734591484,
0.001541618024930358,
-0.0022950402926653624,
0.040133070200681686,
0.0019507842371240258,
0.011006920598447323,
-0.01610700972378254,
-0.02262585237622261,
0.028820142149925232,
-0.0064353859052062035,
-0.00830850936472416,
0.01734957844018936,
-0.035997360944747925,
0.006008832715451717,
-0.044250231236219406,
-0.053263481706380844,
0.03338240459561348,
-0.051779817789793015,
-0.040503986179828644,
-0.019621435552835464,
0.01304695662111044,
0.01721975766122341,
0.04284075275063515,
0.08390110731124878,
-0.024702979251742363,
-0.10593349486589432,
-0.05819666013121605,
-0.009036431089043617,
0.0000950471221585758,
0.05452459305524826,
0.035348258912563324,
-0.04361967742443085,
0.026557557284832,
-0.00815087091177702,
-0.02288549393415451,
0.006597661413252354,
0.0019090563291683793,
0.06346365809440613,
-0.031750377267599106,
-0.030823087319731712,
0.062091272324323654,
-0.049480143934488297,
-0.04680955037474632,
-0.004599353764206171,
0.014447162859141827,
0.05289256572723389,
0.04221019521355629,
0.03820430859923363,
-0.003046144498512149,
-0.0066579352132976055,
0.059717413038015366,
0.02093818597495556,
-0.03048926219344139,
0.044695332646369934,
0.009110614657402039,
0.044435691088438034,
-0.009486166760325432,
-0.00972726196050644,
-0.07077069580554962,
0.021494559943675995,
-0.0008432534523308277,
-0.08249162882566452,
-0.04847867041826248,
0.02294113114476204,
-0.010626732371747494,
-0.0021292874589562416,
-0.02687283605337143,
-0.004047616384923458,
-0.014873716048896313,
0.05218782648444176,
-0.009486166760325432,
0.053263481706380844,
0.0059392862021923065,
-0.006115471012890339,
-0.001015381421893835,
0.10504329949617386,
0.010227997787296772,
0.048886675387620926,
0.029988527297973633,
-0.03460642695426941,
-0.05708391219377518,
-0.0005859307711943984,
0.006852665916085243,
-0.029988527297973633,
0.009551077149808407,
-0.06594879180192947,
0.0016494153533130884,
-0.07611188292503357,
-0.016134828329086304,
-0.034569334238767624,
-0.07218017429113388,
0.02229202724993229,
-0.000982346828095615,
0.0068063014186918736,
0.01415043044835329,
-0.010728733614087105,
0.07455404102802277,
-0.0035909267608076334,
0.020845457911491394,
0.026909926906228065,
0.027688849717378616,
-0.03950251266360283,
0.03204710781574249,
-0.01244421862065792,
-0.014196794480085373,
0.026650287210941315,
-0.04306330159306526,
-0.06594879180192947,
0.022848401218652725,
-0.04781102016568184,
0.0015300269005820155,
0.03588608652353287,
0.0421731062233448,
-0.024461884051561356,
0.02177274599671364,
0.05979159474372864,
0.009078159928321838,
0.026464829221367836,
0.00785877462476492,
-0.01378878764808178,
0.024276426061987877,
-0.020530179142951965,
0.01549499947577715,
-0.003335922257974744,
0.02843068167567253,
-0.004413895774632692,
0.03208420053124428,
-0.05608243867754936,
-0.004515897482633591,
-0.017127027735114098,
-0.020901095122098923,
-0.03965087980031967,
-0.04421314224600792,
-0.008980793878436089,
-0.06728409230709076,
0.01863851025700569,
0.007432221435010433,
0.01837886869907379,
0.012833680026233196,
-0.03416132926940918,
-0.014057701453566551,
0.032010018825531006,
0.02314513362944126,
-0.010023994371294975,
-0.01863851025700569,
-0.03718429058790207,
0.03152782842516899,
-0.0705481469631195,
0.030081255361437798,
0.017238302156329155,
0.025370627641677856,
0.029339425265789032,
0.021383285522460938,
-0.039539605379104614,
0.02642773650586605,
0.05715809389948845,
-0.014836624264717102,
-0.01211966760456562,
0.03364204615354538,
-0.04718046635389328,
0.021680017933249474,
0.06728409230709076,
0.017451578751206398,
0.023553140461444855,
-0.02694701962172985,
-0.026205187663435936,
0.02770739607512951,
0.018007952719926834,
-0.04747719690203667,
0.0893164798617363,
-0.01382587943226099,
0.01765558309853077,
0.03538534790277481,
-0.002881550695747137,
-0.05237328261137009,
-0.04310039430856705,
0.09814427047967911,
-0.04176509752869606,
-0.013900062069296837,
0.016255376860499382,
-0.03894614055752754,
0.005151090677827597,
-0.03540389612317085,
0.009013249538838863,
0.07640861719846725,
-0.040763624012470245,
0.026650287210941315,
0.021884020417928696,
-0.041653823107481,
0.02372005395591259,
-0.011878572404384613,
-0.01111819501966238,
-0.0801919549703598,
0.006449295207858086,
0.018925968557596207,
-0.017368122935295105,
0.00867015216499567,
-0.011238742619752884,
-0.048627037554979324,
0.05723227933049202,
0.03707301616668701,
0.0037949304096400738,
0.0025175896007567644,
-0.02229202724993229,
-0.01286149863153696,
-0.038834862411022186,
0.04781102016568184,
0.04091199114918709,
-0.012073302641510963,
-0.01855505257844925,
-0.004409259185194969,
-0.042692385613918304,
0.0630185604095459,
0.007617679424583912,
0.04272947832942009,
0.03816721588373184,
-0.008878792636096478,
-0.02822667732834816,
0.06884193420410156,
0.020734181627631187,
0.039539605379104614,
0.03204710781574249,
0.02804121933877468,
0.007293127942830324,
0.05459877848625183,
0.0013364553451538086,
0.010190906003117561,
-0.016264649108052254,
-0.012397854588925838,
0.013668240047991276,
-0.06702444702386856,
-0.008192598819732666,
0.03486606851220131,
0.005044452380388975,
-0.025871364399790764,
0.01037636399269104,
0.015170448459684849,
0.040244344621896744,
-0.03842685744166374,
-0.02635355480015278,
-0.017831766977906227,
0.030656175687909126,
-0.016014281660318375,
0.07440567016601562,
0.009300708770751953,
-0.015059174038469791,
-0.03636827692389488,
-0.06806301325559616,
0.016005009412765503,
0.048181936144828796,
-0.0274663008749485,
-0.029469246044754982,
-0.020029442384839058,
0.043730951845645905,
0.006690390408039093,
-0.017896678298711777,
0.030952908098697662,
-0.01585664227604866,
0.014753168448805809,
0.06928703933954239,
0.010728733614087105,
-0.010033267550170422,
-0.047848112881183624,
-0.01571754924952984,
-0.040133070200681686,
-0.04910922795534134,
0.006231382023543119,
-0.004309575539082289,
0.05292965844273567,
0.051854003220796585,
-0.004756992682814598,
-0.028375044465065002,
-0.05819666013121605,
0.009949810802936554,
0.011183105409145355
]
|
41,664 | pyglove.core.patching.rule_based | patch | Apply patches to a symbolic value.
Args:
value: A symbolic value to patch.
rule: A patching rule is one of the following:
1) A dict of symbolic paths to the new values.
2) A rebind function defined by signature (k, v) or (k, v, p).
See :meth:`pyglove.Symbolic.rebind`.
3) A :class:`pyglove.patching.Patcher` object.
4) A URL-like string representing an instance of a register Patcher.
The format is "<patcher_name>?<arg1>&<arg2>=<val2>".
5) A list of the mixtures of above.
Returns:
Value after applying the patchers. If any patcher returned a new value
(by returning a single-item dict that containing '' as key), the return
value will be a different object other than `value`, otherwise `value`
will be returned after applying the patches.
Raises:
ValueError: Error if the patch name and arguments cannot
be parsed successfully.
| def patch(value: symbolic.Symbolic, rule: PatchType) -> Any:
"""Apply patches to a symbolic value.
Args:
value: A symbolic value to patch.
rule: A patching rule is one of the following:
1) A dict of symbolic paths to the new values.
2) A rebind function defined by signature (k, v) or (k, v, p).
See :meth:`pyglove.Symbolic.rebind`.
3) A :class:`pyglove.patching.Patcher` object.
4) A URL-like string representing an instance of a register Patcher.
The format is "<patcher_name>?<arg1>&<arg2>=<val2>".
5) A list of the mixtures of above.
Returns:
Value after applying the patchers. If any patcher returned a new value
(by returning a single-item dict that containing '' as key), the return
value will be a different object other than `value`, otherwise `value`
will be returned after applying the patches.
Raises:
ValueError: Error if the patch name and arguments cannot
be parsed successfully.
"""
patches = []
rules = rule if isinstance(rule, list) else [rule]
for p in rules:
if isinstance(p, str):
p = from_uri(p)
if not isinstance(p, (Patcher, dict)) and not callable(p):
raise TypeError(
f'Patching rule {p!r} should be a dict of path to values, a rebind '
f'function, a patcher (object or string), or a list of their '
f'mixtures.')
patches.append(p)
# Apply patches in chain.
for p in patches:
if isinstance(p, Patcher):
value = p.patch(value)
elif isinstance(p, dict):
if len(p) == 1 and '' in p:
value = p['']
else:
value = value.rebind(p, raise_on_no_change=False)
else:
value = value.rebind(p, raise_on_no_change=False)
# Validate patched values.
for p in patches:
if isinstance(p, Patcher):
p.validate(value)
return value
| (value: pyglove.core.symbolic.base.Symbolic, rule: Union[Dict[str, Any], Callable, pyglove.core.patching.rule_based.Patcher, str, List[Union[Dict[str, Any], Callable, pyglove.core.patching.rule_based.Patcher, str]]]) -> Any | [
0.07397180050611496,
-0.03660384938120842,
-0.011243131011724472,
0.024742165580391884,
-0.043699029833078384,
-0.018138190731406212,
-0.06312891095876694,
0.008637016639113426,
0.05144914984703064,
-0.02346867136657238,
-0.0025606323033571243,
-0.023123009130358696,
-0.008946293964982033,
0.03900529444217682,
-0.010178853757679462,
-0.009705842472612858,
-0.0318373441696167,
0.07764673978090286,
0.017392287030816078,
0.01937529817223549,
0.031109634786844254,
0.003090496640652418,
0.021940479055047035,
0.01921156421303749,
0.009578492492437363,
0.021049033850431442,
0.04930240288376808,
0.001453147386200726,
0.02106722630560398,
0.0066358125768601894,
0.04177059605717659,
-0.014254034496843815,
0.0340750552713871,
-0.02068517729640007,
0.027780357748270035,
-0.08819854259490967,
-0.06560312211513519,
0.0774284228682518,
-0.05188577622175217,
0.006203734315931797,
0.013726443983614445,
0.02492409385740757,
-0.024487467482686043,
0.0007134976331144571,
0.01523644383996725,
0.01836559921503067,
-0.04326240345835686,
0.09554842114448547,
-0.012780420482158661,
-0.023304937407374382,
-0.018865901976823807,
-0.024614816531538963,
0.043044090270996094,
-0.008787107653915882,
0.013853793032467365,
0.03240131959319115,
0.0020500975660979748,
0.0535958968102932,
0.04522722214460373,
-0.00035959144588559866,
0.06483902782201767,
-0.00606728857383132,
-0.044608667492866516,
-0.0887807086110115,
-0.017601503059267998,
-0.07415372878313065,
0.01908421516418457,
-0.02466939389705658,
-0.005248613655567169,
-0.015272829681634903,
-0.08608818054199219,
-0.012170962058007717,
0.04242553561925888,
-0.0710245668888092,
0.03765903040766716,
0.01459060050547123,
0.038532283157110214,
-0.00465052668005228,
0.05585179850459099,
-0.025015056133270264,
-0.030327346175909042,
-0.0005435089697130024,
-0.0017919876845553517,
-0.004739216063171625,
-0.05348673835396767,
0.017556020990014076,
0.03291071951389313,
-0.009851383976638317,
0.031236983835697174,
-0.0005699453176930547,
-0.014490540139377117,
-0.028071442618966103,
0.0003649924183264375,
-0.04584577679634094,
-0.017528733238577843,
0.009005420841276646,
0.045008908957242966,
-0.02108541876077652,
0.028053250163793564,
-0.0008851918973959982,
0.04730119928717613,
-0.006449336651712656,
-0.04788336902856827,
0.011852588504552841,
0.045409150421619415,
-0.009369275532662868,
0.027907706797122955,
-0.019720960408449173,
-0.0025788249913603067,
0.016482649371027946,
-0.03962384909391403,
-0.011361383832991123,
-0.008641565218567848,
-0.02123096026480198,
-0.012716745026409626,
0.059453967958688736,
-0.04016963392496109,
-0.06553035229444504,
0.048865776509046555,
-0.034293368458747864,
-0.04260746389627457,
0.04828360676765442,
0.0011904892744496465,
0.04358987510204315,
0.043553490191698074,
0.06272866576910019,
-0.00669948710128665,
0.015654876828193665,
0.029454093426465988,
0.025815539062023163,
-0.03325638175010681,
0.054942160844802856,
-0.04213445261120796,
0.046064089983701706,
0.01619156450033188,
-0.006180993281304836,
-0.04679179936647415,
-0.040497101843357086,
0.053632281720638275,
-0.03831396996974945,
-0.00824587233364582,
-0.010106083005666733,
0.005212228279560804,
-0.02372337132692337,
-0.03896890953183174,
-0.060399990528821945,
-0.0063174390234053135,
0.040242403745651245,
-0.031619030982255936,
0.054833006113767624,
0.008923552930355072,
0.0588717982172966,
0.05516047403216362,
0.023541443049907684,
0.008200390264391899,
0.05632481351494789,
-0.016064215451478958,
-0.04573662206530571,
0.02146746776998043,
-0.02135831117630005,
-0.035221200436353683,
-0.011243131011724472,
0.014681564643979073,
-0.017938069999217987,
0.0018363326089456677,
-0.016337106004357338,
0.017401384189724922,
-0.06560312211513519,
0.0020125750452280045,
0.025942888110876083,
-0.03542131930589676,
-0.04679179936647415,
0.004343523643910885,
0.06600336730480194,
0.08696143329143524,
0.04056987538933754,
-0.002667514607310295,
-0.013881082646548748,
-0.010979335755109787,
0.00669948710128665,
-0.009551203809678555,
-0.014026625081896782,
-0.027743972837924957,
0.03420240432024002,
-0.011761625297367573,
0.013044214807450771,
-0.043553490191698074,
-0.007695541251450777,
0.021285539492964745,
-0.0010602972470223904,
0.015500239096581936,
0.003984216134995222,
0.03367481380701065,
0.04522722214460373,
-0.021267347037792206,
-0.04875662177801132,
-0.01731042005121708,
-0.008395962417125702,
0.021667586639523506,
0.007872920483350754,
-0.050721440464258194,
-0.06884143501520157,
0.017255840823054314,
0.055633485317230225,
-0.033893126994371414,
-0.023959876969456673,
0.052977342158555984,
-0.006203734315931797,
-0.03842312842607498,
-0.02226794883608818,
0.001131362747400999,
0.021249154582619667,
-0.00014909543097019196,
0.007167950738221407,
-0.008882619440555573,
-0.07917492836713791,
0.026852525770664215,
0.023959876969456673,
-0.036385536193847656,
0.0015270555159077048,
-0.0593448132276535,
-0.003381580812856555,
0.012434757314622402,
0.01703752763569355,
-0.029126623645424843,
0.01868397369980812,
0.015145479701459408,
0.01120674517005682,
0.029454093426465988,
-0.022977467626333237,
0.01358999777585268,
-0.04457228258252144,
0.04457228258252144,
-0.01665548048913479,
0.020521443337202072,
-0.03802288696169853,
0.01908421516418457,
0.01977553963661194,
0.037295177578926086,
0.05457830801606178,
0.01583680510520935,
-0.032692406326532364,
0.025888310745358467,
0.03769541531801224,
0.007199788000434637,
0.03472999483346939,
0.03569421172142029,
-0.028344333171844482,
0.007836535573005676,
-0.04217083752155304,
0.012089095078408718,
0.02597927302122116,
0.035730596631765366,
0.06240119785070419,
-0.02956325002014637,
-0.01519096177071333,
0.019320720806717873,
-0.020794333890080452,
0.05472384765744209,
-0.022759154438972473,
-0.020757948979735374,
0.02637951448559761,
0.002239984693005681,
-0.01562758907675743,
-0.00926921609789133,
-0.052286017686128616,
-0.026197586208581924,
0.03298348933458328,
0.019266141578555107,
0.06545758247375488,
-0.028944695368409157,
-0.02252264693379402,
-0.013744636438786983,
0.028307948261499405,
-0.007286204025149345,
0.04988457262516022,
0.05275902897119522,
0.08346842229366302,
0.10726456344127655,
-0.03300168365240097,
0.017346804961562157,
-0.02388710528612137,
-0.011479636654257774,
-0.035457707941532135,
-0.022049635648727417,
-0.008418703451752663,
-0.02361421473324299,
0.06603974848985672,
-0.022995660081505775,
-0.003019999712705612,
0.07488143444061279,
-0.03382035717368126,
-0.014918070286512375,
-0.02772578038275242,
0.01962999813258648,
0.06662192195653915,
-0.04697372764348984,
-0.05861710011959076,
0.05701613798737526,
-0.044608667492866516,
0.01517276931554079,
-0.01233469694852829,
0.03955107927322388,
0.0500665009021759,
-0.018993251025676727,
-0.04682818800210953,
0.0692780613899231,
-0.026143008843064308,
-0.05385059490799904,
0.031619030982255936,
0.03420240432024002,
-0.004366264678537846,
-0.06491179764270782,
-0.03576698154211044,
0.036658428609371185,
0.0023718823213130236,
-0.0013815134298056364,
-0.049666259437799454,
0.02055782824754715,
0.011243131011724472,
-0.01598234660923481,
0.005103071685880423,
-0.020121201872825623,
0.03980577737092972,
0.0041024694219231606,
-0.00008428368892055005,
0.08106698095798492,
0.028144212439656258,
0.009651264175772667,
0.020903490483760834,
-0.020175781100988388,
-0.006467529106885195,
0.04770144075155258,
0.031055055558681488,
-0.014890781603753567,
0.009905962273478508,
0.01106120366603136,
-0.041697826236486435,
-0.042898546904325485,
-0.030454695224761963,
0.052031319588422775,
0.03966023400425911,
-0.003170090029016137,
-0.060145292431116104,
0.004009231459349394,
0.024633008986711502,
-0.011243131011724472,
0.015063612721860409,
0.01737409457564354,
0.03221939504146576,
0.00029278986039571464,
0.01711939461529255,
-0.04853830859065056,
0.003959201276302338,
-0.00879165530204773,
-0.013962949626147747,
-0.030181802809238434,
-0.07291661947965622,
-0.01935710571706295,
-0.07932046800851822,
0.029927104711532593,
-0.01609150320291519,
0.015618491917848587,
0.01758331060409546,
0.05210408940911293,
-0.04468144103884697,
-0.013699155300855637,
-0.004025150090456009,
0.011925360187888145,
-0.018374696373939514,
0.010624577291309834,
0.011443251743912697,
0.018383793532848358,
-0.04941156134009361,
0.04682818800210953,
-0.03127336874604225,
0.027944093570113182,
-0.015945961698889732,
-0.0003900074807461351,
0.026215780526399612,
0.03896890953183174,
0.005016656126827002,
0.003966023679822683,
0.013835600577294827,
0.039441920816898346,
-0.008591534569859505,
0.011188552714884281,
-0.0011575148673728108,
0.02546987682580948,
0.02188590168952942,
0.03649469465017319,
-0.03607625886797905,
0.05581541359424591,
0.004116113763302565,
-0.035057466477155685,
-0.0006845029420219362,
0.017783431336283684,
0.00034708392922766507,
-0.07509975135326385,
-0.036949511617422104,
0.024178190156817436,
-0.030290959402918816,
0.009141866117715836,
0.018420178443193436,
-0.022249756380915642,
-0.04737396910786629,
0.019793732091784477,
0.03667662292718887,
-0.029890719801187515,
0.042352765798568726,
0.018920479342341423,
-0.022031443193554878,
-0.018865901976823807,
-0.06705854833126068,
0.054796621203422546,
0.009587588720023632,
0.002860812935978174,
-0.016691865399479866,
0.014927166514098644,
-0.007445390801876783,
0.06429324299097061,
-0.051631078124046326,
-0.0006299246451817453,
0.06440240144729614,
0.03936915099620819,
-0.00729075213894248,
0.036276381462812424,
-0.003747710259631276,
-0.07997541129589081,
0.06953275948762894,
0.018019936978816986,
-0.048319995403289795,
-0.005075782537460327,
0.01227102242410183,
-0.013962949626147747,
-0.04901131987571716,
0.015673071146011353,
0.005930842831730843,
0.01452692598104477,
-0.0007413553539663553,
-0.026543250307440758,
0.02929035760462284,
0.02134011685848236,
0.002010300988331437,
-0.02585192397236824,
-0.0016657754313200712,
0.0015259184874594212,
-0.026324937120079994,
-0.04468144103884697,
0.001889773877337575,
0.015527527779340744,
-0.07029686123132706,
0.0823768600821495,
0.029526863247156143,
-0.027816742658615112,
0.007922951132059097,
-0.02452385239303112,
-0.04955710098147392,
-0.0006532340776175261,
0.049266017973423004,
0.040096864104270935,
-0.01718306913971901,
0.028817346319556236,
-0.017201263457536697,
-0.1023889034986496,
0.0029267617501318455,
0.03127336874604225,
0.02905385196208954,
-0.02732553891837597,
-0.028817346319556236,
0.014445058070123196,
-0.03463903069496155,
0.030309151858091354,
0.04864746332168579,
-0.018902286887168884,
0.07157035171985626,
-0.017801623791456223,
-0.011916263960301876,
-0.08055757731199265,
-0.0270344540476799,
-0.05188577622175217,
-0.0543963797390461,
-0.009896866045892239,
0.048319995403289795,
0.01815638318657875,
-0.011115781962871552,
0.058799028396606445,
-0.004291219171136618,
0.011252227239310741,
0.0316736102104187,
-0.03602168336510658,
-0.01119764894247055,
0.011097588576376438,
0.005812589544802904,
-0.016309816390275955,
0.020448671653866768,
0.012507528066635132,
-0.02506963536143303,
0.008282258175313473,
-0.010278914123773575,
-0.035203006118535995,
-0.030945898965001106,
-0.02281373180449009,
0.03342011570930481,
0.04770144075155258,
-0.015618491917848587,
-0.01990288868546486,
-0.0005918334936723113,
0.00824587233364582,
-0.0037772736977785826,
-0.048210836946964264,
0.013744636438786983,
0.07000577449798584,
0.0270344540476799,
-0.00981499906629324,
-0.00047983427066355944,
0.03654927387833595,
0.009360179305076599,
-0.07233444601297379,
-0.06440240144729614,
0.020321322605013847,
-0.05093975365161896,
0.02454204484820366,
-0.050721440464258194,
0.02901746705174446,
-0.04377180337905884,
-0.009460239671170712,
-0.024032646790146828,
0.043007705360651016,
-0.08550601452589035,
0.045554693788290024,
0.056943364441394806,
0.0066312639974057674,
-0.001810180488973856,
0.0471920408308506,
0.016164274886250496,
0.01657361164689064,
-0.028817346319556236,
-0.066876620054245,
-0.006881414912641048,
-0.014290419407188892,
0.07153396308422089,
-0.0014645179035142064,
0.02043047919869423,
-0.00024034353555180132,
-0.03620360791683197,
-0.015200057998299599,
-0.06709492951631546,
-0.03411144018173218,
-0.08339565247297287,
-0.034020476043224335,
0.02174035832285881,
0.01657361164689064,
0.047919753938913345,
-0.0620737262070179,
-0.03332915157079697,
0.04755589738488197,
0.005148553755134344,
-0.04257107898592949,
-0.014918070286512375,
-0.022049635648727417,
-0.020103009417653084,
0.053086500614881516,
-0.03842312842607498,
0.032019272446632385,
0.02013939432799816,
0.0020580568816512823,
0.015018130652606487,
-0.0532684251666069,
-0.023650599643588066,
0.012280118651688099,
0.03243770822882652,
0.06298336386680603,
-0.0024673943407833576,
0.030127225443720818,
0.0028790056239813566,
0.010197047144174576,
-0.024287346750497818,
-0.02013939432799816,
-0.026052044704556465,
-0.0028289754409343004,
0.014481443911790848,
-0.06261950731277466,
-0.04802890866994858,
0.04358987510204315,
0.02345047891139984,
0.00530319195240736,
0.13440817594528198,
-0.03673119843006134,
0.010169757530093193,
-0.07084263861179352,
0.03211023658514023,
-0.04086095839738846,
-0.04377180337905884,
-0.03398409113287926,
-0.02268638275563717,
-0.061855413019657135,
-0.019284334033727646,
0.04242553561925888,
0.06804095208644867,
-0.04522722214460373,
-0.0419161394238472,
0.014344997704029083,
-0.012807709164917469,
-0.029253972694277763,
-0.025524454191327095,
0.028599033132195473,
-0.014163070358335972,
0.029781563207507133,
-0.07466312497854233,
0.010315299965441227,
0.0003843222511932254,
0.01126132346689701,
-0.02612481638789177,
0.009232830256223679,
-0.007868372835218906,
-0.0039023489225655794,
0.03720421344041824,
-0.010297107510268688,
-0.04133396968245506,
-0.020248550921678543,
-0.02998168207705021,
-0.04202529415488243,
-0.004766505211591721,
0.046391561627388,
0.010206143371760845,
-0.017865298315882683,
0.022831924259662628,
-0.06432963162660599,
-0.10566359758377075,
-0.014681564643979073,
0.04046071693301201,
-0.011043010279536247,
0.014972648583352566,
0.03305625915527344,
-0.04610047489404678,
0.011688853614032269,
-0.01701933518052101,
-0.01226192619651556,
0.04293493553996086,
-0.01657361164689064,
-0.052176859229803085,
0.017173973843455315,
0.019266141578555107,
-0.047665055841207504,
0.013362588360905647,
0.0051576499827206135,
-0.060145292431116104,
0.03207385167479515,
0.022249756380915642,
0.00010524800745770335,
0.06141878664493561,
-0.08274070918560028,
-0.0018670328427106142,
0.07480866461992264,
0.0975860133767128,
0.058908186852931976,
-0.048574693500995636,
-0.02785312943160534,
-0.004511806648224592,
-0.03143710270524025,
0.014017527922987938,
0.015090901404619217,
0.020103009417653084,
-0.011297709308564663,
0.004195707384496927,
0.03966023400425911,
0.0019477632595226169,
0.07866553217172623,
0.04602770507335663,
-0.04133396968245506,
-0.026616020128130913,
-0.05898095667362213,
0.04850191995501518,
0.014599696733057499,
-0.08448721468448639,
0.009187348186969757,
0.06698577105998993,
0.01593686453998089,
0.020193973556160927,
-0.05334119871258736,
-0.016791924834251404,
-0.014490540139377117,
0.023905297741293907,
-0.04333517327904701,
0.03130975365638733,
0.053632281720638275,
0.04864746332168579,
-0.023232165724039078,
-0.01333529967814684,
0.013107890263199806,
-0.004993915092200041,
0.023104816675186157,
-0.004495888017117977,
-0.062364812940359116,
0.009241926483809948,
-0.03915083780884743,
-0.005394156090915203,
0.053923364728689194,
0.005958131980150938,
0.007113372441381216,
0.012653070501983166,
-0.015363792888820171,
-0.007040601689368486,
0.05938119813799858,
-0.020848913118243217,
-0.02321397326886654,
-0.04526360705494881,
0.0018238250631839037,
0.0019454892026260495,
-0.005921746138483286,
0.06400216370820999,
0.03087312914431095,
-0.04584577679634094,
0.04922963306307793,
-0.06141878664493561,
-0.05796216055750847,
-0.03602168336510658,
-0.025542646646499634,
0.03218300640583038,
-0.007340782321989536,
0.012216444127261639,
0.059999752789735794,
-0.020594215020537376,
0.021412888541817665,
-0.028144212439656258,
0.043808188289403915,
0.007445390801876783,
-0.013571805320680141,
0.006899607367813587,
0.0081185232847929,
0.0559973418712616,
0.010160661302506924,
-0.015527527779340744,
0.041952524334192276,
0.013644577004015446,
-0.023268550634384155,
-0.012489335611462593,
-0.011761625297367573,
0.017765238881111145,
0.0358397550880909,
-0.019156984984874725,
-0.07968432456254959,
-0.05301372706890106,
0.009232830256223679,
0.024469273164868355,
-0.017401384189724922,
0.023141201585531235,
-0.010442649014294147,
0.027816742658615112,
0.02295927330851555,
0.01531831081956625,
-0.03385674208402634,
0.011970842257142067,
0.09067276120185852,
-0.04937517270445824,
0.03403867036104202,
-0.015081805177032948,
0.016873793676495552,
0.003327002516016364,
-0.035221200436353683,
0.02385072037577629,
0.014263130724430084,
0.02264999784529209,
0.012780420482158661,
-0.03340192511677742,
-0.06673107296228409,
-0.007308945059776306
]
|
41,665 | pyglove.core.patching.pattern_based | patch_on_key | Recursively patch values on matched keys (leaf-node names).
Example::
d = pg.Dict(a=0, b=2)
print(pg.patching.patch_on_key(d, 'a', value=3))
# {a=3, b=2}
print(pg.patching.patch_on_key(d, '.', value=3))
# {a=3, b=3}
@pg.members([
('x', schema.Int())
])
class A(pg.Object):
def _on_init(self):
super()._on_init()
self._num_changes = 0
def _on_change(self, updates):
super()._on_change(updates)
self._num_changes += 1
a = A()
pg.patching.patch_on_key(a, 'x', value=2)
# a._num_changes is 1.
pg.patching.patch_on_key(a, 'x', value=3)
# a._num_changes is 2.
pg.patching.patch_on_keys(a, 'x', value=4, skip_notification=True)
# a._num_changes is still 2.
Args:
src: symbolic value to patch.
regex: Regex for key name.
value: New value for field that satisfy `condition`.
value_fn: Callable object that produces new value based on old value.
If not None, `value` must be None.
skip_notification: If True, `on_change` event will not be triggered for this
operation. If None, the behavior is decided by `pg.notify_on_rebind`.
Please see `symbolic.Symbolic.rebind` for details.
Returns:
`src` after being patched.
| def patch_on_key(
src: symbolic.Symbolic,
regex: str,
value: Any = None,
value_fn: Optional[Callable[[Any], Any]] = None,
skip_notification: Optional[bool] = None) -> Any:
"""Recursively patch values on matched keys (leaf-node names).
Example::
d = pg.Dict(a=0, b=2)
print(pg.patching.patch_on_key(d, 'a', value=3))
# {a=3, b=2}
print(pg.patching.patch_on_key(d, '.', value=3))
# {a=3, b=3}
@pg.members([
('x', schema.Int())
])
class A(pg.Object):
def _on_init(self):
super()._on_init()
self._num_changes = 0
def _on_change(self, updates):
super()._on_change(updates)
self._num_changes += 1
a = A()
pg.patching.patch_on_key(a, 'x', value=2)
# a._num_changes is 1.
pg.patching.patch_on_key(a, 'x', value=3)
# a._num_changes is 2.
pg.patching.patch_on_keys(a, 'x', value=4, skip_notification=True)
# a._num_changes is still 2.
Args:
src: symbolic value to patch.
regex: Regex for key name.
value: New value for field that satisfy `condition`.
value_fn: Callable object that produces new value based on old value.
If not None, `value` must be None.
skip_notification: If True, `on_change` event will not be triggered for this
operation. If None, the behavior is decided by `pg.notify_on_rebind`.
Please see `symbolic.Symbolic.rebind` for details.
Returns:
`src` after being patched.
"""
regex = re.compile(regex)
return _conditional_patch(
src,
lambda k, v, p: k and regex.match(str(k.key)),
value,
value_fn,
skip_notification)
| (src: pyglove.core.symbolic.base.Symbolic, regex: str, value: Optional[Any] = None, value_fn: Optional[Callable[[Any], Any]] = None, skip_notification: Optional[bool] = None) -> Any | [
0.040845803916454315,
-0.05091582238674164,
-0.030417488887906075,
0.07580800354480743,
-0.03865830972790718,
0.015340748243033886,
-0.028852298855781555,
0.00894798431545496,
0.09481657296419144,
-0.07663773745298386,
0.003229383146390319,
-0.013388975523412228,
0.0777692049741745,
0.03509420156478882,
-0.011531490832567215,
-0.02379843220114708,
0.046012815088033676,
0.04838888719677925,
0.010456601157784462,
0.011757783591747284,
0.008806551806628704,
0.02070576697587967,
0.060457825660705566,
0.03169981390237808,
-0.020140036940574646,
-0.016566500067710876,
0.0018268408020958304,
0.04092123359441757,
0.06766147166490555,
0.002991304500028491,
0.007957953959703445,
-0.05563024803996086,
-0.00934399664402008,
0.00008147121116053313,
0.011701210401952267,
-0.05442335456609726,
-0.03243526443839073,
0.04307101294398308,
-0.07237590104341507,
-0.03264269977807999,
0.04967121407389641,
0.07403537631034851,
-0.06769918650388718,
-0.029851756989955902,
0.0265705157071352,
0.07030154764652252,
-0.01894257217645645,
0.03994063287973404,
0.02411901392042637,
0.010899757035076618,
-0.019027430564165115,
-0.014925878494977951,
-0.0029960188549011946,
-0.02334584668278694,
0.028569433838129044,
0.030285485088825226,
-0.0054451641626656055,
0.017980828881263733,
0.058647483587265015,
-0.06445565819740295,
0.004841717425733805,
0.0005651420215144753,
-0.02172408439218998,
-0.018348554149270058,
-0.025495626032352448,
-0.05133069306612015,
0.016123343259096146,
-0.04465506225824356,
-0.029172880575060844,
-0.04853975027799606,
-0.08742435276508331,
-0.02551448345184326,
0.042278990149497986,
-0.040845803916454315,
-0.03384959325194359,
0.044805921614170074,
-0.016227060928940773,
0.003533463692292571,
0.006623771041631699,
-0.046578548848629,
-0.00169483688659966,
-0.03579193726181984,
-0.0365462452173233,
-0.018320266157388687,
-0.00022688184981234372,
0.02892773039638996,
0.04533394053578377,
0.008881982415914536,
0.09074331074953079,
0.02255382388830185,
-0.0311906561255455,
-0.004907719325274229,
-0.012653524987399578,
-0.0004684962914325297,
0.0009894405957311392,
-0.013502121903002262,
0.03873373940587044,
-0.03615023195743561,
0.008245534263551235,
0.024929894134402275,
0.06966038793325424,
-0.005402734503149986,
-0.036791395395994186,
0.01674564741551876,
0.048124879598617554,
-0.02947460301220417,
-0.006812348496168852,
0.02988947369158268,
-0.01936686970293522,
-0.02319498546421528,
-0.044127047061920166,
-0.03805486112833023,
0.019574305042624474,
-0.042505282908678055,
0.03169981390237808,
0.055931974202394485,
-0.04495678469538689,
-0.05649770423769951,
0.03168095648288727,
-0.041901834309101105,
0.04525850713253021,
0.008839552290737629,
-0.02379843220114708,
0.07445024698972702,
-0.006557769142091274,
-0.01831083744764328,
0.05216043069958687,
0.03997834771871567,
0.039412617683410645,
-0.018009115010499954,
-0.026853380724787712,
0.09843725711107254,
-0.027852840721607208,
0.03952576220035553,
0.059250932186841965,
0.04608824849128723,
-0.0015039024874567986,
0.0066426289267838,
0.018046829849481583,
-0.024552740156650543,
-0.005761031061410904,
-0.04005378112196922,
0.012068935669958591,
-0.010871470905840397,
0.014520438387989998,
-0.06717117130756378,
0.009122418239712715,
0.08304936438798904,
0.018961429595947266,
0.020649194717407227,
0.01293639000505209,
0.03183181583881378,
0.046616263687610626,
0.048728328198194504,
0.008448255248367786,
0.026231076568365097,
-0.026645947247743607,
-0.026740236207842827,
0.020498333498835564,
0.014539295807480812,
0.022478392347693443,
0.026532800868153572,
-0.013068393804132938,
-0.06075954809784889,
-0.011861500330269337,
0.0036206806544214487,
0.004827574361115694,
-0.026438511908054352,
-0.0072649335488677025,
0.019857170060276985,
0.011408915743231773,
-0.0007702196598984301,
0.006449337583035231,
0.048690613359212875,
0.03675368055701256,
0.03564107418060303,
-0.00893384125083685,
-0.010598033666610718,
-0.035999372601509094,
0.05393305420875549,
0.046012815088033676,
0.05506451800465584,
-0.01263466663658619,
0.04288243502378464,
-0.0054593076929450035,
0.03177524358034134,
-0.016632501035928726,
0.009532573632895947,
0.03205810859799385,
0.01713223196566105,
-0.0030785214621573687,
-0.05004836618900299,
0.05148155242204666,
0.01674564741551876,
-0.03179410099983215,
-0.03658396005630493,
-0.009263850748538971,
-0.029172880575060844,
-0.033189572393894196,
0.07022611796855927,
-0.04676712676882744,
-0.06475738435983658,
0.025910496711730957,
0.036602817475795746,
-0.03366101533174515,
-0.03315185755491257,
0.06064639985561371,
0.013681270182132721,
-0.04182640463113785,
-0.01978174038231373,
-0.024383021518588066,
-0.02564648725092411,
0.003439175197854638,
-0.012568664737045765,
-0.01510502677410841,
-0.033000994473695755,
-0.018207121640443802,
0.055139947682619095,
-0.03907318040728569,
-0.04408932849764824,
-0.02408129721879959,
0.052462153136730194,
-0.0051292977295815945,
-0.04378760606050491,
0.03926175460219383,
-0.029116306453943253,
0.013058965094387531,
0.010786611586809158,
0.019442301243543625,
-0.06053325533866882,
0.05257530137896538,
-0.010343454778194427,
0.03103979304432869,
-0.047898586839437485,
0.03688568249344826,
-0.0836528092622757,
0.03298213705420494,
-0.04469277709722519,
0.09149761497974396,
0.037017688155174255,
-0.010145449079573154,
0.014633584767580032,
0.03283127769827843,
-0.014303574338555336,
-0.013568123802542686,
0.002948874607682228,
-0.008688691072165966,
-0.008042814210057259,
0.0190085731446743,
0.00677934754639864,
0.019857170060276985,
-0.01607619971036911,
-0.006411621812731028,
0.0342644639313221,
-0.03298213705420494,
0.01978174038231373,
-0.02845628745853901,
0.016953082755208015,
0.043108727782964706,
-0.006713345181196928,
0.0013954706955701113,
0.012398945167660713,
-0.08719805628061295,
-0.04880375787615776,
0.005652599036693573,
-0.017151089385151863,
0.017688533291220665,
0.014822161756455898,
-0.007510083727538586,
0.036829110234975815,
-0.08840495347976685,
-0.03264269977807999,
-0.01210665050894022,
-0.006586055736988783,
-0.01229522842913866,
0.04141153395175934,
-0.044164761900901794,
0.03219011425971985,
0.09104502946138382,
-0.05547938868403435,
0.01722651906311512,
-0.060080669820308685,
-0.013982993550598621,
-0.017650818452239037,
0.02491103671491146,
0.030851216986775398,
-0.012955248355865479,
0.016387350857257843,
0.011918073520064354,
-0.0436367467045784,
0.04160011187195778,
-0.010730038397014141,
-0.0075713712722063065,
0.03865830972790718,
-0.03168095648288727,
0.007778806146234274,
-0.06158928573131561,
-0.06332419812679291,
0.00036831467878073454,
0.022610396146774292,
0.048124879598617554,
0.006736917421221733,
-0.0013106110272929072,
0.024741318076848984,
-0.022289814427495003,
0.0007342721801251173,
0.04318416118621826,
-0.0033425295259803534,
-0.06381449848413467,
0.014577011577785015,
-0.0631733313202858,
0.012304657138884068,
-0.07599657773971558,
-0.026645947247743607,
0.02666480466723442,
-0.07071641832590103,
-0.004407990258187056,
0.005770459771156311,
0.029040876775979996,
0.010466029867529869,
-0.015255888924002647,
0.04571109265089035,
-0.0890083983540535,
0.03505648672580719,
0.021478934213519096,
-0.015067311935126781,
0.10907300561666489,
0.04205269739031792,
0.01607619971036911,
0.00977772381156683,
0.018093975260853767,
-0.00958443246781826,
0.03769656643271446,
0.04982207342982292,
-0.06966038793325424,
0.031718671321868896,
0.011654065921902657,
-0.04031778872013092,
-0.02574077621102333,
-0.018037401139736176,
0.016538213938474655,
-0.000490889826323837,
-0.017301950603723526,
-0.06656771898269653,
0.022252099588513374,
0.00781652145087719,
0.031058650463819504,
0.007986241020262241,
0.05785546079277992,
-0.010343454778194427,
0.03469818830490112,
0.011342913843691349,
0.009306280873715878,
-0.0035735364072024822,
0.008594402112066746,
-0.005643170326948166,
0.011352342553436756,
-0.06698258966207504,
-0.023534424602985382,
-0.06366363167762756,
0.03288784995675087,
0.0003161613130941987,
-0.04861517995595932,
-0.03645195811986923,
0.01547275297343731,
-0.006986782420426607,
-0.03884688764810562,
-0.007670374121516943,
0.014218715019524097,
-0.015736760571599007,
0.012559236027300358,
-0.004198198206722736,
-0.01259695179760456,
-0.008518971502780914,
0.02070576697587967,
-0.03786628693342209,
0.027833983302116394,
-0.012530949898064137,
-0.0023949292954057455,
0.049369487911462784,
0.05604511871933937,
0.00525658717378974,
0.007901381701231003,
0.05321646109223366,
-0.03473590686917305,
0.017556529492139816,
0.08455798029899597,
0.017914826050400734,
0.03454732894897461,
-0.015765046700835228,
0.005332017783075571,
-0.002889944240450859,
0.03445303812623024,
0.026438511908054352,
-0.03665939345955849,
-0.06890607625246048,
0.02481674961745739,
-0.031341515481472015,
-0.0274379700422287,
-0.03117179684340954,
0.038771454244852066,
0.018876569345593452,
-0.03173752874135971,
-0.016227060928940773,
0.07373365014791489,
-0.011503203772008419,
0.031718671321868896,
-0.00899512879550457,
-0.023044124245643616,
0.05087810754776001,
-0.0013094323221594095,
-0.025533340871334076,
-0.02960660681128502,
-0.053857624530792236,
0.022591538727283478,
-0.05453650280833244,
-0.03384959325194359,
-0.01868799328804016,
-0.017377382144331932,
-0.014171570539474487,
0.031756386160850525,
-0.0009157776366919279,
-0.027475686743855476,
0.027833983302116394,
0.027569973841309547,
-0.004429204855114222,
0.022817831486463547,
-0.044805921614170074,
0.008495398797094822,
0.08795236796140671,
-0.02227095700800419,
-0.0038399016484618187,
0.02319498546421528,
0.0611744187772274,
-0.0057893176563084126,
-0.062155019491910934,
0.04612596333026886,
-0.011258053593337536,
-0.016830507665872574,
0.03428332135081291,
-0.041072096675634384,
0.03633880987763405,
0.026589373126626015,
-0.002993661677464843,
-0.016953082755208015,
0.04035550355911255,
0.05106668174266815,
-0.039638910442590714,
0.012417803518474102,
0.0218183733522892,
-0.014030138030648232,
-0.043976183980703354,
0.015567041002213955,
0.030606066808104515,
-0.08184246718883514,
-0.02038518711924553,
-0.0397520549595356,
-0.003052592044696212,
0.020837770774960518,
-0.006727488711476326,
0.020272040739655495,
0.013492693193256855,
0.010117162019014359,
-0.026325365528464317,
-0.07807092368602753,
0.03002147749066353,
0.040845803916454315,
0.028946587815880775,
-0.04197726771235466,
-0.03869602456688881,
0.018669134005904198,
-0.012700668536126614,
-0.0024090725928545,
0.01141834445297718,
0.0072507900185883045,
0.05189642310142517,
-0.031982678920030594,
-0.004740357398986816,
-0.034339893609285355,
0.010711180046200752,
-0.0007849522517062724,
-0.029040876775979996,
0.029908331111073494,
-0.027758551761507988,
0.017235947772860527,
-0.03281242027878761,
0.03481133654713631,
0.023968150839209557,
-0.02740025520324707,
0.014133854769170284,
-0.04092123359441757,
-0.014793874695897102,
0.01595362462103367,
0.061098985373973846,
0.0057657454162836075,
-0.03990291804075241,
0.011088334955275059,
-0.013106109574437141,
0.01620820350944996,
-0.04967121407389641,
-0.049558065831661224,
0.01983831264078617,
-0.044579628854990005,
0.06962267309427261,
0.002668366301804781,
0.020517190918326378,
-0.01662307232618332,
0.029436888173222542,
-0.0019117005867883563,
-0.00668977340683341,
0.033925022929906845,
0.019612019881606102,
0.027664262801408768,
0.010352883487939835,
-0.022497249767184258,
-0.000525658717378974,
0.04020464047789574,
0.023270417004823685,
-0.07158387452363968,
-0.05053866654634476,
-0.0009900298900902271,
-0.022402960807085037,
0.05355590209364891,
-0.004855860956013203,
0.033189572393894196,
0.024986468255519867,
0.006128756329417229,
0.01812226139008999,
0.03888460248708725,
-0.014294145628809929,
-0.007957953959703445,
0.04903005063533783,
0.06245674192905426,
0.01563304290175438,
0.02319498546421528,
-0.011786069720983505,
0.015897050499916077,
0.0024043582379817963,
-0.05065181478857994,
0.012992963194847107,
0.00041486966074444354,
0.060457825660705566,
0.0011980540584772825,
-0.004563566297292709,
-0.004238270688802004,
-0.0005209443042986095,
0.03809257596731186,
-0.044805921614170074,
-0.0587606281042099,
-0.07003754377365112,
-0.0421658419072628,
-0.0040991948917508125,
0.060457825660705566,
0.02966318093240261,
-0.05231129378080368,
-0.005723315756767988,
0.04099666699767113,
0.00213799299672246,
-0.034660473465919495,
-0.023138413205742836,
-0.01210665050894022,
-0.014586440287530422,
0.0772411897778511,
0.01189921610057354,
0.026872240006923676,
-0.005680885631591082,
-0.01167292334139347,
0.019027430564165115,
0.015934767201542854,
0.0366782508790493,
-0.021856088191270828,
0.04035550355911255,
0.035169631242752075,
-0.020517190918326378,
-0.073884516954422,
-0.030888931825757027,
-0.014030138030648232,
0.005464022047817707,
-0.03260498493909836,
-0.056573133915662766,
-0.014397863298654556,
-0.02085663005709648,
0.060118384659290314,
0.0007012711721472442,
-0.011314626783132553,
0.04129838943481445,
-0.02615564689040184,
0.10432086139917374,
-0.07882523536682129,
0.025212761014699936,
-0.05544167384505272,
0.027758551761507988,
-0.036923401057720184,
-0.04299558326601982,
-0.0057893176563084126,
-0.0218183733522892,
-0.014586440287530422,
0.017584815621376038,
0.07320563495159149,
0.016255347058176994,
-0.053480472415685654,
-0.023515567183494568,
0.019131148234009743,
0.001584047800861299,
-0.04533394053578377,
-0.022817831486463547,
0.05838347598910332,
-0.019272580742836,
0.06162700057029724,
-0.04182640463113785,
-0.010758324526250362,
0.06019381433725357,
0.03837544471025467,
-0.041901834309101105,
-0.02251610718667507,
0.012813814915716648,
0.0010448350803926587,
-0.006798204965889454,
-0.007005639839917421,
-0.06147614121437073,
-0.03873373940587044,
0.01033402606844902,
-0.01137119997292757,
-0.000525069423019886,
0.043561313301324844,
0.027607690542936325,
-0.004528208170086145,
0.011078905314207077,
-0.046880271285772324,
-0.05050095170736313,
-0.01277610007673502,
0.048275742679834366,
-0.019480016082525253,
0.03703654557466507,
0.03283127769827843,
-0.04020464047789574,
-0.034151315689086914,
-0.030417488887906075,
-0.04031778872013092,
0.012068935669958591,
-0.06724660098552704,
-0.07524227350950241,
-0.022723542526364326,
0.02159208059310913,
-0.03224668651819229,
0.043108727782964706,
0.019272580742836,
-0.0921010673046112,
-0.0008150067296810448,
-0.0019765240140259266,
0.01224808394908905,
0.008014527149498463,
-0.0807110071182251,
0.012021791189908981,
0.04329730570316315,
0.065587118268013,
0.02200694940984249,
0.0025622916873544455,
-0.049369487911462784,
0.016613643616437912,
-0.02398701012134552,
-0.03884688764810562,
-0.0020519548561424017,
0.028607148677110672,
0.027833983302116394,
-0.009051701985299587,
0.054121632128953934,
-0.028399713337421417,
0.021705226972699165,
0.04650311544537544,
-0.018621990457177162,
-0.06053325533866882,
-0.03907318040728569,
0.025533340871334076,
0.02726825140416622,
-0.07060327380895615,
0.02098863385617733,
0.06837806105613708,
-0.007547799032181501,
0.01734909415245056,
-0.009556145407259464,
0.020554905757308006,
0.010692322626709938,
0.030153481289744377,
-0.0010854970896616578,
0.022082380950450897,
0.008650975301861763,
0.05332960933446884,
0.02966318093240261,
-0.003637181129306555,
0.011144907213747501,
0.005610169377177954,
0.016283635050058365,
-0.021988091990351677,
-0.09459028393030167,
-0.03330272063612938,
-0.005143440794199705,
0.04099666699767113,
0.020743483677506447,
-0.019253723323345184,
-0.005666742566972971,
0.04676712676882744,
0.02227095700800419,
-0.06019381433725357,
0.011540919542312622,
-0.03652738779783249,
-0.021045206114649773,
-0.00243971636518836,
0.021007491275668144,
0.005143440794199705,
-0.014539295807480812,
0.06456880271434784,
-0.028305426239967346,
-0.059024639427661896,
0.0070527843199670315,
0.0042665572836995125,
-0.03169981390237808,
-0.0721496045589447,
-0.016415638849139214,
0.03301985189318657,
-0.003085592994466424,
0.002489218022674322,
0.05299016833305359,
-0.01703794300556183,
-0.03315185755491257,
-0.01185207162052393,
0.04461734741926193,
0.00284751458093524,
-0.05653541907668114,
0.033642157912254333,
0.07837264984846115,
0.05563024803996086,
-0.03384959325194359,
-0.04940720647573471,
0.06177786365151405,
-0.028588291257619858,
-0.08425625413656235,
-0.05962808430194855,
0.012427232228219509,
0.036414243280887604,
-0.01215379498898983,
0.008698119781911373,
-0.038168009370565414,
-0.04299558326601982,
0.06886836141347885,
0.020554905757308006,
-0.030379774048924446,
0.052273575216531754,
0.013898133300244808,
0.019404584541916847,
-0.026853380724787712,
0.04597510024905205,
-0.03390616551041603,
-0.047898586839437485,
0.0313226580619812,
-0.01865970529615879,
-0.019612019881606102,
-0.0016795150004327297,
0.017141660675406456,
0.02010232023894787,
-0.028305426239967346,
-0.00944299902766943,
-0.014661870896816254,
0.024797890335321426,
0.008429396897554398,
-0.020913202315568924,
-0.02564648725092411,
0.02698538638651371
]
|
41,666 | pyglove.core.patching.pattern_based | patch_on_member | Recursively patch values that are the requested member of classes.
Example::
d = pg.Dict(a=A(x=1), b=2)
print(pg.patching.patch_on_member(d, A, 'x', 2)
# {a=A(x=2), b=4}
Args:
src: symbolic value to patch.
cls: In which class the member belongs to.
name: Member name.
value: New value for field that satisfy `condition`.
value_fn: Callable object that produces new value based on old value.
If not None, `value` must be None.
skip_notification: If True, `on_change` event will not be triggered for this
operation. If None, the behavior is decided by `pg.notify_on_rebind`.
Please see `symbolic.Symbolic.rebind` for details.
Returns:
`src` after being patched.
| def patch_on_member(
src: symbolic.Symbolic,
cls: Union[Type[Any], Tuple[Type[Any], ...]],
name: str,
value: Any = None,
value_fn: Optional[Callable[[Any], Any]] = None,
skip_notification: Optional[bool] = None) -> Any:
"""Recursively patch values that are the requested member of classes.
Example::
d = pg.Dict(a=A(x=1), b=2)
print(pg.patching.patch_on_member(d, A, 'x', 2)
# {a=A(x=2), b=4}
Args:
src: symbolic value to patch.
cls: In which class the member belongs to.
name: Member name.
value: New value for field that satisfy `condition`.
value_fn: Callable object that produces new value based on old value.
If not None, `value` must be None.
skip_notification: If True, `on_change` event will not be triggered for this
operation. If None, the behavior is decided by `pg.notify_on_rebind`.
Please see `symbolic.Symbolic.rebind` for details.
Returns:
`src` after being patched.
"""
return _conditional_patch(
src, lambda k, v, p: isinstance(p, cls) and k.key == name,
value, value_fn, skip_notification)
| (src: pyglove.core.symbolic.base.Symbolic, cls: Union[Type[Any], Tuple[Type[Any], ...]], name: str, value: Optional[Any] = None, value_fn: Optional[Callable[[Any], Any]] = None, skip_notification: Optional[bool] = None) -> Any | [
0.06476819515228271,
-0.036951083689928055,
0.009926593862473965,
0.07061846554279327,
-0.0500858910381794,
-0.029628805816173553,
-0.010747519321739674,
0.02275945246219635,
0.08039408922195435,
-0.042121972888708115,
0.0056851450353860855,
-0.010926801711320877,
0.12296897917985916,
-0.010945674031972885,
0.0027906750328838825,
0.026043154299259186,
-0.004930271301418543,
0.042121972888708115,
0.004982168786227703,
0.06514562666416168,
0.04242392256855965,
0.021193088963627815,
0.05457739159464836,
0.05533226579427719,
-0.01710733212530613,
-0.003937140107154846,
0.013446194119751453,
0.044839516282081604,
-0.0027718031778931618,
-0.009822798892855644,
-0.004670782946050167,
0.004633039236068726,
-0.026816900819540024,
0.022344272583723068,
0.05774786323308945,
-0.05537001043558121,
-0.0056190937757492065,
0.028609726577997208,
-0.09934142231941223,
-0.04744383320212364,
0.008775411173701286,
0.03221425041556358,
-0.08356455713510513,
-0.009214181452989578,
0.039744120091199875,
0.04812322184443474,
0.01845666952431202,
0.06827835738658905,
0.0031940608751028776,
-0.01439922209829092,
-0.019909802824258804,
0.04057447984814644,
0.019126620143651962,
-0.02598653919994831,
0.07269436866044998,
0.031232913956046104,
0.0030831885524094105,
-0.008478178642690182,
0.03902698680758476,
0.022985914722085,
0.027911467477679253,
-0.007260944694280624,
0.02630736120045185,
-0.05680427327752113,
-0.03763047233223915,
-0.028421007096767426,
0.0005484631983563304,
-0.02157052606344223,
-0.04453757032752037,
-0.019570110365748405,
-0.051935333758592606,
-0.012464857660233974,
0.06227710843086243,
-0.012729063630104065,
-0.0035172412171959877,
0.045028235763311386,
-0.03978186100721359,
-0.03883827105164528,
0.050652049481868744,
-0.07012780010700226,
0.01699410192668438,
-0.027420800179243088,
-0.0038357037119567394,
-0.052463747560977936,
-0.006977866869419813,
0.016343023627996445,
0.0059918127954006195,
-0.029930755496025085,
0.05899340659379959,
0.022061193361878395,
-0.017711231485009193,
0.007166585419327021,
-0.012908346019685268,
-0.0030572398100048304,
-0.010964545421302319,
-0.004418372176587582,
0.047406088560819626,
-0.011228751391172409,
-0.043971411883831024,
0.060465410351753235,
0.06590050458908081,
-0.03993283584713936,
0.019013389945030212,
0.042876847088336945,
0.051708873361349106,
-0.052048563957214355,
-0.0013917990727350116,
0.019909802824258804,
-0.04314105212688446,
-0.02719433791935444,
0.02426920086145401,
-0.045669879764318466,
-0.02932685613632202,
-0.039857350289821625,
0.06340941786766052,
0.034025948494672775,
-0.050010405480861664,
-0.07635550945997238,
-0.010587108321487904,
-0.021306319162249565,
0.046122804284095764,
-0.013125372119247913,
-0.022816067561507225,
0.025476999580860138,
-0.02774162031710148,
-0.05144466459751129,
0.04442433640360832,
-0.008978283032774925,
0.05676652863621712,
-0.005354887805879116,
-0.0017456462373957038,
0.022042322903871536,
-0.04800998792052269,
0.00918587390333414,
0.0985865518450737,
0.029194753617048264,
-0.004791091196238995,
0.0016501074424013495,
0.004859501495957375,
-0.041706789284944534,
-0.0018341080285608768,
-0.042461663484573364,
0.005647401325404644,
-0.03563005477190018,
0.029477830976247787,
-0.07254339754581451,
-0.01877749152481556,
0.10024727135896683,
-0.013691527768969536,
0.01665440946817398,
-0.026835773140192032,
0.012134600430727005,
0.04544341564178467,
0.06333392858505249,
-0.01953236572444439,
0.020004162564873695,
-0.0006227710982784629,
0.005586068145930767,
0.009082078002393246,
0.024552278220653534,
-0.006987303029745817,
0.020117392763495445,
-0.06620245426893234,
-0.024250328540802002,
0.021929090842604637,
0.0038616524543613195,
0.010690903291106224,
-0.03685672581195831,
-0.01665440946817398,
0.03151598945260048,
-0.00013814785052090883,
-0.05386026203632355,
0.059823766350746155,
0.049255531281232834,
0.07420411705970764,
0.012927218340337276,
0.018418926745653152,
-0.0194380059838295,
0.037158675491809845,
-0.01554096955806017,
-0.004470269661396742,
0.05250148847699165,
0.010964545421302319,
-0.015078608877956867,
0.014267119579017162,
0.045669879764318466,
-0.009681259281933308,
0.021230831742286682,
0.018532156944274902,
-0.0013304655440151691,
0.002597238402813673,
-0.05861596763134003,
0.017192255705595016,
0.016748767346143723,
-0.015880662947893143,
-0.012710191309452057,
-0.04268812760710716,
0.031346146017313004,
0.01932477578520775,
0.019268160685896873,
-0.025193920359015465,
-0.04646249860525131,
0.016682716086506844,
0.031666964292526245,
-0.05476611107587814,
0.00472975755110383,
0.09805814176797867,
0.03638492897152901,
-0.016135431826114655,
-0.02976090833544731,
-0.006774994544684887,
-0.016314715147018433,
-0.00800638273358345,
0.02092888206243515,
0.014002913609147072,
-0.08250772953033447,
0.001849441439844668,
0.008699923753738403,
-0.013691527768969536,
0.02158939838409424,
-0.04593408480286598,
0.03321445733308792,
-0.03304461017251015,
0.011813778430223465,
0.05416221171617508,
-0.033157844096422195,
-0.048160962760448456,
-0.010615415871143341,
0.002097134478390217,
-0.09005647152662277,
0.037819188088178635,
-0.008558384142816067,
0.03638492897152901,
-0.007477970793843269,
0.03970637544989586,
-0.023231249302625656,
0.05235051363706589,
-0.006784430239349604,
0.01580517552793026,
0.04280135780572891,
-0.012653576210141182,
-0.0003948344965465367,
0.00987941399216652,
0.06250356882810593,
0.00471088569611311,
-0.02417484112083912,
0.013125372119247913,
0.03689447045326233,
0.050236865878105164,
0.031006451696157455,
-0.00472975755110383,
0.01710733212530613,
-0.030478039756417274,
0.0030690347775816917,
-0.02698674611747265,
-0.0016854922287166119,
-0.03891375660896301,
0.00749684264883399,
0.04974620044231415,
-0.00009716054773889482,
-0.0304214246571064,
-0.01116270013153553,
0.0053831953555345535,
-0.02513730525970459,
0.008879206143319607,
-0.003708318807184696,
0.014267119579017162,
0.016371330246329308,
-0.035007283091545105,
0.02774162031710148,
-0.11262720823287964,
-0.042990077286958694,
0.029307983815670013,
0.017031844705343246,
-0.03462984785437584,
-0.015701379626989365,
-0.04144258424639702,
0.0062088388949632645,
0.05835176259279251,
-0.08311162889003754,
0.03479969501495361,
-0.06310746818780899,
-0.021608268842101097,
-0.013672656379640102,
0.002058211248368025,
-0.0006162839126773179,
0.018428362905979156,
0.06601373851299286,
0.014578504487872124,
-0.007784638553857803,
0.017786718904972076,
-0.05661555379629135,
0.000963643891736865,
-0.024740995839238167,
0.010690903291106224,
0.000509834848344326,
-0.050538815557956696,
0.007161867339164019,
-0.021759243682026863,
-0.018267951905727386,
0.02698674611747265,
-0.004559910856187344,
-0.07197724282741547,
0.03936668112874031,
-0.02479761280119419,
-0.010596544481813908,
0.021174216642975807,
-0.00690237944945693,
-0.012134600430727005,
-0.004779296461492777,
0.021532781422138214,
0.022816067561507225,
-0.0329313799738884,
-0.003680011024698615,
0.04457531124353409,
-0.0009825157467275858,
-0.035101644694805145,
-0.000976618262939155,
0.03223312273621559,
0.029817525297403336,
-0.03572441264986992,
0.031006451696157455,
-0.06982585042715073,
0.06567404419183731,
-0.02491084299981594,
-0.01261583250015974,
0.050123635679483414,
0.06733476370573044,
-0.001500312122516334,
0.003170470939949155,
-0.03530923277139664,
-0.003800319042056799,
0.07760105282068253,
0.023872891440987587,
-0.028930548578500748,
0.06941066682338715,
-0.010483313351869583,
-0.03606410697102547,
0.02255186252295971,
-0.020777907222509384,
0.01832456700503826,
0.03328994661569595,
-0.05804981291294098,
-0.01386137492954731,
0.03257281333208084,
0.027892595157027245,
0.02168375626206398,
0.012474293820559978,
0.07144882529973984,
0.021211961284279823,
0.014974813908338547,
0.0028590853326022625,
-0.004073960706591606,
-0.01192700956016779,
-0.002571289660409093,
-0.023703044280409813,
0.03670575097203255,
-0.07567612081766129,
-0.006350378040224314,
-0.08582917600870132,
0.03768708556890488,
-0.008157357573509216,
-0.004701450001448393,
-0.012880038470029831,
0.021853603422641754,
-0.004953860770910978,
-0.05978602543473244,
-0.0030737528577446938,
0.014021784998476505,
-0.012427113950252533,
-0.0027434953954070807,
-0.0026066743303090334,
-0.01525789126753807,
-0.024722125381231308,
0.00409990968182683,
-0.023816276341676712,
0.015776867046952248,
0.007279816549271345,
-0.010587108321487904,
0.04283910244703293,
0.08477235585451126,
0.010870186612010002,
-0.041140634566545486,
0.05891791731119156,
0.00811017770320177,
0.0005764761008322239,
0.054954830557107925,
0.02177811600267887,
0.05586067959666252,
0.014342606998980045,
0.02157052606344223,
0.021608268842101097,
-0.004324012901633978,
-0.003984319511801004,
-0.032950252294540405,
-0.048160962760448456,
-0.01494650635868311,
-0.04000832512974739,
-0.018881287425756454,
-0.024759868159890175,
0.05068979039788246,
-0.0033615485299378633,
-0.0015345173887908459,
-0.0015699020586907864,
0.011728855781257153,
-0.01515409629791975,
0.019362518563866615,
-0.04057447984814644,
-0.020683549344539642,
0.06959939002990723,
0.018635952845215797,
-0.03787580505013466,
-0.007081662304699421,
-0.03310122713446617,
0.009737875312566757,
-0.014757787808775902,
-0.004458474926650524,
-0.06650440394878387,
-0.017673488706350327,
-0.05446416139602661,
0.033818356692790985,
-0.00028116110479459167,
0.0052322205156087875,
-0.005213348660618067,
0.005057656206190586,
-0.01996641792356968,
0.0265338234603405,
-0.05265246331691742,
0.0051614511758089066,
0.05457739159464836,
0.0035196002572774887,
-0.004062165971845388,
0.019456878304481506,
0.0359131321310997,
0.028647469356656075,
-0.05223728343844414,
-0.020645804703235626,
-0.011842086911201477,
0.0026420592330396175,
0.0009235411998815835,
-0.08401747792959213,
0.009506694972515106,
-0.026835773140192032,
0.02492971532046795,
-0.044613055884838104,
0.02007964998483658,
0.03351640701293945,
-0.050953999161720276,
0.008195101283490658,
0.008940539322793484,
-0.008246999233961105,
0.009563310071825981,
0.042990077286958694,
0.04499049112200737,
-0.008765975013375282,
-0.04668895900249481,
-0.05004815012216568,
-0.05774786323308945,
0.03215763345360756,
-0.0013304655440151691,
-0.020343855023384094,
-0.023910636082291603,
-0.013672656379640102,
-0.026401719078421593,
-0.07797849178314209,
0.03563005477190018,
0.08635759353637695,
0.027099978178739548,
-0.04446208104491234,
-0.05967279151082039,
0.07073169946670532,
-0.05050107464194298,
-0.006491916719824076,
0.028213417157530785,
-0.027326440438628197,
0.025646844878792763,
-0.060578640550374985,
0.005411503370851278,
-0.03872503712773323,
-0.006770276464521885,
0.021966835483908653,
0.05888017639517784,
0.0690709725022316,
0.004003191366791725,
0.0034417537972331047,
-0.04521695524454117,
0.04400915652513504,
0.0228726826608181,
0.011672239750623703,
0.013814195059239864,
-0.0003845139581244439,
0.01219121553003788,
0.008379101753234863,
0.06714604794979095,
-0.041404839605093,
-0.02881731651723385,
0.01722056418657303,
-0.01623922772705555,
0.049557480961084366,
-0.057332683354616165,
-0.04770803824067116,
0.05854048207402229,
-0.023476582020521164,
0.028741829097270966,
0.004331090021878481,
-0.019041698426008224,
-0.02285381220281124,
0.039857350289821625,
0.011134392581880093,
0.038253240287303925,
0.06631568819284439,
0.015654200688004494,
-0.00011057725350838155,
0.021495038643479347,
0.015776867046952248,
0.010388953611254692,
0.02145729400217533,
0.020796779543161392,
-0.07397765666246414,
-0.08069603145122528,
0.009747311472892761,
-0.05148240923881531,
0.02802469953894615,
-0.009572746232151985,
-0.014833275228738785,
0.03432789817452431,
0.0018341080285608768,
0.0010120030492544174,
-0.004104627761989832,
-0.0012278498616069555,
0.012993269599974155,
-0.008020536974072456,
0.01554096955806017,
-0.033610764890909195,
0.03542246297001839,
-0.008520640432834625,
-0.001178900944069028,
0.02781710773706436,
-0.020570317283272743,
0.009402900002896786,
0.03519600257277489,
0.03736626356840134,
-0.01438978686928749,
0.04155581444501877,
-0.020230624824762344,
-0.015701379626989365,
0.03736626356840134,
-0.0489535816013813,
-0.03761160001158714,
-0.043216537684202194,
-0.019013389945030212,
-0.0282511617988348,
0.00695427693426609,
0.03644154593348503,
-0.03740400820970535,
0.036082979291677475,
0.02781710773706436,
-0.0020853395108133554,
-0.0055388882756233215,
0.008412127383053303,
-0.027571775019168854,
-0.00046914242557249963,
0.10032276064157486,
0.013474501669406891,
-0.03228973597288132,
-0.01824907958507538,
0.003156317165121436,
0.012870602309703827,
0.015446609817445278,
-0.0005661555333063006,
-0.014002913609147072,
0.09820911288261414,
-0.03051578253507614,
0.028005827218294144,
-0.009610489942133427,
0.014012349769473076,
0.036290571093559265,
0.039970580488443375,
-0.007473253179341555,
-0.08167736977338791,
-0.05918212607502937,
-0.020362727344036102,
0.0494065061211586,
-0.015003121457993984,
-0.03464872017502785,
-0.013889682479202747,
-0.02662818133831024,
0.014918197877705097,
-0.08318711817264557,
0.07745007425546646,
-0.04068771004676819,
0.004630680661648512,
-0.03861180692911148,
-0.03593200445175171,
-0.0017963643185794353,
-0.04057447984814644,
-0.04446208104491234,
0.027534030377864838,
0.06571178883314133,
0.05578519031405449,
-0.06937292218208313,
-0.01914549246430397,
0.021325191482901573,
-0.009440643712878227,
-0.002364878775551915,
-0.03676236420869827,
0.011313674971461296,
-0.053784776479005814,
0.012587524950504303,
-0.026137514039874077,
-0.013625476509332657,
0.025722332298755646,
0.021532781422138214,
0.01747533492743969,
-0.00006372935604304075,
0.004425449296832085,
-0.02460889331996441,
0.0228726826608181,
-0.013974606059491634,
-0.014616248197853565,
-0.07152431458234787,
0.01202136930078268,
-0.03298799693584442,
0.021966835483908653,
0.043971411883831024,
-0.00719961104914546,
-0.010181363672018051,
0.010596544481813908,
-0.04517921060323715,
-0.038253240287303925,
-0.04683993384242058,
0.0665798932313919,
-0.025722332298755646,
0.017786718904972076,
0.014342606998980045,
-0.04887809604406357,
-0.03768708556890488,
0.0023766737431287766,
-0.05027461051940918,
-0.024137098342180252,
-0.01964559778571129,
-0.057219453155994415,
-0.010907930321991444,
0.05933310091495514,
-0.05563421547412872,
0.017607437446713448,
0.0182962603867054,
-0.04042350500822067,
-0.01466342806816101,
-0.007039200514554977,
-0.024193713441491127,
-0.004321653861552477,
-0.0660892203450203,
0.023872891440987587,
0.07175077497959137,
-0.023325607180595398,
-0.0017668770160526037,
0.012795114889740944,
0.01084187813103199,
0.010228543542325497,
-0.022061193361878395,
-0.04268812760710716,
0.0009978491580113769,
-0.030572399497032166,
0.041404839605093,
0.04314105212688446,
0.01089849416166544,
-0.004215499851852655,
0.01973995566368103,
0.03929119557142258,
-0.02611864171922207,
0.014116144739091396,
-0.06446624547243118,
-0.014842710457742214,
-0.01626753620803356,
-0.10696565359830856,
0.04604731500148773,
0.02157052606344223,
-0.041782278567552567,
0.06782542914152145,
0.018881287425756454,
0.005340734031051397,
-0.024967458099126816,
0.06978810578584671,
0.003375702304765582,
0.06812737882137299,
0.017579128965735435,
-0.015616456978023052,
0.03530923277139664,
0.017031844705343246,
0.0006392839713953435,
0.013748143799602985,
0.006831610109657049,
0.0019154929323121905,
-0.05276569724082947,
-0.031648095697164536,
-0.02900603599846363,
-0.004022063221782446,
0.030043987557291985,
-0.005652119405567646,
-0.04019704461097717,
0.028213417157530785,
-0.0028024697676301003,
-0.05703073367476463,
0.03504502773284912,
-0.024873100221157074,
-0.02674141339957714,
0.018626516684889793,
0.0752609446644783,
0.024193713441491127,
-0.004451397806406021,
0.057974327355623245,
-0.03632831200957298,
-0.04031027480959892,
0.0019367237109690905,
0.006864635739475489,
-0.04027253016829491,
-0.0526147224009037,
-0.013144244439899921,
0.053898006677627563,
0.003472420619800687,
0.04453757032752037,
0.03872503712773323,
-0.04423562064766884,
-0.04702865332365036,
0.003779088146984577,
0.03710205852985382,
-0.018239643424749374,
-0.07103364914655685,
0.029421215876936913,
0.06012571603059769,
0.07390216737985611,
-0.045141465961933136,
0.010209671221673489,
0.01422937586903572,
-0.010464441031217575,
-0.05552098527550697,
0.00844043493270874,
-0.08001665025949478,
0.06733476370573044,
-0.045669879764318466,
0.04767029732465744,
0.021627141162753105,
-0.025193920359015465,
0.030987579375505447,
0.03940442577004433,
-0.027156593278050423,
0.04691542312502861,
0.003326163860037923,
-0.0005750017007812858,
-0.005477554630488157,
0.03859293460845947,
-0.008817872032523155,
0.011983625590801239,
0.057332683354616165,
-0.04280135780572891,
-0.03902698680758476,
-0.05623811483383179,
-0.0038144728168845177,
-0.02255186252295971,
-0.048274196684360504,
0.032837022095918655,
0.010124747641384602,
-0.001502671162597835,
-0.0010845416691154242,
-0.004972732625901699,
-0.015323943458497524,
0.049029070883989334
]
|
41,667 | pyglove.core.patching.pattern_based | patch_on_path | Recursively patch values on matched paths.
Example::
d = pg.Dict(a={'x': 1}, b=2)
print(pg.patching.patch_on_path(d, '.*x', value=3))
# {a={x=1}, b=2}
Args:
src: symbolic value to patch.
regex: Regex for key path.
value: New value for field that satisfy `condition`.
value_fn: Callable object that produces new value based on old value.
If not None, `value` must be None.
skip_notification: If True, `on_change` event will not be triggered for this
operation. If None, the behavior is decided by `pg.notify_on_rebind`.
Please see `symbolic.Symbolic.rebind` for details.
Returns:
`src` after being patched.
| def patch_on_path(
src: symbolic.Symbolic,
regex: str,
value: Any = None,
value_fn: Optional[Callable[[Any], Any]] = None,
skip_notification: Optional[bool] = None) -> Any:
"""Recursively patch values on matched paths.
Example::
d = pg.Dict(a={'x': 1}, b=2)
print(pg.patching.patch_on_path(d, '.*x', value=3))
# {a={x=1}, b=2}
Args:
src: symbolic value to patch.
regex: Regex for key path.
value: New value for field that satisfy `condition`.
value_fn: Callable object that produces new value based on old value.
If not None, `value` must be None.
skip_notification: If True, `on_change` event will not be triggered for this
operation. If None, the behavior is decided by `pg.notify_on_rebind`.
Please see `symbolic.Symbolic.rebind` for details.
Returns:
`src` after being patched.
"""
regex = re.compile(regex)
return _conditional_patch(
src, lambda k, v, p: regex.match(str(k)),
value, value_fn, skip_notification)
| (src: pyglove.core.symbolic.base.Symbolic, regex: str, value: Optional[Any] = None, value_fn: Optional[Callable[[Any], Any]] = None, skip_notification: Optional[bool] = None) -> Any | [
0.05714990943670273,
-0.039859332144260406,
-0.004850462079048157,
0.048668425530195236,
-0.041133373975753784,
-0.007621504832059145,
-0.02156772091984749,
0.037529654800891876,
0.06526738405227661,
-0.05623988062143326,
0.02116730809211731,
-0.010155939497053623,
0.059297580271959305,
0.02076689340174198,
0.003774351207539439,
0.0005554029485210776,
0.0355093851685524,
0.03155985474586487,
0.012094303965568542,
0.04470069333910942,
0.02491663210093975,
0.006957182660698891,
0.03672882914543152,
0.048158809542655945,
-0.004236191511154175,
-0.0017654589610174298,
-0.005410130601376295,
0.012330912053585052,
0.04662995785474777,
0.00282791955396533,
0.03172365948557854,
-0.03112304024398327,
-0.025954067707061768,
0.004718507640063763,
0.012048802338540554,
-0.02626347728073597,
-0.039822932332754135,
0.04375426098704338,
-0.07327564805746078,
-0.059843599796295166,
0.008140222169458866,
0.06464856117963791,
-0.06879829615354538,
0.0004558683722279966,
0.006975383032113314,
0.029630590230226517,
-0.06370212882757187,
0.03075902722775936,
0.044482287019491196,
0.029412182047963142,
0.0006791101768612862,
0.02353338710963726,
-0.017072170972824097,
-0.01822790876030922,
0.05023367702960968,
0.0278469305485487,
-0.008408680558204651,
0.043535854667425156,
0.06872549653053284,
-0.05711350962519646,
0.027501119300723076,
-0.0014537735842168331,
-0.010001233778893948,
-0.025135040283203125,
-0.02278716117143631,
-0.058460354804992676,
0.001310443738475442,
-0.050998102873563766,
-0.036510419100522995,
-0.05303657427430153,
-0.10476270318031311,
-0.0012876930413767695,
0.04146098718047142,
-0.0507068932056427,
-0.01038344670087099,
0.033707525581121445,
-0.025735659524798393,
-0.0047094072215259075,
0.04328104481101036,
-0.05904277414083481,
-0.018018601462244987,
-0.03598260134458542,
-0.0006119954632595181,
-0.03585519641637802,
-0.005278176162391901,
0.025062236934900284,
0.05951599031686783,
0.002934848191216588,
0.07476809620857239,
0.03811207413673401,
-0.004882313311100006,
-0.024771027266979218,
-0.02444341778755188,
-0.012931532226502895,
0.0002643353946041316,
-0.009609920904040337,
0.06293770670890808,
-0.015488717705011368,
0.004713957663625479,
0.035563986748456955,
0.0663958191871643,
-0.03620101138949394,
-0.037893667817115784,
0.009983033873140812,
0.0465935580432415,
-0.023751793429255486,
0.027901532128453255,
0.010419848375022411,
0.0020373305305838585,
-0.03663782402873039,
-0.034180741757154465,
-0.034107938408851624,
0.007853562012314796,
-0.05460182577371597,
0.019256243482232094,
0.0662866160273552,
-0.05620347708463669,
-0.09646322578191757,
0.03898570314049721,
-0.03763885796070099,
-0.010183240287005901,
0.021585920825600624,
-0.016598954796791077,
0.09471596777439117,
0.028975367546081543,
0.003401238704100251,
0.033106908202171326,
0.006743325386196375,
0.02227754518389702,
-0.0114936837926507,
-0.034180741757154465,
0.08066509664058685,
-0.018009502440690994,
0.04462788999080658,
0.037147440016269684,
0.04004133865237236,
-0.03186926618218422,
-0.017499884590506554,
0.03237888216972351,
-0.03135964646935463,
-0.020166274160146713,
-0.043608658015728,
-0.02437061443924904,
-0.037384048104286194,
0.06246448680758476,
-0.049178045243024826,
0.02775592729449272,
0.0905662253499031,
0.03439914807677269,
0.053254980593919754,
0.018055003136396408,
0.007544151972979307,
0.018009502440690994,
0.03565499186515808,
0.01370505802333355,
0.017536286264657974,
-0.0204938855022192,
0.007089137099683285,
0.03873089328408241,
-0.01113877259194851,
0.011184274218976498,
0.01455138623714447,
-0.009027501568198204,
-0.06956272572278976,
0.005296376999467611,
0.004058735445141792,
-0.0001932392769958824,
-0.015279410406947136,
-0.0104653500020504,
0.005150772165507078,
0.009191307239234447,
-0.04058735817670822,
0.017326978966593742,
0.037493251264095306,
0.03294309973716736,
0.002509408863261342,
0.019966067746281624,
0.01711767166852951,
-0.029685191810131073,
0.04357225447893143,
0.04517390951514244,
0.037147440016269684,
-0.03490876778960228,
0.0754961222410202,
0.006229158025234938,
0.019602054730057716,
-0.017736492678523064,
-0.01640784740447998,
0.04095136746764183,
0.019219841808080673,
-0.023132972419261932,
-0.02464362420141697,
0.05554825812578201,
0.007630604784935713,
-0.02447981759905815,
-0.04000493511557579,
0.002047568326815963,
-0.02215014025568962,
-0.01812780648469925,
0.0669054388999939,
-0.010237841866910458,
-0.08707170933485031,
0.03960452228784561,
0.04317184165120125,
-0.06796107441186905,
-0.022950967773795128,
0.07906344532966614,
0.028301944956183434,
-0.037420451641082764,
0.00010643090354278684,
-0.043972671031951904,
-0.01792759820818901,
0.000026483307010494173,
-0.03680162876844406,
-0.002079419558867812,
-0.016835562884807587,
-0.019656656309962273,
0.06086283549666405,
-0.050524886697530746,
-0.005896997172385454,
-0.028265545144677162,
0.04320824518799782,
-0.031141240149736404,
-0.02811994031071663,
0.05340058356523514,
-0.02926657721400261,
-0.019602054730057716,
0.0031441550236195326,
0.02717350795865059,
-0.0763697549700737,
0.05671309679746628,
-0.015807228162884712,
0.07695217430591583,
-0.038876499980688095,
0.04881403222680092,
-0.03474495932459831,
0.04735798388719559,
-0.030304012820124626,
0.07152839004993439,
0.025644656270742416,
-0.005482933018356562,
-0.002214786596596241,
0.03601900488138199,
0.01782749593257904,
0.0011830395087599754,
-0.0021817979868501425,
-0.0018484992906451225,
-0.018419016152620316,
0.017845695838332176,
-0.008963799104094505,
0.024825628846883774,
0.01587093062698841,
-0.021968133747577667,
0.01328644435852766,
-0.037930067628622055,
0.02839294821023941,
0.01614394038915634,
0.011011367663741112,
0.046302348375320435,
0.011903197504580021,
-0.01480619516223669,
-0.0165079515427351,
-0.039713725447654724,
-0.08241235464811325,
-0.006665972992777824,
-0.03521817550063133,
-0.0072074406780302525,
0.008276727050542831,
0.0002233840205008164,
0.03316150978207588,
-0.10177779942750931,
-0.008813644759356976,
0.0041429135017097,
0.00997393298894167,
-0.013650456443428993,
0.024934833869338036,
-0.01759088784456253,
0.027319112792611122,
0.10236021876335144,
-0.050488486886024475,
-0.0007797823054715991,
-0.051507722586393356,
0.008340428583323956,
-0.02464362420141697,
0.006333811674267054,
0.02559005469083786,
-0.006788827013224363,
0.0330159030854702,
0.013040735386312008,
0.018036803230643272,
0.07043635100126266,
-0.02633628062903881,
-0.026718493551015854,
0.04004133865237236,
0.008140222169458866,
0.029248377308249474,
-0.008995650336146355,
-0.06570419669151306,
0.006756975781172514,
-0.0008349529234692454,
0.02997640147805214,
-0.0035172675270587206,
0.022714359685778618,
0.057513922452926636,
-0.026864098384976387,
-0.01326824352145195,
0.034581154584884644,
-0.008822744712233543,
-0.057441119104623795,
0.002149946754798293,
-0.025571854785084724,
-0.029211975634098053,
-0.07025434821844101,
-0.03960452228784561,
0.013095337897539139,
-0.02713710628449917,
-0.00808562058955431,
-0.009564419277012348,
0.007839911617338657,
-0.014924499206244946,
-0.021513119339942932,
0.057004306465387344,
-0.05758672580122948,
0.008654389530420303,
-0.007885413244366646,
-0.01579812727868557,
0.07360325753688812,
0.054165009409189224,
0.01887403056025505,
0.03228788077831268,
-0.00017759812180884182,
0.025480851531028748,
0.04706677421927452,
0.03685623034834862,
-0.0063247112557291985,
0.044445883482694626,
-0.011238875798881054,
-0.04102417081594467,
-0.04451868683099747,
0.009154905565083027,
0.03641941770911217,
0.0032260578591376543,
-0.01728147827088833,
-0.05671309679746628,
0.04076936095952988,
0.003512717317789793,
0.019056037068367004,
0.032597288489341736,
0.04783120006322861,
0.013422948308289051,
0.04193419963121414,
0.03811207413673401,
-0.009882930666208267,
-0.006638671737164259,
-0.047248780727386475,
0.004359045531600714,
0.008172073401510715,
-0.05485663190484047,
-0.006101754028350115,
-0.07782579958438873,
0.03811207413673401,
0.02677309513092041,
-0.03916770964860916,
-0.009646322578191757,
0.049505654722452164,
0.004900513682514429,
-0.04342665150761604,
0.025517253205180168,
0.010574553161859512,
-0.009355112910270691,
-0.0029530487954616547,
0.028847964480519295,
0.009946632198989391,
-0.025499051436781883,
0.03541838377714157,
-0.05856955796480179,
0.030194809660315514,
-0.02890256606042385,
-0.0016062037320807576,
0.08095630258321762,
0.07505930960178375,
-0.00194974010810256,
-0.013259143568575382,
0.02890256606042385,
-0.017172273248434067,
-0.007767109666019678,
0.06614100933074951,
0.024316012859344482,
0.0062064072117209435,
-0.02761032246053219,
-0.009273209609091282,
-0.009027501568198204,
0.029867198318243027,
0.014724291861057281,
0.01867382414638996,
-0.08292197436094284,
0.033743929117918015,
0.010638255625963211,
-0.034963369369506836,
-0.004177039489150047,
0.011302577331662178,
0.02538984827697277,
-0.039822932332754135,
-0.0035968951415270567,
0.04593833535909653,
-0.022131940349936485,
0.020603088662028313,
0.007016334682703018,
-0.00022978267224971205,
0.03811207413673401,
0.004818610846996307,
-0.04601113870739937,
-0.01782749593257904,
-0.04328104481101036,
0.00673422496765852,
-0.0225505530834198,
-0.05412860959768295,
-0.0043362947180867195,
0.0026345381047576666,
-0.03439914807677269,
0.049032438546419144,
-0.02076689340174198,
-0.04976046457886696,
0.008467832580208778,
0.024661824107170105,
-0.008504234254360199,
0.04874122887849808,
-0.018209708854556084,
0.0029735243879258633,
0.08860056102275848,
-0.005778693128377199,
-0.0038881050422787666,
0.022677958011627197,
0.061226844787597656,
0.005896997172385454,
-0.05241775140166283,
0.03734764829277992,
-0.03811207413673401,
0.012249009683728218,
0.008854595944285393,
-0.030085604637861252,
0.03017660789191723,
0.007248392328619957,
0.00003062465475522913,
-0.018382614478468895,
0.0181915070861578,
0.026427283883094788,
-0.03534558042883873,
0.004224816337227821,
0.004529676400125027,
-0.04739438369870186,
-0.05016087740659714,
0.041206177324056625,
0.046775564551353455,
-0.07265682518482208,
-0.01431477814912796,
-0.0433538481593132,
-0.025608256459236145,
0.0030395016074180603,
-0.00411106226965785,
0.030613422393798828,
0.0011233187979087234,
0.03685623034834862,
-0.06308330595493317,
-0.06534018367528915,
0.0330159030854702,
0.03989573195576668,
0.03945891931653023,
-0.0427350290119648,
-0.05409220606088638,
0.024552620947360992,
-0.03945891931653023,
-0.0386216901242733,
0.03996853530406952,
0.018209708854556084,
0.037529654800891876,
-0.03565499186515808,
0.02622707560658455,
-0.0204938855022192,
0.021895332261919975,
0.010155939497053623,
-0.015880031511187553,
0.009801027365028858,
-0.0008793168817646801,
0.0027005153242498636,
-0.03246988356113434,
0.039276912808418274,
0.01982046291232109,
0.0027551171369850636,
0.0029439483769237995,
-0.0017336079617962241,
0.005628538317978382,
-0.006138155236840248,
0.02913917414844036,
0.0065931701101362705,
-0.01255841925740242,
-0.010174140334129333,
-0.0036651475820690393,
0.036237411201000214,
-0.025517253205180168,
-0.04364505782723427,
0.019219841808080673,
-0.058387551456689835,
0.06559499353170395,
-0.013777860440313816,
0.05030648037791252,
-0.014305678196251392,
0.032597288489341736,
-0.013459349982440472,
0.011384480632841587,
0.03507257252931595,
0.04324464499950409,
0.006015301216393709,
0.03392593190073967,
-0.016398748382925987,
0.0024047554470598698,
0.04415467381477356,
0.006288310047239065,
-0.07666096091270447,
-0.06621381640434265,
-0.02693689987063408,
-0.01715407334268093,
0.028283745050430298,
-0.04604753851890564,
0.013386547565460205,
-0.02062128856778145,
0.010392547585070133,
-0.010802061296999454,
0.04976046457886696,
-0.017472583800554276,
0.035636790096759796,
0.04389986768364906,
0.05059769004583359,
0.025935865938663483,
0.060316815972328186,
-0.008836395107209682,
0.03294309973716736,
-0.02538984827697277,
-0.09864729642868042,
0.007662456016987562,
-0.018382614478468895,
0.046265944838523865,
-0.006215507630258799,
0.040259744971990585,
0.005428331438452005,
-0.00686162943020463,
0.030904632061719894,
-0.039276912808418274,
-0.03112304024398327,
-0.08423241227865219,
-0.021349312737584114,
-0.021021703258156776,
0.06250088661909103,
0.0459747351706028,
-0.06916230916976929,
-0.0003921662282664329,
0.04288063198328018,
-0.0032260578591376543,
-0.03154165297746658,
-0.029867198318243027,
-0.03197846934199333,
-0.014487683773040771,
0.047758396714925766,
-0.0038676292169839144,
0.009041151963174343,
-0.0157617274671793,
-0.015079203993082047,
0.016316846013069153,
0.01244011614471674,
0.0018405364826321602,
-0.012030602432787418,
0.03367112576961517,
0.0074576991610229015,
-0.0017802469665184617,
-0.027064304798841476,
-0.02156772091984749,
0.0016118913190439343,
-0.016535252332687378,
-0.017345178872346878,
-0.013359246775507927,
-0.0338895320892334,
-0.017199574038386345,
0.05227214843034744,
-0.0024661824572831392,
0.012785927392542362,
0.00801736768335104,
-0.014733392745256424,
0.09646322578191757,
-0.08852776139974594,
0.029211975634098053,
-0.04881403222680092,
0.0355093851685524,
-0.037384048104286194,
-0.031177641823887825,
-0.02937578223645687,
-0.03075902722775936,
-0.021986335515975952,
-0.0037720759864896536,
0.07094597071409225,
0.054201412945985794,
-0.09770086407661438,
-0.024079404771327972,
0.0010425535729154944,
-0.007935465313494205,
-0.06581339985132217,
-0.019693057984113693,
0.04874122887849808,
-0.02768312580883503,
0.033070504665374756,
-0.037966467440128326,
0.011175173334777355,
0.08561566472053528,
0.02275075949728489,
-0.016871964558959007,
-0.010356145910918713,
0.013304644264280796,
-0.007430398371070623,
0.031923867762088776,
-0.037529654800891876,
-0.04695757105946541,
-0.037020038813352585,
0.0050142677500844,
-0.00006668816786259413,
-0.012740425765514374,
0.0781170129776001,
0.013350145891308784,
0.006288310047239065,
0.0051234713755548,
-0.06534018367528915,
-0.05300017073750496,
-0.0037720759864896536,
0.014733392745256424,
-0.04331744834780693,
0.05827834829688072,
0.009509817697107792,
-0.07520491629838943,
-0.022896364331245422,
-0.03223327547311783,
-0.04433668032288551,
0.0011739392066374421,
-0.06999953836202621,
-0.07156479358673096,
-0.017800195142626762,
0.015434116125106812,
-0.025025837123394012,
0.051034506410360336,
0.002136296359822154,
-0.08386839926242828,
0.0038653542287647724,
0.011602887883782387,
0.012685824185609818,
-0.013168140314519405,
-0.08474203199148178,
0.005282726604491472,
0.07109157741069794,
0.05551185458898544,
0.022969167679548264,
0.0018860379932448268,
-0.017945799976587296,
0.0265364870429039,
-0.05525704845786095,
-0.04473709687590599,
0.0021715599577873945,
0.02065769024193287,
0.00005581045843428001,
-0.002041880739852786,
0.056021470576524734,
-0.04317184165120125,
0.021822528913617134,
0.0394953191280365,
-0.025262443348765373,
-0.031687259674072266,
-0.06854349374771118,
0.023879198357462883,
0.04102417081594467,
-0.08517884463071823,
0.0038403284270316362,
0.04080576449632645,
-0.021749727427959442,
0.02018447406589985,
-0.04986966773867607,
0.02393379993736744,
0.006247358862310648,
0.06348372250795364,
-0.008986550383269787,
0.033034104853868484,
0.02069409191608429,
0.026864098384976387,
0.021021703258156776,
0.04317184165120125,
-0.0009367625461891294,
-0.002082832157611847,
0.0075623528100550175,
-0.034016937017440796,
-0.06981753557920456,
-0.031068438664078712,
0.004395446740090847,
0.026827696710824966,
0.04004133865237236,
-0.017245076596736908,
-0.018318912014365196,
0.04313544183969498,
0.013968966901302338,
-0.04531951621174812,
0.03159625455737114,
-0.06847068667411804,
-0.029630590230226517,
-0.03199667111039162,
0.0042043402791023254,
0.03170545771718025,
-0.015789028257131577,
0.05412860959768295,
-0.00933691207319498,
-0.033980537205934525,
-0.00004009821350337006,
0.011020468547940254,
-0.05667669326066971,
-0.08030108362436295,
-0.02646368369460106,
0.021494917571544647,
-0.01042894832789898,
-0.0074576991610229015,
0.013441149145364761,
-0.026081470772624016,
-0.025262443348765373,
-0.006197307258844376,
0.020548487082123756,
0.0030918284319341183,
-0.025171441957354546,
0.05034288391470909,
0.016598954796791077,
0.06810667365789413,
0.002873420948162675,
-0.021658724173903465,
0.04433668032288551,
-0.0033398116938769817,
-0.08481483161449432,
-0.019492851570248604,
-0.01728147827088833,
0.026609288528561592,
0.009646322578191757,
0.025499051436781883,
-0.032797496765851974,
-0.03578239679336548,
0.061263248324394226,
0.007384896744042635,
-0.03913130611181259,
0.04295343533158302,
-0.02038468047976494,
0.016025636345148087,
-0.005956149194389582,
0.024188607931137085,
-0.011229774914681911,
-0.01958385482430458,
0.02748291753232479,
-0.028611356392502785,
-0.01799130067229271,
-0.036510419100522995,
0.030140208080410957,
0.043099042028188705,
-0.05212654173374176,
0.024352414533495903,
0.009154905565083027,
0.021531319245696068,
0.04459149017930031,
-0.009041151963174343,
-0.0718924030661583,
0.019092438742518425
]
|
41,668 | pyglove.core.patching.pattern_based | patch_on_type | Recursively patch values on matched types.
Example::
d = pg.Dict(a={'x': 1}, b=2)
print(pg.patching.patch_on_type(d, int, value_fn=lambda x: x * 2))
# {a={x=2}, b=4}
Args:
src: symbolic value to patch.
value_type: Value type to match.
value: New value for field that satisfy `condition`.
value_fn: Callable object that produces new value based on old value.
If not None, `value` must be None.
skip_notification: If True, `on_change` event will not be triggered for this
operation. If None, the behavior is decided by `pg.notify_on_rebind`.
Please see `symbolic.Symbolic.rebind` for details.
Returns:
`src` after being patched.
| def patch_on_type(
src: symbolic.Symbolic,
value_type: Union[Type[Any], Tuple[Type[Any], ...]],
value: Any = None,
value_fn: Optional[Callable[[Any], Any]] = None,
skip_notification: Optional[bool] = None) -> Any:
"""Recursively patch values on matched types.
Example::
d = pg.Dict(a={'x': 1}, b=2)
print(pg.patching.patch_on_type(d, int, value_fn=lambda x: x * 2))
# {a={x=2}, b=4}
Args:
src: symbolic value to patch.
value_type: Value type to match.
value: New value for field that satisfy `condition`.
value_fn: Callable object that produces new value based on old value.
If not None, `value` must be None.
skip_notification: If True, `on_change` event will not be triggered for this
operation. If None, the behavior is decided by `pg.notify_on_rebind`.
Please see `symbolic.Symbolic.rebind` for details.
Returns:
`src` after being patched.
"""
return _conditional_patch(
src, lambda k, v, p: isinstance(v, value_type),
value, value_fn, skip_notification)
| (src: pyglove.core.symbolic.base.Symbolic, value_type: Union[Type[Any], Tuple[Type[Any], ...]], value: Optional[Any] = None, value_fn: Optional[Callable[[Any], Any]] = None, skip_notification: Optional[bool] = None) -> Any | [
0.04496075212955475,
-0.0260794498026371,
-0.011037163436412811,
0.032650068402290344,
0.00007548540452262387,
0.009256082586944103,
-0.013187379576265812,
0.006630603224039078,
0.011526267975568771,
-0.06253162026405334,
0.006805942859500647,
-0.0020717752631753683,
0.06087050586938858,
-0.0073919459246098995,
0.009957440197467804,
0.04112173616886139,
-0.02166827581822872,
0.05647778883576393,
0.0669243335723877,
0.01682336814701557,
0.03132117912173271,
0.011692379601299763,
0.03770723193883896,
0.049944084137678146,
-0.00367982336319983,
-0.02515660971403122,
-0.0163434911519289,
0.011304786428809166,
-0.0024455252569168806,
0.031671859323978424,
0.0328715518116951,
-0.02857111766934395,
0.0088961748406291,
-0.021594449877738953,
0.008817733265459538,
-0.03663673624396324,
-0.061608780175447464,
0.08504890650510788,
-0.043779514729976654,
-0.019139695912599564,
-0.023864634335041046,
0.048024579882621765,
-0.06721964478492737,
-0.005993844009935856,
0.014627009630203247,
0.025285808369517326,
-0.04245062544941902,
0.01597435586154461,
0.019158152863383293,
0.013704169541597366,
-0.02412302978336811,
-0.001921813702210784,
0.025710314512252808,
-0.012633675709366798,
0.034514203667640686,
0.008024090901017189,
-0.03608303144574165,
-0.013547287322580814,
0.03724581003189087,
0.010557286441326141,
0.03342525288462639,
0.03388667479157448,
-0.04053112119436264,
-0.03715352714061737,
-0.02373543754220009,
-0.034532662481069565,
-0.001663418603129685,
-0.041343219578266144,
-0.05459519848227501,
-0.048024579882621765,
-0.07722322642803192,
-0.015125342644751072,
0.0503501333296299,
-0.013132008723914623,
0.01882592961192131,
0.017746208235621452,
-0.003712122794240713,
-0.011230959556996822,
0.029807722195982933,
-0.05732680484652519,
0.008863875642418861,
0.00825480092316866,
-0.01985951140522957,
-0.057732854038476944,
-0.014285558834671974,
0.036913588643074036,
0.006556776352226734,
0.024879759177565575,
0.1091165691614151,
0.011692379601299763,
-0.00942680798470974,
-0.051420629024505615,
-0.0010030113626271486,
-0.03475414216518402,
0.002200972754508257,
0.01325197797268629,
0.07091100513935089,
-0.05123605951666832,
-0.0010289662750437856,
0.024990499019622803,
0.08342470973730087,
-0.005181745160371065,
0.014433213509619236,
-0.02116994373500347,
0.06345445662736893,
-0.05178976431488991,
0.03185642510652542,
0.015005373395979404,
-0.025765685364603996,
0.009837470948696136,
-0.008125604130327702,
-0.11007632315158844,
-0.02654086984694004,
-0.08209582418203354,
0.034052785485982895,
0.0675518661737442,
-0.04440704733133316,
-0.05688384175300598,
0.03480951488018036,
-0.025913339108228683,
-0.007138165179640055,
0.005809275899082422,
0.011913861148059368,
0.05681001394987106,
0.017026392742991447,
0.002120224293321371,
0.02943858690559864,
-0.02264648675918579,
0.014543954282999039,
0.008674693293869495,
-0.07906890660524368,
0.06142421066761017,
-0.0423768013715744,
0.0653739646077156,
0.06050137057900429,
0.039349883794784546,
-0.08408915251493454,
-0.009846699424088001,
0.01932426355779171,
-0.028109697625041008,
-0.01638963259756565,
-0.01592821255326271,
0.03045370988547802,
-0.07475001364946365,
0.03050908073782921,
-0.02316327765583992,
0.0004792998661287129,
0.0763373002409935,
-0.003963596653193235,
0.05123605951666832,
0.005776976700872183,
0.030195316299796104,
0.01876133121550083,
0.06699816137552261,
-0.01974876970052719,
0.030269142240285873,
0.008619323372840881,
-0.011904632672667503,
0.005984615534543991,
-0.00603537168353796,
-0.018253769725561142,
0.042709022760391235,
0.0002754099841695279,
-0.0649310052394867,
0.004752624314278364,
-0.0007146240095607936,
0.016278892755508423,
-0.012845928780734539,
-0.0045565213076770306,
-0.021889757364988327,
-0.023292474448680878,
-0.0387592688202858,
0.08157902956008911,
0.02995537780225277,
0.06810557097196579,
0.0455513671040535,
0.016131239011883736,
-0.03089667297899723,
-0.04451778903603554,
0.009874384850263596,
0.012439879588782787,
0.03039834089577198,
-0.06888075917959213,
0.04112173616886139,
0.0018260690849274397,
0.03798408433794975,
-0.024381425231695175,
-0.016684941947460175,
0.04381642863154411,
0.005920016672462225,
-0.00193219562061131,
-0.017118677496910095,
0.0338682159781456,
-0.026725437492132187,
0.004706482402980328,
-0.021465251222252846,
-0.010917194187641144,
0.010954107157886028,
-0.028109697625041008,
0.06352828443050385,
-0.02899562381207943,
-0.07349495589733124,
0.02563648670911789,
0.03868544101715088,
-0.05699457973241806,
-0.04259828105568886,
0.07803532481193542,
0.023274017497897148,
-0.002076389268040657,
-0.024990499019622803,
-0.04215531796216965,
-0.02469519153237343,
0.0019160459050908685,
-0.002913866424933076,
-0.006413735914975405,
-0.08534421771764755,
-0.04197074845433235,
0.010575743392109871,
-0.027205314487218857,
-0.02511969767510891,
-0.05507507547736168,
0.05127297341823578,
-0.0541522353887558,
-0.018650591373443604,
0.08704224228858948,
-0.007770310156047344,
-0.034108154475688934,
0.0019195065833628178,
0.03752266243100166,
-0.03442192077636719,
0.05754828453063965,
0.00003186680987710133,
0.0491688996553421,
-0.02030247449874878,
0.0619410015642643,
-0.04695408418774605,
0.03872235491871834,
0.009468335658311844,
0.015789788216352463,
0.053450874984264374,
-0.0032899235375225544,
-0.012015373446047306,
-0.0012885149335488677,
0.0076088132336735725,
-0.03420044109225273,
-0.027186857536435127,
0.017515497282147408,
0.016731083393096924,
0.008102532476186752,
0.00914072711020708,
0.04540371522307396,
-0.02122531272470951,
-0.01980414055287838,
-0.004166621249169111,
-0.008273257873952389,
0.025248894467949867,
0.041786182671785355,
-0.043299637734889984,
0.05009173974394798,
-0.02264648675918579,
-0.024307597428560257,
0.006782871671020985,
0.000022692483980790712,
-0.028663402423262596,
-0.03654445335268974,
-0.07246137410402298,
-0.004494229331612587,
0.03037988394498825,
0.014830034226179123,
0.04820914566516876,
-0.04739704728126526,
0.005495510529726744,
0.047027911990880966,
0.003942832816392183,
-0.024030746892094612,
0.020597781985998154,
-0.008757748641073704,
0.05160519853234291,
0.07803532481193542,
-0.045699022710323334,
0.01062188483774662,
-0.035067908465862274,
-0.003928990103304386,
-0.05057161673903465,
-0.023753894492983818,
0.012255311012268066,
-0.011738521046936512,
0.056219395250082016,
0.022000499069690704,
0.0022448075469583273,
0.05149445682764053,
-0.009320680983364582,
0.028109697625041008,
0.004420401994138956,
-0.004683411680161953,
0.03820556402206421,
-0.0002534925297368318,
-0.029124820604920387,
0.022000499069690704,
-0.008490125648677349,
0.01475620735436678,
-0.012199941091239452,
0.009219168685376644,
0.042709022760391235,
0.02314482070505619,
-0.01978568360209465,
0.029327845200896263,
-0.05887717381119728,
-0.04791383817791939,
0.020985374227166176,
-0.011637008748948574,
0.015706731006503105,
-0.06814248114824295,
-0.037836428731679916,
0.0236800666898489,
-0.023329388350248337,
-0.01744167134165764,
-0.005177130922675133,
0.0048310658894479275,
0.003954368177801371,
-0.01737707108259201,
0.021428337320685387,
-0.039349883794784546,
0.016731083393096924,
-0.007765696384012699,
0.0027615977451205254,
0.06341754645109177,
0.0703573003411293,
0.0036313743330538273,
-0.00021383925923146307,
-0.02360624074935913,
0.007765696384012699,
0.039866674691438675,
0.03527093306183815,
-0.016085095703601837,
0.02404920384287834,
0.00002687410233193077,
-0.05603482574224472,
-0.02270185761153698,
0.00432581128552556,
-0.006136883981525898,
0.0031376550905406475,
0.003596767783164978,
-0.046178899705410004,
0.04979643225669861,
0.008365541696548462,
0.011941545642912388,
-0.011369384825229645,
0.09619681537151337,
0.06212557107210159,
0.034071240574121475,
0.03333296999335289,
-0.014516268856823444,
-0.017026392742991447,
-0.022997165098786354,
-0.019711855798959732,
0.021114572882652283,
-0.06445112824440002,
-0.009182254783809185,
-0.0707264319062233,
0.05223272740840912,
0.021354511380195618,
0.020173275843262672,
-0.0031907183583825827,
0.04784001037478447,
0.014497811906039715,
-0.04186001047492027,
-0.00289540970697999,
0.008374770171940327,
0.026799265295267105,
0.0076088132336735725,
0.01978568360209465,
-0.02798050083220005,
-0.022351177409291267,
0.032631613314151764,
-0.08076693117618561,
0.003130733733996749,
-0.01788463443517685,
-0.031247353181242943,
0.07692791521549225,
0.0589510016143322,
-0.012624447233974934,
-0.04104791209101677,
0.02506432682275772,
-0.011553953401744366,
-0.014119447208940983,
0.044222477823495865,
0.014608552679419518,
-0.015632905066013336,
-0.012144570238888264,
0.0471755675971508,
-0.011341700330376625,
0.04691717028617859,
0.00917302630841732,
0.03626760095357895,
-0.05012865364551544,
-0.06002149358391762,
-0.000050575941713759676,
-0.038463957607746124,
-0.004097408149391413,
-0.0021236848551779985,
0.01253216341137886,
-0.019674941897392273,
0.014442441053688526,
0.03089667297899723,
0.0008893867488950491,
0.00036192621337249875,
-0.007724168244749308,
-0.010400403290987015,
0.06869618594646454,
0.020653152838349342,
-0.0521588996052742,
-0.02264648675918579,
-0.04580976441502571,
0.0405680350959301,
-0.014940774999558926,
-0.03420044109225273,
-0.044185563921928406,
-0.0014915396459400654,
-0.012855157256126404,
0.07308890670537949,
-0.006150726694613695,
-0.014673151075839996,
0.01926889270544052,
0.00847166869789362,
-0.015808245167136192,
0.05972618609666824,
0.011240188032388687,
-0.028644945472478867,
0.07803532481193542,
0.03148728981614113,
-0.0035367831587791443,
0.026946919038891792,
0.04924272745847702,
0.007931807078421116,
-0.02565494365990162,
-0.00963444635272026,
-0.03340679779648781,
0.023569326847791672,
0.011886175721883774,
-0.06810557097196579,
0.040789514780044556,
-0.015752874314785004,
0.013418089598417282,
0.003234553150832653,
0.019471917301416397,
0.03290846571326256,
-0.027279142290353775,
-0.04784001037478447,
0.03246550261974335,
-0.0675518661737442,
-0.01744167134165764,
0.036415256559848785,
0.06027989089488983,
-0.044739268720149994,
-0.007216606754809618,
-0.06710890680551529,
-0.015162256546318531,
0.023421671241521835,
0.021502165123820305,
0.024529078975319862,
-0.04573593661189079,
-0.013602657243609428,
-0.07497149705886841,
-0.05352470278739929,
0.036378342658281326,
0.031616490334272385,
-0.013298120349645615,
-0.01305818185210228,
-0.005274028982967138,
0.03964519500732422,
-0.03562161326408386,
0.02606099285185337,
0.04772926867008209,
0.012928984127938747,
0.023329388350248337,
-0.04621581360697746,
0.009094585664570332,
-0.030306056141853333,
0.003349908161908388,
0.014543954282999039,
0.03082284703850746,
0.01877978816628456,
0.004895664751529694,
-0.017054077237844467,
-0.03226247802376747,
0.039276059716939926,
0.02366160973906517,
0.018530622124671936,
0.05178976431488991,
-0.031542662531137466,
-0.001850293600000441,
0.0235877837985754,
0.027426796033978462,
0.010751082561910152,
-0.025765685364603996,
-0.008817733265459538,
-0.010428088717162609,
0.04307815805077553,
-0.02373543754220009,
-0.020431671291589737,
0.03573235496878624,
-0.06888075917959213,
0.04688025638461113,
0.026780808344483376,
-0.0036313743330538273,
0.007424245588481426,
0.041823096573352814,
-0.007784152869135141,
0.014128675684332848,
0.03525247797369957,
0.06703507900238037,
0.04049420729279518,
-0.003760571824386716,
-0.023569326847791672,
-0.0030407567974179983,
0.08091458678245544,
0.002530887955799699,
-0.0655585303902626,
-0.09981434047222137,
-0.024935128167271614,
-0.047138653695583344,
0.02940167300403118,
-0.022406548261642456,
0.03672901913523674,
-0.021409882232546806,
0.012393737211823463,
0.01735861413180828,
0.04640037938952446,
-0.03488334268331528,
0.03827939182519913,
0.049464207142591476,
0.03274235129356384,
-0.023403214290738106,
0.0703573003411293,
-0.03222556412220001,
0.004344267770648003,
-0.019065868109464645,
-0.028220439329743385,
-0.028220439329743385,
-0.009615989401936531,
0.04429630562663078,
-0.015605219639837742,
0.02798050083220005,
-0.008079461753368378,
0.0035367831587791443,
0.03964519500732422,
-0.050497788935899734,
-0.042302973568439484,
-0.08187434077262878,
-0.04049420729279518,
-0.03608303144574165,
0.04968569055199623,
0.05699457973241806,
-0.07744470983743668,
0.0013704169541597366,
0.020413214340806007,
0.00039653267594985664,
0.010787996463477612,
-0.018235312774777412,
-0.009136113338172436,
0.0009678281494416296,
0.05503816157579422,
0.008264029398560524,
-0.015623676590621471,
-0.01739552803337574,
-0.014599324204027653,
0.02986309304833412,
0.0222773514688015,
-0.011461669579148293,
0.007447316311299801,
0.02116994373500347,
0.01837373897433281,
-0.032096363604068756,
0.0022609573788940907,
-0.003398357192054391,
-0.01930580660700798,
-0.013805681839585304,
-0.030693648383021355,
-0.034938711673021317,
-0.0939081683754921,
-0.018641361966729164,
0.05810198932886124,
-0.028866427019238472,
-0.00030338356737047434,
-0.01396256498992443,
-0.004854137077927589,
0.0811360701918602,
-0.08571334928274155,
0.055739518254995346,
-0.04625272750854492,
0.04444396123290062,
-0.05171593651175499,
-0.034569576382637024,
-0.019933337345719337,
-0.042745936661958694,
-0.01682336814701557,
0.012965898029506207,
0.020099448040127754,
0.04529297351837158,
-0.0717231035232544,
-0.02231426350772381,
-0.023477042093873024,
-0.00737810367718339,
-0.03663673624396324,
-0.03994050249457359,
0.03373901918530464,
0.0037997926119714975,
0.06865927577018738,
-0.0649310052394867,
0.0358615517616272,
0.08578717708587646,
0.01595589891076088,
-0.002729298546910286,
0.0236800666898489,
-0.008351699449121952,
-0.014442441053688526,
0.01925043575465679,
-0.01524531189352274,
-0.03619377315044403,
-0.035030994564294815,
0.02855266071856022,
0.014387071132659912,
-0.009588304907083511,
0.056773100048303604,
0.0035229406785219908,
-0.031671859323978424,
-0.039276059716939926,
-0.04743396118283272,
-0.05928322300314903,
-0.019619572907686234,
0.05400457978248596,
-0.037430379539728165,
0.03089667297899723,
-0.015679046511650085,
-0.04795075207948685,
-0.03246550261974335,
-0.034052785485982895,
-0.028774142265319824,
0.002759290859103203,
-0.003329144325107336,
-0.06452495604753494,
-0.0024616748560220003,
0.0076088132336735725,
-0.008070233277976513,
0.03222556412220001,
0.025341179221868515,
-0.05732680484652519,
-0.04407482594251633,
0.009514477103948593,
-0.005107917822897434,
0.0037974854931235313,
-0.04688025638461113,
0.012790558859705925,
0.05319248139858246,
0.059615444391965866,
0.04577285051345825,
0.015632905066013336,
-0.009394507855176926,
0.011286329478025436,
-0.009662131778895855,
-0.009228397160768509,
0.03397895768284798,
0.04152778536081314,
0.039276059716939926,
-0.007050495594739914,
0.04492383822798729,
-0.042302973568439484,
0.041306305676698685,
0.021040745079517365,
-0.01350114494562149,
-0.009205326437950134,
-0.03191179782152176,
0.018973585218191147,
0.009288381785154343,
-0.09981434047222137,
-0.014202503487467766,
0.0871160700917244,
-0.036507539451122284,
0.033609822392463684,
-0.012421422637999058,
0.02126222662627697,
-0.03613840416073799,
0.06747803837060928,
-0.02559957280755043,
-0.008139446377754211,
0.0358615517616272,
0.008287101052701473,
-0.026282474398612976,
-0.022443462163209915,
-0.012190712615847588,
-0.003255316987633705,
0.007857980206608772,
-0.03687667474150658,
-0.08401532471179962,
-0.07692791521549225,
-0.04603124409914017,
0.027334513142704964,
0.04462852701544762,
0.02030247449874878,
0.0024155329447239637,
0.04160161316394806,
0.0031353479716926813,
-0.025433462113142014,
0.04721248149871826,
-0.018530622124671936,
-0.04673260450363159,
-0.028109697625041008,
0.04865210875868797,
0.026264017447829247,
-0.018096886575222015,
0.04304124414920807,
-0.021022288128733635,
-0.023292474448680878,
-0.02853420376777649,
0.00843475479632616,
-0.06740421056747437,
-0.03135809302330017,
-0.01932426355779171,
0.04913198575377464,
-0.023015622049570084,
0.018650591373443604,
0.024787474423646927,
-0.029752353206276894,
-0.01350114494562149,
-0.003165340283885598,
0.01637117564678192,
0.019047411158680916,
-0.04791383817791939,
0.02792512997984886,
0.08416298031806946,
0.044148653745651245,
0.004858751315623522,
-0.02024710364639759,
0.03235476091504097,
0.0009591765119694173,
-0.06600149720907211,
0.034108154475688934,
-0.04828297346830368,
-0.022480376064777374,
-0.03853778541088104,
0.044185563921928406,
-0.054410628974437714,
-0.03235476091504097,
0.06179334595799446,
0.0054539828561246395,
-0.018955128267407417,
0.031173525378108025,
0.01781080663204193,
0.02554420381784439,
-0.0004928541020490229,
0.004085872787982225,
-0.006118427496403456,
-0.032594699412584305,
0.07729705423116684,
-0.020154818892478943,
-0.009929755702614784,
-0.03720889613032341,
0.005730834789574146,
0.03626760095357895,
-0.036507539451122284,
-0.011074076406657696,
0.012901299633085728,
-0.005380155518651009,
0.00891001708805561,
-0.026946919038891792,
-0.08490125089883804,
-0.0004242178692948073
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.