repo
stringlengths
7
54
path
stringlengths
4
223
func_name
stringlengths
1
134
original_string
stringlengths
75
104k
language
stringclasses
1 value
code
stringlengths
75
104k
code_tokens
listlengths
20
28.4k
docstring
stringlengths
1
46.3k
docstring_tokens
listlengths
1
1.66k
sha
stringlengths
40
40
url
stringlengths
87
315
partition
stringclasses
1 value
summary
stringlengths
4
350
obf_code
stringlengths
7.85k
764k
ray-project/ray
python/ray/rllib/utils/schedules.py
LinearSchedule.value
def value(self, t): """See Schedule.value""" fraction = min(float(t) / max(1, self.schedule_timesteps), 1.0) return self.initial_p + fraction * (self.final_p - self.initial_p)
python
def value(self, t): """See Schedule.value""" fraction = min(float(t) / max(1, self.schedule_timesteps), 1.0) return self.initial_p + fraction * (self.final_p - self.initial_p)
[ "def", "value", "(", "self", ",", "t", ")", ":", "fraction", "=", "min", "(", "float", "(", "t", ")", "/", "max", "(", "1", ",", "self", ".", "schedule_timesteps", ")", ",", "1.0", ")", "return", "self", ".", "initial_p", "+", "fraction", "*", "(", "self", ".", "final_p", "-", "self", ".", "initial_p", ")" ]
See Schedule.value
[ "See", "Schedule", ".", "value" ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/rllib/utils/schedules.py#L105-L108
train
See Schedule. value
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9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0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(2120 - 2072) + chr(4501 - 4390) + chr(2306 - 2257) + chr(0b110 + 0o60) + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(2272 - 2224) + chr(0b1101111) + '\x32' + chr(0b110010) + chr(0b100110 + 0o20), 62017 - 62009), ehT0Px3KOsy9(chr(48) + '\157' + chr(50) + '\x32', 0b1000), ehT0Px3KOsy9('\x30' + chr(4477 - 4366) + '\062' + chr(0b110110) + '\x30', 25540 - 25532), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b11110 + 0o25) + chr(0b11001 + 0o35) + chr(0b1110 + 0o43), 60162 - 60154), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110101) + '\060', 0o10), ehT0Px3KOsy9(chr(0b10101 + 0o33) + '\157' + '\061' + '\x37' + chr(0b1101 + 0o43), 30740 - 30732), ehT0Px3KOsy9(chr(0b10000 + 0o40) + '\157' + chr(2159 - 2109) + chr(0b110110) + chr(50), 0b1000), ehT0Px3KOsy9(chr(0b1101 + 0o43) + '\x6f' + chr(0b110011) + '\064' + chr(0b1110 + 0o42), 36325 - 36317), ehT0Px3KOsy9('\x30' + chr(0b1100 + 0o143) + chr(0b11010 + 0o27) + chr(871 - 817), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b11001 + 0o35) + chr(0b101110 + 0o5), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(10273 - 10162) + chr(670 - 618) + '\063', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b11000 + 0o127) + chr(52) + chr(51), 8), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(3869 - 3758) + chr(55) + chr(0b110000 + 0o3), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(1670 - 1620) + chr(652 - 603) + '\x30', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\061' + chr(0b1010 + 0o50) + chr(0b110101), 42750 - 42742), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(1074 - 1023) + chr(48) + chr(0b101110 + 0o10), 59101 - 59093), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(406 - 355) + chr(0b110101) + '\060', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110001) + '\x36' + '\067', 0o10), ehT0Px3KOsy9(chr(0b11100 + 0o24) + '\157' + '\x34' + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(1720 - 1671) + chr(53) + chr(50), 29223 - 29215), ehT0Px3KOsy9(chr(0b110000) + chr(10092 - 9981) + '\x33' + chr(0b101101 + 0o4) + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1001001 + 0o46) + chr(0b110011 + 0o2) + '\066', 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1456 - 1407) + chr(949 - 894) + chr(0b110100), 55532 - 55524), ehT0Px3KOsy9(chr(810 - 762) + chr(0b1100001 + 0o16) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(3032 - 2921) + chr(0b110011) + chr(0b101111 + 0o6) + chr(54), 0b1000), ehT0Px3KOsy9(chr(1598 - 1550) + '\157' + chr(50) + chr(0b101010 + 0o6) + '\x34', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\063' + '\065' + '\066', 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(49) + chr(2540 - 2489) + '\x31', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(863 - 809) + '\x30', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110001) + chr(2476 - 2425) + '\067', 3830 - 3822), ehT0Px3KOsy9(chr(325 - 277) + chr(8272 - 8161) + '\x33' + chr(1234 - 1182) + chr(1650 - 1601), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110001) + chr(1797 - 1747) + chr(849 - 800), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x32' + chr(294 - 239) + chr(1600 - 1551), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1011100 + 0o23) + chr(0b10 + 0o60) + chr(0b1001 + 0o55) + chr(0b110000), 8), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(50), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(2558 - 2505) + chr(52), 0b1000), ehT0Px3KOsy9(chr(0b101100 + 0o4) + chr(111) + chr(393 - 342) + chr(0b110010) + chr(1694 - 1644), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(289 - 238) + chr(0b1111 + 0o46) + chr(0b100110 + 0o20), 8), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110010) + '\065', 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + '\157' + '\x35' + chr(0b100 + 0o54), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\\'), '\x64' + chr(101) + '\143' + chr(0b1101111) + '\144' + '\145')(chr(117) + chr(7450 - 7334) + chr(0b1100110) + chr(1808 - 1763) + chr(119 - 63)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def QmmgWUB13VCJ(oVre8I6UXc3b, YeT3l7JgTbWR): lzJ7wq_4oCYO = Dx22bkKPdt5d(kkSX4ccExqw4(YeT3l7JgTbWR) / tsdjvlgh9gDP(ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x31', 0b1000), oVre8I6UXc3b.schedule_timesteps), 1.0) return xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x1b\xf8{\xc4\x98I\x14\xed\x90'), chr(0b1000111 + 0o35) + '\145' + chr(0b1000100 + 0o37) + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(6526 - 6409) + '\164' + '\x66' + chr(45) + chr(56))) + lzJ7wq_4oCYO * (xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x14\xff|\xd1\x9dw\x08'), '\144' + chr(0b1001011 + 0o32) + '\x63' + '\157' + chr(0b101000 + 0o74) + chr(0b1001100 + 0o31))('\165' + '\x74' + chr(0b101011 + 0o73) + '\x2d' + chr(56))) - xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x1b\xf8{\xc4\x98I\x14\xed\x90'), chr(0b101111 + 0o65) + chr(101) + '\x63' + chr(6998 - 6887) + chr(984 - 884) + chr(101))('\165' + '\x74' + chr(0b1100110) + chr(0b11101 + 0o20) + '\x38')))
ray-project/ray
python/ray/tune/automlboard/common/utils.py
dump_json
def dump_json(json_info, json_file, overwrite=True): """Dump a whole json record into the given file. Overwrite the file if the overwrite flag set. Args: json_info (dict): Information dict to be dumped. json_file (str): File path to be dumped to. overwrite(boolean) """ if overwrite: mode = "w" else: mode = "w+" try: with open(json_file, mode) as f: f.write(json.dumps(json_info)) except BaseException as e: logging.error(e.message)
python
def dump_json(json_info, json_file, overwrite=True): """Dump a whole json record into the given file. Overwrite the file if the overwrite flag set. Args: json_info (dict): Information dict to be dumped. json_file (str): File path to be dumped to. overwrite(boolean) """ if overwrite: mode = "w" else: mode = "w+" try: with open(json_file, mode) as f: f.write(json.dumps(json_info)) except BaseException as e: logging.error(e.message)
[ "def", "dump_json", "(", "json_info", ",", "json_file", ",", "overwrite", "=", "True", ")", ":", "if", "overwrite", ":", "mode", "=", "\"w\"", "else", ":", "mode", "=", "\"w+\"", "try", ":", "with", "open", "(", "json_file", ",", "mode", ")", "as", "f", ":", "f", ".", "write", "(", "json", ".", "dumps", "(", "json_info", ")", ")", "except", "BaseException", "as", "e", ":", "logging", ".", "error", "(", "e", ".", "message", ")" ]
Dump a whole json record into the given file. Overwrite the file if the overwrite flag set. Args: json_info (dict): Information dict to be dumped. json_file (str): File path to be dumped to. overwrite(boolean)
[ "Dump", "a", "whole", "json", "record", "into", "the", "given", "file", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/tune/automlboard/common/utils.py#L11-L30
train
Dump a whole json record into a file.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw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,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\060' + chr(0b10 + 0o155) + chr(0b110011) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(1507 - 1459) + '\157' + '\062' + '\062' + chr(0b11100 + 0o26), 0o10), ehT0Px3KOsy9(chr(1211 - 1163) + '\157' + '\061' + chr(0b110111) + chr(0b110110), 15544 - 15536), ehT0Px3KOsy9(chr(958 - 910) + chr(0b1101111) + '\x33' + '\x37' + '\063', ord("\x08")), ehT0Px3KOsy9(chr(0b11001 + 0o27) + chr(3557 - 3446) + '\063' + chr(0b10100 + 0o43) + '\x31', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110011) + '\x35' + chr(51), 0b1000), ehT0Px3KOsy9(chr(48) + chr(7421 - 7310) + '\x32' + chr(0b101011 + 0o5) + chr(88 - 36), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(49) + chr(0b110110), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101101 + 0o2) + chr(0b101100 + 0o5) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(0b1000111 + 0o50) + '\062' + '\061' + '\064', 13046 - 13038), ehT0Px3KOsy9('\060' + chr(111) + chr(51) + chr(0b101010 + 0o11) + chr(0b11000 + 0o37), 48619 - 48611), ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(5015 - 4904) + '\063' + chr(0b10101 + 0o41) + '\x36', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110110) + '\x34', 35098 - 35090), ehT0Px3KOsy9(chr(48) + chr(12137 - 12026) + chr(50) + chr(0b110001) + '\064', 8), ehT0Px3KOsy9('\x30' + '\157' + chr(51) + '\064' + chr(0b11101 + 0o32), 0o10), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(11856 - 11745) + chr(0b110010) + '\x32' + '\064', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(2557 - 2446) + chr(51) + chr(51) + '\x30', 0o10), ehT0Px3KOsy9(chr(186 - 138) + '\157' + chr(0b100001 + 0o20) + chr(48) + '\063', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(51) + chr(2444 - 2389) + '\x32', 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + '\062' + chr(0b110100) + '\x33', 51420 - 51412), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(0b111000 + 0o67) + chr(1152 - 1103) + chr(0b100 + 0o61) + '\x36', 0o10), ehT0Px3KOsy9('\060' + '\157' + '\064' + chr(49), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(260 - 209) + '\061' + chr(54), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(50) + chr(2151 - 2099) + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(0b11010 + 0o26) + '\x6f' + '\x33' + '\063' + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1111 + 0o140) + chr(2002 - 1952) + chr(1391 - 1339) + chr(0b110100 + 0o1), 8), ehT0Px3KOsy9(chr(2068 - 2020) + chr(243 - 132) + '\x31' + chr(1358 - 1307) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(2445 - 2394) + chr(54) + chr(0b101111 + 0o5), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(49) + chr(1876 - 1828) + chr(0b11011 + 0o31), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110011) + '\066', 5234 - 5226), ehT0Px3KOsy9(chr(0b110000) + chr(7881 - 7770) + chr(506 - 456) + chr(52) + '\x36', 0b1000), ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(0b1101111) + chr(2119 - 2069) + chr(833 - 782) + '\x35', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b10000 + 0o41) + chr(0b110111) + '\065', 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110010) + chr(50) + chr(0b101101 + 0o6), 0o10), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(0b1011 + 0o144) + chr(1119 - 1067) + chr(0b10001 + 0o44), 0b1000), ehT0Px3KOsy9(chr(1282 - 1234) + chr(111) + chr(0b110001) + chr(0b11000 + 0o36), 8), ehT0Px3KOsy9(chr(0b10011 + 0o35) + '\157' + '\063' + '\063' + chr(53), 8), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(111) + chr(140 - 91) + '\065' + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(0b1101111) + chr(49) + chr(0b10010 + 0o41) + chr(1533 - 1481), ord("\x08")), ehT0Px3KOsy9(chr(2281 - 2233) + chr(111) + chr(2414 - 2364) + chr(50) + chr(0b11101 + 0o32), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110101) + chr(48), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'6'), chr(100) + chr(101) + chr(0b1001100 + 0o27) + chr(7625 - 7514) + '\x64' + '\145')(chr(0b1110101) + '\x74' + chr(2010 - 1908) + '\055' + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def PDo1Dp4ow8RN(_F3BQIukWs2E, VIrUDJpEFkjE, owudp2xlhy9V=ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110001), 0b1000)): if owudp2xlhy9V: holLFgwB7vsP = xafqLlk3kkUe(SXOLrMavuUCe(b'o'), '\144' + '\145' + chr(1770 - 1671) + chr(0b1000100 + 0o53) + chr(0b1010100 + 0o20) + chr(0b1100101))(chr(117) + chr(0b1011 + 0o151) + '\146' + chr(1434 - 1389) + chr(0b11001 + 0o37)) else: holLFgwB7vsP = xafqLlk3kkUe(SXOLrMavuUCe(b'o\xb9'), chr(0b111000 + 0o54) + chr(0b110110 + 0o57) + chr(1548 - 1449) + '\x6f' + chr(0b1011 + 0o131) + '\145')(chr(0b1001001 + 0o54) + chr(12614 - 12498) + '\146' + chr(0b101001 + 0o4) + chr(0b110010 + 0o6)) try: with _fwkIVCGgtAN(VIrUDJpEFkjE, holLFgwB7vsP) as EGyt1xfPT1P6: xafqLlk3kkUe(EGyt1xfPT1P6, xafqLlk3kkUe(SXOLrMavuUCe(b'o\xe0\x17\x8f\x9c'), chr(100) + chr(7478 - 7377) + chr(0b10010 + 0o121) + '\157' + chr(0b111101 + 0o47) + chr(0b1100101))(chr(117) + chr(116) + chr(4478 - 4376) + chr(0b101101) + chr(0b111000)))(xafqLlk3kkUe(fXk443epxtd5, xafqLlk3kkUe(SXOLrMavuUCe(b'|\xe7\x13\x8b\x8a'), '\x64' + chr(0b1011001 + 0o14) + chr(0b1100011) + '\157' + chr(0b1100100) + '\145')(chr(7668 - 7551) + chr(8344 - 8228) + chr(102) + chr(45) + chr(0b111000)))(_F3BQIukWs2E)) except ZVWAAMjVVHHl as GlnVAPeT6CUe: xafqLlk3kkUe(UeotCCWOPSQS, xafqLlk3kkUe(SXOLrMavuUCe(b']\xc7\x1a\xab\x98\x9f\xcb]=\xfb\xa7\xc6'), '\x64' + '\145' + '\143' + '\x6f' + chr(100) + chr(0b111011 + 0o52))('\165' + chr(116) + '\x66' + chr(0b101101) + chr(0b111000)))(xafqLlk3kkUe(GlnVAPeT6CUe, xafqLlk3kkUe(SXOLrMavuUCe(b'u\xf7\r\x88\x98\x8c\xe1'), chr(0b1100100) + chr(0b110000 + 0o65) + chr(0b1100011) + chr(111) + chr(100) + chr(6813 - 6712))(chr(0b11000 + 0o135) + chr(0b101001 + 0o113) + chr(0b101000 + 0o76) + '\x2d' + chr(0b11 + 0o65))))
ray-project/ray
python/ray/tune/automlboard/common/utils.py
parse_json
def parse_json(json_file): """Parse a whole json record from the given file. Return None if the json file does not exists or exception occurs. Args: json_file (str): File path to be parsed. Returns: A dict of json info. """ if not os.path.exists(json_file): return None try: with open(json_file, "r") as f: info_str = f.readlines() info_str = "".join(info_str) json_info = json.loads(info_str) return unicode2str(json_info) except BaseException as e: logging.error(e.message) return None
python
def parse_json(json_file): """Parse a whole json record from the given file. Return None if the json file does not exists or exception occurs. Args: json_file (str): File path to be parsed. Returns: A dict of json info. """ if not os.path.exists(json_file): return None try: with open(json_file, "r") as f: info_str = f.readlines() info_str = "".join(info_str) json_info = json.loads(info_str) return unicode2str(json_info) except BaseException as e: logging.error(e.message) return None
[ "def", "parse_json", "(", "json_file", ")", ":", "if", "not", "os", ".", "path", ".", "exists", "(", "json_file", ")", ":", "return", "None", "try", ":", "with", "open", "(", "json_file", ",", "\"r\"", ")", "as", "f", ":", "info_str", "=", "f", ".", "readlines", "(", ")", "info_str", "=", "\"\"", ".", "join", "(", "info_str", ")", "json_info", "=", "json", ".", "loads", "(", "info_str", ")", "return", "unicode2str", "(", "json_info", ")", "except", "BaseException", "as", "e", ":", "logging", ".", "error", "(", "e", ".", "message", ")", "return", "None" ]
Parse a whole json record from the given file. Return None if the json file does not exists or exception occurs. Args: json_file (str): File path to be parsed. Returns: A dict of json info.
[ "Parse", "a", "whole", "json", "record", "from", "the", "given", "file", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/tune/automlboard/common/utils.py#L33-L55
train
Parse a whole json record from the given file.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6A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gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b11 + 0o57) + '\x35' + chr(0b100110 + 0o15), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\062' + chr(0b10110 + 0o34), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(50) + chr(0b1 + 0o61) + chr(1043 - 995), 48337 - 48329), ehT0Px3KOsy9(chr(0b110000) + chr(0b11110 + 0o121) + chr(1630 - 1579) + chr(1037 - 987) + chr(0b10101 + 0o42), 0b1000), ehT0Px3KOsy9(chr(0b10111 + 0o31) + chr(0b1101111) + chr(0b110011) + chr(779 - 727) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b110101 + 0o72) + '\x32' + chr(0b100111 + 0o15) + chr(0b101111 + 0o4), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110001) + '\x32' + '\064', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(49) + '\x31' + chr(0b1000 + 0o55), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\067' + chr(785 - 737), 12389 - 12381), ehT0Px3KOsy9('\x30' + chr(111) + '\x31' + '\x32' + '\066', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b10 + 0o57) + chr(0b1010 + 0o47) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110001) + chr(0b110101 + 0o1) + chr(706 - 657), 0b1000), ehT0Px3KOsy9(chr(301 - 253) + '\x6f' + '\061' + chr(1332 - 1284) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b1101 + 0o44) + chr(0b110001) + '\061', 8), ehT0Px3KOsy9(chr(48) + chr(10337 - 10226) + chr(1475 - 1424) + '\x33' + '\061', 0o10), ehT0Px3KOsy9(chr(0b10101 + 0o33) + '\x6f' + '\067' + chr(0b1110 + 0o47), 58589 - 58581), ehT0Px3KOsy9(chr(48) + chr(4750 - 4639) + chr(0b110010) + chr(52) + chr(0b110101), 0b1000), ehT0Px3KOsy9('\060' + chr(11773 - 11662) + chr(0b110101) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b10010 + 0o135) + '\062' + chr(0b110111) + chr(0b11101 + 0o25), ord("\x08")), ehT0Px3KOsy9(chr(1454 - 1406) + '\157' + chr(263 - 213) + chr(52) + chr(0b110100), 16843 - 16835), ehT0Px3KOsy9(chr(597 - 549) + '\x6f' + chr(0b110011) + chr(55) + '\x36', 51825 - 51817), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110000), 102 - 94), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x35' + chr(0b10111 + 0o33), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110011) + '\060' + '\x33', 49160 - 49152), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\063' + chr(1887 - 1834) + chr(1697 - 1649), 11012 - 11004), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\061' + '\064' + chr(49), 62175 - 62167), ehT0Px3KOsy9(chr(1078 - 1030) + '\157' + chr(99 - 50) + '\x30' + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(0b100001 + 0o17) + '\x6f' + '\063' + chr(327 - 277) + chr(48), 0o10), ehT0Px3KOsy9(chr(48) + chr(3921 - 3810) + chr(2536 - 2485) + '\x30' + chr(0b101101 + 0o3), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + '\x32' + '\063', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + '\063' + '\065' + chr(0b10010 + 0o41), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(725 - 675) + chr(0b11110 + 0o23) + chr(1325 - 1277), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101101 + 0o2) + chr(106 - 57) + '\x33', 0b1000), ehT0Px3KOsy9(chr(0b1001 + 0o47) + '\157' + '\063' + '\067' + chr(0b101100 + 0o6), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(50) + chr(0b10000 + 0o44) + chr(0b11000 + 0o37), 37204 - 37196), ehT0Px3KOsy9('\x30' + '\x6f' + '\063' + chr(0b11111 + 0o21) + chr(48), 8), ehT0Px3KOsy9('\x30' + chr(111) + '\063' + chr(49) + '\063', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\x32' + '\x31' + chr(0b10111 + 0o32), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x31' + chr(50), 21205 - 21197), ehT0Px3KOsy9(chr(649 - 601) + '\x6f' + '\061' + chr(0b110010) + '\x31', 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x35' + chr(2053 - 2005), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x85'), '\144' + '\145' + chr(2834 - 2735) + chr(11365 - 11254) + chr(100) + chr(0b1011110 + 0o7))(chr(0b1100000 + 0o25) + chr(0b1101010 + 0o12) + chr(0b1100110) + '\055' + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def mxADQH9hsI7e(VIrUDJpEFkjE): if not xafqLlk3kkUe(oqhJDdMJfuwx.path, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcej\xf9\xa4\x94\xd0'), chr(100) + chr(0b1100101) + chr(99) + chr(0b1101111) + chr(0b1100100) + chr(5396 - 5295))(chr(0b1110101) + '\164' + chr(0b1100110) + chr(45) + chr(862 - 806)))(VIrUDJpEFkjE): return None try: with _fwkIVCGgtAN(VIrUDJpEFkjE, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd9'), chr(0b100011 + 0o101) + chr(0b1001011 + 0o32) + chr(0b1100011) + chr(0b1011001 + 0o26) + chr(100) + chr(10039 - 9938))(chr(9632 - 9515) + chr(0b1110100) + chr(2822 - 2720) + chr(193 - 148) + chr(0b111000))) as EGyt1xfPT1P6: o67YuHshZGaN = EGyt1xfPT1P6.readlines() o67YuHshZGaN = xafqLlk3kkUe(SXOLrMavuUCe(b''), chr(100) + chr(9540 - 9439) + chr(99) + chr(9826 - 9715) + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + chr(785 - 669) + '\146' + chr(0b101101) + chr(0b1 + 0o67))._oWXztVNnqHF(o67YuHshZGaN) _F3BQIukWs2E = fXk443epxtd5.loads(o67YuHshZGaN) return YYDxG7amvDnp(_F3BQIukWs2E) except ZVWAAMjVVHHl as GlnVAPeT6CUe: xafqLlk3kkUe(UeotCCWOPSQS, xafqLlk3kkUe(SXOLrMavuUCe(b'\xeeG\xf4\x87\x81\xd7\x1b\x1e\t!1A'), chr(5974 - 5874) + chr(0b11010 + 0o113) + '\x63' + '\157' + chr(100) + '\x65')(chr(0b1110101) + chr(551 - 435) + chr(0b1010111 + 0o17) + '\055' + chr(1441 - 1385)))(xafqLlk3kkUe(GlnVAPeT6CUe, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc6w\xe3\xa4\x81\xc41'), chr(0b111111 + 0o45) + chr(0b1100101) + chr(5591 - 5492) + '\157' + '\144' + '\x65')(chr(0b110101 + 0o100) + chr(1812 - 1696) + chr(0b100011 + 0o103) + chr(45) + chr(56)))) return None
ray-project/ray
python/ray/tune/automlboard/common/utils.py
parse_multiple_json
def parse_multiple_json(json_file, offset=None): """Parse multiple json records from the given file. Seek to the offset as the start point before parsing if offset set. return empty list if the json file does not exists or exception occurs. Args: json_file (str): File path to be parsed. offset (int): Initial seek position of the file. Returns: A dict of json info. New offset after parsing. """ json_info_list = [] if not os.path.exists(json_file): return json_info_list try: with open(json_file, "r") as f: if offset: f.seek(offset) for line in f: if line[-1] != "\n": # Incomplete line break json_info = json.loads(line) json_info_list.append(json_info) offset += len(line) except BaseException as e: logging.error(e.message) return json_info_list, offset
python
def parse_multiple_json(json_file, offset=None): """Parse multiple json records from the given file. Seek to the offset as the start point before parsing if offset set. return empty list if the json file does not exists or exception occurs. Args: json_file (str): File path to be parsed. offset (int): Initial seek position of the file. Returns: A dict of json info. New offset after parsing. """ json_info_list = [] if not os.path.exists(json_file): return json_info_list try: with open(json_file, "r") as f: if offset: f.seek(offset) for line in f: if line[-1] != "\n": # Incomplete line break json_info = json.loads(line) json_info_list.append(json_info) offset += len(line) except BaseException as e: logging.error(e.message) return json_info_list, offset
[ "def", "parse_multiple_json", "(", "json_file", ",", "offset", "=", "None", ")", ":", "json_info_list", "=", "[", "]", "if", "not", "os", ".", "path", ".", "exists", "(", "json_file", ")", ":", "return", "json_info_list", "try", ":", "with", "open", "(", "json_file", ",", "\"r\"", ")", "as", "f", ":", "if", "offset", ":", "f", ".", "seek", "(", "offset", ")", "for", "line", "in", "f", ":", "if", "line", "[", "-", "1", "]", "!=", "\"\\n\"", ":", "# Incomplete line", "break", "json_info", "=", "json", ".", "loads", "(", "line", ")", "json_info_list", ".", "append", "(", "json_info", ")", "offset", "+=", "len", "(", "line", ")", "except", "BaseException", "as", "e", ":", "logging", ".", "error", "(", "e", ".", "message", ")", "return", "json_info_list", ",", "offset" ]
Parse multiple json records from the given file. Seek to the offset as the start point before parsing if offset set. return empty list if the json file does not exists or exception occurs. Args: json_file (str): File path to be parsed. offset (int): Initial seek position of the file. Returns: A dict of json info. New offset after parsing.
[ "Parse", "multiple", "json", "records", "from", "the", "given", "file", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/tune/automlboard/common/utils.py#L58-L92
train
Parse multiple json records from the given file.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPvpP4xdo3,cW7yQuyEnJ6E,KOHQGQ8qLDWm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OMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(10038 - 9927) + chr(747 - 698) + chr(0b110111) + '\x35', 47750 - 47742), ehT0Px3KOsy9('\060' + chr(111) + chr(243 - 192) + chr(0b110111) + chr(0b110000), 49753 - 49745), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(489 - 435) + chr(395 - 347), 29599 - 29591), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(0b11100 + 0o123) + '\067' + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b10111 + 0o37) + chr(0b101100 + 0o12), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(2181 - 2131) + '\x33', 52297 - 52289), ehT0Px3KOsy9('\060' + chr(10103 - 9992) + chr(0b110001) + chr(48) + chr(931 - 879), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b111010 + 0o65) + '\061' + chr(50) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(0b1111 + 0o41) + '\157' + chr(55) + chr(1403 - 1355), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(1474 - 1424) + '\x30' + chr(0b1010 + 0o53), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110001) + chr(52) + chr(0b110101 + 0o0), 61944 - 61936), ehT0Px3KOsy9(chr(1960 - 1912) + chr(111) + chr(49) + '\060' + '\065', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(50) + chr(55) + chr(51), 14764 - 14756), ehT0Px3KOsy9(chr(0b110000) + chr(2903 - 2792) + chr(50) + '\x35' + '\x36', 26034 - 26026), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\061' + chr(1453 - 1404) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b11101 + 0o26) + '\064' + chr(0b10111 + 0o31), 0o10), ehT0Px3KOsy9(chr(265 - 217) + '\x6f' + chr(50) + '\x33' + chr(1338 - 1290), 34447 - 34439), ehT0Px3KOsy9('\060' + chr(0b1101 + 0o142) + '\x37' + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(54) + '\060', 8), ehT0Px3KOsy9(chr(0b1100 + 0o44) + chr(7889 - 7778) + chr(0b1110 + 0o47) + '\x33', 0o10), ehT0Px3KOsy9(chr(1425 - 1377) + '\157' + '\x34', 48159 - 48151), ehT0Px3KOsy9(chr(0b11011 + 0o25) + '\157' + chr(1713 - 1664) + '\x36' + '\066', 0o10), ehT0Px3KOsy9(chr(48) + chr(10339 - 10228) + '\063' + chr(53) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(50) + chr(50) + chr(0b101110 + 0o7), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b11100 + 0o25) + '\x34' + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(172 - 124) + chr(111) + chr(0b110010) + chr(49) + '\065', 40750 - 40742), ehT0Px3KOsy9('\x30' + '\x6f' + chr(1815 - 1766) + chr(0b11001 + 0o30) + chr(0b1000 + 0o53), 52388 - 52380), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b1100 + 0o47) + chr(0b0 + 0o67), ord("\x08")), ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(0b10 + 0o155) + chr(0b11110 + 0o24) + chr(53) + chr(0b11001 + 0o27), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1001111 + 0o40) + chr(49) + chr(534 - 480) + chr(1047 - 995), 0b1000), ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(0b1101111) + chr(2895 - 2840) + chr(0b10010 + 0o36), 8), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(1750 - 1639) + chr(2513 - 2459) + chr(0b1010 + 0o51), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b1001 + 0o50) + '\060' + chr(0b110101), 8), ehT0Px3KOsy9(chr(0b10 + 0o56) + chr(0b1101111) + chr(87 - 36) + '\x34' + '\x32', 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(1405 - 1356) + '\x32' + chr(0b10100 + 0o36), 0o10), ehT0Px3KOsy9('\060' + chr(0b1010000 + 0o37) + chr(51) + chr(0b11 + 0o63) + chr(0b110100), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b11000 + 0o33) + chr(0b101 + 0o60) + '\x32', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(6307 - 6196) + chr(0b110011) + '\067' + chr(49), 58449 - 58441), ehT0Px3KOsy9(chr(1378 - 1330) + chr(1752 - 1641) + '\063' + chr(2540 - 2489) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110001) + chr(0b101010 + 0o13) + chr(0b101 + 0o54), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b11000 + 0o30) + '\157' + chr(0b1110 + 0o47) + chr(2270 - 2222), 59822 - 59814)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'S'), chr(0b111 + 0o135) + '\x65' + chr(3745 - 3646) + '\157' + chr(100) + chr(101))('\x75' + '\x74' + chr(102) + '\055' + chr(683 - 627)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def NsCCYXfhVhdx(VIrUDJpEFkjE, VRaYxwVeIO1g=None): eNYTF9pi7CIO = [] if not xafqLlk3kkUe(oqhJDdMJfuwx.path, xafqLlk3kkUe(SXOLrMavuUCe(b'\x18\x80YNB`'), chr(0b1100100) + '\x65' + chr(0b1100011 + 0o0) + '\x6f' + '\x64' + chr(5049 - 4948))(chr(6513 - 6396) + '\x74' + chr(0b100111 + 0o77) + chr(0b100 + 0o51) + chr(56)))(VIrUDJpEFkjE): return eNYTF9pi7CIO try: with _fwkIVCGgtAN(VIrUDJpEFkjE, xafqLlk3kkUe(SXOLrMavuUCe(b'\x0f'), chr(100) + '\145' + chr(99) + '\157' + chr(100) + chr(101))(chr(117) + chr(0b1110100 + 0o0) + '\146' + chr(0b100100 + 0o11) + chr(0b111000))) as EGyt1xfPT1P6: if VRaYxwVeIO1g: xafqLlk3kkUe(EGyt1xfPT1P6, xafqLlk3kkUe(SXOLrMavuUCe(b'\x0e\x9dUV'), chr(0b1100100) + chr(5067 - 4966) + '\x63' + chr(0b111010 + 0o65) + '\144' + chr(7107 - 7006))('\165' + chr(8841 - 8725) + chr(102) + chr(0b101101) + chr(2421 - 2365)))(VRaYxwVeIO1g) for LycYkDpyelF6 in EGyt1xfPT1P6: if LycYkDpyelF6[-ehT0Px3KOsy9(chr(0b10011 + 0o35) + '\157' + chr(49), 0o10)] != xafqLlk3kkUe(SXOLrMavuUCe(b'w'), chr(7253 - 7153) + chr(0b1100101) + chr(0b11110 + 0o105) + chr(0b10010 + 0o135) + chr(0b1100100) + chr(368 - 267))(chr(5417 - 5300) + chr(116) + chr(6554 - 6452) + chr(1662 - 1617) + chr(0b111000)): break _F3BQIukWs2E = fXk443epxtd5.loads(LycYkDpyelF6) xafqLlk3kkUe(eNYTF9pi7CIO, xafqLlk3kkUe(SXOLrMavuUCe(b'\x1c\x88@XXw'), chr(0b1100100) + chr(101) + chr(99) + '\x6f' + chr(0b1100100) + chr(0b1000001 + 0o44))(chr(117) + '\x74' + chr(949 - 847) + '\055' + chr(0b111000)))(_F3BQIukWs2E) VRaYxwVeIO1g += c2A0yzQpDQB3(LycYkDpyelF6) except ZVWAAMjVVHHl as GlnVAPeT6CUe: xafqLlk3kkUe(UeotCCWOPSQS, xafqLlk3kkUe(SXOLrMavuUCe(b'8\xadTmWg\x0b\x07\t\xf2\x1du'), chr(0b101010 + 0o72) + '\145' + chr(8252 - 8153) + chr(0b1010111 + 0o30) + '\144' + chr(2904 - 2803))(chr(6974 - 6857) + chr(2016 - 1900) + '\x66' + chr(0b1 + 0o54) + chr(0b100010 + 0o26)))(xafqLlk3kkUe(GlnVAPeT6CUe, xafqLlk3kkUe(SXOLrMavuUCe(b'\x10\x9dCNWt!'), chr(100) + chr(0b1100101) + chr(9113 - 9014) + chr(0b1101111) + chr(0b1001100 + 0o30) + chr(101))('\165' + chr(116) + chr(102) + chr(0b101101) + chr(0b1110 + 0o52)))) return (eNYTF9pi7CIO, VRaYxwVeIO1g)
ray-project/ray
python/ray/tune/automlboard/common/utils.py
unicode2str
def unicode2str(content): """Convert the unicode element of the content to str recursively.""" if isinstance(content, dict): result = {} for key in content.keys(): result[unicode2str(key)] = unicode2str(content[key]) return result elif isinstance(content, list): return [unicode2str(element) for element in content] elif isinstance(content, int) or isinstance(content, float): return content else: return content.encode("utf-8")
python
def unicode2str(content): """Convert the unicode element of the content to str recursively.""" if isinstance(content, dict): result = {} for key in content.keys(): result[unicode2str(key)] = unicode2str(content[key]) return result elif isinstance(content, list): return [unicode2str(element) for element in content] elif isinstance(content, int) or isinstance(content, float): return content else: return content.encode("utf-8")
[ "def", "unicode2str", "(", "content", ")", ":", "if", "isinstance", "(", "content", ",", "dict", ")", ":", "result", "=", "{", "}", "for", "key", "in", "content", ".", "keys", "(", ")", ":", "result", "[", "unicode2str", "(", "key", ")", "]", "=", "unicode2str", "(", "content", "[", "key", "]", ")", "return", "result", "elif", "isinstance", "(", "content", ",", "list", ")", ":", "return", "[", "unicode2str", "(", "element", ")", "for", "element", "in", "content", "]", "elif", "isinstance", "(", "content", ",", "int", ")", "or", "isinstance", "(", "content", ",", "float", ")", ":", "return", "content", "else", ":", "return", "content", ".", "encode", "(", "\"utf-8\"", ")" ]
Convert the unicode element of the content to str recursively.
[ "Convert", "the", "unicode", "element", "of", "the", "content", "to", "str", "recursively", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/tune/automlboard/common/utils.py#L100-L112
train
Convert the unicode element of the content to str recursively.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPvpP4xdo3,cW7yQuyEnJ6E,KOHQGQ8qLDWm,NE1Yam2HHroQ,ygAzbDzrvRMh,SBRjvOU1ufVC,hOkXjmluKZfJ,q1QCh3W88sgk,TLbJ60djyws0,rIcPej9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M0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\060' + chr(111) + chr(1196 - 1147) + chr(50) + '\066', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(5397 - 5286) + chr(0b110010 + 0o1) + chr(0b110100) + chr(0b1101 + 0o45), ord("\x08")), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(3789 - 3678) + chr(49) + '\x31' + chr(2023 - 1974), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1001110 + 0o41) + chr(0b110010) + chr(0b110011) + chr(0b0 + 0o62), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(0b100110 + 0o14) + chr(1530 - 1481) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1011100 + 0o23) + chr(0b101110 + 0o5) + chr(0b110000) + '\063', 34981 - 34973), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(11261 - 11150) + chr(0b100110 + 0o16) + '\x36', 50206 - 50198), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110011) + chr(0b110101) + chr(1734 - 1684), ord("\x08")), ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(111) + chr(0b110100) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(0b10011 + 0o35) + '\x6f' + '\061' + chr(0b101100 + 0o12), 9292 - 9284), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(51) + chr(48) + '\065', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\061' + '\067' + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(827 - 716) + '\061' + chr(0b100100 + 0o20) + chr(392 - 343), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(1675 - 1624) + chr(48) + chr(54), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + '\060', 0o10), ehT0Px3KOsy9(chr(0b1011 + 0o45) + '\x6f' + chr(51) + '\x32' + '\067', 56617 - 56609), ehT0Px3KOsy9(chr(48) + chr(5480 - 5369) + '\x33' + chr(0b100011 + 0o16) + chr(0b10000 + 0o44), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(50) + chr(0b110110) + chr(51), 0b1000), ehT0Px3KOsy9(chr(749 - 701) + '\x6f' + chr(1659 - 1608) + '\x35' + chr(2523 - 2469), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(2516 - 2405) + chr(0b110011) + chr(49) + chr(0b110100), 8), ehT0Px3KOsy9('\x30' + '\157' + chr(0b100101 + 0o15) + '\x34' + '\x32', 0o10), ehT0Px3KOsy9(chr(749 - 701) + '\157' + '\x36' + '\062', ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + '\061' + chr(54) + chr(48), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011010 + 0o25) + '\x32' + chr(0b110100) + '\067', 33612 - 33604), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110011) + '\063' + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(2280 - 2232) + chr(111) + chr(0b110111) + chr(2449 - 2395), 59703 - 59695), ehT0Px3KOsy9('\x30' + '\x6f' + '\x36' + '\065', ord("\x08")), ehT0Px3KOsy9('\060' + chr(2082 - 1971) + chr(0b110011) + chr(0b110101) + '\x34', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x33' + '\065' + chr(0b110100), 8), ehT0Px3KOsy9(chr(580 - 532) + chr(111) + chr(369 - 320) + '\x37' + chr(0b110000 + 0o7), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110010) + '\x33' + '\061', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\x31' + chr(0b110010) + '\065', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x34' + chr(0b110101), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110010) + '\x30' + '\x36', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(487 - 436) + chr(0b111 + 0o60) + '\x36', 0o10), ehT0Px3KOsy9(chr(48) + chr(6459 - 6348) + '\x32' + chr(0b0 + 0o66) + '\x36', 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(49) + '\063' + chr(631 - 577), 44636 - 44628), ehT0Px3KOsy9(chr(58 - 10) + '\x6f' + chr(0b110011) + chr(0b11010 + 0o35), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110010) + chr(0b10010 + 0o36) + chr(0b110110 + 0o0), 8), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(2806 - 2695) + chr(0b110001) + '\062' + chr(0b110111), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(982 - 934) + chr(0b1011011 + 0o24) + chr(0b110101) + chr(0b11001 + 0o27), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'x'), chr(0b1100100) + '\145' + '\x63' + '\157' + '\144' + chr(0b11010 + 0o113))(chr(0b1010011 + 0o42) + chr(0b1110100) + '\146' + '\x2d' + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def YYDxG7amvDnp(VjgGQlDzfDa9): if PlSM16l2KDPD(VjgGQlDzfDa9, wLqBDw8l0eIm): ShZmEKfTkAOZ = {} for K3J4ZwSlE0sT in xafqLlk3kkUe(VjgGQlDzfDa9, xafqLlk3kkUe(SXOLrMavuUCe(b'=\x870\xe9'), '\144' + chr(9146 - 9045) + chr(0b1100011) + chr(12039 - 11928) + '\x64' + '\145')(chr(117) + '\x74' + '\x66' + chr(1051 - 1006) + '\070'))(): ShZmEKfTkAOZ[YYDxG7amvDnp(K3J4ZwSlE0sT)] = YYDxG7amvDnp(VjgGQlDzfDa9[K3J4ZwSlE0sT]) return ShZmEKfTkAOZ elif PlSM16l2KDPD(VjgGQlDzfDa9, YyaZ4tpXu4lf): return [YYDxG7amvDnp(_CF03Rifpmdh) for _CF03Rifpmdh in VjgGQlDzfDa9] elif PlSM16l2KDPD(VjgGQlDzfDa9, ehT0Px3KOsy9) or PlSM16l2KDPD(VjgGQlDzfDa9, kkSX4ccExqw4): return VjgGQlDzfDa9 else: return xafqLlk3kkUe(VjgGQlDzfDa9, xafqLlk3kkUe(SXOLrMavuUCe(b'3\x8c*\xf5\xeb\xa6'), '\144' + '\145' + '\x63' + chr(0b1101111) + chr(100) + chr(8523 - 8422))('\165' + '\x74' + chr(0b1100110) + chr(610 - 565) + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b'#\x96/\xb7\xb7'), chr(215 - 115) + '\x65' + chr(99) + chr(2978 - 2867) + '\144' + '\145')('\165' + chr(0b1110100) + '\146' + chr(0b110 + 0o47) + chr(2611 - 2555)))
ray-project/ray
examples/lbfgs/driver.py
LinearModel.loss
def loss(self, xs, ys): """Computes the loss of the network.""" return float( self.sess.run( self.cross_entropy, feed_dict={ self.x: xs, self.y_: ys }))
python
def loss(self, xs, ys): """Computes the loss of the network.""" return float( self.sess.run( self.cross_entropy, feed_dict={ self.x: xs, self.y_: ys }))
[ "def", "loss", "(", "self", ",", "xs", ",", "ys", ")", ":", "return", "float", "(", "self", ".", "sess", ".", "run", "(", "self", ".", "cross_entropy", ",", "feed_dict", "=", "{", "self", ".", "x", ":", "xs", ",", "self", ".", "y_", ":", "ys", "}", ")", ")" ]
Computes the loss of the network.
[ "Computes", "the", "loss", "of", "the", "network", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/examples/lbfgs/driver.py#L63-L70
train
Computes the loss of the network.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sg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u2kLpS8s,QOfmzcVJsrp8,tzcpInYwBvYW,iDQ_gSK8V7h0,Rurm1zTRfSmY,reqGiMiVQ77y,bsS9P6_LpdIe,sbGAZlkZOtyh,Cf_Qef15s3_F,eX02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(195 - 147) + chr(0b10011 + 0o134) + '\x31' + chr(2129 - 2078) + chr(53), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(49) + chr(2084 - 2031) + chr(0b110110), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b11111 + 0o22) + chr(2513 - 2461) + chr(0b101110 + 0o7), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(1261 - 1210) + chr(49) + chr(0b11000 + 0o30), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b11000 + 0o36) + chr(0b110010), 60071 - 60063), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(50) + chr(0b110010), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110001) + chr(0b101001 + 0o7) + chr(0b110110), 46240 - 46232), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(11039 - 10928) + chr(49) + chr(51) + '\066', ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + '\061' + '\x34' + '\064', ord("\x08")), ehT0Px3KOsy9('\060' + chr(10479 - 10368) + chr(1830 - 1777) + chr(51), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(183 - 133) + '\x34' + '\x31', 0o10), ehT0Px3KOsy9(chr(1920 - 1872) + '\x6f' + chr(52) + chr(950 - 901), 0b1000), ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(111) + chr(0b110011) + chr(756 - 708) + '\x32', 15341 - 15333), ehT0Px3KOsy9(chr(1528 - 1480) + chr(11024 - 10913) + '\061' + '\062' + chr(2111 - 2061), 0o10), ehT0Px3KOsy9(chr(0b11 + 0o55) + '\157' + '\063' + '\061' + '\064', 0o10), ehT0Px3KOsy9(chr(123 - 75) + chr(0b1011011 + 0o24) + chr(0b110010) + '\062', 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x33' + chr(0b110010) + '\x34', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1011000 + 0o27) + chr(49) + chr(49), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(205 - 155) + '\066' + '\x36', 0o10), ehT0Px3KOsy9(chr(1267 - 1219) + chr(0b1100010 + 0o15) + chr(51) + chr(0b110010) + chr(0b100110 + 0o20), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(49) + chr(0b0 + 0o63) + chr(52), 12106 - 12098), ehT0Px3KOsy9('\060' + chr(2328 - 2217) + '\x33' + chr(644 - 589), 55944 - 55936), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(1261 - 1212) + chr(0b11010 + 0o33) + chr(0b110001), 45862 - 45854), ehT0Px3KOsy9('\x30' + '\157' + chr(1975 - 1926) + chr(0b110001) + chr(49), 0o10), ehT0Px3KOsy9('\x30' + chr(0b110000 + 0o77) + chr(49) + chr(0b11110 + 0o31) + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(5792 - 5681) + chr(0b101000 + 0o13) + chr(0b110000 + 0o4) + '\061', ord("\x08")), ehT0Px3KOsy9(chr(1408 - 1360) + '\157' + chr(50) + chr(0b101011 + 0o11) + chr(50), 0o10), ehT0Px3KOsy9('\x30' + chr(1121 - 1010) + chr(442 - 391) + chr(0b110001) + chr(0b10 + 0o57), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1761 - 1712) + chr(0b110010) + '\x33', 39729 - 39721), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(1834 - 1782) + '\064', 9042 - 9034), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(50) + '\x32' + '\067', 0b1000), ehT0Px3KOsy9(chr(1645 - 1597) + chr(111) + '\x32' + chr(55) + chr(0b1000 + 0o50), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(4718 - 4607) + '\066' + chr(0b110011 + 0o0), 0o10), ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(0b111001 + 0o66) + '\063' + '\060' + chr(0b10101 + 0o40), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110011) + chr(0b110010) + chr(0b11110 + 0o25), 21847 - 21839), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(1746 - 1695) + chr(54) + chr(1438 - 1387), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + '\062' + chr(0b100101 + 0o14) + '\061', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b110101 + 0o72) + '\066' + chr(52), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\x31' + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(0b110000 + 0o0) + '\x6f' + '\061' + '\063', 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\065' + chr(1927 - 1879), 50696 - 50688)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b's'), '\144' + '\145' + chr(0b1100011) + chr(111) + chr(0b1100100) + chr(0b111000 + 0o55))(chr(0b100011 + 0o122) + '\164' + chr(0b1100110) + chr(0b101101) + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def YpO0BcZ6fMsf(oVre8I6UXc3b, f0GvdYMiCwc9, oCqQNfCOTQKb): return kkSX4ccExqw4(xafqLlk3kkUe(oVre8I6UXc3b.sess, xafqLlk3kkUe(SXOLrMavuUCe(b'.\t\x11\xfdpGpo\x06\\\xfb\x13'), chr(100) + chr(101) + '\143' + '\x6f' + '\144' + '\145')(chr(4137 - 4020) + chr(9337 - 9221) + chr(3704 - 3602) + chr(45) + chr(1208 - 1152)))(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'>\x1c\n\xbbAM#0\x10Y\xceQ\xbb'), chr(100) + chr(0b100111 + 0o76) + chr(9277 - 9178) + '\157' + chr(0b11111 + 0o105) + '\x65')('\165' + chr(0b1110100) + chr(102) + chr(0b1100 + 0o41) + '\x38')), feed_dict={xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x12\x0b2\x9f\x02Tw:&{\xf3p'), chr(100) + '\x65' + chr(2550 - 2451) + chr(0b101000 + 0o107) + chr(0b110 + 0o136) + chr(0b1100101))(chr(10239 - 10122) + '\x74' + chr(102) + '\x2d' + chr(0b111000))): f0GvdYMiCwc9, xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'$1'), '\x64' + chr(101) + chr(0b1010 + 0o131) + chr(204 - 93) + chr(100) + chr(7823 - 7722))('\x75' + '\164' + '\x66' + chr(0b101101) + chr(847 - 791))): oCqQNfCOTQKb}))
ray-project/ray
examples/lbfgs/driver.py
LinearModel.grad
def grad(self, xs, ys): """Computes the gradients of the network.""" return self.sess.run( self.cross_entropy_grads, feed_dict={ self.x: xs, self.y_: ys })
python
def grad(self, xs, ys): """Computes the gradients of the network.""" return self.sess.run( self.cross_entropy_grads, feed_dict={ self.x: xs, self.y_: ys })
[ "def", "grad", "(", "self", ",", "xs", ",", "ys", ")", ":", "return", "self", ".", "sess", ".", "run", "(", "self", ".", "cross_entropy_grads", ",", "feed_dict", "=", "{", "self", ".", "x", ":", "xs", ",", "self", ".", "y_", ":", "ys", "}", ")" ]
Computes the gradients of the network.
[ "Computes", "the", "gradients", "of", "the", "network", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/examples/lbfgs/driver.py#L72-L78
train
Computes the gradients of the network.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp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SX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b111 + 0o51) + '\157' + chr(0b10001 + 0o40) + '\062' + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110001) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(327 - 279) + chr(0b1101111) + '\x31' + chr(48) + chr(51), 34518 - 34510), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x33' + chr(2487 - 2437) + '\065', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x31' + '\061' + chr(0b100011 + 0o17), 44479 - 44471), ehT0Px3KOsy9('\x30' + '\157' + chr(51) + chr(1487 - 1432) + chr(1820 - 1766), 0o10), ehT0Px3KOsy9('\x30' + chr(11120 - 11009) + chr(0b10000 + 0o43) + '\x36' + chr(0b10100 + 0o34), 0b1000), ehT0Px3KOsy9('\060' + chr(0b10 + 0o155) + chr(838 - 789) + chr(0b110101) + chr(51), 37126 - 37118), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110011) + chr(51) + chr(0b1010 + 0o52), ord("\x08")), ehT0Px3KOsy9(chr(0b1011 + 0o45) + chr(111) + chr(2319 - 2269) + chr(0b110101 + 0o2) + chr(217 - 166), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\061' + chr(0b110001 + 0o3) + '\067', 24842 - 24834), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110010) + chr(0b110011) + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(48) + chr(2783 - 2672) + '\062' + chr(485 - 430) + chr(0b100101 + 0o16), 8), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(0b1101111) + chr(0b1110 + 0o43) + chr(0b1110 + 0o43) + chr(55), 0b1000), ehT0Px3KOsy9('\060' + chr(0b110100 + 0o73) + '\x32' + chr(1380 - 1332) + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(50) + '\x32' + chr(1930 - 1877), 0b1000), ehT0Px3KOsy9(chr(0b100111 + 0o11) + chr(0b1101111) + '\061' + chr(54) + '\066', 0b1000), ehT0Px3KOsy9(chr(2199 - 2151) + '\x6f' + '\x31' + chr(50), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(8024 - 7913) + chr(0b101110 + 0o3) + chr(0b110100) + chr(375 - 321), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1000100 + 0o53) + chr(0b110001) + '\060' + chr(2156 - 2102), 0b1000), ehT0Px3KOsy9(chr(2130 - 2082) + chr(0b101011 + 0o104) + '\061' + chr(0b101101 + 0o12) + chr(0b110001), 0b1000), ehT0Px3KOsy9('\060' + chr(0b111 + 0o150) + chr(0b1101 + 0o46) + chr(0b100 + 0o54) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\061' + '\062' + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(1381 - 1333) + chr(0b111101 + 0o62) + chr(49) + chr(0b101111 + 0o1) + chr(0b100101 + 0o15), ord("\x08")), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(6474 - 6363) + chr(693 - 642) + chr(51) + '\065', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x31' + chr(238 - 190) + chr(52), 3139 - 3131), ehT0Px3KOsy9(chr(0b110000) + chr(0b11101 + 0o122) + chr(0b111 + 0o53) + '\x30' + chr(48), 12362 - 12354), ehT0Px3KOsy9(chr(2282 - 2234) + '\157' + '\x32' + chr(0b100011 + 0o21) + '\x31', 19487 - 19479), ehT0Px3KOsy9(chr(1807 - 1759) + chr(111) + '\061' + chr(0b10111 + 0o33) + chr(0b110100 + 0o1), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b10110 + 0o34) + chr(52) + chr(0b100110 + 0o17), 0b1000), ehT0Px3KOsy9(chr(1179 - 1131) + chr(7232 - 7121) + '\x31' + chr(0b110000) + '\x35', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1000001 + 0o56) + '\x32' + '\x35' + chr(55), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b111 + 0o57) + chr(610 - 555), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1011001 + 0o26) + chr(0b110001) + '\064', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\061' + chr(0b10100 + 0o41) + chr(526 - 474), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1100001 + 0o16) + chr(0b110001) + chr(55) + chr(0b1010 + 0o47), 8), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(50) + chr(0b10011 + 0o41), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1010110 + 0o31) + chr(1953 - 1902) + chr(0b0 + 0o62) + '\066', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110001), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101011 + 0o4) + chr(0b110001) + chr(53) + '\x36', 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(111) + '\065' + '\060', 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'|'), '\144' + chr(0b11010 + 0o113) + '\x63' + '\x6f' + chr(0b110 + 0o136) + chr(101))(chr(0b1010000 + 0o45) + '\164' + chr(0b1100110) + '\x2d' + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def RF_2NucJiY7o(oVre8I6UXc3b, f0GvdYMiCwc9, oCqQNfCOTQKb): return xafqLlk3kkUe(oVre8I6UXc3b.sess, xafqLlk3kkUe(SXOLrMavuUCe(b'!n7\xe0\x08\xab\xc6Z\xbe\xcc=\xa8'), chr(100) + chr(0b100111 + 0o76) + chr(0b1010111 + 0o14) + chr(4467 - 4356) + chr(100) + chr(0b1100101))(chr(0b10110 + 0o137) + '\x74' + chr(0b1010010 + 0o24) + chr(0b101101) + chr(56)))(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'1{,\xa69\xa1\x95\x05\xa8\xc9\x08\xea\xc2\x10\xe2\xe7\x17n\x15'), chr(7605 - 7505) + '\x65' + chr(0b1010111 + 0o14) + chr(9107 - 8996) + '\144' + chr(101))(chr(0b101111 + 0o106) + '\164' + chr(102) + chr(371 - 326) + '\070')), feed_dict={xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x1dl\x14\x82z\xb8\xc1\x0f\x9e\xeb5\xcb'), chr(0b1100100) + '\145' + chr(0b1100011) + chr(0b1101111) + chr(100) + '\145')(chr(0b1110101) + chr(2951 - 2835) + chr(7272 - 7170) + '\055' + chr(0b111000))): f0GvdYMiCwc9, xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'+V'), chr(0b1100100) + chr(101) + chr(0b1100011) + chr(111) + '\x64' + '\x65')(chr(0b1110101) + '\164' + chr(102) + chr(0b10 + 0o53) + chr(2350 - 2294))): oCqQNfCOTQKb})
ray-project/ray
examples/resnet/cifar_input.py
build_data
def build_data(data_path, size, dataset): """Creates the queue and preprocessing operations for the dataset. Args: data_path: Filename for cifar10 data. size: The number of images in the dataset. dataset: The dataset we are using. Returns: queue: A Tensorflow queue for extracting the images and labels. """ image_size = 32 if dataset == "cifar10": label_bytes = 1 label_offset = 0 elif dataset == "cifar100": label_bytes = 1 label_offset = 1 depth = 3 image_bytes = image_size * image_size * depth record_bytes = label_bytes + label_offset + image_bytes def load_transform(value): # Convert these examples to dense labels and processed images. record = tf.reshape(tf.decode_raw(value, tf.uint8), [record_bytes]) label = tf.cast(tf.slice(record, [label_offset], [label_bytes]), tf.int32) # Convert from string to [depth * height * width] to # [depth, height, width]. depth_major = tf.reshape( tf.slice(record, [label_bytes], [image_bytes]), [depth, image_size, image_size]) # Convert from [depth, height, width] to [height, width, depth]. image = tf.cast(tf.transpose(depth_major, [1, 2, 0]), tf.float32) return (image, label) # Read examples from files in the filename queue. data_files = tf.gfile.Glob(data_path) data = tf.contrib.data.FixedLengthRecordDataset(data_files, record_bytes=record_bytes) data = data.map(load_transform) data = data.batch(size) iterator = data.make_one_shot_iterator() return iterator.get_next()
python
def build_data(data_path, size, dataset): """Creates the queue and preprocessing operations for the dataset. Args: data_path: Filename for cifar10 data. size: The number of images in the dataset. dataset: The dataset we are using. Returns: queue: A Tensorflow queue for extracting the images and labels. """ image_size = 32 if dataset == "cifar10": label_bytes = 1 label_offset = 0 elif dataset == "cifar100": label_bytes = 1 label_offset = 1 depth = 3 image_bytes = image_size * image_size * depth record_bytes = label_bytes + label_offset + image_bytes def load_transform(value): # Convert these examples to dense labels and processed images. record = tf.reshape(tf.decode_raw(value, tf.uint8), [record_bytes]) label = tf.cast(tf.slice(record, [label_offset], [label_bytes]), tf.int32) # Convert from string to [depth * height * width] to # [depth, height, width]. depth_major = tf.reshape( tf.slice(record, [label_bytes], [image_bytes]), [depth, image_size, image_size]) # Convert from [depth, height, width] to [height, width, depth]. image = tf.cast(tf.transpose(depth_major, [1, 2, 0]), tf.float32) return (image, label) # Read examples from files in the filename queue. data_files = tf.gfile.Glob(data_path) data = tf.contrib.data.FixedLengthRecordDataset(data_files, record_bytes=record_bytes) data = data.map(load_transform) data = data.batch(size) iterator = data.make_one_shot_iterator() return iterator.get_next()
[ "def", "build_data", "(", "data_path", ",", "size", ",", "dataset", ")", ":", "image_size", "=", "32", "if", "dataset", "==", "\"cifar10\"", ":", "label_bytes", "=", "1", "label_offset", "=", "0", "elif", "dataset", "==", "\"cifar100\"", ":", "label_bytes", "=", "1", "label_offset", "=", "1", "depth", "=", "3", "image_bytes", "=", "image_size", "*", "image_size", "*", "depth", "record_bytes", "=", "label_bytes", "+", "label_offset", "+", "image_bytes", "def", "load_transform", "(", "value", ")", ":", "# Convert these examples to dense labels and processed images.", "record", "=", "tf", ".", "reshape", "(", "tf", ".", "decode_raw", "(", "value", ",", "tf", ".", "uint8", ")", ",", "[", "record_bytes", "]", ")", "label", "=", "tf", ".", "cast", "(", "tf", ".", "slice", "(", "record", ",", "[", "label_offset", "]", ",", "[", "label_bytes", "]", ")", ",", "tf", ".", "int32", ")", "# Convert from string to [depth * height * width] to", "# [depth, height, width].", "depth_major", "=", "tf", ".", "reshape", "(", "tf", ".", "slice", "(", "record", ",", "[", "label_bytes", "]", ",", "[", "image_bytes", "]", ")", ",", "[", "depth", ",", "image_size", ",", "image_size", "]", ")", "# Convert from [depth, height, width] to [height, width, depth].", "image", "=", "tf", ".", "cast", "(", "tf", ".", "transpose", "(", "depth_major", ",", "[", "1", ",", "2", ",", "0", "]", ")", ",", "tf", ".", "float32", ")", "return", "(", "image", ",", "label", ")", "# Read examples from files in the filename queue.", "data_files", "=", "tf", ".", "gfile", ".", "Glob", "(", "data_path", ")", "data", "=", "tf", ".", "contrib", ".", "data", ".", "FixedLengthRecordDataset", "(", "data_files", ",", "record_bytes", "=", "record_bytes", ")", "data", "=", "data", ".", "map", "(", "load_transform", ")", "data", "=", "data", ".", "batch", "(", "size", ")", "iterator", "=", "data", ".", "make_one_shot_iterator", "(", ")", "return", "iterator", ".", "get_next", "(", ")" ]
Creates the queue and preprocessing operations for the dataset. Args: data_path: Filename for cifar10 data. size: The number of images in the dataset. dataset: The dataset we are using. Returns: queue: A Tensorflow queue for extracting the images and labels.
[ "Creates", "the", "queue", "and", "preprocessing", "operations", "for", "the", "dataset", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/examples/resnet/cifar_input.py#L12-L54
train
Builds the queue and preprocessing operations for the cifar10 dataset.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9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QB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\060' + chr(3378 - 3267) + '\062' + chr(0b110111) + chr(0b110010), 17937 - 17929), ehT0Px3KOsy9('\060' + '\157' + chr(0b1111 + 0o43) + chr(0b110110) + '\067', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(1809 - 1698) + '\x31' + '\063' + chr(49), 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\062' + chr(0b0 + 0o61) + chr(0b100001 + 0o23), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + '\x31' + chr(49) + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(5537 - 5426) + '\x32' + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(474 - 426) + chr(4124 - 4013) + chr(1162 - 1112) + '\065', 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b1111 + 0o43) + chr(91 - 36), 57136 - 57128), ehT0Px3KOsy9(chr(0b110000) + chr(0b1010010 + 0o35) + '\061' + chr(0b110100) + chr(51), 58051 - 58043), ehT0Px3KOsy9(chr(48) + chr(7341 - 7230) + '\x33' + chr(51) + chr(0b0 + 0o62), 62152 - 62144), ehT0Px3KOsy9(chr(0b110000) + chr(0b11 + 0o154) + chr(0b110001) + chr(309 - 258) + '\065', 38496 - 38488), ehT0Px3KOsy9(chr(0b110000) + chr(0b110000 + 0o77) + '\x32' + '\x30' + '\061', ord("\x08")), ehT0Px3KOsy9(chr(1182 - 1134) + chr(111) + chr(0b110001) + '\065' + chr(54), 0b1000), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(0b1101111) + '\063' + '\061' + chr(0b110001), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\063' + '\x33' + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + '\061' + chr(1618 - 1569), 0o10), ehT0Px3KOsy9(chr(1568 - 1520) + chr(111) + chr(0b110001) + chr(49) + '\065', 0b1000), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(2252 - 2141) + '\063' + chr(0b110100) + chr(0b11010 + 0o33), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x33' + chr(0b11000 + 0o35) + chr(379 - 330), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b111101 + 0o62) + '\062' + chr(49) + chr(1953 - 1899), 0o10), ehT0Px3KOsy9(chr(461 - 413) + chr(269 - 158) + '\063' + chr(0b110101) + chr(54), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(0b10010 + 0o37) + chr(0b110011) + '\063', 0b1000), ehT0Px3KOsy9('\060' + chr(6033 - 5922) + chr(1912 - 1863) + chr(0b110100) + '\x34', 63247 - 63239), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(49) + '\x31' + chr(621 - 573), 13910 - 13902), ehT0Px3KOsy9('\060' + chr(111) + chr(53) + chr(941 - 887), 0o10), ehT0Px3KOsy9('\060' + chr(9655 - 9544) + chr(506 - 455) + chr(55) + chr(48), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(49) + chr(55) + chr(0b0 + 0o65), 43531 - 43523), ehT0Px3KOsy9(chr(48) + chr(8952 - 8841) + chr(1177 - 1128) + chr(53) + '\x32', 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(51) + '\065' + '\061', 8), ehT0Px3KOsy9('\060' + chr(0b1010101 + 0o32) + '\x33' + chr(2810 - 2756) + '\x36', 55895 - 55887), ehT0Px3KOsy9(chr(1162 - 1114) + chr(0b1010011 + 0o34) + '\x31' + chr(50) + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(0b1 + 0o156) + chr(0b100111 + 0o14) + chr(53) + chr(0b10 + 0o64), 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b1011 + 0o47) + chr(0b11011 + 0o26) + chr(55), 14329 - 14321), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b1101 + 0o45) + chr(0b100010 + 0o22) + '\x31', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b110000 + 0o77) + '\062' + '\x36' + chr(0b10000 + 0o43), 0o10), ehT0Px3KOsy9(chr(0b100001 + 0o17) + chr(8164 - 8053) + chr(0b101011 + 0o10) + '\x31' + '\067', ord("\x08")), ehT0Px3KOsy9(chr(215 - 167) + '\157' + '\x31' + '\062' + chr(0b110010 + 0o0), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1010 + 0o145) + '\x34' + chr(769 - 719), 10790 - 10782), ehT0Px3KOsy9(chr(0b110000) + chr(0b100110 + 0o111) + '\x32' + '\062', 8), ehT0Px3KOsy9(chr(0b110000) + chr(4724 - 4613) + '\x32' + chr(0b110010) + chr(48), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(2602 - 2549) + chr(0b11100 + 0o24), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x94'), chr(2039 - 1939) + chr(4717 - 4616) + chr(3402 - 3303) + '\x6f' + '\144' + '\x65')(chr(6127 - 6010) + chr(0b1110100) + '\x66' + chr(0b11100 + 0o21) + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def crRKE5jERqmM(VdUkFhGc7tTb, NLcc3BCJnQka, xQt6gV9VfTO3): fJKnIM3o6qJL = ehT0Px3KOsy9(chr(530 - 482) + chr(1050 - 939) + chr(0b11001 + 0o33) + '\060', ord("\x08")) if xQt6gV9VfTO3 == xafqLlk3kkUe(SXOLrMavuUCe(b'\xd9\xde?\xed9#%'), '\144' + chr(0b11010 + 0o113) + chr(9617 - 9518) + chr(0b10101 + 0o132) + '\x64' + '\145')(chr(0b1110101) + chr(0b100 + 0o160) + chr(0b1100110) + '\x2d' + chr(0b100110 + 0o22)): wCnbbXgS0xW_ = ehT0Px3KOsy9(chr(0b10111 + 0o31) + chr(111) + '\061', 0o10) QBCLx5m2R6o4 = ehT0Px3KOsy9(chr(1664 - 1616) + chr(0b1100000 + 0o17) + chr(2014 - 1966), ord("\x08")) elif xQt6gV9VfTO3 == xafqLlk3kkUe(SXOLrMavuUCe(b"\xd9\xde?\xed9#%'"), chr(100) + '\x65' + chr(7064 - 6965) + '\x6f' + chr(0b1100100) + '\145')(chr(4337 - 4220) + '\x74' + chr(0b1100110) + chr(59 - 14) + chr(0b10010 + 0o46)): wCnbbXgS0xW_ = ehT0Px3KOsy9('\x30' + chr(10495 - 10384) + chr(0b11000 + 0o31), 8) QBCLx5m2R6o4 = ehT0Px3KOsy9(chr(1165 - 1117) + chr(9321 - 9210) + '\x31', 8) UEys4_lSwsID = ehT0Px3KOsy9(chr(0b110000) + chr(0b101010 + 0o105) + chr(2510 - 2459), 53526 - 53518) aWq0Go5rqljQ = fJKnIM3o6qJL * fJKnIM3o6qJL * UEys4_lSwsID yhgVFoyCWqpU = wCnbbXgS0xW_ + QBCLx5m2R6o4 + aWq0Go5rqljQ def ZCDrA8vfJS89(QmmgWUB13VCJ): SIWbn6wzltxD = IDJ2eXGCBCDu.reshape(IDJ2eXGCBCDu.decode_raw(QmmgWUB13VCJ, IDJ2eXGCBCDu.uint8), [yhgVFoyCWqpU]) TRUOLFLuD08x = IDJ2eXGCBCDu.cast(IDJ2eXGCBCDu.slice(SIWbn6wzltxD, [QBCLx5m2R6o4], [wCnbbXgS0xW_]), IDJ2eXGCBCDu.int32) rJBQQNisD7xv = IDJ2eXGCBCDu.reshape(IDJ2eXGCBCDu.slice(SIWbn6wzltxD, [wCnbbXgS0xW_], [aWq0Go5rqljQ]), [UEys4_lSwsID, fJKnIM3o6qJL, fJKnIM3o6qJL]) IdmAHWfCqrnp = IDJ2eXGCBCDu.cast(IDJ2eXGCBCDu.transpose(rJBQQNisD7xv, [ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(0b1101111) + '\x31', 8), ehT0Px3KOsy9('\060' + '\157' + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(4277 - 4166) + chr(0b110000), 8)]), IDJ2eXGCBCDu.float32) return (IdmAHWfCqrnp, TRUOLFLuD08x) KAyZjSEftgFC = IDJ2eXGCBCDu.gfile.Glob(VdUkFhGc7tTb) ULnjp6D6efFH = IDJ2eXGCBCDu.contrib.data.FixedLengthRecordDataset(KAyZjSEftgFC, record_bytes=yhgVFoyCWqpU) ULnjp6D6efFH = ULnjp6D6efFH.map(ZCDrA8vfJS89) ULnjp6D6efFH = ULnjp6D6efFH.dNwAahu8tvoY(NLcc3BCJnQka) qS80gn7HOKhx = ULnjp6D6efFH.make_one_shot_iterator() return xafqLlk3kkUe(qS80gn7HOKhx, xafqLlk3kkUe(SXOLrMavuUCe(b'\xdd\xd2-\xd3%wmc'), chr(0b1100100) + chr(101) + '\143' + chr(111) + '\144' + chr(101))(chr(8519 - 8402) + '\164' + '\x66' + chr(678 - 633) + chr(0b111000)))()
ray-project/ray
examples/resnet/cifar_input.py
build_input
def build_input(data, batch_size, dataset, train): """Build CIFAR image and labels. Args: data_path: Filename for cifar10 data. batch_size: Input batch size. train: True if we are training and false if we are testing. Returns: images: Batches of images of size [batch_size, image_size, image_size, 3]. labels: Batches of labels of size [batch_size, num_classes]. Raises: ValueError: When the specified dataset is not supported. """ image_size = 32 depth = 3 num_classes = 10 if dataset == "cifar10" else 100 images, labels = data num_samples = images.shape[0] - images.shape[0] % batch_size dataset = tf.contrib.data.Dataset.from_tensor_slices( (images[:num_samples], labels[:num_samples])) def map_train(image, label): image = tf.image.resize_image_with_crop_or_pad(image, image_size + 4, image_size + 4) image = tf.random_crop(image, [image_size, image_size, 3]) image = tf.image.random_flip_left_right(image) image = tf.image.per_image_standardization(image) return (image, label) def map_test(image, label): image = tf.image.resize_image_with_crop_or_pad(image, image_size, image_size) image = tf.image.per_image_standardization(image) return (image, label) dataset = dataset.map(map_train if train else map_test) dataset = dataset.batch(batch_size) dataset = dataset.repeat() if train: dataset = dataset.shuffle(buffer_size=16 * batch_size) images, labels = dataset.make_one_shot_iterator().get_next() images = tf.reshape(images, [batch_size, image_size, image_size, depth]) labels = tf.reshape(labels, [batch_size, 1]) indices = tf.reshape(tf.range(0, batch_size, 1), [batch_size, 1]) labels = tf.sparse_to_dense( tf.concat([indices, labels], 1), [batch_size, num_classes], 1.0, 0.0) assert len(images.get_shape()) == 4 assert images.get_shape()[0] == batch_size assert images.get_shape()[-1] == 3 assert len(labels.get_shape()) == 2 assert labels.get_shape()[0] == batch_size assert labels.get_shape()[1] == num_classes if not train: tf.summary.image("images", images) return images, labels
python
def build_input(data, batch_size, dataset, train): """Build CIFAR image and labels. Args: data_path: Filename for cifar10 data. batch_size: Input batch size. train: True if we are training and false if we are testing. Returns: images: Batches of images of size [batch_size, image_size, image_size, 3]. labels: Batches of labels of size [batch_size, num_classes]. Raises: ValueError: When the specified dataset is not supported. """ image_size = 32 depth = 3 num_classes = 10 if dataset == "cifar10" else 100 images, labels = data num_samples = images.shape[0] - images.shape[0] % batch_size dataset = tf.contrib.data.Dataset.from_tensor_slices( (images[:num_samples], labels[:num_samples])) def map_train(image, label): image = tf.image.resize_image_with_crop_or_pad(image, image_size + 4, image_size + 4) image = tf.random_crop(image, [image_size, image_size, 3]) image = tf.image.random_flip_left_right(image) image = tf.image.per_image_standardization(image) return (image, label) def map_test(image, label): image = tf.image.resize_image_with_crop_or_pad(image, image_size, image_size) image = tf.image.per_image_standardization(image) return (image, label) dataset = dataset.map(map_train if train else map_test) dataset = dataset.batch(batch_size) dataset = dataset.repeat() if train: dataset = dataset.shuffle(buffer_size=16 * batch_size) images, labels = dataset.make_one_shot_iterator().get_next() images = tf.reshape(images, [batch_size, image_size, image_size, depth]) labels = tf.reshape(labels, [batch_size, 1]) indices = tf.reshape(tf.range(0, batch_size, 1), [batch_size, 1]) labels = tf.sparse_to_dense( tf.concat([indices, labels], 1), [batch_size, num_classes], 1.0, 0.0) assert len(images.get_shape()) == 4 assert images.get_shape()[0] == batch_size assert images.get_shape()[-1] == 3 assert len(labels.get_shape()) == 2 assert labels.get_shape()[0] == batch_size assert labels.get_shape()[1] == num_classes if not train: tf.summary.image("images", images) return images, labels
[ "def", "build_input", "(", "data", ",", "batch_size", ",", "dataset", ",", "train", ")", ":", "image_size", "=", "32", "depth", "=", "3", "num_classes", "=", "10", "if", "dataset", "==", "\"cifar10\"", "else", "100", "images", ",", "labels", "=", "data", "num_samples", "=", "images", ".", "shape", "[", "0", "]", "-", "images", ".", "shape", "[", "0", "]", "%", "batch_size", "dataset", "=", "tf", ".", "contrib", ".", "data", ".", "Dataset", ".", "from_tensor_slices", "(", "(", "images", "[", ":", "num_samples", "]", ",", "labels", "[", ":", "num_samples", "]", ")", ")", "def", "map_train", "(", "image", ",", "label", ")", ":", "image", "=", "tf", ".", "image", ".", "resize_image_with_crop_or_pad", "(", "image", ",", "image_size", "+", "4", ",", "image_size", "+", "4", ")", "image", "=", "tf", ".", "random_crop", "(", "image", ",", "[", "image_size", ",", "image_size", ",", "3", "]", ")", "image", "=", "tf", ".", "image", ".", "random_flip_left_right", "(", "image", ")", "image", "=", "tf", ".", "image", ".", "per_image_standardization", "(", "image", ")", "return", "(", "image", ",", "label", ")", "def", "map_test", "(", "image", ",", "label", ")", ":", "image", "=", "tf", ".", "image", ".", "resize_image_with_crop_or_pad", "(", "image", ",", "image_size", ",", "image_size", ")", "image", "=", "tf", ".", "image", ".", "per_image_standardization", "(", "image", ")", "return", "(", "image", ",", "label", ")", "dataset", "=", "dataset", ".", "map", "(", "map_train", "if", "train", "else", "map_test", ")", "dataset", "=", "dataset", ".", "batch", "(", "batch_size", ")", "dataset", "=", "dataset", ".", "repeat", "(", ")", "if", "train", ":", "dataset", "=", "dataset", ".", "shuffle", "(", "buffer_size", "=", "16", "*", "batch_size", ")", "images", ",", "labels", "=", "dataset", ".", "make_one_shot_iterator", "(", ")", ".", "get_next", "(", ")", "images", "=", "tf", ".", "reshape", "(", "images", ",", "[", "batch_size", ",", "image_size", ",", "image_size", ",", "depth", "]", ")", "labels", "=", "tf", ".", "reshape", "(", "labels", ",", "[", "batch_size", ",", "1", "]", ")", "indices", "=", "tf", ".", "reshape", "(", "tf", ".", "range", "(", "0", ",", "batch_size", ",", "1", ")", ",", "[", "batch_size", ",", "1", "]", ")", "labels", "=", "tf", ".", "sparse_to_dense", "(", "tf", ".", "concat", "(", "[", "indices", ",", "labels", "]", ",", "1", ")", ",", "[", "batch_size", ",", "num_classes", "]", ",", "1.0", ",", "0.0", ")", "assert", "len", "(", "images", ".", "get_shape", "(", ")", ")", "==", "4", "assert", "images", ".", "get_shape", "(", ")", "[", "0", "]", "==", "batch_size", "assert", "images", ".", "get_shape", "(", ")", "[", "-", "1", "]", "==", "3", "assert", "len", "(", "labels", ".", "get_shape", "(", ")", ")", "==", "2", "assert", "labels", ".", "get_shape", "(", ")", "[", "0", "]", "==", "batch_size", "assert", "labels", ".", "get_shape", "(", ")", "[", "1", "]", "==", "num_classes", "if", "not", "train", ":", "tf", ".", "summary", ".", "image", "(", "\"images\"", ",", "images", ")", "return", "images", ",", "labels" ]
Build CIFAR image and labels. Args: data_path: Filename for cifar10 data. batch_size: Input batch size. train: True if we are training and false if we are testing. Returns: images: Batches of images of size [batch_size, image_size, image_size, 3]. labels: Batches of labels of size [batch_size, num_classes]. Raises: ValueError: When the specified dataset is not supported.
[ "Build", "CIFAR", "image", "and", "labels", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/examples/resnet/cifar_input.py#L57-L116
train
Builds a CIFAR image and labels for a single dataset.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPvpP4xd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,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(2151 - 2103) + chr(0b1101111) + chr(0b110111) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110001) + chr(1148 - 1098) + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x32' + '\066' + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1110 + 0o141) + chr(53) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(2218 - 2170) + chr(111) + chr(2187 - 2136) + chr(2695 - 2642) + chr(52), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b111 + 0o53) + '\064' + '\x37', 32766 - 32758), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1388 - 1337) + chr(49) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(0b100111 + 0o110) + chr(2355 - 2304) + '\x35' + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1100011 + 0o14) + chr(0b110001) + '\x33' + '\060', 0b1000), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(111) + chr(0b110110) + chr(1816 - 1768), 0o10), ehT0Px3KOsy9(chr(726 - 678) + chr(2476 - 2365) + chr(0b110001) + '\064', 55052 - 55044), ehT0Px3KOsy9(chr(370 - 322) + '\157' + '\063', ord("\x08")), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(0b1101111) + chr(2173 - 2123) + chr(1564 - 1512) + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1 + 0o156) + '\x32' + '\x35' + chr(0b1100 + 0o53), 0o10), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(111) + chr(1800 - 1750) + '\066' + chr(50), 8), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(111) + '\063' + chr(0b110101) + '\x32', 0b1000), ehT0Px3KOsy9(chr(48) + chr(7552 - 7441) + '\061' + '\x32' + chr(52), 58736 - 58728), ehT0Px3KOsy9('\060' + '\x6f' + '\x37' + chr(0b11100 + 0o26), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b1100 + 0o53) + chr(0b100111 + 0o16), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110011) + '\x30' + chr(0b100001 + 0o24), 13832 - 13824), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110010) + chr(0b110000) + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(599 - 551) + '\157' + chr(1972 - 1921) + chr(664 - 614) + '\065', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110011) + chr(51) + chr(48), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + '\063' + '\061' + '\x36', 37173 - 37165), ehT0Px3KOsy9('\060' + '\157' + chr(1533 - 1480), 4267 - 4259), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(481 - 431) + '\x35' + chr(0b100011 + 0o16), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(51) + '\x33' + '\064', 17507 - 17499), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110010) + '\x31' + '\063', 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(2309 - 2259) + '\061' + chr(218 - 163), ord("\x08")), ehT0Px3KOsy9('\060' + chr(9236 - 9125) + chr(0b110011) + chr(48) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\061' + '\066' + '\x30', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1000001 + 0o56) + chr(0b110010) + '\x35' + chr(0b110001), 8), ehT0Px3KOsy9('\x30' + '\x6f' + chr(2051 - 2001) + chr(0b110101) + chr(49), 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(50) + '\062' + chr(52), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\x32' + chr(0b10111 + 0o32) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(237 - 189) + chr(0b1101111) + chr(2488 - 2438) + chr(2519 - 2468) + '\x31', 18990 - 18982), ehT0Px3KOsy9(chr(0b110000) + chr(1226 - 1115) + chr(0b110011 + 0o0) + chr(0b110000) + chr(54), 35440 - 35432), ehT0Px3KOsy9(chr(48) + '\157' + chr(49) + chr(1939 - 1887) + chr(0b11011 + 0o33), 0b1000), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(1834 - 1723) + '\063' + chr(0b101111 + 0o5) + chr(50), 0b1000), ehT0Px3KOsy9(chr(1846 - 1798) + chr(6541 - 6430) + chr(0b110001) + chr(0b1101 + 0o52), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110101) + '\060', 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x12'), chr(0b1100100) + chr(3725 - 3624) + chr(99) + chr(0b1011011 + 0o24) + chr(0b1100100) + chr(0b11110 + 0o107))('\165' + chr(0b100000 + 0o124) + '\x66' + chr(1567 - 1522) + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def VePRz5zz06xl(ULnjp6D6efFH, ix9dZyeAmUxY, xQt6gV9VfTO3, e80gRioCjdat): fJKnIM3o6qJL = ehT0Px3KOsy9(chr(48) + chr(0b110010 + 0o75) + chr(52) + '\x30', 41402 - 41394) UEys4_lSwsID = ehT0Px3KOsy9(chr(1179 - 1131) + '\157' + chr(0b110011), 8) i6loyAgxUM2t = ehT0Px3KOsy9(chr(48) + '\157' + '\x31' + chr(1501 - 1451), 0b1000) if xQt6gV9VfTO3 == xafqLlk3kkUe(SXOLrMavuUCe(b'_?\xd4L\x9e\x96\xfd'), chr(100) + chr(0b1100101) + chr(7736 - 7637) + chr(111) + chr(0b110001 + 0o63) + '\145')(chr(6911 - 6794) + '\164' + chr(0b1100110) + '\x2d' + chr(2984 - 2928)) else ehT0Px3KOsy9('\060' + chr(0b101001 + 0o106) + '\061' + chr(0b101011 + 0o11) + '\064', 0b1000) (YJOmEcibG8C0, uXMK81tmdpTM) = ULnjp6D6efFH Wuetkhsbidt0 = YJOmEcibG8C0.nauYfLglTpcb[ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(111) + chr(0b110000), 0b1000)] - YJOmEcibG8C0.nauYfLglTpcb[ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x30', 8)] % ix9dZyeAmUxY xQt6gV9VfTO3 = IDJ2eXGCBCDu.contrib.data.Dataset.from_tensor_slices((YJOmEcibG8C0[:Wuetkhsbidt0], uXMK81tmdpTM[:Wuetkhsbidt0])) def yvrJoq9KzsvT(IdmAHWfCqrnp, TRUOLFLuD08x): IdmAHWfCqrnp = IDJ2eXGCBCDu.image.resize_image_with_crop_or_pad(IdmAHWfCqrnp, fJKnIM3o6qJL + ehT0Px3KOsy9('\060' + '\x6f' + chr(52), 0b1000), fJKnIM3o6qJL + ehT0Px3KOsy9('\x30' + chr(111) + chr(52), 8)) IdmAHWfCqrnp = IDJ2eXGCBCDu.random_crop(IdmAHWfCqrnp, [fJKnIM3o6qJL, fJKnIM3o6qJL, ehT0Px3KOsy9(chr(0b110000) + chr(0b101100 + 0o103) + chr(0b101000 + 0o13), 8)]) IdmAHWfCqrnp = IDJ2eXGCBCDu.image.random_flip_left_right(IdmAHWfCqrnp) IdmAHWfCqrnp = IDJ2eXGCBCDu.image.per_image_standardization(IdmAHWfCqrnp) return (IdmAHWfCqrnp, TRUOLFLuD08x) def cB4WfDTgEAa_(IdmAHWfCqrnp, TRUOLFLuD08x): IdmAHWfCqrnp = IDJ2eXGCBCDu.image.resize_image_with_crop_or_pad(IdmAHWfCqrnp, fJKnIM3o6qJL, fJKnIM3o6qJL) IdmAHWfCqrnp = IDJ2eXGCBCDu.image.per_image_standardization(IdmAHWfCqrnp) return (IdmAHWfCqrnp, TRUOLFLuD08x) xQt6gV9VfTO3 = xQt6gV9VfTO3.map(yvrJoq9KzsvT if e80gRioCjdat else cB4WfDTgEAa_) xQt6gV9VfTO3 = xQt6gV9VfTO3.dNwAahu8tvoY(ix9dZyeAmUxY) xQt6gV9VfTO3 = xQt6gV9VfTO3.repeat() if e80gRioCjdat: xQt6gV9VfTO3 = xQt6gV9VfTO3.shuffle(buffer_size=ehT0Px3KOsy9('\060' + chr(2494 - 2383) + chr(0b110010) + '\060', 8794 - 8786) * ix9dZyeAmUxY) (YJOmEcibG8C0, uXMK81tmdpTM) = xQt6gV9VfTO3.make_one_shot_iterator().get_next() YJOmEcibG8C0 = IDJ2eXGCBCDu.reshape(YJOmEcibG8C0, [ix9dZyeAmUxY, fJKnIM3o6qJL, fJKnIM3o6qJL, UEys4_lSwsID]) uXMK81tmdpTM = IDJ2eXGCBCDu.reshape(uXMK81tmdpTM, [ix9dZyeAmUxY, ehT0Px3KOsy9(chr(1986 - 1938) + chr(111) + '\061', 0b1000)]) pIcoaXENl5Pw = IDJ2eXGCBCDu.reshape(IDJ2eXGCBCDu.range(ehT0Px3KOsy9(chr(48) + chr(0b1000100 + 0o53) + '\x30', 8), ix9dZyeAmUxY, ehT0Px3KOsy9(chr(0b110000) + chr(9695 - 9584) + chr(572 - 523), 8)), [ix9dZyeAmUxY, ehT0Px3KOsy9(chr(48) + chr(111) + '\061', 8)]) uXMK81tmdpTM = IDJ2eXGCBCDu.sparse_to_dense(IDJ2eXGCBCDu.concat([pIcoaXENl5Pw, uXMK81tmdpTM], ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b11111 + 0o22), 8)), [ix9dZyeAmUxY, i6loyAgxUM2t], 1.0, 0.0) assert c2A0yzQpDQB3(xafqLlk3kkUe(YJOmEcibG8C0, xafqLlk3kkUe(SXOLrMavuUCe(b'[3\xc6r\x9f\xcf\xac\x99='), '\x64' + '\x65' + chr(9466 - 9367) + '\157' + chr(0b1100100) + chr(10056 - 9955))('\165' + chr(0b1110100) + chr(102) + chr(45) + '\070'))()) == ehT0Px3KOsy9('\060' + '\x6f' + chr(2263 - 2211), 8) assert xafqLlk3kkUe(YJOmEcibG8C0, xafqLlk3kkUe(SXOLrMavuUCe(b'[3\xc6r\x9f\xcf\xac\x99='), chr(100) + '\145' + chr(0b1100011) + '\x6f' + chr(7306 - 7206) + chr(0b1100101))('\165' + chr(0b1110100) + chr(102) + chr(1324 - 1279) + '\x38'))()[ehT0Px3KOsy9(chr(986 - 938) + chr(111) + chr(48), 8)] == ix9dZyeAmUxY assert xafqLlk3kkUe(YJOmEcibG8C0, xafqLlk3kkUe(SXOLrMavuUCe(b'[3\xc6r\x9f\xcf\xac\x99='), '\x64' + chr(1108 - 1007) + chr(1014 - 915) + chr(0b1101111) + chr(100) + chr(101))('\165' + '\164' + chr(4579 - 4477) + chr(2022 - 1977) + chr(0b101010 + 0o16)))()[-ehT0Px3KOsy9(chr(48) + chr(0b1000000 + 0o57) + chr(0b110001), 8)] == ehT0Px3KOsy9(chr(48) + chr(111) + chr(2347 - 2296), 8) assert c2A0yzQpDQB3(xafqLlk3kkUe(uXMK81tmdpTM, xafqLlk3kkUe(SXOLrMavuUCe(b'[3\xc6r\x9f\xcf\xac\x99='), chr(0b10011 + 0o121) + chr(5632 - 5531) + chr(881 - 782) + chr(0b1100110 + 0o11) + '\144' + '\x65')('\x75' + chr(0b1110100) + '\146' + chr(0b101101) + chr(2811 - 2755)))()) == ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110010), 0b1000) assert xafqLlk3kkUe(uXMK81tmdpTM, xafqLlk3kkUe(SXOLrMavuUCe(b'[3\xc6r\x9f\xcf\xac\x99='), '\144' + chr(338 - 237) + chr(99) + '\x6f' + '\x64' + '\x65')(chr(8731 - 8614) + '\x74' + '\146' + chr(0b10010 + 0o33) + '\x38'))()[ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110000), 8)] == ix9dZyeAmUxY assert xafqLlk3kkUe(uXMK81tmdpTM, xafqLlk3kkUe(SXOLrMavuUCe(b'[3\xc6r\x9f\xcf\xac\x99='), chr(0b1100100) + '\x65' + chr(7491 - 7392) + chr(0b11000 + 0o127) + chr(100) + chr(0b1100101))(chr(117) + chr(8285 - 8169) + chr(9853 - 9751) + chr(0b1101 + 0o40) + chr(0b10001 + 0o47)))()[ehT0Px3KOsy9(chr(2297 - 2249) + chr(0b101110 + 0o101) + chr(1029 - 980), 8)] == i6loyAgxUM2t if not e80gRioCjdat: xafqLlk3kkUe(IDJ2eXGCBCDu.summary, xafqLlk3kkUe(SXOLrMavuUCe(b'u2\xdfl\xa4\xf0\xab\xaa)Bbs'), '\x64' + chr(3256 - 3155) + chr(99) + chr(4650 - 4539) + chr(100) + chr(0b1100101))('\x75' + chr(0b1110100) + chr(10266 - 10164) + chr(0b111 + 0o46) + chr(0b11000 + 0o40)))(xafqLlk3kkUe(SXOLrMavuUCe(b'U;\xd3J\x89\xd4'), chr(100) + chr(101) + '\143' + chr(0b1101111) + '\144' + '\x65')('\165' + chr(0b1110100) + chr(3565 - 3463) + chr(0b101101) + '\070'), YJOmEcibG8C0) return (YJOmEcibG8C0, uXMK81tmdpTM)
ray-project/ray
python/ray/scripts/scripts.py
create_or_update
def create_or_update(cluster_config_file, min_workers, max_workers, no_restart, restart_only, yes, cluster_name): """Create or update a Ray cluster.""" if restart_only or no_restart: assert restart_only != no_restart, "Cannot set both 'restart_only' " \ "and 'no_restart' at the same time!" create_or_update_cluster(cluster_config_file, min_workers, max_workers, no_restart, restart_only, yes, cluster_name)
python
def create_or_update(cluster_config_file, min_workers, max_workers, no_restart, restart_only, yes, cluster_name): """Create or update a Ray cluster.""" if restart_only or no_restart: assert restart_only != no_restart, "Cannot set both 'restart_only' " \ "and 'no_restart' at the same time!" create_or_update_cluster(cluster_config_file, min_workers, max_workers, no_restart, restart_only, yes, cluster_name)
[ "def", "create_or_update", "(", "cluster_config_file", ",", "min_workers", ",", "max_workers", ",", "no_restart", ",", "restart_only", ",", "yes", ",", "cluster_name", ")", ":", "if", "restart_only", "or", "no_restart", ":", "assert", "restart_only", "!=", "no_restart", ",", "\"Cannot set both 'restart_only' \"", "\"and 'no_restart' at the same time!\"", "create_or_update_cluster", "(", "cluster_config_file", ",", "min_workers", ",", "max_workers", ",", "no_restart", ",", "restart_only", ",", "yes", ",", "cluster_name", ")" ]
Create or update a Ray cluster.
[ "Create", "or", "update", "a", "Ray", "cluster", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/scripts/scripts.py#L453-L460
train
Create or update a Ray cluster.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,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ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(8784 - 8673) + chr(49) + chr(162 - 110) + '\x32', 54863 - 54855), ehT0Px3KOsy9(chr(2195 - 2147) + '\x6f' + '\061' + '\061' + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110110) + chr(0b1010 + 0o46), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101110 + 0o1) + chr(50) + '\x31' + chr(52), 20217 - 20209), ehT0Px3KOsy9('\060' + '\x6f' + '\063' + chr(2606 - 2553) + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(9949 - 9838) + chr(50) + chr(911 - 856) + chr(0b101000 + 0o13), ord("\x08")), ehT0Px3KOsy9(chr(316 - 268) + chr(0b1101111) + chr(0b110001) + chr(52) + chr(0b110100), 8556 - 8548), ehT0Px3KOsy9(chr(48) + chr(898 - 787) + '\x35' + chr(0b110101), 24376 - 24368), ehT0Px3KOsy9(chr(48) + chr(1604 - 1493) + '\062' + chr(0b10101 + 0o34) + '\060', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111 + 0o0) + chr(52), 0o10), ehT0Px3KOsy9('\x30' + chr(2722 - 2611) + chr(49) + '\067' + '\063', 3485 - 3477), ehT0Px3KOsy9('\060' + '\x6f' + chr(1897 - 1847) + '\062' + chr(51), 15047 - 15039), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(463 - 414) + chr(0b110001) + '\x30', 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110010) + '\064' + chr(0b110111), 63736 - 63728), ehT0Px3KOsy9(chr(48) + '\157' + '\061' + '\063' + '\x30', ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(50) + '\x33' + chr(1241 - 1189), 0o10), ehT0Px3KOsy9(chr(1476 - 1428) + chr(111) + chr(0b1011 + 0o47) + '\065', 0b1000), ehT0Px3KOsy9('\060' + '\157' + '\x33', 25275 - 25267), ehT0Px3KOsy9('\x30' + '\157' + chr(2448 - 2398) + chr(0b101110 + 0o7) + chr(2617 - 2563), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1000010 + 0o55) + chr(53) + chr(48), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b10001 + 0o40) + chr(48) + chr(0b10111 + 0o31), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b100011 + 0o16) + chr(166 - 112) + chr(1105 - 1055), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(50) + chr(0b110010 + 0o5) + '\065', 0o10), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(9590 - 9479) + chr(0b111 + 0o54) + '\x34' + '\061', 5864 - 5856), ehT0Px3KOsy9('\060' + chr(5195 - 5084) + '\x34' + '\060', 3017 - 3009), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(9011 - 8900) + chr(54) + chr(48), 8), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110010) + chr(50) + chr(0b110110), 5100 - 5092), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x35' + chr(52), 25961 - 25953), ehT0Px3KOsy9(chr(48) + chr(0b1101110 + 0o1) + chr(0b110000 + 0o1) + chr(0b101001 + 0o10) + '\063', 0o10), ehT0Px3KOsy9(chr(2210 - 2162) + '\x6f' + chr(51) + chr(0b10 + 0o65) + chr(0b1 + 0o60), 0b1000), ehT0Px3KOsy9(chr(0b101110 + 0o2) + chr(11008 - 10897) + chr(0b0 + 0o61) + '\x34' + chr(1214 - 1160), ord("\x08")), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(0b111 + 0o150) + chr(0b110110) + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110001) + chr(0b110101) + chr(0b1010 + 0o53), 0b1000), ehT0Px3KOsy9(chr(1483 - 1435) + chr(0b1101111) + chr(51) + chr(873 - 819) + '\066', 0o10), ehT0Px3KOsy9(chr(297 - 249) + '\x6f' + chr(318 - 269) + chr(0b110110) + '\x31', 0b1000), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(0b1000100 + 0o53) + chr(794 - 745) + chr(50) + chr(2231 - 2178), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(1107 - 1058) + chr(0b100011 + 0o16) + chr(0b110110), 0b1000), ehT0Px3KOsy9('\x30' + chr(5275 - 5164) + chr(0b110011) + '\x31' + chr(48), 0b1000), ehT0Px3KOsy9('\060' + chr(10601 - 10490) + chr(262 - 212) + chr(340 - 292) + chr(0b110101), 46135 - 46127)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(673 - 562) + chr(0b110000 + 0o5) + chr(97 - 49), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'L'), chr(100) + chr(0b1001111 + 0o26) + '\x63' + '\x6f' + '\144' + '\145')(chr(9237 - 9120) + '\164' + chr(0b1100110) + '\x2d' + chr(0b100011 + 0o25)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def _ENvyEPIIYsR(aAyfV6AgETzy, GySD4Qe8WeqW, MtU7pWvhdnwP, soqW5pogArRF, t1HGIa48oXEI, hqvVufknwbtO, ZVsoUZwVET8Q): if t1HGIa48oXEI or soqW5pogArRF: assert t1HGIa48oXEI != soqW5pogArRF, xafqLlk3kkUe(SXOLrMavuUCe(b"!.^\xe2\x85\xcfD^\xedp[\xf1'\xd30\xbc2q\xcb[r!\x00\xc9\xbeO^\xfaUl\xd9\x07[\t\xd6V;!\x97\xf7\x07<D\xed\x98\xcfC\r\xe9p[\xe7 \xc2x\xeftn\xcb\x08r)\x1f\xd8\xc0"), chr(0b1010111 + 0o15) + chr(0b1100101) + chr(0b100010 + 0o101) + '\x6f' + '\x64' + '\x65')(chr(0b1011 + 0o152) + '\164' + chr(102) + chr(0b10001 + 0o34) + chr(1574 - 1518)) nUGdAtMF1YyP(aAyfV6AgETzy, GySD4Qe8WeqW, MtU7pWvhdnwP, soqW5pogArRF, t1HGIa48oXEI, hqvVufknwbtO, ZVsoUZwVET8Q)
ray-project/ray
python/ray/scripts/scripts.py
teardown
def teardown(cluster_config_file, yes, workers_only, cluster_name): """Tear down the Ray cluster.""" teardown_cluster(cluster_config_file, yes, workers_only, cluster_name)
python
def teardown(cluster_config_file, yes, workers_only, cluster_name): """Tear down the Ray cluster.""" teardown_cluster(cluster_config_file, yes, workers_only, cluster_name)
[ "def", "teardown", "(", "cluster_config_file", ",", "yes", ",", "workers_only", ",", "cluster_name", ")", ":", "teardown_cluster", "(", "cluster_config_file", ",", "yes", ",", "workers_only", ",", "cluster_name", ")" ]
Tear down the Ray cluster.
[ "Tear", "down", "the", "Ray", "cluster", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/scripts/scripts.py#L482-L484
train
Tear down the Ray cluster.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSI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Z2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1149 - 1100) + '\x33' + '\062', 48496 - 48488), ehT0Px3KOsy9('\060' + '\x6f' + chr(1566 - 1512) + chr(2574 - 2521), 0o10), ehT0Px3KOsy9(chr(742 - 694) + '\x6f' + '\062' + chr(0b110101), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\x31' + chr(51) + chr(54), 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\063' + chr(0b10000 + 0o40), 0o10), ehT0Px3KOsy9(chr(0b10111 + 0o31) + '\x6f' + chr(0b110010) + chr(55) + chr(0b101100 + 0o12), 52573 - 52565), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(2183 - 2129) + '\065', 8), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(111) + chr(2401 - 2352) + chr(51) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(1429 - 1381) + '\x6f' + chr(0b10111 + 0o34) + chr(1304 - 1255) + '\061', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(9916 - 9805) + chr(0b110010) + chr(1541 - 1488) + chr(0b10011 + 0o43), 0o10), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(0b1100101 + 0o12) + chr(0b1110 + 0o44) + chr(48) + '\x36', 36648 - 36640), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(903 - 853) + '\x37' + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001) + '\061' + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110010) + chr(55) + '\064', 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + '\x37' + chr(993 - 939), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(51) + chr(0b110001) + '\x35', 36906 - 36898), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110011) + chr(616 - 562) + '\061', 0b1000), ehT0Px3KOsy9(chr(950 - 902) + chr(1762 - 1651) + '\x33' + chr(51) + '\067', 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(2316 - 2266) + chr(54) + '\065', ord("\x08")), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(0b11011 + 0o124) + '\x31' + chr(49) + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x37' + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(0b11100 + 0o24) + '\157' + chr(1132 - 1082) + '\062' + '\061', 0o10), ehT0Px3KOsy9(chr(88 - 40) + chr(111) + chr(539 - 490) + chr(0b111 + 0o57), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\063' + chr(0b110111) + '\065', 0b1000), ehT0Px3KOsy9('\x30' + chr(11413 - 11302) + '\062' + '\x36' + chr(53), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110010) + '\063' + '\x32', 0o10), ehT0Px3KOsy9(chr(1524 - 1476) + chr(111) + chr(1467 - 1418) + '\060' + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(1012 - 964) + '\157' + chr(55) + chr(48), 8), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(8823 - 8712) + '\062' + '\x33' + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(1878 - 1830) + chr(0b1101111) + '\061' + chr(0b110000) + chr(52), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110000 + 0o2) + chr(0b101100 + 0o10), 0o10), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(0b1101111) + chr(1538 - 1483) + chr(1657 - 1609), 8), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(49) + chr(0b110101) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(2060 - 2012) + '\157' + chr(1494 - 1442) + chr(0b11010 + 0o34), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x31' + chr(0b10101 + 0o41) + chr(2236 - 2187), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x31' + '\066' + '\061', 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(1567 - 1518) + chr(0b1010 + 0o54) + chr(1716 - 1662), 15647 - 15639), ehT0Px3KOsy9(chr(48) + chr(0b1101001 + 0o6) + chr(0b11101 + 0o26) + chr(0b110010) + '\x37', 0o10), ehT0Px3KOsy9(chr(48) + chr(7644 - 7533) + chr(0b110011) + '\x37' + '\061', 0b1000), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(111) + chr(0b100110 + 0o15) + '\x34', 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(912 - 859) + '\x30', 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b't'), chr(0b1011101 + 0o7) + '\x65' + chr(99) + chr(0b11000 + 0o127) + '\144' + chr(8583 - 8482))(chr(0b1101010 + 0o13) + chr(0b1110100) + '\x66' + chr(0b11 + 0o52) + chr(0b100001 + 0o27)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def aDuaOntHlFw5(aAyfV6AgETzy, hqvVufknwbtO, saXmEmzW924l, ZVsoUZwVET8Q): XoXiA6jDl212(aAyfV6AgETzy, hqvVufknwbtO, saXmEmzW924l, ZVsoUZwVET8Q)
ray-project/ray
python/ray/scripts/scripts.py
kill_random_node
def kill_random_node(cluster_config_file, yes, cluster_name): """Kills a random Ray node. For testing purposes only.""" click.echo("Killed node with IP " + kill_node(cluster_config_file, yes, cluster_name))
python
def kill_random_node(cluster_config_file, yes, cluster_name): """Kills a random Ray node. For testing purposes only.""" click.echo("Killed node with IP " + kill_node(cluster_config_file, yes, cluster_name))
[ "def", "kill_random_node", "(", "cluster_config_file", ",", "yes", ",", "cluster_name", ")", ":", "click", ".", "echo", "(", "\"Killed node with IP \"", "+", "kill_node", "(", "cluster_config_file", ",", "yes", ",", "cluster_name", ")", ")" ]
Kills a random Ray node. For testing purposes only.
[ "Kills", "a", "random", "Ray", "node", ".", "For", "testing", "purposes", "only", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/scripts/scripts.py#L501-L504
train
Kills a random Ray node. For testing purposes only.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPvpP4xdo3,cW7yQuyEnJ6E,KOHQGQ8qLDWm,NE1Yam2HHroQ,ygAzbDzrvRMh,SBRjvOU1ufVC,hOkXjmluKZfJ,q1QCh3W88sgk,TLbJ60djyws0,rIcPej9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UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\060' + '\157' + chr(0b110011) + chr(452 - 397) + chr(52), 23869 - 23861), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110010) + chr(0b110101), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1100001 + 0o16) + chr(0b100100 + 0o16) + '\067' + '\060', 43841 - 43833), ehT0Px3KOsy9('\x30' + '\x6f' + chr(1161 - 1111) + chr(0b100011 + 0o21) + chr(51), 0o10), ehT0Px3KOsy9(chr(0b1001 + 0o47) + '\157' + chr(2380 - 2325), 0o10), ehT0Px3KOsy9(chr(2195 - 2147) + '\x6f' + '\x32' + '\x37' + '\x34', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(2052 - 2000) + '\x33', 0b1000), ehT0Px3KOsy9(chr(0b10000 + 0o40) + '\157' + chr(0b110010) + '\x31' + chr(2067 - 2012), 0b1000), ehT0Px3KOsy9(chr(0b101 + 0o53) + '\x6f' + '\062' + '\x31' + chr(0b110100), 60968 - 60960), ehT0Px3KOsy9(chr(306 - 258) + chr(10188 - 10077) + chr(0b100 + 0o54), 33599 - 33591), ehT0Px3KOsy9('\060' + chr(10604 - 10493) + '\063' + '\062' + chr(0b110000), 9130 - 9122), ehT0Px3KOsy9(chr(48) + chr(0b10100 + 0o133) + chr(595 - 546) + chr(1212 - 1162) + chr(1988 - 1933), 10267 - 10259), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(529 - 418) + chr(0b101001 + 0o10) + chr(54) + chr(48), 54951 - 54943), ehT0Px3KOsy9(chr(944 - 896) + chr(0b1101111) + chr(49) + '\x35' + chr(1137 - 1089), 45542 - 45534), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110010 + 0o0) + chr(0b110011) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(0b100001 + 0o17) + chr(111) + chr(196 - 146) + chr(0b110011) + '\065', 26460 - 26452), ehT0Px3KOsy9(chr(0b101100 + 0o4) + chr(111) + chr(0b11000 + 0o31) + chr(0b110110) + chr(2598 - 2546), 0o10), ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(0b100000 + 0o117) + '\062' + '\065' + chr(178 - 129), 31606 - 31598), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b10110 + 0o35) + chr(2351 - 2300) + chr(0b110011), 654 - 646), ehT0Px3KOsy9('\060' + '\x6f' + chr(2258 - 2209) + '\061' + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(2056 - 2008) + chr(0b101011 + 0o104) + chr(0b110010) + chr(53) + chr(52), 997 - 989), ehT0Px3KOsy9('\x30' + chr(111) + '\x33' + chr(503 - 455) + chr(54), 0b1000), ehT0Px3KOsy9('\060' + chr(8829 - 8718) + chr(330 - 279) + chr(0b11110 + 0o22) + '\x35', 32383 - 32375), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x34' + '\x33', 8), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(0b1101111) + chr(0b10000 + 0o41) + chr(0b110011) + chr(53), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110001) + chr(48) + chr(0b110111), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1000000 + 0o57) + chr(0b110001) + chr(0b110101) + chr(0b100000 + 0o27), 22636 - 22628), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110100) + chr(0b110011), 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110101) + chr(2870 - 2816), 42483 - 42475), ehT0Px3KOsy9(chr(48) + chr(0b1010011 + 0o34) + chr(0b11100 + 0o25) + '\064' + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b11001 + 0o31) + chr(332 - 278) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(0b1101111) + chr(0b1100 + 0o45) + chr(53) + chr(1733 - 1683), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(0b100010 + 0o21) + '\065' + chr(0b10110 + 0o33), ord("\x08")), ehT0Px3KOsy9(chr(0b10011 + 0o35) + '\x6f' + '\062' + chr(2239 - 2184) + '\066', 0o10), ehT0Px3KOsy9('\060' + chr(12283 - 12172) + '\x32' + '\065' + chr(0b110010), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(7304 - 7193) + '\x31' + '\063' + chr(0b11010 + 0o30), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(9497 - 9386) + '\x37', 8), ehT0Px3KOsy9(chr(2244 - 2196) + chr(111) + '\x31' + '\060' + chr(0b101101 + 0o5), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(54), 1029 - 1021), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(4561 - 4450) + chr(51) + chr(0b110001) + '\062', 28831 - 28823)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110101) + chr(48), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xd2'), chr(100) + chr(0b1100101) + '\143' + '\157' + chr(100) + '\x65')('\165' + '\164' + chr(102) + '\x2d' + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def VD44lp1ooD9U(aAyfV6AgETzy, hqvVufknwbtO, ZVsoUZwVET8Q): xafqLlk3kkUe(zsE8htsrFxS3, xafqLlk3kkUe(SXOLrMavuUCe(b'\x99v\xd0\xcc'), chr(100) + chr(223 - 122) + '\143' + '\157' + '\x64' + chr(101))(chr(0b110011 + 0o102) + chr(0b1110100) + chr(0b1010111 + 0o17) + chr(0b101101) + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xb7|\xd4\xcfb\xd8\x03\xe1\xe3d\xb5w\x07\x01\xec\xf5T\xe0\x8bl'), chr(1854 - 1754) + chr(3564 - 3463) + chr(99) + '\157' + chr(0b101001 + 0o73) + chr(0b1100101))('\165' + '\164' + '\146' + chr(45) + chr(3087 - 3031)) + cVfWmtiRppTJ(aAyfV6AgETzy, hqvVufknwbtO, ZVsoUZwVET8Q))
ray-project/ray
python/ray/scripts/scripts.py
submit
def submit(cluster_config_file, docker, screen, tmux, stop, start, cluster_name, port_forward, script, script_args): """Uploads and runs a script on the specified cluster. The script is automatically synced to the following location: os.path.join("~", os.path.basename(script)) """ assert not (screen and tmux), "Can specify only one of `screen` or `tmux`." if start: create_or_update_cluster(cluster_config_file, None, None, False, False, True, cluster_name) target = os.path.join("~", os.path.basename(script)) rsync(cluster_config_file, script, target, cluster_name, down=False) cmd = " ".join(["python", target] + list(script_args)) exec_cluster(cluster_config_file, cmd, docker, screen, tmux, stop, False, cluster_name, port_forward)
python
def submit(cluster_config_file, docker, screen, tmux, stop, start, cluster_name, port_forward, script, script_args): """Uploads and runs a script on the specified cluster. The script is automatically synced to the following location: os.path.join("~", os.path.basename(script)) """ assert not (screen and tmux), "Can specify only one of `screen` or `tmux`." if start: create_or_update_cluster(cluster_config_file, None, None, False, False, True, cluster_name) target = os.path.join("~", os.path.basename(script)) rsync(cluster_config_file, script, target, cluster_name, down=False) cmd = " ".join(["python", target] + list(script_args)) exec_cluster(cluster_config_file, cmd, docker, screen, tmux, stop, False, cluster_name, port_forward)
[ "def", "submit", "(", "cluster_config_file", ",", "docker", ",", "screen", ",", "tmux", ",", "stop", ",", "start", ",", "cluster_name", ",", "port_forward", ",", "script", ",", "script_args", ")", ":", "assert", "not", "(", "screen", "and", "tmux", ")", ",", "\"Can specify only one of `screen` or `tmux`.\"", "if", "start", ":", "create_or_update_cluster", "(", "cluster_config_file", ",", "None", ",", "None", ",", "False", ",", "False", ",", "True", ",", "cluster_name", ")", "target", "=", "os", ".", "path", ".", "join", "(", "\"~\"", ",", "os", ".", "path", ".", "basename", "(", "script", ")", ")", "rsync", "(", "cluster_config_file", ",", "script", ",", "target", ",", "cluster_name", ",", "down", "=", "False", ")", "cmd", "=", "\" \"", ".", "join", "(", "[", "\"python\"", ",", "target", "]", "+", "list", "(", "script_args", ")", ")", "exec_cluster", "(", "cluster_config_file", ",", "cmd", ",", "docker", ",", "screen", ",", "tmux", ",", "stop", ",", "False", ",", "cluster_name", ",", "port_forward", ")" ]
Uploads and runs a script on the specified cluster. The script is automatically synced to the following location: os.path.join("~", os.path.basename(script))
[ "Uploads", "and", "runs", "a", "script", "on", "the", "specified", "cluster", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/scripts/scripts.py#L590-L609
train
Uploads and runs a script on the specified cluster.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtryd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BIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\060' + chr(0b10 + 0o155) + chr(51) + '\061' + '\x33', 0b1000), ehT0Px3KOsy9('\x30' + chr(9791 - 9680) + '\065' + chr(2662 - 2610), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x32' + chr(55) + chr(0b110000), 8432 - 8424), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(50) + chr(50) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(476 - 365) + chr(1078 - 1028) + '\x35' + chr(0b100010 + 0o17), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b11100 + 0o123) + chr(0b110011) + chr(167 - 116) + chr(0b100110 + 0o13), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(2228 - 2178) + chr(54) + chr(50), 0b1000), ehT0Px3KOsy9(chr(48) + chr(12126 - 12015) + chr(55) + '\x35', 65100 - 65092), ehT0Px3KOsy9(chr(0b11011 + 0o25) + '\x6f' + chr(0b100110 + 0o15) + chr(0b101010 + 0o13) + '\x30', 2562 - 2554), ehT0Px3KOsy9(chr(0b10 + 0o56) + chr(111) + chr(53) + chr(0b100 + 0o62), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + '\x32' + chr(0b110100 + 0o0) + '\064', 56303 - 56295), ehT0Px3KOsy9('\060' + chr(12106 - 11995) + chr(1847 - 1797) + chr(772 - 719) + '\x32', 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(52), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b101111 + 0o100) + chr(0b110011) + '\066' + '\061', ord("\x08")), ehT0Px3KOsy9(chr(978 - 930) + chr(0b1101111) + chr(50) + chr(0b101100 + 0o10) + chr(0b1100 + 0o46), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110010) + '\062' + '\x34', 24529 - 24521), ehT0Px3KOsy9('\060' + '\157' + '\x31' + chr(399 - 350), 0b1000), ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(0b1101111) + chr(0b101010 + 0o7) + '\x33' + '\065', 42410 - 42402), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x33' + chr(2074 - 2026) + chr(1118 - 1066), ord("\x08")), ehT0Px3KOsy9(chr(1186 - 1138) + chr(0b1101111) + chr(0b101000 + 0o11) + chr(0b101 + 0o57) + chr(0b110 + 0o61), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(668 - 618) + chr(51) + chr(2463 - 2409), 0o10), ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(0b1101111) + chr(0b110110) + '\060', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b101100 + 0o103) + chr(1359 - 1309) + chr(0b101001 + 0o11) + chr(52), 8), ehT0Px3KOsy9('\060' + '\x6f' + '\066' + '\x31', 0b1000), ehT0Px3KOsy9(chr(1320 - 1272) + chr(0b1101111) + chr(0b110001) + '\x37' + chr(0b11 + 0o60), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(10698 - 10587) + chr(49) + '\061' + '\x37', 0b1000), ehT0Px3KOsy9(chr(0b10101 + 0o33) + '\x6f' + chr(2039 - 1990) + chr(0b10011 + 0o36), 8), ehT0Px3KOsy9(chr(529 - 481) + chr(5383 - 5272) + chr(50) + '\x35' + chr(0b110001), 8), ehT0Px3KOsy9(chr(48) + '\157' + '\063' + '\066' + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(1341 - 1293) + chr(0b11010 + 0o125) + chr(0b110001) + chr(2494 - 2439), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b11110 + 0o121) + chr(0b110010) + chr(0b1001 + 0o47) + chr(1263 - 1211), 0o10), ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(0b101010 + 0o105) + chr(1133 - 1079), 0o10), ehT0Px3KOsy9(chr(48) + chr(2534 - 2423) + '\x33' + chr(0b101 + 0o62) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b111111 + 0o60) + '\063' + '\064' + '\x35', ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + '\061' + '\x32' + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(0b100011 + 0o114) + '\062' + chr(0b101000 + 0o14), 52953 - 52945), ehT0Px3KOsy9(chr(0b100110 + 0o12) + '\157' + '\x31' + chr(1288 - 1240) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110001) + '\064', 0b1000), ehT0Px3KOsy9(chr(2030 - 1982) + chr(0b1101111) + '\062' + chr(52) + chr(48), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(50) + '\x32' + '\x31', 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(2142 - 2094) + chr(111) + '\065' + chr(0b110000), 37738 - 37730)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xe5'), chr(9441 - 9341) + chr(101) + '\x63' + chr(111) + chr(0b1100100) + '\x65')('\x75' + chr(2250 - 2134) + chr(0b1100110) + chr(45) + chr(2263 - 2207)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def _KeUmid9QA3B(aAyfV6AgETzy, P83rO5gGXR9W, Au272Pekc2a0, gzNu0JUgbue_, i64wROPYXl1w, avRbFsnfJxQj, ZVsoUZwVET8Q, TyuvV70jxcxF, ZoLQNQnWvvj6, TSxeo3CvoytZ): assert not (Au272Pekc2a0 and gzNu0JUgbue_), xafqLlk3kkUe(SXOLrMavuUCe(b'\x88M\xd6\xb2\xda\xa9\xd7^\x81H\xdd\x8ak\x9f\xce\xed)2\xaa\x02\xbe_\xf2\x11\x1b<j\xdb\x95j\xeaf\xd9\x8a"4\'x\xcd\xe4\xb3L\x96'), '\144' + '\x65' + chr(99) + chr(111) + '\x64' + chr(0b101010 + 0o73))(chr(317 - 200) + chr(116) + chr(102) + chr(82 - 37) + '\070') if avRbFsnfJxQj: nUGdAtMF1YyP(aAyfV6AgETzy, None, None, ehT0Px3KOsy9('\060' + chr(0b10010 + 0o135) + chr(0b1101 + 0o43), 27271 - 27263), ehT0Px3KOsy9('\x30' + chr(111) + chr(485 - 437), 8), ehT0Px3KOsy9('\x30' + chr(0b1010110 + 0o31) + chr(1240 - 1191), 42477 - 42469), ZVsoUZwVET8Q) GR1581dR5rDS = oqhJDdMJfuwx.path._oWXztVNnqHF(xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5'), '\x64' + chr(0b111 + 0o136) + chr(0b110011 + 0o60) + chr(0b1100010 + 0o15) + chr(4392 - 4292) + chr(101))(chr(0b1110101) + chr(7632 - 7516) + chr(0b1100110) + '\055' + '\x38'), oqhJDdMJfuwx.path.g_1BfC8eoU5Q(ZoLQNQnWvvj6)) Ufs_n9z2VBXH(aAyfV6AgETzy, ZoLQNQnWvvj6, GR1581dR5rDS, ZVsoUZwVET8Q, down=ehT0Px3KOsy9('\060' + chr(11286 - 11175) + '\x30', 8)) cTsjNbtiBYNK = xafqLlk3kkUe(SXOLrMavuUCe(b'\xeb'), chr(100) + '\145' + chr(0b11100 + 0o107) + '\157' + '\144' + chr(0b1100101))(chr(12876 - 12759) + '\x74' + chr(0b1100110) + chr(238 - 193) + chr(56))._oWXztVNnqHF([xafqLlk3kkUe(SXOLrMavuUCe(b'\xbbU\xcc\xfa\xc6\xb7'), chr(100) + '\x65' + chr(0b1100011) + '\x6f' + '\144' + '\x65')('\165' + chr(2095 - 1979) + chr(4041 - 3939) + chr(1801 - 1756) + '\070'), GR1581dR5rDS] + YyaZ4tpXu4lf(TSxeo3CvoytZ)) _xfloEByj0vo(aAyfV6AgETzy, cTsjNbtiBYNK, P83rO5gGXR9W, Au272Pekc2a0, gzNu0JUgbue_, i64wROPYXl1w, ehT0Px3KOsy9('\x30' + chr(0b11111 + 0o120) + chr(48), 8), ZVsoUZwVET8Q, TyuvV70jxcxF)
ray-project/ray
examples/resnet/resnet_model.py
ResNet.build_graph
def build_graph(self): """Build a whole graph for the model.""" self.global_step = tf.Variable(0, trainable=False) self._build_model() if self.mode == "train": self._build_train_op() else: # Additional initialization for the test network. self.variables = ray.experimental.tf_utils.TensorFlowVariables( self.cost) self.summaries = tf.summary.merge_all()
python
def build_graph(self): """Build a whole graph for the model.""" self.global_step = tf.Variable(0, trainable=False) self._build_model() if self.mode == "train": self._build_train_op() else: # Additional initialization for the test network. self.variables = ray.experimental.tf_utils.TensorFlowVariables( self.cost) self.summaries = tf.summary.merge_all()
[ "def", "build_graph", "(", "self", ")", ":", "self", ".", "global_step", "=", "tf", ".", "Variable", "(", "0", ",", "trainable", "=", "False", ")", "self", ".", "_build_model", "(", ")", "if", "self", ".", "mode", "==", "\"train\"", ":", "self", ".", "_build_train_op", "(", ")", "else", ":", "# Additional initialization for the test network.", "self", ".", "variables", "=", "ray", ".", "experimental", ".", "tf_utils", ".", "TensorFlowVariables", "(", "self", ".", "cost", ")", "self", ".", "summaries", "=", "tf", ".", "summary", ".", "merge_all", "(", ")" ]
Build a whole graph for the model.
[ "Build", "a", "whole", "graph", "for", "the", "model", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/examples/resnet/resnet_model.py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tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(51) + chr(0b1001 + 0o54) + '\065', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(49) + chr(331 - 277) + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(0b1101111) + chr(228 - 179) + '\x33' + chr(2193 - 2142), 0b1000), ehT0Px3KOsy9(chr(102 - 54) + chr(0b1100000 + 0o17) + chr(0b1011 + 0o46) + chr(0b110000) + chr(0b11 + 0o64), ord("\x08")), ehT0Px3KOsy9(chr(679 - 631) + chr(1344 - 1233) + chr(0b0 + 0o62) + chr(0b110101), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b10010 + 0o43) + chr(1636 - 1584), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b1101 + 0o45) + chr(2259 - 2206) + '\x32', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b10011 + 0o134) + '\063' + chr(0b1101 + 0o47) + '\060', 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(307 - 256) + chr(428 - 380) + chr(54), 0o10), ehT0Px3KOsy9(chr(0b101001 + 0o7) + '\157' + '\061' + '\061' + chr(590 - 540), 45732 - 45724), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b101100 + 0o6) + chr(0b100100 + 0o17) + chr(0b110111), 53342 - 53334), ehT0Px3KOsy9('\x30' + chr(111) + '\062' + '\062', 8159 - 8151), ehT0Px3KOsy9(chr(1796 - 1748) + chr(111) + chr(49) + chr(0b110110) + '\065', 0o10), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(111) + chr(0b100111 + 0o13) + chr(0b110100) + chr(1613 - 1558), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + '\x33' + chr(0b10111 + 0o40) + chr(51), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110011) + '\060' + chr(51), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110011) + '\x35' + '\065', 8), ehT0Px3KOsy9('\x30' + chr(0b100 + 0o153) + '\x33' + '\064' + chr(0b1111 + 0o41), 8), ehT0Px3KOsy9(chr(0b1100 + 0o44) + chr(111) + '\062' + '\x31' + chr(54), 15212 - 15204), ehT0Px3KOsy9(chr(48) + chr(0b1001001 + 0o46) + chr(0b110010) + '\x33' + '\063', 61292 - 61284), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1447 - 1396) + chr(293 - 238) + chr(0b110011), 8), ehT0Px3KOsy9('\060' + '\x6f' + '\x31' + '\062' + chr(51), 60872 - 60864), ehT0Px3KOsy9(chr(1748 - 1700) + '\x6f' + chr(0b10100 + 0o37) + chr(0b10100 + 0o42) + '\x37', 13372 - 13364), ehT0Px3KOsy9('\060' + chr(111) + chr(0b101001 + 0o11) + chr(440 - 388) + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(2223 - 2175) + '\157' + chr(1791 - 1740) + '\063' + '\x33', 0o10), ehT0Px3KOsy9(chr(364 - 316) + chr(0b1101111) + '\063' + chr(0b1110 + 0o50) + '\066', 0b1000), ehT0Px3KOsy9('\x30' + chr(1599 - 1488) + '\x33' + chr(2555 - 2500) + chr(0b11 + 0o57), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(51) + '\064', 0o10), ehT0Px3KOsy9(chr(0b11001 + 0o27) + '\157' + chr(0b11110 + 0o25) + '\062' + chr(522 - 468), 60486 - 60478), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110100) + chr(2410 - 2355), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(50) + chr(0b1110 + 0o50) + chr(49), 0b1000), ehT0Px3KOsy9(chr(0b11 + 0o55) + '\x6f' + '\x31' + chr(0b110111) + '\x33', 0o10), ehT0Px3KOsy9(chr(48) + chr(10495 - 10384) + chr(53) + chr(1099 - 1048), 2086 - 2078), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x31' + chr(0b110011) + '\x37', 0b1000), ehT0Px3KOsy9(chr(418 - 370) + chr(0b1101111) + '\063' + '\060', 0b1000), ehT0Px3KOsy9(chr(0b1011 + 0o45) + '\157' + chr(0b110001) + chr(0b101100 + 0o12), ord("\x08")), ehT0Px3KOsy9(chr(65 - 17) + chr(111) + '\x31' + '\063' + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(1558 - 1510) + chr(0b1101111) + chr(51) + chr(0b110100 + 0o0) + '\x37', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1100 + 0o143) + chr(51) + chr(0b110100) + chr(1673 - 1622), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110001 + 0o3) + chr(1239 - 1191), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110101) + '\060', 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xc3'), '\144' + '\145' + chr(0b1100011) + chr(111) + chr(100) + chr(101))(chr(330 - 213) + '\164' + '\x66' + chr(0b101001 + 0o4) + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def Q0MFGRcpSiu4(oVre8I6UXc3b): oVre8I6UXc3b.tnqEWmPx71Oj = IDJ2eXGCBCDu.Variable(ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(48), 0b1000), trainable=ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(0b110010 + 0o75) + chr(0b11100 + 0o24), 8)) xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb2\x16..yH\xf5\x8d\xa9.\xfa~'), chr(4493 - 4393) + chr(6822 - 6721) + chr(0b1100011) + chr(0b1101111) + chr(718 - 618) + '\x65')('\x75' + '\164' + chr(102) + '\055' + chr(0b110100 + 0o4)))() if xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x80\x1b?"'), chr(100) + chr(8839 - 8738) + chr(0b1100011) + '\x6f' + chr(0b110101 + 0o57) + chr(0b11011 + 0o112))('\165' + chr(0b1110100) + '\x66' + '\055' + chr(881 - 825))) == xafqLlk3kkUe(SXOLrMavuUCe(b'\x99\x06:.{'), '\144' + chr(0b1100101) + '\x63' + '\x6f' + chr(4504 - 4404) + chr(0b111001 + 0o54))(chr(0b1100001 + 0o24) + '\164' + '\x66' + chr(0b11111 + 0o16) + chr(2351 - 2295)): xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb2\x16..yH\xf5\x94\xb4+\xf6|*\xc8\x8b'), chr(0b1100100) + '\x65' + chr(0b100 + 0o137) + '\x6f' + chr(0b1100100) + chr(5328 - 5227))(chr(0b111101 + 0o70) + chr(0b1101011 + 0o11) + chr(0b1001111 + 0o27) + '\055' + '\x38'))() else: oVre8I6UXc3b.DaDu8eJMPmzT = H9zaXRrGK6Cq.experimental.tf_utils.TensorFlowVariables(oVre8I6UXc3b.cost) oVre8I6UXc3b.Ss61w8pBYeZH = IDJ2eXGCBCDu.summary.merge_all()
ray-project/ray
examples/resnet/resnet_model.py
ResNet._build_model
def _build_model(self): """Build the core model within the graph.""" with tf.variable_scope("init"): x = self._conv("init_conv", self._images, 3, 3, 16, self._stride_arr(1)) strides = [1, 2, 2] activate_before_residual = [True, False, False] if self.hps.use_bottleneck: res_func = self._bottleneck_residual filters = [16, 64, 128, 256] else: res_func = self._residual filters = [16, 16, 32, 64] with tf.variable_scope("unit_1_0"): x = res_func(x, filters[0], filters[1], self._stride_arr( strides[0]), activate_before_residual[0]) for i in range(1, self.hps.num_residual_units): with tf.variable_scope("unit_1_%d" % i): x = res_func(x, filters[1], filters[1], self._stride_arr(1), False) with tf.variable_scope("unit_2_0"): x = res_func(x, filters[1], filters[2], self._stride_arr( strides[1]), activate_before_residual[1]) for i in range(1, self.hps.num_residual_units): with tf.variable_scope("unit_2_%d" % i): x = res_func(x, filters[2], filters[2], self._stride_arr(1), False) with tf.variable_scope("unit_3_0"): x = res_func(x, filters[2], filters[3], self._stride_arr( strides[2]), activate_before_residual[2]) for i in range(1, self.hps.num_residual_units): with tf.variable_scope("unit_3_%d" % i): x = res_func(x, filters[3], filters[3], self._stride_arr(1), False) with tf.variable_scope("unit_last"): x = self._batch_norm("final_bn", x) x = self._relu(x, self.hps.relu_leakiness) x = self._global_avg_pool(x) with tf.variable_scope("logit"): logits = self._fully_connected(x, self.hps.num_classes) self.predictions = tf.nn.softmax(logits) with tf.variable_scope("costs"): xent = tf.nn.softmax_cross_entropy_with_logits( logits=logits, labels=self.labels) self.cost = tf.reduce_mean(xent, name="xent") self.cost += self._decay() if self.mode == "eval": tf.summary.scalar("cost", self.cost)
python
def _build_model(self): """Build the core model within the graph.""" with tf.variable_scope("init"): x = self._conv("init_conv", self._images, 3, 3, 16, self._stride_arr(1)) strides = [1, 2, 2] activate_before_residual = [True, False, False] if self.hps.use_bottleneck: res_func = self._bottleneck_residual filters = [16, 64, 128, 256] else: res_func = self._residual filters = [16, 16, 32, 64] with tf.variable_scope("unit_1_0"): x = res_func(x, filters[0], filters[1], self._stride_arr( strides[0]), activate_before_residual[0]) for i in range(1, self.hps.num_residual_units): with tf.variable_scope("unit_1_%d" % i): x = res_func(x, filters[1], filters[1], self._stride_arr(1), False) with tf.variable_scope("unit_2_0"): x = res_func(x, filters[1], filters[2], self._stride_arr( strides[1]), activate_before_residual[1]) for i in range(1, self.hps.num_residual_units): with tf.variable_scope("unit_2_%d" % i): x = res_func(x, filters[2], filters[2], self._stride_arr(1), False) with tf.variable_scope("unit_3_0"): x = res_func(x, filters[2], filters[3], self._stride_arr( strides[2]), activate_before_residual[2]) for i in range(1, self.hps.num_residual_units): with tf.variable_scope("unit_3_%d" % i): x = res_func(x, filters[3], filters[3], self._stride_arr(1), False) with tf.variable_scope("unit_last"): x = self._batch_norm("final_bn", x) x = self._relu(x, self.hps.relu_leakiness) x = self._global_avg_pool(x) with tf.variable_scope("logit"): logits = self._fully_connected(x, self.hps.num_classes) self.predictions = tf.nn.softmax(logits) with tf.variable_scope("costs"): xent = tf.nn.softmax_cross_entropy_with_logits( logits=logits, labels=self.labels) self.cost = tf.reduce_mean(xent, name="xent") self.cost += self._decay() if self.mode == "eval": tf.summary.scalar("cost", self.cost)
[ "def", "_build_model", "(", "self", ")", ":", "with", "tf", ".", "variable_scope", "(", "\"init\"", ")", ":", "x", "=", "self", ".", "_conv", "(", "\"init_conv\"", ",", "self", ".", "_images", ",", "3", ",", "3", ",", "16", ",", "self", ".", "_stride_arr", "(", "1", ")", ")", "strides", "=", "[", "1", ",", "2", ",", "2", "]", "activate_before_residual", "=", "[", "True", ",", "False", ",", "False", "]", "if", "self", ".", "hps", ".", "use_bottleneck", ":", "res_func", "=", "self", ".", "_bottleneck_residual", "filters", "=", "[", "16", ",", "64", ",", "128", ",", "256", "]", "else", ":", "res_func", "=", "self", ".", "_residual", "filters", "=", "[", "16", ",", "16", ",", "32", ",", "64", "]", "with", "tf", ".", "variable_scope", "(", "\"unit_1_0\"", ")", ":", "x", "=", "res_func", "(", "x", ",", "filters", "[", "0", "]", ",", "filters", "[", "1", "]", ",", "self", ".", "_stride_arr", "(", "strides", "[", "0", "]", ")", ",", "activate_before_residual", "[", "0", "]", ")", "for", "i", "in", "range", "(", "1", ",", "self", ".", "hps", ".", "num_residual_units", ")", ":", "with", "tf", ".", "variable_scope", "(", "\"unit_1_%d\"", "%", "i", ")", ":", "x", "=", "res_func", "(", "x", ",", "filters", "[", "1", "]", ",", "filters", "[", "1", "]", ",", "self", ".", "_stride_arr", "(", "1", ")", ",", "False", ")", "with", "tf", ".", "variable_scope", "(", "\"unit_2_0\"", ")", ":", "x", "=", "res_func", "(", "x", ",", "filters", "[", "1", "]", ",", "filters", "[", "2", "]", ",", "self", ".", "_stride_arr", "(", "strides", "[", "1", "]", ")", ",", "activate_before_residual", "[", "1", "]", ")", "for", "i", "in", "range", "(", "1", ",", "self", ".", "hps", ".", "num_residual_units", ")", ":", "with", "tf", ".", "variable_scope", "(", "\"unit_2_%d\"", "%", "i", ")", ":", "x", "=", "res_func", "(", "x", ",", "filters", "[", "2", "]", ",", "filters", "[", "2", "]", ",", "self", ".", "_stride_arr", "(", "1", ")", ",", "False", ")", "with", "tf", ".", "variable_scope", "(", "\"unit_3_0\"", ")", ":", "x", "=", "res_func", "(", "x", ",", "filters", "[", "2", "]", ",", "filters", "[", "3", "]", ",", "self", ".", "_stride_arr", "(", "strides", "[", "2", "]", ")", ",", "activate_before_residual", "[", "2", "]", ")", "for", "i", "in", "range", "(", "1", ",", "self", ".", "hps", ".", "num_residual_units", ")", ":", "with", "tf", ".", "variable_scope", "(", "\"unit_3_%d\"", "%", "i", ")", ":", "x", "=", "res_func", "(", "x", ",", "filters", "[", "3", "]", ",", "filters", "[", "3", "]", ",", "self", ".", "_stride_arr", "(", "1", ")", ",", "False", ")", "with", "tf", ".", "variable_scope", "(", "\"unit_last\"", ")", ":", "x", "=", "self", ".", "_batch_norm", "(", "\"final_bn\"", ",", "x", ")", "x", "=", "self", ".", "_relu", "(", "x", ",", "self", ".", "hps", ".", "relu_leakiness", ")", "x", "=", "self", ".", "_global_avg_pool", "(", "x", ")", "with", "tf", ".", "variable_scope", "(", "\"logit\"", ")", ":", "logits", "=", "self", ".", "_fully_connected", "(", "x", ",", "self", ".", "hps", ".", "num_classes", ")", "self", ".", "predictions", "=", "tf", ".", "nn", ".", "softmax", "(", "logits", ")", "with", "tf", ".", "variable_scope", "(", "\"costs\"", ")", ":", "xent", "=", "tf", ".", "nn", ".", "softmax_cross_entropy_with_logits", "(", "logits", "=", "logits", ",", "labels", "=", "self", ".", "labels", ")", "self", ".", "cost", "=", "tf", ".", "reduce_mean", "(", "xent", ",", "name", "=", "\"xent\"", ")", "self", ".", "cost", "+=", "self", ".", "_decay", "(", ")", "if", "self", ".", "mode", "==", "\"eval\"", ":", "tf", ".", "summary", ".", "scalar", "(", "\"cost\"", ",", "self", ".", "cost", ")" ]
Build the core model within the graph.
[ "Build", "the", "core", "model", "within", "the", "graph", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/examples/resnet/resnet_model.py#L65-L120
train
Builds the core model within the graph.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPvpP4xdo3,cW7yQuyEnJ6E,KOHQGQ8qLDWm,NE1Yam2HHroQ,ygAzbDzrvRMh,SBRjvOU1ufVC,hOkXjmluKZfJ,q1QC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B2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b1000 + 0o50) + '\157' + '\063' + chr(1484 - 1431), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x32' + chr(52) + '\x30', 0o10), ehT0Px3KOsy9('\x30' + chr(0b10001 + 0o136) + chr(50) + '\x33', 50509 - 50501), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110001) + '\x37' + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(0b1101111) + chr(50) + '\067' + chr(48), 65278 - 65270), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110011) + chr(1562 - 1507) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(6013 - 5902) + '\x32' + '\063' + chr(0b110100), 43988 - 43980), ehT0Px3KOsy9(chr(48) + '\157' + chr(49) + '\060' + '\x34', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1010101 + 0o32) + '\063' + chr(48) + '\x35', 0b1000), ehT0Px3KOsy9(chr(514 - 466) + chr(111) + chr(447 - 397) + chr(0b10110 + 0o34), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(10606 - 10495) + chr(0b100 + 0o55) + chr(1068 - 1014) + '\x36', 50493 - 50485), ehT0Px3KOsy9(chr(2290 - 2242) + chr(156 - 45) + chr(0b110010) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b1110 + 0o45) + '\x35' + chr(1035 - 985), 0b1000), ehT0Px3KOsy9(chr(1103 - 1055) + chr(111) + '\x33' + chr(0b110011) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + '\x36', 15873 - 15865), ehT0Px3KOsy9('\060' + chr(111) + chr(1375 - 1321) + chr(0b110 + 0o61), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110100) + chr(55), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110001) + chr(0b110101) + '\x30', 0o10), ehT0Px3KOsy9(chr(589 - 541) + '\x6f' + chr(0b11010 + 0o31) + chr(51) + '\x35', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\066' + chr(842 - 793), 12912 - 12904), ehT0Px3KOsy9(chr(0b110000) + chr(0b0 + 0o157) + chr(0b110011) + chr(718 - 663) + chr(829 - 778), 10390 - 10382), ehT0Px3KOsy9(chr(0b11110 + 0o22) + '\x6f' + '\x33' + '\x32' + chr(55), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1247 - 1198) + chr(0b100000 + 0o26) + '\x37', 20535 - 20527), ehT0Px3KOsy9(chr(532 - 484) + chr(111) + '\065' + chr(341 - 286), 0b1000), ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(111) + '\063' + '\x33' + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(48) + chr(10978 - 10867) + '\x32' + chr(51) + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\063' + '\060' + '\064', 9943 - 9935), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b10111 + 0o32) + '\065' + '\x30', 8), ehT0Px3KOsy9('\060' + '\157' + chr(1466 - 1415) + '\x35' + chr(0b11110 + 0o31), 0o10), ehT0Px3KOsy9(chr(0b1111 + 0o41) + '\x6f' + chr(0b110010) + '\067' + chr(2232 - 2177), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + '\065' + chr(0b110111), 8), ehT0Px3KOsy9(chr(48) + chr(0b1011101 + 0o22) + chr(412 - 358) + chr(2660 - 2608), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110011) + chr(1476 - 1422) + chr(51), 0o10), ehT0Px3KOsy9(chr(921 - 873) + chr(12100 - 11989) + chr(51) + chr(0b1111 + 0o43) + chr(0b10000 + 0o47), 8), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110011) + chr(1600 - 1546) + '\066', 0b1000), ehT0Px3KOsy9(chr(1699 - 1651) + '\157' + chr(0b110011) + chr(400 - 346) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(0b101000 + 0o107) + chr(0b1111 + 0o44) + chr(0b10101 + 0o40) + chr(0b110111), 8), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\061' + chr(51) + '\x35', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(2395 - 2284) + chr(0b110011) + chr(484 - 429) + '\x35', 38257 - 38249), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1005 - 955) + chr(50), 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(2243 - 2195) + '\157' + chr(53) + chr(343 - 295), 14278 - 14270)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'3'), chr(0b1100100) + chr(0b1100101) + chr(9311 - 9212) + chr(111) + chr(100) + chr(0b1100101))(chr(117) + chr(116) + chr(0b1100110) + chr(45) + chr(0b100111 + 0o21)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def JYNUtMDgXuGL(oVre8I6UXc3b): with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'k\xc1a\x10\xd9\x9e\xf0!\x9aa\x15{\x9a\xbd'), chr(0b1100100) + chr(7350 - 7249) + chr(0b1100011) + '\157' + chr(6264 - 6164) + chr(1540 - 1439))(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + '\055' + chr(1527 - 1471)))(xafqLlk3kkUe(SXOLrMavuUCe(b't\xcez\r'), '\x64' + chr(0b110001 + 0o64) + '\x63' + '\157' + chr(2128 - 2028) + chr(0b1100101))(chr(0b111101 + 0o70) + chr(116) + chr(102) + chr(0b101100 + 0o1) + chr(0b110000 + 0o10))): OeWW0F1dBPRQ = oVre8I6UXc3b._conv(xafqLlk3kkUe(SXOLrMavuUCe(b't\xcez\r\xe7\x9f\xf3*\xb3'), '\144' + '\x65' + chr(1820 - 1721) + '\157' + chr(946 - 846) + chr(0b1011100 + 0o11))(chr(0b1010011 + 0o42) + chr(0b1110100) + chr(0b1100110) + chr(1187 - 1142) + chr(56)), oVre8I6UXc3b._images, ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110011), 8), ehT0Px3KOsy9('\x30' + chr(0b110100 + 0o73) + '\062' + chr(0b110000), 0o10), oVre8I6UXc3b._stride_arr(ehT0Px3KOsy9('\x30' + chr(0b1011110 + 0o21) + chr(712 - 663), 3370 - 3362))) r8knJmMTTKwv = [ehT0Px3KOsy9('\060' + chr(111) + chr(49), 8), ehT0Px3KOsy9('\060' + chr(0b1001100 + 0o43) + chr(0b11110 + 0o24), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\062', 8)] ezWGGOQisCmj = [ehT0Px3KOsy9('\060' + chr(111) + chr(49), 8), ehT0Px3KOsy9('\060' + chr(2574 - 2463) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(1471 - 1423) + '\157' + chr(48), 8)] if xafqLlk3kkUe(oVre8I6UXc3b.hps, xafqLlk3kkUe(SXOLrMavuUCe(b'h\xd3v&\xda\x93\xe80\xa9w\x18q\x89\xb3'), '\x64' + chr(1615 - 1514) + '\x63' + chr(0b1011001 + 0o26) + chr(5468 - 5368) + chr(0b1010010 + 0o23))('\x75' + '\164' + chr(8870 - 8768) + chr(45) + chr(1124 - 1068))): PanDEKvgAY0X = oVre8I6UXc3b._bottleneck_residual MErh319F3bgE = [ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(0b1101111) + '\062' + chr(409 - 361), 8), ehT0Px3KOsy9(chr(48) + '\157' + chr(1215 - 1166) + '\060' + '\x30', 58084 - 58076), ehT0Px3KOsy9('\x30' + '\x6f' + '\062' + chr(0b1111 + 0o41) + chr(2007 - 1959), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\064' + '\060' + '\x30', 0o10)] else: PanDEKvgAY0X = oVre8I6UXc3b._residual MErh319F3bgE = [ehT0Px3KOsy9(chr(0b110000) + chr(162 - 51) + '\x32' + '\x30', 8), ehT0Px3KOsy9('\060' + '\157' + '\062' + chr(1823 - 1775), 8), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(11525 - 11414) + '\064' + '\x30', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(10678 - 10567) + chr(0b110001) + chr(476 - 428) + chr(48), 8)] with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'k\xc1a\x10\xd9\x9e\xf0!\x9aa\x15{\x9a\xbd'), chr(0b110110 + 0o56) + '\145' + chr(0b1010 + 0o131) + chr(111) + '\144' + chr(0b1110 + 0o127))(chr(0b1110101) + chr(116) + '\x66' + chr(0b101 + 0o50) + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'h\xcez\r\xe7\xcd\xc3t'), chr(6127 - 6027) + '\145' + '\143' + chr(111) + '\144' + chr(101))(chr(11811 - 11694) + chr(116) + chr(5127 - 5025) + chr(822 - 777) + '\070')): OeWW0F1dBPRQ = PanDEKvgAY0X(OeWW0F1dBPRQ, MErh319F3bgE[ehT0Px3KOsy9(chr(0b110000) + chr(1950 - 1839) + chr(48), 8)], MErh319F3bgE[ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110001), 8)], oVre8I6UXc3b._stride_arr(r8knJmMTTKwv[ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(1698 - 1587) + chr(1169 - 1121), 8)]), ezWGGOQisCmj[ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(3149 - 3038) + chr(48), 8)]) for WVxHKyX45z_L in vQr8gNKaIaWE(ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110001), 8), xafqLlk3kkUe(oVre8I6UXc3b.hps, xafqLlk3kkUe(SXOLrMavuUCe(b's\xd5~&\xca\x99\xef-\xa1g\x17x\xb5\xadh^S\x1b'), '\144' + chr(7390 - 7289) + chr(99) + '\x6f' + '\x64' + chr(0b1001 + 0o134))('\x75' + '\164' + chr(0b1100110) + chr(0b1100 + 0o41) + chr(729 - 673)))): with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'k\xc1a\x10\xd9\x9e\xf0!\x9aa\x15{\x9a\xbd'), '\x64' + chr(0b1100101) + chr(0b1100011) + chr(111) + chr(0b1100100) + chr(101))(chr(0b1110101) + chr(0b10001 + 0o143) + '\x66' + chr(0b101101) + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b'h\xcez\r\xe7\xcd\xc3a\xa1'), chr(0b11010 + 0o112) + '\x65' + '\143' + chr(0b110011 + 0o74) + chr(6884 - 6784) + chr(0b1100101))(chr(117) + chr(0b1110100) + '\x66' + chr(1248 - 1203) + '\070') % WVxHKyX45z_L): OeWW0F1dBPRQ = PanDEKvgAY0X(OeWW0F1dBPRQ, MErh319F3bgE[ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110001), 8)], MErh319F3bgE[ehT0Px3KOsy9(chr(125 - 77) + chr(0b10111 + 0o130) + '\x31', 8)], oVre8I6UXc3b._stride_arr(ehT0Px3KOsy9(chr(164 - 116) + '\x6f' + chr(0b110001), 8)), ehT0Px3KOsy9(chr(1973 - 1925) + chr(0b1101111) + chr(48), 8)) with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'k\xc1a\x10\xd9\x9e\xf0!\x9aa\x15{\x9a\xbd'), chr(0b1100100) + chr(0b100001 + 0o104) + chr(99) + chr(10155 - 10044) + chr(0b1100000 + 0o4) + '\x65')('\165' + chr(116) + '\x66' + chr(0b101101) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'h\xcez\r\xe7\xce\xc3t'), chr(100) + chr(0b1100101) + chr(8069 - 7970) + chr(0b1011100 + 0o23) + chr(0b1010111 + 0o15) + '\145')(chr(0b100001 + 0o124) + chr(0b1110010 + 0o2) + '\x66' + '\x2d' + chr(0b111000))): OeWW0F1dBPRQ = PanDEKvgAY0X(OeWW0F1dBPRQ, MErh319F3bgE[ehT0Px3KOsy9(chr(1425 - 1377) + chr(111) + '\x31', 8)], MErh319F3bgE[ehT0Px3KOsy9('\x30' + chr(8126 - 8015) + chr(945 - 895), 8)], oVre8I6UXc3b._stride_arr(r8knJmMTTKwv[ehT0Px3KOsy9(chr(48) + chr(0b1010111 + 0o30) + '\061', 8)]), ezWGGOQisCmj[ehT0Px3KOsy9('\x30' + '\157' + chr(49), 8)]) for WVxHKyX45z_L in vQr8gNKaIaWE(ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110001), 8), xafqLlk3kkUe(oVre8I6UXc3b.hps, xafqLlk3kkUe(SXOLrMavuUCe(b's\xd5~&\xca\x99\xef-\xa1g\x17x\xb5\xadh^S\x1b'), '\x64' + chr(101) + '\143' + chr(111) + chr(100) + '\x65')(chr(0b1001111 + 0o46) + '\164' + chr(0b1100110) + chr(0b10101 + 0o30) + chr(1104 - 1048)))): with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'k\xc1a\x10\xd9\x9e\xf0!\x9aa\x15{\x9a\xbd'), '\144' + chr(101) + chr(99) + chr(111) + chr(100) + chr(0b1011011 + 0o12))('\x75' + chr(116) + '\146' + chr(924 - 879) + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'h\xcez\r\xe7\xce\xc3a\xa1'), chr(100) + chr(101) + '\x63' + chr(111) + '\144' + chr(0b100100 + 0o101))(chr(0b110000 + 0o105) + chr(0b1101001 + 0o13) + chr(0b1100110) + chr(45) + '\x38') % WVxHKyX45z_L): OeWW0F1dBPRQ = PanDEKvgAY0X(OeWW0F1dBPRQ, MErh319F3bgE[ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\062', 8)], MErh319F3bgE[ehT0Px3KOsy9(chr(48) + '\157' + '\x32', 8)], oVre8I6UXc3b._stride_arr(ehT0Px3KOsy9(chr(550 - 502) + chr(111) + '\061', 8)), ehT0Px3KOsy9('\x30' + '\157' + chr(48), 8)) with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'k\xc1a\x10\xd9\x9e\xf0!\x9aa\x15{\x9a\xbd'), '\144' + chr(0b1100010 + 0o3) + chr(0b111001 + 0o52) + chr(0b1101111) + chr(0b10111 + 0o115) + chr(0b1100101))(chr(0b111 + 0o156) + chr(0b100011 + 0o121) + chr(102) + chr(0b1101 + 0o40) + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b'h\xcez\r\xe7\xcf\xc3t'), '\144' + '\145' + '\143' + chr(4203 - 4092) + chr(100) + '\x65')(chr(0b1110101) + '\x74' + '\x66' + '\x2d' + chr(0b10011 + 0o45))): OeWW0F1dBPRQ = PanDEKvgAY0X(OeWW0F1dBPRQ, MErh319F3bgE[ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(0b1101111) + chr(0b110010), 8)], MErh319F3bgE[ehT0Px3KOsy9('\x30' + chr(111) + chr(971 - 920), 8)], oVre8I6UXc3b._stride_arr(r8knJmMTTKwv[ehT0Px3KOsy9('\x30' + '\157' + chr(0b110010), 8)]), ezWGGOQisCmj[ehT0Px3KOsy9('\060' + chr(111) + '\x32', 8)]) for WVxHKyX45z_L in vQr8gNKaIaWE(ehT0Px3KOsy9(chr(0b100011 + 0o15) + '\x6f' + chr(1759 - 1710), 8), xafqLlk3kkUe(oVre8I6UXc3b.hps, xafqLlk3kkUe(SXOLrMavuUCe(b's\xd5~&\xca\x99\xef-\xa1g\x17x\xb5\xadh^S\x1b'), '\x64' + '\x65' + '\x63' + '\157' + chr(0b1011100 + 0o10) + chr(0b1011000 + 0o15))(chr(3242 - 3125) + '\164' + chr(102) + chr(0b101101) + chr(0b101101 + 0o13)))): with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'k\xc1a\x10\xd9\x9e\xf0!\x9aa\x15{\x9a\xbd'), chr(0b1100100) + chr(101) + '\x63' + '\157' + '\144' + chr(8387 - 8286))(chr(117) + '\164' + '\x66' + chr(792 - 747) + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b'h\xcez\r\xe7\xcf\xc3a\xa1'), chr(7557 - 7457) + chr(0b101111 + 0o66) + chr(0b1100011) + chr(3518 - 3407) + chr(100) + chr(101))(chr(0b100001 + 0o124) + chr(116) + chr(7315 - 7213) + chr(960 - 915) + chr(2861 - 2805)) % WVxHKyX45z_L): OeWW0F1dBPRQ = PanDEKvgAY0X(OeWW0F1dBPRQ, MErh319F3bgE[ehT0Px3KOsy9(chr(0b110000) + chr(1536 - 1425) + chr(51), 8)], MErh319F3bgE[ehT0Px3KOsy9(chr(1905 - 1857) + '\x6f' + '\063', 8)], oVre8I6UXc3b._stride_arr(ehT0Px3KOsy9(chr(698 - 650) + chr(8265 - 8154) + chr(2226 - 2177), 8)), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b101101 + 0o3), 8)) with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'k\xc1a\x10\xd9\x9e\xf0!\x9aa\x15{\x9a\xbd'), chr(0b1010011 + 0o21) + '\x65' + chr(9420 - 9321) + chr(111) + '\x64' + '\145')(chr(0b1110101) + chr(11755 - 11639) + chr(8546 - 8444) + chr(45) + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'h\xcez\r\xe7\x90\xfd7\xb1'), '\x64' + chr(0b11100 + 0o111) + chr(0b111101 + 0o46) + chr(0b1101111) + chr(0b1011100 + 0o10) + chr(9584 - 9483))(chr(5492 - 5375) + chr(0b1110100) + chr(0b11111 + 0o107) + chr(1066 - 1021) + '\070')): OeWW0F1dBPRQ = oVre8I6UXc3b._batch_norm(xafqLlk3kkUe(SXOLrMavuUCe(b'{\xc9}\x18\xd4\xa3\xfe*'), chr(9972 - 9872) + chr(4132 - 4031) + '\x63' + chr(1778 - 1667) + chr(100) + chr(4050 - 3949))(chr(0b1100010 + 0o23) + chr(0b1100011 + 0o21) + chr(102) + chr(0b101101) + '\070'), OeWW0F1dBPRQ) OeWW0F1dBPRQ = oVre8I6UXc3b._relu(OeWW0F1dBPRQ, oVre8I6UXc3b.hps.relu_leakiness) OeWW0F1dBPRQ = oVre8I6UXc3b._global_avg_pool(OeWW0F1dBPRQ) with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'k\xc1a\x10\xd9\x9e\xf0!\x9aa\x15{\x9a\xbd'), '\144' + chr(0b1001010 + 0o33) + chr(2360 - 2261) + chr(0b111000 + 0o67) + chr(100) + chr(101))(chr(0b1110101) + '\164' + '\146' + chr(0b101101) + chr(2094 - 2038)))(xafqLlk3kkUe(SXOLrMavuUCe(b'q\xcft\x10\xcc'), chr(0b1100100) + '\x65' + chr(0b1100011) + chr(0b1101111) + chr(100) + chr(101))('\165' + '\x74' + '\x66' + chr(0b100010 + 0o13) + chr(2797 - 2741))): wF9nmvjsKjYM = oVre8I6UXc3b._fully_connected(OeWW0F1dBPRQ, oVre8I6UXc3b.hps.i6loyAgxUM2t) oVre8I6UXc3b.qIQi_VFCIFZL = IDJ2eXGCBCDu.nn.softmax(wF9nmvjsKjYM) with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'k\xc1a\x10\xd9\x9e\xf0!\x9aa\x15{\x9a\xbd'), chr(0b1100100) + chr(101) + '\x63' + chr(111) + chr(0b1100100) + chr(10121 - 10020))(chr(117) + chr(0b1110100) + '\146' + chr(45) + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'~\xcf`\r\xcb'), '\144' + '\x65' + chr(99) + '\x6f' + '\144' + chr(0b1100101))(chr(0b1011011 + 0o32) + '\x74' + chr(102) + chr(649 - 604) + '\070')): _YHpmhjj_eGR = IDJ2eXGCBCDu.nn.softmax_cross_entropy_with_logits(logits=wF9nmvjsKjYM, labels=oVre8I6UXc3b.uXMK81tmdpTM) oVre8I6UXc3b.DtzBTLITzDMA = IDJ2eXGCBCDu.reduce_mean(_YHpmhjj_eGR, name=xafqLlk3kkUe(SXOLrMavuUCe(b'e\xc5}\r'), chr(3989 - 3889) + chr(101) + '\143' + '\157' + chr(0b1100100) + chr(0b1100101))(chr(0b1010001 + 0o44) + chr(116) + chr(0b111111 + 0o47) + '\055' + '\070')) oVre8I6UXc3b.DtzBTLITzDMA += oVre8I6UXc3b._decay() if xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'p\xcfw\x1c'), chr(1835 - 1735) + chr(0b1100101) + '\143' + chr(0b1101111) + '\144' + chr(0b100011 + 0o102))(chr(0b1000000 + 0o65) + chr(0b1110100) + chr(0b1100110) + chr(1249 - 1204) + chr(2457 - 2401))) == xafqLlk3kkUe(SXOLrMavuUCe(b'x\xd6r\x15'), '\144' + chr(9321 - 9220) + '\x63' + chr(111) + chr(100) + chr(0b100000 + 0o105))('\165' + chr(4413 - 4297) + chr(0b1100110) + chr(0b101101) + '\070'): xafqLlk3kkUe(IDJ2eXGCBCDu.summary, xafqLlk3kkUe(SXOLrMavuUCe(b'n\xc3r\x15\xd9\x8e'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + '\144' + '\x65')(chr(0b1110101) + chr(0b1110100) + '\x66' + chr(45) + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'~\xcf`\r'), chr(0b1100100) + chr(0b111 + 0o136) + chr(5479 - 5380) + chr(398 - 287) + chr(0b1000011 + 0o41) + '\145')(chr(0b1011001 + 0o34) + '\x74' + chr(4912 - 4810) + chr(61 - 16) + chr(1755 - 1699)), xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'Y\xd4i;\xec\xb0\xd5\x10\xbfV;U'), '\144' + '\145' + chr(99) + chr(111) + '\x64' + '\145')('\165' + chr(0b1010111 + 0o35) + chr(943 - 841) + chr(0b101101) + chr(0b111000))))
ray-project/ray
examples/resnet/resnet_model.py
ResNet._build_train_op
def _build_train_op(self): """Build training specific ops for the graph.""" num_gpus = self.hps.num_gpus if self.hps.num_gpus != 0 else 1 # The learning rate schedule is dependent on the number of gpus. boundaries = [int(20000 * i / np.sqrt(num_gpus)) for i in range(2, 5)] values = [0.1, 0.01, 0.001, 0.0001] self.lrn_rate = tf.train.piecewise_constant(self.global_step, boundaries, values) tf.summary.scalar("learning rate", self.lrn_rate) if self.hps.optimizer == "sgd": optimizer = tf.train.GradientDescentOptimizer(self.lrn_rate) elif self.hps.optimizer == "mom": optimizer = tf.train.MomentumOptimizer(self.lrn_rate, 0.9) apply_op = optimizer.minimize(self.cost, global_step=self.global_step) train_ops = [apply_op] + self._extra_train_ops self.train_op = tf.group(*train_ops) self.variables = ray.experimental.tf_utils.TensorFlowVariables( self.train_op)
python
def _build_train_op(self): """Build training specific ops for the graph.""" num_gpus = self.hps.num_gpus if self.hps.num_gpus != 0 else 1 # The learning rate schedule is dependent on the number of gpus. boundaries = [int(20000 * i / np.sqrt(num_gpus)) for i in range(2, 5)] values = [0.1, 0.01, 0.001, 0.0001] self.lrn_rate = tf.train.piecewise_constant(self.global_step, boundaries, values) tf.summary.scalar("learning rate", self.lrn_rate) if self.hps.optimizer == "sgd": optimizer = tf.train.GradientDescentOptimizer(self.lrn_rate) elif self.hps.optimizer == "mom": optimizer = tf.train.MomentumOptimizer(self.lrn_rate, 0.9) apply_op = optimizer.minimize(self.cost, global_step=self.global_step) train_ops = [apply_op] + self._extra_train_ops self.train_op = tf.group(*train_ops) self.variables = ray.experimental.tf_utils.TensorFlowVariables( self.train_op)
[ "def", "_build_train_op", "(", "self", ")", ":", "num_gpus", "=", "self", ".", "hps", ".", "num_gpus", "if", "self", ".", "hps", ".", "num_gpus", "!=", "0", "else", "1", "# The learning rate schedule is dependent on the number of gpus.", "boundaries", "=", "[", "int", "(", "20000", "*", "i", "/", "np", ".", "sqrt", "(", "num_gpus", ")", ")", "for", "i", "in", "range", "(", "2", ",", "5", ")", "]", "values", "=", "[", "0.1", ",", "0.01", ",", "0.001", ",", "0.0001", "]", "self", ".", "lrn_rate", "=", "tf", ".", "train", ".", "piecewise_constant", "(", "self", ".", "global_step", ",", "boundaries", ",", "values", ")", "tf", ".", "summary", ".", "scalar", "(", "\"learning rate\"", ",", "self", ".", "lrn_rate", ")", "if", "self", ".", "hps", ".", "optimizer", "==", "\"sgd\"", ":", "optimizer", "=", "tf", ".", "train", ".", "GradientDescentOptimizer", "(", "self", ".", "lrn_rate", ")", "elif", "self", ".", "hps", ".", "optimizer", "==", "\"mom\"", ":", "optimizer", "=", "tf", ".", "train", ".", "MomentumOptimizer", "(", "self", ".", "lrn_rate", ",", "0.9", ")", "apply_op", "=", "optimizer", ".", "minimize", "(", "self", ".", "cost", ",", "global_step", "=", "self", ".", "global_step", ")", "train_ops", "=", "[", "apply_op", "]", "+", "self", ".", "_extra_train_ops", "self", ".", "train_op", "=", "tf", ".", "group", "(", "*", "train_ops", ")", "self", ".", "variables", "=", "ray", ".", "experimental", ".", "tf_utils", ".", "TensorFlowVariables", "(", "self", ".", "train_op", ")" ]
Build training specific ops for the graph.
[ "Build", "training", "specific", "ops", "for", "the", "graph", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/examples/resnet/resnet_model.py#L122-L141
train
Build training specific ops for the graph.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TT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rp8,tzcpInYwBvYW,iDQ_gSK8V7h0,Rurm1zTRfSmY,reqGiMiVQ77y,bsS9P6_LpdIe,sbGAZlkZOtyh,Cf_Qef15s3_F,eX02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b10000 + 0o42) + '\062' + chr(54), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x31' + chr(50) + '\061', 10902 - 10894), ehT0Px3KOsy9(chr(48) + '\157' + '\x35' + chr(49), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(9498 - 9387) + chr(53) + chr(0b100010 + 0o24), ord("\x08")), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(0b1101111) + chr(51) + '\066' + chr(0b1100 + 0o50), 24233 - 24225), ehT0Px3KOsy9('\x30' + chr(111) + '\x33' + chr(0b110011) + chr(51), 20065 - 20057), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(111) + chr(50) + '\061' + chr(55), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\062' + chr(0b1 + 0o57) + chr(0b1001 + 0o56), ord("\x08")), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(111) + '\x33' + chr(0b110010 + 0o3) + '\066', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1100111 + 0o10) + '\062' + chr(53) + '\065', ord("\x08")), ehT0Px3KOsy9(chr(0b100011 + 0o15) + '\x6f' + chr(0b100010 + 0o20) + chr(0b110101) + chr(60 - 9), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + '\x32' + '\064' + chr(49), 0o10), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(3663 - 3552) + chr(0b101100 + 0o6) + chr(206 - 156) + '\065', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(2093 - 1982) + chr(0b1101 + 0o44) + chr(53) + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\061' + chr(49) + chr(297 - 242), 0o10), ehT0Px3KOsy9(chr(0b101100 + 0o4) + '\157' + '\062' + chr(0b110000) + '\065', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\x33' + '\060' + chr(0b101010 + 0o13), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(12180 - 12069) + '\x33' + chr(1138 - 1084) + chr(2291 - 2238), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001) + '\064' + chr(0b101001 + 0o16), 0o10), ehT0Px3KOsy9('\060' + chr(979 - 868) + chr(0b100110 + 0o13) + '\x31' + chr(51), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\x31' + chr(0b110100) + '\x33', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x31' + '\x33' + chr(0b100110 + 0o14), 14728 - 14720), ehT0Px3KOsy9('\060' + chr(3075 - 2964) + chr(0b110001) + chr(1258 - 1208) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b110011 + 0o74) + chr(795 - 744) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110001) + '\x30' + chr(0b110000), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(0b101010 + 0o11) + chr(0b1000 + 0o53) + '\063', 8), ehT0Px3KOsy9(chr(48) + chr(111) + '\061' + chr(0b1101 + 0o52) + chr(0b110001 + 0o1), ord("\x08")), ehT0Px3KOsy9(chr(0b10000 + 0o40) + '\157' + chr(0b110010) + '\x36', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x31' + '\062' + '\067', 0o10), ehT0Px3KOsy9(chr(48) + chr(2431 - 2320) + '\x33' + chr(0b110001) + chr(0b110100), 63257 - 63249), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(9996 - 9885) + '\062' + '\x31' + chr(55), 8), ehT0Px3KOsy9(chr(0b1100 + 0o44) + chr(111) + '\x32' + chr(0b110000), 52641 - 52633), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\062' + chr(52) + '\x33', 0o10), ehT0Px3KOsy9(chr(0b101010 + 0o6) + '\x6f' + chr(49) + chr(2904 - 2849) + chr(50), 8), ehT0Px3KOsy9('\x30' + chr(111) + '\067', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(5516 - 5405) + '\x31' + chr(49) + '\x32', 5974 - 5966), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x36' + chr(0b10110 + 0o33), 15450 - 15442), ehT0Px3KOsy9(chr(276 - 228) + chr(111) + '\x32' + chr(0b110011 + 0o0) + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(0b1110 + 0o42) + '\x6f' + chr(0b10101 + 0o35) + chr(0b10011 + 0o41) + chr(55), 49473 - 49465), ehT0Px3KOsy9('\x30' + '\x6f' + chr(2082 - 2031) + '\x34' + '\x30', 48494 - 48486)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(253 - 205) + chr(0b1101111) + '\065' + '\x30', 14680 - 14672)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xb8'), '\x64' + chr(101) + chr(99) + '\x6f' + chr(0b1100100) + chr(2403 - 2302))(chr(0b101000 + 0o115) + chr(0b1110100) + chr(1982 - 1880) + chr(620 - 575) + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def QRXVrR7eUpN9(oVre8I6UXc3b): zcNH1ym8cZBx = oVre8I6UXc3b.hps.num_gpus if oVre8I6UXc3b.hps.num_gpus != ehT0Px3KOsy9(chr(0b110000) + chr(5207 - 5096) + chr(48), 0o10) else ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b101011 + 0o6), ord("\x08")) n7rrZRZYkBNq = [ehT0Px3KOsy9(ehT0Px3KOsy9(chr(48) + '\x6f' + '\x34' + chr(0b10101 + 0o42) + chr(0b1100 + 0o44) + chr(0b110100) + '\060', ord("\x08")) * WVxHKyX45z_L / WqUC3KWvYVup.sqrt(zcNH1ym8cZBx)) for WVxHKyX45z_L in vQr8gNKaIaWE(ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(0b10101 + 0o132) + chr(1486 - 1436), 2857 - 2849), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110101), 0o10))] SPnCNu54H1db = [0.1, 0.01, 0.001, 0.0001] oVre8I6UXc3b.DYtRZH9o7N1l = IDJ2eXGCBCDu.train.piecewise_constant(oVre8I6UXc3b.tnqEWmPx71Oj, n7rrZRZYkBNq, SPnCNu54H1db) xafqLlk3kkUe(IDJ2eXGCBCDu.summary, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe52HB\x95\xa9'), '\x64' + chr(0b10000 + 0o125) + chr(0b1100011) + chr(10413 - 10302) + chr(0b1100100) + chr(101))(chr(117) + chr(12743 - 12627) + chr(102) + '\x2d' + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xfa4H\\\x9a\xb2\xe1\xe0\xce\xdf\xca\xd5\xf0'), '\x64' + chr(101) + chr(0b1011010 + 0o11) + chr(0b1110 + 0o141) + '\144' + '\x65')('\x75' + chr(13402 - 13286) + chr(6235 - 6133) + chr(45) + chr(0b10000 + 0o50)), xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd2\x08]|\xae\x93\xb6\xe8\xd9\xe3\x9a\xcd'), '\x64' + '\145' + '\x63' + chr(0b1101111) + chr(3852 - 3752) + '\x65')(chr(117) + chr(0b10100 + 0o140) + '\146' + '\x2d' + '\070'))) if xafqLlk3kkUe(oVre8I6UXc3b.hps, xafqLlk3kkUe(SXOLrMavuUCe(b'\xce5b`\x97\x82\xdd\xc8\x8c\xfd\xe0\x92'), chr(100) + chr(0b1100101) + chr(0b1100011) + chr(0b1101011 + 0o4) + chr(100) + '\145')(chr(0b111100 + 0o71) + chr(5454 - 5338) + '\x66' + '\055' + chr(56))) == xafqLlk3kkUe(SXOLrMavuUCe(b'\xe56M'), '\144' + chr(0b1100101) + '\143' + chr(0b1001011 + 0o44) + chr(0b1100100) + chr(0b1010111 + 0o16))(chr(0b10100 + 0o141) + chr(116) + chr(981 - 879) + chr(0b101101) + chr(283 - 227)): XdKNcYRObPK3 = IDJ2eXGCBCDu.train.GradientDescentOptimizer(oVre8I6UXc3b.DYtRZH9o7N1l) elif xafqLlk3kkUe(oVre8I6UXc3b.hps, xafqLlk3kkUe(SXOLrMavuUCe(b'\xce5b`\x97\x82\xdd\xc8\x8c\xfd\xe0\x92'), '\x64' + chr(0b101001 + 0o74) + chr(9396 - 9297) + chr(111) + chr(1843 - 1743) + '\145')('\165' + '\164' + chr(102) + chr(1905 - 1860) + '\070')) == xafqLlk3kkUe(SXOLrMavuUCe(b'\xfb>D'), chr(0b1100100) + chr(4624 - 4523) + '\143' + chr(804 - 693) + '\144' + chr(0b111010 + 0o53))(chr(0b1110101) + chr(12795 - 12679) + chr(0b1100110) + '\055' + '\x38'): XdKNcYRObPK3 = IDJ2eXGCBCDu.train.MomentumOptimizer(oVre8I6UXc3b.DYtRZH9o7N1l, 0.9) vcRN5II6eh5x = XdKNcYRObPK3.minimize(oVre8I6UXc3b.DtzBTLITzDMA, global_step=oVre8I6UXc3b.tnqEWmPx71Oj) s_7ZYBG8plS4 = [vcRN5II6eh5x] + oVre8I6UXc3b._extra_train_ops oVre8I6UXc3b._sRzZqw7qhHl = IDJ2eXGCBCDu.N9UnmYvaW1pO(*s_7ZYBG8plS4) oVre8I6UXc3b.DaDu8eJMPmzT = H9zaXRrGK6Cq.experimental.tf_utils.TensorFlowVariables(oVre8I6UXc3b._sRzZqw7qhHl)
ray-project/ray
examples/resnet/resnet_model.py
ResNet._batch_norm
def _batch_norm(self, name, x): """Batch normalization.""" with tf.variable_scope(name): params_shape = [x.get_shape()[-1]] beta = tf.get_variable( "beta", params_shape, tf.float32, initializer=tf.constant_initializer(0.0, tf.float32)) gamma = tf.get_variable( "gamma", params_shape, tf.float32, initializer=tf.constant_initializer(1.0, tf.float32)) if self.mode == "train": mean, variance = tf.nn.moments(x, [0, 1, 2], name="moments") moving_mean = tf.get_variable( "moving_mean", params_shape, tf.float32, initializer=tf.constant_initializer(0.0, tf.float32), trainable=False) moving_variance = tf.get_variable( "moving_variance", params_shape, tf.float32, initializer=tf.constant_initializer(1.0, tf.float32), trainable=False) self._extra_train_ops.append( moving_averages.assign_moving_average( moving_mean, mean, 0.9)) self._extra_train_ops.append( moving_averages.assign_moving_average( moving_variance, variance, 0.9)) else: mean = tf.get_variable( "moving_mean", params_shape, tf.float32, initializer=tf.constant_initializer(0.0, tf.float32), trainable=False) variance = tf.get_variable( "moving_variance", params_shape, tf.float32, initializer=tf.constant_initializer(1.0, tf.float32), trainable=False) tf.summary.histogram(mean.op.name, mean) tf.summary.histogram(variance.op.name, variance) # elipson used to be 1e-5. Maybe 0.001 solves NaN problem in deeper # net. y = tf.nn.batch_normalization(x, mean, variance, beta, gamma, 0.001) y.set_shape(x.get_shape()) return y
python
def _batch_norm(self, name, x): """Batch normalization.""" with tf.variable_scope(name): params_shape = [x.get_shape()[-1]] beta = tf.get_variable( "beta", params_shape, tf.float32, initializer=tf.constant_initializer(0.0, tf.float32)) gamma = tf.get_variable( "gamma", params_shape, tf.float32, initializer=tf.constant_initializer(1.0, tf.float32)) if self.mode == "train": mean, variance = tf.nn.moments(x, [0, 1, 2], name="moments") moving_mean = tf.get_variable( "moving_mean", params_shape, tf.float32, initializer=tf.constant_initializer(0.0, tf.float32), trainable=False) moving_variance = tf.get_variable( "moving_variance", params_shape, tf.float32, initializer=tf.constant_initializer(1.0, tf.float32), trainable=False) self._extra_train_ops.append( moving_averages.assign_moving_average( moving_mean, mean, 0.9)) self._extra_train_ops.append( moving_averages.assign_moving_average( moving_variance, variance, 0.9)) else: mean = tf.get_variable( "moving_mean", params_shape, tf.float32, initializer=tf.constant_initializer(0.0, tf.float32), trainable=False) variance = tf.get_variable( "moving_variance", params_shape, tf.float32, initializer=tf.constant_initializer(1.0, tf.float32), trainable=False) tf.summary.histogram(mean.op.name, mean) tf.summary.histogram(variance.op.name, variance) # elipson used to be 1e-5. Maybe 0.001 solves NaN problem in deeper # net. y = tf.nn.batch_normalization(x, mean, variance, beta, gamma, 0.001) y.set_shape(x.get_shape()) return y
[ "def", "_batch_norm", "(", "self", ",", "name", ",", "x", ")", ":", "with", "tf", ".", "variable_scope", "(", "name", ")", ":", "params_shape", "=", "[", "x", ".", "get_shape", "(", ")", "[", "-", "1", "]", "]", "beta", "=", "tf", ".", "get_variable", "(", "\"beta\"", ",", "params_shape", ",", "tf", ".", "float32", ",", "initializer", "=", "tf", ".", "constant_initializer", "(", "0.0", ",", "tf", ".", "float32", ")", ")", "gamma", "=", "tf", ".", "get_variable", "(", "\"gamma\"", ",", "params_shape", ",", "tf", ".", "float32", ",", "initializer", "=", "tf", ".", "constant_initializer", "(", "1.0", ",", "tf", ".", "float32", ")", ")", "if", "self", ".", "mode", "==", "\"train\"", ":", "mean", ",", "variance", "=", "tf", ".", "nn", ".", "moments", "(", "x", ",", "[", "0", ",", "1", ",", "2", "]", ",", "name", "=", "\"moments\"", ")", "moving_mean", "=", "tf", ".", "get_variable", "(", "\"moving_mean\"", ",", "params_shape", ",", "tf", ".", "float32", ",", "initializer", "=", "tf", ".", "constant_initializer", "(", "0.0", ",", "tf", ".", "float32", ")", ",", "trainable", "=", "False", ")", "moving_variance", "=", "tf", ".", "get_variable", "(", "\"moving_variance\"", ",", "params_shape", ",", "tf", ".", "float32", ",", "initializer", "=", "tf", ".", "constant_initializer", "(", "1.0", ",", "tf", ".", "float32", ")", ",", "trainable", "=", "False", ")", "self", ".", "_extra_train_ops", ".", "append", "(", "moving_averages", ".", "assign_moving_average", "(", "moving_mean", ",", "mean", ",", "0.9", ")", ")", "self", ".", "_extra_train_ops", ".", "append", "(", "moving_averages", ".", "assign_moving_average", "(", "moving_variance", ",", "variance", ",", "0.9", ")", ")", "else", ":", "mean", "=", "tf", ".", "get_variable", "(", "\"moving_mean\"", ",", "params_shape", ",", "tf", ".", "float32", ",", "initializer", "=", "tf", ".", "constant_initializer", "(", "0.0", ",", "tf", ".", "float32", ")", ",", "trainable", "=", "False", ")", "variance", "=", "tf", ".", "get_variable", "(", "\"moving_variance\"", ",", "params_shape", ",", "tf", ".", "float32", ",", "initializer", "=", "tf", ".", "constant_initializer", "(", "1.0", ",", "tf", ".", "float32", ")", ",", "trainable", "=", "False", ")", "tf", ".", "summary", ".", "histogram", "(", "mean", ".", "op", ".", "name", ",", "mean", ")", "tf", ".", "summary", ".", "histogram", "(", "variance", ".", "op", ".", "name", ",", "variance", ")", "# elipson used to be 1e-5. Maybe 0.001 solves NaN problem in deeper", "# net.", "y", "=", "tf", ".", "nn", ".", "batch_normalization", "(", "x", ",", "mean", ",", "variance", ",", "beta", ",", "gamma", ",", "0.001", ")", "y", ".", "set_shape", "(", "x", ".", "get_shape", "(", ")", ")", "return", "y" ]
Batch normalization.
[ "Batch", "normalization", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/examples/resnet/resnet_model.py#L143-L201
train
Batch normalization.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,p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UzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b110000) + chr(0b1100011 + 0o14) + chr(0b110010) + chr(0b110011) + chr(1233 - 1183), 37329 - 37321), ehT0Px3KOsy9(chr(48) + chr(7136 - 7025) + '\x33' + '\x35' + chr(1291 - 1238), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1100101 + 0o12) + chr(50) + chr(54) + chr(716 - 667), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(51) + chr(50) + chr(1415 - 1364), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1000111 + 0o50) + chr(49) + chr(51) + '\061', 17009 - 17001), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(1091 - 1040) + '\x32' + chr(0b110100), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(1885 - 1836) + chr(303 - 249), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(49) + '\x34' + chr(0b101110 + 0o10), 5191 - 5183), ehT0Px3KOsy9(chr(1108 - 1060) + chr(3156 - 3045) + '\x32' + chr(0b10101 + 0o36) + chr(1195 - 1147), 0b1000), ehT0Px3KOsy9('\060' + chr(6774 - 6663) + chr(0b11111 + 0o24) + '\x31' + '\063', ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + '\061' + '\064' + '\x32', 0b1000), ehT0Px3KOsy9(chr(0b101011 + 0o5) + chr(0b1101111) + '\063' + '\x30' + chr(54), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x33' + chr(52) + '\067', ord("\x08")), ehT0Px3KOsy9(chr(0b101000 + 0o10) + '\x6f' + chr(0b1000 + 0o51) + '\x34' + '\061', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(49) + chr(2585 - 2534) + '\x34', 28648 - 28640), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(1735 - 1685) + chr(0b11111 + 0o22) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(0b11000 + 0o30) + '\157' + '\062' + chr(0b11111 + 0o27) + '\x36', 0b1000), ehT0Px3KOsy9(chr(0b100110 + 0o12) + '\x6f' + chr(0b110010 + 0o0) + chr(2373 - 2318) + chr(55), 53653 - 53645), ehT0Px3KOsy9(chr(48) + chr(6596 - 6485) + '\061' + chr(0b10110 + 0o35) + '\066', 0o10), ehT0Px3KOsy9(chr(0b100011 + 0o15) + '\x6f' + chr(1671 - 1620) + chr(48) + chr(49), 62423 - 62415), ehT0Px3KOsy9(chr(2085 - 2037) + chr(1285 - 1174) + '\x33' + chr(0b110101) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011110 + 0o21) + '\x33' + '\060', 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(51) + chr(0b110001) + chr(51), 8), ehT0Px3KOsy9(chr(2209 - 2161) + chr(0b1010100 + 0o33) + '\x33' + '\060' + chr(48), 11582 - 11574), ehT0Px3KOsy9(chr(48) + '\157' + '\061' + chr(489 - 439), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(2241 - 2191) + '\067' + chr(55), 8), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(0b1001101 + 0o42) + chr(49) + '\x36' + chr(0b11010 + 0o31), 56632 - 56624), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110001 + 0o0) + chr(2007 - 1959), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(51) + chr(0b110110) + chr(0b110111), 57580 - 57572), ehT0Px3KOsy9('\x30' + '\x6f' + '\x32' + chr(50) + chr(51), 0o10), ehT0Px3KOsy9(chr(48) + chr(658 - 547) + '\x32' + '\063' + chr(55), 0o10), ehT0Px3KOsy9(chr(0b100 + 0o54) + '\x6f' + chr(0b1011 + 0o47) + chr(53), 31147 - 31139), ehT0Px3KOsy9(chr(48) + chr(5707 - 5596) + '\062' + chr(0b110011) + chr(1966 - 1915), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\061' + chr(409 - 359) + chr(0b110111), 35825 - 35817), ehT0Px3KOsy9(chr(48) + chr(111) + '\063' + '\064' + chr(0b100100 + 0o15), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\062' + chr(0b110100), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101110 + 0o1) + chr(778 - 723) + chr(49), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(2007 - 1956) + chr(0b110001) + chr(588 - 539), ord("\x08")), ehT0Px3KOsy9(chr(420 - 372) + '\x6f' + '\x31' + chr(1920 - 1868) + '\061', 8), ehT0Px3KOsy9(chr(325 - 277) + '\157' + chr(0b11000 + 0o31) + chr(0b10110 + 0o33) + chr(2561 - 2508), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\065' + '\060', 40717 - 40709)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xb4'), '\144' + chr(0b10111 + 0o116) + chr(0b1100011) + chr(0b100100 + 0o113) + chr(0b10100 + 0o120) + chr(101))(chr(11979 - 11862) + '\164' + chr(0b1011 + 0o133) + '\x2d' + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def B35fDoS4MKfI(oVre8I6UXc3b, AIvJRzLdDfgF, OeWW0F1dBPRQ): with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\xec\x8c\xc3\xba8\xb6b\x03\xc7\xb8\x01\xa9\x97\x04'), chr(0b1100100) + '\x65' + '\x63' + chr(4919 - 4808) + chr(5111 - 5011) + chr(0b1100101))(chr(0b100100 + 0o121) + '\164' + '\146' + '\055' + chr(0b111000)))(AIvJRzLdDfgF): ienmUVAy9DPy = [OeWW0F1dBPRQ.get_shape()[-ehT0Px3KOsy9(chr(0b110000) + chr(12215 - 12104) + chr(748 - 699), ord("\x08"))]] FjcovgoHM1LG = IDJ2eXGCBCDu.get_variable(xafqLlk3kkUe(SXOLrMavuUCe(b'\xf8\x88\xc5\xb2'), chr(100) + '\x65' + chr(0b110000 + 0o63) + chr(0b1101111) + chr(0b111100 + 0o50) + chr(0b1100101))(chr(2757 - 2640) + '\x74' + '\x66' + chr(0b101101) + '\070'), ienmUVAy9DPy, IDJ2eXGCBCDu.float32, initializer=IDJ2eXGCBCDu.constant_initializer(0.0, IDJ2eXGCBCDu.float32)) nfeH4ZtvQXsW = IDJ2eXGCBCDu.get_variable(xafqLlk3kkUe(SXOLrMavuUCe(b'\xfd\x8c\xdc\xbe8'), chr(0b1000010 + 0o42) + chr(5154 - 5053) + '\x63' + '\157' + chr(2578 - 2478) + '\145')(chr(0b110011 + 0o102) + chr(116) + '\146' + '\x2d' + '\070'), ienmUVAy9DPy, IDJ2eXGCBCDu.float32, initializer=IDJ2eXGCBCDu.constant_initializer(1.0, IDJ2eXGCBCDu.float32)) if xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf7\x82\xd5\xb6'), chr(2993 - 2893) + chr(0b1100101) + chr(724 - 625) + '\157' + chr(0b1100100) + chr(0b110 + 0o137))(chr(117) + chr(0b1110100) + '\x66' + '\x2d' + chr(0b111000))) == xafqLlk3kkUe(SXOLrMavuUCe(b'\xee\x9f\xd0\xba7'), chr(100) + '\x65' + chr(99) + chr(0b1101111) + '\144' + '\x65')(chr(117) + '\x74' + chr(0b1100110) + chr(0b101101) + '\x38'): (aJhItC_Vawlw, nVKbP5sF7181) = IDJ2eXGCBCDu.nn.moments(OeWW0F1dBPRQ, [ehT0Px3KOsy9(chr(48) + chr(0b11111 + 0o120) + chr(1542 - 1494), 0b1000), ehT0Px3KOsy9(chr(0b0 + 0o60) + '\x6f' + '\x31', 8), ehT0Px3KOsy9(chr(2182 - 2134) + chr(0b1101111) + chr(1802 - 1752), ord("\x08"))], name=xafqLlk3kkUe(SXOLrMavuUCe(b'\xf7\x82\xdc\xb67\xa0}'), '\x64' + chr(0b1100101) + chr(8761 - 8662) + chr(7625 - 7514) + '\x64' + chr(0b1011001 + 0o14))(chr(0b1110101) + '\164' + chr(0b1010000 + 0o26) + chr(45) + '\070')) IXBqXKj5IudY = IDJ2eXGCBCDu.get_variable(xafqLlk3kkUe(SXOLrMavuUCe(b'\xf7\x82\xc7\xba7\xb3Q\x0b\xfd\xaa\x0c'), chr(0b10000 + 0o124) + chr(1953 - 1852) + '\x63' + '\x6f' + '\x64' + chr(101))(chr(6102 - 5985) + '\164' + chr(0b1100110) + chr(0b101100 + 0o1) + chr(0b11000 + 0o40)), ienmUVAy9DPy, IDJ2eXGCBCDu.float32, initializer=IDJ2eXGCBCDu.constant_initializer(0.0, IDJ2eXGCBCDu.float32), trainable=ehT0Px3KOsy9(chr(1651 - 1603) + chr(0b1101111) + '\060', 8)) Zkn5Cn6nQpQn = IDJ2eXGCBCDu.get_variable(xafqLlk3kkUe(SXOLrMavuUCe(b'\xf7\x82\xc7\xba7\xb3Q\x10\xf9\xb9\x0b\xa7\x89\x029'), chr(100) + chr(0b1100101) + chr(0b1100011) + chr(4161 - 4050) + chr(100) + chr(0b101 + 0o140))(chr(9665 - 9548) + '\164' + chr(102) + chr(0b101001 + 0o4) + '\070'), ienmUVAy9DPy, IDJ2eXGCBCDu.float32, initializer=IDJ2eXGCBCDu.constant_initializer(1.0, IDJ2eXGCBCDu.float32), trainable=ehT0Px3KOsy9(chr(48) + '\x6f' + '\x30', 8)) xafqLlk3kkUe(oVre8I6UXc3b._extra_train_ops, xafqLlk3kkUe(SXOLrMavuUCe(b'\xfb\x9d\xc1\xb67\xb0'), '\x64' + chr(0b1100101) + chr(0b1100011) + chr(111) + chr(100) + '\145')(chr(0b110110 + 0o77) + chr(9606 - 9490) + chr(102) + chr(45) + chr(0b111000)))(xafqLlk3kkUe(nDgFXrDqtELR, xafqLlk3kkUe(SXOLrMavuUCe(b'\xfb\x9e\xc2\xba>\xbaQ\x0b\xf7\xbd\x0b\xa8\x80>=\xfb\xd3\xcd?\xa6\x8b'), '\144' + '\x65' + chr(0b1100011) + chr(0b1101111) + '\144' + chr(0b101000 + 0o75))(chr(7280 - 7163) + chr(116) + '\146' + chr(0b101101 + 0o0) + chr(506 - 450)))(IXBqXKj5IudY, aJhItC_Vawlw, 0.9)) xafqLlk3kkUe(oVre8I6UXc3b._extra_train_ops, xafqLlk3kkUe(SXOLrMavuUCe(b'\xfb\x9d\xc1\xb67\xb0'), '\144' + chr(0b1100101) + '\143' + chr(0b1010110 + 0o31) + chr(8067 - 7967) + chr(2360 - 2259))(chr(117) + chr(0b10100 + 0o140) + chr(0b11100 + 0o112) + '\055' + chr(475 - 419)))(xafqLlk3kkUe(nDgFXrDqtELR, xafqLlk3kkUe(SXOLrMavuUCe(b'\xfb\x9e\xc2\xba>\xbaQ\x0b\xf7\xbd\x0b\xa8\x80>=\xfb\xd3\xcd?\xa6\x8b'), chr(1698 - 1598) + chr(0b1011101 + 0o10) + '\143' + chr(0b1101111) + '\144' + chr(5014 - 4913))(chr(11301 - 11184) + '\x74' + '\146' + '\055' + '\070'))(Zkn5Cn6nQpQn, nVKbP5sF7181, 0.9)) else: aJhItC_Vawlw = IDJ2eXGCBCDu.get_variable(xafqLlk3kkUe(SXOLrMavuUCe(b'\xf7\x82\xc7\xba7\xb3Q\x0b\xfd\xaa\x0c'), '\144' + '\x65' + chr(0b1100011) + chr(0b1101111) + '\x64' + chr(101))(chr(117) + chr(1739 - 1623) + '\146' + chr(0b101101) + chr(0b110010 + 0o6)), ienmUVAy9DPy, IDJ2eXGCBCDu.float32, initializer=IDJ2eXGCBCDu.constant_initializer(0.0, IDJ2eXGCBCDu.float32), trainable=ehT0Px3KOsy9('\060' + chr(0b1101111) + '\060', 8)) nVKbP5sF7181 = IDJ2eXGCBCDu.get_variable(xafqLlk3kkUe(SXOLrMavuUCe(b'\xf7\x82\xc7\xba7\xb3Q\x10\xf9\xb9\x0b\xa7\x89\x029'), '\144' + chr(0b10000 + 0o125) + chr(9769 - 9670) + chr(0b1101111) + chr(100) + chr(0b11001 + 0o114))(chr(0b1000001 + 0o64) + '\x74' + chr(9079 - 8977) + '\x2d' + chr(0b11001 + 0o37)), ienmUVAy9DPy, IDJ2eXGCBCDu.float32, initializer=IDJ2eXGCBCDu.constant_initializer(1.0, IDJ2eXGCBCDu.float32), trainable=ehT0Px3KOsy9('\060' + chr(0b10 + 0o155) + '\060', 8)) xafqLlk3kkUe(IDJ2eXGCBCDu.summary, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc5\xa9\x85\x89.\xedl\x12\xcd\x9f\x17\x97'), '\144' + chr(5734 - 5633) + chr(99) + chr(0b1101111) + chr(0b101101 + 0o67) + '\145')(chr(159 - 42) + chr(10614 - 10498) + chr(2194 - 2092) + '\x2d' + chr(0b111000)))(xafqLlk3kkUe(aJhItC_Vawlw.op, xafqLlk3kkUe(SXOLrMavuUCe(b'\xdb\xa4\xc7\x99\x0b\xaeB\x02\xdc\xad\x05\x80'), '\144' + chr(0b100011 + 0o102) + chr(99) + chr(925 - 814) + '\144' + chr(101))('\x75' + chr(116) + '\x66' + '\055' + '\x38')), aJhItC_Vawlw) xafqLlk3kkUe(IDJ2eXGCBCDu.summary, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc5\xa9\x85\x89.\xedl\x12\xcd\x9f\x17\x97'), '\144' + chr(101) + chr(403 - 304) + '\157' + chr(0b1100100) + chr(0b1100010 + 0o3))('\x75' + '\164' + '\146' + '\x2d' + chr(186 - 130)))(xafqLlk3kkUe(nVKbP5sF7181.op, xafqLlk3kkUe(SXOLrMavuUCe(b'\xdb\xa4\xc7\x99\x0b\xaeB\x02\xdc\xad\x05\x80'), chr(0b101000 + 0o74) + chr(8086 - 7985) + chr(5928 - 5829) + chr(0b100010 + 0o115) + chr(0b1010000 + 0o24) + chr(101))(chr(117) + chr(0b1011010 + 0o32) + '\146' + '\x2d' + '\070')), nVKbP5sF7181) SqiSOtYOqOJH = IDJ2eXGCBCDu.nn.batch_normalization(OeWW0F1dBPRQ, aJhItC_Vawlw, nVKbP5sF7181, FjcovgoHM1LG, nfeH4ZtvQXsW, 0.001) xafqLlk3kkUe(SqiSOtYOqOJH, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe9\x88\xc5\x8c*\xbco\x16\xfd'), '\144' + chr(0b1100101) + chr(0b1100011) + '\157' + chr(0b1100100) + '\x65')(chr(117) + chr(0b1110100) + chr(6491 - 6389) + chr(0b1011 + 0o42) + '\x38'))(xafqLlk3kkUe(OeWW0F1dBPRQ, xafqLlk3kkUe(SXOLrMavuUCe(b'\xfd\x88\xc5\x8c*\xbco\x16\xfd'), '\x64' + chr(101) + chr(0b10100 + 0o117) + chr(3418 - 3307) + chr(3524 - 3424) + '\145')(chr(10853 - 10736) + chr(8731 - 8615) + chr(6636 - 6534) + chr(469 - 424) + chr(1688 - 1632)))()) return SqiSOtYOqOJH
ray-project/ray
examples/resnet/resnet_model.py
ResNet._decay
def _decay(self): """L2 weight decay loss.""" costs = [] for var in tf.trainable_variables(): if var.op.name.find(r"DW") > 0: costs.append(tf.nn.l2_loss(var)) return tf.multiply(self.hps.weight_decay_rate, tf.add_n(costs))
python
def _decay(self): """L2 weight decay loss.""" costs = [] for var in tf.trainable_variables(): if var.op.name.find(r"DW") > 0: costs.append(tf.nn.l2_loss(var)) return tf.multiply(self.hps.weight_decay_rate, tf.add_n(costs))
[ "def", "_decay", "(", "self", ")", ":", "costs", "=", "[", "]", "for", "var", "in", "tf", ".", "trainable_variables", "(", ")", ":", "if", "var", ".", "op", ".", "name", ".", "find", "(", "r\"DW\"", ")", ">", "0", ":", "costs", ".", "append", "(", "tf", ".", "nn", ".", "l2_loss", "(", "var", ")", ")", "return", "tf", ".", "multiply", "(", "self", ".", "hps", ".", "weight_decay_rate", ",", "tf", ".", "add_n", "(", "costs", ")", ")" ]
L2 weight decay loss.
[ "L2", "weight", "decay", "loss", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/examples/resnet/resnet_model.py#L281-L288
train
L2 weight decay loss.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qq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Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + '\157' + chr(0b1000 + 0o51) + '\x35' + chr(0b101101 + 0o10), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b10111 + 0o130) + chr(1085 - 1034) + '\061' + '\060', ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(51) + chr(0b110000 + 0o4), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(1013 - 963) + chr(2257 - 2203) + '\066', 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(1501 - 1452) + '\063', ord("\x08")), ehT0Px3KOsy9(chr(1181 - 1133) + chr(0b11111 + 0o120) + chr(49) + '\065' + chr(51), 0b1000), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(9015 - 8904) + chr(1832 - 1783) + chr(0b110010) + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(111) + chr(50) + '\x33' + chr(52), 26098 - 26090), ehT0Px3KOsy9('\x30' + chr(0b100 + 0o153) + '\065' + chr(2696 - 2643), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(50) + chr(0b110000) + chr(0b10001 + 0o44), 0b1000), ehT0Px3KOsy9('\060' + chr(0b111010 + 0o65) + chr(51) + '\060' + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(975 - 927) + '\157' + chr(0b110010) + chr(52) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + '\x35' + chr(0b110 + 0o56), 0b1000), ehT0Px3KOsy9(chr(215 - 167) + chr(111) + chr(1026 - 977) + '\x32' + chr(1858 - 1808), 0o10), ehT0Px3KOsy9('\060' + chr(5588 - 5477) + '\x31' + '\060' + '\x34', 0b1000), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(111) + chr(49) + chr(48) + '\062', 56240 - 56232), ehT0Px3KOsy9(chr(1348 - 1300) + chr(111) + chr(0b0 + 0o61) + chr(50) + chr(49), 21098 - 21090), ehT0Px3KOsy9(chr(511 - 463) + chr(111) + chr(0b1111 + 0o46) + '\x33', 0b1000), ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(111) + '\x31' + chr(0b101100 + 0o4) + chr(0b11111 + 0o24), 0o10), ehT0Px3KOsy9(chr(1073 - 1025) + chr(0b1101111) + chr(1797 - 1748) + '\062' + chr(55), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(2494 - 2444) + '\065' + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110011) + chr(0b10000 + 0o44) + chr(0b10011 + 0o35), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b111100 + 0o63) + chr(850 - 799) + '\x36' + chr(1494 - 1446), 385 - 377), ehT0Px3KOsy9(chr(1405 - 1357) + chr(0b101001 + 0o106) + '\x31' + '\065' + '\x36', 44322 - 44314), ehT0Px3KOsy9(chr(790 - 742) + chr(0b1101111) + chr(1188 - 1139) + '\061' + '\x36', 0b1000), ehT0Px3KOsy9(chr(0b1 + 0o57) + '\157' + chr(0b110011) + chr(51) + chr(0b110111), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b1011 + 0o46) + '\x36', 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110 + 0o54) + '\x31', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b101110 + 0o101) + '\x32' + '\061' + chr(51), 51991 - 51983), ehT0Px3KOsy9('\060' + '\157' + chr(50) + '\x34' + '\062', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x33' + '\062' + '\064', ord("\x08")), ehT0Px3KOsy9(chr(527 - 479) + chr(0b0 + 0o157) + chr(282 - 233) + chr(52) + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(0b1000001 + 0o56) + chr(1814 - 1759) + chr(53), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\062' + chr(590 - 539), 3636 - 3628), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110010) + chr(0b110011), 8), ehT0Px3KOsy9('\x30' + '\x6f' + '\063' + '\x32' + chr(846 - 796), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\066' + chr(55), 30053 - 30045), ehT0Px3KOsy9('\060' + chr(111) + '\x32' + chr(48) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(2807 - 2696) + '\063' + '\064' + chr(0b10101 + 0o37), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(12035 - 11924) + '\x37' + '\062', 42971 - 42963)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + '\157' + chr(2746 - 2693) + chr(0b101001 + 0o7), 1358 - 1350)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'C'), chr(4248 - 4148) + chr(0b1000001 + 0o44) + chr(99) + '\x6f' + chr(100) + chr(0b1100101))(chr(11577 - 11460) + chr(11521 - 11405) + '\x66' + '\x2d' + chr(1335 - 1279)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def ahu8XYyJ8Qur(oVre8I6UXc3b): PuGsmAbpzDvQ = [] for l38lb8xQZNsE in xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\x19\xba}\xdfe\n4\xf0H\xda\xb0\xc0^;% =N0'), chr(0b1011100 + 0o10) + '\x65' + chr(0b1 + 0o142) + chr(0b1101111) + chr(0b1100100) + chr(101))(chr(0b1001100 + 0o51) + chr(9406 - 9290) + '\x66' + chr(45) + chr(1035 - 979)))(): if xafqLlk3kkUe(l38lb8xQZNsE.op.name, xafqLlk3kkUe(SXOLrMavuUCe(b'\x0b\xa1r\xd2'), chr(8055 - 7955) + chr(101) + chr(3785 - 3686) + chr(111) + chr(0b1011110 + 0o6) + chr(101))(chr(117) + chr(0b1110100) + '\x66' + '\055' + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b')\x9f'), '\144' + chr(0b1100101 + 0o0) + chr(0b110101 + 0o56) + chr(0b100000 + 0o117) + chr(0b1100100) + chr(101))('\165' + chr(116) + chr(102) + '\x2d' + chr(56))) > ehT0Px3KOsy9(chr(0b110000) + chr(6902 - 6791) + '\x30', ord("\x08")): xafqLlk3kkUe(PuGsmAbpzDvQ, xafqLlk3kkUe(SXOLrMavuUCe(b'\x0c\xb8l\xd3e\x0f'), '\x64' + chr(0b1100101) + '\143' + chr(0b11001 + 0o126) + chr(0b1100100) + chr(101))('\165' + '\x74' + chr(0b1100110) + chr(0b101101) + chr(710 - 654)))(xafqLlk3kkUe(IDJ2eXGCBCDu.nn, xafqLlk3kkUe(SXOLrMavuUCe(b'\x01\xfaC\xdad\x18%'), chr(0b1000100 + 0o40) + chr(101) + chr(99) + chr(111) + chr(100) + '\x65')('\x75' + '\x74' + '\146' + chr(0b101101) + chr(2191 - 2135)))(l38lb8xQZNsE)) return xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\x00\xbdp\xc2b\x1b:\xe5'), '\144' + chr(2219 - 2118) + chr(7920 - 7821) + chr(111) + '\144' + chr(101))(chr(0b1110101) + chr(0b1101010 + 0o12) + chr(1221 - 1119) + '\055' + '\070'))(xafqLlk3kkUe(oVre8I6UXc3b.hps, xafqLlk3kkUe(SXOLrMavuUCe(b'\x1a\xadu\xd1c\x1f\t\xf8H\xe6\xa7\xd8s %64'), chr(0b1100100) + chr(3475 - 3374) + chr(0b1011101 + 0o6) + chr(0b101001 + 0o106) + chr(100) + '\145')(chr(0b1110101) + chr(0b1110100) + chr(4505 - 4403) + chr(45) + '\x38')), xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\x0c\xacx\xe9e'), chr(100) + chr(0b1010000 + 0o25) + chr(0b11100 + 0o107) + '\157' + '\x64' + '\x65')(chr(9362 - 9245) + chr(0b11 + 0o161) + '\146' + '\x2d' + chr(0b101000 + 0o20)))(PuGsmAbpzDvQ))
ray-project/ray
examples/resnet/resnet_model.py
ResNet._conv
def _conv(self, name, x, filter_size, in_filters, out_filters, strides): """Convolution.""" with tf.variable_scope(name): n = filter_size * filter_size * out_filters kernel = tf.get_variable( "DW", [filter_size, filter_size, in_filters, out_filters], tf.float32, initializer=tf.random_normal_initializer( stddev=np.sqrt(2.0 / n))) return tf.nn.conv2d(x, kernel, strides, padding="SAME")
python
def _conv(self, name, x, filter_size, in_filters, out_filters, strides): """Convolution.""" with tf.variable_scope(name): n = filter_size * filter_size * out_filters kernel = tf.get_variable( "DW", [filter_size, filter_size, in_filters, out_filters], tf.float32, initializer=tf.random_normal_initializer( stddev=np.sqrt(2.0 / n))) return tf.nn.conv2d(x, kernel, strides, padding="SAME")
[ "def", "_conv", "(", "self", ",", "name", ",", "x", ",", "filter_size", ",", "in_filters", ",", "out_filters", ",", "strides", ")", ":", "with", "tf", ".", "variable_scope", "(", "name", ")", ":", "n", "=", "filter_size", "*", "filter_size", "*", "out_filters", "kernel", "=", "tf", ".", "get_variable", "(", "\"DW\"", ",", "[", "filter_size", ",", "filter_size", ",", "in_filters", ",", "out_filters", "]", ",", "tf", ".", "float32", ",", "initializer", "=", "tf", ".", "random_normal_initializer", "(", "stddev", "=", "np", ".", "sqrt", "(", "2.0", "/", "n", ")", ")", ")", "return", "tf", ".", "nn", ".", "conv2d", "(", "x", ",", "kernel", ",", "strides", ",", "padding", "=", "\"SAME\"", ")" ]
Convolution.
[ "Convolution", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/examples/resnet/resnet_model.py#L290-L299
train
Convolution.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPvpP4xdo3,cW7yQuyEnJ6E,KOHQGQ8qLDWm,NE1Yam2HHroQ,ygAzbDzrvRMh,SBRjvOU1ufVC,hOkXjmluKZfJ,q1QCh3W88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xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\060' + chr(8540 - 8429) + '\062' + chr(0b1111 + 0o45) + chr(0b100100 + 0o16), 0b1000), ehT0Px3KOsy9(chr(674 - 626) + chr(0b10001 + 0o136) + chr(49) + chr(0b100 + 0o60) + chr(51), 4486 - 4478), ehT0Px3KOsy9('\x30' + chr(111) + '\061' + '\x37' + '\x34', 16654 - 16646), ehT0Px3KOsy9(chr(851 - 803) + '\157' + '\063' + chr(0b11100 + 0o27) + chr(0b110100 + 0o2), ord("\x08")), ehT0Px3KOsy9(chr(2070 - 2022) + chr(0b1000001 + 0o56) + '\063' + '\066' + chr(0b110101), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b10011 + 0o40) + '\x32' + chr(0b0 + 0o65), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(49) + '\x30' + '\060', 0b1000), ehT0Px3KOsy9('\x30' + chr(1329 - 1218) + chr(49) + chr(1774 - 1725) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b10011 + 0o134) + chr(1017 - 967) + chr(2511 - 2456) + chr(2249 - 2199), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(4571 - 4460) + '\062' + chr(0b110101) + '\062', 2476 - 2468), ehT0Px3KOsy9(chr(1449 - 1401) + chr(111) + chr(0b11101 + 0o26) + chr(0b10111 + 0o37) + '\x35', 8), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110001) + chr(0b1010 + 0o53) + chr(0b110000), 46519 - 46511), ehT0Px3KOsy9(chr(2011 - 1963) + chr(0b1101111) + chr(54) + '\067', 53106 - 53098), ehT0Px3KOsy9(chr(0b10101 + 0o33) + '\157' + chr(51) + '\067' + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(597 - 549) + '\157' + '\062' + chr(50) + '\066', 0o10), ehT0Px3KOsy9('\x30' + chr(0b111001 + 0o66) + chr(0b110110) + '\061', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b11011 + 0o34) + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(1639 - 1591) + '\157' + chr(729 - 678) + chr(686 - 632), 0b1000), ehT0Px3KOsy9('\060' + chr(0b100100 + 0o113) + chr(303 - 251) + '\064', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110101) + '\060', 0b1000), ehT0Px3KOsy9(chr(0b101011 + 0o5) + '\157' + chr(0b10101 + 0o34) + chr(48) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(0b1 + 0o156) + '\063' + chr(0b110100) + chr(53), 0o10), ehT0Px3KOsy9('\060' + chr(0b10111 + 0o130) + '\x32' + chr(52) + chr(0b101011 + 0o7), 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\063' + chr(243 - 190) + '\066', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(10248 - 10137) + '\x32' + '\x32' + chr(927 - 874), 23022 - 23014), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(0b1101111) + chr(162 - 111) + '\x33' + chr(0b110011), 45399 - 45391), ehT0Px3KOsy9('\x30' + '\157' + chr(50) + chr(50), 21159 - 21151), ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(10416 - 10305) + chr(0b100111 + 0o14) + chr(2449 - 2397), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(424 - 373) + chr(64 - 16) + chr(162 - 107), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(3763 - 3652) + '\061' + chr(53) + chr(0b110001), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110001) + chr(0b100010 + 0o25) + chr(48), 32586 - 32578), ehT0Px3KOsy9(chr(48) + chr(0b10000 + 0o137) + chr(0b110 + 0o55) + '\065' + chr(140 - 87), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b100011 + 0o16) + chr(0b110001 + 0o0) + '\x30', 0o10), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(0b1101111) + chr(0b1110 + 0o44) + '\x32' + chr(50), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(451 - 402) + '\065', 12733 - 12725), ehT0Px3KOsy9('\x30' + chr(0b101111 + 0o100) + '\x31' + chr(51) + chr(0b110101), 23816 - 23808), ehT0Px3KOsy9(chr(259 - 211) + chr(0b1011111 + 0o20) + chr(51) + chr(0b110111) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(0b101110 + 0o2) + '\x6f' + chr(49) + '\066' + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(4988 - 4877) + '\063' + chr(53) + chr(0b11110 + 0o22), 439 - 431), ehT0Px3KOsy9(chr(0b1100 + 0o44) + chr(0b1101111) + chr(482 - 431) + '\x35' + '\x37', 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + '\x6f' + chr(0b100000 + 0o25) + chr(48), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x8c'), chr(0b1011 + 0o131) + '\x65' + chr(0b1100011) + '\x6f' + '\x64' + chr(101))(chr(0b11110 + 0o127) + chr(0b100100 + 0o120) + chr(6149 - 6047) + chr(366 - 321) + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def JObH2qYqq2SG(oVre8I6UXc3b, AIvJRzLdDfgF, OeWW0F1dBPRQ, deybX8NJ0oEI, hpJtsJwgoICq, _YztCJAvUvZi, r8knJmMTTKwv): with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd4\x02\x0e\xb7\x94\xb7,.\xe5\xd9\x96\x07G\x9c'), chr(220 - 120) + chr(0b101100 + 0o71) + chr(99) + chr(3021 - 2910) + '\x64' + chr(0b1100101))(chr(117) + '\164' + '\146' + chr(0b10011 + 0o32) + chr(0b0 + 0o70)))(AIvJRzLdDfgF): m1NkCryOw9Bx = deybX8NJ0oEI * deybX8NJ0oEI * _YztCJAvUvZi iaILEoszmqXb = IDJ2eXGCBCDu.get_variable(xafqLlk3kkUe(SXOLrMavuUCe(b'\xe64'), chr(6765 - 6665) + '\x65' + chr(0b1100011) + '\x6f' + chr(8404 - 8304) + chr(0b1100101))('\x75' + '\x74' + chr(0b100111 + 0o77) + chr(45) + chr(0b10 + 0o66)), [deybX8NJ0oEI, deybX8NJ0oEI, hpJtsJwgoICq, _YztCJAvUvZi], IDJ2eXGCBCDu.float32, initializer=IDJ2eXGCBCDu.random_normal_initializer(stddev=WqUC3KWvYVup.sqrt(2.0 / m1NkCryOw9Bx))) return xafqLlk3kkUe(IDJ2eXGCBCDu.nn, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc1\x0c\x12\xa8\xc7\xb1'), chr(100) + chr(0b1100101) + chr(3030 - 2931) + chr(111) + chr(0b1010101 + 0o17) + '\x65')('\x75' + chr(6789 - 6673) + chr(0b1100110) + '\055' + chr(0b111000)))(OeWW0F1dBPRQ, iaILEoszmqXb, r8knJmMTTKwv, padding=xafqLlk3kkUe(SXOLrMavuUCe(b'\xf1"1\x9b'), chr(0b10001 + 0o123) + chr(0b111100 + 0o51) + chr(7485 - 7386) + chr(0b1011110 + 0o21) + '\144' + chr(0b1010100 + 0o21))(chr(0b101101 + 0o110) + chr(0b1110100) + chr(102) + chr(56 - 11) + chr(0b1100 + 0o54)))
ray-project/ray
examples/resnet/resnet_model.py
ResNet._fully_connected
def _fully_connected(self, x, out_dim): """FullyConnected layer for final output.""" x = tf.reshape(x, [self.hps.batch_size, -1]) w = tf.get_variable( "DW", [x.get_shape()[1], out_dim], initializer=tf.uniform_unit_scaling_initializer(factor=1.0)) b = tf.get_variable( "biases", [out_dim], initializer=tf.constant_initializer()) return tf.nn.xw_plus_b(x, w, b)
python
def _fully_connected(self, x, out_dim): """FullyConnected layer for final output.""" x = tf.reshape(x, [self.hps.batch_size, -1]) w = tf.get_variable( "DW", [x.get_shape()[1], out_dim], initializer=tf.uniform_unit_scaling_initializer(factor=1.0)) b = tf.get_variable( "biases", [out_dim], initializer=tf.constant_initializer()) return tf.nn.xw_plus_b(x, w, b)
[ "def", "_fully_connected", "(", "self", ",", "x", ",", "out_dim", ")", ":", "x", "=", "tf", ".", "reshape", "(", "x", ",", "[", "self", ".", "hps", ".", "batch_size", ",", "-", "1", "]", ")", "w", "=", "tf", ".", "get_variable", "(", "\"DW\"", ",", "[", "x", ".", "get_shape", "(", ")", "[", "1", "]", ",", "out_dim", "]", ",", "initializer", "=", "tf", ".", "uniform_unit_scaling_initializer", "(", "factor", "=", "1.0", ")", ")", "b", "=", "tf", ".", "get_variable", "(", "\"biases\"", ",", "[", "out_dim", "]", ",", "initializer", "=", "tf", ".", "constant_initializer", "(", ")", ")", "return", "tf", ".", "nn", ".", "xw_plus_b", "(", "x", ",", "w", ",", "b", ")" ]
FullyConnected layer for final output.
[ "FullyConnected", "layer", "for", "final", "output", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/examples/resnet/resnet_model.py#L305-L313
train
FullyConnected layer for final output.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sP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AbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b100000 + 0o20) + '\x6f' + '\061' + chr(49) + '\060', 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(1796 - 1747) + chr(53) + chr(53), 56588 - 56580), ehT0Px3KOsy9('\060' + chr(9941 - 9830) + chr(0b1101 + 0o43), 22102 - 22094), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110010) + chr(52) + '\064', 31218 - 31210), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(2155 - 2104) + chr(54) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\061' + chr(2081 - 2030) + '\062', 7963 - 7955), ehT0Px3KOsy9(chr(48) + chr(111) + chr(51) + chr(0b110001) + '\x34', 0o10), ehT0Px3KOsy9('\060' + chr(1225 - 1114) + chr(50) + '\063' + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(0b1101001 + 0o6) + '\062' + chr(0b11101 + 0o25) + '\061', 5407 - 5399), ehT0Px3KOsy9('\060' + '\157' + '\x31' + chr(1710 - 1662) + chr(54), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(11355 - 11244) + chr(50) + chr(0b10000 + 0o47), ord("\x08")), ehT0Px3KOsy9(chr(1105 - 1057) + '\x6f' + chr(0b110010) + '\064' + chr(51), 0o10), ehT0Px3KOsy9('\060' + chr(0b10111 + 0o130) + chr(0b110001) + chr(54) + '\067', ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b101110 + 0o11) + chr(55), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110000 + 0o3) + chr(0b100010 + 0o25) + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(5228 - 5117) + '\063' + chr(2699 - 2645) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b100001 + 0o21) + chr(52) + chr(2523 - 2471), 8), ehT0Px3KOsy9(chr(48) + chr(0b111001 + 0o66) + chr(0b110001 + 0o5) + '\x34', ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(1573 - 1523) + chr(0b101001 + 0o15), 15079 - 15071), ehT0Px3KOsy9(chr(960 - 912) + chr(0b1101111) + chr(54) + chr(858 - 810), ord("\x08")), ehT0Px3KOsy9(chr(1307 - 1259) + '\157' + chr(0b101000 + 0o12) + chr(0b110110) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110011) + '\064' + chr(1470 - 1419), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x35' + '\x30', 0b1000), ehT0Px3KOsy9(chr(0b10001 + 0o37) + '\x6f' + chr(1185 - 1134) + chr(0b110110) + chr(0b101111 + 0o5), 9584 - 9576), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1260 - 1210) + chr(53), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b1011 + 0o47) + chr(1293 - 1239), 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(49) + '\062' + chr(53), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b100000 + 0o21) + chr(0b10011 + 0o36) + chr(53), 2490 - 2482), ehT0Px3KOsy9(chr(1356 - 1308) + chr(0b1010110 + 0o31) + '\061' + chr(0b100100 + 0o20) + chr(828 - 780), 0o10), ehT0Px3KOsy9(chr(0b11000 + 0o30) + '\157' + chr(0b110001) + chr(655 - 604) + chr(988 - 939), ord("\x08")), ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(0b1101111) + chr(0b1010 + 0o55) + '\x31', 7283 - 7275), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\061' + '\x34' + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x32' + '\064' + chr(52), 8), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x33' + '\x30', 18575 - 18567), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(0b1101111) + chr(0b110 + 0o53) + '\x33' + chr(51), 0o10), ehT0Px3KOsy9('\060' + chr(7201 - 7090) + chr(2282 - 2233) + chr(51) + chr(2290 - 2242), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110100) + chr(48), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b110110 + 0o71) + '\x32' + chr(1248 - 1200) + chr(2246 - 2197), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\061' + chr(0b11101 + 0o30) + chr(0b1010 + 0o54), 39182 - 39174), ehT0Px3KOsy9('\060' + chr(5362 - 5251) + chr(49) + chr(50), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(0b10000 + 0o137) + chr(0b110 + 0o57) + chr(0b110000), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'f'), chr(0b1100100) + '\x65' + chr(8677 - 8578) + chr(6045 - 5934) + chr(0b1100100) + chr(0b1100101))(chr(881 - 764) + chr(0b1110100) + chr(5720 - 5618) + '\055' + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def qvAmLuo5Lg1f(oVre8I6UXc3b, OeWW0F1dBPRQ, Zc8z0oj6o037): OeWW0F1dBPRQ = IDJ2eXGCBCDu.reshape(OeWW0F1dBPRQ, [oVre8I6UXc3b.hps.ix9dZyeAmUxY, -ehT0Px3KOsy9(chr(48) + chr(0b1011001 + 0o26) + '\x31', 0b1000)]) AOfzRywRzEXp = IDJ2eXGCBCDu.get_variable(xafqLlk3kkUe(SXOLrMavuUCe(b'\x0c:'), chr(8999 - 8899) + chr(0b100101 + 0o100) + chr(0b1100011) + chr(111) + chr(0b100010 + 0o102) + '\x65')(chr(8232 - 8115) + chr(0b1110100) + '\146' + chr(1037 - 992) + chr(56)), [OeWW0F1dBPRQ.get_shape()[ehT0Px3KOsy9('\060' + '\x6f' + '\x31', 8)], Zc8z0oj6o037], initializer=IDJ2eXGCBCDu.uniform_unit_scaling_initializer(factor=1.0)) wmN3dvez4qzC = IDJ2eXGCBCDu.get_variable(xafqLlk3kkUe(SXOLrMavuUCe(b'*\x04a\xd7\x95)'), chr(334 - 234) + chr(2056 - 1955) + chr(0b1100011) + chr(11927 - 11816) + chr(0b10110 + 0o116) + chr(0b10110 + 0o117))('\165' + chr(3684 - 3568) + chr(7498 - 7396) + chr(45) + chr(56)), [Zc8z0oj6o037], initializer=IDJ2eXGCBCDu.constant_initializer()) return xafqLlk3kkUe(IDJ2eXGCBCDu.nn, xafqLlk3kkUe(SXOLrMavuUCe(b'0\x1a_\xd4\x9c/\xbf\xc3\xf3'), chr(8590 - 8490) + '\x65' + chr(0b1100011) + chr(111) + '\144' + chr(0b1000101 + 0o40))(chr(10550 - 10433) + '\164' + '\146' + chr(0b101101) + chr(0b111000)))(OeWW0F1dBPRQ, AOfzRywRzEXp, wmN3dvez4qzC)
ray-project/ray
python/ray/rllib/agents/qmix/qmix_policy_graph.py
_mac
def _mac(model, obs, h): """Forward pass of the multi-agent controller. Arguments: model: TorchModel class obs: Tensor of shape [B, n_agents, obs_size] h: List of tensors of shape [B, n_agents, h_size] Returns: q_vals: Tensor of shape [B, n_agents, n_actions] h: Tensor of shape [B, n_agents, h_size] """ B, n_agents = obs.size(0), obs.size(1) obs_flat = obs.reshape([B * n_agents, -1]) h_flat = [s.reshape([B * n_agents, -1]) for s in h] q_flat, _, _, h_flat = model.forward({"obs": obs_flat}, h_flat) return q_flat.reshape( [B, n_agents, -1]), [s.reshape([B, n_agents, -1]) for s in h_flat]
python
def _mac(model, obs, h): """Forward pass of the multi-agent controller. Arguments: model: TorchModel class obs: Tensor of shape [B, n_agents, obs_size] h: List of tensors of shape [B, n_agents, h_size] Returns: q_vals: Tensor of shape [B, n_agents, n_actions] h: Tensor of shape [B, n_agents, h_size] """ B, n_agents = obs.size(0), obs.size(1) obs_flat = obs.reshape([B * n_agents, -1]) h_flat = [s.reshape([B * n_agents, -1]) for s in h] q_flat, _, _, h_flat = model.forward({"obs": obs_flat}, h_flat) return q_flat.reshape( [B, n_agents, -1]), [s.reshape([B, n_agents, -1]) for s in h_flat]
[ "def", "_mac", "(", "model", ",", "obs", ",", "h", ")", ":", "B", ",", "n_agents", "=", "obs", ".", "size", "(", "0", ")", ",", "obs", ".", "size", "(", "1", ")", "obs_flat", "=", "obs", ".", "reshape", "(", "[", "B", "*", "n_agents", ",", "-", "1", "]", ")", "h_flat", "=", "[", "s", ".", "reshape", "(", "[", "B", "*", "n_agents", ",", "-", "1", "]", ")", "for", "s", "in", "h", "]", "q_flat", ",", "_", ",", "_", ",", "h_flat", "=", "model", ".", "forward", "(", "{", "\"obs\"", ":", "obs_flat", "}", ",", "h_flat", ")", "return", "q_flat", ".", "reshape", "(", "[", "B", ",", "n_agents", ",", "-", "1", "]", ")", ",", "[", "s", ".", "reshape", "(", "[", "B", ",", "n_agents", ",", "-", "1", "]", ")", "for", "s", "in", "h_flat", "]" ]
Forward pass of the multi-agent controller. Arguments: model: TorchModel class obs: Tensor of shape [B, n_agents, obs_size] h: List of tensors of shape [B, n_agents, h_size] Returns: q_vals: Tensor of shape [B, n_agents, n_actions] h: Tensor of shape [B, n_agents, h_size]
[ "Forward", "pass", "of", "the", "multi", "-", "agent", "controller", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/rllib/agents/qmix/qmix_policy_graph.py#L409-L426
train
Forward pass of the multi - agent controller.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDc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Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(1384 - 1336) + chr(111) + '\x32' + '\061' + chr(0b101101 + 0o7), 14180 - 14172), ehT0Px3KOsy9(chr(0b110000) + chr(0b11001 + 0o126) + chr(0b110011) + '\x32' + chr(699 - 648), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x37' + '\067', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(174 - 121) + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(1010 - 962) + chr(824 - 713) + chr(0b101 + 0o54), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b11101 + 0o122) + chr(54), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(49) + chr(0b110010) + chr(52), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(0b100001 + 0o22) + chr(48) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(0b101010 + 0o6) + '\157' + chr(49) + chr(0b110000) + chr(0b101001 + 0o12), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\x31' + chr(0b10 + 0o61), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(55) + chr(0b1101 + 0o45), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b111 + 0o150) + chr(0b110010) + chr(0b111 + 0o60) + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(0b11101 + 0o23) + '\x6f' + chr(0b11111 + 0o22) + chr(2177 - 2122) + chr(0b110001), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(51) + chr(0b101001 + 0o14), 43218 - 43210), ehT0Px3KOsy9(chr(48) + chr(111) + chr(224 - 175) + '\067', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110001) + chr(1892 - 1838) + chr(0b101000 + 0o13), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(49) + chr(0b10110 + 0o35) + '\x30', 62201 - 62193), ehT0Px3KOsy9(chr(1667 - 1619) + chr(0b101101 + 0o102) + '\x32' + '\x37' + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(585 - 537) + '\157' + chr(1260 - 1211) + chr(0b110110) + '\064', 24796 - 24788), ehT0Px3KOsy9(chr(48) + '\157' + chr(54) + chr(0b101001 + 0o14), 0b1000), ehT0Px3KOsy9(chr(0b100100 + 0o14) + '\x6f' + chr(0b110001) + '\062' + chr(0b10101 + 0o35), 0o10), ehT0Px3KOsy9('\x30' + chr(11311 - 11200) + chr(0b101111 + 0o4) + '\066' + '\065', 0b1000), ehT0Px3KOsy9(chr(1956 - 1908) + '\x6f' + '\067', 0o10), ehT0Px3KOsy9(chr(0b101100 + 0o4) + chr(5677 - 5566) + chr(0b11100 + 0o27) + chr(49) + chr(1848 - 1796), 0o10), ehT0Px3KOsy9(chr(2201 - 2153) + chr(8059 - 7948) + chr(1706 - 1655) + chr(0b110001) + '\066', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1010111 + 0o30) + '\x31' + chr(146 - 92) + chr(51), 8), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(111) + chr(0b11111 + 0o24) + chr(962 - 908) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(9819 - 9708) + chr(0b110011) + chr(53) + chr(49), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x36' + '\060', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101 + 0o142) + '\063' + chr(50) + chr(1777 - 1725), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110001) + '\061' + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b101011 + 0o5) + chr(0b10000 + 0o137) + chr(388 - 336) + chr(0b10001 + 0o37), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1100011 + 0o14) + '\x31' + '\064' + chr(1027 - 979), ord("\x08")), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(111) + chr(0b10111 + 0o33) + chr(0b110110) + '\x30', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\063' + chr(653 - 603) + chr(52), 8), ehT0Px3KOsy9('\x30' + '\x6f' + '\x31' + '\062' + '\x37', ord("\x08")), ehT0Px3KOsy9('\060' + chr(2022 - 1911) + chr(0b110010) + chr(1426 - 1372) + '\063', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(51) + chr(0b110010) + chr(0b110000), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + '\063' + chr(1279 - 1230) + chr(0b10111 + 0o37), 8), ehT0Px3KOsy9('\x30' + chr(8792 - 8681) + chr(52) + chr(55), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(126 - 78) + chr(0b1011111 + 0o20) + '\065' + '\x30', ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xa2'), chr(1710 - 1610) + '\x65' + '\x63' + chr(12189 - 12078) + '\x64' + '\x65')(chr(0b1110101) + chr(0b110110 + 0o76) + chr(0b1100110) + '\x2d' + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def SOyfCkqhFxJa(FK0vqzZ5gPN6, HUAx0lWcwxPP, sz4HVsFVF8nL): (svfRBGgiDhUk, FiEtHuf0bVIx) = (HUAx0lWcwxPP.NLcc3BCJnQka(ehT0Px3KOsy9(chr(48) + chr(111) + '\060', 0o10)), HUAx0lWcwxPP.NLcc3BCJnQka(ehT0Px3KOsy9(chr(1668 - 1620) + chr(0b101 + 0o152) + chr(0b110000 + 0o1), 8))) EM5hwgqPXEHi = HUAx0lWcwxPP.reshape([svfRBGgiDhUk * FiEtHuf0bVIx, -ehT0Px3KOsy9(chr(48) + chr(10834 - 10723) + chr(556 - 507), 8)]) QetXxs1F2Kvm = [vGrByMSYMp9h.reshape([svfRBGgiDhUk * FiEtHuf0bVIx, -ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x31', 8)]) for vGrByMSYMp9h in sz4HVsFVF8nL] (UVvH8ZS3ObtF, VNGQdHSFPrso, VNGQdHSFPrso, QetXxs1F2Kvm) = FK0vqzZ5gPN6.GbbcCHUNFMj5({xafqLlk3kkUe(SXOLrMavuUCe(b'\xe3\xb1L'), '\144' + chr(0b1100101) + chr(99) + chr(0b1101111) + chr(0b1100100) + '\145')(chr(0b1110101) + '\x74' + chr(0b1100 + 0o132) + chr(1551 - 1506) + '\070'): EM5hwgqPXEHi}, QetXxs1F2Kvm) return (xafqLlk3kkUe(UVvH8ZS3ObtF, xafqLlk3kkUe(SXOLrMavuUCe(b'\xfe\xb6LD`v1'), '\144' + chr(0b1100101) + '\x63' + chr(3550 - 3439) + chr(0b1100000 + 0o4) + chr(101))(chr(5598 - 5481) + '\164' + chr(102) + chr(45) + '\x38'))([svfRBGgiDhUk, FiEtHuf0bVIx, -ehT0Px3KOsy9(chr(0b110000) + chr(570 - 459) + chr(0b110001), 8)]), [xafqLlk3kkUe(vGrByMSYMp9h, xafqLlk3kkUe(SXOLrMavuUCe(b'\xfe\xb6LD`v1'), chr(9932 - 9832) + '\145' + chr(99) + '\x6f' + '\144' + '\145')(chr(0b1111 + 0o146) + chr(116) + '\146' + chr(0b110 + 0o47) + chr(2499 - 2443)))([svfRBGgiDhUk, FiEtHuf0bVIx, -ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(49), 8)]) for vGrByMSYMp9h in QetXxs1F2Kvm])
ray-project/ray
python/ray/rllib/agents/qmix/qmix_policy_graph.py
QMixLoss.forward
def forward(self, rewards, actions, terminated, mask, obs, action_mask): """Forward pass of the loss. Arguments: rewards: Tensor of shape [B, T-1, n_agents] actions: Tensor of shape [B, T-1, n_agents] terminated: Tensor of shape [B, T-1, n_agents] mask: Tensor of shape [B, T-1, n_agents] obs: Tensor of shape [B, T, n_agents, obs_size] action_mask: Tensor of shape [B, T, n_agents, n_actions] """ B, T = obs.size(0), obs.size(1) # Calculate estimated Q-Values mac_out = [] h = [s.expand([B, self.n_agents, -1]) for s in self.model.state_init()] for t in range(T): q, h = _mac(self.model, obs[:, t], h) mac_out.append(q) mac_out = th.stack(mac_out, dim=1) # Concat over time # Pick the Q-Values for the actions taken -> [B * n_agents, T-1] chosen_action_qvals = th.gather( mac_out[:, :-1], dim=3, index=actions.unsqueeze(3)).squeeze(3) # Calculate the Q-Values necessary for the target target_mac_out = [] target_h = [ s.expand([B, self.n_agents, -1]) for s in self.target_model.state_init() ] for t in range(T): target_q, target_h = _mac(self.target_model, obs[:, t], target_h) target_mac_out.append(target_q) # We don't need the first timesteps Q-Value estimate for targets target_mac_out = th.stack( target_mac_out[1:], dim=1) # Concat across time # Mask out unavailable actions target_mac_out[action_mask[:, 1:] == 0] = -9999999 # Max over target Q-Values if self.double_q: # Get actions that maximise live Q (for double q-learning) mac_out[action_mask == 0] = -9999999 cur_max_actions = mac_out[:, 1:].max(dim=3, keepdim=True)[1] target_max_qvals = th.gather(target_mac_out, 3, cur_max_actions).squeeze(3) else: target_max_qvals = target_mac_out.max(dim=3)[0] # Mix if self.mixer is not None: # TODO(ekl) add support for handling global state? This is just # treating the stacked agent obs as the state. chosen_action_qvals = self.mixer(chosen_action_qvals, obs[:, :-1]) target_max_qvals = self.target_mixer(target_max_qvals, obs[:, 1:]) # Calculate 1-step Q-Learning targets targets = rewards + self.gamma * (1 - terminated) * target_max_qvals # Td-error td_error = (chosen_action_qvals - targets.detach()) mask = mask.expand_as(td_error) # 0-out the targets that came from padded data masked_td_error = td_error * mask # Normal L2 loss, take mean over actual data loss = (masked_td_error**2).sum() / mask.sum() return loss, mask, masked_td_error, chosen_action_qvals, targets
python
def forward(self, rewards, actions, terminated, mask, obs, action_mask): """Forward pass of the loss. Arguments: rewards: Tensor of shape [B, T-1, n_agents] actions: Tensor of shape [B, T-1, n_agents] terminated: Tensor of shape [B, T-1, n_agents] mask: Tensor of shape [B, T-1, n_agents] obs: Tensor of shape [B, T, n_agents, obs_size] action_mask: Tensor of shape [B, T, n_agents, n_actions] """ B, T = obs.size(0), obs.size(1) # Calculate estimated Q-Values mac_out = [] h = [s.expand([B, self.n_agents, -1]) for s in self.model.state_init()] for t in range(T): q, h = _mac(self.model, obs[:, t], h) mac_out.append(q) mac_out = th.stack(mac_out, dim=1) # Concat over time # Pick the Q-Values for the actions taken -> [B * n_agents, T-1] chosen_action_qvals = th.gather( mac_out[:, :-1], dim=3, index=actions.unsqueeze(3)).squeeze(3) # Calculate the Q-Values necessary for the target target_mac_out = [] target_h = [ s.expand([B, self.n_agents, -1]) for s in self.target_model.state_init() ] for t in range(T): target_q, target_h = _mac(self.target_model, obs[:, t], target_h) target_mac_out.append(target_q) # We don't need the first timesteps Q-Value estimate for targets target_mac_out = th.stack( target_mac_out[1:], dim=1) # Concat across time # Mask out unavailable actions target_mac_out[action_mask[:, 1:] == 0] = -9999999 # Max over target Q-Values if self.double_q: # Get actions that maximise live Q (for double q-learning) mac_out[action_mask == 0] = -9999999 cur_max_actions = mac_out[:, 1:].max(dim=3, keepdim=True)[1] target_max_qvals = th.gather(target_mac_out, 3, cur_max_actions).squeeze(3) else: target_max_qvals = target_mac_out.max(dim=3)[0] # Mix if self.mixer is not None: # TODO(ekl) add support for handling global state? This is just # treating the stacked agent obs as the state. chosen_action_qvals = self.mixer(chosen_action_qvals, obs[:, :-1]) target_max_qvals = self.target_mixer(target_max_qvals, obs[:, 1:]) # Calculate 1-step Q-Learning targets targets = rewards + self.gamma * (1 - terminated) * target_max_qvals # Td-error td_error = (chosen_action_qvals - targets.detach()) mask = mask.expand_as(td_error) # 0-out the targets that came from padded data masked_td_error = td_error * mask # Normal L2 loss, take mean over actual data loss = (masked_td_error**2).sum() / mask.sum() return loss, mask, masked_td_error, chosen_action_qvals, targets
[ "def", "forward", "(", "self", ",", "rewards", ",", "actions", ",", "terminated", ",", "mask", ",", "obs", ",", "action_mask", ")", ":", "B", ",", "T", "=", "obs", ".", "size", "(", "0", ")", ",", "obs", ".", "size", "(", "1", ")", "# Calculate estimated Q-Values", "mac_out", "=", "[", "]", "h", "=", "[", "s", ".", "expand", "(", "[", "B", ",", "self", ".", "n_agents", ",", "-", "1", "]", ")", "for", "s", "in", "self", ".", "model", ".", "state_init", "(", ")", "]", "for", "t", "in", "range", "(", "T", ")", ":", "q", ",", "h", "=", "_mac", "(", "self", ".", "model", ",", "obs", "[", ":", ",", "t", "]", ",", "h", ")", "mac_out", ".", "append", "(", "q", ")", "mac_out", "=", "th", ".", "stack", "(", "mac_out", ",", "dim", "=", "1", ")", "# Concat over time", "# Pick the Q-Values for the actions taken -> [B * n_agents, T-1]", "chosen_action_qvals", "=", "th", ".", "gather", "(", "mac_out", "[", ":", ",", ":", "-", "1", "]", ",", "dim", "=", "3", ",", "index", "=", "actions", ".", "unsqueeze", "(", "3", ")", ")", ".", "squeeze", "(", "3", ")", "# Calculate the Q-Values necessary for the target", "target_mac_out", "=", "[", "]", "target_h", "=", "[", "s", ".", "expand", "(", "[", "B", ",", "self", ".", "n_agents", ",", "-", "1", "]", ")", "for", "s", "in", "self", ".", "target_model", ".", "state_init", "(", ")", "]", "for", "t", "in", "range", "(", "T", ")", ":", "target_q", ",", "target_h", "=", "_mac", "(", "self", ".", "target_model", ",", "obs", "[", ":", ",", "t", "]", ",", "target_h", ")", "target_mac_out", ".", "append", "(", "target_q", ")", "# We don't need the first timesteps Q-Value estimate for targets", "target_mac_out", "=", "th", ".", "stack", "(", "target_mac_out", "[", "1", ":", "]", ",", "dim", "=", "1", ")", "# Concat across time", "# Mask out unavailable actions", "target_mac_out", "[", "action_mask", "[", ":", ",", "1", ":", "]", "==", "0", "]", "=", "-", "9999999", "# Max over target Q-Values", "if", "self", ".", "double_q", ":", "# Get actions that maximise live Q (for double q-learning)", "mac_out", "[", "action_mask", "==", "0", "]", "=", "-", "9999999", "cur_max_actions", "=", "mac_out", "[", ":", ",", "1", ":", "]", ".", "max", "(", "dim", "=", "3", ",", "keepdim", "=", "True", ")", "[", "1", "]", "target_max_qvals", "=", "th", ".", "gather", "(", "target_mac_out", ",", "3", ",", "cur_max_actions", ")", ".", "squeeze", "(", "3", ")", "else", ":", "target_max_qvals", "=", "target_mac_out", ".", "max", "(", "dim", "=", "3", ")", "[", "0", "]", "# Mix", "if", "self", ".", "mixer", "is", "not", "None", ":", "# TODO(ekl) add support for handling global state? This is just", "# treating the stacked agent obs as the state.", "chosen_action_qvals", "=", "self", ".", "mixer", "(", "chosen_action_qvals", ",", "obs", "[", ":", ",", ":", "-", "1", "]", ")", "target_max_qvals", "=", "self", ".", "target_mixer", "(", "target_max_qvals", ",", "obs", "[", ":", ",", "1", ":", "]", ")", "# Calculate 1-step Q-Learning targets", "targets", "=", "rewards", "+", "self", ".", "gamma", "*", "(", "1", "-", "terminated", ")", "*", "target_max_qvals", "# Td-error", "td_error", "=", "(", "chosen_action_qvals", "-", "targets", ".", "detach", "(", ")", ")", "mask", "=", "mask", ".", "expand_as", "(", "td_error", ")", "# 0-out the targets that came from padded data", "masked_td_error", "=", "td_error", "*", "mask", "# Normal L2 loss, take mean over actual data", "loss", "=", "(", "masked_td_error", "**", "2", ")", ".", "sum", "(", ")", "/", "mask", ".", "sum", "(", ")", "return", "loss", ",", "mask", ",", "masked_td_error", ",", "chosen_action_qvals", ",", "targets" ]
Forward pass of the loss. Arguments: rewards: Tensor of shape [B, T-1, n_agents] actions: Tensor of shape [B, T-1, n_agents] terminated: Tensor of shape [B, T-1, n_agents] mask: Tensor of shape [B, T-1, n_agents] obs: Tensor of shape [B, T, n_agents, obs_size] action_mask: Tensor of shape [B, T, n_agents, n_actions]
[ "Forward", "pass", "of", "the", "loss", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/rllib/agents/qmix/qmix_policy_graph.py#L49-L122
train
Forward pass of the loss.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf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,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\060' + chr(0b1011 + 0o144) + chr(51) + chr(0b110110) + '\x33', 0b1000), ehT0Px3KOsy9(chr(877 - 829) + '\157' + '\x31' + chr(1729 - 1677) + chr(2351 - 2299), ord("\x08")), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(0b1101111) + chr(994 - 945) + chr(55) + chr(715 - 665), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b0 + 0o63) + '\x30' + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(1173 - 1125) + chr(111) + '\x32' + chr(2516 - 2465) + chr(1486 - 1438), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(50) + '\062' + chr(49), 58342 - 58334), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(51) + chr(2684 - 2631) + chr(0b110001), 0o10), ehT0Px3KOsy9('\060' + chr(0b1100000 + 0o17) + chr(49) + chr(0b101001 + 0o10) + chr(0b11101 + 0o26), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(1529 - 1475) + chr(0b111 + 0o56), 0b1000), ehT0Px3KOsy9(chr(48) + chr(8314 - 8203) + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b101010 + 0o11) + chr(1270 - 1215) + chr(2402 - 2347), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\061' + chr(0b110010) + chr(52), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(51) + chr(0b110000) + chr(0b101 + 0o54), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\061' + '\067' + chr(1403 - 1353), 8), ehT0Px3KOsy9(chr(0b10111 + 0o31) + chr(0b1010110 + 0o31) + '\061' + chr(0b110100) + chr(0b110101), 0o10), ehT0Px3KOsy9('\x30' + chr(9448 - 9337) + '\x32' + '\065' + '\067', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110001) + chr(0b110101 + 0o0) + chr(1089 - 1038), 39157 - 39149), ehT0Px3KOsy9('\060' + chr(9192 - 9081) + chr(1486 - 1436) + chr(582 - 531) + chr(0b101111 + 0o5), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(51) + chr(0b11110 + 0o22) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(0b11011 + 0o25) + '\x6f' + '\062' + chr(1314 - 1261) + chr(0b11011 + 0o32), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1000011 + 0o54) + chr(51) + chr(0b110101) + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(0b10111 + 0o31) + chr(0b10010 + 0o135) + chr(1492 - 1441) + chr(0b110111) + chr(453 - 399), 571 - 563), ehT0Px3KOsy9('\x30' + chr(0b1000000 + 0o57) + chr(0b110110) + chr(0b110100), 24535 - 24527), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001) + '\062' + chr(0b101110 + 0o7), ord("\x08")), ehT0Px3KOsy9(chr(108 - 60) + chr(0b1101101 + 0o2) + '\062' + '\061', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110011) + chr(1209 - 1157), 0o10), ehT0Px3KOsy9(chr(0b110 + 0o52) + '\157' + chr(149 - 98) + chr(48) + '\060', 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(276 - 227) + '\x30' + '\x35', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\061' + chr(0b100011 + 0o17), ord("\x08")), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(111) + chr(58 - 8) + chr(0b110001), 8), ehT0Px3KOsy9(chr(554 - 506) + chr(111) + '\061' + chr(0b110001) + '\066', 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(49) + chr(55) + chr(137 - 82), 0b1000), ehT0Px3KOsy9('\060' + chr(1181 - 1070) + chr(0b110011) + '\065', 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(2165 - 2116) + chr(0b11100 + 0o24) + '\066', 24231 - 24223), ehT0Px3KOsy9('\060' + '\157' + '\062' + chr(0b110110) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(0b1000 + 0o50) + '\x6f' + '\x33' + chr(0b110011) + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(910 - 862) + chr(0b1101111) + chr(50) + '\067' + chr(0b1101 + 0o45), ord("\x08")), ehT0Px3KOsy9(chr(1555 - 1507) + chr(0b1101 + 0o142) + '\063' + '\x34' + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(51) + chr(215 - 162) + chr(1879 - 1830), 8), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110100) + chr(0b110110), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(111) + chr(53) + '\060', ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xdd'), chr(100) + '\x65' + chr(0b1001100 + 0o27) + '\x6f' + '\144' + chr(0b11110 + 0o107))(chr(6201 - 6084) + chr(7707 - 7591) + chr(102) + chr(45) + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def GbbcCHUNFMj5(oVre8I6UXc3b, yrDfr6ll4Ijz, WCl6VUkME_8I, GXAnqplgVlQX, Iz1jSgUKZDvt, HUAx0lWcwxPP, tQg9I_kteXAk): (svfRBGgiDhUk, GkVqzVIYtSeO) = (HUAx0lWcwxPP.NLcc3BCJnQka(ehT0Px3KOsy9('\060' + chr(0b1101111 + 0o0) + '\x30', 0o10)), HUAx0lWcwxPP.NLcc3BCJnQka(ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(49), 8))) HNja1rX7tHKt = [] sz4HVsFVF8nL = [vGrByMSYMp9h.expand([svfRBGgiDhUk, oVre8I6UXc3b.n_agents, -ehT0Px3KOsy9(chr(48) + '\157' + chr(49), 8)]) for vGrByMSYMp9h in oVre8I6UXc3b.model.state_init()] for YeT3l7JgTbWR in vQr8gNKaIaWE(GkVqzVIYtSeO): (WtwjCI_b3w8O, sz4HVsFVF8nL) = SOyfCkqhFxJa(oVre8I6UXc3b.FK0vqzZ5gPN6, HUAx0lWcwxPP[:, YeT3l7JgTbWR], sz4HVsFVF8nL) xafqLlk3kkUe(HNja1rX7tHKt, xafqLlk3kkUe(SXOLrMavuUCe(b'\x92\x14\n\xa5\xf6\xf5'), chr(0b1100100) + chr(101) + chr(0b1100011) + chr(12066 - 11955) + chr(100) + chr(4302 - 4201))(chr(854 - 737) + chr(0b1110100) + '\x66' + chr(0b111 + 0o46) + chr(0b100110 + 0o22)))(WtwjCI_b3w8O) HNja1rX7tHKt = cPHs4jX10k5l.stack(HNja1rX7tHKt, dim=ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(49), 8)) AufPQKDKrkM9 = cPHs4jX10k5l.gather(HNja1rX7tHKt[:, :-ehT0Px3KOsy9(chr(1865 - 1817) + chr(0b1001111 + 0o40) + chr(49), 8)], dim=ehT0Px3KOsy9(chr(0b110000) + chr(0b1001011 + 0o44) + '\063', ord("\x08")), index=WCl6VUkME_8I.unsqueeze(ehT0Px3KOsy9('\060' + chr(0b1010000 + 0o37) + '\x33', 8))).squeeze(ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b101110 + 0o5), 8)) wqBbnFypcMwk = [] ZF9MRGSbOxSP = [vGrByMSYMp9h.expand([svfRBGgiDhUk, oVre8I6UXc3b.n_agents, -ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(0b10000 + 0o137) + chr(0b11100 + 0o25), 8)]) for vGrByMSYMp9h in oVre8I6UXc3b.target_model.state_init()] for YeT3l7JgTbWR in vQr8gNKaIaWE(GkVqzVIYtSeO): (p01bv5wxpLtk, ZF9MRGSbOxSP) = SOyfCkqhFxJa(oVre8I6UXc3b.target_model, HUAx0lWcwxPP[:, YeT3l7JgTbWR], ZF9MRGSbOxSP) xafqLlk3kkUe(wqBbnFypcMwk, xafqLlk3kkUe(SXOLrMavuUCe(b'\x92\x14\n\xa5\xf6\xf5'), chr(0b101001 + 0o73) + '\145' + chr(0b1100011) + chr(0b1011 + 0o144) + chr(9886 - 9786) + chr(0b111010 + 0o53))('\165' + '\x74' + '\x66' + chr(45) + '\070'))(p01bv5wxpLtk) wqBbnFypcMwk = cPHs4jX10k5l.stack(wqBbnFypcMwk[ehT0Px3KOsy9('\x30' + '\157' + chr(0b110001), 8):], dim=ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x31', 8)) wqBbnFypcMwk[tQg9I_kteXAk[:, ehT0Px3KOsy9(chr(48) + chr(0b1001 + 0o146) + chr(0b110001), 8):] == ehT0Px3KOsy9('\x30' + chr(111) + '\060', 8)] = -ehT0Px3KOsy9('\060' + chr(111) + chr(2431 - 2379) + '\x36' + chr(49) + chr(49) + '\063' + chr(0b101101 + 0o4) + '\067' + chr(0b11110 + 0o31), 37293 - 37285) if xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x97\x0b\x0f\xa2\xf4\xf4\xb6:'), '\x64' + chr(0b1001001 + 0o34) + '\143' + chr(111) + '\x64' + '\145')(chr(0b101010 + 0o113) + chr(0b1110100) + chr(102) + '\055' + chr(56))): HNja1rX7tHKt[tQg9I_kteXAk == ehT0Px3KOsy9(chr(0b110000) + chr(0b1000100 + 0o53) + '\x30', 8)] = -ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(52) + '\066' + chr(1137 - 1088) + chr(49) + '\x33' + chr(49) + chr(2995 - 2940) + chr(55), 8) hCZylPmclNQw = HNja1rX7tHKt[:, ehT0Px3KOsy9('\x30' + chr(9771 - 9660) + chr(0b110001), 8):].tsdjvlgh9gDP(dim=ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(51), 8), keepdim=ehT0Px3KOsy9('\x30' + chr(111) + '\x31', 8))[ehT0Px3KOsy9('\060' + '\157' + chr(0b110001), 8)] WxV7ThGqjO0i = cPHs4jX10k5l.gather(wqBbnFypcMwk, ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(0b111101 + 0o62) + chr(51), 8), hCZylPmclNQw).squeeze(ehT0Px3KOsy9(chr(875 - 827) + chr(4832 - 4721) + chr(51), 8)) else: WxV7ThGqjO0i = wqBbnFypcMwk.tsdjvlgh9gDP(dim=ehT0Px3KOsy9(chr(48) + chr(0b100010 + 0o115) + chr(1628 - 1577), 8))[ehT0Px3KOsy9(chr(575 - 527) + chr(111) + chr(1763 - 1715), 8)] if xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9e\r\x02\xa5\xea'), chr(0b1011 + 0o131) + chr(1815 - 1714) + chr(99) + chr(927 - 816) + chr(1568 - 1468) + '\145')(chr(0b10101 + 0o140) + '\x74' + '\146' + '\x2d' + chr(2216 - 2160))) is not None: AufPQKDKrkM9 = oVre8I6UXc3b.mixer(AufPQKDKrkM9, HUAx0lWcwxPP[:, :-ehT0Px3KOsy9(chr(73 - 25) + chr(0b10111 + 0o130) + '\061', 8)]) WxV7ThGqjO0i = oVre8I6UXc3b.target_mixer(WxV7ThGqjO0i, HUAx0lWcwxPP[:, ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(1417 - 1368), 8):]) xIEmRseySp3z = yrDfr6ll4Ijz + oVre8I6UXc3b.gamma * (ehT0Px3KOsy9(chr(2302 - 2254) + chr(0b1101111) + '\x31', 8) - GXAnqplgVlQX) * WxV7ThGqjO0i qZRJ3pBDXDch = AufPQKDKrkM9 - xIEmRseySp3z.detach() Iz1jSgUKZDvt = Iz1jSgUKZDvt.expand_as(qZRJ3pBDXDch) i_S8Eb5DpsPm = qZRJ3pBDXDch * Iz1jSgUKZDvt YpO0BcZ6fMsf = (i_S8Eb5DpsPm ** ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x32', 0b1000)).xkxBmo49x2An() / Iz1jSgUKZDvt.xkxBmo49x2An() return (YpO0BcZ6fMsf, Iz1jSgUKZDvt, i_S8Eb5DpsPm, AufPQKDKrkM9, xIEmRseySp3z)
ray-project/ray
python/ray/rllib/agents/qmix/qmix_policy_graph.py
QMixPolicyGraph._unpack_observation
def _unpack_observation(self, obs_batch): """Unpacks the action mask / tuple obs from agent grouping. Returns: obs (Tensor): flattened obs tensor of shape [B, n_agents, obs_size] mask (Tensor): action mask, if any """ unpacked = _unpack_obs( np.array(obs_batch), self.observation_space.original_space, tensorlib=np) if self.has_action_mask: obs = np.concatenate( [o["obs"] for o in unpacked], axis=1).reshape([len(obs_batch), self.n_agents, self.obs_size]) action_mask = np.concatenate( [o["action_mask"] for o in unpacked], axis=1).reshape( [len(obs_batch), self.n_agents, self.n_actions]) else: obs = np.concatenate( unpacked, axis=1).reshape([len(obs_batch), self.n_agents, self.obs_size]) action_mask = np.ones( [len(obs_batch), self.n_agents, self.n_actions]) return obs, action_mask
python
def _unpack_observation(self, obs_batch): """Unpacks the action mask / tuple obs from agent grouping. Returns: obs (Tensor): flattened obs tensor of shape [B, n_agents, obs_size] mask (Tensor): action mask, if any """ unpacked = _unpack_obs( np.array(obs_batch), self.observation_space.original_space, tensorlib=np) if self.has_action_mask: obs = np.concatenate( [o["obs"] for o in unpacked], axis=1).reshape([len(obs_batch), self.n_agents, self.obs_size]) action_mask = np.concatenate( [o["action_mask"] for o in unpacked], axis=1).reshape( [len(obs_batch), self.n_agents, self.n_actions]) else: obs = np.concatenate( unpacked, axis=1).reshape([len(obs_batch), self.n_agents, self.obs_size]) action_mask = np.ones( [len(obs_batch), self.n_agents, self.n_actions]) return obs, action_mask
[ "def", "_unpack_observation", "(", "self", ",", "obs_batch", ")", ":", "unpacked", "=", "_unpack_obs", "(", "np", ".", "array", "(", "obs_batch", ")", ",", "self", ".", "observation_space", ".", "original_space", ",", "tensorlib", "=", "np", ")", "if", "self", ".", "has_action_mask", ":", "obs", "=", "np", ".", "concatenate", "(", "[", "o", "[", "\"obs\"", "]", "for", "o", "in", "unpacked", "]", ",", "axis", "=", "1", ")", ".", "reshape", "(", "[", "len", "(", "obs_batch", ")", ",", "self", ".", "n_agents", ",", "self", ".", "obs_size", "]", ")", "action_mask", "=", "np", ".", "concatenate", "(", "[", "o", "[", "\"action_mask\"", "]", "for", "o", "in", "unpacked", "]", ",", "axis", "=", "1", ")", ".", "reshape", "(", "[", "len", "(", "obs_batch", ")", ",", "self", ".", "n_agents", ",", "self", ".", "n_actions", "]", ")", "else", ":", "obs", "=", "np", ".", "concatenate", "(", "unpacked", ",", "axis", "=", "1", ")", ".", "reshape", "(", "[", "len", "(", "obs_batch", ")", ",", "self", ".", "n_agents", ",", "self", ".", "obs_size", "]", ")", "action_mask", "=", "np", ".", "ones", "(", "[", "len", "(", "obs_batch", ")", ",", "self", ".", "n_agents", ",", "self", ".", "n_actions", "]", ")", "return", "obs", ",", "action_mask" ]
Unpacks the action mask / tuple obs from agent grouping. Returns: obs (Tensor): flattened obs tensor of shape [B, n_agents, obs_size] mask (Tensor): action mask, if any
[ "Unpacks", "the", "action", "mask", "/", "tuple", "obs", "from", "agent", "grouping", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/rllib/agents/qmix/qmix_policy_graph.py#L356-L380
train
Unpacks the action mask and the observation from agent grouping.
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VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\063' + '\060' + '\064', 8529 - 8521), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110011) + chr(775 - 720) + '\065', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001) + chr(51) + chr(1594 - 1542), 37885 - 37877), ehT0Px3KOsy9('\060' + chr(111) + '\x32' + chr(0b110110) + chr(48), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110111) + '\064', 0o10), ehT0Px3KOsy9(chr(2224 - 2176) + '\x6f' + chr(1776 - 1727) + chr(51) + chr(0b110000 + 0o7), ord("\x08")), ehT0Px3KOsy9('\060' + chr(8866 - 8755) + chr(0b11000 + 0o31) + '\066' + chr(219 - 170), 0o10), ehT0Px3KOsy9('\x30' + chr(0b101 + 0o152) + '\064' + chr(2025 - 1970), 0b1000), ehT0Px3KOsy9(chr(951 - 903) + '\157' + chr(0b110001) + '\060', 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\065', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b11011 + 0o30) + '\x37' + chr(0b100111 + 0o15), 30305 - 30297), ehT0Px3KOsy9('\060' + chr(3535 - 3424) + '\062' + chr(0b110010) + chr(0b11 + 0o63), 58265 - 58257), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110011) + '\066' + chr(0b110000 + 0o2), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(51) + '\x32' + chr(49), 1046 - 1038), ehT0Px3KOsy9('\060' + chr(0b111101 + 0o62) + chr(49) + '\064' + chr(0b110100 + 0o1), 58170 - 58162), ehT0Px3KOsy9('\x30' + chr(0b1000111 + 0o50) + chr(0b10010 + 0o40) + '\060' + chr(0b110111), 51783 - 51775), ehT0Px3KOsy9('\x30' + chr(4527 - 4416) + chr(857 - 808) + '\x35' + chr(0b110 + 0o57), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110010) + '\061' + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x36' + chr(0b110101), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(0b101101 + 0o6) + chr(1613 - 1558) + chr(1558 - 1503), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\x31' + chr(0b110111) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(0b111010 + 0o65) + chr(0b110001) + chr(54) + chr(0b100100 + 0o16), 36523 - 36515), ehT0Px3KOsy9(chr(711 - 663) + chr(0b110011 + 0o74) + chr(1782 - 1728) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110010) + chr(0b110111) + chr(53), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(51) + chr(0b110010) + chr(0b110110), 7593 - 7585), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(1470 - 1420) + '\x32' + '\067', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + '\x37', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b10010 + 0o135) + chr(0b110001) + '\x30' + chr(0b11011 + 0o26), 47624 - 47616), ehT0Px3KOsy9(chr(48) + chr(111) + '\061' + chr(0b11 + 0o61) + chr(2228 - 2180), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\063' + '\063' + '\061', ord("\x08")), ehT0Px3KOsy9(chr(389 - 341) + chr(4374 - 4263) + '\x32' + chr(0b1101 + 0o46) + chr(0b101 + 0o57), 0b1000), ehT0Px3KOsy9(chr(2068 - 2020) + chr(0b1101111) + '\063' + chr(0b110011) + '\067', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b111101 + 0o62) + '\061' + '\x35' + chr(1855 - 1800), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b111101 + 0o62) + chr(49) + chr(0b110101) + chr(1990 - 1935), 8), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110001) + '\067', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(51) + chr(2493 - 2442) + chr(1630 - 1581), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011001 + 0o26) + chr(0b110011) + chr(864 - 811) + chr(0b1011 + 0o50), 0b1000), ehT0Px3KOsy9(chr(1730 - 1682) + chr(0b111110 + 0o61) + chr(55) + '\063', 14208 - 14200), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110001) + chr(0b1100 + 0o46), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(4990 - 4879) + chr(0b110101) + chr(48), 21159 - 21151)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'('), chr(8325 - 8225) + '\145' + chr(0b1100000 + 0o3) + '\157' + chr(9626 - 9526) + '\145')('\x75' + '\164' + chr(0b1100110) + chr(1300 - 1255) + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def yd0osQkp7Vwy(oVre8I6UXc3b, CZBdHmqt_9uL): vCirGNQzCsgl = LpBkZiOhUZh3(WqUC3KWvYVup.B0ePDhpqxN5n(CZBdHmqt_9uL), oVre8I6UXc3b.observation_space.original_space, tensorlib=WqUC3KWvYVup) if xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'n\xa5\x8e\x03\xd1_+\x18HfZ\x91\xf7\x81\xba'), chr(2114 - 2014) + chr(417 - 316) + '\x63' + chr(111) + chr(0b1100100 + 0o0) + chr(1268 - 1167))(chr(9616 - 9499) + chr(9809 - 9693) + chr(0b1100110) + chr(45) + '\070')): HUAx0lWcwxPP = WqUC3KWvYVup.concatenate([gb6ab8SSTLgq[xafqLlk3kkUe(SXOLrMavuUCe(b'i\xa6\x8e'), chr(9221 - 9121) + chr(0b1011111 + 0o6) + chr(0b1000111 + 0o34) + chr(111) + '\144' + '\x65')(chr(117) + chr(0b1001010 + 0o52) + chr(102) + chr(0b101101) + chr(0b101101 + 0o13))] for gb6ab8SSTLgq in vCirGNQzCsgl], axis=ehT0Px3KOsy9('\x30' + chr(0b101110 + 0o101) + chr(0b110001), ord("\x08"))).reshape([c2A0yzQpDQB3(CZBdHmqt_9uL), oVre8I6UXc3b.n_agents, oVre8I6UXc3b.obs_size]) tQg9I_kteXAk = WqUC3KWvYVup.concatenate([gb6ab8SSTLgq[xafqLlk3kkUe(SXOLrMavuUCe(b'g\xa7\x895\xdfR\x00\x1cF{n'), chr(0b1100100) + '\x65' + chr(99) + chr(0b1101111) + '\x64' + '\x65')(chr(5977 - 5860) + chr(0b1110100) + chr(0b1100110) + chr(0b10111 + 0o26) + chr(56))] for gb6ab8SSTLgq in vCirGNQzCsgl], axis=ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\061', 8)).reshape([c2A0yzQpDQB3(CZBdHmqt_9uL), oVre8I6UXc3b.n_agents, oVre8I6UXc3b.n_actions]) else: HUAx0lWcwxPP = WqUC3KWvYVup.concatenate(vCirGNQzCsgl, axis=ehT0Px3KOsy9('\060' + chr(0b1100001 + 0o16) + '\061', 8)).reshape([c2A0yzQpDQB3(CZBdHmqt_9uL), oVre8I6UXc3b.n_agents, oVre8I6UXc3b.obs_size]) tQg9I_kteXAk = WqUC3KWvYVup.ones([c2A0yzQpDQB3(CZBdHmqt_9uL), oVre8I6UXc3b.n_agents, oVre8I6UXc3b.n_actions]) return (HUAx0lWcwxPP, tQg9I_kteXAk)
ray-project/ray
python/ray/experimental/named_actors.py
get_actor
def get_actor(name): """Get a named actor which was previously created. If the actor doesn't exist, an exception will be raised. Args: name: The name of the named actor. Returns: The ActorHandle object corresponding to the name. """ actor_name = _calculate_key(name) pickled_state = _internal_kv_get(actor_name) if pickled_state is None: raise ValueError("The actor with name={} doesn't exist".format(name)) handle = pickle.loads(pickled_state) return handle
python
def get_actor(name): """Get a named actor which was previously created. If the actor doesn't exist, an exception will be raised. Args: name: The name of the named actor. Returns: The ActorHandle object corresponding to the name. """ actor_name = _calculate_key(name) pickled_state = _internal_kv_get(actor_name) if pickled_state is None: raise ValueError("The actor with name={} doesn't exist".format(name)) handle = pickle.loads(pickled_state) return handle
[ "def", "get_actor", "(", "name", ")", ":", "actor_name", "=", "_calculate_key", "(", "name", ")", "pickled_state", "=", "_internal_kv_get", "(", "actor_name", ")", "if", "pickled_state", "is", "None", ":", "raise", "ValueError", "(", "\"The actor with name={} doesn't exist\"", ".", "format", "(", "name", ")", ")", "handle", "=", "pickle", ".", "loads", "(", "pickled_state", ")", "return", "handle" ]
Get a named actor which was previously created. If the actor doesn't exist, an exception will be raised. Args: name: The name of the named actor. Returns: The ActorHandle object corresponding to the name.
[ "Get", "a", "named", "actor", "which", "was", "previously", "created", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/experimental/named_actors.py#L22-L38
train
Get a named actor which was previously created.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIF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Osy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(583 - 535) + '\157' + chr(55) + chr(343 - 290), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(1143 - 1094) + chr(1839 - 1785) + chr(0b1110 + 0o46), 0b1000), ehT0Px3KOsy9(chr(0b11 + 0o55) + '\157' + chr(51) + '\x37' + chr(2320 - 2269), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b10101 + 0o132) + chr(272 - 223) + chr(55) + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(0b11001 + 0o27) + '\157' + chr(0b1100 + 0o47) + chr(55), 38947 - 38939), ehT0Px3KOsy9(chr(1188 - 1140) + chr(0b1101111) + chr(49) + chr(50) + chr(0b1001 + 0o51), 0o10), ehT0Px3KOsy9('\060' + chr(3703 - 3592) + '\063' + chr(0b110010) + '\063', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110010) + chr(638 - 584) + chr(0b10 + 0o57), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110010) + chr(2341 - 2289) + chr(0b100011 + 0o23), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(551 - 440) + chr(50) + chr(0b110000) + chr(166 - 117), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(9653 - 9542) + chr(0b110011) + chr(1978 - 1924) + chr(0b110001), 40571 - 40563), ehT0Px3KOsy9('\x30' + chr(111) + '\065' + '\065', 29964 - 29956), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110011) + '\x32' + '\066', ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + '\062' + chr(1273 - 1225) + chr(52), 54610 - 54602), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(0b1101111) + '\x32' + '\x31' + chr(0b11101 + 0o27), 35312 - 35304), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(0b1101111) + '\062' + chr(51) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(0b1 + 0o156) + chr(2569 - 2518) + chr(0b101 + 0o55), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\x32' + '\x36' + chr(0b11100 + 0o31), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(8081 - 7970) + '\x33' + '\063' + chr(0b10000 + 0o45), 0b1000), ehT0Px3KOsy9(chr(0b110000 + 0o0) + '\157' + chr(0b110011) + '\066' + '\x35', 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(0b101110 + 0o5) + chr(54) + chr(51), 0b1000), ehT0Px3KOsy9(chr(0b101011 + 0o5) + '\x6f' + '\x33' + chr(0b110100) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(2259 - 2211) + chr(0b110010 + 0o75) + '\x32' + chr(0b1011 + 0o51) + chr(1562 - 1514), 0b1000), ehT0Px3KOsy9(chr(48) + chr(6659 - 6548) + '\061' + chr(1993 - 1942) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110010) + chr(2028 - 1980) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(0b1100 + 0o44) + chr(0b1011 + 0o144) + '\067' + chr(0b110110), 57064 - 57056), ehT0Px3KOsy9(chr(0b100100 + 0o14) + chr(0b1101111) + chr(0b110100) + chr(0b10000 + 0o41), 12888 - 12880), ehT0Px3KOsy9(chr(48) + chr(8142 - 8031) + chr(887 - 837) + chr(50), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\061' + chr(55) + '\x34', 0o10), ehT0Px3KOsy9(chr(1746 - 1698) + '\x6f' + chr(49) + chr(375 - 322) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(0b1100 + 0o44) + chr(0b1101111) + chr(49) + '\063' + chr(52), 8869 - 8861), ehT0Px3KOsy9(chr(930 - 882) + chr(858 - 747) + chr(0b110010) + '\062' + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(1911 - 1856) + chr(0b110110), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(2183 - 2133) + chr(0b110001) + chr(0b110111), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\065' + '\x30', 0b1000), ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(0b1101111) + chr(54) + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(0b110111 + 0o70) + chr(0b110000 + 0o2) + chr(2115 - 2060) + '\x35', 0b1000), ehT0Px3KOsy9(chr(344 - 296) + chr(0b1101111) + chr(50) + '\x33' + chr(1002 - 951), 0o10), ehT0Px3KOsy9(chr(59 - 11) + '\x6f' + '\061' + chr(0b1101 + 0o46) + '\062', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b111011 + 0o64) + '\x32' + chr(52), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + '\x6f' + chr(2776 - 2723) + chr(0b100011 + 0o15), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x13'), chr(100) + chr(574 - 473) + chr(0b1100011) + chr(5513 - 5402) + chr(2458 - 2358) + '\x65')(chr(2145 - 2028) + chr(0b1110100) + chr(0b1100110) + chr(0b101101) + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def u28BTdI8SBDn(AIvJRzLdDfgF): IYEZoBfsSO7M = XNF4fp8_mfUg(AIvJRzLdDfgF) V9v_mkWo7BfK = rlOhtoh54GNt(IYEZoBfsSO7M) if V9v_mkWo7BfK is None: raise q1QCh3W88sgk(xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b'i\x1c\x9e]~1\xa7\xde\xd4\xa1\x86D\xa2\xec\xac\xf0{\xd8\xb8\xc8\x88\x9e\x80=\xec[R|[\x1b|\xf0F\xe6[F'), chr(0b1010110 + 0o16) + '\145' + '\143' + '\157' + chr(100) + chr(0b1100101))('\x75' + chr(116) + '\x66' + '\x2d' + chr(0b111000)), xafqLlk3kkUe(SXOLrMavuUCe(b'k@\x89\x12W3\x80\x82\xf6\xf1\x94G'), '\144' + chr(0b10110 + 0o117) + chr(99) + chr(111) + chr(0b101010 + 0o72) + chr(10152 - 10051))(chr(567 - 450) + '\164' + chr(7099 - 6997) + chr(0b1 + 0o54) + '\x38'))(AIvJRzLdDfgF)) SxTuMqFZdzZx = b1Ng5DsPF9ZY.loads(V9v_mkWo7BfK) return SxTuMqFZdzZx
ray-project/ray
python/ray/experimental/named_actors.py
register_actor
def register_actor(name, actor_handle): """Register a named actor under a string key. Args: name: The name of the named actor. actor_handle: The actor object to be associated with this name """ if not isinstance(name, str): raise TypeError("The name argument must be a string.") if not isinstance(actor_handle, ray.actor.ActorHandle): raise TypeError("The actor_handle argument must be an ActorHandle " "object.") actor_name = _calculate_key(name) pickled_state = pickle.dumps(actor_handle) # Add the actor to Redis if it does not already exist. already_exists = _internal_kv_put(actor_name, pickled_state) if already_exists: # If the registration fails, then erase the new actor handle that # was added when pickling the actor handle. actor_handle._ray_new_actor_handles.pop() raise ValueError( "Error: the actor with name={} already exists".format(name))
python
def register_actor(name, actor_handle): """Register a named actor under a string key. Args: name: The name of the named actor. actor_handle: The actor object to be associated with this name """ if not isinstance(name, str): raise TypeError("The name argument must be a string.") if not isinstance(actor_handle, ray.actor.ActorHandle): raise TypeError("The actor_handle argument must be an ActorHandle " "object.") actor_name = _calculate_key(name) pickled_state = pickle.dumps(actor_handle) # Add the actor to Redis if it does not already exist. already_exists = _internal_kv_put(actor_name, pickled_state) if already_exists: # If the registration fails, then erase the new actor handle that # was added when pickling the actor handle. actor_handle._ray_new_actor_handles.pop() raise ValueError( "Error: the actor with name={} already exists".format(name))
[ "def", "register_actor", "(", "name", ",", "actor_handle", ")", ":", "if", "not", "isinstance", "(", "name", ",", "str", ")", ":", "raise", "TypeError", "(", "\"The name argument must be a string.\"", ")", "if", "not", "isinstance", "(", "actor_handle", ",", "ray", ".", "actor", ".", "ActorHandle", ")", ":", "raise", "TypeError", "(", "\"The actor_handle argument must be an ActorHandle \"", "\"object.\"", ")", "actor_name", "=", "_calculate_key", "(", "name", ")", "pickled_state", "=", "pickle", ".", "dumps", "(", "actor_handle", ")", "# Add the actor to Redis if it does not already exist.", "already_exists", "=", "_internal_kv_put", "(", "actor_name", ",", "pickled_state", ")", "if", "already_exists", ":", "# If the registration fails, then erase the new actor handle that", "# was added when pickling the actor handle.", "actor_handle", ".", "_ray_new_actor_handles", ".", "pop", "(", ")", "raise", "ValueError", "(", "\"Error: the actor with name={} already exists\"", ".", "format", "(", "name", ")", ")" ]
Register a named actor under a string key. Args: name: The name of the named actor. actor_handle: The actor object to be associated with this name
[ "Register", "a", "named", "actor", "under", "a", "string", "key", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/experimental/named_actors.py#L41-L63
train
Register an actor under a string key.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,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xp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\060' + chr(0b110000 + 0o77) + '\x31' + '\067' + chr(1298 - 1244), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(2513 - 2402) + '\x31' + chr(0b110100) + chr(0b110101), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110010) + chr(54) + chr(2198 - 2147), 1739 - 1731), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(0b1000 + 0o147) + '\x31' + chr(2806 - 2752) + chr(2430 - 2379), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(0b10010 + 0o41) + chr(0b11 + 0o57) + chr(0b1111 + 0o45), ord("\x08")), ehT0Px3KOsy9(chr(906 - 858) + '\x6f' + chr(51) + '\x35' + chr(708 - 654), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(1807 - 1758) + chr(0b110010) + '\x36', 0b1000), ehT0Px3KOsy9('\060' + chr(2188 - 2077) + chr(0b1010 + 0o52) + chr(1005 - 955), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1000001 + 0o56) + chr(721 - 671) + chr(0b1 + 0o61) + '\061', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + '\061' + chr(0b110100) + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b111011 + 0o64) + chr(0b110110) + chr(0b10111 + 0o31), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + '\x32' + chr(1377 - 1329), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b110011 + 0o74) + chr(0b110001) + chr(0b100010 + 0o21) + '\060', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1010100 + 0o33) + '\062' + chr(53) + '\x35', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b100101 + 0o15) + '\064' + chr(51), 0o10), ehT0Px3KOsy9('\060' + chr(0b110111 + 0o70) + '\x30', 0b1000), ehT0Px3KOsy9(chr(362 - 314) + '\x6f' + chr(53) + '\067', 26132 - 26124), ehT0Px3KOsy9(chr(0b11010 + 0o26) + '\157' + chr(50) + chr(0b100100 + 0o23) + chr(1395 - 1342), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b100010 + 0o115) + chr(0b11010 + 0o30) + chr(396 - 345) + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(0b1101111) + chr(0b110011) + chr(0b110100) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(111) + chr(0b110010) + chr(49) + chr(1117 - 1064), 0b1000), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(0b111001 + 0o66) + chr(0b110011) + chr(52) + '\065', 12759 - 12751), ehT0Px3KOsy9('\x30' + chr(0b1001000 + 0o47) + chr(49) + chr(0b101001 + 0o13) + '\061', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1001011 + 0o44) + chr(1914 - 1864) + chr(0b1 + 0o57) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(0b1001 + 0o47) + '\157' + '\061' + chr(0b101101 + 0o3) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(0b11001 + 0o27) + '\157' + '\066' + chr(2033 - 1978), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(0b110010) + '\062' + '\x37', 0b1000), ehT0Px3KOsy9(chr(1713 - 1665) + chr(8934 - 8823) + chr(50) + chr(51) + chr(0b110 + 0o61), 0b1000), ehT0Px3KOsy9(chr(2194 - 2146) + chr(0b11100 + 0o123) + '\063' + chr(0b110011) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(55) + '\x33', 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(261 - 210) + '\x30' + '\x33', 0b1000), ehT0Px3KOsy9(chr(0b10 + 0o56) + '\x6f' + chr(51) + chr(0b110000) + chr(0b100011 + 0o17), 62355 - 62347), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(52) + '\x36', 0o10), ehT0Px3KOsy9(chr(48) + chr(4374 - 4263) + '\063' + chr(419 - 371) + chr(50), 8), ehT0Px3KOsy9(chr(1297 - 1249) + chr(0b101 + 0o152) + chr(0b110011) + chr(54) + chr(0b110111), 0o10), ehT0Px3KOsy9('\060' + chr(0b111010 + 0o65) + chr(608 - 555) + '\066', 0b1000), ehT0Px3KOsy9(chr(1070 - 1022) + chr(111) + chr(0b10111 + 0o32) + chr(1462 - 1414), 0b1000), ehT0Px3KOsy9(chr(1175 - 1127) + chr(111) + chr(0b1100 + 0o46) + chr(584 - 530) + chr(0b110101 + 0o1), 0o10), ehT0Px3KOsy9(chr(797 - 749) + '\157' + chr(2220 - 2170) + chr(1417 - 1367) + '\066', 0o10), ehT0Px3KOsy9('\x30' + chr(0b11101 + 0o122) + '\062' + '\x30' + chr(0b110001 + 0o5), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(0b1101111) + chr(0b10110 + 0o37) + chr(0b101000 + 0o10), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'P'), chr(2562 - 2462) + chr(5784 - 5683) + chr(99) + '\x6f' + chr(0b100110 + 0o76) + chr(0b1001000 + 0o35))(chr(4566 - 4449) + chr(6767 - 6651) + chr(0b1001010 + 0o34) + chr(0b100011 + 0o12) + chr(958 - 902)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def SzhYGjTgbSGR(AIvJRzLdDfgF, oAhSL6kXhrhI): if not PlSM16l2KDPD(AIvJRzLdDfgF, M8_cKLkHVB2V): raise sznFqDbNBHlx(xafqLlk3kkUe(SXOLrMavuUCe(b'*\r\xd6S\xba\x8f;G\xb1\x03Bw-\xc0\xc6n[\x9d\xf1\x97\xfe\x91A\xe5!\x17\xf6\xbf\xacO\xb1\xabH\xa5\xd9'), '\x64' + chr(9250 - 9149) + '\143' + chr(0b1101111) + '\x64' + chr(1767 - 1666))(chr(117) + chr(0b1110100) + chr(102) + chr(0b101 + 0o50) + chr(56))) if not PlSM16l2KDPD(oAhSL6kXhrhI, xafqLlk3kkUe(H9zaXRrGK6Cq.actor, xafqLlk3kkUe(SXOLrMavuUCe(b'?\x06\xc7\x1c\xa6\xa67L\xf5\x0eU'), chr(0b110011 + 0o61) + chr(0b100010 + 0o103) + '\x63' + chr(111) + '\144' + chr(101))(chr(0b111110 + 0o67) + '\x74' + chr(0b1100110) + '\055' + chr(283 - 227)))): raise sznFqDbNBHlx(xafqLlk3kkUe(SXOLrMavuUCe(b'*\r\xd6S\xb5\x8d"M\xe3=Xq6\xc9\xcfe\x0f\xdc\xee\x85\xf8\x88\x04\xe90\x17\xfa\xea\xacO\xe3\xa0C\xe2\x96@(\xf7\xf5\xf2\x11\x17\xfb\x12\xba\x8a:G\xb1\rRz=\xce\xd7.'), chr(0b1100100) + chr(2197 - 2096) + chr(99) + chr(0b11011 + 0o124) + '\144' + chr(101))('\165' + chr(0b1110100) + '\146' + '\x2d' + '\070')) IYEZoBfsSO7M = XNF4fp8_mfUg(AIvJRzLdDfgF) V9v_mkWo7BfK = b1Ng5DsPF9ZY.dumps(oAhSL6kXhrhI) ScjRFwX1JAVM = Z57h8LaVkCFy(IYEZoBfsSO7M, V9v_mkWo7BfK) if ScjRFwX1JAVM: xafqLlk3kkUe(oAhSL6kXhrhI._ray_new_actor_handles, xafqLlk3kkUe(SXOLrMavuUCe(b'\x0e\n\xc3'), chr(5738 - 5638) + chr(0b1001100 + 0o31) + chr(2252 - 2153) + '\x6f' + '\144' + chr(0b1100101))('\x75' + chr(116) + '\146' + '\055' + '\070'))() raise q1QCh3W88sgk(xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b';\x17\xc1\x1c\xa6\xd4vV\xf9\x07\x10q;\xd9\xccr\x0f\xca\xf5\x96\xe5\xc5\x0f\xe6)R\xaa\xe4\xa2\x1b\xa2\xaeT\xa7\x96Jq\x96\xf3\xfe\x17\x16\xc7\x00'), chr(3311 - 3211) + chr(1368 - 1267) + chr(1604 - 1505) + chr(0b1000 + 0o147) + chr(2238 - 2138) + '\145')(chr(0b110000 + 0o105) + chr(771 - 655) + chr(0b1100110) + '\x2d' + chr(0b110101 + 0o3)), xafqLlk3kkUe(SXOLrMavuUCe(b'(Q\xc1\x1c\x9c\x8f\x05\x11\xc1\x12Uz'), chr(0b1100100) + '\x65' + '\143' + '\x6f' + '\x64' + '\x65')(chr(0b1110101) + chr(0b110010 + 0o102) + chr(8109 - 8007) + chr(45) + chr(0b10101 + 0o43)))(AIvJRzLdDfgF))
ray-project/ray
python/ray/autoscaler/autoscaler.py
check_extraneous
def check_extraneous(config, schema): """Make sure all items of config are in schema""" if not isinstance(config, dict): raise ValueError("Config {} is not a dictionary".format(config)) for k in config: if k not in schema: raise ValueError("Unexpected config key `{}` not in {}".format( k, list(schema.keys()))) v, kreq = schema[k] if v is None: continue elif isinstance(v, type): if not isinstance(config[k], v): if v is str and isinstance(config[k], string_types): continue raise ValueError( "Config key `{}` has wrong type {}, expected {}".format( k, type(config[k]).__name__, v.__name__)) else: check_extraneous(config[k], v)
python
def check_extraneous(config, schema): """Make sure all items of config are in schema""" if not isinstance(config, dict): raise ValueError("Config {} is not a dictionary".format(config)) for k in config: if k not in schema: raise ValueError("Unexpected config key `{}` not in {}".format( k, list(schema.keys()))) v, kreq = schema[k] if v is None: continue elif isinstance(v, type): if not isinstance(config[k], v): if v is str and isinstance(config[k], string_types): continue raise ValueError( "Config key `{}` has wrong type {}, expected {}".format( k, type(config[k]).__name__, v.__name__)) else: check_extraneous(config[k], v)
[ "def", "check_extraneous", "(", "config", ",", "schema", ")", ":", "if", "not", "isinstance", "(", "config", ",", "dict", ")", ":", "raise", "ValueError", "(", "\"Config {} is not a dictionary\"", ".", "format", "(", "config", ")", ")", "for", "k", "in", "config", ":", "if", "k", "not", "in", "schema", ":", "raise", "ValueError", "(", "\"Unexpected config key `{}` not in {}\"", ".", "format", "(", "k", ",", "list", "(", "schema", ".", "keys", "(", ")", ")", ")", ")", "v", ",", "kreq", "=", "schema", "[", "k", "]", "if", "v", "is", "None", ":", "continue", "elif", "isinstance", "(", "v", ",", "type", ")", ":", "if", "not", "isinstance", "(", "config", "[", "k", "]", ",", "v", ")", ":", "if", "v", "is", "str", "and", "isinstance", "(", "config", "[", "k", "]", ",", "string_types", ")", ":", "continue", "raise", "ValueError", "(", "\"Config key `{}` has wrong type {}, expected {}\"", ".", "format", "(", "k", ",", "type", "(", "config", "[", "k", "]", ")", ".", "__name__", ",", "v", ".", "__name__", ")", ")", "else", ":", "check_extraneous", "(", "config", "[", "k", "]", ",", "v", ")" ]
Make sure all items of config are in schema
[ "Make", "sure", "all", "items", "of", "config", "are", "in", "schema" ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/autoscaler/autoscaler.py#L681-L701
train
Make sure all items of config are in schema
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IK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KaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(1409 - 1361) + chr(6871 - 6760) + '\x31' + chr(55), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(50) + chr(0b110100) + chr(0b110011), 0b1000), ehT0Px3KOsy9('\060' + chr(8655 - 8544) + chr(0b110010) + chr(0b110100) + chr(51), 8), ehT0Px3KOsy9(chr(0b100 + 0o54) + '\x6f' + chr(0b110100) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(1202 - 1151) + '\062' + '\x31', 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(49) + chr(50) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(0b10100 + 0o37) + chr(55) + '\x33', 0o10), ehT0Px3KOsy9(chr(146 - 98) + chr(6096 - 5985) + chr(880 - 830) + chr(0b110000) + '\x34', 0b1000), ehT0Px3KOsy9('\060' + '\157' + '\x32' + chr(0b110101) + chr(54), 0o10), ehT0Px3KOsy9(chr(48) + chr(10417 - 10306) + chr(0b110011) + chr(691 - 636) + chr(2718 - 2663), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(1053 - 1003) + '\x31' + chr(752 - 702), ord("\x08")), ehT0Px3KOsy9(chr(903 - 855) + chr(111) + chr(0b110010) + chr(1451 - 1398) + '\x37', 40353 - 40345), ehT0Px3KOsy9(chr(1710 - 1662) + '\157' + chr(1938 - 1889) + chr(0b110001) + '\067', ord("\x08")), ehT0Px3KOsy9(chr(0b100010 + 0o16) + '\157' + '\061' + '\066' + '\x33', 14086 - 14078), ehT0Px3KOsy9(chr(0b1 + 0o57) + '\x6f' + chr(0b110010) + '\x36' + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(0b1101111) + chr(205 - 154) + '\066' + '\x34', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x33' + '\063' + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(48) + chr(8153 - 8042) + chr(50) + '\x35' + chr(0b1 + 0o63), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(8594 - 8483) + chr(0b110001) + chr(55) + '\063', 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(53) + chr(51), 0b1000), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(5781 - 5670) + '\x37' + chr(1617 - 1569), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b100001 + 0o116) + '\x37' + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110011) + '\x30' + chr(0b110110), 64491 - 64483), ehT0Px3KOsy9(chr(48) + '\157' + chr(1152 - 1103) + '\065' + chr(51), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(0b100111 + 0o14) + chr(0b110010) + chr(0b110001), 8), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b101100 + 0o6) + chr(0b10000 + 0o41) + chr(53), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b1 + 0o60) + '\x36', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\063' + '\x35' + chr(0b1000 + 0o51), 5885 - 5877), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110001 + 0o0) + '\x37' + chr(2539 - 2487), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(161 - 50) + '\x31' + '\064' + chr(400 - 351), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\061' + '\x31' + chr(1062 - 1007), 8), ehT0Px3KOsy9(chr(0b110000) + chr(5557 - 5446) + chr(0b10100 + 0o35) + '\065' + '\065', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1110 + 0o141) + chr(0b10001 + 0o41) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(0b101 + 0o53) + '\x6f' + '\061' + '\x31' + chr(0b110011), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + '\x32' + '\062' + chr(51), 0b1000), ehT0Px3KOsy9(chr(1495 - 1447) + chr(111) + chr(50) + '\067' + chr(64 - 10), 50925 - 50917), ehT0Px3KOsy9('\x30' + chr(11173 - 11062) + chr(873 - 824) + chr(0b100001 + 0o17) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(51) + '\065', 17132 - 17124), ehT0Px3KOsy9(chr(1177 - 1129) + chr(3185 - 3074) + chr(0b110010) + '\x36' + chr(0b111 + 0o53), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110010 + 0o1) + chr(1324 - 1276) + chr(50), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(0b1000 + 0o147) + '\x35' + '\x30', ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'!'), chr(0b1000 + 0o134) + chr(0b10000 + 0o125) + chr(7724 - 7625) + chr(0b1101111) + chr(2862 - 2762) + chr(0b100011 + 0o102))(chr(0b1110101) + '\x74' + chr(102) + chr(200 - 155) + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def KyUalHckCj32(jAj7S20Ct06o, P7DmIFVRivx6): if not PlSM16l2KDPD(jAj7S20Ct06o, wLqBDw8l0eIm): raise q1QCh3W88sgk(xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b'L\xcc\xcdA\xb87\xdb\xff\xd3\xdf\xe3\xdco\x1d\xdf\x80\xf9\xcd[OQ^\xb2\x02\xbe\xe3o\x9b\x05'), chr(100) + chr(0b1000110 + 0o37) + chr(0b1100011) + chr(0b1101111) + chr(0b1100100) + chr(0b1011000 + 0o15))('\165' + '\x74' + chr(4311 - 4209) + chr(1783 - 1738) + chr(0b111000)), xafqLlk3kkUe(SXOLrMavuUCe(b'Y\x97\xd1H\x991\xa8\xb7\xfe\x8f\xef\xc5'), chr(0b1100100) + '\x65' + '\x63' + '\x6f' + chr(0b1100100) + chr(0b111111 + 0o46))('\165' + chr(0b1110100) + '\x66' + '\055' + chr(56)))(jAj7S20Ct06o)) for OolUPRJhRaJd in jAj7S20Ct06o: if OolUPRJhRaJd not in P7DmIFVRivx6: raise q1QCh3W88sgk(xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b'Z\xcd\xc6_\xa15\x98\xf0\xcb\x9b\xaa\xcc \x1d\xd6\x9d\xbe\x8c\x10NA\x1d\xa6\x10\xac\xed.\x87\x13\x15o\x04zk\xe8\xc3'), '\x64' + chr(10096 - 9995) + chr(99) + '\157' + chr(0b1100100) + chr(101))('\x75' + chr(0b1001000 + 0o54) + '\146' + chr(45) + chr(904 - 848)), xafqLlk3kkUe(SXOLrMavuUCe(b'Y\x97\xd1H\x991\xa8\xb7\xfe\x8f\xef\xc5'), chr(100) + chr(0b1100101) + chr(0b111110 + 0o45) + chr(0b1101 + 0o142) + '\144' + '\x65')(chr(0b111 + 0o156) + chr(0b110 + 0o156) + chr(102) + chr(0b101101) + chr(0b111000)))(OolUPRJhRaJd, YyaZ4tpXu4lf(xafqLlk3kkUe(P7DmIFVRivx6, xafqLlk3kkUe(SXOLrMavuUCe(b'd\xc6\xdaT'), chr(100) + '\145' + chr(429 - 330) + chr(0b111010 + 0o65) + chr(100) + chr(5708 - 5607))('\165' + '\164' + chr(102) + chr(0b101101) + chr(0b111000)))()))) (cMbll0QYhULo, nyeJWgusrDZm) = P7DmIFVRivx6[OolUPRJhRaJd] if cMbll0QYhULo is None: continue elif PlSM16l2KDPD(cMbll0QYhULo, wmQmyeWBmUpv): if not PlSM16l2KDPD(jAj7S20Ct06o[OolUPRJhRaJd], cMbll0QYhULo): if cMbll0QYhULo is M8_cKLkHVB2V and PlSM16l2KDPD(jAj7S20Ct06o[OolUPRJhRaJd], sInLJQno9SRQ): continue raise q1QCh3W88sgk(xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b'L\xcc\xcdA\xb87\xdb\xef\xcb\x86\xaa\xcf4\x0e\xd0\xd4\xb1\xcd\x08\x0bOO\xa9\x05\xb6\xadz\x90\x0c\x04o\x16ig\xb3\xdb9m\xd7\xa1{\xc6\xc7\x07\xaa-'), chr(100) + chr(101) + chr(99) + '\x6f' + chr(0b1100100) + chr(0b1100010 + 0o3))(chr(0b110011 + 0o102) + chr(0b0 + 0o164) + chr(0b1100110) + '\x2d' + chr(56)), xafqLlk3kkUe(SXOLrMavuUCe(b'Y\x97\xd1H\x991\xa8\xb7\xfe\x8f\xef\xc5'), chr(0b1100100) + chr(0b1100101) + chr(1507 - 1408) + chr(0b1101111) + '\144' + chr(101))(chr(0b101 + 0o160) + '\164' + chr(0b11001 + 0o115) + chr(0b100100 + 0o11) + chr(0b1001 + 0o57)))(OolUPRJhRaJd, xafqLlk3kkUe(wmQmyeWBmUpv(jAj7S20Ct06o[OolUPRJhRaJd]), xafqLlk3kkUe(SXOLrMavuUCe(b'H\xc1\xc6M\xe5?\xa1\xf5\xe5\xb3\xcb\x99'), chr(0b1100100) + chr(0b1000 + 0o135) + chr(613 - 514) + chr(0b1100100 + 0o13) + chr(9819 - 9719) + '\145')('\x75' + '\x74' + '\x66' + '\055' + chr(0b11101 + 0o33))), xafqLlk3kkUe(cMbll0QYhULo, xafqLlk3kkUe(SXOLrMavuUCe(b'H\xc1\xc6M\xe5?\xa1\xf5\xe5\xb3\xcb\x99'), chr(0b1100100) + '\x65' + chr(0b1000011 + 0o40) + '\157' + chr(3384 - 3284) + chr(0b1010100 + 0o21))(chr(117) + '\164' + '\146' + chr(0b100001 + 0o14) + chr(0b111000))))) else: KyUalHckCj32(jAj7S20Ct06o[OolUPRJhRaJd], cMbll0QYhULo)
ray-project/ray
python/ray/autoscaler/autoscaler.py
validate_config
def validate_config(config, schema=CLUSTER_CONFIG_SCHEMA): """Required Dicts indicate that no extra fields can be introduced.""" if not isinstance(config, dict): raise ValueError("Config {} is not a dictionary".format(config)) check_required(config, schema) check_extraneous(config, schema)
python
def validate_config(config, schema=CLUSTER_CONFIG_SCHEMA): """Required Dicts indicate that no extra fields can be introduced.""" if not isinstance(config, dict): raise ValueError("Config {} is not a dictionary".format(config)) check_required(config, schema) check_extraneous(config, schema)
[ "def", "validate_config", "(", "config", ",", "schema", "=", "CLUSTER_CONFIG_SCHEMA", ")", ":", "if", "not", "isinstance", "(", "config", ",", "dict", ")", ":", "raise", "ValueError", "(", "\"Config {} is not a dictionary\"", ".", "format", "(", "config", ")", ")", "check_required", "(", "config", ",", "schema", ")", "check_extraneous", "(", "config", ",", "schema", ")" ]
Required Dicts indicate that no extra fields can be introduced.
[ "Required", "Dicts", "indicate", "that", "no", "extra", "fields", "can", "be", "introduced", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/autoscaler/autoscaler.py#L704-L710
train
Validate a cluster configuration.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,W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TRfSmY,reqGiMiVQ77y,bsS9P6_LpdIe,sbGAZlkZOtyh,Cf_Qef15s3_F,eX02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(1116 - 1068) + chr(11781 - 11670) + '\061' + chr(53) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(9332 - 9221) + '\061' + chr(0b101010 + 0o7) + chr(0b110010 + 0o3), 0o10), ehT0Px3KOsy9(chr(1197 - 1149) + chr(0b10111 + 0o130) + chr(0b110011) + chr(2573 - 2522) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(9321 - 9210) + chr(51) + chr(2161 - 2107), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(3569 - 3458) + '\062' + chr(0b110000), 51033 - 51025), ehT0Px3KOsy9(chr(0b10001 + 0o37) + '\x6f' + chr(0b110010) + chr(53) + '\062', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(673 - 622) + chr(0b110011) + chr(0b10101 + 0o41), 61681 - 61673), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x32' + chr(0b110010) + '\x32', 0o10), ehT0Px3KOsy9('\x30' + '\157' + '\x33' + '\060' + '\064', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b110000 + 0o77) + chr(0b10011 + 0o37) + '\066' + chr(486 - 432), 0o10), ehT0Px3KOsy9(chr(0b100100 + 0o14) + chr(0b1101111) + '\x33' + chr(1923 - 1872) + chr(53), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\062' + '\063' + '\066', 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + '\x31' + chr(1813 - 1763) + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(515 - 467) + '\157' + '\062' + chr(2096 - 2047) + chr(50), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1010000 + 0o37) + chr(0b110101) + chr(55), 35774 - 35766), ehT0Px3KOsy9(chr(0b100111 + 0o11) + chr(0b1101111) + '\062' + chr(0b110010), 54713 - 54705), ehT0Px3KOsy9(chr(0b110000) + chr(8074 - 7963) + chr(0b100011 + 0o17) + '\065' + chr(0b110111), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\061' + chr(0b110101) + '\x36', 0o10), ehT0Px3KOsy9(chr(1596 - 1548) + '\x6f' + '\x33' + chr(0b101101 + 0o6) + '\x35', 8), ehT0Px3KOsy9(chr(247 - 199) + chr(7839 - 7728) + '\061' + chr(54) + '\x32', 0o10), ehT0Px3KOsy9(chr(0b101100 + 0o4) + '\x6f' + '\x31', 12476 - 12468), ehT0Px3KOsy9(chr(1912 - 1864) + chr(0b1101111) + '\061' + chr(0b110011) + chr(2385 - 2330), 0o10), ehT0Px3KOsy9('\x30' + chr(3182 - 3071) + '\x32' + chr(0b110101) + chr(1230 - 1176), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(49) + '\060' + '\x33', 0o10), ehT0Px3KOsy9(chr(2123 - 2075) + chr(0b1101111 + 0o0) + '\x33' + chr(0b10 + 0o61) + chr(94 - 46), 0b1000), ehT0Px3KOsy9(chr(60 - 12) + chr(4046 - 3935) + chr(0b11100 + 0o25) + chr(1994 - 1939) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(0b1101111) + '\x33' + chr(1019 - 966) + chr(1840 - 1786), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x33' + '\065' + chr(2528 - 2473), 30827 - 30819), ehT0Px3KOsy9(chr(0b11010 + 0o26) + '\x6f' + chr(0b110011) + chr(54) + '\x33', 29181 - 29173), ehT0Px3KOsy9(chr(0b100111 + 0o11) + '\x6f' + chr(49) + '\x37' + chr(52), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1011101 + 0o22) + chr(0b100011 + 0o20) + chr(0b10001 + 0o44) + chr(0b101000 + 0o11), 6305 - 6297), ehT0Px3KOsy9('\x30' + chr(111) + '\x37' + chr(2668 - 2615), 64552 - 64544), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(0b1100010 + 0o15) + chr(50) + '\x31' + chr(0b100101 + 0o16), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b100011 + 0o20) + chr(1801 - 1752), ord("\x08")), ehT0Px3KOsy9(chr(483 - 435) + '\x6f' + '\061' + chr(0b110001) + chr(0b11001 + 0o35), 65421 - 65413), ehT0Px3KOsy9('\x30' + chr(0b1011010 + 0o25) + chr(0b110011) + chr(1004 - 949) + '\x34', 0b1000), ehT0Px3KOsy9(chr(258 - 210) + '\x6f' + chr(0b11 + 0o60) + chr(1355 - 1302) + '\x37', 8), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(0b1011111 + 0o20) + chr(0b11001 + 0o32) + chr(2403 - 2352) + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\061' + chr(0b110001) + chr(0b110100), 298 - 290), ehT0Px3KOsy9('\x30' + chr(111) + '\x33' + '\061', 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(53) + chr(0b101 + 0o53), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'F'), '\x64' + chr(9044 - 8943) + '\143' + chr(7949 - 7838) + chr(0b1100000 + 0o4) + chr(101))(chr(527 - 410) + '\164' + '\146' + chr(0b101101) + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def fZQVZLgp48PK(jAj7S20Ct06o, P7DmIFVRivx6=to2YN1FPDiWb): if not PlSM16l2KDPD(jAj7S20Ct06o, wLqBDw8l0eIm): raise q1QCh3W88sgk(xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b'+"\xb7xy\xcd\xfe\xe9\xb9\x96\xb4\xedt\xe4@f\x8f\x0f\xfd\x16h<\xda*\xb7\x17\x8f\x9d\x8a'), chr(100) + '\145' + '\x63' + '\x6f' + chr(0b1100100) + '\x65')('\x75' + chr(0b111001 + 0o73) + '\x66' + chr(0b1001 + 0o44) + '\070'), xafqLlk3kkUe(SXOLrMavuUCe(b'>y\xabqX\xcb\x8d\xa1\x94\xc6\xb8\xf4'), '\x64' + '\145' + '\143' + '\157' + '\144' + chr(0b1100101))(chr(0b101000 + 0o115) + chr(116) + chr(0b1100110) + '\055' + chr(56)))(jAj7S20Ct06o)) Po7P7AJ1ipgW(jAj7S20Ct06o, P7DmIFVRivx6) KyUalHckCj32(jAj7S20Ct06o, P7DmIFVRivx6)
ray-project/ray
python/ray/parameter.py
RayParams.update
def update(self, **kwargs): """Update the settings according to the keyword arguments. Args: kwargs: The keyword arguments to set corresponding fields. """ for arg in kwargs: if hasattr(self, arg): setattr(self, arg, kwargs[arg]) else: raise ValueError("Invalid RayParams parameter in" " update: %s" % arg) self._check_usage()
python
def update(self, **kwargs): """Update the settings according to the keyword arguments. Args: kwargs: The keyword arguments to set corresponding fields. """ for arg in kwargs: if hasattr(self, arg): setattr(self, arg, kwargs[arg]) else: raise ValueError("Invalid RayParams parameter in" " update: %s" % arg) self._check_usage()
[ "def", "update", "(", "self", ",", "*", "*", "kwargs", ")", ":", "for", "arg", "in", "kwargs", ":", "if", "hasattr", "(", "self", ",", "arg", ")", ":", "setattr", "(", "self", ",", "arg", ",", "kwargs", "[", "arg", "]", ")", "else", ":", "raise", "ValueError", "(", "\"Invalid RayParams parameter in\"", "\" update: %s\"", "%", "arg", ")", "self", ".", "_check_usage", "(", ")" ]
Update the settings according to the keyword arguments. Args: kwargs: The keyword arguments to set corresponding fields.
[ "Update", "the", "settings", "according", "to", "the", "keyword", "arguments", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/parameter.py#L149-L162
train
Update the settings according to the keyword arguments.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7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WkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\x30' + chr(10521 - 10410) + chr(49) + chr(54) + '\x32', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110011) + '\x31' + chr(0b101101 + 0o4), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(49) + chr(0b10010 + 0o40) + chr(51), 11703 - 11695), ehT0Px3KOsy9(chr(48) + chr(9920 - 9809) + '\063' + '\064' + chr(0b101100 + 0o13), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(0b1100 + 0o46) + '\062' + '\x36', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1000 + 0o147) + chr(1124 - 1073) + chr(0b110011) + chr(223 - 173), 0o10), ehT0Px3KOsy9('\060' + chr(6342 - 6231) + '\x32' + chr(0b110100) + chr(0b110010), 13353 - 13345), ehT0Px3KOsy9(chr(0b10001 + 0o37) + '\157' + '\062' + chr(0b100110 + 0o12) + chr(0b110000 + 0o6), ord("\x08")), ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(111) + '\x31' + chr(51) + '\x30', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b100111 + 0o110) + chr(0b110010) + '\063' + chr(1532 - 1484), 0b1000), ehT0Px3KOsy9(chr(899 - 851) + chr(0b1101111) + chr(0b110101), 43896 - 43888), ehT0Px3KOsy9(chr(0b110000) + chr(0b100111 + 0o110) + chr(51) + chr(0b110111) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(0b1101111) + chr(0b110011) + '\x37' + chr(1980 - 1931), ord("\x08")), ehT0Px3KOsy9(chr(1919 - 1871) + chr(111) + '\x32' + chr(747 - 699) + chr(1364 - 1311), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1100111 + 0o10) + chr(0b10000 + 0o45), 8), ehT0Px3KOsy9(chr(657 - 609) + chr(111) + chr(0b10000 + 0o46) + '\x36', 64746 - 64738), ehT0Px3KOsy9(chr(1661 - 1613) + chr(111) + '\x31' + chr(0b110101) + chr(693 - 645), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(307 - 256) + chr(0b110011) + '\063', 6559 - 6551), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(0b1101111) + chr(2531 - 2476) + chr(0b1011 + 0o47), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110010) + '\066' + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(11677 - 11566) + '\062' + '\066' + chr(0b11111 + 0o25), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\062' + chr(54) + chr(52), 8), ehT0Px3KOsy9('\x30' + chr(4180 - 4069) + chr(49) + chr(1147 - 1097) + chr(52 - 2), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(1094 - 1044) + chr(52) + '\x35', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(153 - 99) + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(52) + chr(49), 0b1000), ehT0Px3KOsy9(chr(0b11010 + 0o26) + '\x6f' + chr(50) + chr(0b110110) + chr(0b0 + 0o63), 0b1000), ehT0Px3KOsy9('\x30' + chr(11806 - 11695) + chr(0b100001 + 0o21) + chr(0b110010) + chr(2216 - 2162), 8), ehT0Px3KOsy9('\x30' + chr(111) + '\062' + chr(51) + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(7572 - 7461) + '\x33' + chr(49) + chr(55), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + '\x32' + chr(49) + chr(52), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(6751 - 6640) + '\064' + '\x30', 0o10), ehT0Px3KOsy9(chr(779 - 731) + chr(111) + chr(0b110010) + chr(0b110101) + chr(0b110 + 0o57), 58142 - 58134), ehT0Px3KOsy9(chr(48) + chr(0b100011 + 0o114) + chr(1480 - 1430) + chr(0b11101 + 0o31) + chr(0b1110 + 0o50), 0o10), ehT0Px3KOsy9('\x30' + chr(7067 - 6956) + chr(0b110001) + '\067' + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(0b1101111) + '\061' + '\x31' + '\064', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(1608 - 1559) + '\061' + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b111111 + 0o60) + chr(51) + '\060', 0b1000), ehT0Px3KOsy9(chr(0b10 + 0o56) + chr(11746 - 11635) + '\x31' + '\065' + chr(49), 0o10), ehT0Px3KOsy9(chr(398 - 350) + '\x6f' + chr(50) + chr(457 - 403) + chr(0b110001), 44270 - 44262)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(541 - 493) + chr(111) + '\x35' + '\060', ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\\'), chr(0b1010101 + 0o17) + chr(0b1100101) + chr(0b1 + 0o142) + '\157' + chr(100) + chr(0b1100101))('\165' + chr(0b1110100) + '\146' + '\x2d' + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def ZtAEiNJny4e0(oVre8I6UXc3b, **M8EIoTs2GJXE): for LTE9MPUbqSos in M8EIoTs2GJXE: if lot1PSoAwYhj(oVre8I6UXc3b, LTE9MPUbqSos): t0rOMsrOC7R_(oVre8I6UXc3b, LTE9MPUbqSos, M8EIoTs2GJXE[LTE9MPUbqSos]) else: raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b';\xa7%\x86\xfa\xb3\xc6\xa6\n\xf9|\xae\x98\xf7d[\x1b\xfbJ\xd4\xc6\xd5?\xc0DD\xc1\xb6\xf4\xa1\xacU\xdd\xd2\x1d8."I\x94\x01'), '\x64' + chr(4208 - 4107) + '\x63' + chr(0b1101111) + '\x64' + chr(101))(chr(0b1101110 + 0o7) + '\164' + '\146' + chr(0b101010 + 0o3) + chr(0b111000)) % LTE9MPUbqSos) xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'-\xaa;\x82\xf5\xb1\xfd\xf3+\xf9b\x9b'), '\x64' + chr(101) + chr(9698 - 9599) + '\x6f' + chr(785 - 685) + chr(101))('\165' + chr(5607 - 5491) + chr(0b1100110) + chr(0b10100 + 0o31) + '\x38'))()
ray-project/ray
python/ray/parameter.py
RayParams.update_if_absent
def update_if_absent(self, **kwargs): """Update the settings when the target fields are None. Args: kwargs: The keyword arguments to set corresponding fields. """ for arg in kwargs: if hasattr(self, arg): if getattr(self, arg) is None: setattr(self, arg, kwargs[arg]) else: raise ValueError("Invalid RayParams parameter in" " update_if_absent: %s" % arg) self._check_usage()
python
def update_if_absent(self, **kwargs): """Update the settings when the target fields are None. Args: kwargs: The keyword arguments to set corresponding fields. """ for arg in kwargs: if hasattr(self, arg): if getattr(self, arg) is None: setattr(self, arg, kwargs[arg]) else: raise ValueError("Invalid RayParams parameter in" " update_if_absent: %s" % arg) self._check_usage()
[ "def", "update_if_absent", "(", "self", ",", "*", "*", "kwargs", ")", ":", "for", "arg", "in", "kwargs", ":", "if", "hasattr", "(", "self", ",", "arg", ")", ":", "if", "getattr", "(", "self", ",", "arg", ")", "is", "None", ":", "setattr", "(", "self", ",", "arg", ",", "kwargs", "[", "arg", "]", ")", "else", ":", "raise", "ValueError", "(", "\"Invalid RayParams parameter in\"", "\" update_if_absent: %s\"", "%", "arg", ")", "self", ".", "_check_usage", "(", ")" ]
Update the settings when the target fields are None. Args: kwargs: The keyword arguments to set corresponding fields.
[ "Update", "the", "settings", "when", "the", "target", "fields", "are", "None", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/parameter.py#L164-L178
train
Update the settings when the target fields are None.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB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ot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + chr(0b0 + 0o157) + chr(567 - 516) + '\060' + chr(0b100 + 0o61), 54336 - 54328), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x31' + chr(50) + chr(0b1111 + 0o44), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(75 - 25) + chr(0b110110) + chr(0b100100 + 0o14), ord("\x08")), ehT0Px3KOsy9(chr(1056 - 1008) + chr(111) + '\063' + chr(0b110110) + chr(0b110111), 13224 - 13216), ehT0Px3KOsy9(chr(49 - 1) + chr(0b110000 + 0o77) + '\062' + chr(0b110100) + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(1292 - 1244) + chr(0b1101111) + chr(52) + '\061', 0b1000), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(0b1101111) + '\062' + chr(0b110100) + chr(0b110001), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(0b1101 + 0o45) + '\x37' + '\060', 25902 - 25894), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(111) + '\x37' + chr(55), 0o10), ehT0Px3KOsy9(chr(374 - 326) + chr(111) + chr(1437 - 1387) + chr(54) + chr(0b110110), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1 + 0o156) + chr(0b11110 + 0o23) + chr(0b101001 + 0o12), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(11635 - 11524) + chr(2046 - 1996) + chr(0b110110 + 0o1) + chr(733 - 681), 0b1000), ehT0Px3KOsy9(chr(0b1101 + 0o43) + '\x6f' + chr(576 - 527) + '\x31' + chr(736 - 683), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x32' + '\x34' + chr(49), 8), ehT0Px3KOsy9(chr(0b110000) + chr(3169 - 3058) + chr(0b100111 + 0o12) + chr(0b110000) + chr(49), 8558 - 8550), ehT0Px3KOsy9('\x30' + '\157' + '\x32' + '\x34' + chr(0b101011 + 0o11), 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(51) + chr(2286 - 2231) + chr(0b110000 + 0o6), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(50) + chr(0b110111), 59881 - 59873), ehT0Px3KOsy9(chr(0b11110 + 0o22) + '\157' + chr(0b110111) + chr(0b110110), 0o10), ehT0Px3KOsy9('\x30' + chr(9795 - 9684) + chr(0b110001) + chr(544 - 490) + chr(48), 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\x31' + chr(0b110000) + chr(0b101001 + 0o7), 26364 - 26356), ehT0Px3KOsy9(chr(48) + chr(0b1111 + 0o140) + chr(0b10011 + 0o37) + chr(0b110111) + chr(0b11011 + 0o31), 8), ehT0Px3KOsy9(chr(48) + '\157' + chr(49) + chr(52) + '\x33', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b11111 + 0o26) + chr(0b110110 + 0o1), 0o10), ehT0Px3KOsy9(chr(0b101101 + 0o3) + '\x6f' + chr(1718 - 1667) + '\060' + chr(53), 8), ehT0Px3KOsy9('\x30' + chr(6617 - 6506) + chr(0b110001) + chr(980 - 930) + chr(55), 55902 - 55894), ehT0Px3KOsy9(chr(0b110000) + chr(176 - 65) + chr(0b110011) + chr(0b101011 + 0o12) + '\062', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x31' + chr(0b10100 + 0o42) + '\064', 0b1000), ehT0Px3KOsy9(chr(790 - 742) + chr(0b1101111) + chr(0b110010) + chr(50) + chr(0b101100 + 0o10), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\x35' + chr(0b110111), 8), ehT0Px3KOsy9(chr(1863 - 1815) + chr(0b11001 + 0o126) + chr(0b1010 + 0o54), ord("\x08")), ehT0Px3KOsy9(chr(2282 - 2234) + '\157' + chr(0b110001) + chr(0b1011 + 0o47) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b110 + 0o52) + '\x6f' + '\x33' + chr(49) + chr(0b101100 + 0o5), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1100000 + 0o17) + chr(52 - 2) + chr(50) + chr(0b110111), 61531 - 61523), ehT0Px3KOsy9('\x30' + '\x6f' + '\x33' + chr(0b110111) + '\x35', 18869 - 18861), ehT0Px3KOsy9(chr(48) + chr(11695 - 11584) + chr(0b100111 + 0o12) + chr(0b110001), 40251 - 40243), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(49) + '\067' + chr(0b100000 + 0o21), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1010010 + 0o35) + '\062' + '\062' + chr(52), 8), ehT0Px3KOsy9('\060' + '\x6f' + '\067' + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(111) + chr(50) + chr(51) + chr(53), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(1543 - 1432) + '\x35' + chr(1509 - 1461), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xeb'), '\144' + chr(101) + chr(3323 - 3224) + chr(4863 - 4752) + '\x64' + '\145')(chr(117) + chr(116) + '\146' + chr(45) + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def n_xMimlc2bD4(oVre8I6UXc3b, **M8EIoTs2GJXE): for LTE9MPUbqSos in M8EIoTs2GJXE: if lot1PSoAwYhj(oVre8I6UXc3b, LTE9MPUbqSos): if xafqLlk3kkUe(oVre8I6UXc3b, LTE9MPUbqSos) is None: t0rOMsrOC7R_(oVre8I6UXc3b, LTE9MPUbqSos, M8EIoTs2GJXE[LTE9MPUbqSos]) else: raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b'\x8c=\xc6\x96\xc8H\xc5\x98m\xd7r\xec,\xd3 \xc9\x8d7N\x112\xdd\x0eJ\xb12\x98T\xfdA&$\xb9\xf3\x9c}\x1c\xcbQ\xfb\x9a2\xd2\x84\xc1O\xd5\x82\x1f\x93x'), chr(0b1100100) + chr(7442 - 7341) + chr(847 - 748) + chr(0b1101000 + 0o7) + '\x64' + '\x65')('\165' + chr(116) + chr(0b1100110) + '\055' + chr(0b111000)) % LTE9MPUbqSos) xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9a0\xd8\x92\xc7J\xfe\xcdL\xd7l\xd9'), chr(772 - 672) + chr(101) + chr(99) + chr(7102 - 6991) + chr(100) + chr(0b111 + 0o136))(chr(0b101010 + 0o113) + chr(0b110100 + 0o100) + chr(5031 - 4929) + '\x2d' + chr(56)))()
ray-project/ray
python/ray/actor.py
compute_actor_handle_id
def compute_actor_handle_id(actor_handle_id, num_forks): """Deterministically compute an actor handle ID. A new actor handle ID is generated when it is forked from another actor handle. The new handle ID is computed as hash(old_handle_id || num_forks). Args: actor_handle_id (common.ObjectID): The original actor handle ID. num_forks: The number of times the original actor handle has been forked so far. Returns: An ID for the new actor handle. """ assert isinstance(actor_handle_id, ActorHandleID) handle_id_hash = hashlib.sha1() handle_id_hash.update(actor_handle_id.binary()) handle_id_hash.update(str(num_forks).encode("ascii")) handle_id = handle_id_hash.digest() return ActorHandleID(handle_id)
python
def compute_actor_handle_id(actor_handle_id, num_forks): """Deterministically compute an actor handle ID. A new actor handle ID is generated when it is forked from another actor handle. The new handle ID is computed as hash(old_handle_id || num_forks). Args: actor_handle_id (common.ObjectID): The original actor handle ID. num_forks: The number of times the original actor handle has been forked so far. Returns: An ID for the new actor handle. """ assert isinstance(actor_handle_id, ActorHandleID) handle_id_hash = hashlib.sha1() handle_id_hash.update(actor_handle_id.binary()) handle_id_hash.update(str(num_forks).encode("ascii")) handle_id = handle_id_hash.digest() return ActorHandleID(handle_id)
[ "def", "compute_actor_handle_id", "(", "actor_handle_id", ",", "num_forks", ")", ":", "assert", "isinstance", "(", "actor_handle_id", ",", "ActorHandleID", ")", "handle_id_hash", "=", "hashlib", ".", "sha1", "(", ")", "handle_id_hash", ".", "update", "(", "actor_handle_id", ".", "binary", "(", ")", ")", "handle_id_hash", ".", "update", "(", "str", "(", "num_forks", ")", ".", "encode", "(", "\"ascii\"", ")", ")", "handle_id", "=", "handle_id_hash", ".", "digest", "(", ")", "return", "ActorHandleID", "(", "handle_id", ")" ]
Deterministically compute an actor handle ID. A new actor handle ID is generated when it is forked from another actor handle. The new handle ID is computed as hash(old_handle_id || num_forks). Args: actor_handle_id (common.ObjectID): The original actor handle ID. num_forks: The number of times the original actor handle has been forked so far. Returns: An ID for the new actor handle.
[ "Deterministically", "compute", "an", "actor", "handle", "ID", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/actor.py#L27-L46
train
Deterministically compute an actor handle ID.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAM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eticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x31' + chr(0b110011) + chr(52), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + '\x31' + '\x37' + '\x31', 0b1000), ehT0Px3KOsy9(chr(1247 - 1199) + chr(111) + chr(51) + '\x34' + chr(2591 - 2536), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011101 + 0o22) + chr(1454 - 1403) + chr(2524 - 2470) + chr(986 - 932), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(964 - 915) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(0b101000 + 0o10) + '\x6f' + chr(0b101010 + 0o7) + chr(0b110111), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\x37' + chr(53), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x31' + chr(474 - 423) + chr(48), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1149 - 1098) + '\062' + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1100 + 0o143) + '\x32' + '\063' + '\x33', 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b11100 + 0o25) + chr(51) + chr(49), ord("\x08")), ehT0Px3KOsy9('\060' + chr(8034 - 7923) + chr(0b100010 + 0o20) + chr(0b110 + 0o56) + '\066', 0b1000), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(0b1100110 + 0o11) + '\061' + chr(1205 - 1157) + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(50) + chr(120 - 67) + chr(2791 - 2738), ord("\x08")), ehT0Px3KOsy9(chr(2114 - 2066) + '\157' + '\x36' + '\063', 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + '\x32' + '\x32' + '\063', 26245 - 26237), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(0b10011 + 0o134) + chr(50) + chr(52) + chr(2452 - 2400), 0b1000), ehT0Px3KOsy9('\060' + chr(8122 - 8011) + '\x33' + chr(52) + '\x36', 0b1000), ehT0Px3KOsy9(chr(2102 - 2054) + chr(0b1000111 + 0o50) + chr(0b110001) + chr(0b11011 + 0o32) + '\x31', 0o10), ehT0Px3KOsy9(chr(1762 - 1714) + chr(111) + '\x32' + chr(0b110001) + chr(52), 35211 - 35203), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(0b10111 + 0o130) + chr(0b101111 + 0o2) + '\x35' + chr(54), 0o10), ehT0Px3KOsy9(chr(835 - 787) + chr(0b1101111) + chr(51) + chr(2393 - 2340), ord("\x08")), ehT0Px3KOsy9(chr(1924 - 1876) + '\x6f' + chr(0b11100 + 0o26) + '\064' + '\x36', 8), ehT0Px3KOsy9('\060' + chr(1961 - 1850) + chr(1247 - 1196) + '\x34' + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(0b100100 + 0o14) + chr(111) + chr(266 - 216) + chr(54) + chr(0b10001 + 0o40), 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\x33' + chr(0b1 + 0o65) + chr(0b1 + 0o63), 40006 - 39998), ehT0Px3KOsy9(chr(48) + chr(782 - 671) + '\x36', 19530 - 19522), ehT0Px3KOsy9('\060' + chr(0b11010 + 0o125) + '\x35' + chr(49), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110001) + chr(1290 - 1238) + '\x32', 13749 - 13741), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\062' + chr(0b11110 + 0o31) + chr(0b100110 + 0o13), 36958 - 36950), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b101000 + 0o13) + chr(798 - 745) + chr(0b101111 + 0o3), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(52) + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(2279 - 2230) + '\067' + chr(0b110001), 8), ehT0Px3KOsy9(chr(0b10001 + 0o37) + '\157' + '\062' + chr(1390 - 1337) + '\067', 0b1000), ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(0b1101111) + chr(1886 - 1835) + chr(52) + '\061', 61266 - 61258), ehT0Px3KOsy9(chr(1665 - 1617) + chr(111) + '\x31' + chr(0b110000) + chr(55), 29929 - 29921), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(0b1101111) + '\061' + chr(48) + chr(2238 - 2187), 0b1000), ehT0Px3KOsy9('\060' + chr(0b101101 + 0o102) + chr(0b10111 + 0o34) + chr(0b1 + 0o62), 0b1000), ehT0Px3KOsy9(chr(0b101110 + 0o2) + chr(7370 - 7259) + '\x32' + chr(0b100000 + 0o25) + chr(0b110010), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b101 + 0o60) + chr(0b110010), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b10110 + 0o32) + '\157' + '\065' + chr(0b110000), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'r'), chr(5345 - 5245) + chr(0b1100101) + chr(3318 - 3219) + '\157' + '\144' + chr(0b10000 + 0o125))(chr(2513 - 2396) + chr(116) + chr(0b1011000 + 0o16) + chr(45) + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def WHld5U3cd_lW(DVlK92IJxvtb, QGJTz9G8BSbd): assert PlSM16l2KDPD(DVlK92IJxvtb, kbjwfqwgoyeK) HVIU7Q9cF3yD = sNzNrLIR8V9g.sha1() xafqLlk3kkUe(HVIU7Q9cF3yD, xafqLlk3kkUe(SXOLrMavuUCe(b'\x06\r\xa6\xb3`Aw6\xaa\xaf<\x96'), chr(0b11110 + 0o106) + chr(0b1100000 + 0o5) + chr(0b1100011) + chr(8540 - 8429) + '\x64' + chr(0b1100101))(chr(117) + chr(116) + chr(0b1100110) + chr(1398 - 1353) + chr(2490 - 2434)))(xafqLlk3kkUe(DVlK92IJxvtb, xafqLlk3kkUe(SXOLrMavuUCe(b'>\x10\x89\x97{v'), '\x64' + chr(0b110010 + 0o63) + '\143' + chr(10320 - 10209) + chr(0b1001100 + 0o30) + '\x65')(chr(117) + '\164' + '\146' + '\x2d' + chr(56)))()) xafqLlk3kkUe(HVIU7Q9cF3yD, xafqLlk3kkUe(SXOLrMavuUCe(b'\x06\r\xa6\xb3`Aw6\xaa\xaf<\x96'), chr(100) + '\x65' + chr(0b111 + 0o134) + '\x6f' + chr(0b0 + 0o144) + '\145')(chr(2654 - 2537) + '\x74' + '\146' + chr(0b100111 + 0o6) + chr(1494 - 1438)))(xafqLlk3kkUe(M8_cKLkHVB2V(QGJTz9G8BSbd), xafqLlk3kkUe(SXOLrMavuUCe(b'9\x17\x84\x99mj'), '\144' + chr(101) + chr(4247 - 4148) + chr(0b1101111) + chr(100) + '\x65')(chr(0b1011 + 0o152) + chr(116) + chr(0b1001010 + 0o34) + chr(0b10110 + 0o27) + chr(1635 - 1579)))(xafqLlk3kkUe(SXOLrMavuUCe(b'=\n\x84\x9f`'), chr(7779 - 7679) + chr(0b1100101) + '\x63' + '\x6f' + '\x64' + '\145')(chr(0b110101 + 0o100) + '\164' + '\x66' + chr(511 - 466) + chr(56)))) au34sMP2KJ2c = HVIU7Q9cF3yD.digest() return kbjwfqwgoyeK(au34sMP2KJ2c)
ray-project/ray
python/ray/actor.py
compute_actor_handle_id_non_forked
def compute_actor_handle_id_non_forked(actor_handle_id, current_task_id): """Deterministically compute an actor handle ID in the non-forked case. This code path is used whenever an actor handle is pickled and unpickled (for example, if a remote function closes over an actor handle). Then, whenever the actor handle is used, a new actor handle ID will be generated on the fly as a deterministic function of the actor ID, the previous actor handle ID and the current task ID. TODO(rkn): It may be possible to cause problems by closing over multiple actor handles in a remote function, which then get unpickled and give rise to the same actor handle IDs. Args: actor_handle_id: The original actor handle ID. current_task_id: The ID of the task that is unpickling the handle. Returns: An ID for the new actor handle. """ assert isinstance(actor_handle_id, ActorHandleID) assert isinstance(current_task_id, TaskID) handle_id_hash = hashlib.sha1() handle_id_hash.update(actor_handle_id.binary()) handle_id_hash.update(current_task_id.binary()) handle_id = handle_id_hash.digest() return ActorHandleID(handle_id)
python
def compute_actor_handle_id_non_forked(actor_handle_id, current_task_id): """Deterministically compute an actor handle ID in the non-forked case. This code path is used whenever an actor handle is pickled and unpickled (for example, if a remote function closes over an actor handle). Then, whenever the actor handle is used, a new actor handle ID will be generated on the fly as a deterministic function of the actor ID, the previous actor handle ID and the current task ID. TODO(rkn): It may be possible to cause problems by closing over multiple actor handles in a remote function, which then get unpickled and give rise to the same actor handle IDs. Args: actor_handle_id: The original actor handle ID. current_task_id: The ID of the task that is unpickling the handle. Returns: An ID for the new actor handle. """ assert isinstance(actor_handle_id, ActorHandleID) assert isinstance(current_task_id, TaskID) handle_id_hash = hashlib.sha1() handle_id_hash.update(actor_handle_id.binary()) handle_id_hash.update(current_task_id.binary()) handle_id = handle_id_hash.digest() return ActorHandleID(handle_id)
[ "def", "compute_actor_handle_id_non_forked", "(", "actor_handle_id", ",", "current_task_id", ")", ":", "assert", "isinstance", "(", "actor_handle_id", ",", "ActorHandleID", ")", "assert", "isinstance", "(", "current_task_id", ",", "TaskID", ")", "handle_id_hash", "=", "hashlib", ".", "sha1", "(", ")", "handle_id_hash", ".", "update", "(", "actor_handle_id", ".", "binary", "(", ")", ")", "handle_id_hash", ".", "update", "(", "current_task_id", ".", "binary", "(", ")", ")", "handle_id", "=", "handle_id_hash", ".", "digest", "(", ")", "return", "ActorHandleID", "(", "handle_id", ")" ]
Deterministically compute an actor handle ID in the non-forked case. This code path is used whenever an actor handle is pickled and unpickled (for example, if a remote function closes over an actor handle). Then, whenever the actor handle is used, a new actor handle ID will be generated on the fly as a deterministic function of the actor ID, the previous actor handle ID and the current task ID. TODO(rkn): It may be possible to cause problems by closing over multiple actor handles in a remote function, which then get unpickled and give rise to the same actor handle IDs. Args: actor_handle_id: The original actor handle ID. current_task_id: The ID of the task that is unpickling the handle. Returns: An ID for the new actor handle.
[ "Deterministically", "compute", "an", "actor", "handle", "ID", "in", "the", "non", "-", "forked", "case", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/actor.py#L49-L75
train
Deterministically compute an actor handle ID in the non - forked case.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPvpP4xdo3,cW7yQuyEnJ6E,KOHQGQ8qLDWm,NE1Yam2HHroQ,ygAzbDzrvRMh,SBRjvOU1ufVC,hOkXjmluKZfJ,q1QCh3W88sgk,TLbJ60djyws0,rIcPej9ZqMqV,WTxpD_zsEOh2,LgE_IO_tHXvM,Kk1hd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Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x32' + chr(0b101001 + 0o15) + chr(533 - 484), 0b1000), ehT0Px3KOsy9(chr(1323 - 1275) + '\x6f' + chr(49) + chr(718 - 667), 47961 - 47953), ehT0Px3KOsy9('\060' + '\x6f' + '\x33' + '\062', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(2115 - 2004) + chr(1948 - 1897) + chr(0b110000) + chr(49), 5564 - 5556), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(111) + chr(505 - 454) + '\x32' + chr(0b101100 + 0o4), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(6684 - 6573) + chr(0b10110 + 0o34) + chr(53) + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1001 + 0o146) + chr(0b110001) + '\x32' + chr(0b110010), 0b1000), ehT0Px3KOsy9('\060' + chr(11734 - 11623) + chr(51) + chr(0b110101 + 0o2), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1011100 + 0o23) + chr(49) + '\063' + chr(51), 30839 - 30831), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(53) + '\x30', 3315 - 3307), ehT0Px3KOsy9('\060' + '\157' + chr(0b110010) + chr(54) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\063' + chr(52) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1000011 + 0o54) + '\x32' + chr(0b110011 + 0o3) + '\060', 0b1000), ehT0Px3KOsy9(chr(623 - 575) + '\x6f' + chr(0b110001) + '\x37' + '\x37', 0o10), ehT0Px3KOsy9(chr(1473 - 1425) + chr(0b1101111) + chr(0b100110 + 0o14) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\x32' + chr(0b110110) + '\x34', 9874 - 9866), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\065' + chr(0b110010), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(52), 0b1000), ehT0Px3KOsy9(chr(2029 - 1981) + chr(2832 - 2721) + chr(2276 - 2227) + chr(408 - 358) + '\x37', 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(52) + chr(0b1111 + 0o46), 0o10), ehT0Px3KOsy9('\060' + chr(12217 - 12106) + '\x33' + chr(379 - 325) + '\x37', ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(50) + chr(53) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(111) + '\x33' + chr(0b110100) + chr(0b11101 + 0o32), ord("\x08")), ehT0Px3KOsy9(chr(544 - 496) + '\x6f' + '\062' + '\065' + chr(53), 8), ehT0Px3KOsy9('\060' + chr(0b101110 + 0o101) + chr(1704 - 1655) + chr(0b110001 + 0o4) + '\066', 40564 - 40556), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(111) + '\x32' + '\x34' + chr(54), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\x32' + chr(0b11100 + 0o27) + '\x37', 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(1781 - 1730) + '\x30' + '\x33', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b111 + 0o52) + '\060' + chr(0b100111 + 0o15), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(2036 - 1986) + chr(0b11000 + 0o35) + chr(0b1011 + 0o45), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(1196 - 1146) + chr(0b1 + 0o62) + chr(52), 0o10), ehT0Px3KOsy9('\x30' + chr(1811 - 1700) + '\x33' + chr(765 - 717) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b0 + 0o62) + chr(51) + chr(0b101 + 0o60), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x30', 9530 - 9522), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(0b10 + 0o155) + chr(0b1101 + 0o45) + chr(0b101010 + 0o11) + '\x32', 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b110010) + '\x36' + '\063', 8), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b11011 + 0o27) + chr(0b11010 + 0o30) + '\x30', 0o10), ehT0Px3KOsy9(chr(2090 - 2042) + chr(0b1101111) + chr(1066 - 1016) + chr(1784 - 1730) + '\x35', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(1602 - 1547) + chr(0b11 + 0o56), ord("\x08")), ehT0Px3KOsy9(chr(0b10100 + 0o34) + '\x6f' + '\063' + chr(790 - 742) + '\x34', 30673 - 30665)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110101) + chr(0b110000), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x9f'), chr(0b1100100) + chr(0b1001001 + 0o34) + chr(0b111001 + 0o52) + chr(10889 - 10778) + chr(0b1100100) + chr(7682 - 7581))('\165' + chr(0b11110 + 0o126) + chr(102) + chr(0b101101) + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def woaFAiE2whCq(DVlK92IJxvtb, SjcyWRd98p5e): assert PlSM16l2KDPD(DVlK92IJxvtb, kbjwfqwgoyeK) assert PlSM16l2KDPD(SjcyWRd98p5e, UWrdDWNsLCrL) HVIU7Q9cF3yD = sNzNrLIR8V9g.sha1() xafqLlk3kkUe(HVIU7Q9cF3yD, xafqLlk3kkUe(SXOLrMavuUCe(b'\xeb\x7f[\x84\xb9\xe3\x18q"\x1c\xd6\xd0'), '\144' + '\145' + '\x63' + chr(111) + '\144' + chr(0b1100100 + 0o1))('\165' + '\164' + chr(0b10000 + 0o126) + chr(45) + '\070'))(xafqLlk3kkUe(DVlK92IJxvtb, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd3bt\xa0\xa2\xd4'), chr(0b1011011 + 0o11) + '\145' + chr(0b100101 + 0o76) + chr(4475 - 4364) + chr(0b1100100) + chr(101))(chr(117) + '\164' + '\x66' + chr(45) + chr(56)))()) xafqLlk3kkUe(HVIU7Q9cF3yD, xafqLlk3kkUe(SXOLrMavuUCe(b'\xeb\x7f[\x84\xb9\xe3\x18q"\x1c\xd6\xd0'), chr(100) + chr(0b1100101) + '\143' + chr(0b1101111) + chr(9986 - 9886) + chr(0b10001 + 0o124))(chr(0b1000111 + 0o56) + chr(0b1110100) + '\x66' + chr(1386 - 1341) + '\x38'))(xafqLlk3kkUe(SjcyWRd98p5e, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd3bt\xa0\xa2\xd4'), '\144' + chr(0b1001000 + 0o35) + '\143' + chr(111) + chr(0b1100100) + chr(0b1100101))(chr(10308 - 10191) + chr(116) + chr(102) + '\055' + chr(0b111000)))()) au34sMP2KJ2c = HVIU7Q9cF3yD.digest() return kbjwfqwgoyeK(au34sMP2KJ2c)
ray-project/ray
python/ray/actor.py
method
def method(*args, **kwargs): """Annotate an actor method. .. code-block:: python @ray.remote class Foo(object): @ray.method(num_return_vals=2) def bar(self): return 1, 2 f = Foo.remote() _, _ = f.bar.remote() Args: num_return_vals: The number of object IDs that should be returned by invocations of this actor method. """ assert len(args) == 0 assert len(kwargs) == 1 assert "num_return_vals" in kwargs num_return_vals = kwargs["num_return_vals"] def annotate_method(method): method.__ray_num_return_vals__ = num_return_vals return method return annotate_method
python
def method(*args, **kwargs): """Annotate an actor method. .. code-block:: python @ray.remote class Foo(object): @ray.method(num_return_vals=2) def bar(self): return 1, 2 f = Foo.remote() _, _ = f.bar.remote() Args: num_return_vals: The number of object IDs that should be returned by invocations of this actor method. """ assert len(args) == 0 assert len(kwargs) == 1 assert "num_return_vals" in kwargs num_return_vals = kwargs["num_return_vals"] def annotate_method(method): method.__ray_num_return_vals__ = num_return_vals return method return annotate_method
[ "def", "method", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "assert", "len", "(", "args", ")", "==", "0", "assert", "len", "(", "kwargs", ")", "==", "1", "assert", "\"num_return_vals\"", "in", "kwargs", "num_return_vals", "=", "kwargs", "[", "\"num_return_vals\"", "]", "def", "annotate_method", "(", "method", ")", ":", "method", ".", "__ray_num_return_vals__", "=", "num_return_vals", "return", "method", "return", "annotate_method" ]
Annotate an actor method. .. code-block:: python @ray.remote class Foo(object): @ray.method(num_return_vals=2) def bar(self): return 1, 2 f = Foo.remote() _, _ = f.bar.remote() Args: num_return_vals: The number of object IDs that should be returned by invocations of this actor method.
[ "Annotate", "an", "actor", "method", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/actor.py#L78-L106
train
Annotate an actor method.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRM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vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\060' + chr(10153 - 10042) + chr(0b100111 + 0o13) + '\x30' + chr(0b110111), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1100011 + 0o14) + chr(914 - 865) + chr(51) + '\x33', 10757 - 10749), ehT0Px3KOsy9('\060' + '\157' + '\067' + '\x33', ord("\x08")), ehT0Px3KOsy9('\060' + chr(8143 - 8032) + chr(0b11011 + 0o26) + '\x36' + chr(54), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(51) + chr(0b110100) + chr(412 - 358), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110011) + chr(54) + chr(0b11111 + 0o27), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1000010 + 0o55) + chr(0b110010) + chr(0b110011) + chr(154 - 104), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\x33' + chr(1634 - 1585) + chr(663 - 613), 0b1000), ehT0Px3KOsy9(chr(2300 - 2252) + chr(0b10111 + 0o130) + '\063' + '\060' + chr(0b110100 + 0o0), 0b1000), ehT0Px3KOsy9(chr(1130 - 1082) + chr(4547 - 4436) + '\061' + chr(0b11101 + 0o24) + chr(1562 - 1508), 0b1000), ehT0Px3KOsy9(chr(2266 - 2218) + chr(0b10110 + 0o131) + chr(0b101101 + 0o5) + '\x34' + chr(0b110110), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\062' + '\x32' + '\061', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b101110 + 0o3) + chr(2850 - 2796) + '\x34', 0o10), ehT0Px3KOsy9(chr(0b110 + 0o52) + '\x6f' + chr(0b110011) + chr(54) + '\x33', 36210 - 36202), ehT0Px3KOsy9(chr(48) + '\157' + '\062' + chr(0b10 + 0o60), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(1985 - 1930) + chr(48), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x33' + chr(0b101 + 0o61) + '\x37', 57558 - 57550), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(0b1001011 + 0o44) + chr(2109 - 2058) + chr(0b110110) + '\x37', 8), ehT0Px3KOsy9(chr(575 - 527) + '\x6f' + '\061' + chr(0b110101) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\065' + chr(0b110011), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(1708 - 1659) + chr(52) + chr(0b100011 + 0o22), 0o10), ehT0Px3KOsy9('\060' + chr(0b100000 + 0o117) + chr(0b10100 + 0o35) + chr(0b110011) + '\x35', 27761 - 27753), ehT0Px3KOsy9(chr(0b100110 + 0o12) + '\157' + chr(0b11111 + 0o24) + chr(0b110000) + chr(2828 - 2773), 41537 - 41529), ehT0Px3KOsy9(chr(0b110000) + chr(11396 - 11285) + chr(51) + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(1042 - 994) + chr(111) + chr(51) + chr(52) + chr(1854 - 1806), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110001) + chr(0b11100 + 0o33) + chr(0b10001 + 0o42), 47439 - 47431), ehT0Px3KOsy9(chr(758 - 710) + chr(0b1101111) + chr(0b101100 + 0o6) + chr(0b110001) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(2328 - 2217) + chr(49) + chr(0b110000) + chr(211 - 162), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(4798 - 4687) + chr(211 - 161) + '\x33', 47234 - 47226), ehT0Px3KOsy9(chr(1576 - 1528) + '\x6f' + chr(0b110010) + chr(53) + chr(55), 8201 - 8193), ehT0Px3KOsy9(chr(0b110000) + chr(9261 - 9150) + chr(244 - 193) + chr(0b110110) + chr(0b110011 + 0o3), 8), ehT0Px3KOsy9(chr(0b110000) + chr(3358 - 3247) + chr(1508 - 1458) + chr(0b100011 + 0o23) + '\x37', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(11092 - 10981) + chr(49) + '\x31' + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(51) + chr(0b101101 + 0o4) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(5123 - 5012) + chr(1421 - 1370) + chr(2724 - 2671) + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\061' + chr(51) + chr(0b11 + 0o63), 0o10), ehT0Px3KOsy9(chr(0b1011 + 0o45) + chr(8269 - 8158) + chr(0b110010) + chr(0b110001) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\062' + '\061' + chr(53), 8), ehT0Px3KOsy9('\x30' + chr(111) + '\x31', 0o10), ehT0Px3KOsy9(chr(743 - 695) + chr(0b1010 + 0o145) + chr(0b110011) + chr(2457 - 2402) + chr(1571 - 1518), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\065' + '\060', 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xa9'), chr(0b1011000 + 0o14) + '\145' + chr(0b10 + 0o141) + '\x6f' + chr(0b101111 + 0o65) + '\145')(chr(3446 - 3329) + '\x74' + chr(102) + '\x2d' + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def CVRCXTcnOnH6(*kJDRfRhcZHjS, **M8EIoTs2GJXE): assert c2A0yzQpDQB3(kJDRfRhcZHjS) == ehT0Px3KOsy9('\060' + chr(2263 - 2152) + chr(0b10011 + 0o35), 0b1000) assert c2A0yzQpDQB3(M8EIoTs2GJXE) == ehT0Px3KOsy9(chr(871 - 823) + chr(111) + chr(0b110001), 8) assert xafqLlk3kkUe(SXOLrMavuUCe(b'\xe9.V)\x94\x93\xee\xbf\xb6 \xf9\xe7\x15\x9fa'), chr(100) + '\145' + chr(0b1100011) + '\x6f' + '\144' + chr(101))(chr(0b1101011 + 0o12) + chr(4421 - 4305) + chr(102) + '\055' + chr(0b111000)) in M8EIoTs2GJXE Ku0iJ7hrQyI0 = M8EIoTs2GJXE[xafqLlk3kkUe(SXOLrMavuUCe(b'\xe9.V)\x94\x93\xee\xbf\xb6 \xf9\xe7\x15\x9fa'), '\144' + chr(0b100111 + 0o76) + '\x63' + chr(0b101011 + 0o104) + chr(100) + chr(0b10 + 0o143))(chr(0b1010000 + 0o45) + chr(844 - 728) + chr(102) + chr(412 - 367) + chr(56))] def lWtqAB9gPVSy(CVRCXTcnOnH6): CVRCXTcnOnH6.s_ECs_dF7kXJ = Ku0iJ7hrQyI0 return CVRCXTcnOnH6 return lWtqAB9gPVSy
ray-project/ray
python/ray/actor.py
exit_actor
def exit_actor(): """Intentionally exit the current actor. This function is used to disconnect an actor and exit the worker. Raises: Exception: An exception is raised if this is a driver or this worker is not an actor. """ worker = ray.worker.global_worker if worker.mode == ray.WORKER_MODE and not worker.actor_id.is_nil(): # Disconnect the worker from the raylet. The point of # this is so that when the worker kills itself below, the # raylet won't push an error message to the driver. worker.raylet_client.disconnect() ray.disconnect() # Disconnect global state from GCS. ray.global_state.disconnect() sys.exit(0) assert False, "This process should have terminated." else: raise Exception("exit_actor called on a non-actor worker.")
python
def exit_actor(): """Intentionally exit the current actor. This function is used to disconnect an actor and exit the worker. Raises: Exception: An exception is raised if this is a driver or this worker is not an actor. """ worker = ray.worker.global_worker if worker.mode == ray.WORKER_MODE and not worker.actor_id.is_nil(): # Disconnect the worker from the raylet. The point of # this is so that when the worker kills itself below, the # raylet won't push an error message to the driver. worker.raylet_client.disconnect() ray.disconnect() # Disconnect global state from GCS. ray.global_state.disconnect() sys.exit(0) assert False, "This process should have terminated." else: raise Exception("exit_actor called on a non-actor worker.")
[ "def", "exit_actor", "(", ")", ":", "worker", "=", "ray", ".", "worker", ".", "global_worker", "if", "worker", ".", "mode", "==", "ray", ".", "WORKER_MODE", "and", "not", "worker", ".", "actor_id", ".", "is_nil", "(", ")", ":", "# Disconnect the worker from the raylet. The point of", "# this is so that when the worker kills itself below, the", "# raylet won't push an error message to the driver.", "worker", ".", "raylet_client", ".", "disconnect", "(", ")", "ray", ".", "disconnect", "(", ")", "# Disconnect global state from GCS.", "ray", ".", "global_state", ".", "disconnect", "(", ")", "sys", ".", "exit", "(", "0", ")", "assert", "False", ",", "\"This process should have terminated.\"", "else", ":", "raise", "Exception", "(", "\"exit_actor called on a non-actor worker.\"", ")" ]
Intentionally exit the current actor. This function is used to disconnect an actor and exit the worker. Raises: Exception: An exception is raised if this is a driver or this worker is not an actor.
[ "Intentionally", "exit", "the", "current", "actor", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/actor.py#L736-L757
train
Intentionally exit the current actor.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQ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fSmY,reqGiMiVQ77y,bsS9P6_LpdIe,sbGAZlkZOtyh,Cf_Qef15s3_F,eX02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\060' + '\157' + chr(50) + chr(0b101 + 0o60) + chr(0b11010 + 0o26), ord("\x08")), ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(111) + '\x32' + '\x34' + '\x33', 0b1000), ehT0Px3KOsy9(chr(0b10111 + 0o31) + '\x6f' + chr(51) + chr(214 - 166) + chr(50), 0b1000), ehT0Px3KOsy9(chr(48) + chr(1289 - 1178) + '\x33' + chr(0b10 + 0o60) + '\067', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(0b11100 + 0o25) + chr(0b10100 + 0o41) + chr(0b1101 + 0o43), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(53) + chr(1154 - 1101), ord("\x08")), ehT0Px3KOsy9(chr(1960 - 1912) + '\x6f' + '\062' + '\061' + '\062', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x32' + chr(2005 - 1956) + '\066', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b10101 + 0o34) + chr(670 - 620), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(0b1011 + 0o50) + chr(0b100101 + 0o21) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b100 + 0o62) + '\065', 0o10), ehT0Px3KOsy9(chr(1825 - 1777) + '\157' + '\062' + '\060' + chr(63 - 14), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\064' + '\065', 19768 - 19760), ehT0Px3KOsy9(chr(0b101010 + 0o6) + '\157' + chr(2089 - 2039) + chr(49) + chr(0b101100 + 0o7), 0b1000), ehT0Px3KOsy9('\060' + chr(2440 - 2329) + '\063' + chr(2830 - 2776) + chr(2411 - 2357), 15069 - 15061), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(373 - 323) + chr(55) + '\x32', 0o10), ehT0Px3KOsy9(chr(48) + '\157' + '\x33' + chr(0b110010) + chr(0b110101), 43898 - 43890), ehT0Px3KOsy9(chr(1595 - 1547) + chr(1001 - 890) + chr(1839 - 1789) + chr(0b110010) + chr(0b10101 + 0o36), 22566 - 22558), ehT0Px3KOsy9(chr(1847 - 1799) + '\157' + chr(2272 - 2221) + chr(51) + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(2081 - 2033) + chr(7619 - 7508) + '\x36' + chr(0b100100 + 0o21), 8), ehT0Px3KOsy9(chr(0b110000) + chr(5986 - 5875) + chr(51) + '\x37' + chr(0b11011 + 0o31), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b101110 + 0o5) + chr(0b110111) + chr(1750 - 1700), 0b1000), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(0b11010 + 0o125) + '\x32' + chr(300 - 249) + '\x36', 27055 - 27047), ehT0Px3KOsy9('\x30' + '\157' + chr(53) + chr(0b110101), 8), ehT0Px3KOsy9(chr(0b101101 + 0o3) + '\x6f' + chr(2678 - 2624) + chr(54), 0b1000), ehT0Px3KOsy9(chr(1922 - 1874) + chr(0b1101111) + '\x33' + chr(1082 - 1031) + chr(0b110110), 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\065' + '\x35', 8), ehT0Px3KOsy9(chr(48) + chr(111) + chr(53) + chr(505 - 451), 0b1000), ehT0Px3KOsy9(chr(1561 - 1513) + chr(111) + chr(50) + '\065', 48205 - 48197), ehT0Px3KOsy9(chr(48) + chr(0b1001 + 0o146) + '\x33' + chr(48) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b110011 + 0o74) + '\062' + '\x36' + chr(0b11110 + 0o22), 0o10), ehT0Px3KOsy9(chr(1954 - 1906) + '\x6f' + '\x36' + chr(0b100011 + 0o22), 8), ehT0Px3KOsy9(chr(0b10110 + 0o32) + '\x6f' + chr(2382 - 2331) + '\x36' + chr(50), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\063' + chr(1350 - 1300), 41096 - 41088), ehT0Px3KOsy9(chr(48) + chr(0b11 + 0o154) + chr(853 - 803) + '\x36' + chr(50), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b101100 + 0o5) + '\064' + chr(53), 0o10), ehT0Px3KOsy9(chr(275 - 227) + chr(10937 - 10826) + chr(0b110010) + chr(0b110000) + '\062', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b10 + 0o60) + chr(651 - 601) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b111 + 0o51) + '\157' + chr(0b1100 + 0o47) + chr(1478 - 1430), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b101011 + 0o104) + chr(0b11111 + 0o22) + '\x33', 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(111) + chr(0b11100 + 0o31) + chr(1984 - 1936), 33339 - 33331)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x86'), chr(0b1000010 + 0o42) + '\145' + chr(99) + chr(0b1101111) + chr(100) + '\145')('\x75' + chr(10799 - 10683) + chr(102) + chr(628 - 583) + chr(0b100111 + 0o21)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def EBABnvAuY5Cy(): sijXcSaDomT1 = H9zaXRrGK6Cq.worker.global_worker if xafqLlk3kkUe(sijXcSaDomT1, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc5\xcc\xa6\xb2'), chr(0b1100100) + '\145' + chr(0b1100011) + '\157' + chr(100) + '\145')(chr(0b1110101) + '\164' + chr(0b1100110) + chr(0b101101) + chr(0b111000))) == xafqLlk3kkUe(H9zaXRrGK6Cq, xafqLlk3kkUe(SXOLrMavuUCe(b'\xff\xec\x90\x9c-\x7f\xd5\xc3E\xb7p'), chr(0b101 + 0o137) + chr(7225 - 7124) + chr(0b111100 + 0o47) + chr(0b1101111) + chr(0b1010100 + 0o20) + chr(9044 - 8943))(chr(0b1110101) + chr(116) + '\x66' + chr(0b10101 + 0o30) + chr(0b111000))) and (not xafqLlk3kkUe(sijXcSaDomT1.actor_id, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc1\xd0\x9d\xb9\x01A'), chr(100) + chr(0b111100 + 0o51) + '\x63' + chr(8421 - 8310) + chr(0b101110 + 0o66) + chr(3254 - 3153))('\x75' + chr(10294 - 10178) + chr(0b1100110) + chr(0b101001 + 0o4) + chr(0b111000)))()): xafqLlk3kkUe(sijXcSaDomT1.raylet_client, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcc\xca\xb1\xb4\x07C\xe4\xebi\x87'), chr(1446 - 1346) + chr(101) + chr(0b11100 + 0o107) + '\157' + chr(4366 - 4266) + chr(101))('\x75' + '\x74' + chr(0b1100110) + '\x2d' + '\070'))() xafqLlk3kkUe(H9zaXRrGK6Cq, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcc\xca\xb1\xb4\x07C\xe4\xebi\x87'), chr(1468 - 1368) + '\x65' + '\143' + '\157' + chr(9630 - 9530) + '\145')('\165' + chr(116) + chr(102) + '\x2d' + chr(56)))() xafqLlk3kkUe(H9zaXRrGK6Cq.global_state, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcc\xca\xb1\xb4\x07C\xe4\xebi\x87'), chr(100) + chr(0b1100101 + 0o0) + chr(1382 - 1283) + chr(111) + '\x64' + '\x65')(chr(0b10000 + 0o145) + '\x74' + chr(102) + chr(45) + chr(581 - 525)))() xafqLlk3kkUe(a2SYDDomXDZ2, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcd\xdb\xab\xa3'), chr(9441 - 9341) + chr(10091 - 9990) + chr(99) + '\157' + chr(0b101011 + 0o71) + chr(9753 - 9652))(chr(0b1000100 + 0o61) + '\x74' + '\x66' + chr(0b10111 + 0o26) + '\070'))(ehT0Px3KOsy9(chr(48) + chr(0b1100000 + 0o17) + chr(0b110000), 0b1000)) assert ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110000), 8), xafqLlk3kkUe(SXOLrMavuUCe(b'\xfc\xcb\xab\xa4H]\xf8\xe1i\x96F\xf2\x05\xf8\x9e\xd5\xa0\xff\xba\x15\x94\x9b\xe8H\x16\xaaH\\x\xad\xdeT\x86\x7f\xd6K'), chr(0b10 + 0o142) + chr(0b11010 + 0o113) + chr(0b1001 + 0o132) + chr(0b1000010 + 0o55) + '\144' + '\145')('\165' + chr(0b1110100) + '\x66' + '\055' + chr(56)) else: raise jLmadlzMdunT(xafqLlk3kkUe(SXOLrMavuUCe(b'\xcd\xdb\xab\xa37L\xe9\xfae\x81\x15\xe2D\xe7\x9a\xdf\xb1\xb3\xb1[\xdc\x9b\xbeCY\xb0\x00Ov\xb0\xdfG\xd2m\xdd\x17\xe9\xf4j%'), chr(0b1100010 + 0o2) + chr(0b1100101) + chr(99) + chr(0b1101111 + 0o0) + '\144' + chr(0b1100101))('\165' + chr(116) + chr(102) + chr(45) + chr(0b11 + 0o65)))
ray-project/ray
python/ray/actor.py
get_checkpoints_for_actor
def get_checkpoints_for_actor(actor_id): """Get the available checkpoints for the given actor ID, return a list sorted by checkpoint timestamp in descending order. """ checkpoint_info = ray.worker.global_state.actor_checkpoint_info(actor_id) if checkpoint_info is None: return [] checkpoints = [ Checkpoint(checkpoint_id, timestamp) for checkpoint_id, timestamp in zip(checkpoint_info["CheckpointIds"], checkpoint_info["Timestamps"]) ] return sorted( checkpoints, key=lambda checkpoint: checkpoint.timestamp, reverse=True, )
python
def get_checkpoints_for_actor(actor_id): """Get the available checkpoints for the given actor ID, return a list sorted by checkpoint timestamp in descending order. """ checkpoint_info = ray.worker.global_state.actor_checkpoint_info(actor_id) if checkpoint_info is None: return [] checkpoints = [ Checkpoint(checkpoint_id, timestamp) for checkpoint_id, timestamp in zip(checkpoint_info["CheckpointIds"], checkpoint_info["Timestamps"]) ] return sorted( checkpoints, key=lambda checkpoint: checkpoint.timestamp, reverse=True, )
[ "def", "get_checkpoints_for_actor", "(", "actor_id", ")", ":", "checkpoint_info", "=", "ray", ".", "worker", ".", "global_state", ".", "actor_checkpoint_info", "(", "actor_id", ")", "if", "checkpoint_info", "is", "None", ":", "return", "[", "]", "checkpoints", "=", "[", "Checkpoint", "(", "checkpoint_id", ",", "timestamp", ")", "for", "checkpoint_id", ",", "timestamp", "in", "zip", "(", "checkpoint_info", "[", "\"CheckpointIds\"", "]", ",", "checkpoint_info", "[", "\"Timestamps\"", "]", ")", "]", "return", "sorted", "(", "checkpoints", ",", "key", "=", "lambda", "checkpoint", ":", "checkpoint", ".", "timestamp", ",", "reverse", "=", "True", ",", ")" ]
Get the available checkpoints for the given actor ID, return a list sorted by checkpoint timestamp in descending order.
[ "Get", "the", "available", "checkpoints", "for", "the", "given", "actor", "ID", "return", "a", "list", "sorted", "by", "checkpoint", "timestamp", "in", "descending", "order", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/actor.py#L869-L884
train
Get the available checkpoints for the given actor ID.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,N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l9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110011) + '\065' + '\x34', 0b1000), ehT0Px3KOsy9('\x30' + chr(1570 - 1459) + chr(50) + chr(931 - 878) + '\067', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(51) + chr(55) + chr(0b11010 + 0o31), 13650 - 13642), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\061' + chr(2206 - 2152) + chr(50), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(50) + chr(1153 - 1103), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1000011 + 0o54) + chr(0b110010) + chr(0b110001) + chr(1385 - 1336), 0o10), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(0b1101001 + 0o6) + chr(0b11100 + 0o27) + chr(0b100110 + 0o16) + chr(0b10000 + 0o46), ord("\x08")), ehT0Px3KOsy9(chr(755 - 707) + '\157' + chr(0b10010 + 0o42) + chr(0b110111), 35064 - 35056), ehT0Px3KOsy9('\060' + '\157' + chr(50) + chr(52) + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b100000 + 0o117) + chr(50) + chr(2287 - 2236) + '\063', 53849 - 53841), ehT0Px3KOsy9(chr(48) + chr(140 - 29) + chr(1832 - 1783) + chr(2272 - 2217) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(51) + '\063' + chr(437 - 382), ord("\x08")), ehT0Px3KOsy9(chr(2133 - 2085) + chr(0b1101111) + chr(1363 - 1313) + chr(0b110100) + chr(0b110010), 8), ehT0Px3KOsy9(chr(1029 - 981) + '\157' + '\x37' + '\060', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x37' + '\061', 25906 - 25898), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\063' + '\065', 0b1000), ehT0Px3KOsy9(chr(994 - 946) + '\157' + chr(0b1110 + 0o43) + chr(53) + '\x31', 18695 - 18687), ehT0Px3KOsy9('\060' + chr(0b100001 + 0o116) + chr(0b11110 + 0o26) + chr(49), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(7114 - 7003) + '\x32' + '\x32' + '\063', 0b1000), ehT0Px3KOsy9(chr(276 - 228) + chr(0b1101111) + '\061' + '\061' + '\x37', 0o10), ehT0Px3KOsy9('\x30' + '\157' + '\061' + chr(1951 - 1896) + '\x34', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110011) + chr(0b110000) + '\x32', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1001000 + 0o47) + chr(212 - 162) + chr(0b110110) + chr(2614 - 2560), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(1006 - 957) + chr(0b110101) + chr(48), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(50) + chr(0b100111 + 0o14) + chr(1361 - 1307), 0b1000), ehT0Px3KOsy9(chr(0b100 + 0o54) + '\157' + chr(0b110011) + chr(52) + chr(50), 6332 - 6324), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(51) + chr(288 - 236) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(0b110001) + chr(0b11 + 0o60) + chr(54), 0o10), ehT0Px3KOsy9('\x30' + chr(4954 - 4843) + chr(0b101110 + 0o3) + '\065' + chr(50), 0o10), ehT0Px3KOsy9(chr(287 - 239) + chr(0b1101111) + chr(0b110010) + chr(0b110000) + chr(0b101010 + 0o15), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b10010 + 0o135) + chr(51) + chr(48) + '\x33', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b0 + 0o63) + chr(215 - 165) + chr(50), 56113 - 56105), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(671 - 622) + chr(0b101 + 0o60) + '\067', 18002 - 17994), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110001) + chr(0b10101 + 0o34) + '\x31', 0o10), ehT0Px3KOsy9(chr(0b101001 + 0o7) + '\x6f' + chr(0b100110 + 0o13) + chr(54) + chr(0b101110 + 0o5), 0o10), ehT0Px3KOsy9('\060' + chr(10755 - 10644) + '\x34' + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b1101 + 0o45) + chr(1325 - 1274) + chr(0b101000 + 0o16), 8), ehT0Px3KOsy9('\060' + chr(1167 - 1056) + chr(0b110001) + '\060' + '\x32', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + '\x31' + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(0b1101111) + chr(52) + chr(2336 - 2286), 57544 - 57536)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + '\157' + chr(1389 - 1336) + chr(48), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xc2'), chr(0b111010 + 0o52) + '\x65' + '\143' + '\157' + chr(0b1100100) + '\x65')(chr(117) + chr(0b1001011 + 0o51) + chr(1746 - 1644) + '\055' + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def NHmOcGYgYyx8(CitUWzhkzn0O): eyq6SsMzR724 = H9zaXRrGK6Cq.worker.global_state.actor_checkpoint_info(CitUWzhkzn0O) if eyq6SsMzR724 is None: return [] ZoiWO7qyi1ja = [rxowUmkdemfv(UCRFMSZQbthp, SgRbwnqVfFz7) for (UCRFMSZQbthp, SgRbwnqVfFz7) in pZ0NK2y6HRbn(eyq6SsMzR724[xafqLlk3kkUe(SXOLrMavuUCe(b'\xaf\xc7\x9e\x11y\xf9\x89N\xcc\xef7\xbb\xd1'), '\x64' + '\x65' + chr(8620 - 8521) + chr(0b1101111) + chr(0b110 + 0o136) + '\145')(chr(0b1101011 + 0o12) + chr(9318 - 9202) + chr(102) + '\x2d' + chr(0b111000))], eyq6SsMzR724[xafqLlk3kkUe(SXOLrMavuUCe(b'\xb8\xc6\x96\x17a\xfd\x87J\xd2\xe8'), chr(0b1100100) + '\145' + chr(6110 - 6011) + '\157' + chr(100) + chr(101))('\165' + chr(0b1110100) + chr(0b0 + 0o146) + '\055' + chr(0b11110 + 0o32))])] return vUlqIvNSaRMa(ZoiWO7qyi1ja, key=lambda DNoMzyusA3wb: xafqLlk3kkUe(DNoMzyusA3wb, xafqLlk3kkUe(SXOLrMavuUCe(b'\x98\xc6\x96\x17a\xfd\x87J\xd2'), chr(0b1100100) + chr(0b11100 + 0o111) + '\143' + '\x6f' + chr(0b1100100) + '\145')('\165' + '\164' + chr(9987 - 9885) + '\055' + '\070')), reverse=ehT0Px3KOsy9('\x30' + chr(10352 - 10241) + chr(0b110001), ord("\x08")))
ray-project/ray
python/ray/actor.py
ActorClass.remote
def remote(self, *args, **kwargs): """Create an actor. Args: args: These arguments are forwarded directly to the actor constructor. kwargs: These arguments are forwarded directly to the actor constructor. Returns: A handle to the newly created actor. """ return self._remote(args=args, kwargs=kwargs)
python
def remote(self, *args, **kwargs): """Create an actor. Args: args: These arguments are forwarded directly to the actor constructor. kwargs: These arguments are forwarded directly to the actor constructor. Returns: A handle to the newly created actor. """ return self._remote(args=args, kwargs=kwargs)
[ "def", "remote", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "self", ".", "_remote", "(", "args", "=", "args", ",", "kwargs", "=", "kwargs", ")" ]
Create an actor. Args: args: These arguments are forwarded directly to the actor constructor. kwargs: These arguments are forwarded directly to the actor constructor. Returns: A handle to the newly created actor.
[ "Create", "an", "actor", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/actor.py#L222-L234
train
Create an actor. handle
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPvpP4xdo3,cW7yQuyEnJ6E,KOHQGQ8qLDWm,NE1Yam2HHroQ,ygAzbDzrvRMh,SBRjvOU1ufVC,hOkXjmluKZfJ,q1QCh3W88sgk,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mo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(6176 - 6065) + chr(51) + chr(109 - 60) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b100100 + 0o14) + chr(3037 - 2926) + chr(0b110010) + '\x35' + '\064', 0b1000), ehT0Px3KOsy9(chr(843 - 795) + '\157' + chr(50) + chr(53) + '\066', 9149 - 9141), ehT0Px3KOsy9(chr(48) + chr(0b1101000 + 0o7) + chr(50) + '\066' + chr(0b110101), 55797 - 55789), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x32' + '\065' + chr(0b110100), 8), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(0b1001011 + 0o44) + chr(564 - 515) + chr(2218 - 2170) + '\064', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(9640 - 9529) + '\x32' + '\062' + chr(51), 49239 - 49231), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110001) + chr(199 - 148), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + '\063' + chr(2686 - 2634) + chr(53), 0o10), ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(111) + '\x31' + chr(0b110001) + chr(55), 0o10), ehT0Px3KOsy9('\060' + chr(5656 - 5545) + chr(49) + chr(0b10 + 0o56) + chr(310 - 258), 8), ehT0Px3KOsy9(chr(0b101111 + 0o1) + '\x6f' + '\063' + '\x33' + chr(2102 - 2052), 0o10), ehT0Px3KOsy9(chr(110 - 62) + chr(0b1101111) + '\062' + chr(552 - 498) + '\x36', 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(608 - 558) + chr(0b110001) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b11000 + 0o127) + chr(0b100110 + 0o13) + chr(0b110010) + '\063', 0o10), ehT0Px3KOsy9(chr(0b101110 + 0o2) + chr(0b1101111) + chr(0b100010 + 0o20) + '\067' + chr(0b110011), 4254 - 4246), ehT0Px3KOsy9(chr(48) + chr(0b11101 + 0o122) + chr(54) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(50) + '\x36' + chr(0b100111 + 0o13), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110001) + chr(0b110110) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(0b11 + 0o55) + '\157' + chr(0b110010) + chr(50) + chr(0b110010), 45136 - 45128), ehT0Px3KOsy9('\x30' + chr(111) + '\062' + chr(780 - 732) + chr(55), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110011 + 0o2) + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110001) + '\066' + chr(0b110111), 20192 - 20184), ehT0Px3KOsy9(chr(1941 - 1893) + chr(0b1101111) + chr(2005 - 1955) + chr(0b110000) + chr(1600 - 1550), 49979 - 49971), ehT0Px3KOsy9(chr(48) + chr(0b1100100 + 0o13) + chr(0b110011) + chr(51) + chr(0b100111 + 0o16), 0b1000), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(111) + chr(0b100100 + 0o16) + '\x30' + chr(55), 8), ehT0Px3KOsy9(chr(2301 - 2253) + chr(2898 - 2787) + chr(49) + chr(0b110110) + chr(1785 - 1735), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(2353 - 2303) + chr(0b110100) + chr(1736 - 1681), ord("\x08")), ehT0Px3KOsy9(chr(1853 - 1805) + '\x6f' + chr(51) + chr(54) + '\x34', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110010) + '\x30' + chr(913 - 865), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(1285 - 1234) + chr(50) + '\x32', 2141 - 2133), ehT0Px3KOsy9(chr(0b100110 + 0o12) + '\157' + chr(0b110001) + chr(48) + chr(52), 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b1110 + 0o43) + '\x32' + chr(1802 - 1751), 8), ehT0Px3KOsy9(chr(48) + '\157' + '\061' + chr(1386 - 1333), 34061 - 34053), ehT0Px3KOsy9(chr(1397 - 1349) + chr(0b1101111) + chr(184 - 133) + '\x37' + chr(0b101001 + 0o14), 0b1000), ehT0Px3KOsy9(chr(0b10111 + 0o31) + '\x6f' + chr(2281 - 2230) + chr(0b110010), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(49) + chr(0b110001) + chr(2035 - 1987), 0b1000), ehT0Px3KOsy9(chr(504 - 456) + chr(111) + chr(0b100100 + 0o15) + chr(0b110001) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110001) + '\x30' + '\x34', 8), ehT0Px3KOsy9(chr(48) + '\157' + chr(49) + chr(50) + chr(0b11101 + 0o32), 4388 - 4380)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(1960 - 1912) + '\157' + chr(1632 - 1579) + chr(0b110000), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xe4'), chr(0b1100100) + chr(0b1100101) + '\x63' + '\x6f' + '\144' + '\x65')('\x75' + chr(116) + chr(102) + chr(0b11010 + 0o23) + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def p1xJaV_tyCLH(oVre8I6UXc3b, *kJDRfRhcZHjS, **M8EIoTs2GJXE): return xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x95\xde\xcb\xd8\xc30\xf6'), '\144' + chr(2984 - 2883) + chr(99) + chr(111) + '\144' + '\145')('\x75' + chr(116) + '\x66' + chr(0b101101) + '\070'))(args=kJDRfRhcZHjS, kwargs=M8EIoTs2GJXE)
ray-project/ray
python/ray/actor.py
ActorClass._remote
def _remote(self, args=None, kwargs=None, num_cpus=None, num_gpus=None, resources=None): """Create an actor. This method allows more flexibility than the remote method because resource requirements can be specified and override the defaults in the decorator. Args: args: The arguments to forward to the actor constructor. kwargs: The keyword arguments to forward to the actor constructor. num_cpus: The number of CPUs required by the actor creation task. num_gpus: The number of GPUs required by the actor creation task. resources: The custom resources required by the actor creation task. Returns: A handle to the newly created actor. """ if args is None: args = [] if kwargs is None: kwargs = {} worker = ray.worker.get_global_worker() if worker.mode is None: raise Exception("Actors cannot be created before ray.init() " "has been called.") actor_id = ActorID(_random_string()) # The actor cursor is a dummy object representing the most recent # actor method invocation. For each subsequent method invocation, # the current cursor should be added as a dependency, and then # updated to reflect the new invocation. actor_cursor = None # Set the actor's default resources if not already set. First three # conditions are to check that no resources were specified in the # decorator. Last three conditions are to check that no resources were # specified when _remote() was called. if (self._num_cpus is None and self._num_gpus is None and self._resources is None and num_cpus is None and num_gpus is None and resources is None): # In the default case, actors acquire no resources for # their lifetime, and actor methods will require 1 CPU. cpus_to_use = ray_constants.DEFAULT_ACTOR_CREATION_CPU_SIMPLE actor_method_cpu = ray_constants.DEFAULT_ACTOR_METHOD_CPU_SIMPLE else: # If any resources are specified (here or in decorator), then # all resources are acquired for the actor's lifetime and no # resources are associated with methods. cpus_to_use = (ray_constants.DEFAULT_ACTOR_CREATION_CPU_SPECIFIED if self._num_cpus is None else self._num_cpus) actor_method_cpu = ray_constants.DEFAULT_ACTOR_METHOD_CPU_SPECIFIED # Do not export the actor class or the actor if run in LOCAL_MODE # Instead, instantiate the actor locally and add it to the worker's # dictionary if worker.mode == ray.LOCAL_MODE: worker.actors[actor_id] = self._modified_class( *copy.deepcopy(args), **copy.deepcopy(kwargs)) else: # Export the actor. if not self._exported: worker.function_actor_manager.export_actor_class( self._modified_class, self._actor_method_names) self._exported = True resources = ray.utils.resources_from_resource_arguments( cpus_to_use, self._num_gpus, self._resources, num_cpus, num_gpus, resources) # If the actor methods require CPU resources, then set the required # placement resources. If actor_placement_resources is empty, then # the required placement resources will be the same as resources. actor_placement_resources = {} assert actor_method_cpu in [0, 1] if actor_method_cpu == 1: actor_placement_resources = resources.copy() actor_placement_resources["CPU"] += 1 function_name = "__init__" function_signature = self._method_signatures[function_name] creation_args = signature.extend_args(function_signature, args, kwargs) function_descriptor = FunctionDescriptor( self._modified_class.__module__, function_name, self._modified_class.__name__) [actor_cursor] = worker.submit_task( function_descriptor, creation_args, actor_creation_id=actor_id, max_actor_reconstructions=self._max_reconstructions, num_return_vals=1, resources=resources, placement_resources=actor_placement_resources) assert isinstance(actor_cursor, ObjectID) actor_handle = ActorHandle( actor_id, self._modified_class.__module__, self._class_name, actor_cursor, self._actor_method_names, self._method_signatures, self._actor_method_num_return_vals, actor_cursor, actor_method_cpu, worker.task_driver_id) # We increment the actor counter by 1 to account for the actor creation # task. actor_handle._ray_actor_counter += 1 return actor_handle
python
def _remote(self, args=None, kwargs=None, num_cpus=None, num_gpus=None, resources=None): """Create an actor. This method allows more flexibility than the remote method because resource requirements can be specified and override the defaults in the decorator. Args: args: The arguments to forward to the actor constructor. kwargs: The keyword arguments to forward to the actor constructor. num_cpus: The number of CPUs required by the actor creation task. num_gpus: The number of GPUs required by the actor creation task. resources: The custom resources required by the actor creation task. Returns: A handle to the newly created actor. """ if args is None: args = [] if kwargs is None: kwargs = {} worker = ray.worker.get_global_worker() if worker.mode is None: raise Exception("Actors cannot be created before ray.init() " "has been called.") actor_id = ActorID(_random_string()) # The actor cursor is a dummy object representing the most recent # actor method invocation. For each subsequent method invocation, # the current cursor should be added as a dependency, and then # updated to reflect the new invocation. actor_cursor = None # Set the actor's default resources if not already set. First three # conditions are to check that no resources were specified in the # decorator. Last three conditions are to check that no resources were # specified when _remote() was called. if (self._num_cpus is None and self._num_gpus is None and self._resources is None and num_cpus is None and num_gpus is None and resources is None): # In the default case, actors acquire no resources for # their lifetime, and actor methods will require 1 CPU. cpus_to_use = ray_constants.DEFAULT_ACTOR_CREATION_CPU_SIMPLE actor_method_cpu = ray_constants.DEFAULT_ACTOR_METHOD_CPU_SIMPLE else: # If any resources are specified (here or in decorator), then # all resources are acquired for the actor's lifetime and no # resources are associated with methods. cpus_to_use = (ray_constants.DEFAULT_ACTOR_CREATION_CPU_SPECIFIED if self._num_cpus is None else self._num_cpus) actor_method_cpu = ray_constants.DEFAULT_ACTOR_METHOD_CPU_SPECIFIED # Do not export the actor class or the actor if run in LOCAL_MODE # Instead, instantiate the actor locally and add it to the worker's # dictionary if worker.mode == ray.LOCAL_MODE: worker.actors[actor_id] = self._modified_class( *copy.deepcopy(args), **copy.deepcopy(kwargs)) else: # Export the actor. if not self._exported: worker.function_actor_manager.export_actor_class( self._modified_class, self._actor_method_names) self._exported = True resources = ray.utils.resources_from_resource_arguments( cpus_to_use, self._num_gpus, self._resources, num_cpus, num_gpus, resources) # If the actor methods require CPU resources, then set the required # placement resources. If actor_placement_resources is empty, then # the required placement resources will be the same as resources. actor_placement_resources = {} assert actor_method_cpu in [0, 1] if actor_method_cpu == 1: actor_placement_resources = resources.copy() actor_placement_resources["CPU"] += 1 function_name = "__init__" function_signature = self._method_signatures[function_name] creation_args = signature.extend_args(function_signature, args, kwargs) function_descriptor = FunctionDescriptor( self._modified_class.__module__, function_name, self._modified_class.__name__) [actor_cursor] = worker.submit_task( function_descriptor, creation_args, actor_creation_id=actor_id, max_actor_reconstructions=self._max_reconstructions, num_return_vals=1, resources=resources, placement_resources=actor_placement_resources) assert isinstance(actor_cursor, ObjectID) actor_handle = ActorHandle( actor_id, self._modified_class.__module__, self._class_name, actor_cursor, self._actor_method_names, self._method_signatures, self._actor_method_num_return_vals, actor_cursor, actor_method_cpu, worker.task_driver_id) # We increment the actor counter by 1 to account for the actor creation # task. actor_handle._ray_actor_counter += 1 return actor_handle
[ "def", "_remote", "(", "self", ",", "args", "=", "None", ",", "kwargs", "=", "None", ",", "num_cpus", "=", "None", ",", "num_gpus", "=", "None", ",", "resources", "=", "None", ")", ":", "if", "args", "is", "None", ":", "args", "=", "[", "]", "if", "kwargs", "is", "None", ":", "kwargs", "=", "{", "}", "worker", "=", "ray", ".", "worker", ".", "get_global_worker", "(", ")", "if", "worker", ".", "mode", "is", "None", ":", "raise", "Exception", "(", "\"Actors cannot be created before ray.init() \"", "\"has been called.\"", ")", "actor_id", "=", "ActorID", "(", "_random_string", "(", ")", ")", "# The actor cursor is a dummy object representing the most recent", "# actor method invocation. For each subsequent method invocation,", "# the current cursor should be added as a dependency, and then", "# updated to reflect the new invocation.", "actor_cursor", "=", "None", "# Set the actor's default resources if not already set. First three", "# conditions are to check that no resources were specified in the", "# decorator. Last three conditions are to check that no resources were", "# specified when _remote() was called.", "if", "(", "self", ".", "_num_cpus", "is", "None", "and", "self", ".", "_num_gpus", "is", "None", "and", "self", ".", "_resources", "is", "None", "and", "num_cpus", "is", "None", "and", "num_gpus", "is", "None", "and", "resources", "is", "None", ")", ":", "# In the default case, actors acquire no resources for", "# their lifetime, and actor methods will require 1 CPU.", "cpus_to_use", "=", "ray_constants", ".", "DEFAULT_ACTOR_CREATION_CPU_SIMPLE", "actor_method_cpu", "=", "ray_constants", ".", "DEFAULT_ACTOR_METHOD_CPU_SIMPLE", "else", ":", "# If any resources are specified (here or in decorator), then", "# all resources are acquired for the actor's lifetime and no", "# resources are associated with methods.", "cpus_to_use", "=", "(", "ray_constants", ".", "DEFAULT_ACTOR_CREATION_CPU_SPECIFIED", "if", "self", ".", "_num_cpus", "is", "None", "else", "self", ".", "_num_cpus", ")", "actor_method_cpu", "=", "ray_constants", ".", "DEFAULT_ACTOR_METHOD_CPU_SPECIFIED", "# Do not export the actor class or the actor if run in LOCAL_MODE", "# Instead, instantiate the actor locally and add it to the worker's", "# dictionary", "if", "worker", ".", "mode", "==", "ray", ".", "LOCAL_MODE", ":", "worker", ".", "actors", "[", "actor_id", "]", "=", "self", ".", "_modified_class", "(", "*", "copy", ".", "deepcopy", "(", "args", ")", ",", "*", "*", "copy", ".", "deepcopy", "(", "kwargs", ")", ")", "else", ":", "# Export the actor.", "if", "not", "self", ".", "_exported", ":", "worker", ".", "function_actor_manager", ".", "export_actor_class", "(", "self", ".", "_modified_class", ",", "self", ".", "_actor_method_names", ")", "self", ".", "_exported", "=", "True", "resources", "=", "ray", ".", "utils", ".", "resources_from_resource_arguments", "(", "cpus_to_use", ",", "self", ".", "_num_gpus", ",", "self", ".", "_resources", ",", "num_cpus", ",", "num_gpus", ",", "resources", ")", "# If the actor methods require CPU resources, then set the required", "# placement resources. If actor_placement_resources is empty, then", "# the required placement resources will be the same as resources.", "actor_placement_resources", "=", "{", "}", "assert", "actor_method_cpu", "in", "[", "0", ",", "1", "]", "if", "actor_method_cpu", "==", "1", ":", "actor_placement_resources", "=", "resources", ".", "copy", "(", ")", "actor_placement_resources", "[", "\"CPU\"", "]", "+=", "1", "function_name", "=", "\"__init__\"", "function_signature", "=", "self", ".", "_method_signatures", "[", "function_name", "]", "creation_args", "=", "signature", ".", "extend_args", "(", "function_signature", ",", "args", ",", "kwargs", ")", "function_descriptor", "=", "FunctionDescriptor", "(", "self", ".", "_modified_class", ".", "__module__", ",", "function_name", ",", "self", ".", "_modified_class", ".", "__name__", ")", "[", "actor_cursor", "]", "=", "worker", ".", "submit_task", "(", "function_descriptor", ",", "creation_args", ",", "actor_creation_id", "=", "actor_id", ",", "max_actor_reconstructions", "=", "self", ".", "_max_reconstructions", ",", "num_return_vals", "=", "1", ",", "resources", "=", "resources", ",", "placement_resources", "=", "actor_placement_resources", ")", "assert", "isinstance", "(", "actor_cursor", ",", "ObjectID", ")", "actor_handle", "=", "ActorHandle", "(", "actor_id", ",", "self", ".", "_modified_class", ".", "__module__", ",", "self", ".", "_class_name", ",", "actor_cursor", ",", "self", ".", "_actor_method_names", ",", "self", ".", "_method_signatures", ",", "self", ".", "_actor_method_num_return_vals", ",", "actor_cursor", ",", "actor_method_cpu", ",", "worker", ".", "task_driver_id", ")", "# We increment the actor counter by 1 to account for the actor creation", "# task.", "actor_handle", ".", "_ray_actor_counter", "+=", "1", "return", "actor_handle" ]
Create an actor. This method allows more flexibility than the remote method because resource requirements can be specified and override the defaults in the decorator. Args: args: The arguments to forward to the actor constructor. kwargs: The keyword arguments to forward to the actor constructor. num_cpus: The number of CPUs required by the actor creation task. num_gpus: The number of GPUs required by the actor creation task. resources: The custom resources required by the actor creation task. Returns: A handle to the newly created actor.
[ "Create", "an", "actor", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/actor.py#L236-L347
train
Create an actor. This method allows more flexibility than the remote method.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Q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,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + chr(111) + chr(1778 - 1728) + chr(920 - 866) + chr(1474 - 1419), 38301 - 38293), ehT0Px3KOsy9('\x30' + chr(0b1101 + 0o142) + chr(2131 - 2078) + chr(53), 0b1000), ehT0Px3KOsy9(chr(1970 - 1922) + chr(0b1101111) + chr(554 - 503) + chr(58 - 7) + chr(0b110000), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + '\063' + chr(52) + chr(1885 - 1835), ord("\x08")), ehT0Px3KOsy9('\060' + chr(7326 - 7215) + chr(0b110011) + chr(1353 - 1302) + '\x34', 7651 - 7643), ehT0Px3KOsy9(chr(1945 - 1897) + chr(111) + chr(51) + chr(0b11000 + 0o34) + chr(2368 - 2317), 0o10), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(0b100000 + 0o117) + '\x33' + chr(0b1101 + 0o46) + '\066', 41303 - 41295), ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(111) + chr(0b110011) + chr(0b110100) + chr(113 - 65), 0o10), ehT0Px3KOsy9(chr(0b10000 + 0o40) + '\x6f' + chr(1859 - 1809) + '\x37' + chr(2381 - 2332), ord("\x08")), ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(0b1101111) + chr(55) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(2401 - 2290) + chr(0b11111 + 0o22) + chr(929 - 876) + chr(1686 - 1636), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000111 + 0o50) + chr(49) + chr(0b110000) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b11010 + 0o26) + '\x6f' + chr(0b11000 + 0o32) + '\x30' + chr(50), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\061' + chr(0b101000 + 0o12) + '\x31', 23801 - 23793), ehT0Px3KOsy9(chr(1641 - 1593) + '\157' + chr(0b1101 + 0o46) + chr(49) + '\x31', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101011 + 0o4) + '\061' + chr(0b100011 + 0o16) + chr(50), 4655 - 4647), ehT0Px3KOsy9(chr(1428 - 1380) + chr(0b1101111) + chr(0b110001) + chr(0b110100) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(0b1101011 + 0o4) + '\063' + '\x31' + chr(0b110010), 6455 - 6447), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110111), 3503 - 3495), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110011) + '\065' + chr(0b1 + 0o66), 22730 - 22722), ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(0b1101001 + 0o6) + '\062' + chr(0b110100) + chr(2165 - 2112), 1404 - 1396), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x31' + '\061' + chr(49), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(2392 - 2343) + chr(0b110100), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(51) + chr(0b100001 + 0o24), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(750 - 700) + chr(51) + chr(0b10100 + 0o42), 53601 - 53593), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b100101 + 0o20) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(982 - 871) + chr(0b110001) + '\064' + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(0b1101110 + 0o1) + chr(0b100000 + 0o24) + '\x33', 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(1911 - 1860) + '\x37' + chr(53), 0b1000), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(0b1010100 + 0o33) + '\x31' + '\x30' + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110001) + chr(0b110000) + chr(53), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x32' + '\x33' + chr(674 - 625), 62122 - 62114), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110001) + chr(49) + '\x37', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\064' + '\060', 0o10), ehT0Px3KOsy9(chr(48) + chr(12212 - 12101) + '\063' + chr(0b110101) + chr(50), 0o10), ehT0Px3KOsy9(chr(1620 - 1572) + chr(12148 - 12037) + chr(49) + chr(50) + chr(53), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + '\x31' + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(10939 - 10828) + '\x31' + chr(48) + '\x31', 0b1000), ehT0Px3KOsy9('\x30' + chr(10194 - 10083) + '\x31' + '\x35' + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(0b101111 + 0o1) + '\157' + chr(0b110011) + '\062', 8635 - 8627)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(1553 - 1505) + chr(9257 - 9146) + '\065' + '\060', ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x99'), chr(2386 - 2286) + chr(0b1100101) + chr(8634 - 8535) + chr(11065 - 10954) + '\144' + '\145')('\x75' + '\x74' + chr(102) + chr(45) + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def P2OZGM2gp4AZ(oVre8I6UXc3b, kJDRfRhcZHjS=None, M8EIoTs2GJXE=None, Mrs8455cKlOd=None, zcNH1ym8cZBx=None, z4Xs9XhDbg00=None): if kJDRfRhcZHjS is None: kJDRfRhcZHjS = [] if M8EIoTs2GJXE is None: M8EIoTs2GJXE = {} sijXcSaDomT1 = H9zaXRrGK6Cq.worker.get_global_worker() if xafqLlk3kkUe(sijXcSaDomT1, xafqLlk3kkUe(SXOLrMavuUCe(b'\xdaB\xbc\x87'), '\x64' + chr(0b1100101) + '\x63' + chr(0b1101111) + '\x64' + '\145')(chr(0b101111 + 0o106) + chr(0b11100 + 0o130) + chr(3631 - 3529) + chr(45) + chr(2012 - 1956))) is None: raise jLmadlzMdunT(xafqLlk3kkUe(SXOLrMavuUCe(b'\xf6N\xac\x8d\xae\x90\xfe\x83\xd8P\x04/\xf6q\xab/D\xa9u\x8a\xc4=iy\xbeM\x05E\x920 \xb9=A\x93{a/\x01n\x9f\x04\xf8\x8a\xbd\x90\xfe\x82\xdc[\x04`\xe10\xa5&\x01\xae)'), '\144' + '\x65' + chr(0b111111 + 0o44) + chr(0b1101111) + '\x64' + '\145')(chr(0b1110101) + chr(0b101 + 0o157) + chr(102) + '\x2d' + chr(0b111000))) CitUWzhkzn0O = regQJFY_L3F0(_ziDFDWKkR8w()) f2Nv79cMiCWO = None if xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe8C\xad\x8f\x83\x80\xae\x95\xca'), chr(0b1100100) + chr(0b1001101 + 0o30) + '\143' + '\x6f' + '\x64' + chr(9453 - 9352))('\x75' + chr(0b1110100) + '\x66' + chr(45) + chr(56))) is None and xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe8C\xad\x8f\x83\x84\xae\x95\xca'), chr(0b1100100) + chr(5897 - 5796) + '\x63' + chr(0b1101111) + chr(0b1100100) + chr(101))('\x75' + chr(0b1110100) + chr(5808 - 5706) + chr(0b111 + 0o46) + '\070')) is None and (xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe8_\xbd\x91\xb3\x96\xac\x83\xdcM'), '\x64' + '\145' + '\x63' + chr(111) + '\144' + '\145')(chr(117) + chr(6633 - 6517) + '\x66' + '\055' + chr(2544 - 2488))) is None) and (Mrs8455cKlOd is None) and (zcNH1ym8cZBx is None) and (z4Xs9XhDbg00 is None): rixpPwUpnQsb = NAlxrfaLQgar.DEFAULT_ACTOR_CREATION_CPU_SIMPLE m0uhyGDpwbBy = NAlxrfaLQgar.DEFAULT_ACTOR_METHOD_CPU_SIMPLE else: rixpPwUpnQsb = NAlxrfaLQgar.DEFAULT_ACTOR_CREATION_CPU_SPECIFIED if oVre8I6UXc3b._num_cpus is None else oVre8I6UXc3b._num_cpus m0uhyGDpwbBy = NAlxrfaLQgar.DEFAULT_ACTOR_METHOD_CPU_SPECIFIED if xafqLlk3kkUe(sijXcSaDomT1, xafqLlk3kkUe(SXOLrMavuUCe(b'\xdaB\xbc\x87'), '\x64' + '\x65' + chr(0b111100 + 0o47) + chr(0b1101111) + '\144' + chr(0b1010001 + 0o24))(chr(0b1000101 + 0o60) + '\164' + chr(2148 - 2046) + chr(45) + '\x38')) == xafqLlk3kkUe(H9zaXRrGK6Cq, xafqLlk3kkUe(SXOLrMavuUCe(b'\xfbb\x9b\xa3\x90\xbc\x93\xaf\xfd{'), chr(100) + chr(0b1000111 + 0o36) + chr(99) + chr(1541 - 1430) + chr(0b1000111 + 0o35) + chr(101))(chr(0b111110 + 0o67) + chr(9410 - 9294) + chr(0b11111 + 0o107) + chr(45) + chr(56))): sijXcSaDomT1.Nzlr6Jv6jzgE[CitUWzhkzn0O] = oVre8I6UXc3b._modified_class(*igThHS4jwVsa.deepcopy(kJDRfRhcZHjS), **igThHS4jwVsa.deepcopy(M8EIoTs2GJXE)) else: if not xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe8H\xa0\x92\xb3\x91\xaa\x85\xdd'), chr(2467 - 2367) + chr(101) + chr(0b1100011) + '\157' + chr(0b1100100) + chr(101))(chr(0b111001 + 0o74) + chr(9132 - 9016) + chr(102) + '\055' + chr(56))): xafqLlk3kkUe(sijXcSaDomT1.function_actor_manager, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd2U\xa8\x8d\xae\x97\x81\x81\xdaJ\x052\xdd2\xa5+\x17\xb9'), chr(0b1000101 + 0o37) + chr(0b10 + 0o143) + chr(0b1100011) + chr(0b1000 + 0o147) + chr(2670 - 2570) + chr(0b1000111 + 0o36))('\x75' + '\164' + '\x66' + chr(0b101101) + chr(1045 - 989)))(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe8@\xb7\x86\xb5\x85\xb7\x85\xdda\t,\xe3"\xba'), '\x64' + chr(0b1110 + 0o127) + chr(99) + chr(0b11001 + 0o126) + chr(100) + chr(0b1100 + 0o131))(chr(117) + '\164' + chr(9705 - 9603) + chr(0b101101) + chr(879 - 823))), xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe8L\xbb\x96\xb3\x91\x81\x8d\xdcJ\x02/\xe6\x0e\xa7+\t\xaft'), chr(4759 - 4659) + chr(0b1010001 + 0o24) + chr(0b1 + 0o142) + '\x6f' + chr(0b1100100) + chr(0b111100 + 0o51))(chr(0b111110 + 0o67) + chr(957 - 841) + chr(0b1100110) + chr(0b101101) + '\070'))) oVre8I6UXc3b.K1xkVCyTYfBL = ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110001), 0b1000) z4Xs9XhDbg00 = H9zaXRrGK6Cq.utils.resources_from_resource_arguments(rixpPwUpnQsb, oVre8I6UXc3b._num_gpus, oVre8I6UXc3b._resources, Mrs8455cKlOd, zcNH1ym8cZBx, z4Xs9XhDbg00) Zh7rFQ_S3Ul4 = {} assert m0uhyGDpwbBy in [ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(2950 - 2839) + chr(459 - 411), 38027 - 38019), ehT0Px3KOsy9(chr(0b100100 + 0o14) + '\157' + chr(2021 - 1972), 8)] if m0uhyGDpwbBy == ehT0Px3KOsy9(chr(1254 - 1206) + '\157' + '\061', 8): Zh7rFQ_S3Ul4 = z4Xs9XhDbg00.igThHS4jwVsa() Zh7rFQ_S3Ul4[xafqLlk3kkUe(SXOLrMavuUCe(b'\xf4}\x8d'), chr(6360 - 6260) + chr(101) + chr(0b1100011) + chr(4045 - 3934) + chr(0b1100100) + '\145')('\165' + chr(116) + chr(0b110101 + 0o61) + '\x2d' + '\x38')] += ehT0Px3KOsy9(chr(48) + chr(111) + '\x31', 8) Go1_tlyXDW3h = xafqLlk3kkUe(SXOLrMavuUCe(b'\xe8r\xb1\x8c\xb5\x97\x81\xbf'), chr(725 - 625) + '\145' + chr(99) + chr(0b110 + 0o151) + chr(100) + chr(0b1100101))(chr(117) + chr(3068 - 2952) + chr(102) + chr(0b101100 + 0o1) + chr(1602 - 1546)) E4pV98xQc5Tp = oVre8I6UXc3b._method_signatures[Go1_tlyXDW3h] sdtKu_JsaWiz = W65V97aJT0Tb.extend_args(E4pV98xQc5Tp, kJDRfRhcZHjS, M8EIoTs2GJXE) Rnxjm6OeEOBe = Q_fVLFHEUrgb(oVre8I6UXc3b._modified_class.IDJ7vPpJfo1E, Go1_tlyXDW3h, oVre8I6UXc3b._modified_class.Gbej4oZqKLA6) [f2Nv79cMiCWO] = sijXcSaDomT1.submit_task(Rnxjm6OeEOBe, sdtKu_JsaWiz, actor_creation_id=CitUWzhkzn0O, max_actor_reconstructions=oVre8I6UXc3b._max_reconstructions, num_return_vals=ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\061', 8), resources=z4Xs9XhDbg00, placement_resources=Zh7rFQ_S3Ul4) assert PlSM16l2KDPD(f2Nv79cMiCWO, O_W8KG047Mor) oAhSL6kXhrhI = mbpwMLrBeu_6(CitUWzhkzn0O, oVre8I6UXc3b._modified_class.IDJ7vPpJfo1E, oVre8I6UXc3b._class_name, f2Nv79cMiCWO, oVre8I6UXc3b._actor_method_names, oVre8I6UXc3b._method_signatures, oVre8I6UXc3b._actor_method_num_return_vals, f2Nv79cMiCWO, m0uhyGDpwbBy, sijXcSaDomT1.task_driver_id) oAhSL6kXhrhI.Uva2XbHcSrL9 += ehT0Px3KOsy9(chr(48) + '\157' + '\x31', 8) return oAhSL6kXhrhI
ray-project/ray
python/ray/actor.py
ActorHandle._actor_method_call
def _actor_method_call(self, method_name, args=None, kwargs=None, num_return_vals=None): """Method execution stub for an actor handle. This is the function that executes when `actor.method_name.remote(*args, **kwargs)` is called. Instead of executing locally, the method is packaged as a task and scheduled to the remote actor instance. Args: method_name: The name of the actor method to execute. args: A list of arguments for the actor method. kwargs: A dictionary of keyword arguments for the actor method. num_return_vals (int): The number of return values for the method. Returns: object_ids: A list of object IDs returned by the remote actor method. """ worker = ray.worker.get_global_worker() worker.check_connected() function_signature = self._ray_method_signatures[method_name] if args is None: args = [] if kwargs is None: kwargs = {} args = signature.extend_args(function_signature, args, kwargs) # Execute functions locally if Ray is run in LOCAL_MODE # Copy args to prevent the function from mutating them. if worker.mode == ray.LOCAL_MODE: return getattr(worker.actors[self._ray_actor_id], method_name)(*copy.deepcopy(args)) function_descriptor = FunctionDescriptor( self._ray_module_name, method_name, self._ray_class_name) with self._ray_actor_lock: object_ids = worker.submit_task( function_descriptor, args, actor_id=self._ray_actor_id, actor_handle_id=self._ray_actor_handle_id, actor_counter=self._ray_actor_counter, actor_creation_dummy_object_id=( self._ray_actor_creation_dummy_object_id), execution_dependencies=[self._ray_actor_cursor], new_actor_handles=self._ray_new_actor_handles, # We add one for the dummy return ID. num_return_vals=num_return_vals + 1, resources={"CPU": self._ray_actor_method_cpus}, placement_resources={}, driver_id=self._ray_actor_driver_id, ) # Update the actor counter and cursor to reflect the most recent # invocation. self._ray_actor_counter += 1 # The last object returned is the dummy object that should be # passed in to the next actor method. Do not return it to the user. self._ray_actor_cursor = object_ids.pop() # We have notified the backend of the new actor handles to expect # since the last task was submitted, so clear the list. self._ray_new_actor_handles = [] if len(object_ids) == 1: object_ids = object_ids[0] elif len(object_ids) == 0: object_ids = None return object_ids
python
def _actor_method_call(self, method_name, args=None, kwargs=None, num_return_vals=None): """Method execution stub for an actor handle. This is the function that executes when `actor.method_name.remote(*args, **kwargs)` is called. Instead of executing locally, the method is packaged as a task and scheduled to the remote actor instance. Args: method_name: The name of the actor method to execute. args: A list of arguments for the actor method. kwargs: A dictionary of keyword arguments for the actor method. num_return_vals (int): The number of return values for the method. Returns: object_ids: A list of object IDs returned by the remote actor method. """ worker = ray.worker.get_global_worker() worker.check_connected() function_signature = self._ray_method_signatures[method_name] if args is None: args = [] if kwargs is None: kwargs = {} args = signature.extend_args(function_signature, args, kwargs) # Execute functions locally if Ray is run in LOCAL_MODE # Copy args to prevent the function from mutating them. if worker.mode == ray.LOCAL_MODE: return getattr(worker.actors[self._ray_actor_id], method_name)(*copy.deepcopy(args)) function_descriptor = FunctionDescriptor( self._ray_module_name, method_name, self._ray_class_name) with self._ray_actor_lock: object_ids = worker.submit_task( function_descriptor, args, actor_id=self._ray_actor_id, actor_handle_id=self._ray_actor_handle_id, actor_counter=self._ray_actor_counter, actor_creation_dummy_object_id=( self._ray_actor_creation_dummy_object_id), execution_dependencies=[self._ray_actor_cursor], new_actor_handles=self._ray_new_actor_handles, # We add one for the dummy return ID. num_return_vals=num_return_vals + 1, resources={"CPU": self._ray_actor_method_cpus}, placement_resources={}, driver_id=self._ray_actor_driver_id, ) # Update the actor counter and cursor to reflect the most recent # invocation. self._ray_actor_counter += 1 # The last object returned is the dummy object that should be # passed in to the next actor method. Do not return it to the user. self._ray_actor_cursor = object_ids.pop() # We have notified the backend of the new actor handles to expect # since the last task was submitted, so clear the list. self._ray_new_actor_handles = [] if len(object_ids) == 1: object_ids = object_ids[0] elif len(object_ids) == 0: object_ids = None return object_ids
[ "def", "_actor_method_call", "(", "self", ",", "method_name", ",", "args", "=", "None", ",", "kwargs", "=", "None", ",", "num_return_vals", "=", "None", ")", ":", "worker", "=", "ray", ".", "worker", ".", "get_global_worker", "(", ")", "worker", ".", "check_connected", "(", ")", "function_signature", "=", "self", ".", "_ray_method_signatures", "[", "method_name", "]", "if", "args", "is", "None", ":", "args", "=", "[", "]", "if", "kwargs", "is", "None", ":", "kwargs", "=", "{", "}", "args", "=", "signature", ".", "extend_args", "(", "function_signature", ",", "args", ",", "kwargs", ")", "# Execute functions locally if Ray is run in LOCAL_MODE", "# Copy args to prevent the function from mutating them.", "if", "worker", ".", "mode", "==", "ray", ".", "LOCAL_MODE", ":", "return", "getattr", "(", "worker", ".", "actors", "[", "self", ".", "_ray_actor_id", "]", ",", "method_name", ")", "(", "*", "copy", ".", "deepcopy", "(", "args", ")", ")", "function_descriptor", "=", "FunctionDescriptor", "(", "self", ".", "_ray_module_name", ",", "method_name", ",", "self", ".", "_ray_class_name", ")", "with", "self", ".", "_ray_actor_lock", ":", "object_ids", "=", "worker", ".", "submit_task", "(", "function_descriptor", ",", "args", ",", "actor_id", "=", "self", ".", "_ray_actor_id", ",", "actor_handle_id", "=", "self", ".", "_ray_actor_handle_id", ",", "actor_counter", "=", "self", ".", "_ray_actor_counter", ",", "actor_creation_dummy_object_id", "=", "(", "self", ".", "_ray_actor_creation_dummy_object_id", ")", ",", "execution_dependencies", "=", "[", "self", ".", "_ray_actor_cursor", "]", ",", "new_actor_handles", "=", "self", ".", "_ray_new_actor_handles", ",", "# We add one for the dummy return ID.", "num_return_vals", "=", "num_return_vals", "+", "1", ",", "resources", "=", "{", "\"CPU\"", ":", "self", ".", "_ray_actor_method_cpus", "}", ",", "placement_resources", "=", "{", "}", ",", "driver_id", "=", "self", ".", "_ray_actor_driver_id", ",", ")", "# Update the actor counter and cursor to reflect the most recent", "# invocation.", "self", ".", "_ray_actor_counter", "+=", "1", "# The last object returned is the dummy object that should be", "# passed in to the next actor method. Do not return it to the user.", "self", ".", "_ray_actor_cursor", "=", "object_ids", ".", "pop", "(", ")", "# We have notified the backend of the new actor handles to expect", "# since the last task was submitted, so clear the list.", "self", ".", "_ray_new_actor_handles", "=", "[", "]", "if", "len", "(", "object_ids", ")", "==", "1", ":", "object_ids", "=", "object_ids", "[", "0", "]", "elif", "len", "(", "object_ids", ")", "==", "0", ":", "object_ids", "=", "None", "return", "object_ids" ]
Method execution stub for an actor handle. This is the function that executes when `actor.method_name.remote(*args, **kwargs)` is called. Instead of executing locally, the method is packaged as a task and scheduled to the remote actor instance. Args: method_name: The name of the actor method to execute. args: A list of arguments for the actor method. kwargs: A dictionary of keyword arguments for the actor method. num_return_vals (int): The number of return values for the method. Returns: object_ids: A list of object IDs returned by the remote actor method.
[ "Method", "execution", "stub", "for", "an", "actor", "handle", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/actor.py#L442-L515
train
Method execution stub for an actor handle.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoV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Lo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b11100 + 0o24) + '\157' + chr(50) + chr(50), 55364 - 55356), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\061' + chr(0b10110 + 0o33) + chr(48), 1461 - 1453), ehT0Px3KOsy9('\060' + '\x6f' + chr(50) + chr(1312 - 1259) + chr(53), 0b1000), ehT0Px3KOsy9(chr(1801 - 1753) + '\x6f' + '\062' + '\064' + chr(50), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\062' + '\062' + chr(50), 46103 - 46095), ehT0Px3KOsy9(chr(2145 - 2097) + chr(12307 - 12196) + '\x34' + '\067', 38272 - 38264), ehT0Px3KOsy9(chr(2119 - 2071) + '\157' + '\x33' + chr(0b101010 + 0o14), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + '\x31' + chr(0b110000) + chr(0b11101 + 0o25), 38321 - 38313), ehT0Px3KOsy9('\x30' + '\x6f' + '\067' + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(356 - 308) + chr(0b1011111 + 0o20) + chr(635 - 586) + chr(0b110001) + chr(0b100101 + 0o16), 40281 - 40273), ehT0Px3KOsy9(chr(48) + '\x6f' + '\061' + '\061' + chr(53), 0o10), ehT0Px3KOsy9('\060' + chr(0b11110 + 0o121) + '\062' + '\x31' + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x32' + chr(2020 - 1967) + chr(53), 8), ehT0Px3KOsy9('\x30' + chr(0b1000011 + 0o54) + chr(1277 - 1227) + chr(50), 8), ehT0Px3KOsy9(chr(48) + '\157' + chr(1065 - 1014) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1110 + 0o141) + '\061' + chr(0b11011 + 0o30) + chr(0b100000 + 0o27), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(1618 - 1567) + chr(52), 22187 - 22179), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b1101 + 0o44), 0o10), ehT0Px3KOsy9(chr(0b101100 + 0o4) + chr(0b1101010 + 0o5) + chr(0b11000 + 0o31) + '\061' + chr(48), 8), ehT0Px3KOsy9('\060' + '\x6f' + '\x31' + '\x36' + chr(0b100011 + 0o20), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b101010 + 0o10) + '\060' + chr(54), 28928 - 28920), ehT0Px3KOsy9('\060' + chr(0b1001011 + 0o44) + '\x32' + chr(2340 - 2290) + '\060', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1001101 + 0o42) + '\x31' + chr(0b110000) + chr(50), 8), ehT0Px3KOsy9(chr(2093 - 2045) + '\x6f' + '\x33', 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(2760 - 2706) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(0b100101 + 0o13) + '\157' + chr(517 - 468) + '\065' + chr(48), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(51) + '\065' + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + '\x32' + '\x32' + chr(329 - 277), ord("\x08")), ehT0Px3KOsy9(chr(807 - 759) + '\157' + chr(0b110010) + chr(0b110101) + chr(2210 - 2162), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(1628 - 1574) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110011) + chr(49) + chr(1720 - 1670), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(1066 - 1013) + chr(432 - 381), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + '\062' + chr(1488 - 1438) + chr(0b100011 + 0o21), 8), ehT0Px3KOsy9(chr(0b110000) + chr(11663 - 11552) + chr(1542 - 1493) + chr(2055 - 2005) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(0b1101111) + chr(0b110011) + chr(48) + chr(1912 - 1862), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b110010) + chr(0b1011 + 0o52) + chr(49), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(49) + chr(0b110000) + chr(2352 - 2301), 16622 - 16614), ehT0Px3KOsy9(chr(699 - 651) + '\x6f' + chr(0b110010) + chr(51) + '\064', 0b1000), ehT0Px3KOsy9(chr(1590 - 1542) + chr(9430 - 9319) + chr(0b110100) + '\x35', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\062' + chr(55), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(111) + chr(53) + chr(48), 34366 - 34358)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'<'), chr(0b1100100) + chr(4165 - 4064) + chr(99) + chr(0b1101111) + chr(1217 - 1117) + '\145')(chr(0b110011 + 0o102) + chr(0b1110100) + '\146' + chr(0b10010 + 0o33) + chr(0b101000 + 0o20)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def vcwe66WxpUYg(oVre8I6UXc3b, kXYCGf8FzWpJ, kJDRfRhcZHjS=None, M8EIoTs2GJXE=None, Ku0iJ7hrQyI0=None): sijXcSaDomT1 = H9zaXRrGK6Cq.worker.get_global_worker() xafqLlk3kkUe(sijXcSaDomT1, xafqLlk3kkUe(SXOLrMavuUCe(b'q \xc8\xc1\xf9x}-W%(\xeb\xd9w|'), chr(4866 - 4766) + '\x65' + chr(99) + chr(0b1101111) + chr(4126 - 4026) + chr(0b1100101))('\x75' + chr(116) + chr(0b1100110) + '\055' + chr(0b111000)))() E4pV98xQc5Tp = oVre8I6UXc3b._ray_method_signatures[kXYCGf8FzWpJ] if kJDRfRhcZHjS is None: kJDRfRhcZHjS = [] if M8EIoTs2GJXE is None: M8EIoTs2GJXE = {} kJDRfRhcZHjS = W65V97aJT0Tb.extend_args(E4pV98xQc5Tp, kJDRfRhcZHjS, M8EIoTs2GJXE) if xafqLlk3kkUe(sijXcSaDomT1, xafqLlk3kkUe(SXOLrMavuUCe(b"\x7f'\xc9\xc7"), chr(7280 - 7180) + chr(0b1100101) + chr(492 - 393) + chr(0b1101111) + chr(9873 - 9773) + chr(0b1100101))(chr(117) + chr(116) + chr(102) + chr(0b101101) + '\x38')) == xafqLlk3kkUe(H9zaXRrGK6Cq, xafqLlk3kkUe(SXOLrMavuUCe(b'^\x07\xee\xe3\xdexS\r}\x0e'), '\144' + chr(101) + chr(0b1100011) + chr(11700 - 11589) + chr(100) + chr(0b1100101))(chr(0b101101 + 0o110) + chr(12264 - 12148) + chr(0b1100110) + chr(0b1001 + 0o44) + chr(56))): return xafqLlk3kkUe(xafqLlk3kkUe(sijXcSaDomT1, xafqLlk3kkUe(SXOLrMavuUCe(b'\\2\xc1\xd0\xa4mhtS1*\xcd'), chr(1173 - 1073) + chr(0b1100101) + chr(4882 - 4783) + chr(0b1101111) + '\144' + chr(0b111001 + 0o54))(chr(11544 - 11427) + chr(0b111001 + 0o73) + chr(0b1100110) + '\055' + chr(0b111000)))[xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'M:\xcc\xdb\xcdF}6V9\x12\xe1\xc9'), chr(0b1100100) + chr(101) + '\143' + '\157' + chr(6769 - 6669) + chr(6247 - 6146))('\165' + chr(0b1011000 + 0o34) + chr(3662 - 3560) + '\x2d' + '\x38'))], kXYCGf8FzWpJ)(*xafqLlk3kkUe(igThHS4jwVsa, xafqLlk3kkUe(SXOLrMavuUCe(b'v-\xc8\xd2\xf1Hn;'), '\144' + '\145' + '\143' + '\157' + chr(0b1101 + 0o127) + chr(4553 - 4452))('\165' + chr(11961 - 11845) + chr(7712 - 7610) + chr(199 - 154) + chr(499 - 443)))(kJDRfRhcZHjS)) Rnxjm6OeEOBe = Q_fVLFHEUrgb(oVre8I6UXc3b._ray_module_name, kXYCGf8FzWpJ, oVre8I6UXc3b._ray_class_name) with xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'M:\xcc\xdb\xcdF}6V9\x12\xe4\xc2qs'), '\144' + '\145' + chr(0b1100011) + chr(0b1101111) + chr(0b11110 + 0o106) + '\145')('\x75' + chr(0b1110100) + '\x66' + '\055' + chr(56))): wYkLMlAXWXDn = sijXcSaDomT1.submit_task(Rnxjm6OeEOBe, kJDRfRhcZHjS, actor_id=oVre8I6UXc3b._ray_actor_id, actor_handle_id=oVre8I6UXc3b._ray_actor_handle_id, actor_counter=oVre8I6UXc3b.Uva2XbHcSrL9, actor_creation_dummy_object_id=oVre8I6UXc3b._ray_actor_creation_dummy_object_id, execution_dependencies=[oVre8I6UXc3b._ray_actor_cursor], new_actor_handles=oVre8I6UXc3b._ray_new_actor_handles, num_return_vals=Ku0iJ7hrQyI0 + ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(0b10100 + 0o133) + '\x31', 8), resources={xafqLlk3kkUe(SXOLrMavuUCe(b'Q\x18\xf8'), chr(0b100100 + 0o100) + chr(0b110 + 0o137) + '\143' + '\x6f' + '\x64' + chr(0b1100101))('\165' + '\164' + '\146' + chr(0b101101) + chr(0b111000)): oVre8I6UXc3b._ray_actor_method_cpus}, placement_resources={}, driver_id=oVre8I6UXc3b._ray_actor_driver_id) oVre8I6UXc3b.Uva2XbHcSrL9 += ehT0Px3KOsy9('\060' + chr(0b1101100 + 0o3) + chr(49), 8) oVre8I6UXc3b.Ja3olUjuIFbJ = wYkLMlAXWXDn.pop() oVre8I6UXc3b.O6VWtkN4NxKv = [] if c2A0yzQpDQB3(wYkLMlAXWXDn) == ehT0Px3KOsy9('\060' + chr(111) + chr(0b110001), 8): wYkLMlAXWXDn = wYkLMlAXWXDn[ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\060', ord("\x08"))] elif c2A0yzQpDQB3(wYkLMlAXWXDn) == ehT0Px3KOsy9(chr(1802 - 1754) + chr(111) + chr(0b110000), 8): wYkLMlAXWXDn = None return wYkLMlAXWXDn
ray-project/ray
python/ray/actor.py
ActorHandle._serialization_helper
def _serialization_helper(self, ray_forking): """This is defined in order to make pickling work. Args: ray_forking: True if this is being called because Ray is forking the actor handle and false if it is being called by pickling. Returns: A dictionary of the information needed to reconstruct the object. """ if ray_forking: actor_handle_id = compute_actor_handle_id( self._ray_actor_handle_id, self._ray_actor_forks) else: actor_handle_id = self._ray_actor_handle_id # Note: _ray_actor_cursor and _ray_actor_creation_dummy_object_id # could be None. state = { "actor_id": self._ray_actor_id, "actor_handle_id": actor_handle_id, "module_name": self._ray_module_name, "class_name": self._ray_class_name, "actor_cursor": self._ray_actor_cursor, "actor_method_names": self._ray_actor_method_names, "method_signatures": self._ray_method_signatures, "method_num_return_vals": self._ray_method_num_return_vals, # Actors in local mode don't have dummy objects. "actor_creation_dummy_object_id": self. _ray_actor_creation_dummy_object_id, "actor_method_cpus": self._ray_actor_method_cpus, "actor_driver_id": self._ray_actor_driver_id, "ray_forking": ray_forking } if ray_forking: self._ray_actor_forks += 1 new_actor_handle_id = actor_handle_id else: # The execution dependency for a pickled actor handle is never safe # to release, since it could be unpickled and submit another # dependent task at any time. Therefore, we notify the backend of a # random handle ID that will never actually be used. new_actor_handle_id = ActorHandleID(_random_string()) # Notify the backend to expect this new actor handle. The backend will # not release the cursor for any new handles until the first task for # each of the new handles is submitted. # NOTE(swang): There is currently no garbage collection for actor # handles until the actor itself is removed. self._ray_new_actor_handles.append(new_actor_handle_id) return state
python
def _serialization_helper(self, ray_forking): """This is defined in order to make pickling work. Args: ray_forking: True if this is being called because Ray is forking the actor handle and false if it is being called by pickling. Returns: A dictionary of the information needed to reconstruct the object. """ if ray_forking: actor_handle_id = compute_actor_handle_id( self._ray_actor_handle_id, self._ray_actor_forks) else: actor_handle_id = self._ray_actor_handle_id # Note: _ray_actor_cursor and _ray_actor_creation_dummy_object_id # could be None. state = { "actor_id": self._ray_actor_id, "actor_handle_id": actor_handle_id, "module_name": self._ray_module_name, "class_name": self._ray_class_name, "actor_cursor": self._ray_actor_cursor, "actor_method_names": self._ray_actor_method_names, "method_signatures": self._ray_method_signatures, "method_num_return_vals": self._ray_method_num_return_vals, # Actors in local mode don't have dummy objects. "actor_creation_dummy_object_id": self. _ray_actor_creation_dummy_object_id, "actor_method_cpus": self._ray_actor_method_cpus, "actor_driver_id": self._ray_actor_driver_id, "ray_forking": ray_forking } if ray_forking: self._ray_actor_forks += 1 new_actor_handle_id = actor_handle_id else: # The execution dependency for a pickled actor handle is never safe # to release, since it could be unpickled and submit another # dependent task at any time. Therefore, we notify the backend of a # random handle ID that will never actually be used. new_actor_handle_id = ActorHandleID(_random_string()) # Notify the backend to expect this new actor handle. The backend will # not release the cursor for any new handles until the first task for # each of the new handles is submitted. # NOTE(swang): There is currently no garbage collection for actor # handles until the actor itself is removed. self._ray_new_actor_handles.append(new_actor_handle_id) return state
[ "def", "_serialization_helper", "(", "self", ",", "ray_forking", ")", ":", "if", "ray_forking", ":", "actor_handle_id", "=", "compute_actor_handle_id", "(", "self", ".", "_ray_actor_handle_id", ",", "self", ".", "_ray_actor_forks", ")", "else", ":", "actor_handle_id", "=", "self", ".", "_ray_actor_handle_id", "# Note: _ray_actor_cursor and _ray_actor_creation_dummy_object_id", "# could be None.", "state", "=", "{", "\"actor_id\"", ":", "self", ".", "_ray_actor_id", ",", "\"actor_handle_id\"", ":", "actor_handle_id", ",", "\"module_name\"", ":", "self", ".", "_ray_module_name", ",", "\"class_name\"", ":", "self", ".", "_ray_class_name", ",", "\"actor_cursor\"", ":", "self", ".", "_ray_actor_cursor", ",", "\"actor_method_names\"", ":", "self", ".", "_ray_actor_method_names", ",", "\"method_signatures\"", ":", "self", ".", "_ray_method_signatures", ",", "\"method_num_return_vals\"", ":", "self", ".", "_ray_method_num_return_vals", ",", "# Actors in local mode don't have dummy objects.", "\"actor_creation_dummy_object_id\"", ":", "self", ".", "_ray_actor_creation_dummy_object_id", ",", "\"actor_method_cpus\"", ":", "self", ".", "_ray_actor_method_cpus", ",", "\"actor_driver_id\"", ":", "self", ".", "_ray_actor_driver_id", ",", "\"ray_forking\"", ":", "ray_forking", "}", "if", "ray_forking", ":", "self", ".", "_ray_actor_forks", "+=", "1", "new_actor_handle_id", "=", "actor_handle_id", "else", ":", "# The execution dependency for a pickled actor handle is never safe", "# to release, since it could be unpickled and submit another", "# dependent task at any time. Therefore, we notify the backend of a", "# random handle ID that will never actually be used.", "new_actor_handle_id", "=", "ActorHandleID", "(", "_random_string", "(", ")", ")", "# Notify the backend to expect this new actor handle. The backend will", "# not release the cursor for any new handles until the first task for", "# each of the new handles is submitted.", "# NOTE(swang): There is currently no garbage collection for actor", "# handles until the actor itself is removed.", "self", ".", "_ray_new_actor_handles", ".", "append", "(", "new_actor_handle_id", ")", "return", "state" ]
This is defined in order to make pickling work. Args: ray_forking: True if this is being called because Ray is forking the actor handle and false if it is being called by pickling. Returns: A dictionary of the information needed to reconstruct the object.
[ "This", "is", "defined", "in", "order", "to", "make", "pickling", "work", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/actor.py#L578-L629
train
Internal function that is used by the pickling thread.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsV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ockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(1273 - 1225) + chr(0b1101111) + chr(50) + '\x32' + chr(49), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b100101 + 0o22) + chr(0b110011 + 0o4), 64023 - 64015), ehT0Px3KOsy9(chr(0b10010 + 0o36) + '\157' + chr(0b110010) + chr(1755 - 1706) + chr(49), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111 + 0o0) + '\061' + chr(49) + chr(1926 - 1874), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(2246 - 2197) + chr(0b110110) + '\x30', 0b1000), ehT0Px3KOsy9(chr(466 - 418) + '\157' + '\x32' + chr(0b110110) + chr(2145 - 2091), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(2976 - 2865) + '\067' + '\060', ord("\x08")), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(0b10000 + 0o137) + '\065' + chr(49), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x32', 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(2336 - 2284) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b100101 + 0o14) + chr(2151 - 2097) + '\060', 8), ehT0Px3KOsy9(chr(2075 - 2027) + chr(0b1011010 + 0o25) + '\063' + chr(480 - 430) + chr(2380 - 2330), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(0b100111 + 0o14) + '\060', 20104 - 20096), ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(0b1101111) + chr(0b1000 + 0o53) + chr(0b110101) + '\064', 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x31' + chr(0b1101 + 0o52), 30400 - 30392), ehT0Px3KOsy9(chr(0b1001 + 0o47) + '\x6f' + chr(2168 - 2118) + chr(634 - 583) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(0b101000 + 0o10) + '\157' + chr(0b110011) + chr(0b110010) + chr(0b1000 + 0o57), 0b1000), ehT0Px3KOsy9(chr(1880 - 1832) + '\157' + chr(272 - 222) + chr(1263 - 1215) + chr(0b110010), 0b1000), ehT0Px3KOsy9('\060' + chr(0b100010 + 0o115) + chr(49) + chr(52) + chr(67 - 19), 8141 - 8133), ehT0Px3KOsy9(chr(0b10111 + 0o31) + chr(2448 - 2337) + '\062' + chr(0b110010) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000110 + 0o51) + '\x32' + chr(2141 - 2093) + chr(1516 - 1467), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(49) + '\062', ord("\x08")), ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(2816 - 2705) + chr(50) + chr(1712 - 1657) + chr(49), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\x33' + chr(55) + chr(0b100001 + 0o23), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\062' + chr(168 - 117) + chr(52), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(5527 - 5416) + chr(49) + '\063', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b11001 + 0o31) + chr(535 - 485) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(1112 - 1064) + chr(7943 - 7832) + '\063' + chr(0b110010) + '\x36', ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(51) + chr(0b101010 + 0o14) + chr(48), 64850 - 64842), ehT0Px3KOsy9(chr(48) + '\157' + chr(49) + chr(0b11 + 0o57) + chr(51), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + '\062' + chr(52) + chr(295 - 242), 0o10), ehT0Px3KOsy9(chr(171 - 123) + chr(0b11111 + 0o120) + chr(0b101111 + 0o4) + chr(2862 - 2808) + '\x33', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(9406 - 9295) + chr(0b110010) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x36' + chr(0b110101), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b100111 + 0o12) + '\x37' + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(506 - 458) + chr(2576 - 2465) + chr(52), 0o10), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(0b1101111) + '\063' + '\060', 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\064' + '\x36', 8), ehT0Px3KOsy9('\060' + chr(0b1010110 + 0o31) + '\x31' + chr(54) + chr(2209 - 2160), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x33' + chr(169 - 115) + chr(1918 - 1868), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110101) + '\x30', 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xbf'), '\144' + chr(101) + chr(0b11100 + 0o107) + chr(0b1101111) + chr(6819 - 6719) + '\145')(chr(0b1010101 + 0o40) + chr(0b1101100 + 0o10) + '\146' + chr(1017 - 972) + chr(1520 - 1464)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def yYBGTRWsj25P(oVre8I6UXc3b, GMoNoPvgUHmu): if GMoNoPvgUHmu: DVlK92IJxvtb = WHld5U3cd_lW(oVre8I6UXc3b._ray_actor_handle_id, oVre8I6UXc3b._ray_actor_forks) else: DVlK92IJxvtb = oVre8I6UXc3b._ray_actor_handle_id KKFQISrGeiAm = {xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0\\\xfd#\x02\xe9QM'), '\x64' + chr(0b1100101) + '\x63' + chr(1971 - 1860) + chr(3381 - 3281) + chr(0b1011010 + 0o13))(chr(0b1100010 + 0o23) + '\164' + chr(102) + '\x2d' + chr(481 - 425)): oVre8I6UXc3b._ray_actor_id, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0\\\xfd#\x02\xe9PHlB\x1c\xb7G\x85k'), '\144' + chr(7710 - 7609) + '\143' + chr(5848 - 5737) + chr(1858 - 1758) + chr(101))(chr(0b101110 + 0o107) + chr(0b1010111 + 0o35) + chr(1181 - 1079) + chr(1929 - 1884) + chr(0b111000)): DVlK92IJxvtb, xafqLlk3kkUe(SXOLrMavuUCe(b'\xfcP\xed9\x1c\xd3gGcK\x15'), chr(0b1100100) + '\x65' + chr(0b1100011) + chr(0b101000 + 0o107) + chr(100) + '\145')(chr(0b1110101) + chr(0b1110100) + chr(0b0 + 0o146) + '\055' + '\x38'): oVre8I6UXc3b._ray_module_name, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf2S\xe8?\x03\xe9VHoC'), chr(3493 - 3393) + '\145' + chr(0b1100011) + '\157' + '\144' + '\145')('\x75' + chr(0b1110100) + chr(0b1100110) + chr(0b100000 + 0o15) + chr(0b111000)): oVre8I6UXc3b._ray_class_name, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0\\\xfd#\x02\xe9[\\pU\x1f\xa0'), chr(100) + chr(9062 - 8961) + chr(0b1000001 + 0o42) + '\157' + '\x64' + chr(0b110111 + 0o56))('\x75' + chr(116) + chr(0b101011 + 0o73) + chr(0b101101) + '\x38'): oVre8I6UXc3b.Ja3olUjuIFbJ, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0\\\xfd#\x02\xe9ULvN\x1f\xb6G\x82n\xf5\xb2\xf1'), '\x64' + chr(101) + chr(99) + chr(0b1100001 + 0o16) + chr(0b1000000 + 0o44) + chr(0b1100101))('\x75' + chr(11620 - 11504) + chr(102) + chr(0b101001 + 0o4) + '\070'): oVre8I6UXc3b._ray_actor_method_names, xafqLlk3kkUe(SXOLrMavuUCe(b'\xfcZ\xfd$\x1f\xd2gZkA\x1e\xb3l\x99}\xfd\xa4'), chr(0b100000 + 0o104) + '\x65' + chr(0b111110 + 0o45) + chr(0b1000100 + 0o53) + chr(0b1001111 + 0o25) + chr(0b1110 + 0o127))(chr(117) + '\x74' + chr(0b111100 + 0o52) + chr(0b101101) + chr(0b11000 + 0o40)): oVre8I6UXc3b._ray_method_signatures, xafqLlk3kkUe(SXOLrMavuUCe(b'\xfcZ\xfd$\x1f\xd2gGwK/\xa0}\x98z\xea\xb9\xdd\x16\xf7\xedy'), chr(0b10000 + 0o124) + chr(101) + chr(8250 - 8151) + chr(0b1101111) + '\144' + chr(0b101000 + 0o75))('\165' + chr(116) + chr(102) + chr(0b1011 + 0o42) + '\x38'): oVre8I6UXc3b._ray_method_num_return_vals, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0\\\xfd#\x02\xe9[[gG\x04\xbbw\x82P\xfc\xa2\xef\r\xef\xdee\xdb\x96\xf9h\xe0\x89\x997'), chr(0b100101 + 0o77) + chr(3811 - 3710) + chr(99) + chr(111) + '\144' + chr(0b1100101))(chr(0b1110101) + '\164' + chr(9860 - 9758) + chr(45) + chr(0b111000)): oVre8I6UXc3b._ray_actor_creation_dummy_object_id, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0\\\xfd#\x02\xe9ULvN\x1f\xb6G\x8f\x7f\xed\xa4'), '\144' + '\x65' + '\143' + chr(0b1010111 + 0o30) + '\144' + '\x65')('\x75' + '\164' + chr(0b1100110) + '\x2d' + '\070'): oVre8I6UXc3b._ray_actor_method_cpus, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0\\\xfd#\x02\xe9\\[kP\x15\xa0G\x85k'), '\x64' + chr(0b1100101) + chr(304 - 205) + '\x6f' + chr(100) + chr(0b1100101))(chr(0b1110101) + '\164' + chr(8978 - 8876) + chr(1759 - 1714) + '\070'): oVre8I6UXc3b._ray_actor_driver_id, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe3^\xf0\x13\x16\xd9JBkH\x17'), chr(0b1100100) + chr(831 - 730) + chr(99) + chr(0b11101 + 0o122) + chr(2956 - 2856) + '\145')(chr(0b1110101) + chr(116) + chr(102) + chr(0b101101) + chr(0b111000)): GMoNoPvgUHmu} if GMoNoPvgUHmu: oVre8I6UXc3b.l0Cov9ohjedI += ehT0Px3KOsy9(chr(48) + '\x6f' + '\x31', 0o10) HEssZqckw3ov = DVlK92IJxvtb else: HEssZqckw3ov = kbjwfqwgoyeK(_ziDFDWKkR8w()) xafqLlk3kkUe(oVre8I6UXc3b._ray_new_actor_handles, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0O\xf9)\x1e\xd2'), chr(0b1100100) + chr(8440 - 8339) + '\143' + '\x6f' + chr(6573 - 6473) + chr(1092 - 991))(chr(0b1100000 + 0o25) + '\x74' + '\x66' + chr(1666 - 1621) + chr(2095 - 2039)))(HEssZqckw3ov) return KKFQISrGeiAm
ray-project/ray
python/ray/actor.py
ActorHandle._deserialization_helper
def _deserialization_helper(self, state, ray_forking): """This is defined in order to make pickling work. Args: state: The serialized state of the actor handle. ray_forking: True if this is being called because Ray is forking the actor handle and false if it is being called by pickling. """ worker = ray.worker.get_global_worker() worker.check_connected() if state["ray_forking"]: actor_handle_id = state["actor_handle_id"] else: # Right now, if the actor handle has been pickled, we create a # temporary actor handle id for invocations. # TODO(pcm): This still leads to a lot of actor handles being # created, there should be a better way to handle pickled # actor handles. # TODO(swang): Accessing the worker's current task ID is not # thread-safe. # TODO(swang): Unpickling the same actor handle twice in the same # task will break the application, and unpickling it twice in the # same actor is likely a performance bug. We should consider # logging a warning in these cases. actor_handle_id = compute_actor_handle_id_non_forked( state["actor_handle_id"], worker.current_task_id) self.__init__( state["actor_id"], state["module_name"], state["class_name"], state["actor_cursor"], state["actor_method_names"], state["method_signatures"], state["method_num_return_vals"], state["actor_creation_dummy_object_id"], state["actor_method_cpus"], # This is the driver ID of the driver that owns the actor, not # necessarily the driver that owns this actor handle. state["actor_driver_id"], actor_handle_id=actor_handle_id)
python
def _deserialization_helper(self, state, ray_forking): """This is defined in order to make pickling work. Args: state: The serialized state of the actor handle. ray_forking: True if this is being called because Ray is forking the actor handle and false if it is being called by pickling. """ worker = ray.worker.get_global_worker() worker.check_connected() if state["ray_forking"]: actor_handle_id = state["actor_handle_id"] else: # Right now, if the actor handle has been pickled, we create a # temporary actor handle id for invocations. # TODO(pcm): This still leads to a lot of actor handles being # created, there should be a better way to handle pickled # actor handles. # TODO(swang): Accessing the worker's current task ID is not # thread-safe. # TODO(swang): Unpickling the same actor handle twice in the same # task will break the application, and unpickling it twice in the # same actor is likely a performance bug. We should consider # logging a warning in these cases. actor_handle_id = compute_actor_handle_id_non_forked( state["actor_handle_id"], worker.current_task_id) self.__init__( state["actor_id"], state["module_name"], state["class_name"], state["actor_cursor"], state["actor_method_names"], state["method_signatures"], state["method_num_return_vals"], state["actor_creation_dummy_object_id"], state["actor_method_cpus"], # This is the driver ID of the driver that owns the actor, not # necessarily the driver that owns this actor handle. state["actor_driver_id"], actor_handle_id=actor_handle_id)
[ "def", "_deserialization_helper", "(", "self", ",", "state", ",", "ray_forking", ")", ":", "worker", "=", "ray", ".", "worker", ".", "get_global_worker", "(", ")", "worker", ".", "check_connected", "(", ")", "if", "state", "[", "\"ray_forking\"", "]", ":", "actor_handle_id", "=", "state", "[", "\"actor_handle_id\"", "]", "else", ":", "# Right now, if the actor handle has been pickled, we create a", "# temporary actor handle id for invocations.", "# TODO(pcm): This still leads to a lot of actor handles being", "# created, there should be a better way to handle pickled", "# actor handles.", "# TODO(swang): Accessing the worker's current task ID is not", "# thread-safe.", "# TODO(swang): Unpickling the same actor handle twice in the same", "# task will break the application, and unpickling it twice in the", "# same actor is likely a performance bug. We should consider", "# logging a warning in these cases.", "actor_handle_id", "=", "compute_actor_handle_id_non_forked", "(", "state", "[", "\"actor_handle_id\"", "]", ",", "worker", ".", "current_task_id", ")", "self", ".", "__init__", "(", "state", "[", "\"actor_id\"", "]", ",", "state", "[", "\"module_name\"", "]", ",", "state", "[", "\"class_name\"", "]", ",", "state", "[", "\"actor_cursor\"", "]", ",", "state", "[", "\"actor_method_names\"", "]", ",", "state", "[", "\"method_signatures\"", "]", ",", "state", "[", "\"method_num_return_vals\"", "]", ",", "state", "[", "\"actor_creation_dummy_object_id\"", "]", ",", "state", "[", "\"actor_method_cpus\"", "]", ",", "# This is the driver ID of the driver that owns the actor, not", "# necessarily the driver that owns this actor handle.", "state", "[", "\"actor_driver_id\"", "]", ",", "actor_handle_id", "=", "actor_handle_id", ")" ]
This is defined in order to make pickling work. Args: state: The serialized state of the actor handle. ray_forking: True if this is being called because Ray is forking the actor handle and false if it is being called by pickling.
[ "This", "is", "defined", "in", "order", "to", "make", "pickling", "work", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/actor.py#L631-L672
train
This is the method that is called by the pickler. It is called by the pickler when the actor is pickled.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbN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O0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\060' + chr(0b1010011 + 0o34) + chr(841 - 791) + '\065' + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(52) + chr(49), 0o10), ehT0Px3KOsy9(chr(69 - 21) + chr(111) + chr(1930 - 1881) + chr(511 - 457) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(917 - 867) + '\x30' + chr(55), 0o10), ehT0Px3KOsy9('\x30' + chr(0b111001 + 0o66) + chr(1067 - 1013) + '\x37', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(10740 - 10629) + chr(0b101110 + 0o3) + '\x37' + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(6776 - 6665) + chr(0b100010 + 0o20) + '\x31', 0o10), ehT0Px3KOsy9(chr(1964 - 1916) + '\157' + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(0b100 + 0o54) + '\x6f' + '\062' + '\065' + chr(710 - 661), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x33' + chr(0b1010 + 0o46) + '\x30', 0b1000), ehT0Px3KOsy9(chr(0b11000 + 0o30) + '\157' + chr(0b100001 + 0o20) + chr(52) + chr(0b101001 + 0o14), 0o10), ehT0Px3KOsy9(chr(0b1110 + 0o42) + '\157' + chr(49) + '\066' + chr(370 - 315), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\061' + '\x35' + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(818 - 770) + chr(111) + chr(51) + chr(275 - 222) + chr(0b11111 + 0o22), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101101 + 0o2) + chr(50) + chr(49) + chr(48), 27991 - 27983), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\063' + '\063', 0o10), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(0b1011010 + 0o25) + chr(0b101101 + 0o6) + chr(0b110000) + chr(0b10000 + 0o41), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(50) + chr(0b110011) + chr(990 - 940), 37790 - 37782), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110011) + '\x33', 8), ehT0Px3KOsy9('\x30' + '\157' + chr(51) + '\x31' + '\x30', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b10011 + 0o40) + chr(0b10000 + 0o45) + '\x35', 44500 - 44492), ehT0Px3KOsy9(chr(0b11011 + 0o25) + '\157' + chr(0b10111 + 0o34) + '\x32' + '\064', 61814 - 61806), ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(0b1101111) + chr(0b110001) + '\x32' + chr(2251 - 2200), 0o10), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(0b1101111) + chr(0b110010 + 0o1) + chr(1125 - 1077) + '\067', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(7695 - 7584) + '\063' + chr(0b11000 + 0o36) + chr(0b101 + 0o62), ord("\x08")), ehT0Px3KOsy9(chr(1743 - 1695) + chr(0b1101111) + '\x32' + '\x31' + chr(0b100011 + 0o20), 0o10), ehT0Px3KOsy9('\060' + chr(2883 - 2772) + chr(0b11100 + 0o25) + '\066' + chr(0b101110 + 0o6), 34144 - 34136), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b100 + 0o62) + chr(51), 13916 - 13908), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b10011 + 0o36) + chr(51) + chr(0b100111 + 0o16), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110001 + 0o1) + chr(0b110100) + chr(50), 29532 - 29524), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b11010 + 0o32) + '\x32', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + '\x31' + '\067' + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(10318 - 10207) + '\x32' + '\066' + chr(0b110001), 5747 - 5739), ehT0Px3KOsy9('\x30' + chr(4779 - 4668) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b10100 + 0o35) + chr(50) + '\x31', 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110011) + chr(0b110111) + chr(0b1111 + 0o50), 53155 - 53147), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(49) + chr(0b110100) + chr(0b110101 + 0o1), 0o10), ehT0Px3KOsy9(chr(1959 - 1911) + '\157' + chr(0b110110) + '\x30', 60952 - 60944), ehT0Px3KOsy9(chr(0b1101 + 0o43) + '\157' + chr(0b110011) + chr(0b110001) + '\066', 0o10), ehT0Px3KOsy9('\060' + chr(0b101001 + 0o106) + chr(0b110001) + chr(51) + chr(0b110011 + 0o1), 52098 - 52090)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(203 - 150) + chr(0b11001 + 0o27), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x80'), chr(100) + '\x65' + '\x63' + chr(0b100111 + 0o110) + '\x64' + '\x65')(chr(117) + '\164' + chr(102) + '\055' + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def lmyTASfPrVYT(oVre8I6UXc3b, KKFQISrGeiAm, GMoNoPvgUHmu): sijXcSaDomT1 = H9zaXRrGK6Cq.worker.get_global_worker() xafqLlk3kkUe(sijXcSaDomT1, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcdI\x14\xe4\\&ro\xc7\xae\x00\x14\x1f\x8c\xec'), chr(0b1100100) + '\145' + '\143' + '\x6f' + chr(5955 - 5855) + chr(101))('\165' + '\x74' + '\x66' + '\x2d' + chr(0b111000)))() if KKFQISrGeiAm[xafqLlk3kkUe(SXOLrMavuUCe(b'\xdc@\x08\xd8Q\x16ck\xc0\xae\x02'), chr(3579 - 3479) + chr(0b1100101) + '\x63' + '\x6f' + chr(0b1100100) + chr(7709 - 7608))('\165' + chr(7207 - 7091) + '\146' + chr(0b101101) + chr(0b111000))]: DVlK92IJxvtb = KKFQISrGeiAm[xafqLlk3kkUe(SXOLrMavuUCe(b'\xcfB\x05\xe8E&ya\xc7\xa4\t\x124\x80\xec'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(0b110001 + 0o76) + chr(2511 - 2411) + chr(0b1100101))(chr(0b1110101) + chr(12200 - 12084) + chr(102) + chr(0b101101) + '\070')] else: DVlK92IJxvtb = woaFAiE2whCq(KKFQISrGeiAm[xafqLlk3kkUe(SXOLrMavuUCe(b'\xcfB\x05\xe8E&ya\xc7\xa4\t\x124\x80\xec'), '\x64' + chr(101) + '\143' + chr(0b10110 + 0o131) + chr(0b1100100) + chr(5599 - 5498))(chr(1517 - 1400) + '\164' + chr(0b1100110) + chr(45) + chr(0b111000))], sijXcSaDomT1.current_task_id) xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf1~\x18\xe9^\rN_'), chr(100) + chr(2984 - 2883) + chr(0b1100011) + chr(11688 - 11577) + '\x64' + chr(0b1100101))('\x75' + '\x74' + chr(102) + '\055' + chr(2794 - 2738)))(KKFQISrGeiAm[xafqLlk3kkUe(SXOLrMavuUCe(b'\xcfB\x05\xe8E&xd'), chr(100) + chr(101) + '\143' + '\x6f' + chr(100) + chr(0b1100101))(chr(117) + chr(0b1110100) + '\x66' + '\055' + '\x38')], KKFQISrGeiAm[xafqLlk3kkUe(SXOLrMavuUCe(b'\xc3N\x15\xf2[\x1cNn\xc8\xad\x00'), chr(0b1100100) + chr(0b1011000 + 0o15) + chr(0b1001111 + 0o24) + '\x6f' + chr(100) + chr(1253 - 1152))(chr(117) + '\164' + '\x66' + chr(45) + chr(0b11000 + 0o40))], KKFQISrGeiAm[xafqLlk3kkUe(SXOLrMavuUCe(b'\xcdM\x10\xf4D&\x7fa\xc4\xa5'), chr(3198 - 3098) + '\x65' + '\143' + '\157' + '\x64' + chr(101))(chr(117) + chr(0b1101 + 0o147) + chr(102) + chr(45) + '\x38')], KKFQISrGeiAm[xafqLlk3kkUe(SXOLrMavuUCe(b'\xcfB\x05\xe8E&ru\xdb\xb3\n\x05'), chr(0b11101 + 0o107) + chr(0b1111 + 0o126) + chr(0b1000110 + 0o35) + chr(6423 - 6312) + chr(6678 - 6578) + chr(101))(chr(0b1110101) + chr(116) + chr(0b1100011 + 0o3) + '\055' + chr(0b110001 + 0o7))], KKFQISrGeiAm[xafqLlk3kkUe(SXOLrMavuUCe(b'\xcfB\x05\xe8E&|e\xdd\xa8\n\x134\x87\xe9v\xa4\xe9'), '\144' + '\x65' + chr(0b1100011) + '\x6f' + '\144' + chr(0b1000100 + 0o41))(chr(117) + chr(0b11101 + 0o127) + chr(0b1011110 + 0o10) + '\x2d' + chr(0b1001 + 0o57))], KKFQISrGeiAm[xafqLlk3kkUe(SXOLrMavuUCe(b'\xc3D\x05\xefX\x1dNs\xc0\xa7\x0b\x16\x1f\x9c\xfa~\xb2'), chr(0b110001 + 0o63) + '\145' + chr(339 - 240) + '\x6f' + chr(100) + chr(101))('\165' + chr(0b1110100) + chr(0b1001100 + 0o32) + '\x2d' + '\x38')], KKFQISrGeiAm[xafqLlk3kkUe(SXOLrMavuUCe(b'\xc3D\x05\xefX\x1dNn\xdc\xad:\x05\x0e\x9d\xfdi\xaf\xc5m\xa9\x81\xa7'), '\x64' + chr(0b1100101) + '\x63' + chr(0b1101111) + chr(0b1000 + 0o134) + '\145')(chr(117) + chr(12613 - 12497) + chr(0b1000011 + 0o43) + chr(0b101101) + '\x38')], KKFQISrGeiAm[xafqLlk3kkUe(SXOLrMavuUCe(b'\xcfB\x05\xe8E&rr\xcc\xa1\x11\x1e\x04\x87\xd7\x7f\xb4\xf7v\xb1\xb2\xbb1\xad\x92\xe8\x00l4\xc6'), chr(0b1100100) + '\x65' + chr(0b1100011) + chr(531 - 420) + chr(3304 - 3204) + chr(8820 - 8719))(chr(463 - 346) + '\164' + chr(0b1100110) + chr(0b10111 + 0o26) + '\070')], KKFQISrGeiAm[xafqLlk3kkUe(SXOLrMavuUCe(b'\xcfB\x05\xe8E&|e\xdd\xa8\n\x134\x8a\xf8n\xb2'), chr(0b1100100) + chr(0b1000101 + 0o40) + chr(0b1000001 + 0o42) + chr(111) + '\x64' + chr(3054 - 2953))(chr(117) + chr(116) + '\x66' + chr(1350 - 1305) + chr(56))], KKFQISrGeiAm[xafqLlk3kkUe(SXOLrMavuUCe(b'\xcfB\x05\xe8E&ur\xc0\xb6\x00\x054\x80\xec'), chr(0b1100100) + '\x65' + chr(6376 - 6277) + chr(111) + '\144' + '\145')(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + '\055' + chr(0b110100 + 0o4))], actor_handle_id=DVlK92IJxvtb)
ray-project/ray
python/ray/rllib/optimizers/multi_gpu_impl.py
LocalSyncParallelOptimizer.load_data
def load_data(self, sess, inputs, state_inputs): """Bulk loads the specified inputs into device memory. The shape of the inputs must conform to the shapes of the input placeholders this optimizer was constructed with. The data is split equally across all the devices. If the data is not evenly divisible by the batch size, excess data will be discarded. Args: sess: TensorFlow session. inputs: List of arrays matching the input placeholders, of shape [BATCH_SIZE, ...]. state_inputs: List of RNN input arrays. These arrays have size [BATCH_SIZE / MAX_SEQ_LEN, ...]. Returns: The number of tuples loaded per device. """ if log_once("load_data"): logger.info( "Training on concatenated sample batches:\n\n{}\n".format( summarize({ "placeholders": self.loss_inputs, "inputs": inputs, "state_inputs": state_inputs }))) feed_dict = {} assert len(self.loss_inputs) == len(inputs + state_inputs), \ (self.loss_inputs, inputs, state_inputs) # Let's suppose we have the following input data, and 2 devices: # 1 2 3 4 5 6 7 <- state inputs shape # A A A B B B C C C D D D E E E F F F G G G <- inputs shape # The data is truncated and split across devices as follows: # |---| seq len = 3 # |---------------------------------| seq batch size = 6 seqs # |----------------| per device batch size = 9 tuples if len(state_inputs) > 0: smallest_array = state_inputs[0] seq_len = len(inputs[0]) // len(state_inputs[0]) self._loaded_max_seq_len = seq_len else: smallest_array = inputs[0] self._loaded_max_seq_len = 1 sequences_per_minibatch = ( self.max_per_device_batch_size // self._loaded_max_seq_len * len( self.devices)) if sequences_per_minibatch < 1: logger.warn( ("Target minibatch size is {}, however the rollout sequence " "length is {}, hence the minibatch size will be raised to " "{}.").format(self.max_per_device_batch_size, self._loaded_max_seq_len, self._loaded_max_seq_len * len(self.devices))) sequences_per_minibatch = 1 if len(smallest_array) < sequences_per_minibatch: # Dynamically shrink the batch size if insufficient data sequences_per_minibatch = make_divisible_by( len(smallest_array), len(self.devices)) if log_once("data_slicing"): logger.info( ("Divided {} rollout sequences, each of length {}, among " "{} devices.").format( len(smallest_array), self._loaded_max_seq_len, len(self.devices))) if sequences_per_minibatch < len(self.devices): raise ValueError( "Must load at least 1 tuple sequence per device. Try " "increasing `sgd_minibatch_size` or reducing `max_seq_len` " "to ensure that at least one sequence fits per device.") self._loaded_per_device_batch_size = (sequences_per_minibatch // len( self.devices) * self._loaded_max_seq_len) if len(state_inputs) > 0: # First truncate the RNN state arrays to the sequences_per_minib. state_inputs = [ make_divisible_by(arr, sequences_per_minibatch) for arr in state_inputs ] # Then truncate the data inputs to match inputs = [arr[:len(state_inputs[0]) * seq_len] for arr in inputs] assert len(state_inputs[0]) * seq_len == len(inputs[0]), \ (len(state_inputs[0]), sequences_per_minibatch, seq_len, len(inputs[0])) for ph, arr in zip(self.loss_inputs, inputs + state_inputs): feed_dict[ph] = arr truncated_len = len(inputs[0]) else: for ph, arr in zip(self.loss_inputs, inputs + state_inputs): truncated_arr = make_divisible_by(arr, sequences_per_minibatch) feed_dict[ph] = truncated_arr truncated_len = len(truncated_arr) sess.run([t.init_op for t in self._towers], feed_dict=feed_dict) self.num_tuples_loaded = truncated_len tuples_per_device = truncated_len // len(self.devices) assert tuples_per_device > 0, "No data loaded?" assert tuples_per_device % self._loaded_per_device_batch_size == 0 return tuples_per_device
python
def load_data(self, sess, inputs, state_inputs): """Bulk loads the specified inputs into device memory. The shape of the inputs must conform to the shapes of the input placeholders this optimizer was constructed with. The data is split equally across all the devices. If the data is not evenly divisible by the batch size, excess data will be discarded. Args: sess: TensorFlow session. inputs: List of arrays matching the input placeholders, of shape [BATCH_SIZE, ...]. state_inputs: List of RNN input arrays. These arrays have size [BATCH_SIZE / MAX_SEQ_LEN, ...]. Returns: The number of tuples loaded per device. """ if log_once("load_data"): logger.info( "Training on concatenated sample batches:\n\n{}\n".format( summarize({ "placeholders": self.loss_inputs, "inputs": inputs, "state_inputs": state_inputs }))) feed_dict = {} assert len(self.loss_inputs) == len(inputs + state_inputs), \ (self.loss_inputs, inputs, state_inputs) # Let's suppose we have the following input data, and 2 devices: # 1 2 3 4 5 6 7 <- state inputs shape # A A A B B B C C C D D D E E E F F F G G G <- inputs shape # The data is truncated and split across devices as follows: # |---| seq len = 3 # |---------------------------------| seq batch size = 6 seqs # |----------------| per device batch size = 9 tuples if len(state_inputs) > 0: smallest_array = state_inputs[0] seq_len = len(inputs[0]) // len(state_inputs[0]) self._loaded_max_seq_len = seq_len else: smallest_array = inputs[0] self._loaded_max_seq_len = 1 sequences_per_minibatch = ( self.max_per_device_batch_size // self._loaded_max_seq_len * len( self.devices)) if sequences_per_minibatch < 1: logger.warn( ("Target minibatch size is {}, however the rollout sequence " "length is {}, hence the minibatch size will be raised to " "{}.").format(self.max_per_device_batch_size, self._loaded_max_seq_len, self._loaded_max_seq_len * len(self.devices))) sequences_per_minibatch = 1 if len(smallest_array) < sequences_per_minibatch: # Dynamically shrink the batch size if insufficient data sequences_per_minibatch = make_divisible_by( len(smallest_array), len(self.devices)) if log_once("data_slicing"): logger.info( ("Divided {} rollout sequences, each of length {}, among " "{} devices.").format( len(smallest_array), self._loaded_max_seq_len, len(self.devices))) if sequences_per_minibatch < len(self.devices): raise ValueError( "Must load at least 1 tuple sequence per device. Try " "increasing `sgd_minibatch_size` or reducing `max_seq_len` " "to ensure that at least one sequence fits per device.") self._loaded_per_device_batch_size = (sequences_per_minibatch // len( self.devices) * self._loaded_max_seq_len) if len(state_inputs) > 0: # First truncate the RNN state arrays to the sequences_per_minib. state_inputs = [ make_divisible_by(arr, sequences_per_minibatch) for arr in state_inputs ] # Then truncate the data inputs to match inputs = [arr[:len(state_inputs[0]) * seq_len] for arr in inputs] assert len(state_inputs[0]) * seq_len == len(inputs[0]), \ (len(state_inputs[0]), sequences_per_minibatch, seq_len, len(inputs[0])) for ph, arr in zip(self.loss_inputs, inputs + state_inputs): feed_dict[ph] = arr truncated_len = len(inputs[0]) else: for ph, arr in zip(self.loss_inputs, inputs + state_inputs): truncated_arr = make_divisible_by(arr, sequences_per_minibatch) feed_dict[ph] = truncated_arr truncated_len = len(truncated_arr) sess.run([t.init_op for t in self._towers], feed_dict=feed_dict) self.num_tuples_loaded = truncated_len tuples_per_device = truncated_len // len(self.devices) assert tuples_per_device > 0, "No data loaded?" assert tuples_per_device % self._loaded_per_device_batch_size == 0 return tuples_per_device
[ "def", "load_data", "(", "self", ",", "sess", ",", "inputs", ",", "state_inputs", ")", ":", "if", "log_once", "(", "\"load_data\"", ")", ":", "logger", ".", "info", "(", "\"Training on concatenated sample batches:\\n\\n{}\\n\"", ".", "format", "(", "summarize", "(", "{", "\"placeholders\"", ":", "self", ".", "loss_inputs", ",", "\"inputs\"", ":", "inputs", ",", "\"state_inputs\"", ":", "state_inputs", "}", ")", ")", ")", "feed_dict", "=", "{", "}", "assert", "len", "(", "self", ".", "loss_inputs", ")", "==", "len", "(", "inputs", "+", "state_inputs", ")", ",", "(", "self", ".", "loss_inputs", ",", "inputs", ",", "state_inputs", ")", "# Let's suppose we have the following input data, and 2 devices:", "# 1 2 3 4 5 6 7 <- state inputs shape", "# A A A B B B C C C D D D E E E F F F G G G <- inputs shape", "# The data is truncated and split across devices as follows:", "# |---| seq len = 3", "# |---------------------------------| seq batch size = 6 seqs", "# |----------------| per device batch size = 9 tuples", "if", "len", "(", "state_inputs", ")", ">", "0", ":", "smallest_array", "=", "state_inputs", "[", "0", "]", "seq_len", "=", "len", "(", "inputs", "[", "0", "]", ")", "//", "len", "(", "state_inputs", "[", "0", "]", ")", "self", ".", "_loaded_max_seq_len", "=", "seq_len", "else", ":", "smallest_array", "=", "inputs", "[", "0", "]", "self", ".", "_loaded_max_seq_len", "=", "1", "sequences_per_minibatch", "=", "(", "self", ".", "max_per_device_batch_size", "//", "self", ".", "_loaded_max_seq_len", "*", "len", "(", "self", ".", "devices", ")", ")", "if", "sequences_per_minibatch", "<", "1", ":", "logger", ".", "warn", "(", "(", "\"Target minibatch size is {}, however the rollout sequence \"", "\"length is {}, hence the minibatch size will be raised to \"", "\"{}.\"", ")", ".", "format", "(", "self", ".", "max_per_device_batch_size", ",", "self", ".", "_loaded_max_seq_len", ",", "self", ".", "_loaded_max_seq_len", "*", "len", "(", "self", ".", "devices", ")", ")", ")", "sequences_per_minibatch", "=", "1", "if", "len", "(", "smallest_array", ")", "<", "sequences_per_minibatch", ":", "# Dynamically shrink the batch size if insufficient data", "sequences_per_minibatch", "=", "make_divisible_by", "(", "len", "(", "smallest_array", ")", ",", "len", "(", "self", ".", "devices", ")", ")", "if", "log_once", "(", "\"data_slicing\"", ")", ":", "logger", ".", "info", "(", "(", "\"Divided {} rollout sequences, each of length {}, among \"", "\"{} devices.\"", ")", ".", "format", "(", "len", "(", "smallest_array", ")", ",", "self", ".", "_loaded_max_seq_len", ",", "len", "(", "self", ".", "devices", ")", ")", ")", "if", "sequences_per_minibatch", "<", "len", "(", "self", ".", "devices", ")", ":", "raise", "ValueError", "(", "\"Must load at least 1 tuple sequence per device. Try \"", "\"increasing `sgd_minibatch_size` or reducing `max_seq_len` \"", "\"to ensure that at least one sequence fits per device.\"", ")", "self", ".", "_loaded_per_device_batch_size", "=", "(", "sequences_per_minibatch", "//", "len", "(", "self", ".", "devices", ")", "*", "self", ".", "_loaded_max_seq_len", ")", "if", "len", "(", "state_inputs", ")", ">", "0", ":", "# First truncate the RNN state arrays to the sequences_per_minib.", "state_inputs", "=", "[", "make_divisible_by", "(", "arr", ",", "sequences_per_minibatch", ")", "for", "arr", "in", "state_inputs", "]", "# Then truncate the data inputs to match", "inputs", "=", "[", "arr", "[", ":", "len", "(", "state_inputs", "[", "0", "]", ")", "*", "seq_len", "]", "for", "arr", "in", "inputs", "]", "assert", "len", "(", "state_inputs", "[", "0", "]", ")", "*", "seq_len", "==", "len", "(", "inputs", "[", "0", "]", ")", ",", "(", "len", "(", "state_inputs", "[", "0", "]", ")", ",", "sequences_per_minibatch", ",", "seq_len", ",", "len", "(", "inputs", "[", "0", "]", ")", ")", "for", "ph", ",", "arr", "in", "zip", "(", "self", ".", "loss_inputs", ",", "inputs", "+", "state_inputs", ")", ":", "feed_dict", "[", "ph", "]", "=", "arr", "truncated_len", "=", "len", "(", "inputs", "[", "0", "]", ")", "else", ":", "for", "ph", ",", "arr", "in", "zip", "(", "self", ".", "loss_inputs", ",", "inputs", "+", "state_inputs", ")", ":", "truncated_arr", "=", "make_divisible_by", "(", "arr", ",", "sequences_per_minibatch", ")", "feed_dict", "[", "ph", "]", "=", "truncated_arr", "truncated_len", "=", "len", "(", "truncated_arr", ")", "sess", ".", "run", "(", "[", "t", ".", "init_op", "for", "t", "in", "self", ".", "_towers", "]", ",", "feed_dict", "=", "feed_dict", ")", "self", ".", "num_tuples_loaded", "=", "truncated_len", "tuples_per_device", "=", "truncated_len", "//", "len", "(", "self", ".", "devices", ")", "assert", "tuples_per_device", ">", "0", ",", "\"No data loaded?\"", "assert", "tuples_per_device", "%", "self", ".", "_loaded_per_device_batch_size", "==", "0", "return", "tuples_per_device" ]
Bulk loads the specified inputs into device memory. The shape of the inputs must conform to the shapes of the input placeholders this optimizer was constructed with. The data is split equally across all the devices. If the data is not evenly divisible by the batch size, excess data will be discarded. Args: sess: TensorFlow session. inputs: List of arrays matching the input placeholders, of shape [BATCH_SIZE, ...]. state_inputs: List of RNN input arrays. These arrays have size [BATCH_SIZE / MAX_SEQ_LEN, ...]. Returns: The number of tuples loaded per device.
[ "Bulk", "loads", "the", "specified", "inputs", "into", "device", "memory", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/rllib/optimizers/multi_gpu_impl.py#L118-L225
train
Bulk loads the specified inputs into device memory.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg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8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b101011 + 0o5) + chr(111) + '\062' + chr(0b110110) + chr(50), 0o10), ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(0b101101 + 0o102) + '\x31' + chr(0b110001) + chr(1748 - 1699), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(49) + chr(0b110011) + '\061', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(5210 - 5099) + chr(0b110001) + chr(0b11110 + 0o30) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(1129 - 1074) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(0b110010) + chr(51), 64862 - 64854), ehT0Px3KOsy9(chr(114 - 66) + '\157' + '\x32' + '\062' + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(0b11000 + 0o30) + '\157' + '\063' + '\061' + '\065', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b11011 + 0o27) + '\x37' + chr(0b10101 + 0o37), 0o10), ehT0Px3KOsy9(chr(1653 - 1605) + '\157' + chr(0b11010 + 0o31) + chr(0b110011) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(4731 - 4620) + chr(51) + '\x35', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x31' + '\062', ord("\x08")), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(0b1101111) + chr(0b101100 + 0o6) + chr(1162 - 1114) + chr(1264 - 1216), 0b1000), ehT0Px3KOsy9('\x30' + chr(7121 - 7010) + chr(1666 - 1616) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(0b100111 + 0o11) + '\157' + chr(50) + chr(0b110 + 0o52) + '\064', 0o10), ehT0Px3KOsy9(chr(0b10011 + 0o35) + '\x6f' + '\x32' + chr(50) + '\x37', 0b1000), ehT0Px3KOsy9(chr(2220 - 2172) + chr(111) + chr(1431 - 1380) + chr(0b110101) + chr(2449 - 2395), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b100 + 0o57) + chr(53) + chr(1493 - 1441), 42503 - 42495), ehT0Px3KOsy9(chr(736 - 688) + chr(111) + chr(0b100111 + 0o12) + '\x30' + chr(0b101000 + 0o16), 0b1000), ehT0Px3KOsy9(chr(0b0 + 0o60) + '\x6f' + chr(0b110011) + '\067' + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + '\x31' + chr(0b110101 + 0o1) + chr(0b110101), 44282 - 44274), ehT0Px3KOsy9('\x30' + chr(111) + chr(1936 - 1887) + '\067' + chr(1079 - 1031), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b101010 + 0o105) + '\063' + '\063' + chr(0b1010 + 0o55), ord("\x08")), ehT0Px3KOsy9(chr(1198 - 1150) + '\x6f' + '\061' + chr(0b101100 + 0o6) + '\065', 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(2148 - 2098) + chr(55) + chr(0b100010 + 0o23), 56349 - 56341), ehT0Px3KOsy9(chr(0b1100 + 0o44) + '\x6f' + '\x33' + '\x35' + chr(51), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b1111 + 0o43) + chr(0b101010 + 0o7) + '\x37', 0o10), ehT0Px3KOsy9(chr(907 - 859) + '\157' + chr(0b110001) + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(1790 - 1740) + chr(0b110100) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(2114 - 2066) + chr(111) + chr(0b110011) + chr(1078 - 1030) + chr(0b110000 + 0o7), 0b1000), ehT0Px3KOsy9(chr(48) + chr(10680 - 10569) + '\067' + '\x30', 0o10), ehT0Px3KOsy9('\x30' + '\157' + '\x36' + chr(0b110001 + 0o4), 46808 - 46800), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\062', ord("\x08")), ehT0Px3KOsy9(chr(1388 - 1340) + chr(0b1101111) + chr(86 - 36) + '\063', 8), ehT0Px3KOsy9(chr(1345 - 1297) + chr(123 - 12) + chr(0b100000 + 0o22) + chr(0b100111 + 0o14) + chr(154 - 104), ord("\x08")), ehT0Px3KOsy9(chr(0b11111 + 0o21) + '\157' + chr(786 - 734) + '\x33', 34722 - 34714), ehT0Px3KOsy9('\x30' + '\x6f' + chr(2306 - 2257) + '\x37' + chr(52), 0o10), ehT0Px3KOsy9(chr(2019 - 1971) + chr(233 - 122) + chr(0b1010 + 0o47) + '\x35' + chr(1022 - 970), 0o10), ehT0Px3KOsy9(chr(275 - 227) + chr(5816 - 5705) + chr(49) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(1846 - 1798) + '\157' + '\x33', ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110101) + '\060', 12424 - 12416)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x9c'), chr(6444 - 6344) + '\145' + '\x63' + '\x6f' + chr(0b1100100) + '\145')('\x75' + chr(0b1110100) + chr(0b1100110) + chr(45) + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def LJE_6m8msB6_(oVre8I6UXc3b, HVWCHjSQ2I35, vXoupepMtCXU, _Bdssat1btI8): if svs9yxNjMQxH(xafqLlk3kkUe(SXOLrMavuUCe(b'\xde&8\x13aw\xf2\xb9\xdd'), chr(100) + chr(0b11 + 0o142) + chr(0b1100011) + chr(4931 - 4820) + chr(100) + '\145')(chr(6081 - 5964) + '\164' + chr(102) + chr(45) + chr(56))): xafqLlk3kkUe(hdK8qOUhR6Or, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe1~\x11\x0fKp\xf4\xfa\xd6\xb0Ga'), '\144' + chr(0b1100101) + '\x63' + chr(111) + '\x64' + chr(8240 - 8139))(chr(117) + '\164' + '\146' + chr(470 - 425) + chr(56)))(xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b'\xe6;8\x1ePz\xfd\xaa\x9c\xb3s*\xe3\x7f\xea\xf4\x8f\x98#\x94\x14\x0c\xba1\x9d\x98\xeee\xd0\xab]\x15`r\xee@\x14\tz9\xb8C"\n4'), '\x64' + chr(2847 - 2746) + chr(99) + chr(0b101001 + 0o106) + '\144' + chr(0b10110 + 0o117))('\x75' + chr(0b1110100) + chr(0b1100110) + chr(45) + chr(0b110010 + 0o6)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xe4}+\x18vr\xc0\xfe\xec\xacx`'), chr(3972 - 3872) + chr(101) + chr(0b1100011) + chr(9975 - 9864) + chr(100) + chr(2479 - 2378))(chr(0b101001 + 0o114) + chr(0b1110100) + '\x66' + '\x2d' + chr(56)))(pnRRaoCmT5rs({xafqLlk3kkUe(SXOLrMavuUCe(b'\xc2%8\x14[{\xfc\xa1\xd8\xb9oy'), '\144' + chr(0b1100101) + chr(0b11111 + 0o104) + '\x6f' + chr(0b1010101 + 0o17) + chr(1780 - 1679))(chr(0b1111 + 0o146) + chr(116) + '\x66' + chr(1059 - 1014) + chr(0b110101 + 0o3)): xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xde&*\x04az\xfd\xbd\xc9\xa8n'), chr(0b1010111 + 0o15) + '\145' + chr(0b1100011) + '\x6f' + '\144' + chr(101))(chr(117) + '\164' + chr(0b1100110) + chr(45) + chr(0b111000))), xafqLlk3kkUe(SXOLrMavuUCe(b"\xdb')\x02J`"), '\144' + chr(101) + chr(9772 - 9673) + chr(0b10110 + 0o131) + chr(0b1010000 + 0o24) + '\145')(chr(679 - 562) + chr(8312 - 8196) + chr(102) + '\055' + chr(2132 - 2076)): vXoupepMtCXU, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc1=8\x03[L\xfa\xa3\xcc\xa9iy'), chr(3239 - 3139) + '\x65' + '\143' + chr(0b1101111) + chr(6818 - 6718) + '\x65')(chr(10607 - 10490) + '\x74' + '\x66' + chr(45) + '\070'): _Bdssat1btI8}))) knvK4sqTZWNg = {} assert c2A0yzQpDQB3(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xde&*\x04az\xfd\xbd\xc9\xa8n'), chr(0b10110 + 0o116) + chr(0b1100101) + chr(99) + '\157' + chr(100) + chr(0b1100101))(chr(117) + chr(6755 - 6639) + chr(102) + chr(45) + '\070'))) == c2A0yzQpDQB3(vXoupepMtCXU + _Bdssat1btI8), (xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xde&*\x04az\xfd\xbd\xc9\xa8n'), chr(100) + chr(4301 - 4200) + '\x63' + chr(0b1101111) + '\x64' + chr(0b1100101))(chr(117) + chr(10389 - 10273) + '\146' + chr(0b101101) + chr(0b111000))), vXoupepMtCXU, _Bdssat1btI8) if c2A0yzQpDQB3(_Bdssat1btI8) > ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(519 - 471), 0o10): knKCI1Rsm3ar = _Bdssat1btI8[ehT0Px3KOsy9('\x30' + chr(475 - 364) + '\060', 8)] yDZoVeyD82xU = c2A0yzQpDQB3(vXoupepMtCXU[ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(0b101010 + 0o105) + chr(0b110000), 8)]) // c2A0yzQpDQB3(_Bdssat1btI8[ehT0Px3KOsy9(chr(1426 - 1378) + chr(0b1101111) + chr(1991 - 1943), 8)]) oVre8I6UXc3b.WbYQCX56l4cG = yDZoVeyD82xU else: knKCI1Rsm3ar = vXoupepMtCXU[ehT0Px3KOsy9(chr(48) + chr(9360 - 9249) + chr(48), 8)] oVre8I6UXc3b.WbYQCX56l4cG = ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(7652 - 7541) + chr(0b110001), 0o10) EABENDOVb3Iy = oVre8I6UXc3b.max_per_device_batch_size // oVre8I6UXc3b.WbYQCX56l4cG * c2A0yzQpDQB3(oVre8I6UXc3b.devices) if EABENDOVb3Iy < ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(1006 - 957), 8): xafqLlk3kkUe(hdK8qOUhR6Or, xafqLlk3kkUe(SXOLrMavuUCe(b'\xdc\r\x1c\x19pQ\xf2\xaf\xfa\x92Vg'), chr(100) + chr(114 - 13) + '\143' + chr(0b1101111) + '\x64' + '\x65')(chr(0b1000011 + 0o62) + chr(1682 - 1566) + '\146' + '\055' + '\070'))(xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b'\xe6(+\x10[g\xb3\xa0\xd5\xb2th\xe1d\xe7\xff\xce\x9f/\x80\x10X\xb6&\x9d\x90\xf2$\x80\xafWBge\xffQ\\\x18af\x92;6\x1bR|\xe6\xb9\x9c\xafx{\xf5u\xea\xf4\x8b\xcc*\x9f\x1b\x1f\xab=\x9d\x82\xfc(\xdb\xba\x14\x15jv\xf4@\x19L}k\xd7i4\x1ePz\xf1\xac\xc8\xbfu*\xf3y\xfe\xf2\xce\x9b/\x96\x19X\xbd0\x9d\x99\xeea\xd3\xa2\\\x15v|\xbaX\x01B'), chr(0b1011001 + 0o13) + '\145' + '\143' + chr(0b1101111) + chr(0b1111 + 0o125) + chr(0b10 + 0o143))('\165' + '\164' + chr(102) + chr(0b101101) + chr(0b11100 + 0o34)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xe4}+\x18vr\xc0\xfe\xec\xacx`'), '\144' + chr(101) + chr(2475 - 2376) + '\x6f' + chr(0b1100100) + chr(0b100101 + 0o100))(chr(5133 - 5016) + chr(2358 - 2242) + '\x66' + '\x2d' + chr(0b110010 + 0o6)))(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xdf(!(Nv\xe1\x92\xd8\xb9kc\xe3u\xdb\xf5\x8f\x98%\x92*\x0b\xb6/\xd8'), chr(0b1100100) + '\x65' + '\143' + '\157' + '\x64' + chr(1093 - 992))(chr(0b1110101) + chr(0b1110100) + chr(0b111010 + 0o54) + '\x2d' + chr(56))), xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe5+\x00&}K\xa6\xfb\xd0\xe8~M'), chr(100) + chr(0b1100101) + chr(99) + chr(502 - 391) + chr(7943 - 7843) + chr(101))('\165' + '\164' + chr(0b1001110 + 0o30) + chr(0b101101) + '\x38')), xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe5+\x00&}K\xa6\xfb\xd0\xe8~M'), chr(3360 - 3260) + chr(0b111110 + 0o47) + chr(99) + chr(618 - 507) + '\144' + chr(0b1100101))('\x75' + '\164' + chr(2101 - 1999) + chr(0b101011 + 0o2) + chr(1648 - 1592))) * c2A0yzQpDQB3(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd6,/\x1e]v\xe0'), chr(2344 - 2244) + chr(101) + chr(201 - 102) + chr(111) + chr(0b1001110 + 0o26) + chr(0b1100101))(chr(0b1110101) + '\164' + chr(733 - 631) + '\055' + chr(1055 - 999)))))) EABENDOVb3Iy = ehT0Px3KOsy9('\x30' + chr(0b1 + 0o156) + '\061', 8) if c2A0yzQpDQB3(knKCI1Rsm3ar) < EABENDOVb3Iy: EABENDOVb3Iy = sj1XtF4iUbJi(c2A0yzQpDQB3(knKCI1Rsm3ar), c2A0yzQpDQB3(oVre8I6UXc3b.devices)) if svs9yxNjMQxH(xafqLlk3kkUe(SXOLrMavuUCe(b'\xd6(-\x16a`\xff\xa4\xdf\xb5sm'), '\144' + '\x65' + '\x63' + chr(0b111100 + 0o63) + chr(0b1100100) + chr(101))(chr(437 - 320) + '\164' + chr(102) + chr(0b1000 + 0o45) + chr(1264 - 1208))): xafqLlk3kkUe(hdK8qOUhR6Or, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe1~\x11\x0fKp\xf4\xfa\xd6\xb0Ga'), '\144' + '\145' + '\x63' + chr(111) + chr(0b1100100) + chr(101))(chr(117) + chr(116) + chr(0b111000 + 0o56) + chr(0b10010 + 0o33) + chr(0b111000 + 0o0)))(xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b'\xf6 /\x1eZv\xf7\xed\xc7\xa1=x\xef|\xe8\xf8\x9b\x98f\x89\x10\t\xaa0\xd3\x88\xea{\x8c\xe7]Ta{\xbaL\x1aLef\xdc.-\x1f\x1eh\xee\xe1\x9c\xbdpe\xeew\xa4\xec\x93\xcc"\x9f\x03\x11\xbc0\xce\xc5'), chr(0b1100100) + chr(0b1011100 + 0o11) + chr(99) + chr(111) + chr(0b1100100) + '\x65')(chr(0b1010010 + 0o43) + '\x74' + '\146' + '\055' + chr(1315 - 1259)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xe4}+\x18vr\xc0\xfe\xec\xacx`'), chr(0b1100100) + chr(101) + chr(0b111011 + 0o50) + '\157' + chr(100) + '\145')(chr(0b1110101) + '\x74' + chr(0b1100110) + '\x2d' + '\070'))(c2A0yzQpDQB3(knKCI1Rsm3ar), xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe5+\x00&}K\xa6\xfb\xd0\xe8~M'), chr(4984 - 4884) + '\145' + chr(99) + '\x6f' + '\x64' + chr(0b101 + 0o140))('\x75' + chr(0b1010100 + 0o40) + '\x66' + '\x2d' + chr(56))), c2A0yzQpDQB3(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd6,/\x1e]v\xe0'), chr(100) + '\145' + '\143' + chr(0b1101111) + chr(100) + chr(101))(chr(0b1110101) + '\x74' + chr(4488 - 4386) + chr(0b101100 + 0o1) + '\070'))))) if EABENDOVb3Iy < c2A0yzQpDQB3(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd6,/\x1e]v\xe0'), chr(6174 - 6074) + '\145' + '\x63' + chr(0b101110 + 0o101) + chr(0b1010101 + 0o17) + '\x65')('\165' + '\x74' + chr(0b1100110) + chr(45) + '\x38'))): raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b'\xff<*\x03\x1e\x7f\xfc\xac\xd8\xfc|~\xa0|\xe1\xf6\x9d\x98f\xcbU\x0c\xaa%\xd1\x8e\xaf{\xc5\xb6MPlp\xff\x03\x0c\t{#\xd6,/\x1e]v\xbd\xed\xe8\xaed*\xe9~\xe7\xe5\x8b\x8d5\x93\x1b\x1f\xff5\xce\x8c\xebW\xcd\xaeV\\`r\xee@\x143zj\xc8,9WQa\xb3\xbf\xd9\xb8hi\xe9~\xe3\xb7\x8e\x81\'\x82*\x0b\xba$\xe2\x87\xeaf\xc0\xe7LZ"v\xf4P\t\x1el#\xc6!8\x03\x1er\xe7\xed\xd0\xb9|y\xf40\xeb\xf9\x8b\xcc5\x9f\x04\r\xba;\xde\x8e\xafn\xc9\xb3K\x15rv\xe8\x03\x18\t\x7fj\xd1,w'), chr(100) + chr(2072 - 1971) + chr(99) + chr(3418 - 3307) + chr(0b1100100) + chr(101))('\x75' + chr(0b1110001 + 0o3) + chr(9569 - 9467) + '\x2d' + chr(2840 - 2784))) oVre8I6UXc3b.uLBhCbczxtoV = EABENDOVb3Iy // c2A0yzQpDQB3(oVre8I6UXc3b.devices) * oVre8I6UXc3b.WbYQCX56l4cG if c2A0yzQpDQB3(_Bdssat1btI8) > ehT0Px3KOsy9(chr(0b110000) + '\157' + '\060', 8): _Bdssat1btI8 = [sj1XtF4iUbJi(ZxkNvNvuRNy5, EABENDOVb3Iy) for ZxkNvNvuRNy5 in _Bdssat1btI8] vXoupepMtCXU = [ZxkNvNvuRNy5[:c2A0yzQpDQB3(_Bdssat1btI8[ehT0Px3KOsy9('\060' + chr(0b1011 + 0o144) + '\060', 8)]) * yDZoVeyD82xU] for ZxkNvNvuRNy5 in vXoupepMtCXU] assert c2A0yzQpDQB3(_Bdssat1btI8[ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(0b100101 + 0o112) + '\x30', 8)]) * yDZoVeyD82xU == c2A0yzQpDQB3(vXoupepMtCXU[ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\060', 8)]), (c2A0yzQpDQB3(_Bdssat1btI8[ehT0Px3KOsy9('\x30' + chr(6049 - 5938) + chr(0b101100 + 0o4), 8)]), EABENDOVb3Iy, yDZoVeyD82xU, c2A0yzQpDQB3(vXoupepMtCXU[ehT0Px3KOsy9('\x30' + chr(111) + '\x30', 8)])) for (KtgnQBtjLnH6, ZxkNvNvuRNy5) in pZ0NK2y6HRbn(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xde&*\x04az\xfd\xbd\xc9\xa8n'), chr(0b11001 + 0o113) + '\x65' + chr(99) + chr(111) + '\144' + chr(2104 - 2003))(chr(0b1110101) + '\164' + chr(102) + '\055' + chr(0b111000))), vXoupepMtCXU + _Bdssat1btI8): knvK4sqTZWNg[KtgnQBtjLnH6] = ZxkNvNvuRNy5 VcaEzYDALUXM = c2A0yzQpDQB3(vXoupepMtCXU[ehT0Px3KOsy9('\060' + '\x6f' + chr(1265 - 1217), 8)]) else: for (KtgnQBtjLnH6, ZxkNvNvuRNy5) in pZ0NK2y6HRbn(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xde&*\x04az\xfd\xbd\xc9\xa8n'), '\144' + chr(101) + chr(99) + '\x6f' + chr(100) + chr(4684 - 4583))(chr(4290 - 4173) + chr(116) + '\x66' + '\x2d' + '\070')), vXoupepMtCXU + _Bdssat1btI8): VMjrG_f5zEU3 = sj1XtF4iUbJi(ZxkNvNvuRNy5, EABENDOVb3Iy) knvK4sqTZWNg[KtgnQBtjLnH6] = VMjrG_f5zEU3 VcaEzYDALUXM = c2A0yzQpDQB3(VMjrG_f5zEU3) xafqLlk3kkUe(HVWCHjSQ2I35, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc1.-B|F\xa5\xfc\xde\xabG8'), chr(0b1100100) + '\145' + '\143' + '\x6f' + chr(0b1100100) + chr(0b1100101))('\x75' + chr(116) + chr(0b1100110) + chr(0b101101) + '\x38'))([xafqLlk3kkUe(YeT3l7JgTbWR, xafqLlk3kkUe(SXOLrMavuUCe(b"\xdb'0\x03a|\xe3"), '\x64' + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + chr(7053 - 6953) + '\145')(chr(8747 - 8630) + chr(0b1110100) + chr(0b1100110) + '\055' + chr(532 - 476))) for YeT3l7JgTbWR in xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xed=6\x00[a\xe0'), chr(0b111100 + 0o50) + chr(1555 - 1454) + '\x63' + '\157' + chr(0b1100100) + chr(717 - 616))(chr(1533 - 1416) + chr(0b1110100) + chr(6200 - 6098) + '\x2d' + chr(2896 - 2840)))], feed_dict=knvK4sqTZWNg) oVre8I6UXc3b.z_7k7IzeLgqz = VcaEzYDALUXM bhBKWwhjQy6b = VcaEzYDALUXM // c2A0yzQpDQB3(oVre8I6UXc3b.devices) assert bhBKWwhjQy6b > ehT0Px3KOsy9(chr(416 - 368) + chr(111) + chr(0b100111 + 0o11), 8), xafqLlk3kkUe(SXOLrMavuUCe(b'\xfc&y\x13_g\xf2\xed\xd0\xb3|n\xe5t\xbb'), '\x64' + chr(0b1100001 + 0o4) + chr(0b1100011) + '\157' + chr(0b1100100) + '\145')('\x75' + chr(0b1110100) + chr(102) + chr(0b101101) + chr(56)) assert bhBKWwhjQy6b % xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc7\x05\x1b\x1f}q\xf0\xb7\xc4\xa8r\\'), chr(3940 - 3840) + chr(0b1100101) + '\x63' + chr(0b1101111) + '\x64' + chr(101))('\165' + chr(0b111111 + 0o65) + chr(102) + '\x2d' + chr(56))) == ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110000), 8) return bhBKWwhjQy6b
ray-project/ray
python/ray/rllib/optimizers/multi_gpu_impl.py
LocalSyncParallelOptimizer.optimize
def optimize(self, sess, batch_index): """Run a single step of SGD. Runs a SGD step over a slice of the preloaded batch with size given by self._loaded_per_device_batch_size and offset given by the batch_index argument. Updates shared model weights based on the averaged per-device gradients. Args: sess: TensorFlow session. batch_index: Offset into the preloaded data. This value must be between `0` and `tuples_per_device`. The amount of data to process is at most `max_per_device_batch_size`. Returns: The outputs of extra_ops evaluated over the batch. """ feed_dict = { self._batch_index: batch_index, self._per_device_batch_size: self._loaded_per_device_batch_size, self._max_seq_len: self._loaded_max_seq_len, } for tower in self._towers: feed_dict.update(tower.loss_graph.extra_compute_grad_feed_dict()) fetches = {"train": self._train_op} for tower in self._towers: fetches.update(tower.loss_graph.extra_compute_grad_fetches()) return sess.run(fetches, feed_dict=feed_dict)
python
def optimize(self, sess, batch_index): """Run a single step of SGD. Runs a SGD step over a slice of the preloaded batch with size given by self._loaded_per_device_batch_size and offset given by the batch_index argument. Updates shared model weights based on the averaged per-device gradients. Args: sess: TensorFlow session. batch_index: Offset into the preloaded data. This value must be between `0` and `tuples_per_device`. The amount of data to process is at most `max_per_device_batch_size`. Returns: The outputs of extra_ops evaluated over the batch. """ feed_dict = { self._batch_index: batch_index, self._per_device_batch_size: self._loaded_per_device_batch_size, self._max_seq_len: self._loaded_max_seq_len, } for tower in self._towers: feed_dict.update(tower.loss_graph.extra_compute_grad_feed_dict()) fetches = {"train": self._train_op} for tower in self._towers: fetches.update(tower.loss_graph.extra_compute_grad_fetches()) return sess.run(fetches, feed_dict=feed_dict)
[ "def", "optimize", "(", "self", ",", "sess", ",", "batch_index", ")", ":", "feed_dict", "=", "{", "self", ".", "_batch_index", ":", "batch_index", ",", "self", ".", "_per_device_batch_size", ":", "self", ".", "_loaded_per_device_batch_size", ",", "self", ".", "_max_seq_len", ":", "self", ".", "_loaded_max_seq_len", ",", "}", "for", "tower", "in", "self", ".", "_towers", ":", "feed_dict", ".", "update", "(", "tower", ".", "loss_graph", ".", "extra_compute_grad_feed_dict", "(", ")", ")", "fetches", "=", "{", "\"train\"", ":", "self", ".", "_train_op", "}", "for", "tower", "in", "self", ".", "_towers", ":", "fetches", ".", "update", "(", "tower", ".", "loss_graph", ".", "extra_compute_grad_fetches", "(", ")", ")", "return", "sess", ".", "run", "(", "fetches", ",", "feed_dict", "=", "feed_dict", ")" ]
Run a single step of SGD. Runs a SGD step over a slice of the preloaded batch with size given by self._loaded_per_device_batch_size and offset given by the batch_index argument. Updates shared model weights based on the averaged per-device gradients. Args: sess: TensorFlow session. batch_index: Offset into the preloaded data. This value must be between `0` and `tuples_per_device`. The amount of data to process is at most `max_per_device_batch_size`. Returns: The outputs of extra_ops evaluated over the batch.
[ "Run", "a", "single", "step", "of", "SGD", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/rllib/optimizers/multi_gpu_impl.py#L227-L258
train
Run a single step of SGD.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0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eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\060' + chr(111) + chr(0b110010) + '\060' + chr(0b100001 + 0o22), ord("\x08")), ehT0Px3KOsy9(chr(2045 - 1997) + chr(0b1101111) + chr(67 - 18) + chr(214 - 160), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b11101 + 0o26) + '\x34' + '\x34', 24110 - 24102), ehT0Px3KOsy9('\x30' + chr(0b1010011 + 0o34) + chr(51) + '\x32', 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b100000 + 0o21) + '\x31' + chr(197 - 147), 4695 - 4687), ehT0Px3KOsy9(chr(0b101001 + 0o7) + '\x6f' + '\x33' + chr(49) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\063' + chr(0b110 + 0o55) + '\x37', 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b101001 + 0o10) + '\064' + '\066', 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\062' + chr(835 - 785) + chr(2098 - 2047), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b11110 + 0o31) + '\x32', 0b1000), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(4470 - 4359) + chr(55) + chr(2221 - 2172), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(0b110001) + '\x32' + chr(0b100111 + 0o16), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b100110 + 0o13) + chr(0b11101 + 0o32), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(0b110011) + chr(0b100000 + 0o25) + '\067', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x32' + chr(48) + '\063', 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b110100 + 0o73) + chr(1846 - 1795) + chr(0b110000) + chr(2044 - 1993), 30579 - 30571), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110010) + chr(0b11000 + 0o37) + chr(0b110110), 52206 - 52198), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x31' + chr(452 - 403) + chr(1932 - 1884), ord("\x08")), ehT0Px3KOsy9(chr(2084 - 2036) + chr(0b1101111) + '\062' + chr(1082 - 1029) + chr(0b1100 + 0o45), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\063' + '\064' + chr(1842 - 1794), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b101010 + 0o13) + chr(0b11101 + 0o24), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\063' + chr(0b110011) + chr(0b10111 + 0o35), ord("\x08")), ehT0Px3KOsy9(chr(0b11111 + 0o21) + '\x6f' + chr(1944 - 1894) + chr(0b101100 + 0o13) + chr(0b11000 + 0o37), 0o10), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(11813 - 11702) + chr(0b110011) + chr(0b110010) + chr(0b0 + 0o61), 0b1000), ehT0Px3KOsy9(chr(0b100100 + 0o14) + '\x6f' + chr(53) + chr(53), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1001111 + 0o40) + chr(0b10011 + 0o37) + chr(0b101110 + 0o10) + chr(0b110001 + 0o1), 61355 - 61347), ehT0Px3KOsy9(chr(2185 - 2137) + '\157' + chr(0b100101 + 0o16) + chr(374 - 326) + chr(1963 - 1913), 45842 - 45834), ehT0Px3KOsy9('\060' + chr(3393 - 3282) + chr(0b11011 + 0o27) + chr(0b101101 + 0o4), 49142 - 49134), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(0b111 + 0o150) + chr(419 - 368) + chr(0b101010 + 0o6) + chr(1068 - 1020), 36159 - 36151), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\061' + chr(975 - 920) + chr(1029 - 981), 0o10), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(0b101101 + 0o102) + chr(0b111 + 0o54) + chr(1288 - 1239) + chr(0b1101 + 0o46), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(49) + chr(0b1101 + 0o47), 0b1000), ehT0Px3KOsy9(chr(428 - 380) + '\x6f' + chr(51) + '\067' + '\x31', 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(55), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1100111 + 0o10) + '\062' + chr(51) + chr(0b110 + 0o61), 14734 - 14726), ehT0Px3KOsy9('\x30' + chr(0b100111 + 0o110) + chr(0b100110 + 0o17), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110001) + chr(0b101000 + 0o16), 8), ehT0Px3KOsy9('\060' + '\157' + chr(0b1101 + 0o45) + chr(49) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(8008 - 7897) + '\062' + '\064' + '\065', 0o10), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(7583 - 7472) + '\064' + '\065', 59600 - 59592)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(6825 - 6714) + chr(53) + '\x30', 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xad'), chr(0b1001110 + 0o26) + chr(101) + '\x63' + chr(0b100100 + 0o113) + chr(100) + '\x65')('\x75' + chr(0b1110100) + chr(0b1100110) + chr(388 - 343) + chr(0b101000 + 0o20)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def M4lwI8bLCQGq(oVre8I6UXc3b, HVWCHjSQ2I35, Q3TVZeZzkrZ0): knvK4sqTZWNg = {oVre8I6UXc3b._batch_index: Q3TVZeZzkrZ0, oVre8I6UXc3b._per_device_batch_size: oVre8I6UXc3b.uLBhCbczxtoV, oVre8I6UXc3b._max_seq_len: oVre8I6UXc3b.WbYQCX56l4cG} for _fAGCiIOAWNL in xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xdcz\x8bm/\xb8\xac'), chr(0b1100100) + chr(101) + chr(99) + chr(0b11100 + 0o123) + chr(100) + '\145')(chr(117) + chr(0b1011100 + 0o30) + chr(102) + chr(0b101101) + '\x38')): xafqLlk3kkUe(knvK4sqTZWNg, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd9z\xa5_#\x84\x95\x08\xea\x0e\\e'), chr(100) + chr(5258 - 5157) + chr(6053 - 5954) + chr(0b11 + 0o154) + '\144' + chr(101))('\x75' + chr(0b0 + 0o164) + '\146' + '\055' + '\070'))(xafqLlk3kkUe(_fAGCiIOAWNL.loss_graph, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe6v\x90h+\x95\xbc\t\xfeJL!j\xb0\xe4\xb1\xdf,\xf6\x86L\xb9\xdb\x8eI\xdb\xa1e'), chr(0b1100100) + chr(0b1100101) + '\143' + '\x6f' + chr(0b1100100) + '\145')('\x75' + '\x74' + chr(0b1100110) + chr(0b101101) + '\070'))()) alIrzqJfx_nw = {xafqLlk3kkUe(SXOLrMavuUCe(b'\xf7|\x85s$'), '\x64' + chr(101) + '\x63' + chr(111) + '\x64' + '\x65')('\x75' + chr(0b1010010 + 0o42) + chr(0b1011000 + 0o16) + chr(0b100100 + 0o11) + chr(0b100100 + 0o24)): oVre8I6UXc3b._train_op} for _fAGCiIOAWNL in xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xdcz\x8bm/\xb8\xac'), '\144' + chr(492 - 391) + chr(0b1011010 + 0o11) + chr(111) + chr(0b1000100 + 0o40) + chr(101))(chr(0b100111 + 0o116) + '\x74' + chr(0b1100011 + 0o3) + '\x2d' + chr(1833 - 1777))): xafqLlk3kkUe(alIrzqJfx_nw, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd9z\xa5_#\x84\x95\x08\xea\x0e\\e'), chr(0b10101 + 0o117) + chr(101) + chr(0b1100011) + chr(111) + chr(100) + chr(0b10 + 0o143))(chr(0b1110101) + chr(0b111 + 0o155) + chr(2108 - 2006) + chr(45) + chr(0b111000)))(xafqLlk3kkUe(_fAGCiIOAWNL.loss_graph, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe6v\x90h+\x95\xbc\t\xfeJL!j\xb0\xe4\xb1\xdf,\xf6\x86L\xa8\xdc\xb9H\xc1'), chr(0b1100100) + '\145' + chr(99) + '\x6f' + chr(7402 - 7302) + chr(0b1011 + 0o132))(chr(117) + '\x74' + chr(102) + chr(0b1001 + 0o44) + chr(1135 - 1079)))()) return xafqLlk3kkUe(HVWCHjSQ2I35, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0i\x90/\x08\x9f\xe9W\xf1Mcg'), chr(100) + chr(101) + chr(99) + chr(0b1101111) + chr(0b1010 + 0o132) + '\145')(chr(117) + '\x74' + chr(0b1100110) + chr(0b101101) + chr(1606 - 1550)))(alIrzqJfx_nw, feed_dict=knvK4sqTZWNg)
ray-project/ray
python/ray/tune/automl/genetic_searcher.py
GeneticSearch._next_generation
def _next_generation(self, sorted_trials): """Generate genes (encodings) for the next generation. Use the top K (_keep_top_ratio) trials of the last generation as candidates to generate the next generation. The action could be selection, crossover and mutation according corresponding ratio (_selection_bound, _crossover_bound). Args: sorted_trials: List of finished trials with top performance ones first. Returns: A list of new genes (encodings) """ candidate = [] next_generation = [] num_population = self._next_population_size(len(sorted_trials)) top_num = int(max(num_population * self._keep_top_ratio, 2)) for i in range(top_num): candidate.append(sorted_trials[i].extra_arg) next_generation.append(sorted_trials[i].extra_arg) for i in range(top_num, num_population): flip_coin = np.random.uniform() if flip_coin < self._selection_bound: next_generation.append(GeneticSearch._selection(candidate)) else: if flip_coin < self._selection_bound + self._crossover_bound: next_generation.append(GeneticSearch._crossover(candidate)) else: next_generation.append(GeneticSearch._mutation(candidate)) return next_generation
python
def _next_generation(self, sorted_trials): """Generate genes (encodings) for the next generation. Use the top K (_keep_top_ratio) trials of the last generation as candidates to generate the next generation. The action could be selection, crossover and mutation according corresponding ratio (_selection_bound, _crossover_bound). Args: sorted_trials: List of finished trials with top performance ones first. Returns: A list of new genes (encodings) """ candidate = [] next_generation = [] num_population = self._next_population_size(len(sorted_trials)) top_num = int(max(num_population * self._keep_top_ratio, 2)) for i in range(top_num): candidate.append(sorted_trials[i].extra_arg) next_generation.append(sorted_trials[i].extra_arg) for i in range(top_num, num_population): flip_coin = np.random.uniform() if flip_coin < self._selection_bound: next_generation.append(GeneticSearch._selection(candidate)) else: if flip_coin < self._selection_bound + self._crossover_bound: next_generation.append(GeneticSearch._crossover(candidate)) else: next_generation.append(GeneticSearch._mutation(candidate)) return next_generation
[ "def", "_next_generation", "(", "self", ",", "sorted_trials", ")", ":", "candidate", "=", "[", "]", "next_generation", "=", "[", "]", "num_population", "=", "self", ".", "_next_population_size", "(", "len", "(", "sorted_trials", ")", ")", "top_num", "=", "int", "(", "max", "(", "num_population", "*", "self", ".", "_keep_top_ratio", ",", "2", ")", ")", "for", "i", "in", "range", "(", "top_num", ")", ":", "candidate", ".", "append", "(", "sorted_trials", "[", "i", "]", ".", "extra_arg", ")", "next_generation", ".", "append", "(", "sorted_trials", "[", "i", "]", ".", "extra_arg", ")", "for", "i", "in", "range", "(", "top_num", ",", "num_population", ")", ":", "flip_coin", "=", "np", ".", "random", ".", "uniform", "(", ")", "if", "flip_coin", "<", "self", ".", "_selection_bound", ":", "next_generation", ".", "append", "(", "GeneticSearch", ".", "_selection", "(", "candidate", ")", ")", "else", ":", "if", "flip_coin", "<", "self", ".", "_selection_bound", "+", "self", ".", "_crossover_bound", ":", "next_generation", ".", "append", "(", "GeneticSearch", ".", "_crossover", "(", "candidate", ")", ")", "else", ":", "next_generation", ".", "append", "(", "GeneticSearch", ".", "_mutation", "(", "candidate", ")", ")", "return", "next_generation" ]
Generate genes (encodings) for the next generation. Use the top K (_keep_top_ratio) trials of the last generation as candidates to generate the next generation. The action could be selection, crossover and mutation according corresponding ratio (_selection_bound, _crossover_bound). Args: sorted_trials: List of finished trials with top performance ones first. Returns: A list of new genes (encodings)
[ "Generate", "genes", "(", "encodings", ")", "for", "the", "next", "generation", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/tune/automl/genetic_searcher.py#L88-L122
train
Generate genes for the next generation.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQ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fSmY,reqGiMiVQ77y,bsS9P6_LpdIe,sbGAZlkZOtyh,Cf_Qef15s3_F,eX02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(111) + '\x33' + chr(51) + chr(0b1 + 0o60), 36618 - 36610), ehT0Px3KOsy9(chr(486 - 438) + chr(111) + chr(435 - 384) + chr(0b1100 + 0o45) + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(1701 - 1653) + chr(9473 - 9362) + chr(0b111 + 0o56) + '\x30', 11839 - 11831), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(342 - 293) + '\067' + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(118 - 67) + chr(0b10111 + 0o36), 24419 - 24411), ehT0Px3KOsy9(chr(0b1 + 0o57) + '\157' + chr(0b110001) + '\064' + '\x37', 0o10), ehT0Px3KOsy9(chr(1810 - 1762) + chr(0b1011110 + 0o21) + '\061' + chr(0b110100) + chr(2102 - 2051), 14067 - 14059), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b1101 + 0o44) + chr(0b110101), 36317 - 36309), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x31' + chr(0b10000 + 0o43) + '\063', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b111111 + 0o60) + '\061' + '\x30' + chr(0b110101), 59657 - 59649), ehT0Px3KOsy9(chr(0b110000) + chr(0b10001 + 0o136) + chr(0b110011 + 0o0) + '\x33' + chr(0b110100), 20819 - 20811), ehT0Px3KOsy9(chr(1982 - 1934) + chr(0b1001000 + 0o47) + chr(0b110 + 0o54) + chr(1421 - 1372) + chr(0b11110 + 0o23), 0o10), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(111) + chr(0b0 + 0o61) + chr(1075 - 1024) + '\x31', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(634 - 585) + '\x35' + chr(0b100011 + 0o15), ord("\x08")), ehT0Px3KOsy9(chr(0b10001 + 0o37) + '\157' + chr(0b110010) + '\x30' + '\066', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110001) + chr(50) + chr(54), 0b1000), ehT0Px3KOsy9(chr(0b11101 + 0o23) + '\x6f' + '\061' + chr(0b10101 + 0o37) + chr(1003 - 955), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(1891 - 1840) + chr(0b110100) + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(111) + '\x32' + chr(374 - 326) + '\x32', 22472 - 22464), ehT0Px3KOsy9('\x30' + chr(0b110 + 0o151) + '\061' + '\x35' + '\x34', 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(53) + chr(0b101 + 0o61), 0b1000), ehT0Px3KOsy9(chr(58 - 10) + chr(0b111001 + 0o66) + chr(49) + chr(0b10111 + 0o40) + '\x31', 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\x31' + chr(2387 - 2333), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b101101 + 0o4) + chr(1500 - 1451), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(1142 - 1093) + '\x37' + chr(52), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b100001 + 0o21) + chr(0b110110) + chr(0b101100 + 0o6), 0o10), ehT0Px3KOsy9('\060' + chr(2515 - 2404) + chr(0b10000 + 0o42) + chr(52) + chr(0b100011 + 0o20), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b11010 + 0o125) + chr(0b101010 + 0o7) + chr(501 - 452), 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\063' + chr(0b110100) + chr(337 - 289), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(1765 - 1714) + chr(51), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110001) + chr(2205 - 2151) + '\x32', 19087 - 19079), ehT0Px3KOsy9('\x30' + chr(7107 - 6996) + chr(0b110110) + chr(0b110100), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101010 + 0o5) + chr(0b101 + 0o55) + '\066' + chr(0b110010), 8), ehT0Px3KOsy9(chr(48) + chr(111) + chr(51) + chr(49) + chr(55), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x31' + chr(1947 - 1899) + chr(53), 8), ehT0Px3KOsy9(chr(48) + chr(7814 - 7703) + chr(0b100100 + 0o15) + chr(48) + '\x31', 46121 - 46113), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101000 + 0o7) + '\062' + chr(0b101100 + 0o7) + '\065', 7362 - 7354), ehT0Px3KOsy9(chr(464 - 416) + chr(6331 - 6220) + chr(2404 - 2354) + chr(56 - 3) + chr(49), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\064' + chr(171 - 123), 0b1000), ehT0Px3KOsy9(chr(1924 - 1876) + chr(111) + chr(0b110010) + chr(0b110101) + '\x33', 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(545 - 497) + chr(111) + chr(53) + '\x30', 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xf7'), chr(100) + chr(101) + '\x63' + '\x6f' + chr(0b1100100) + '\x65')(chr(0b10010 + 0o143) + chr(0b110111 + 0o75) + chr(0b1100110) + '\055' + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def Gxr_1fmpnTI9(oVre8I6UXc3b, O6Dpi5wCMzJi): X3DOc7TuFLS2 = [] K1bsVRIgy1hs = [] LgTMw54Dx2Z4 = oVre8I6UXc3b._next_population_size(c2A0yzQpDQB3(O6Dpi5wCMzJi)) nJY3Z8Ok_TiK = ehT0Px3KOsy9(tsdjvlgh9gDP(LgTMw54Dx2Z4 * oVre8I6UXc3b._keep_top_ratio, ehT0Px3KOsy9('\060' + chr(0b1100 + 0o143) + chr(50), 4425 - 4417))) for WVxHKyX45z_L in vQr8gNKaIaWE(nJY3Z8Ok_TiK): xafqLlk3kkUe(X3DOc7TuFLS2, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb8\xbcX\x1ds\x03'), chr(0b100 + 0o140) + chr(101) + '\x63' + chr(7983 - 7872) + chr(0b101011 + 0o71) + '\145')('\165' + '\164' + '\146' + chr(0b101101) + chr(0b111000)))(xafqLlk3kkUe(O6Dpi5wCMzJi[WVxHKyX45z_L], xafqLlk3kkUe(SXOLrMavuUCe(b'\xbc\xb4\\\n|8\x02\x7f<'), chr(0b1100100 + 0o0) + chr(5070 - 4969) + chr(99) + chr(111) + chr(0b1100100) + chr(0b1000001 + 0o44))('\165' + chr(8600 - 8484) + '\x66' + chr(1447 - 1402) + chr(0b110010 + 0o6)))) xafqLlk3kkUe(K1bsVRIgy1hs, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb8\xbcX\x1ds\x03'), '\x64' + chr(101) + chr(0b11100 + 0o107) + '\157' + chr(0b111111 + 0o45) + '\x65')('\x75' + chr(116) + chr(102) + chr(0b101011 + 0o2) + chr(56)))(xafqLlk3kkUe(O6Dpi5wCMzJi[WVxHKyX45z_L], xafqLlk3kkUe(SXOLrMavuUCe(b'\xbc\xb4\\\n|8\x02\x7f<'), chr(0b1001010 + 0o32) + '\x65' + chr(3198 - 3099) + '\157' + chr(0b10110 + 0o116) + chr(5967 - 5866))(chr(0b1110101) + chr(116) + chr(0b1101 + 0o131) + chr(0b11100 + 0o21) + chr(559 - 503)))) for WVxHKyX45z_L in vQr8gNKaIaWE(nJY3Z8Ok_TiK, LgTMw54Dx2Z4): QSLnFq6_dYfY = WqUC3KWvYVup.random.uniform() if QSLnFq6_dYfY < xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x86\xbfM\x14x\x04\x17d4+\x83\xeb6\x1d\xe82'), chr(0b1100100 + 0o0) + chr(0b110 + 0o137) + chr(4156 - 4057) + chr(111) + '\x64' + chr(0b101111 + 0o66))(chr(0b1100010 + 0o23) + chr(116) + chr(0b111001 + 0o55) + '\055' + '\x38')): xafqLlk3kkUe(K1bsVRIgy1hs, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb8\xbcX\x1ds\x03'), chr(0b10100 + 0o120) + '\x65' + chr(99) + chr(111) + chr(0b100001 + 0o103) + chr(0b1100101))('\x75' + '\x74' + '\146' + chr(0b101 + 0o50) + chr(0b110001 + 0o7)))(xafqLlk3kkUe(EXF1CkZkCpZ1, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb7\xa7l\x0f,4\x11>. \xec\xbc'), chr(100) + chr(1709 - 1608) + chr(444 - 345) + chr(0b1101111) + chr(0b1100100) + chr(159 - 58))(chr(12453 - 12336) + '\164' + chr(0b1100110) + chr(45) + chr(2493 - 2437)))(X3DOc7TuFLS2)) elif QSLnFq6_dYfY < xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x86\xbfM\x14x\x04\x17d4+\x83\xeb6\x1d\xe82'), '\144' + '\145' + chr(0b101011 + 0o70) + chr(0b1100010 + 0o15) + '\144' + chr(6896 - 6795))(chr(0b1110101) + chr(10525 - 10409) + '\146' + chr(0b1001 + 0o44) + '\x38')) + xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x86\xafZ\x17n\x14\x0c{>7\x83\xeb6\x1d\xe82'), chr(100) + chr(0b1010111 + 0o16) + '\x63' + '\157' + chr(100) + '\145')('\x75' + chr(116) + chr(0b1100110) + chr(0b1000 + 0o45) + chr(0b111000))): xafqLlk3kkUe(K1bsVRIgy1hs, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb8\xbcX\x1ds\x03'), '\x64' + chr(0b1101 + 0o130) + chr(2755 - 2656) + chr(3822 - 3711) + chr(1671 - 1571) + '\145')(chr(0b1010 + 0o153) + chr(0b10011 + 0o141) + chr(0b101000 + 0o76) + '\x2d' + '\070'))(xafqLlk3kkUe(EXF1CkZkCpZ1, xafqLlk3kkUe(SXOLrMavuUCe(b'\x86\xafZ\x17n\x14\x0c{>7'), chr(0b1001100 + 0o30) + chr(101) + chr(0b100101 + 0o76) + chr(111) + chr(0b100000 + 0o104) + chr(1824 - 1723))('\x75' + chr(116) + chr(5859 - 5757) + '\055' + chr(247 - 191)))(X3DOc7TuFLS2)) else: xafqLlk3kkUe(K1bsVRIgy1hs, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb8\xbcX\x1ds\x03'), '\x64' + '\x65' + '\143' + chr(2004 - 1893) + '\144' + chr(101))(chr(0b1011010 + 0o33) + '\164' + '\x66' + chr(121 - 76) + '\070'))(xafqLlk3kkUe(EXF1CkZkCpZ1, xafqLlk3kkUe(SXOLrMavuUCe(b'\x86\xa1]\x0c|\x13\nb5'), chr(224 - 124) + chr(0b1100101) + '\x63' + chr(3678 - 3567) + chr(0b10100 + 0o120) + chr(101))(chr(0b1110101) + '\164' + chr(0b10001 + 0o125) + chr(1599 - 1554) + '\070'))(X3DOc7TuFLS2)) return K1bsVRIgy1hs
ray-project/ray
python/ray/tune/automl/genetic_searcher.py
GeneticSearch._selection
def _selection(candidate): """Perform selection action to candidates. For example, new gene = sample_1 + the 5th bit of sample2. Args: candidate: List of candidate genes (encodings). Examples: >>> # Genes that represent 3 parameters >>> gene1 = np.array([[0, 0, 1], [0, 1], [1, 0]]) >>> gene2 = np.array([[0, 1, 0], [1, 0], [0, 1]]) >>> new_gene = _selection([gene1, gene2]) >>> # new_gene could be gene1 overwritten with the >>> # 2nd parameter of gene2 >>> # in which case: >>> # new_gene[0] = gene1[0] >>> # new_gene[1] = gene2[1] >>> # new_gene[2] = gene1[0] Returns: New gene (encoding) """ sample_index1 = np.random.choice(len(candidate)) sample_index2 = np.random.choice(len(candidate)) sample_1 = candidate[sample_index1] sample_2 = candidate[sample_index2] select_index = np.random.choice(len(sample_1)) logger.info( LOGGING_PREFIX + "Perform selection from %sth to %sth at index=%s", sample_index2, sample_index1, select_index) next_gen = [] for i in range(len(sample_1)): if i is select_index: next_gen.append(sample_2[i]) else: next_gen.append(sample_1[i]) return next_gen
python
def _selection(candidate): """Perform selection action to candidates. For example, new gene = sample_1 + the 5th bit of sample2. Args: candidate: List of candidate genes (encodings). Examples: >>> # Genes that represent 3 parameters >>> gene1 = np.array([[0, 0, 1], [0, 1], [1, 0]]) >>> gene2 = np.array([[0, 1, 0], [1, 0], [0, 1]]) >>> new_gene = _selection([gene1, gene2]) >>> # new_gene could be gene1 overwritten with the >>> # 2nd parameter of gene2 >>> # in which case: >>> # new_gene[0] = gene1[0] >>> # new_gene[1] = gene2[1] >>> # new_gene[2] = gene1[0] Returns: New gene (encoding) """ sample_index1 = np.random.choice(len(candidate)) sample_index2 = np.random.choice(len(candidate)) sample_1 = candidate[sample_index1] sample_2 = candidate[sample_index2] select_index = np.random.choice(len(sample_1)) logger.info( LOGGING_PREFIX + "Perform selection from %sth to %sth at index=%s", sample_index2, sample_index1, select_index) next_gen = [] for i in range(len(sample_1)): if i is select_index: next_gen.append(sample_2[i]) else: next_gen.append(sample_1[i]) return next_gen
[ "def", "_selection", "(", "candidate", ")", ":", "sample_index1", "=", "np", ".", "random", ".", "choice", "(", "len", "(", "candidate", ")", ")", "sample_index2", "=", "np", ".", "random", ".", "choice", "(", "len", "(", "candidate", ")", ")", "sample_1", "=", "candidate", "[", "sample_index1", "]", "sample_2", "=", "candidate", "[", "sample_index2", "]", "select_index", "=", "np", ".", "random", ".", "choice", "(", "len", "(", "sample_1", ")", ")", "logger", ".", "info", "(", "LOGGING_PREFIX", "+", "\"Perform selection from %sth to %sth at index=%s\"", ",", "sample_index2", ",", "sample_index1", ",", "select_index", ")", "next_gen", "=", "[", "]", "for", "i", "in", "range", "(", "len", "(", "sample_1", ")", ")", ":", "if", "i", "is", "select_index", ":", "next_gen", ".", "append", "(", "sample_2", "[", "i", "]", ")", "else", ":", "next_gen", ".", "append", "(", "sample_1", "[", "i", "]", ")", "return", "next_gen" ]
Perform selection action to candidates. For example, new gene = sample_1 + the 5th bit of sample2. Args: candidate: List of candidate genes (encodings). Examples: >>> # Genes that represent 3 parameters >>> gene1 = np.array([[0, 0, 1], [0, 1], [1, 0]]) >>> gene2 = np.array([[0, 1, 0], [1, 0], [0, 1]]) >>> new_gene = _selection([gene1, gene2]) >>> # new_gene could be gene1 overwritten with the >>> # 2nd parameter of gene2 >>> # in which case: >>> # new_gene[0] = gene1[0] >>> # new_gene[1] = gene2[1] >>> # new_gene[2] = gene1[0] Returns: New gene (encoding)
[ "Perform", "selection", "action", "to", "candidates", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/tune/automl/genetic_searcher.py#L140-L178
train
Perform selection action to candidates.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPvpP4xdo3,cW7yQuyEnJ6E,KOHQGQ8qLDWm,NE1Yam2HHroQ,ygAzbDzrvRMh,SBRjvOU1ufVC,hOkXjmluKZfJ,q1QCh3W88s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kxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b1011 + 0o45) + chr(0b111111 + 0o60) + chr(49) + chr(0b11 + 0o55) + '\064', 0o10), ehT0Px3KOsy9(chr(1674 - 1626) + '\x6f' + chr(0b110011) + chr(0b10000 + 0o45) + chr(616 - 564), 0b1000), ehT0Px3KOsy9(chr(0b100111 + 0o11) + chr(255 - 144) + chr(49) + chr(1105 - 1052) + chr(49), 53614 - 53606), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b1 + 0o61) + chr(0b110000) + '\x36', 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(50) + chr(0b110001) + '\060', 0o10), ehT0Px3KOsy9(chr(0b10 + 0o56) + chr(0b1101111) + '\062' + '\x35' + '\067', 40320 - 40312), ehT0Px3KOsy9('\060' + chr(111) + chr(315 - 266) + chr(2656 - 2602) + chr(1046 - 994), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(4439 - 4328) + chr(51) + chr(52) + chr(1419 - 1368), 0b1000), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(3272 - 3161) + chr(49) + chr(0b101001 + 0o16) + chr(894 - 845), 10321 - 10313), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110001) + chr(0b110100) + chr(1300 - 1250), 0o10), ehT0Px3KOsy9(chr(48) + chr(2008 - 1897) + chr(0b1101 + 0o45) + chr(0b110100) + '\063', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b100101 + 0o112) + '\062' + chr(0b1101 + 0o47) + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b1001 + 0o51) + chr(190 - 137) + chr(54), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b100 + 0o56) + chr(52) + '\065', 31444 - 31436), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\062' + chr(53) + chr(0b10110 + 0o40), 8), ehT0Px3KOsy9(chr(1497 - 1449) + chr(111) + chr(0b110110) + chr(1533 - 1481), 0b1000), ehT0Px3KOsy9(chr(1865 - 1817) + chr(0b1101001 + 0o6) + chr(0b100000 + 0o23) + chr(0b100101 + 0o15), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110010 + 0o1) + chr(1805 - 1750) + chr(225 - 171), 0o10), ehT0Px3KOsy9(chr(0b1000 + 0o50) + '\157' + '\x31' + '\x34' + chr(50), 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b11101 + 0o26) + '\061', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b10100 + 0o36) + chr(0b110110) + '\064', 55399 - 55391), ehT0Px3KOsy9('\060' + chr(0b1101 + 0o142) + chr(1434 - 1383) + chr(0b101110 + 0o7) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(50) + chr(558 - 509) + chr(0b111 + 0o60), 0b1000), ehT0Px3KOsy9(chr(95 - 47) + '\x6f' + chr(0b110011) + '\x37', 7354 - 7346), ehT0Px3KOsy9(chr(1389 - 1341) + chr(111) + chr(2120 - 2071) + chr(54) + chr(0b110001), 47020 - 47012), ehT0Px3KOsy9(chr(2270 - 2222) + chr(0b1101111) + chr(51) + chr(0b10000 + 0o47) + chr(53), 0o10), ehT0Px3KOsy9('\060' + '\157' + '\x33' + chr(0b110101 + 0o1), 0o10), ehT0Px3KOsy9(chr(1352 - 1304) + '\157' + '\062' + '\x31' + chr(0b100111 + 0o11), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(204 - 154) + chr(49) + chr(0b100001 + 0o24), 0b1000), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(111) + '\x31' + chr(0b110010) + chr(55), 13570 - 13562), ehT0Px3KOsy9('\060' + chr(0b1111 + 0o140) + chr(50) + chr(0b101001 + 0o15) + '\x31', ord("\x08")), ehT0Px3KOsy9('\060' + chr(10125 - 10014) + chr(0b110001) + '\064' + chr(1484 - 1429), 0b1000), ehT0Px3KOsy9(chr(133 - 85) + chr(0b1101111) + chr(51) + chr(48) + '\066', 24197 - 24189), ehT0Px3KOsy9(chr(48) + '\x6f' + '\062' + chr(544 - 495) + chr(48), 8), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b10100 + 0o35) + chr(1342 - 1293) + chr(53), 0b1000), ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(0b110101 + 0o72) + '\063' + chr(145 - 96) + chr(2235 - 2180), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(2324 - 2271) + '\x36', 33359 - 33351), ehT0Px3KOsy9('\060' + '\x6f' + chr(179 - 129) + chr(0b110111) + chr(53), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110010) + chr(0b110100) + chr(0b110101), 8), ehT0Px3KOsy9(chr(1453 - 1405) + '\157' + '\x31' + chr(0b101011 + 0o11) + chr(0b110111), 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(111) + chr(2784 - 2731) + chr(48), 46047 - 46039)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'j'), chr(0b1100100) + '\x65' + chr(99) + chr(111) + '\x64' + chr(1565 - 1464))(chr(0b100010 + 0o123) + chr(116) + chr(102) + chr(0b10001 + 0o34) + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def nkDw1Sr3ue05(X3DOc7TuFLS2): MsiHp1dH4nJE = WqUC3KWvYVup.random.choice(c2A0yzQpDQB3(X3DOc7TuFLS2)) pQBi_XqX9Ol8 = WqUC3KWvYVup.random.choice(c2A0yzQpDQB3(X3DOc7TuFLS2)) z_ruu4_216Xr = X3DOc7TuFLS2[MsiHp1dH4nJE] KOc7WJrA7HxI = X3DOc7TuFLS2[pQBi_XqX9Ol8] H7qxBiWnTsr6 = WqUC3KWvYVup.random.choice(c2A0yzQpDQB3(z_ruu4_216Xr)) xafqLlk3kkUe(hdK8qOUhR6Or, xafqLlk3kkUe(SXOLrMavuUCe(b'\x17\xdb!\xfe\xfd\xcc\x13\xd4\x13\x0e\xf9\xcc'), chr(100) + chr(0b1100101) + '\x63' + chr(0b1000011 + 0o54) + '\144' + chr(101))(chr(0b1001101 + 0o50) + chr(0b100 + 0o160) + chr(6002 - 5900) + '\x2d' + '\x38'))(jPsnCYtUD4E0 + xafqLlk3kkUe(SXOLrMavuUCe(b'\x14\x89\x1b\xe0\xe7\xdd\x19\xc3\n\x07\xcf\xc2\xcd\xd1\xc7[t\xde\x04k\xdb\x86\xaf:\x02\x89v\xa8\xf98\x91B\xb5\xfc%\xefO\xc9\x85\x0e*\x88\x0c\xfe\xb5\x8a\x07'), chr(6350 - 6250) + '\x65' + chr(99) + chr(111) + chr(0b1011111 + 0o5) + chr(0b1100101))(chr(117) + chr(0b1110100) + chr(5494 - 5392) + chr(0b101101) + '\x38'), pQBi_XqX9Ol8, MsiHp1dH4nJE, H7qxBiWnTsr6) QyRn_eFoTxp1 = [] for WVxHKyX45z_L in vQr8gNKaIaWE(c2A0yzQpDQB3(z_ruu4_216Xr)): if WVxHKyX45z_L is H7qxBiWnTsr6: xafqLlk3kkUe(QyRn_eFoTxp1, xafqLlk3kkUe(SXOLrMavuUCe(b'%\x9c\x19\xe3\xe6\xcb'), chr(9950 - 9850) + chr(101) + '\x63' + chr(0b1101111) + '\x64' + '\x65')(chr(117) + '\164' + chr(102) + '\055' + chr(0b111000)))(KOc7WJrA7HxI[WVxHKyX45z_L]) else: xafqLlk3kkUe(QyRn_eFoTxp1, xafqLlk3kkUe(SXOLrMavuUCe(b'%\x9c\x19\xe3\xe6\xcb'), chr(0b1100100) + chr(0b101110 + 0o67) + '\143' + chr(0b11101 + 0o122) + chr(6439 - 6339) + '\x65')(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + chr(0b100001 + 0o14) + chr(429 - 373)))(z_ruu4_216Xr[WVxHKyX45z_L]) return QyRn_eFoTxp1
ray-project/ray
python/ray/tune/automl/genetic_searcher.py
GeneticSearch._crossover
def _crossover(candidate): """Perform crossover action to candidates. For example, new gene = 60% sample_1 + 40% sample_2. Args: candidate: List of candidate genes (encodings). Examples: >>> # Genes that represent 3 parameters >>> gene1 = np.array([[0, 0, 1], [0, 1], [1, 0]]) >>> gene2 = np.array([[0, 1, 0], [1, 0], [0, 1]]) >>> new_gene = _crossover([gene1, gene2]) >>> # new_gene could be the first [n=1] parameters of >>> # gene1 + the rest of gene2 >>> # in which case: >>> # new_gene[0] = gene1[0] >>> # new_gene[1] = gene2[1] >>> # new_gene[2] = gene1[1] Returns: New gene (encoding) """ sample_index1 = np.random.choice(len(candidate)) sample_index2 = np.random.choice(len(candidate)) sample_1 = candidate[sample_index1] sample_2 = candidate[sample_index2] cross_index = int(len(sample_1) * np.random.uniform(low=0.3, high=0.7)) logger.info( LOGGING_PREFIX + "Perform crossover between %sth and %sth at index=%s", sample_index1, sample_index2, cross_index) next_gen = [] for i in range(len(sample_1)): if i > cross_index: next_gen.append(sample_2[i]) else: next_gen.append(sample_1[i]) return next_gen
python
def _crossover(candidate): """Perform crossover action to candidates. For example, new gene = 60% sample_1 + 40% sample_2. Args: candidate: List of candidate genes (encodings). Examples: >>> # Genes that represent 3 parameters >>> gene1 = np.array([[0, 0, 1], [0, 1], [1, 0]]) >>> gene2 = np.array([[0, 1, 0], [1, 0], [0, 1]]) >>> new_gene = _crossover([gene1, gene2]) >>> # new_gene could be the first [n=1] parameters of >>> # gene1 + the rest of gene2 >>> # in which case: >>> # new_gene[0] = gene1[0] >>> # new_gene[1] = gene2[1] >>> # new_gene[2] = gene1[1] Returns: New gene (encoding) """ sample_index1 = np.random.choice(len(candidate)) sample_index2 = np.random.choice(len(candidate)) sample_1 = candidate[sample_index1] sample_2 = candidate[sample_index2] cross_index = int(len(sample_1) * np.random.uniform(low=0.3, high=0.7)) logger.info( LOGGING_PREFIX + "Perform crossover between %sth and %sth at index=%s", sample_index1, sample_index2, cross_index) next_gen = [] for i in range(len(sample_1)): if i > cross_index: next_gen.append(sample_2[i]) else: next_gen.append(sample_1[i]) return next_gen
[ "def", "_crossover", "(", "candidate", ")", ":", "sample_index1", "=", "np", ".", "random", ".", "choice", "(", "len", "(", "candidate", ")", ")", "sample_index2", "=", "np", ".", "random", ".", "choice", "(", "len", "(", "candidate", ")", ")", "sample_1", "=", "candidate", "[", "sample_index1", "]", "sample_2", "=", "candidate", "[", "sample_index2", "]", "cross_index", "=", "int", "(", "len", "(", "sample_1", ")", "*", "np", ".", "random", ".", "uniform", "(", "low", "=", "0.3", ",", "high", "=", "0.7", ")", ")", "logger", ".", "info", "(", "LOGGING_PREFIX", "+", "\"Perform crossover between %sth and %sth at index=%s\"", ",", "sample_index1", ",", "sample_index2", ",", "cross_index", ")", "next_gen", "=", "[", "]", "for", "i", "in", "range", "(", "len", "(", "sample_1", ")", ")", ":", "if", "i", ">", "cross_index", ":", "next_gen", ".", "append", "(", "sample_2", "[", "i", "]", ")", "else", ":", "next_gen", ".", "append", "(", "sample_1", "[", "i", "]", ")", "return", "next_gen" ]
Perform crossover action to candidates. For example, new gene = 60% sample_1 + 40% sample_2. Args: candidate: List of candidate genes (encodings). Examples: >>> # Genes that represent 3 parameters >>> gene1 = np.array([[0, 0, 1], [0, 1], [1, 0]]) >>> gene2 = np.array([[0, 1, 0], [1, 0], [0, 1]]) >>> new_gene = _crossover([gene1, gene2]) >>> # new_gene could be the first [n=1] parameters of >>> # gene1 + the rest of gene2 >>> # in which case: >>> # new_gene[0] = gene1[0] >>> # new_gene[1] = gene2[1] >>> # new_gene[2] = gene1[1] Returns: New gene (encoding)
[ "Perform", "crossover", "action", "to", "candidates", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386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gRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(91 - 43) + chr(0b11011 + 0o124) + chr(50) + chr(49) + chr(2692 - 2639), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\063' + chr(0b100000 + 0o27) + chr(0b11000 + 0o31), 0b1000), ehT0Px3KOsy9(chr(207 - 159) + chr(111) + chr(0b110011) + chr(0b101 + 0o56) + '\065', 0b1000), ehT0Px3KOsy9(chr(0b10111 + 0o31) + '\157' + '\x33' + chr(0b110001) + chr(1475 - 1421), 52247 - 52239), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110010) + chr(0b110010) + chr(911 - 857), 14119 - 14111), ehT0Px3KOsy9('\x30' + '\157' + chr(50) + chr(0b110111) + chr(51), 33995 - 33987), ehT0Px3KOsy9('\x30' + '\x6f' + '\062' + chr(49) + '\x31', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b11000 + 0o36), 55875 - 55867), ehT0Px3KOsy9(chr(48) + chr(1080 - 969) + chr(1587 - 1536) + chr(50) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(12102 - 11991) + chr(0b10000 + 0o42) + chr(49) + chr(0b1 + 0o62), 0b1000), ehT0Px3KOsy9('\060' + chr(4829 - 4718) + chr(0b1011 + 0o50) + chr(0b101101 + 0o7) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(7933 - 7822) + '\x33' + chr(0b110011) + chr(0b10011 + 0o40), 0o10), ehT0Px3KOsy9('\060' + '\157' + '\x31' + '\x35' + chr(1275 - 1223), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(53) + chr(0b110011), 38858 - 38850), ehT0Px3KOsy9(chr(0b110000) + chr(0b10101 + 0o132) + chr(1085 - 1035) + chr(0b10101 + 0o33) + chr(54), 35620 - 35612), ehT0Px3KOsy9(chr(0b1111 + 0o41) + '\157' + '\x32' + chr(0b110011) + chr(0b100001 + 0o20), 65176 - 65168), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b11010 + 0o33) + chr(0b110011), 8), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(0b1101111) + '\063' + '\064', 29422 - 29414), ehT0Px3KOsy9(chr(0b101110 + 0o2) + chr(0b10101 + 0o132) + chr(53) + '\065', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110010) + chr(0b101011 + 0o5), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(1669 - 1619) + chr(48) + '\x31', 25956 - 25948), ehT0Px3KOsy9(chr(303 - 255) + '\x6f' + chr(1058 - 1009) + '\063' + '\060', 65397 - 65389), ehT0Px3KOsy9(chr(48) + '\x6f' + '\061' + '\x31' + chr(54), 0o10), ehT0Px3KOsy9('\060' + chr(10244 - 10133) + chr(923 - 872) + chr(0b110001 + 0o3) + chr(157 - 107), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(2307 - 2256) + '\x33', 0b1000), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(111) + chr(0b110011) + '\060' + '\061', 26695 - 26687), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\063' + '\x31' + '\x30', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(52) + '\x30', 0b1000), ehT0Px3KOsy9(chr(0b1001 + 0o47) + '\x6f' + chr(1353 - 1303) + '\x35' + '\061', 0b1000), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(11402 - 11291) + '\061' + chr(0b110100) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(397 - 349) + '\x6f' + chr(0b110001) + chr(55), 3230 - 3222), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110001) + chr(0b1001 + 0o53), 53257 - 53249), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b100101 + 0o14) + '\x34' + chr(52), 27503 - 27495), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(0b1101111) + chr(0b100010 + 0o20) + '\061' + chr(0b110100), 46645 - 46637), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(0b11 + 0o154) + '\062' + chr(0b10000 + 0o40) + chr(1742 - 1693), 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b100111 + 0o14) + chr(0b110 + 0o56) + '\063', 63664 - 63656), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110011) + chr(2211 - 2160) + chr(0b100111 + 0o17), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110100) + '\x34', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(918 - 807) + '\x33' + chr(0b100001 + 0o23) + chr(1542 - 1487), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b11000 + 0o127) + chr(0b10111 + 0o32) + chr(55) + '\064', 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(907 - 859) + chr(111) + chr(0b110101) + chr(0b110000), 20845 - 20837)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xa3'), chr(5997 - 5897) + '\x65' + '\x63' + '\157' + '\144' + chr(0b1100101))('\x75' + '\x74' + chr(5034 - 4932) + chr(45) + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def _0N8YqrS2MX2(X3DOc7TuFLS2): MsiHp1dH4nJE = WqUC3KWvYVup.random.choice(c2A0yzQpDQB3(X3DOc7TuFLS2)) pQBi_XqX9Ol8 = WqUC3KWvYVup.random.choice(c2A0yzQpDQB3(X3DOc7TuFLS2)) z_ruu4_216Xr = X3DOc7TuFLS2[MsiHp1dH4nJE] KOc7WJrA7HxI = X3DOc7TuFLS2[pQBi_XqX9Ol8] OZWkuBcluUmd = ehT0Px3KOsy9(c2A0yzQpDQB3(z_ruu4_216Xr) * WqUC3KWvYVup.random.uniform(low=0.3, high=0.7)) xafqLlk3kkUe(hdK8qOUhR6Or, xafqLlk3kkUe(SXOLrMavuUCe(b'\xde\xce\x95\xb6\xe3\xd8\xee1\xbe\xe7\xba\xb0'), chr(5646 - 5546) + chr(101) + chr(211 - 112) + chr(111) + chr(0b100111 + 0o75) + '\145')(chr(0b1101011 + 0o12) + chr(0b1110100) + '\146' + chr(0b101101) + chr(0b1 + 0o67)))(jPsnCYtUD4E0 + xafqLlk3kkUe(SXOLrMavuUCe(b'\xdd\x9c\xaf\xa8\xf9\xc9\xe4&\xb7\xf9\x8f\xa8\x1fD\xf0\xfcY<Ou\xf5/+\x87u\xe1\xedS\xdd\x0f/m\n\xe8\xa1\xc6\xadP\x8f\\\xec\x8d\xfd\xa7\xf8\xdf\xec~\xe9\xae\x93'), chr(0b1100100) + chr(1969 - 1868) + '\x63' + '\157' + chr(0b1100100) + chr(101))('\x75' + '\164' + chr(2997 - 2895) + chr(45) + chr(0b111000)), MsiHp1dH4nJE, pQBi_XqX9Ol8, OZWkuBcluUmd) QyRn_eFoTxp1 = [] for WVxHKyX45z_L in vQr8gNKaIaWE(c2A0yzQpDQB3(z_ruu4_216Xr)): if WVxHKyX45z_L > OZWkuBcluUmd: xafqLlk3kkUe(QyRn_eFoTxp1, xafqLlk3kkUe(SXOLrMavuUCe(b'\xec\x89\xad\xab\xf8\xdf'), chr(8323 - 8223) + '\x65' + chr(0b1100011) + chr(0b1101111) + chr(0b111001 + 0o53) + '\x65')(chr(117) + chr(116) + chr(102) + chr(0b101101) + chr(56)))(KOc7WJrA7HxI[WVxHKyX45z_L]) else: xafqLlk3kkUe(QyRn_eFoTxp1, xafqLlk3kkUe(SXOLrMavuUCe(b'\xec\x89\xad\xab\xf8\xdf'), '\x64' + '\145' + chr(0b10 + 0o141) + '\x6f' + '\x64' + chr(0b1000100 + 0o41))('\x75' + '\164' + '\x66' + chr(0b101101) + chr(56)))(z_ruu4_216Xr[WVxHKyX45z_L]) return QyRn_eFoTxp1
ray-project/ray
python/ray/tune/automl/genetic_searcher.py
GeneticSearch._mutation
def _mutation(candidate, rate=0.1): """Perform mutation action to candidates. For example, randomly change 10% of original sample Args: candidate: List of candidate genes (encodings). rate: Percentage of mutation bits Examples: >>> # Genes that represent 3 parameters >>> gene1 = np.array([[0, 0, 1], [0, 1], [1, 0]]) >>> new_gene = _mutation([gene1]) >>> # new_gene could be the gene1 with the 3rd parameter changed >>> # new_gene[0] = gene1[0] >>> # new_gene[1] = gene1[1] >>> # new_gene[2] = [0, 1] != gene1[2] Returns: New gene (encoding) """ sample_index = np.random.choice(len(candidate)) sample = candidate[sample_index] idx_list = [] for i in range(int(max(len(sample) * rate, 1))): idx = np.random.choice(len(sample)) idx_list.append(idx) field = sample[idx] # one-hot encoding field[np.argmax(field)] = 0 bit = np.random.choice(field.shape[0]) field[bit] = 1 logger.info(LOGGING_PREFIX + "Perform mutation on %sth at index=%s", sample_index, str(idx_list)) return sample
python
def _mutation(candidate, rate=0.1): """Perform mutation action to candidates. For example, randomly change 10% of original sample Args: candidate: List of candidate genes (encodings). rate: Percentage of mutation bits Examples: >>> # Genes that represent 3 parameters >>> gene1 = np.array([[0, 0, 1], [0, 1], [1, 0]]) >>> new_gene = _mutation([gene1]) >>> # new_gene could be the gene1 with the 3rd parameter changed >>> # new_gene[0] = gene1[0] >>> # new_gene[1] = gene1[1] >>> # new_gene[2] = [0, 1] != gene1[2] Returns: New gene (encoding) """ sample_index = np.random.choice(len(candidate)) sample = candidate[sample_index] idx_list = [] for i in range(int(max(len(sample) * rate, 1))): idx = np.random.choice(len(sample)) idx_list.append(idx) field = sample[idx] # one-hot encoding field[np.argmax(field)] = 0 bit = np.random.choice(field.shape[0]) field[bit] = 1 logger.info(LOGGING_PREFIX + "Perform mutation on %sth at index=%s", sample_index, str(idx_list)) return sample
[ "def", "_mutation", "(", "candidate", ",", "rate", "=", "0.1", ")", ":", "sample_index", "=", "np", ".", "random", ".", "choice", "(", "len", "(", "candidate", ")", ")", "sample", "=", "candidate", "[", "sample_index", "]", "idx_list", "=", "[", "]", "for", "i", "in", "range", "(", "int", "(", "max", "(", "len", "(", "sample", ")", "*", "rate", ",", "1", ")", ")", ")", ":", "idx", "=", "np", ".", "random", ".", "choice", "(", "len", "(", "sample", ")", ")", "idx_list", ".", "append", "(", "idx", ")", "field", "=", "sample", "[", "idx", "]", "# one-hot encoding", "field", "[", "np", ".", "argmax", "(", "field", ")", "]", "=", "0", "bit", "=", "np", ".", "random", ".", "choice", "(", "field", ".", "shape", "[", "0", "]", ")", "field", "[", "bit", "]", "=", "1", "logger", ".", "info", "(", "LOGGING_PREFIX", "+", "\"Perform mutation on %sth at index=%s\"", ",", "sample_index", ",", "str", "(", "idx_list", ")", ")", "return", "sample" ]
Perform mutation action to candidates. For example, randomly change 10% of original sample Args: candidate: List of candidate genes (encodings). rate: Percentage of mutation bits Examples: >>> # Genes that represent 3 parameters >>> gene1 = np.array([[0, 0, 1], [0, 1], [1, 0]]) >>> new_gene = _mutation([gene1]) >>> # new_gene could be the gene1 with the 3rd parameter changed >>> # new_gene[0] = gene1[0] >>> # new_gene[1] = gene1[1] >>> # new_gene[2] = [0, 1] != gene1[2] Returns: New gene (encoding)
[ "Perform", "mutation", "action", "to", "candidates", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/tune/automl/genetic_searcher.py#L223-L258
train
Perform a random mutation action to candidates.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp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LC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\x30' + chr(111) + chr(2028 - 1979) + '\x34' + chr(280 - 229), 34472 - 34464), ehT0Px3KOsy9('\x30' + chr(6083 - 5972) + chr(0b110011) + '\x32' + chr(51), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b1011 + 0o52) + chr(0b10 + 0o57), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(931 - 880) + chr(0b110110) + chr(0b110110 + 0o0), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x31' + chr(48) + chr(1983 - 1931), 58708 - 58700), ehT0Px3KOsy9('\060' + chr(111) + chr(0b11100 + 0o25) + chr(0b110100) + '\x33', 8), ehT0Px3KOsy9(chr(821 - 773) + chr(0b1101111) + chr(1096 - 1047) + chr(0b10010 + 0o36) + chr(0b110001), 41510 - 41502), ehT0Px3KOsy9(chr(0b110000) + chr(11469 - 11358) + '\x32' + chr(0b110001 + 0o1) + chr(0b110110), 37166 - 37158), ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(111) + '\062' + chr(0b110111) + chr(0b110011), 11446 - 11438), ehT0Px3KOsy9(chr(443 - 395) + chr(0b1101111) + chr(50) + chr(0b11001 + 0o30) + chr(0b11 + 0o63), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1010011 + 0o34) + chr(51) + chr(0b110011) + '\x33', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b1 + 0o60) + chr(52) + chr(0b1001 + 0o55), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000 + 0o147) + '\x32' + '\062' + chr(2079 - 2028), 11645 - 11637), ehT0Px3KOsy9(chr(48) + '\157' + '\x32' + chr(0b101111 + 0o5) + '\x34', 9712 - 9704), ehT0Px3KOsy9('\060' + chr(4712 - 4601) + chr(907 - 858) + chr(0b110001) + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x35' + chr(50), 28351 - 28343), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(111) + '\x31' + chr(0b110010) + '\064', 16802 - 16794), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x31' + '\x37' + chr(2241 - 2192), 41676 - 41668), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(50) + chr(49) + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(0b1101111) + chr(52) + chr(52), 0b1000), ehT0Px3KOsy9(chr(205 - 157) + chr(111) + chr(0b10000 + 0o42) + chr(0b110111) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(0b100000 + 0o20) + '\x6f' + '\062' + chr(0b110101) + chr(0b110011), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(1766 - 1715) + chr(0b110111 + 0o0) + chr(2592 - 2538), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b101011 + 0o6) + '\x36' + '\x34', 28396 - 28388), ehT0Px3KOsy9('\060' + chr(0b1001110 + 0o41) + chr(50) + '\065' + chr(0b110101), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110010) + '\065' + '\060', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(50) + chr(0b1011 + 0o46) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(48) + chr(7716 - 7605) + chr(0b10101 + 0o41), 0o10), ehT0Px3KOsy9(chr(799 - 751) + '\157' + chr(0b110000 + 0o3) + '\064' + '\062', 0b1000), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(111) + '\x34' + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x36' + '\x32', 0b1000), ehT0Px3KOsy9(chr(1853 - 1805) + chr(111) + chr(0b110010) + '\x32' + chr(2260 - 2211), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(50) + chr(0b110110) + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(0b1001011 + 0o44) + chr(0b1100 + 0o46) + chr(0b101011 + 0o5) + chr(0b100111 + 0o13), ord("\x08")), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(111) + '\x31' + chr(0b110111) + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(0b110000 + 0o0) + '\x6f' + '\062' + chr(55) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9('\060' + chr(9305 - 9194) + chr(0b100011 + 0o20) + '\x35' + chr(0b1101 + 0o43), 0b1000), ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(111) + chr(0b110001) + chr(0b10101 + 0o42) + '\x36', 0b1000), ehT0Px3KOsy9(chr(48) + chr(11654 - 11543) + chr(729 - 677) + chr(2116 - 2064), 8), ehT0Px3KOsy9('\x30' + chr(4719 - 4608) + '\061' + '\x32' + '\x32', 38838 - 38830)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b1001 + 0o54) + chr(0b10 + 0o56), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'M'), chr(0b1100100) + chr(0b1100101) + chr(0b1011000 + 0o13) + chr(7262 - 7151) + chr(100) + '\145')(chr(0b1110101) + chr(116) + chr(0b1100110) + chr(1957 - 1912) + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def ReomRTFkzjN3(X3DOc7TuFLS2, YygZh57sDDVX=0.1): JBkHI4gVZqsj = WqUC3KWvYVup.random.choice(c2A0yzQpDQB3(X3DOc7TuFLS2)) aBu4gMMQp6Jg = X3DOc7TuFLS2[JBkHI4gVZqsj] awDPqLZNPKlS = [] for WVxHKyX45z_L in vQr8gNKaIaWE(ehT0Px3KOsy9(tsdjvlgh9gDP(c2A0yzQpDQB3(aBu4gMMQp6Jg) * YygZh57sDDVX, ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b1100 + 0o45), 8793 - 8785)))): YlqusYB6InkM = WqUC3KWvYVup.random.choice(c2A0yzQpDQB3(aBu4gMMQp6Jg)) xafqLlk3kkUe(awDPqLZNPKlS, xafqLlk3kkUe(SXOLrMavuUCe(b'\x02\xa3Y\x93*\x07'), chr(7287 - 7187) + '\145' + chr(7335 - 7236) + '\x6f' + chr(0b111000 + 0o54) + '\x65')(chr(0b1010110 + 0o37) + chr(6022 - 5906) + chr(102) + chr(744 - 699) + chr(2128 - 2072)))(YlqusYB6InkM) fEcfxx4smAdS = aBu4gMMQp6Jg[YlqusYB6InkM] fEcfxx4smAdS[WqUC3KWvYVup.ZVhyXLrjMqpt(fEcfxx4smAdS)] = ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(1787 - 1739), 4337 - 4329) z2RMTPp4AT0K = WqUC3KWvYVup.random.choice(fEcfxx4smAdS.nauYfLglTpcb[ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(0b1101111) + chr(912 - 864), 8)]) fEcfxx4smAdS[z2RMTPp4AT0K] = ehT0Px3KOsy9(chr(0b101100 + 0o4) + chr(1749 - 1638) + chr(0b110001), 8) xafqLlk3kkUe(hdK8qOUhR6Or, xafqLlk3kkUe(SXOLrMavuUCe(b'0\xe4a\x8e1\x00&\xa1\xd1\xe2\x81\r'), chr(100) + chr(101) + chr(7544 - 7445) + chr(0b1101111) + '\x64' + chr(0b1100101))(chr(4642 - 4525) + chr(116) + '\x66' + '\055' + chr(0b111000)))(jPsnCYtUD4E0 + xafqLlk3kkUe(SXOLrMavuUCe(b'3\xb6[\x90+\x11,\xb6\xd6\xfb\xaf\x07\xe7\xcd"Dt\x16\xe4\x04\x99\xd8\x8a\x1c\x8d\xc9\xfc&\x8bOV\xf4\xca\xbf]\xcb'), '\144' + '\145' + '\143' + '\x6f' + chr(0b1100100) + chr(4623 - 4522))(chr(6537 - 6420) + '\x74' + chr(102) + chr(45) + chr(0b111000)), JBkHI4gVZqsj, M8_cKLkHVB2V(awDPqLZNPKlS)) return aBu4gMMQp6Jg
ray-project/ray
python/ray/tune/scripts.py
list_trials
def list_trials(experiment_path, sort, output, filter_op, columns, result_columns): """Lists trials in the directory subtree starting at the given path.""" if columns: columns = columns.split(",") if result_columns: result_columns = result_columns.split(",") commands.list_trials(experiment_path, sort, output, filter_op, columns, result_columns)
python
def list_trials(experiment_path, sort, output, filter_op, columns, result_columns): """Lists trials in the directory subtree starting at the given path.""" if columns: columns = columns.split(",") if result_columns: result_columns = result_columns.split(",") commands.list_trials(experiment_path, sort, output, filter_op, columns, result_columns)
[ "def", "list_trials", "(", "experiment_path", ",", "sort", ",", "output", ",", "filter_op", ",", "columns", ",", "result_columns", ")", ":", "if", "columns", ":", "columns", "=", "columns", ".", "split", "(", "\",\"", ")", "if", "result_columns", ":", "result_columns", "=", "result_columns", ".", "split", "(", "\",\"", ")", "commands", ".", "list_trials", "(", "experiment_path", ",", "sort", ",", "output", ",", "filter_op", ",", "columns", ",", "result_columns", ")" ]
Lists trials in the directory subtree starting at the given path.
[ "Lists", "trials", "in", "the", "directory", "subtree", "starting", "at", "the", "given", "path", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/tune/scripts.py#L42-L50
train
Lists trials in the directory subtree starting at the given path.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,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O8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(1641 - 1593) + '\157' + '\063' + chr(0b11111 + 0o25) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(51) + chr(2297 - 2245) + chr(0b110100), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(1280 - 1229) + '\x37' + chr(175 - 120), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b100 + 0o153) + chr(0b110011) + '\062' + '\x30', 0b1000), ehT0Px3KOsy9(chr(206 - 158) + chr(111) + chr(1324 - 1273) + chr(0b110011) + chr(1045 - 997), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(2453 - 2398) + chr(1907 - 1856), 0b1000), ehT0Px3KOsy9('\x30' + chr(6345 - 6234) + chr(0b100000 + 0o21) + chr(0b110000 + 0o3) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110001) + chr(107 - 55) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(2046 - 1998) + '\x6f' + '\x33' + chr(2558 - 2503) + chr(51), 20401 - 20393), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(49) + chr(55) + '\x31', 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(50) + '\064' + chr(1770 - 1716), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + '\063' + '\x32' + chr(54), 0o10), ehT0Px3KOsy9(chr(1247 - 1199) + '\157' + '\062' + chr(50) + chr(601 - 550), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\061' + chr(49) + chr(54), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b100001 + 0o116) + '\065' + '\064', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(51) + chr(616 - 568) + '\062', 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x32' + chr(0b10100 + 0o42) + '\063', ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(817 - 766) + '\063' + chr(1941 - 1888), 0b1000), ehT0Px3KOsy9(chr(1178 - 1130) + chr(0b110101 + 0o72) + chr(598 - 547) + chr(52) + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(1585 - 1537) + chr(111) + chr(50) + '\x37' + chr(50), 0o10), ehT0Px3KOsy9(chr(1872 - 1824) + chr(0b1101111) + '\063' + chr(2081 - 2028) + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b101011 + 0o104) + '\x33' + chr(1944 - 1891) + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(11133 - 11022) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x33' + chr(50) + chr(1386 - 1338), 8), ehT0Px3KOsy9(chr(1776 - 1728) + '\x6f' + chr(1756 - 1703), 0o10), ehT0Px3KOsy9('\060' + chr(9328 - 9217) + '\x32' + chr(52) + chr(0b11 + 0o62), 0o10), ehT0Px3KOsy9(chr(48) + chr(5834 - 5723) + '\063' + '\066' + chr(861 - 811), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1100101 + 0o12) + chr(0b110101) + chr(1465 - 1416), 47157 - 47149), ehT0Px3KOsy9('\060' + chr(8265 - 8154) + '\061' + chr(0b1001 + 0o47) + chr(604 - 554), 43764 - 43756), ehT0Px3KOsy9(chr(0b1100 + 0o44) + chr(10533 - 10422) + chr(0b101110 + 0o5) + chr(764 - 716) + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(781 - 733) + '\x6f' + chr(0b10100 + 0o36) + chr(0b0 + 0o63) + chr(54), 0b1000), ehT0Px3KOsy9(chr(1217 - 1169) + '\x6f' + chr(0b10 + 0o60) + chr(54) + '\061', ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + '\062' + chr(189 - 141) + '\x37', 0o10), ehT0Px3KOsy9(chr(654 - 606) + chr(0b1101111) + chr(50) + chr(0b110101) + chr(2136 - 2084), 0b1000), ehT0Px3KOsy9(chr(0b101 + 0o53) + '\x6f' + chr(0b110011) + chr(54) + '\060', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b11 + 0o60) + chr(53) + chr(48), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(49) + '\x34' + chr(0b100110 + 0o12), 0o10), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(0b1101111) + chr(0b101110 + 0o3) + chr(53) + '\064', 0b1000), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(0b10010 + 0o135) + '\x37' + chr(169 - 120), 0b1000), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(6017 - 5906) + chr(1732 - 1681) + chr(0b111 + 0o54), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b11011 + 0o32) + chr(48), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xc8'), '\x64' + chr(0b100111 + 0o76) + chr(99) + chr(111) + chr(100) + chr(195 - 94))('\x75' + chr(116) + chr(3620 - 3518) + chr(0b100010 + 0o13) + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def WAJVzBTIRTPX(ioiHzNeqdyqk, tlxzdTw4q2JZ, e1jVqMSBZ01Y, lUyROy3r_s_B, qKlXBtn3PKy4, opFzpDPdsqNt): if qKlXBtn3PKy4: qKlXBtn3PKy4 = qKlXBtn3PKy4.split(xafqLlk3kkUe(SXOLrMavuUCe(b'\xca'), '\x64' + chr(0b11010 + 0o113) + chr(3764 - 3665) + chr(0b1000001 + 0o56) + chr(100) + '\145')('\x75' + chr(8161 - 8045) + chr(0b111101 + 0o51) + chr(45) + '\x38')) if opFzpDPdsqNt: opFzpDPdsqNt = opFzpDPdsqNt.split(xafqLlk3kkUe(SXOLrMavuUCe(b'\xca'), '\x64' + chr(1437 - 1336) + chr(99) + chr(0b1101111) + chr(0b1010000 + 0o24) + chr(6347 - 6246))(chr(6731 - 6614) + chr(9778 - 9662) + chr(147 - 45) + chr(0b101101) + '\x38')) xafqLlk3kkUe(JV5gLuAkdhdc, xafqLlk3kkUe(SXOLrMavuUCe(b'\x8a\x8d\x8c\xa4\x87O.\x0e\x9a\x15\xd5'), chr(100) + chr(101) + '\x63' + chr(0b1101111) + chr(0b1100100) + '\x65')(chr(8006 - 7889) + chr(0b1101000 + 0o14) + chr(0b11100 + 0o112) + chr(1015 - 970) + '\070'))(ioiHzNeqdyqk, tlxzdTw4q2JZ, e1jVqMSBZ01Y, lUyROy3r_s_B, qKlXBtn3PKy4, opFzpDPdsqNt)
ray-project/ray
python/ray/tune/scripts.py
list_experiments
def list_experiments(project_path, sort, output, filter_op, columns): """Lists experiments in the directory subtree.""" if columns: columns = columns.split(",") commands.list_experiments(project_path, sort, output, filter_op, columns)
python
def list_experiments(project_path, sort, output, filter_op, columns): """Lists experiments in the directory subtree.""" if columns: columns = columns.split(",") commands.list_experiments(project_path, sort, output, filter_op, columns)
[ "def", "list_experiments", "(", "project_path", ",", "sort", ",", "output", ",", "filter_op", ",", "columns", ")", ":", "if", "columns", ":", "columns", "=", "columns", ".", "split", "(", "\",\"", ")", "commands", ".", "list_experiments", "(", "project_path", ",", "sort", ",", "output", ",", "filter_op", ",", "columns", ")" ]
Lists experiments in the directory subtree.
[ "Lists", "experiments", "in", "the", "directory", "subtree", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/tune/scripts.py#L75-L79
train
Lists experiments in the directory subtree.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPvpP4xdo3,cW7yQuyEnJ6E,KOHQGQ8qLDWm,NE1Yam2HHroQ,ygAzbDzrvRMh,SBRjvOU1ufVC,hOkXjmluKZfJ,q1QCh3W88sgk,TLbJ60djyws0,rIcPej9ZqMqV,WTxpD_zsEOh2,LgE_I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Upv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + chr(111) + '\061' + chr(0b100010 + 0o21) + chr(0b101111 + 0o4), ord("\x08")), ehT0Px3KOsy9(chr(2245 - 2197) + chr(0b10010 + 0o135) + chr(52) + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(512 - 464) + chr(0b1010010 + 0o35) + chr(0b110010) + '\x32' + chr(53), 9481 - 9473), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110001) + chr(52) + chr(0b110111), 55400 - 55392), ehT0Px3KOsy9(chr(1295 - 1247) + chr(111) + chr(0b110010) + chr(0b110111) + chr(1782 - 1728), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(4508 - 4397) + chr(0b100010 + 0o24) + chr(1062 - 1013), 54292 - 54284), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\062' + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(1198 - 1087) + '\x31' + chr(51) + chr(51), 8), ehT0Px3KOsy9(chr(1253 - 1205) + chr(111) + '\063' + '\x30' + '\060', ord("\x08")), ehT0Px3KOsy9(chr(0b101111 + 0o1) + '\157' + '\x33' + chr(0b11101 + 0o24) + chr(51), 58807 - 58799), ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(0b1101111) + chr(0b101000 + 0o11) + chr(0b110001 + 0o0) + chr(1699 - 1649), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\063' + chr(1204 - 1156) + '\067', 0o10), ehT0Px3KOsy9(chr(48) + chr(3489 - 3378) + chr(2907 - 2852) + '\x35', 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(49) + chr(0b11011 + 0o30) + chr(0b110010 + 0o2), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x32' + chr(1011 - 962), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(2751 - 2640) + '\x33' + '\x36' + chr(50), 7745 - 7737), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(111) + chr(0b11111 + 0o22) + '\x32' + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(111) + chr(0b100001 + 0o22) + chr(54), 0b1000), ehT0Px3KOsy9(chr(611 - 563) + '\x6f' + chr(50) + '\x30' + '\x37', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b11000 + 0o127) + chr(0b110001) + '\061' + '\x34', 0o10), ehT0Px3KOsy9(chr(1481 - 1433) + chr(0b1101111) + chr(0b11010 + 0o30) + chr(51) + chr(0b110101), 10204 - 10196), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b1001 + 0o50) + '\x30' + chr(1599 - 1549), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(1356 - 1307) + chr(0b110100) + chr(55), 8), ehT0Px3KOsy9('\060' + chr(111) + chr(1354 - 1303) + chr(0b110110) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(111) + chr(490 - 438) + chr(52), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(51) + chr(284 - 235), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110001) + chr(0b110111) + chr(0b11110 + 0o31), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x32' + chr(55) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(915 - 866) + '\x37' + chr(1250 - 1196), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(5903 - 5792) + chr(0b110001) + chr(54) + chr(1917 - 1868), 62953 - 62945), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110001) + '\064' + '\066', 23927 - 23919), ehT0Px3KOsy9(chr(0b101011 + 0o5) + chr(5802 - 5691) + chr(0b110110) + chr(53), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\067' + chr(2807 - 2752), ord("\x08")), ehT0Px3KOsy9(chr(94 - 46) + chr(0b1101111) + '\x34' + chr(0b110010), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + '\065' + chr(1662 - 1613), 0o10), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(0b1101111) + chr(49) + chr(0b100111 + 0o13) + '\x36', 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(2179 - 2130) + chr(52) + '\x34', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(8153 - 8042) + '\061' + chr(54) + chr(1687 - 1632), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b10100 + 0o41) + chr(2090 - 2040), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(1055 - 1004) + chr(52) + chr(0b110000), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110101) + '\060', 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'u'), chr(8436 - 8336) + '\x65' + '\143' + chr(6268 - 6157) + chr(0b100000 + 0o104) + chr(101))(chr(0b1011111 + 0o26) + '\164' + chr(102) + chr(0b1011 + 0o42) + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def UHckD2jsE0QR(pdKXk9B4WPYL, tlxzdTw4q2JZ, e1jVqMSBZ01Y, lUyROy3r_s_B, qKlXBtn3PKy4): if qKlXBtn3PKy4: qKlXBtn3PKy4 = qKlXBtn3PKy4.split(xafqLlk3kkUe(SXOLrMavuUCe(b'w'), chr(0b100110 + 0o76) + '\x65' + '\x63' + chr(465 - 354) + '\x64' + chr(9024 - 8923))(chr(0b1110101) + chr(0b1110100) + '\x66' + chr(0b101101) + '\x38')) xafqLlk3kkUe(JV5gLuAkdhdc, xafqLlk3kkUe(SXOLrMavuUCe(b'7J\xe6\x13\xe1Tm+\xa5\xb9#\xaaX2e\x81'), '\x64' + chr(2824 - 2723) + '\143' + chr(0b1101111) + chr(0b1100100) + chr(0b1110 + 0o127))('\165' + chr(5337 - 5221) + chr(102) + chr(616 - 571) + '\x38'))(pdKXk9B4WPYL, tlxzdTw4q2JZ, e1jVqMSBZ01Y, lUyROy3r_s_B, qKlXBtn3PKy4)
ray-project/ray
python/ray/tune/ray_trial_executor.py
RayTrialExecutor._train
def _train(self, trial): """Start one iteration of training and save remote id.""" assert trial.status == Trial.RUNNING, trial.status remote = trial.runner.train.remote() # Local Mode if isinstance(remote, dict): remote = _LocalWrapper(remote) self._running[remote] = trial
python
def _train(self, trial): """Start one iteration of training and save remote id.""" assert trial.status == Trial.RUNNING, trial.status remote = trial.runner.train.remote() # Local Mode if isinstance(remote, dict): remote = _LocalWrapper(remote) self._running[remote] = trial
[ "def", "_train", "(", "self", ",", "trial", ")", ":", "assert", "trial", ".", "status", "==", "Trial", ".", "RUNNING", ",", "trial", ".", "status", "remote", "=", "trial", ".", "runner", ".", "train", ".", "remote", "(", ")", "# Local Mode", "if", "isinstance", "(", "remote", ",", "dict", ")", ":", "remote", "=", "_LocalWrapper", "(", "remote", ")", "self", ".", "_running", "[", "remote", "]", "=", "trial" ]
Start one iteration of training and save remote id.
[ "Start", "one", "iteration", "of", "training", "and", "save", "remote", "id", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/tune/ray_trial_executor.py#L107-L117
train
Start one iteration of training and save remote id.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdun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X02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + '\157' + '\063' + '\065' + chr(0b101010 + 0o15), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(50) + chr(0b11111 + 0o21), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b10100 + 0o35) + chr(1825 - 1776) + chr(2032 - 1978), 0b1000), ehT0Px3KOsy9(chr(1502 - 1454) + '\x6f' + chr(49) + chr(0b110010) + chr(0b101010 + 0o11), 42072 - 42064), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110001) + chr(1163 - 1115) + '\065', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(11464 - 11353) + chr(0b10100 + 0o36) + chr(0b110101 + 0o0) + chr(49), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110010) + '\061' + chr(0b1010 + 0o55), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(282 - 227) + chr(55), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110010) + chr(0b11001 + 0o35) + chr(0b11011 + 0o31), ord("\x08")), ehT0Px3KOsy9(chr(0b11 + 0o55) + '\157' + '\064' + '\062', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(5822 - 5711) + chr(53) + chr(0b1100 + 0o53), 57100 - 57092), ehT0Px3KOsy9('\x30' + chr(111) + chr(584 - 533) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(0b100010 + 0o16) + '\157' + chr(50) + '\x37' + '\062', 0b1000), ehT0Px3KOsy9(chr(1983 - 1935) + chr(0b1101111) + chr(0b10110 + 0o35) + chr(48) + chr(0b11101 + 0o23), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(2085 - 2035) + chr(55) + chr(331 - 276), 0b1000), ehT0Px3KOsy9('\060' + chr(0b100010 + 0o115) + chr(2518 - 2463) + chr(0b1 + 0o65), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b1110 + 0o43) + chr(0b110111) + chr(0b111 + 0o51), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1001 + 0o146) + '\x31' + chr(50) + chr(0b10111 + 0o34), 8), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1616 - 1565) + chr(49) + '\061', 37112 - 37104), ehT0Px3KOsy9(chr(0b110000) + chr(0b101110 + 0o101) + chr(1288 - 1237) + chr(51) + chr(48), 0o10), ehT0Px3KOsy9(chr(1498 - 1450) + chr(0b111100 + 0o63) + '\062' + chr(0b110011) + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(48) + chr(6129 - 6018) + chr(1738 - 1688) + '\067' + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(0b1001 + 0o47) + '\157' + '\067' + chr(53), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110001) + '\x31', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b100001 + 0o21) + chr(0b110011) + chr(1165 - 1117), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(51) + chr(0b110101) + '\067', 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b11111 + 0o120) + chr(51) + chr(1331 - 1279), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1347 - 1296) + chr(0b110110) + chr(374 - 322), ord("\x08")), ehT0Px3KOsy9(chr(0b110000 + 0o0) + '\x6f' + chr(2094 - 2039) + chr(1110 - 1056), 8), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(0b1010111 + 0o30) + chr(50) + '\066' + chr(0b110101), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b100001 + 0o116) + chr(0b110001) + chr(505 - 453) + '\x34', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x31' + chr(54) + chr(49), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110010) + chr(0b10011 + 0o42) + chr(0b11000 + 0o30), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\061' + chr(0b11101 + 0o25) + chr(48), 0o10), ehT0Px3KOsy9(chr(2060 - 2012) + chr(4265 - 4154) + chr(250 - 201) + chr(0b110110) + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(1766 - 1718) + '\157' + chr(395 - 346) + chr(51) + chr(2143 - 2088), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b111000 + 0o67) + '\x33' + '\067' + chr(1849 - 1794), 51929 - 51921), ehT0Px3KOsy9(chr(0b100001 + 0o17) + chr(7213 - 7102) + chr(0b100011 + 0o20) + '\064' + '\060', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b10 + 0o155) + chr(0b11000 + 0o31) + '\065', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110 + 0o54) + chr(267 - 218) + chr(1127 - 1073), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(10139 - 10028) + chr(468 - 415) + chr(835 - 787), 60210 - 60202)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xc1'), chr(100) + chr(0b1100101) + '\143' + chr(244 - 133) + chr(0b100011 + 0o101) + chr(8674 - 8573))(chr(0b111100 + 0o71) + chr(12169 - 12053) + chr(0b1011011 + 0o13) + chr(45) + chr(518 - 462)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def ZPmUrryptnX6(oVre8I6UXc3b, Alvsa0ue91Fo): assert xafqLlk3kkUe(Alvsa0ue91Fo, xafqLlk3kkUe(SXOLrMavuUCe(b'\x99R=\x1e\x12\xe1\xbbX\xf5gIb'), chr(100) + '\145' + '\x63' + chr(9806 - 9695) + chr(992 - 892) + '\x65')(chr(8074 - 7957) + chr(116) + '\x66' + chr(0b101101) + chr(56))) == xafqLlk3kkUe(bKgNCjeVNupv, xafqLlk3kkUe(SXOLrMavuUCe(b'\xbdE\x00\x1d\x0c\xe7\xc8'), chr(0b1100100) + '\x65' + chr(7541 - 7442) + chr(0b1101111) + chr(0b1110 + 0o126) + '\x65')(chr(8041 - 7924) + chr(116) + chr(102) + chr(1864 - 1819) + chr(211 - 155))), xafqLlk3kkUe(Alvsa0ue91Fo, xafqLlk3kkUe(SXOLrMavuUCe(b'\x99R=\x1e\x12\xe1\xbbX\xf5gIb'), chr(6532 - 6432) + chr(3551 - 3450) + chr(3105 - 3006) + chr(1219 - 1108) + chr(0b1111 + 0o125) + '\x65')(chr(0b1110101) + '\x74' + chr(0b111000 + 0o56) + '\055' + chr(2908 - 2852))) p1xJaV_tyCLH = Alvsa0ue91Fo.runner.train.remote() if PlSM16l2KDPD(p1xJaV_tyCLH, wLqBDw8l0eIm): p1xJaV_tyCLH = p1GX2CfCciVa(p1xJaV_tyCLH) oVre8I6UXc3b.aMgitVEm90gq[p1xJaV_tyCLH] = Alvsa0ue91Fo
ray-project/ray
python/ray/tune/ray_trial_executor.py
RayTrialExecutor._start_trial
def _start_trial(self, trial, checkpoint=None): """Starts trial and restores last result if trial was paused. Raises: ValueError if restoring from checkpoint fails. """ prior_status = trial.status self.set_status(trial, Trial.RUNNING) trial.runner = self._setup_runner( trial, reuse_allowed=checkpoint is not None or trial._checkpoint.value is not None) if not self.restore(trial, checkpoint): if trial.status == Trial.ERROR: raise RuntimeError( "Restore from checkpoint failed for Trial {}.".format( str(trial))) previous_run = self._find_item(self._paused, trial) if (prior_status == Trial.PAUSED and previous_run): # If Trial was in flight when paused, self._paused stores result. self._paused.pop(previous_run[0]) self._running[previous_run[0]] = trial else: self._train(trial)
python
def _start_trial(self, trial, checkpoint=None): """Starts trial and restores last result if trial was paused. Raises: ValueError if restoring from checkpoint fails. """ prior_status = trial.status self.set_status(trial, Trial.RUNNING) trial.runner = self._setup_runner( trial, reuse_allowed=checkpoint is not None or trial._checkpoint.value is not None) if not self.restore(trial, checkpoint): if trial.status == Trial.ERROR: raise RuntimeError( "Restore from checkpoint failed for Trial {}.".format( str(trial))) previous_run = self._find_item(self._paused, trial) if (prior_status == Trial.PAUSED and previous_run): # If Trial was in flight when paused, self._paused stores result. self._paused.pop(previous_run[0]) self._running[previous_run[0]] = trial else: self._train(trial)
[ "def", "_start_trial", "(", "self", ",", "trial", ",", "checkpoint", "=", "None", ")", ":", "prior_status", "=", "trial", ".", "status", "self", ".", "set_status", "(", "trial", ",", "Trial", ".", "RUNNING", ")", "trial", ".", "runner", "=", "self", ".", "_setup_runner", "(", "trial", ",", "reuse_allowed", "=", "checkpoint", "is", "not", "None", "or", "trial", ".", "_checkpoint", ".", "value", "is", "not", "None", ")", "if", "not", "self", ".", "restore", "(", "trial", ",", "checkpoint", ")", ":", "if", "trial", ".", "status", "==", "Trial", ".", "ERROR", ":", "raise", "RuntimeError", "(", "\"Restore from checkpoint failed for Trial {}.\"", ".", "format", "(", "str", "(", "trial", ")", ")", ")", "previous_run", "=", "self", ".", "_find_item", "(", "self", ".", "_paused", ",", "trial", ")", "if", "(", "prior_status", "==", "Trial", ".", "PAUSED", "and", "previous_run", ")", ":", "# If Trial was in flight when paused, self._paused stores result.", "self", ".", "_paused", ".", "pop", "(", "previous_run", "[", "0", "]", ")", "self", ".", "_running", "[", "previous_run", "[", "0", "]", "]", "=", "trial", "else", ":", "self", ".", "_train", "(", "trial", ")" ]
Starts trial and restores last result if trial was paused. Raises: ValueError if restoring from checkpoint fails.
[ "Starts", "trial", "and", "restores", "last", "result", "if", "trial", "was", "paused", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/tune/ray_trial_executor.py#L119-L143
train
Starts trial and restores last result if trial was paused.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRy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HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\060' + '\x6f' + '\x31' + chr(0b11000 + 0o30) + '\x34', 0b1000), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(0b1101111) + chr(545 - 496) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(971 - 918) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(0b1010 + 0o46) + '\x6f' + chr(1578 - 1528) + chr(0b1111 + 0o44) + chr(0b11101 + 0o30), 48867 - 48859), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101100 + 0o3) + '\063' + chr(53) + chr(505 - 456), 0b1000), ehT0Px3KOsy9(chr(632 - 584) + chr(0b110000 + 0o77) + chr(51) + chr(2729 - 2676), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(55) + chr(1229 - 1175), 0b1000), ehT0Px3KOsy9(chr(710 - 662) + '\157' + chr(1863 - 1812) + '\x36' + chr(0b110 + 0o57), ord("\x08")), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(111) + chr(50) + '\062' + '\x31', 36478 - 36470), ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(0b1101111) + chr(0b100001 + 0o21) + '\061' + chr(0b110110), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(512 - 462) + chr(0b11101 + 0o25) + '\061', 8), ehT0Px3KOsy9('\x30' + chr(12127 - 12016) + chr(0b100000 + 0o25) + chr(0b110101), 30708 - 30700), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110000 + 0o3) + chr(0b101000 + 0o13) + '\x31', 0b1000), ehT0Px3KOsy9(chr(190 - 142) + chr(0b1101111) + '\x31' + chr(50) + chr(0b11110 + 0o31), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1001111 + 0o40) + chr(0b110011) + chr(0b100010 + 0o17) + chr(48), 28770 - 28762), ehT0Px3KOsy9('\060' + chr(111) + '\x32' + chr(0b10100 + 0o37), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000011 + 0o54) + chr(0b11110 + 0o25) + '\x32' + '\x33', 16334 - 16326), ehT0Px3KOsy9(chr(998 - 950) + chr(5616 - 5505) + '\062', ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b100010 + 0o22), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b101000 + 0o107) + '\063' + chr(0b110110) + chr(0b100101 + 0o21), 0b1000), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(1381 - 1270) + '\061' + chr(53) + '\067', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110011) + '\063' + chr(0b11 + 0o60), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(55) + '\067', 19167 - 19159), ehT0Px3KOsy9(chr(1042 - 994) + chr(0b1101111) + '\061' + chr(0b1001 + 0o47) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(0b100111 + 0o11) + chr(0b1101111) + chr(50) + chr(2055 - 2005) + chr(48), 0o10), ehT0Px3KOsy9(chr(0b11000 + 0o30) + '\x6f' + chr(0b110010) + chr(0b11001 + 0o30) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(49) + chr(51) + '\063', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(50) + chr(0b11001 + 0o30) + chr(51), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\062' + chr(1156 - 1101) + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(0b10110 + 0o32) + '\157' + '\064' + '\061', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x32' + chr(0b10011 + 0o41) + chr(55), 0b1000), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(7459 - 7348) + '\062' + chr(0b110110) + chr(49), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(49) + chr(0b110100 + 0o1) + chr(0b10110 + 0o32), 0o10), ehT0Px3KOsy9('\060' + chr(0b1010001 + 0o36) + chr(548 - 497) + chr(0b11110 + 0o24) + chr(1290 - 1241), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b111010 + 0o65) + chr(0b101101 + 0o5) + chr(0b110011) + '\065', 8), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x31' + chr(0b110101) + chr(1290 - 1242), 8), ehT0Px3KOsy9(chr(1495 - 1447) + chr(111) + chr(0b110010) + chr(0b110011 + 0o0) + '\066', 53726 - 53718), ehT0Px3KOsy9(chr(0b110000) + chr(903 - 792) + chr(0b110111) + chr(0b101001 + 0o13), 47685 - 47677), ehT0Px3KOsy9('\x30' + chr(0b1101 + 0o142) + chr(0b110010) + chr(51) + '\x37', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b11110 + 0o25) + '\x30' + chr(0b110001), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(9075 - 8964) + '\065' + '\060', 56076 - 56068)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'j'), chr(0b101011 + 0o71) + '\x65' + chr(99) + '\x6f' + chr(0b1000100 + 0o40) + '\x65')('\x75' + '\x74' + chr(1339 - 1237) + chr(45) + chr(0b10101 + 0o43)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def HaymRuyhONKv(oVre8I6UXc3b, Alvsa0ue91Fo, DNoMzyusA3wb=None): hMFhAt5xrO2C = Alvsa0ue91Fo.vBsMWH4gAEfy xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'7l]\xc2\x9ai_\x81\xe4\xfd'), chr(5770 - 5670) + chr(101) + chr(0b1100011) + chr(111) + chr(0b1100100) + chr(0b1100101))('\165' + chr(9035 - 8919) + '\x66' + chr(1484 - 1439) + chr(0b111000)))(Alvsa0ue91Fo, xafqLlk3kkUe(bKgNCjeVNupv, xafqLlk3kkUe(SXOLrMavuUCe(b'\x16\\g\xd3\xa0Sy'), '\144' + chr(0b1000000 + 0o45) + chr(5284 - 5185) + '\x6f' + '\x64' + '\145')('\165' + '\164' + chr(7442 - 7340) + '\055' + '\x38'))) Alvsa0ue91Fo.tFE9_yPvqrzD = oVre8I6UXc3b._setup_runner(Alvsa0ue91Fo, reuse_allowed=DNoMzyusA3wb is not None or Alvsa0ue91Fo._checkpoint.QmmgWUB13VCJ is not None) if not xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'6lZ\xe9\x86o['), chr(0b1100100) + chr(101) + chr(2931 - 2832) + chr(111) + chr(100) + '\145')(chr(0b1110101) + chr(0b1110100) + '\x66' + chr(1480 - 1435) + '\070'))(Alvsa0ue91Fo, DNoMzyusA3wb): if xafqLlk3kkUe(Alvsa0ue91Fo, xafqLlk3kkUe(SXOLrMavuUCe(b'2KZ\xd0\xbeU\n\x92\xd0\xcb\xf7T'), chr(6102 - 6002) + chr(0b1100101) + chr(5864 - 5765) + chr(111) + chr(1261 - 1161) + '\x65')('\x75' + '\x74' + chr(1102 - 1000) + chr(45) + '\x38')) == xafqLlk3kkUe(bKgNCjeVNupv, xafqLlk3kkUe(SXOLrMavuUCe(b'\x01[{\xd2\xbb'), chr(5384 - 5284) + '\x65' + chr(0b1100011) + chr(5239 - 5128) + chr(0b1100100) + '\145')('\x75' + '\x74' + chr(102) + '\x2d' + chr(0b1010 + 0o56))): raise n0ZkatoveZpF(xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b'\x16lZ\xe9\x86o[\xd5\xf7\xfc\xfe@\xf94\xa0v\xb0it\x99\x06\xb5Kc\xf6\xeb2\xe7\xdeE\x87\xd7\x07\xa3\xbd<\xecU\xfe\xaddrT\xb3'), chr(100) + chr(0b1100101) + '\x63' + chr(2489 - 2378) + chr(0b1100100) + '\x65')(chr(6523 - 6406) + '\164' + chr(0b1100110) + '\x2d' + '\070'), xafqLlk3kkUe(SXOLrMavuUCe(b'\x12=[\xf2\xa1|m\xc6\xc1\xfe\xf4G'), '\x64' + chr(0b1100101) + chr(0b110 + 0o135) + '\157' + chr(0b1001100 + 0o30) + chr(7318 - 7217))('\x75' + '\x74' + chr(102) + '\055' + chr(0b10111 + 0o41)))(M8_cKLkHVB2V(Alvsa0ue91Fo))) birD_0iIEQIk = oVre8I6UXc3b._find_item(oVre8I6UXc3b._paused, Alvsa0ue91Fo) if hMFhAt5xrO2C == xafqLlk3kkUe(bKgNCjeVNupv, xafqLlk3kkUe(SXOLrMavuUCe(b'\x14H|\xce\xacY'), chr(0b1100100) + chr(7039 - 6938) + '\143' + '\x6f' + '\144' + chr(101))('\165' + '\x74' + '\146' + '\x2d' + chr(0b100111 + 0o21))) and birD_0iIEQIk: xafqLlk3kkUe(oVre8I6UXc3b._paused, xafqLlk3kkUe(SXOLrMavuUCe(b'4fY'), chr(1882 - 1782) + chr(0b1000110 + 0o37) + chr(99) + chr(0b1101111) + chr(100) + chr(0b1100101))(chr(2134 - 2017) + '\x74' + '\x66' + '\055' + chr(0b111000)))(birD_0iIEQIk[ehT0Px3KOsy9('\060' + chr(1980 - 1869) + chr(48), 16701 - 16693)]) oVre8I6UXc3b.aMgitVEm90gq[birD_0iIEQIk[ehT0Px3KOsy9(chr(377 - 329) + '\157' + '\x30', 8)]] = Alvsa0ue91Fo else: xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x1b}[\xfc\x80s'), chr(100) + chr(0b1100101) + chr(99) + chr(0b100001 + 0o116) + chr(5259 - 5159) + chr(101))(chr(117) + '\164' + chr(102) + chr(0b101101) + '\x38'))(Alvsa0ue91Fo)
ray-project/ray
python/ray/tune/ray_trial_executor.py
RayTrialExecutor._stop_trial
def _stop_trial(self, trial, error=False, error_msg=None, stop_logger=True): """Stops this trial. Stops this trial, releasing all allocating resources. If stopping the trial fails, the run will be marked as terminated in error, but no exception will be thrown. Args: error (bool): Whether to mark this trial as terminated in error. error_msg (str): Optional error message. stop_logger (bool): Whether to shut down the trial logger. """ if stop_logger: trial.close_logger() if error: self.set_status(trial, Trial.ERROR) else: self.set_status(trial, Trial.TERMINATED) try: trial.write_error_log(error_msg) if hasattr(trial, "runner") and trial.runner: if (not error and self._reuse_actors and self._cached_actor is None): logger.debug("Reusing actor for {}".format(trial.runner)) self._cached_actor = trial.runner else: logger.info( "Destroying actor for trial {}. If your trainable is " "slow to initialize, consider setting " "reuse_actors=True to reduce actor creation " "overheads.".format(trial)) trial.runner.stop.remote() trial.runner.__ray_terminate__.remote() except Exception: logger.exception("Error stopping runner for Trial %s", str(trial)) self.set_status(trial, Trial.ERROR) finally: trial.runner = None
python
def _stop_trial(self, trial, error=False, error_msg=None, stop_logger=True): """Stops this trial. Stops this trial, releasing all allocating resources. If stopping the trial fails, the run will be marked as terminated in error, but no exception will be thrown. Args: error (bool): Whether to mark this trial as terminated in error. error_msg (str): Optional error message. stop_logger (bool): Whether to shut down the trial logger. """ if stop_logger: trial.close_logger() if error: self.set_status(trial, Trial.ERROR) else: self.set_status(trial, Trial.TERMINATED) try: trial.write_error_log(error_msg) if hasattr(trial, "runner") and trial.runner: if (not error and self._reuse_actors and self._cached_actor is None): logger.debug("Reusing actor for {}".format(trial.runner)) self._cached_actor = trial.runner else: logger.info( "Destroying actor for trial {}. If your trainable is " "slow to initialize, consider setting " "reuse_actors=True to reduce actor creation " "overheads.".format(trial)) trial.runner.stop.remote() trial.runner.__ray_terminate__.remote() except Exception: logger.exception("Error stopping runner for Trial %s", str(trial)) self.set_status(trial, Trial.ERROR) finally: trial.runner = None
[ "def", "_stop_trial", "(", "self", ",", "trial", ",", "error", "=", "False", ",", "error_msg", "=", "None", ",", "stop_logger", "=", "True", ")", ":", "if", "stop_logger", ":", "trial", ".", "close_logger", "(", ")", "if", "error", ":", "self", ".", "set_status", "(", "trial", ",", "Trial", ".", "ERROR", ")", "else", ":", "self", ".", "set_status", "(", "trial", ",", "Trial", ".", "TERMINATED", ")", "try", ":", "trial", ".", "write_error_log", "(", "error_msg", ")", "if", "hasattr", "(", "trial", ",", "\"runner\"", ")", "and", "trial", ".", "runner", ":", "if", "(", "not", "error", "and", "self", ".", "_reuse_actors", "and", "self", ".", "_cached_actor", "is", "None", ")", ":", "logger", ".", "debug", "(", "\"Reusing actor for {}\"", ".", "format", "(", "trial", ".", "runner", ")", ")", "self", ".", "_cached_actor", "=", "trial", ".", "runner", "else", ":", "logger", ".", "info", "(", "\"Destroying actor for trial {}. If your trainable is \"", "\"slow to initialize, consider setting \"", "\"reuse_actors=True to reduce actor creation \"", "\"overheads.\"", ".", "format", "(", "trial", ")", ")", "trial", ".", "runner", ".", "stop", ".", "remote", "(", ")", "trial", ".", "runner", ".", "__ray_terminate__", ".", "remote", "(", ")", "except", "Exception", ":", "logger", ".", "exception", "(", "\"Error stopping runner for Trial %s\"", ",", "str", "(", "trial", ")", ")", "self", ".", "set_status", "(", "trial", ",", "Trial", ".", "ERROR", ")", "finally", ":", "trial", ".", "runner", "=", "None" ]
Stops this trial. Stops this trial, releasing all allocating resources. If stopping the trial fails, the run will be marked as terminated in error, but no exception will be thrown. Args: error (bool): Whether to mark this trial as terminated in error. error_msg (str): Optional error message. stop_logger (bool): Whether to shut down the trial logger.
[ "Stops", "this", "trial", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/tune/ray_trial_executor.py#L145-L186
train
Stops this trial.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0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h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + '\157' + '\x31' + chr(1902 - 1853) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1011010 + 0o25) + '\x32' + chr(0b101010 + 0o7) + chr(54), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b100101 + 0o15) + chr(1246 - 1196) + '\x33', 0o10), ehT0Px3KOsy9(chr(1345 - 1297) + chr(7640 - 7529) + chr(859 - 809) + chr(54) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(9797 - 9686) + '\x32' + chr(0b10100 + 0o36) + chr(0b11011 + 0o26), 61308 - 61300), ehT0Px3KOsy9(chr(0b110000) + chr(5057 - 4946) + '\x33' + '\x37' + chr(0b110011), 65191 - 65183), ehT0Px3KOsy9('\x30' + chr(0b1100110 + 0o11) + chr(0b11110 + 0o31) + chr(1349 - 1300), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110010) + chr(0b110000 + 0o7), 0o10), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(0b1101111) + '\061' + chr(0b11010 + 0o31) + chr(48), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b11110 + 0o25) + '\x30' + '\062', 14326 - 14318), ehT0Px3KOsy9(chr(48) + chr(4920 - 4809) + '\x36' + chr(0b110101), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x33' + chr(54) + '\x31', 10245 - 10237), ehT0Px3KOsy9(chr(2149 - 2101) + '\157' + '\x33' + chr(0b101000 + 0o14) + '\067', 21233 - 21225), ehT0Px3KOsy9(chr(1352 - 1304) + chr(841 - 730) + chr(1540 - 1489) + chr(0b1001 + 0o47) + '\063', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(10665 - 10554) + chr(460 - 409) + chr(50) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b100101 + 0o13) + '\157' + chr(2080 - 2030) + chr(0b100010 + 0o21) + chr(0b110110 + 0o0), 0b1000), ehT0Px3KOsy9(chr(2124 - 2076) + chr(11135 - 11024) + '\062' + chr(0b110000) + chr(0b10111 + 0o33), ord("\x08")), ehT0Px3KOsy9(chr(1989 - 1941) + chr(0b1100 + 0o143) + chr(0b10111 + 0o34) + chr(0b11000 + 0o35) + '\060', 0b1000), ehT0Px3KOsy9('\060' + chr(0b100111 + 0o110) + '\x32' + chr(0b101110 + 0o10), ord("\x08")), ehT0Px3KOsy9(chr(0b100001 + 0o17) + chr(8638 - 8527) + chr(0b11011 + 0o30) + chr(0b11 + 0o61) + chr(0b110101), 36008 - 36000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b101011 + 0o13) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(340 - 292) + chr(0b1101111) + chr(49) + chr(0b110100) + '\063', 0o10), ehT0Px3KOsy9('\060' + chr(8526 - 8415) + chr(49) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(2262 - 2214) + chr(3391 - 3280) + chr(1242 - 1191) + '\067' + '\x33', 8), ehT0Px3KOsy9(chr(164 - 116) + '\157' + chr(0b110011) + chr(0b11110 + 0o25) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(308 - 260) + chr(0b1101111) + '\061' + chr(1608 - 1559) + '\064', 0b1000), ehT0Px3KOsy9(chr(0b101011 + 0o5) + chr(4063 - 3952) + '\x32' + chr(0b110001) + '\x31', 48468 - 48460), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110010) + chr(2105 - 2056) + chr(1442 - 1387), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(49) + chr(0b110010) + chr(0b11111 + 0o25), 41384 - 41376), ehT0Px3KOsy9('\060' + '\x6f' + '\063' + chr(51) + chr(0b110001 + 0o2), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001) + chr(0b110110) + chr(0b110000), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + '\062' + '\060' + chr(0b10000 + 0o42), 8), ehT0Px3KOsy9('\060' + chr(0b1000100 + 0o53) + chr(0b101001 + 0o10) + '\062' + chr(0b110001), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\062' + chr(0b110100) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(1214 - 1164) + chr(52) + chr(55), 8), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(0b1101111) + '\x32' + chr(0b110001) + '\x32', 0o10), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(766 - 655) + chr(2330 - 2280) + '\x31' + chr(48), 48311 - 48303), ehT0Px3KOsy9(chr(1196 - 1148) + chr(111) + '\x33' + '\x37', ord("\x08")), ehT0Px3KOsy9('\060' + chr(2487 - 2376) + chr(53) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110001) + chr(0b11100 + 0o33) + chr(54), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\065' + '\060', 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'f'), '\144' + chr(0b1100101) + chr(2643 - 2544) + chr(5306 - 5195) + '\144' + chr(101))(chr(117) + chr(0b100101 + 0o117) + chr(0b1100110) + chr(0b1011 + 0o42) + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def KjaIfbVMJa29(oVre8I6UXc3b, Alvsa0ue91Fo, EUdPatOS1wx0=ehT0Px3KOsy9('\x30' + '\x6f' + chr(1897 - 1849), ord("\x08")), foIYxeNLXJsf=None, NXdFzJf1_8tO=ehT0Px3KOsy9(chr(48) + chr(0b111111 + 0o60) + chr(0b1100 + 0o45), 37005 - 36997)): if NXdFzJf1_8tO: xafqLlk3kkUe(Alvsa0ue91Fo, xafqLlk3kkUe(SXOLrMavuUCe(b'+\xe2\xfc\xc2\xf4\xa4Ux?\xa5P\x83'), chr(0b1001 + 0o133) + chr(0b1100101) + chr(9600 - 9501) + chr(1001 - 890) + '\x64' + chr(101))(chr(0b1110101) + chr(116) + chr(0b1100110) + chr(0b101101) + '\070'))() if EUdPatOS1wx0: xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b';\xeb\xe7\xee\xe2\x8fXc-\xb1'), '\x64' + chr(9252 - 9151) + chr(0b100000 + 0o103) + chr(0b1101111) + '\x64' + chr(0b1111 + 0o126))(chr(0b100011 + 0o122) + chr(0b11101 + 0o127) + '\146' + '\x2d' + '\070'))(Alvsa0ue91Fo, xafqLlk3kkUe(bKgNCjeVNupv, xafqLlk3kkUe(SXOLrMavuUCe(b'\r\xdc\xc1\xfe\xc3'), chr(0b111 + 0o135) + chr(5205 - 5104) + chr(0b11000 + 0o113) + chr(0b1101111) + chr(0b1001011 + 0o31) + chr(0b1100101))(chr(2833 - 2716) + chr(0b10010 + 0o142) + chr(102) + chr(0b101101) + chr(0b10 + 0o66)))) else: xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b';\xeb\xe7\xee\xe2\x8fXc-\xb1'), chr(9900 - 9800) + chr(0b1100101) + chr(2607 - 2508) + '\x6f' + chr(0b1100100) + '\x65')('\165' + chr(6774 - 6658) + chr(4153 - 4051) + '\x2d' + '\x38'))(Alvsa0ue91Fo, xafqLlk3kkUe(bKgNCjeVNupv, xafqLlk3kkUe(SXOLrMavuUCe(b'\x1c\xcb\xc1\xfc\xd8\xb5xC\x1d\x86'), '\144' + chr(2294 - 2193) + chr(99) + chr(0b1101111) + chr(0b1100100) + chr(8631 - 8530))(chr(117) + chr(0b1110100) + chr(0b1100110) + '\x2d' + '\070'))) try: xafqLlk3kkUe(Alvsa0ue91Fo, xafqLlk3kkUe(SXOLrMavuUCe(b'?\xfc\xfa\xc5\xf4\xa4\\e*\xadG\xae\x8b\xac\xb6'), chr(0b110011 + 0o61) + chr(1656 - 1555) + chr(0b1101 + 0o126) + '\157' + chr(0b1001010 + 0o32) + chr(0b1100101))(chr(0b1110101) + chr(116) + chr(102) + chr(209 - 164) + '\x38'))(foIYxeNLXJsf) if lot1PSoAwYhj(Alvsa0ue91Fo, xafqLlk3kkUe(SXOLrMavuUCe(b':\xfb\xfd\xdf\xf4\x89'), chr(0b1100100) + chr(101) + chr(0b1100011) + chr(0b1101111) + chr(100) + chr(1985 - 1884))(chr(117) + chr(556 - 440) + chr(0b110 + 0o140) + chr(0b10 + 0o53) + chr(153 - 97))) and xafqLlk3kkUe(Alvsa0ue91Fo, xafqLlk3kkUe(SXOLrMavuUCe(b'<\xc8\xd6\x88\xce\x82ia)\xb0O\xb5'), '\x64' + '\145' + chr(0b1100011) + chr(111) + '\144' + chr(7224 - 7123))('\165' + chr(0b1110 + 0o146) + chr(0b1100110) + '\x2d' + '\x38')): if not EUdPatOS1wx0 and xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x17\xfc\xf6\xc4\xe2\x9efv;\xb6Z\x83\x94'), chr(100) + chr(0b100100 + 0o101) + chr(0b1100011) + chr(0b1101111) + chr(100) + chr(0b1100101))(chr(117) + chr(0b1110100) + chr(0b11111 + 0o107) + '\x2d' + chr(0b11 + 0o65))) and (xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x17\xed\xf2\xd2\xf9\x9e]H9\xa1A\x9e\x95'), chr(0b1100100) + chr(101) + '\143' + chr(0b100111 + 0o110) + '\144' + '\145')(chr(117) + chr(0b1110100) + '\x66' + chr(0b101101) + chr(2110 - 2054))) is None): xafqLlk3kkUe(hdK8qOUhR6Or, xafqLlk3kkUe(SXOLrMavuUCe(b',\xeb\xf1\xc4\xf6'), chr(0b1110 + 0o126) + chr(101) + '\x63' + chr(0b1101111) + '\144' + chr(0b110010 + 0o63))(chr(117) + '\164' + '\146' + chr(0b10101 + 0o30) + '\070'))(xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b'\x1a\xeb\xe6\xc2\xf8\x95^79\xa1A\x9e\x95\xe3\xb7\xf1\xf0\xc8m\x98'), chr(9952 - 9852) + chr(101) + chr(0b1100011) + chr(4474 - 4363) + chr(100) + chr(0b1100101))(chr(8638 - 8521) + '\x74' + chr(0b1100110) + chr(0b11011 + 0o22) + '\x38'), xafqLlk3kkUe(SXOLrMavuUCe(b'\x1e\xba\xe1\xde\xd9\x9aj$\x08\xb2P\x9b'), chr(7160 - 7060) + '\145' + chr(0b1100011) + chr(0b111111 + 0o60) + chr(9101 - 9001) + chr(0b10010 + 0o123))(chr(0b1000011 + 0o62) + '\164' + chr(4153 - 4051) + '\055' + chr(0b101001 + 0o17)))(xafqLlk3kkUe(Alvsa0ue91Fo, xafqLlk3kkUe(SXOLrMavuUCe(b'<\xc8\xd6\x88\xce\x82ia)\xb0O\xb5'), chr(0b110001 + 0o63) + chr(0b1100101) + chr(0b1010011 + 0o20) + chr(6724 - 6613) + chr(100) + chr(101))(chr(0b1110101) + chr(0b1001001 + 0o53) + chr(2371 - 2269) + chr(191 - 146) + chr(1802 - 1746))))) oVre8I6UXc3b.yz4IOdGyU_ER = Alvsa0ue91Fo.tFE9_yPvqrzD else: xafqLlk3kkUe(hdK8qOUhR6Or, xafqLlk3kkUe(SXOLrMavuUCe(b'\x1b\xb9\xdb\xc9\xe4\x98^ 2\xaeo\x9a'), chr(5955 - 5855) + chr(101) + chr(99) + chr(0b0 + 0o157) + chr(0b1100100) + '\145')(chr(117) + chr(0b1110100) + '\x66' + '\055' + chr(0b111000)))(xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b"\x0c\xeb\xe0\xc5\xe3\x94@~6\xa5\x15\x90\x84\xb7\xbe\xec\xa2\x8ey\x97\x17\x17x\x92\xbb \xa9\xf4)\xf5P\xcb7\x87\xde\xe5\xfdm\x0f\n:\xef\xfa\xdf\xf0\x99Urx\xabF\xd1\x94\xaf\xbe\xe9\xa2\x9cy\xc5^\rc\x8f\xb3-\xe5\xe6.\xbe\\\xa22\xc8\xc9\xf9\xe1{J\x0ch\xfd\xf6\xc5\xe5\x92Wpx\xb0P\x84\x94\xa6\x8e\xff\xe1\x9cy\x97D^^\x89\xaf)\xa9\xfb;\xfb\x02\xe75\xd2\xc4\xef\xa8~L\n'\xfc\xb3\xd2\xe3\x9eXc1\xad[\xd1\x88\xb5\xb4\xec\xea\x8dw\x81DM"), '\144' + '\x65' + chr(0b110011 + 0o60) + '\x6f' + '\144' + chr(0b1100101))(chr(0b1110101) + '\164' + chr(7806 - 7704) + '\055' + chr(2090 - 2034)), xafqLlk3kkUe(SXOLrMavuUCe(b'\x1e\xba\xe1\xde\xd9\x9aj$\x08\xb2P\x9b'), chr(4026 - 3926) + chr(101) + chr(99) + chr(5586 - 5475) + chr(2919 - 2819) + '\x65')(chr(0b1110101) + chr(0b1110100) + chr(102) + chr(0b100000 + 0o15) + chr(0b1001 + 0o57)))(Alvsa0ue91Fo)) xafqLlk3kkUe(Alvsa0ue91Fo.runner.stop, xafqLlk3kkUe(SXOLrMavuUCe(b':\xeb\xfe\xde\xe5\x9e'), '\144' + '\x65' + '\x63' + chr(0b1101111) + chr(100) + chr(0b1100101))(chr(117) + chr(0b1110100) + chr(0b1011010 + 0o14) + chr(371 - 326) + chr(0b111000)))() xafqLlk3kkUe(Alvsa0ue91Fo.runner.__ray_terminate__, xafqLlk3kkUe(SXOLrMavuUCe(b':\xeb\xfe\xde\xe5\x9e'), chr(966 - 866) + chr(10131 - 10030) + chr(0b1100011) + chr(0b1010011 + 0o34) + chr(0b1100100) + '\145')(chr(10994 - 10877) + chr(116) + '\146' + chr(0b10001 + 0o34) + chr(56)))() except jLmadlzMdunT: xafqLlk3kkUe(hdK8qOUhR6Or, xafqLlk3kkUe(SXOLrMavuUCe(b'-\xf6\xf0\xd4\xe1\x8fPx6'), chr(0b1100100) + '\145' + chr(0b110101 + 0o56) + chr(111) + chr(100) + chr(101))(chr(0b1100001 + 0o24) + chr(0b1110100) + chr(102) + '\055' + chr(0b10100 + 0o44)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\r\xfc\xe1\xde\xe3\xdbJc7\xb2E\x98\x89\xa4\xf1\xec\xf7\x86x\x80ECl\x94\xa8l\xdd\xfd=\xba\x1c\xa2t\xd4'), chr(100) + chr(101) + chr(2965 - 2866) + chr(0b100111 + 0o110) + chr(6642 - 6542) + chr(0b100011 + 0o102))(chr(0b10001 + 0o144) + chr(0b1110100) + chr(8880 - 8778) + chr(45) + '\070'), M8_cKLkHVB2V(Alvsa0ue91Fo)) xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b';\xeb\xe7\xee\xe2\x8fXc-\xb1'), chr(934 - 834) + chr(0b1100101) + '\x63' + chr(0b101000 + 0o107) + '\144' + chr(0b100001 + 0o104))(chr(2036 - 1919) + chr(116) + chr(102) + chr(0b101101) + chr(56)))(Alvsa0ue91Fo, xafqLlk3kkUe(bKgNCjeVNupv, xafqLlk3kkUe(SXOLrMavuUCe(b'\r\xdc\xc1\xfe\xc3'), '\144' + chr(5742 - 5641) + chr(2931 - 2832) + chr(111) + '\x64' + chr(0b1100101))('\165' + chr(0b1110100) + chr(5497 - 5395) + chr(1983 - 1938) + chr(56)))) finally: Alvsa0ue91Fo.tFE9_yPvqrzD = None
ray-project/ray
python/ray/tune/ray_trial_executor.py
RayTrialExecutor.start_trial
def start_trial(self, trial, checkpoint=None): """Starts the trial. Will not return resources if trial repeatedly fails on start. Args: trial (Trial): Trial to be started. checkpoint (Checkpoint): A Python object or path storing the state of trial. """ self._commit_resources(trial.resources) try: self._start_trial(trial, checkpoint) except Exception as e: logger.exception("Error starting runner for Trial %s", str(trial)) error_msg = traceback.format_exc() time.sleep(2) self._stop_trial(trial, error=True, error_msg=error_msg) if isinstance(e, AbortTrialExecution): return # don't retry fatal Tune errors try: # This forces the trial to not start from checkpoint. trial.clear_checkpoint() logger.info( "Trying to start runner for Trial %s without checkpoint.", str(trial)) self._start_trial(trial) except Exception: logger.exception( "Error starting runner for Trial %s, aborting!", str(trial)) error_msg = traceback.format_exc() self._stop_trial(trial, error=True, error_msg=error_msg)
python
def start_trial(self, trial, checkpoint=None): """Starts the trial. Will not return resources if trial repeatedly fails on start. Args: trial (Trial): Trial to be started. checkpoint (Checkpoint): A Python object or path storing the state of trial. """ self._commit_resources(trial.resources) try: self._start_trial(trial, checkpoint) except Exception as e: logger.exception("Error starting runner for Trial %s", str(trial)) error_msg = traceback.format_exc() time.sleep(2) self._stop_trial(trial, error=True, error_msg=error_msg) if isinstance(e, AbortTrialExecution): return # don't retry fatal Tune errors try: # This forces the trial to not start from checkpoint. trial.clear_checkpoint() logger.info( "Trying to start runner for Trial %s without checkpoint.", str(trial)) self._start_trial(trial) except Exception: logger.exception( "Error starting runner for Trial %s, aborting!", str(trial)) error_msg = traceback.format_exc() self._stop_trial(trial, error=True, error_msg=error_msg)
[ "def", "start_trial", "(", "self", ",", "trial", ",", "checkpoint", "=", "None", ")", ":", "self", ".", "_commit_resources", "(", "trial", ".", "resources", ")", "try", ":", "self", ".", "_start_trial", "(", "trial", ",", "checkpoint", ")", "except", "Exception", "as", "e", ":", "logger", ".", "exception", "(", "\"Error starting runner for Trial %s\"", ",", "str", "(", "trial", ")", ")", "error_msg", "=", "traceback", ".", "format_exc", "(", ")", "time", ".", "sleep", "(", "2", ")", "self", ".", "_stop_trial", "(", "trial", ",", "error", "=", "True", ",", "error_msg", "=", "error_msg", ")", "if", "isinstance", "(", "e", ",", "AbortTrialExecution", ")", ":", "return", "# don't retry fatal Tune errors", "try", ":", "# This forces the trial to not start from checkpoint.", "trial", ".", "clear_checkpoint", "(", ")", "logger", ".", "info", "(", "\"Trying to start runner for Trial %s without checkpoint.\"", ",", "str", "(", "trial", ")", ")", "self", ".", "_start_trial", "(", "trial", ")", "except", "Exception", ":", "logger", ".", "exception", "(", "\"Error starting runner for Trial %s, aborting!\"", ",", "str", "(", "trial", ")", ")", "error_msg", "=", "traceback", ".", "format_exc", "(", ")", "self", ".", "_stop_trial", "(", "trial", ",", "error", "=", "True", ",", "error_msg", "=", "error_msg", ")" ]
Starts the trial. Will not return resources if trial repeatedly fails on start. Args: trial (Trial): Trial to be started. checkpoint (Checkpoint): A Python object or path storing the state of trial.
[ "Starts", "the", "trial", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/tune/ray_trial_executor.py#L188-L221
train
Starts the trial.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ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6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(570 - 522) + chr(0b10111 + 0o130) + '\062' + chr(0b101111 + 0o1), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x32' + '\x37' + chr(0b100000 + 0o22), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b110010 + 0o75) + '\x33' + '\x36' + '\x31', 26079 - 26071), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b101111 + 0o4), 0o10), ehT0Px3KOsy9(chr(1849 - 1801) + '\x6f' + '\067' + chr(0b100011 + 0o23), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + '\062' + chr(1115 - 1060), 0b1000), ehT0Px3KOsy9('\060' + chr(7898 - 7787) + chr(2302 - 2252) + chr(0b110100) + '\062', 0o10), ehT0Px3KOsy9('\x30' + chr(11245 - 11134) + '\063' + '\066', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(650 - 539) + chr(0b110001) + chr(0b10100 + 0o34) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x31' + '\060' + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(1530 - 1482) + chr(111) + chr(0b110011) + chr(53) + chr(54), 31791 - 31783), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(2129 - 2076) + chr(0b1 + 0o61), ord("\x08")), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(2440 - 2329) + chr(2188 - 2139) + chr(50) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(5790 - 5679) + '\x33' + chr(780 - 727) + chr(52), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(50) + chr(0b110111) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(2114 - 2066) + '\157' + chr(0b110001) + chr(0b110010) + '\064', 57032 - 57024), ehT0Px3KOsy9(chr(48) + chr(0b101001 + 0o106) + chr(1937 - 1888) + '\066' + chr(1617 - 1563), ord("\x08")), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(0b1101111) + chr(0b11000 + 0o33) + chr(54) + '\063', ord("\x08")), ehT0Px3KOsy9(chr(0b110 + 0o52) + '\157' + chr(0b10100 + 0o35) + chr(1900 - 1851) + chr(49), 30938 - 30930), ehT0Px3KOsy9(chr(945 - 897) + chr(111) + chr(113 - 63) + chr(1190 - 1139) + '\x35', 0b1000), ehT0Px3KOsy9(chr(1599 - 1551) + '\157' + '\x32' + chr(0b101110 + 0o10) + '\064', 0b1000), ehT0Px3KOsy9(chr(2249 - 2201) + chr(111) + chr(0b1000 + 0o52) + chr(0b110011), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(50) + '\x32' + chr(0b100011 + 0o15), 40286 - 40278), ehT0Px3KOsy9(chr(1356 - 1308) + chr(10313 - 10202) + chr(49) + chr(53) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(48) + chr(4764 - 4653) + chr(51) + chr(55) + chr(0b10010 + 0o44), 0o10), ehT0Px3KOsy9(chr(2297 - 2249) + '\157' + chr(0b110010) + '\x33' + chr(0b1100 + 0o50), 11151 - 11143), ehT0Px3KOsy9(chr(1247 - 1199) + chr(0b100010 + 0o115) + chr(1438 - 1387) + chr(54), 8), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110000 + 0o2) + chr(1170 - 1119) + chr(0b1101 + 0o45), 12182 - 12174), ehT0Px3KOsy9(chr(2237 - 2189) + chr(7823 - 7712) + chr(55) + chr(0b110100), 21173 - 21165), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b101110 + 0o3) + '\x34' + chr(0b110000 + 0o3), 0o10), ehT0Px3KOsy9(chr(0b100000 + 0o20) + '\157' + chr(0b110111) + '\060', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b10 + 0o155) + chr(53) + chr(203 - 148), 5008 - 5000), ehT0Px3KOsy9('\x30' + chr(398 - 287) + chr(49) + chr(50) + chr(0b110000), 50179 - 50171), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b100110 + 0o14) + '\x34' + '\062', 8), ehT0Px3KOsy9(chr(0b101011 + 0o5) + chr(0b1000010 + 0o55) + '\064' + chr(0b101010 + 0o10), 0b1000), ehT0Px3KOsy9(chr(0b10 + 0o56) + chr(0b1101111) + chr(0b110001) + chr(0b110010) + chr(442 - 393), 0o10), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(2737 - 2626) + chr(0b100100 + 0o17) + chr(0b101101 + 0o6) + '\x37', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(240 - 189) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110100) + chr(0b1 + 0o64), 0b1000), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(0b11011 + 0o124) + '\x33' + '\065' + chr(0b110010), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\065' + '\x30', ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'>'), chr(1262 - 1162) + '\145' + chr(99) + chr(0b1101001 + 0o6) + chr(0b100000 + 0o104) + '\145')('\x75' + chr(12394 - 12278) + '\146' + chr(0b1011 + 0o42) + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def FuZzQcLsX26C(oVre8I6UXc3b, Alvsa0ue91Fo, DNoMzyusA3wb=None): xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'O\xd9\x9enS~\xd6A3"\x9dE"\x9e\xda1\x05'), '\x64' + chr(0b100111 + 0o76) + chr(0b100 + 0o137) + chr(111) + chr(0b110011 + 0o61) + '\145')(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + chr(211 - 166) + chr(56)))(xafqLlk3kkUe(Alvsa0ue91Fo, xafqLlk3kkUe(SXOLrMavuUCe(b'j\x8e\xa9p\x07O\xcaZ# \xde\x1a'), '\x64' + '\145' + chr(0b1100011) + chr(8586 - 8475) + chr(2559 - 2459) + chr(4064 - 3963))(chr(0b1110101) + chr(3980 - 3864) + chr(102) + '\055' + chr(0b111000)))) try: xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'O\xc9\x85bLc\xfdj3.\x8fF'), chr(100) + chr(0b1100101) + '\x63' + chr(0b1101111) + '\x64' + chr(3697 - 3596))(chr(117) + '\x74' + chr(9614 - 9512) + chr(0b101101) + chr(56)))(Alvsa0ue91Fo, DNoMzyusA3wb) except jLmadlzMdunT as GlnVAPeT6CUe: xafqLlk3kkUe(hdK8qOUhR6Or, xafqLlk3kkUe(SXOLrMavuUCe(b'u\xc2\x92fNc\xcbq/'), chr(0b110110 + 0o56) + chr(0b111001 + 0o54) + chr(0b1100011) + chr(7209 - 7098) + '\144' + chr(6641 - 6540))('\165' + chr(0b101101 + 0o107) + '\x66' + '\055' + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b"U\xc8\x83lL7\xd1j 5\x9aC9\x8b\x99&\x03\x9d'\xf8\xc63\xf6\x04\x8c\xbcJ\xe8U\x02T\x0fu\xd1"), '\x64' + chr(0b1011100 + 0o11) + chr(0b10 + 0o141) + chr(0b10101 + 0o132) + chr(0b1110 + 0o126) + chr(0b110001 + 0o64))('\165' + chr(0b1010001 + 0o43) + chr(6332 - 6230) + chr(0b10111 + 0o26) + chr(0b111000)), M8_cKLkHVB2V(Alvsa0ue91Fo)) foIYxeNLXJsf = CiXxQDnt84wa.format_exc() xafqLlk3kkUe(ltvhPP4VhXre, xafqLlk3kkUe(SXOLrMavuUCe(b'c\xd6\x94fN'), chr(5845 - 5745) + '\145' + chr(0b1100011) + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))('\165' + '\164' + '\x66' + '\x2d' + chr(0b110010 + 0o6)))(ehT0Px3KOsy9(chr(0b11001 + 0o27) + '\x6f' + chr(0b110010), ord("\x08"))) xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'O\xc9\x85lNH\xd6l(&\x82'), '\x64' + chr(101) + chr(2753 - 2654) + '\157' + chr(0b1100100) + chr(101))(chr(117) + chr(116) + chr(0b11111 + 0o107) + chr(257 - 212) + '\070'))(Alvsa0ue91Fo, error=ehT0Px3KOsy9(chr(133 - 85) + chr(7416 - 7305) + '\x31', ord("\x08")), error_msg=foIYxeNLXJsf) if PlSM16l2KDPD(GlnVAPeT6CUe, cY7Zhlg0omaX): return try: xafqLlk3kkUe(Alvsa0ue91Fo, xafqLlk3kkUe(SXOLrMavuUCe(b's\xd6\x94bLH\xc1v$$\x85Z8\x85\xd7 '), '\x64' + chr(0b1100101 + 0o0) + chr(99) + '\x6f' + '\144' + chr(0b1100101))(chr(0b1101001 + 0o14) + chr(0b1100111 + 0o15) + '\146' + chr(0b101101 + 0o0) + '\070'))() xafqLlk3kkUe(hdK8qOUhR6Or, xafqLlk3kkUe(SXOLrMavuUCe(b'C\x8d\xb9{Kt\xc5)++\xb4A'), chr(0b1100100) + chr(0b1010010 + 0o23) + chr(0b10111 + 0o114) + chr(111) + '\x64' + chr(8334 - 8233))(chr(0b1101101 + 0o10) + chr(0b1110100) + chr(102) + chr(45) + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b"D\xc8\x88jPp\x82j.g\x9d^6\x9e\xcdt\x04\x86'\xf3\xd1a\xb0\r\x91\xee>\xceN\nYCp\x87Qq\xa8pQ\x82\x7f\xcf\x85#]\x7f\xc7}*7\x81C9\x98\x97"), '\144' + chr(3414 - 3313) + '\x63' + chr(0b1100110 + 0o11) + chr(3876 - 3776) + chr(0b1100000 + 0o5))('\x75' + '\x74' + '\146' + chr(0b1000 + 0o45) + chr(56)), M8_cKLkHVB2V(Alvsa0ue91Fo)) xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'O\xc9\x85bLc\xfdj3.\x8fF'), chr(100) + chr(0b111100 + 0o51) + chr(1897 - 1798) + chr(111) + chr(100) + chr(0b1100101))(chr(0b1110101) + chr(0b101011 + 0o111) + chr(0b1100110) + '\x2d' + '\x38'))(Alvsa0ue91Fo) except jLmadlzMdunT: xafqLlk3kkUe(hdK8qOUhR6Or, xafqLlk3kkUe(SXOLrMavuUCe(b'u\xc2\x92fNc\xcbq/'), '\x64' + chr(0b1100101) + chr(3802 - 3703) + chr(6988 - 6877) + chr(0b1100100) + '\x65')('\x75' + chr(0b1110100) + chr(102) + chr(929 - 884) + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b"U\xc8\x83lL7\xd1j 5\x9aC9\x8b\x99&\x03\x9d'\xf8\xc63\xf6\x04\x8c\xbcJ\xe8U\x02T\x0fu\xd1\x0eq\xbe{J\x98d\xd3\x9fd\x1f"), chr(0b1100100) + chr(0b1100101) + '\x63' + chr(0b1101111) + chr(877 - 777) + chr(2420 - 2319))(chr(0b1110101) + chr(6329 - 6213) + '\146' + chr(251 - 206) + chr(0b11111 + 0o31)), M8_cKLkHVB2V(Alvsa0ue91Fo)) foIYxeNLXJsf = CiXxQDnt84wa.format_exc() xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'O\xc9\x85lNH\xd6l(&\x82'), chr(100) + '\145' + chr(7694 - 7595) + '\157' + chr(0b1100100) + '\x65')('\x75' + chr(0b1110100) + chr(2766 - 2664) + chr(1762 - 1717) + '\070'))(Alvsa0ue91Fo, error=ehT0Px3KOsy9('\060' + '\x6f' + chr(49), 8), error_msg=foIYxeNLXJsf)
ray-project/ray
python/ray/tune/ray_trial_executor.py
RayTrialExecutor.stop_trial
def stop_trial(self, trial, error=False, error_msg=None, stop_logger=True): """Only returns resources if resources allocated.""" prior_status = trial.status self._stop_trial( trial, error=error, error_msg=error_msg, stop_logger=stop_logger) if prior_status == Trial.RUNNING: logger.debug("Returning resources for Trial %s.", str(trial)) self._return_resources(trial.resources) out = self._find_item(self._running, trial) for result_id in out: self._running.pop(result_id)
python
def stop_trial(self, trial, error=False, error_msg=None, stop_logger=True): """Only returns resources if resources allocated.""" prior_status = trial.status self._stop_trial( trial, error=error, error_msg=error_msg, stop_logger=stop_logger) if prior_status == Trial.RUNNING: logger.debug("Returning resources for Trial %s.", str(trial)) self._return_resources(trial.resources) out = self._find_item(self._running, trial) for result_id in out: self._running.pop(result_id)
[ "def", "stop_trial", "(", "self", ",", "trial", ",", "error", "=", "False", ",", "error_msg", "=", "None", ",", "stop_logger", "=", "True", ")", ":", "prior_status", "=", "trial", ".", "status", "self", ".", "_stop_trial", "(", "trial", ",", "error", "=", "error", ",", "error_msg", "=", "error_msg", ",", "stop_logger", "=", "stop_logger", ")", "if", "prior_status", "==", "Trial", ".", "RUNNING", ":", "logger", ".", "debug", "(", "\"Returning resources for Trial %s.\"", ",", "str", "(", "trial", ")", ")", "self", ".", "_return_resources", "(", "trial", ".", "resources", ")", "out", "=", "self", ".", "_find_item", "(", "self", ".", "_running", ",", "trial", ")", "for", "result_id", "in", "out", ":", "self", ".", "_running", ".", "pop", "(", "result_id", ")" ]
Only returns resources if resources allocated.
[ "Only", "returns", "resources", "if", "resources", "allocated", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/tune/ray_trial_executor.py#L229-L239
train
Stop the trial.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPvpP4xdo3,cW7yQuyEnJ6E,KOHQGQ8qLDWm,NE1Yam2HHroQ,ygAzbDzrvRMh,SBRjvOU1ufVC,hOkXjmluKZfJ,q1QCh3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V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\060' + chr(111) + chr(0b11101 + 0o26) + chr(0b11101 + 0o26) + '\062', 18051 - 18043), ehT0Px3KOsy9('\x30' + chr(11622 - 11511) + chr(171 - 120) + chr(51) + chr(0b0 + 0o62), 8), ehT0Px3KOsy9('\060' + chr(111) + chr(0b101101 + 0o4) + chr(0b101011 + 0o14) + chr(1332 - 1282), 57835 - 57827), ehT0Px3KOsy9('\060' + chr(10860 - 10749) + chr(0b110100) + chr(0b11001 + 0o31), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(50) + chr(900 - 846) + chr(888 - 833), 0b1000), ehT0Px3KOsy9(chr(1267 - 1219) + chr(0b100111 + 0o110) + '\x33' + chr(48) + '\x36', 362 - 354), ehT0Px3KOsy9(chr(0b110 + 0o52) + '\x6f' + '\062' + chr(0b1011 + 0o53) + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(0b110000 + 0o0) + '\157' + chr(0b110010) + chr(1865 - 1814) + chr(0b10101 + 0o42), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b101010 + 0o11) + chr(50) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(0b101011 + 0o104) + chr(0b11010 + 0o34) + chr(464 - 413), ord("\x08")), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(111) + chr(0b10010 + 0o43) + chr(1180 - 1129), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b111000 + 0o67) + chr(0b100100 + 0o16) + chr(48) + chr(51), 0b1000), ehT0Px3KOsy9(chr(0b101010 + 0o6) + '\157' + '\061' + '\067', 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(70 - 21) + chr(0b11001 + 0o30) + chr(0b110100), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110001) + chr(1072 - 1020) + chr(1818 - 1768), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(446 - 396) + '\x34' + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(1566 - 1518) + chr(0b1101111) + '\063' + chr(0b110010) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(0b101010 + 0o6) + '\157' + '\x32' + chr(0b110101) + '\063', 0o10), ehT0Px3KOsy9('\x30' + chr(5638 - 5527) + chr(0b10101 + 0o35) + '\060' + '\066', 51674 - 51666), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b100110 + 0o13) + chr(2017 - 1967) + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(277 - 229) + chr(0b1000100 + 0o53) + chr(50) + '\x33' + '\x35', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b11011 + 0o26) + chr(55) + '\064', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110110 + 0o1) + chr(1088 - 1035), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1011010 + 0o25) + '\063' + chr(48) + chr(1127 - 1074), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b101101 + 0o10) + chr(54), ord("\x08")), ehT0Px3KOsy9('\060' + chr(10294 - 10183) + chr(54) + '\061', 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(973 - 923) + '\x36' + chr(0b101011 + 0o13), 0b1000), ehT0Px3KOsy9(chr(1940 - 1892) + '\x6f' + '\066' + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110010) + chr(795 - 744) + '\065', 8), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(0b100010 + 0o115) + chr(0b110001 + 0o0) + chr(1314 - 1263) + '\066', 10261 - 10253), ehT0Px3KOsy9(chr(0b1100 + 0o44) + chr(0b1101111) + chr(0b110001) + chr(115 - 62), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(126 - 77) + chr(54), 19808 - 19800), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b101110 + 0o4) + chr(0b110001) + chr(49), 50388 - 50380), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(2373 - 2322) + chr(2437 - 2382) + chr(0b110 + 0o54), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(2717 - 2664) + chr(49), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110011) + chr(1527 - 1473), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b11000 + 0o33) + chr(0b110011) + '\x35', 23662 - 23654), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(111) + chr(0b1000 + 0o51) + chr(0b110010) + chr(52), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1010100 + 0o33) + chr(0b1010 + 0o47) + '\x30' + '\060', 63890 - 63882), ehT0Px3KOsy9(chr(48) + chr(11178 - 11067) + '\x32' + chr(0b110 + 0o61) + '\x37', ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + '\x6f' + chr(53) + chr(0b111 + 0o51), 21654 - 21646)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xf4'), chr(0b110000 + 0o64) + chr(0b100100 + 0o101) + chr(0b1011001 + 0o12) + '\x6f' + chr(0b1100100) + '\x65')('\165' + chr(116) + '\x66' + '\055' + chr(1071 - 1015)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def nhFEgA2aANBM(oVre8I6UXc3b, Alvsa0ue91Fo, EUdPatOS1wx0=ehT0Px3KOsy9(chr(48) + chr(10278 - 10167) + '\x30', ord("\x08")), foIYxeNLXJsf=None, NXdFzJf1_8tO=ehT0Px3KOsy9(chr(0b110000) + chr(3080 - 2969) + '\061', ord("\x08"))): hMFhAt5xrO2C = Alvsa0ue91Fo.vBsMWH4gAEfy xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x85\xa9\x0eM\xc7\x99\xc6\xed\xb8RG'), chr(0b1100100) + chr(0b1100101) + '\143' + chr(0b1101111) + chr(0b1011000 + 0o14) + chr(101))('\165' + chr(0b1110100) + chr(4148 - 4046) + chr(1558 - 1513) + chr(56)))(Alvsa0ue91Fo, error=EUdPatOS1wx0, error_msg=foIYxeNLXJsf, stop_logger=NXdFzJf1_8tO) if hMFhAt5xrO2C == xafqLlk3kkUe(bKgNCjeVNupv, xafqLlk3kkUe(SXOLrMavuUCe(b'\x88\x8f4l\xfe\x88\xf5'), chr(9987 - 9887) + chr(8844 - 8743) + chr(0b1100011) + chr(10138 - 10027) + '\144' + '\x65')(chr(0b1110101) + '\164' + '\146' + '\x2d' + chr(56))): xafqLlk3kkUe(hdK8qOUhR6Or, xafqLlk3kkUe(SXOLrMavuUCe(b'\xbe\xbf\x18W\xd0'), '\144' + chr(0b1010001 + 0o24) + '\x63' + '\x6f' + chr(0b1100100) + '\x65')(chr(117) + '\164' + chr(102) + '\x2d' + chr(1859 - 1803)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x88\xbf\x0eW\xc5\xa8\xdb\xf1\xb6\x13Y\xe6|#\x17\xd3\xb3\xce\xf5p\xfb\x13O\xe5zC\xdfT\xf1~(}\xa7'), chr(100) + '\x65' + chr(0b1010110 + 0o15) + chr(0b1101111) + chr(100) + chr(8380 - 8279))('\x75' + chr(0b101110 + 0o106) + chr(8150 - 8048) + chr(45) + '\x38'), M8_cKLkHVB2V(Alvsa0ue91Fo)) xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x85\xa8\x1fV\xc2\xb4\xdc\xc0\xa3VX\xecz>\x01\xc4\xa3'), chr(100) + chr(0b1100101) + chr(99) + chr(111) + '\x64' + chr(8815 - 8714))(chr(0b100101 + 0o120) + chr(0b101 + 0o157) + chr(102) + chr(0b101101) + '\070'))(xafqLlk3kkUe(Alvsa0ue91Fo, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa0\xee"Q\x8e\x9e\xda\xdb\xb3T\x1b\xb3'), chr(4992 - 4892) + chr(0b1100101) + chr(0b1000011 + 0o40) + chr(0b1011100 + 0o23) + chr(100) + '\145')(chr(117) + '\x74' + chr(0b10101 + 0o121) + chr(782 - 737) + chr(1922 - 1866)))) UkrMp_I0RDmo = oVre8I6UXc3b._find_item(oVre8I6UXc3b.aMgitVEm90gq, Alvsa0ue91Fo) for CateS_6IZir6 in UkrMp_I0RDmo: xafqLlk3kkUe(oVre8I6UXc3b._running, xafqLlk3kkUe(SXOLrMavuUCe(b'\xaa\xb5\n'), '\144' + chr(0b1100101) + chr(0b100001 + 0o102) + '\x6f' + chr(0b1011101 + 0o7) + chr(0b1011011 + 0o12))(chr(0b1001101 + 0o50) + chr(4979 - 4863) + '\146' + chr(45) + '\070'))(CateS_6IZir6)
ray-project/ray
python/ray/tune/ray_trial_executor.py
RayTrialExecutor.pause_trial
def pause_trial(self, trial): """Pauses the trial. If trial is in-flight, preserves return value in separate queue before pausing, which is restored when Trial is resumed. """ trial_future = self._find_item(self._running, trial) if trial_future: self._paused[trial_future[0]] = trial super(RayTrialExecutor, self).pause_trial(trial)
python
def pause_trial(self, trial): """Pauses the trial. If trial is in-flight, preserves return value in separate queue before pausing, which is restored when Trial is resumed. """ trial_future = self._find_item(self._running, trial) if trial_future: self._paused[trial_future[0]] = trial super(RayTrialExecutor, self).pause_trial(trial)
[ "def", "pause_trial", "(", "self", ",", "trial", ")", ":", "trial_future", "=", "self", ".", "_find_item", "(", "self", ".", "_running", ",", "trial", ")", "if", "trial_future", ":", "self", ".", "_paused", "[", "trial_future", "[", "0", "]", "]", "=", "trial", "super", "(", "RayTrialExecutor", ",", "self", ")", ".", "pause_trial", "(", "trial", ")" ]
Pauses the trial. If trial is in-flight, preserves return value in separate queue before pausing, which is restored when Trial is resumed.
[ "Pauses", "the", "trial", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/tune/ray_trial_executor.py#L246-L256
train
Pauses the trial.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPvpP4xdo3,cW7yQuyEnJ6E,KOHQGQ8qLDWm,NE1Yam2HHroQ,ygAzbDzrvRMh,SBRjvOU1ufVC,hOkXjmluKZfJ,q1QCh3W88sgk,TLbJ60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,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(80 - 32) + chr(0b1101111) + '\x31' + chr(55) + chr(0b0 + 0o65), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110001) + chr(79 - 30) + chr(1050 - 1001), 0b1000), ehT0Px3KOsy9(chr(48) + chr(2101 - 1990) + '\063' + '\x33' + chr(0b110010), 26922 - 26914), ehT0Px3KOsy9('\060' + chr(111) + '\063' + chr(0b100101 + 0o16) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110010) + '\x37' + '\x36', 18353 - 18345), ehT0Px3KOsy9(chr(1599 - 1551) + '\157' + chr(0b101011 + 0o10) + '\x35', 0b1000), ehT0Px3KOsy9(chr(0b100100 + 0o14) + chr(111) + chr(0b110010) + chr(2558 - 2503) + chr(0b11100 + 0o31), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(8539 - 8428) + '\062' + chr(52) + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(208 - 160) + '\x6f' + chr(358 - 307) + chr(0b110101) + '\x36', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1100111 + 0o10) + chr(2059 - 2010) + chr(2166 - 2117) + chr(0b1101 + 0o52), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110 + 0o54) + chr(54) + '\x33', 6468 - 6460), ehT0Px3KOsy9(chr(48) + chr(111) + '\x35' + '\x35', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\063' + chr(49) + '\062', 57089 - 57081), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(52) + '\x31', 61816 - 61808), ehT0Px3KOsy9(chr(749 - 701) + chr(9222 - 9111) + '\061' + chr(54) + '\061', 25511 - 25503), ehT0Px3KOsy9('\060' + chr(0b1101010 + 0o5) + chr(1940 - 1891) + chr(967 - 914) + chr(690 - 640), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(49) + '\067' + chr(386 - 331), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110010) + chr(52), 25609 - 25601), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(0b1001 + 0o146) + chr(51) + '\x35' + '\061', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110010) + '\x35' + chr(53), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(50) + '\x35' + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\062' + '\x35' + chr(668 - 613), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(2049 - 1997) + chr(52), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110011) + chr(55) + chr(51), 17290 - 17282), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(0b1000101 + 0o52) + chr(0b110001) + chr(1744 - 1691) + '\x30', ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(348 - 293) + chr(48), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(773 - 719) + chr(0b110000), 49053 - 49045), ehT0Px3KOsy9(chr(48) + '\157' + '\063' + chr(0b110001), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b10000 + 0o45) + chr(53), 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x33' + '\060' + '\065', 50784 - 50776), ehT0Px3KOsy9('\060' + chr(3932 - 3821) + '\063' + chr(0b100110 + 0o12) + chr(0b110111), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110011) + chr(0b110011) + '\065', 0o10), ehT0Px3KOsy9(chr(0b10011 + 0o35) + '\x6f' + '\062' + chr(0b110001 + 0o3) + '\062', 770 - 762), ehT0Px3KOsy9(chr(48) + chr(10848 - 10737) + chr(554 - 505) + '\061' + chr(49), 8), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\063' + chr(0b101111 + 0o2), 8), ehT0Px3KOsy9(chr(0b110000) + chr(12116 - 12005) + chr(896 - 846) + '\x35' + chr(201 - 149), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b10001 + 0o40) + chr(54) + chr(0b101111 + 0o7), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(11340 - 11229) + '\062' + chr(50) + chr(0b110000), 6276 - 6268), ehT0Px3KOsy9('\x30' + '\157' + chr(791 - 741) + '\063' + '\067', 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(1389 - 1339) + '\065' + '\x31', 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(313 - 265) + chr(7131 - 7020) + chr(1732 - 1679) + chr(0b110000), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'S'), chr(0b11111 + 0o105) + chr(7049 - 6948) + chr(0b111111 + 0o44) + chr(11478 - 11367) + chr(0b0 + 0o144) + chr(2932 - 2831))(chr(0b111 + 0o156) + chr(0b1110100) + chr(102) + chr(1549 - 1504) + chr(1822 - 1766)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def nxqr1eAItxw7(oVre8I6UXc3b, Alvsa0ue91Fo): dYUG7QZeuPal = oVre8I6UXc3b._find_item(oVre8I6UXc3b.aMgitVEm90gq, Alvsa0ue91Fo) if dYUG7QZeuPal: oVre8I6UXc3b.wNL7VJdv7RPe[dYUG7QZeuPal[ehT0Px3KOsy9(chr(0b10 + 0o56) + '\x6f' + '\x30', ord("\x08"))]] = Alvsa0ue91Fo xafqLlk3kkUe(KNx0Ujaz9UM0(piHsuzr4z7hH, oVre8I6UXc3b), xafqLlk3kkUe(SXOLrMavuUCe(b'\r(\xaf\xab\xdbB\xc9\xd5\x87.\xdf'), chr(7344 - 7244) + chr(0b1100101) + chr(0b1100011) + '\x6f' + chr(0b1110 + 0o126) + chr(0b1100101))(chr(117) + chr(8047 - 7931) + chr(0b1100110) + '\055' + chr(56)))(Alvsa0ue91Fo)
ray-project/ray
python/ray/tune/ray_trial_executor.py
RayTrialExecutor.reset_trial
def reset_trial(self, trial, new_config, new_experiment_tag): """Tries to invoke `Trainable.reset_config()` to reset trial. Args: trial (Trial): Trial to be reset. new_config (dict): New configuration for Trial trainable. new_experiment_tag (str): New experiment name for trial. Returns: True if `reset_config` is successful else False. """ trial.experiment_tag = new_experiment_tag trial.config = new_config trainable = trial.runner with warn_if_slow("reset_config"): reset_val = ray.get(trainable.reset_config.remote(new_config)) return reset_val
python
def reset_trial(self, trial, new_config, new_experiment_tag): """Tries to invoke `Trainable.reset_config()` to reset trial. Args: trial (Trial): Trial to be reset. new_config (dict): New configuration for Trial trainable. new_experiment_tag (str): New experiment name for trial. Returns: True if `reset_config` is successful else False. """ trial.experiment_tag = new_experiment_tag trial.config = new_config trainable = trial.runner with warn_if_slow("reset_config"): reset_val = ray.get(trainable.reset_config.remote(new_config)) return reset_val
[ "def", "reset_trial", "(", "self", ",", "trial", ",", "new_config", ",", "new_experiment_tag", ")", ":", "trial", ".", "experiment_tag", "=", "new_experiment_tag", "trial", ".", "config", "=", "new_config", "trainable", "=", "trial", ".", "runner", "with", "warn_if_slow", "(", "\"reset_config\"", ")", ":", "reset_val", "=", "ray", ".", "get", "(", "trainable", ".", "reset_config", ".", "remote", "(", "new_config", ")", ")", "return", "reset_val" ]
Tries to invoke `Trainable.reset_config()` to reset trial. Args: trial (Trial): Trial to be reset. new_config (dict): New configuration for Trial trainable. new_experiment_tag (str): New experiment name for trial. Returns: True if `reset_config` is successful else False.
[ "Tries", "to", "invoke", "Trainable", ".", "reset_config", "()", "to", "reset", "trial", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/tune/ray_trial_executor.py#L258-L276
train
Tries to reset the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uw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\060' + chr(0b111110 + 0o61) + '\x33' + '\x30' + '\064', 0b1000), ehT0Px3KOsy9(chr(530 - 482) + chr(2741 - 2630) + chr(0b100001 + 0o21) + '\063' + chr(1131 - 1079), 0b1000), ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(2210 - 2099) + chr(1639 - 1589) + chr(48) + '\x30', 0b1000), ehT0Px3KOsy9('\060' + chr(6346 - 6235) + '\063' + chr(1418 - 1370) + chr(0b100101 + 0o22), 0o10), ehT0Px3KOsy9(chr(1050 - 1002) + chr(111) + chr(823 - 774) + chr(1262 - 1210) + chr(48), 60252 - 60244), ehT0Px3KOsy9(chr(48) + chr(11812 - 11701) + chr(135 - 85) + chr(49) + '\062', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(50) + '\065' + '\x37', 50113 - 50105), ehT0Px3KOsy9('\060' + chr(9743 - 9632) + chr(0b11001 + 0o32) + '\065', 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + '\x33' + '\065' + '\x35', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(3218 - 3107) + chr(1756 - 1701), 30907 - 30899), ehT0Px3KOsy9(chr(0b111 + 0o51) + '\x6f' + chr(0b11100 + 0o26) + chr(1444 - 1394) + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(0b10110 + 0o32) + '\157' + '\x34' + '\067', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(8152 - 8041) + chr(0b100000 + 0o21) + chr(246 - 195) + '\060', ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110001) + '\060', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1100110 + 0o11) + chr(701 - 650) + '\x37' + '\x30', 0o10), ehT0Px3KOsy9(chr(0b11001 + 0o27) + chr(0b1101111) + '\061' + chr(1310 - 1257) + chr(50), 0o10), ehT0Px3KOsy9('\x30' + chr(5371 - 5260) + chr(50) + chr(0b100000 + 0o26) + chr(0b100011 + 0o20), 0o10), ehT0Px3KOsy9(chr(1346 - 1298) + chr(0b1010101 + 0o32) + chr(541 - 488) + '\064', 12165 - 12157), ehT0Px3KOsy9(chr(0b110000) + chr(11356 - 11245) + chr(0b100001 + 0o22) + chr(0b11111 + 0o26) + '\064', 0o10), ehT0Px3KOsy9(chr(1909 - 1861) + chr(2528 - 2417) + '\063' + chr(0b100110 + 0o12) + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\062' + chr(1650 - 1597), 58136 - 58128), ehT0Px3KOsy9('\060' + chr(0b11101 + 0o122) + '\x32' + '\x37' + chr(0b110110), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + '\061' + chr(793 - 745) + '\062', 0b1000), ehT0Px3KOsy9('\060' + '\157' + '\066' + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(0b10 + 0o56) + '\x6f' + chr(0b110011) + '\x34' + chr(55), 0o10), ehT0Px3KOsy9(chr(0b101110 + 0o2) + chr(4673 - 4562) + chr(0b110110) + chr(0b110011), 58241 - 58233), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b100100 + 0o16) + '\x32' + '\067', 0b1000), ehT0Px3KOsy9('\060' + chr(10996 - 10885) + '\x31' + chr(53) + chr(1348 - 1293), 0o10), ehT0Px3KOsy9(chr(1480 - 1432) + chr(9357 - 9246) + chr(1853 - 1802) + chr(0b10100 + 0o40), 688 - 680), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x36' + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(966 - 918) + chr(0b1101111) + chr(0b10101 + 0o35) + '\x34' + '\x35', 0o10), ehT0Px3KOsy9('\060' + chr(0b1011011 + 0o24) + chr(0b11000 + 0o35) + '\x36', 58990 - 58982), ehT0Px3KOsy9('\x30' + chr(7998 - 7887) + chr(51) + chr(2204 - 2150) + chr(0b110000 + 0o3), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b111000 + 0o67) + chr(0b111 + 0o54) + '\x36' + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(51) + chr(0b110110) + chr(504 - 452), 22951 - 22943), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\063' + '\x34' + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(0b110000 + 0o0) + '\157' + chr(49) + '\062' + '\060', 0b1000), ehT0Px3KOsy9('\x30' + '\157' + '\062' + '\x31' + chr(0b100100 + 0o20), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\062' + '\x33' + '\064', 8), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b100010 + 0o17) + chr(1816 - 1763) + chr(0b101111 + 0o1), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110101) + '\x30', 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xea'), chr(0b101111 + 0o65) + chr(0b111100 + 0o51) + '\143' + chr(111) + '\144' + '\145')(chr(0b1001011 + 0o52) + chr(12909 - 12793) + chr(0b1000000 + 0o46) + chr(0b1011 + 0o42) + chr(1391 - 1335)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def ihmAf7p5LQCq(oVre8I6UXc3b, Alvsa0ue91Fo, iEDT2eHAKfSK, GO3V1buq1vOa): Alvsa0ue91Fo.yXhJ85CUhxzl = GO3V1buq1vOa Alvsa0ue91Fo.jAj7S20Ct06o = iEDT2eHAKfSK blO62vIs9J6u = Alvsa0ue91Fo.tFE9_yPvqrzD with IhLRCTt_Dmej(xafqLlk3kkUe(SXOLrMavuUCe(b'\xb6\xf9\xf3\xa2\x14\xd5\xccr\x83a\xff@'), '\144' + chr(0b10010 + 0o123) + '\143' + '\157' + chr(0b1100000 + 0o4) + chr(101))(chr(0b1110101) + '\164' + chr(102) + '\055' + chr(0b111000))): ztJUR459H3wn = H9zaXRrGK6Cq.get(blO62vIs9J6u.reset_config.remote(iEDT2eHAKfSK)) return ztJUR459H3wn
ray-project/ray
python/ray/tune/ray_trial_executor.py
RayTrialExecutor.fetch_result
def fetch_result(self, trial): """Fetches one result of the running trials. Returns: Result of the most recent trial training run.""" trial_future = self._find_item(self._running, trial) if not trial_future: raise ValueError("Trial was not running.") self._running.pop(trial_future[0]) with warn_if_slow("fetch_result"): result = ray.get(trial_future[0]) # For local mode if isinstance(result, _LocalWrapper): result = result.unwrap() return result
python
def fetch_result(self, trial): """Fetches one result of the running trials. Returns: Result of the most recent trial training run.""" trial_future = self._find_item(self._running, trial) if not trial_future: raise ValueError("Trial was not running.") self._running.pop(trial_future[0]) with warn_if_slow("fetch_result"): result = ray.get(trial_future[0]) # For local mode if isinstance(result, _LocalWrapper): result = result.unwrap() return result
[ "def", "fetch_result", "(", "self", ",", "trial", ")", ":", "trial_future", "=", "self", ".", "_find_item", "(", "self", ".", "_running", ",", "trial", ")", "if", "not", "trial_future", ":", "raise", "ValueError", "(", "\"Trial was not running.\"", ")", "self", ".", "_running", ".", "pop", "(", "trial_future", "[", "0", "]", ")", "with", "warn_if_slow", "(", "\"fetch_result\"", ")", ":", "result", "=", "ray", ".", "get", "(", "trial_future", "[", "0", "]", ")", "# For local mode", "if", "isinstance", "(", "result", ",", "_LocalWrapper", ")", ":", "result", "=", "result", ".", "unwrap", "(", ")", "return", "result" ]
Fetches one result of the running trials. Returns: Result of the most recent trial training run.
[ "Fetches", "one", "result", "of", "the", "running", "trials", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/tune/ray_trial_executor.py#L305-L320
train
Fetches one result of the running trials. Returns a Result of the most recent trial training run.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S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VJsrp8,tzcpInYwBvYW,iDQ_gSK8V7h0,Rurm1zTRfSmY,reqGiMiVQ77y,bsS9P6_LpdIe,sbGAZlkZOtyh,Cf_Qef15s3_F,eX02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\060' + chr(8506 - 8395) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9('\060' + chr(1743 - 1632) + '\x32' + chr(0b100011 + 0o24) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(51) + chr(0b110101) + '\x36', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110001) + chr(49) + chr(50), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(2089 - 2039) + chr(48) + chr(670 - 615), 22822 - 22814), ehT0Px3KOsy9(chr(0b110000 + 0o0) + '\157' + chr(622 - 571) + chr(0b11000 + 0o32) + chr(0b11001 + 0o27), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b111 + 0o52), 50869 - 50861), ehT0Px3KOsy9('\x30' + '\157' + chr(0b101010 + 0o7) + chr(0b101111 + 0o4) + chr(495 - 447), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(4771 - 4660) + chr(610 - 555) + '\064', 0o10), ehT0Px3KOsy9('\x30' + chr(4009 - 3898) + chr(0b101011 + 0o10) + '\x34' + chr(53), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101101 + 0o2) + '\x32' + chr(50) + chr(51), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x32' + chr(0b101111 + 0o10), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(3022 - 2967) + chr(1679 - 1629), 40262 - 40254), ehT0Px3KOsy9(chr(2005 - 1957) + chr(111) + chr(51) + chr(48) + chr(319 - 265), ord("\x08")), ehT0Px3KOsy9('\060' + chr(762 - 651) + '\x33' + chr(0b110110) + chr(0b110011), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(0b10100 + 0o37) + '\060' + '\x30', 49835 - 49827), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(111) + chr(0b110010) + '\063' + chr(0b110110 + 0o1), 3999 - 3991), ehT0Px3KOsy9('\060' + '\x6f' + chr(51) + '\061' + '\062', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(50) + '\066' + chr(0b10111 + 0o37), 0b1000), ehT0Px3KOsy9(chr(2175 - 2127) + '\157' + chr(50) + '\x35' + chr(0b110010), 22727 - 22719), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(0b1101111) + '\061' + chr(52) + '\x34', 0b1000), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(111) + chr(64 - 14) + chr(0b110010) + chr(1332 - 1283), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1000111 + 0o50) + chr(0b110111) + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(0b101100 + 0o4) + '\157' + '\x32' + chr(0b110110) + chr(0b1000 + 0o57), 52096 - 52088), ehT0Px3KOsy9(chr(0b100010 + 0o16) + '\157' + '\x32' + chr(0b110111) + chr(49), 0o10), ehT0Px3KOsy9(chr(1764 - 1716) + '\x6f' + chr(0b11011 + 0o26) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(633 - 585) + chr(111) + chr(1247 - 1198) + chr(0b110111) + chr(49), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\064' + '\064', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b101101 + 0o5) + chr(2149 - 2098) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(490 - 442) + chr(111) + '\061' + '\064', 62757 - 62749), ehT0Px3KOsy9(chr(1194 - 1146) + '\157' + chr(0b110011) + chr(54) + '\063', 8), ehT0Px3KOsy9(chr(48) + chr(111) + '\062' + chr(54) + chr(79 - 29), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(2576 - 2524) + '\x35', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(1072 - 1022) + chr(0b101101 + 0o11) + '\x31', 19451 - 19443), ehT0Px3KOsy9(chr(0b100001 + 0o17) + chr(0b1101111) + chr(0b1101 + 0o44) + chr(0b110001), 8), ehT0Px3KOsy9('\060' + chr(0b1001 + 0o146) + chr(857 - 806) + chr(0b110010) + chr(0b11000 + 0o35), 54761 - 54753), ehT0Px3KOsy9('\060' + chr(586 - 475) + chr(0b110011) + '\066' + '\067', 0o10), ehT0Px3KOsy9('\x30' + chr(0b100110 + 0o111) + chr(49) + chr(52) + chr(916 - 868), ord("\x08")), ehT0Px3KOsy9(chr(925 - 877) + '\157' + '\062' + chr(2545 - 2492), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b101110 + 0o4) + chr(49) + chr(0b101100 + 0o6), 27922 - 27914)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(0b11010 + 0o125) + chr(53) + chr(0b110000), 7487 - 7479)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'-'), chr(100) + '\145' + chr(4302 - 4203) + '\157' + '\x64' + '\x65')(chr(0b11111 + 0o126) + chr(6011 - 5895) + chr(0b1100110) + chr(253 - 208) + chr(0b101000 + 0o20)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def nOUpOIyWx6Wl(oVre8I6UXc3b, Alvsa0ue91Fo): dYUG7QZeuPal = oVre8I6UXc3b._find_item(oVre8I6UXc3b.aMgitVEm90gq, Alvsa0ue91Fo) if not dYUG7QZeuPal: raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b'W\xca\x87+\xeb\xf0v9O\xc5\xfdxN\xe6\x81\xb5\xf1\xa4\xdf\xc4\x03\xbf'), chr(100) + '\x65' + chr(0b10001 + 0o122) + chr(0b1101111) + chr(100) + chr(0b1100101))(chr(117) + '\x74' + chr(0b100010 + 0o104) + chr(0b101101) + chr(0b110001 + 0o7))) xafqLlk3kkUe(oVre8I6UXc3b._running, xafqLlk3kkUe(SXOLrMavuUCe(b's\xd7\x9e'), '\x64' + '\145' + chr(5161 - 5062) + chr(0b1101111) + chr(4298 - 4198) + chr(101))('\x75' + '\x74' + chr(0b1100110) + '\055' + chr(0b110000 + 0o10)))(dYUG7QZeuPal[ehT0Px3KOsy9(chr(0b110000) + chr(4570 - 4459) + chr(0b110000), ord("\x08"))]) with IhLRCTt_Dmej(xafqLlk3kkUe(SXOLrMavuUCe(b'e\xdd\x9a)\xef\x8fs=O\x90\xffc'), '\144' + '\145' + chr(0b1100011) + chr(111) + chr(0b1100100) + '\145')(chr(0b1110101) + chr(8912 - 8796) + chr(3238 - 3136) + chr(802 - 757) + chr(3080 - 3024))): ShZmEKfTkAOZ = H9zaXRrGK6Cq.get(dYUG7QZeuPal[ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\060', 8)]) if PlSM16l2KDPD(ShZmEKfTkAOZ, p1GX2CfCciVa): ShZmEKfTkAOZ = ShZmEKfTkAOZ.unwrap() return ShZmEKfTkAOZ
ray-project/ray
python/ray/tune/ray_trial_executor.py
RayTrialExecutor.has_resources
def has_resources(self, resources): """Returns whether this runner has at least the specified resources. This refreshes the Ray cluster resources if the time since last update has exceeded self._refresh_period. This also assumes that the cluster is not resizing very frequently. """ if time.time() - self._last_resource_refresh > self._refresh_period: self._update_avail_resources() currently_available = Resources.subtract(self._avail_resources, self._committed_resources) have_space = ( resources.cpu_total() <= currently_available.cpu and resources.gpu_total() <= currently_available.gpu and all( resources.get_res_total(res) <= currently_available.get(res) for res in resources.custom_resources)) if have_space: return True can_overcommit = self._queue_trials if (resources.cpu_total() > 0 and currently_available.cpu <= 0) or \ (resources.gpu_total() > 0 and currently_available.gpu <= 0) or \ any((resources.get_res_total(res_name) > 0 and currently_available.get(res_name) <= 0) for res_name in resources.custom_resources): can_overcommit = False # requested resource is already saturated if can_overcommit: logger.warning( "Allowing trial to start even though the " "cluster does not have enough free resources. Trial actors " "may appear to hang until enough resources are added to the " "cluster (e.g., via autoscaling). You can disable this " "behavior by specifying `queue_trials=False` in " "ray.tune.run().") return True return False
python
def has_resources(self, resources): """Returns whether this runner has at least the specified resources. This refreshes the Ray cluster resources if the time since last update has exceeded self._refresh_period. This also assumes that the cluster is not resizing very frequently. """ if time.time() - self._last_resource_refresh > self._refresh_period: self._update_avail_resources() currently_available = Resources.subtract(self._avail_resources, self._committed_resources) have_space = ( resources.cpu_total() <= currently_available.cpu and resources.gpu_total() <= currently_available.gpu and all( resources.get_res_total(res) <= currently_available.get(res) for res in resources.custom_resources)) if have_space: return True can_overcommit = self._queue_trials if (resources.cpu_total() > 0 and currently_available.cpu <= 0) or \ (resources.gpu_total() > 0 and currently_available.gpu <= 0) or \ any((resources.get_res_total(res_name) > 0 and currently_available.get(res_name) <= 0) for res_name in resources.custom_resources): can_overcommit = False # requested resource is already saturated if can_overcommit: logger.warning( "Allowing trial to start even though the " "cluster does not have enough free resources. Trial actors " "may appear to hang until enough resources are added to the " "cluster (e.g., via autoscaling). You can disable this " "behavior by specifying `queue_trials=False` in " "ray.tune.run().") return True return False
[ "def", "has_resources", "(", "self", ",", "resources", ")", ":", "if", "time", ".", "time", "(", ")", "-", "self", ".", "_last_resource_refresh", ">", "self", ".", "_refresh_period", ":", "self", ".", "_update_avail_resources", "(", ")", "currently_available", "=", "Resources", ".", "subtract", "(", "self", ".", "_avail_resources", ",", "self", ".", "_committed_resources", ")", "have_space", "=", "(", "resources", ".", "cpu_total", "(", ")", "<=", "currently_available", ".", "cpu", "and", "resources", ".", "gpu_total", "(", ")", "<=", "currently_available", ".", "gpu", "and", "all", "(", "resources", ".", "get_res_total", "(", "res", ")", "<=", "currently_available", ".", "get", "(", "res", ")", "for", "res", "in", "resources", ".", "custom_resources", ")", ")", "if", "have_space", ":", "return", "True", "can_overcommit", "=", "self", ".", "_queue_trials", "if", "(", "resources", ".", "cpu_total", "(", ")", ">", "0", "and", "currently_available", ".", "cpu", "<=", "0", ")", "or", "(", "resources", ".", "gpu_total", "(", ")", ">", "0", "and", "currently_available", ".", "gpu", "<=", "0", ")", "or", "any", "(", "(", "resources", ".", "get_res_total", "(", "res_name", ")", ">", "0", "and", "currently_available", ".", "get", "(", "res_name", ")", "<=", "0", ")", "for", "res_name", "in", "resources", ".", "custom_resources", ")", ":", "can_overcommit", "=", "False", "# requested resource is already saturated", "if", "can_overcommit", ":", "logger", ".", "warning", "(", "\"Allowing trial to start even though the \"", "\"cluster does not have enough free resources. Trial actors \"", "\"may appear to hang until enough resources are added to the \"", "\"cluster (e.g., via autoscaling). You can disable this \"", "\"behavior by specifying `queue_trials=False` in \"", "\"ray.tune.run().\"", ")", "return", "True", "return", "False" ]
Returns whether this runner has at least the specified resources. This refreshes the Ray cluster resources if the time since last update has exceeded self._refresh_period. This also assumes that the cluster is not resizing very frequently.
[ "Returns", "whether", "this", "runner", "has", "at", "least", "the", "specified", "resources", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/tune/ray_trial_executor.py#L389-L430
train
Returns whether this runner has at least the specified resources.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qf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p8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\060' + '\x6f' + chr(51) + chr(0b110111) + '\x37', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1100 + 0o143) + '\x33' + chr(0b11100 + 0o32) + chr(0b1000 + 0o52), ord("\x08")), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(10316 - 10205) + '\062' + chr(0b100111 + 0o15) + chr(2294 - 2242), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101101 + 0o2) + chr(754 - 704) + chr(0b110100) + '\x36', 0b1000), ehT0Px3KOsy9(chr(546 - 498) + chr(0b111000 + 0o67) + chr(0b1010 + 0o50) + chr(50) + '\067', 0b1000), ehT0Px3KOsy9(chr(166 - 118) + chr(0b110100 + 0o73) + chr(49) + chr(55) + chr(2291 - 2238), 2378 - 2370), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011100 + 0o23) + '\062' + '\066' + '\x37', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(949 - 898) + '\064' + '\x36', 0o10), ehT0Px3KOsy9(chr(1230 - 1182) + chr(111) + '\061' + chr(53) + '\060', 0b1000), ehT0Px3KOsy9('\060' + chr(0b10101 + 0o132) + chr(0b1001 + 0o51) + chr(54) + '\067', 8), ehT0Px3KOsy9('\x30' + chr(111) + chr(51) + chr(0b11 + 0o63) + '\064', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + '\x31' + chr(0b110001) + '\x34', 0b1000), ehT0Px3KOsy9(chr(48) + chr(1084 - 973) + '\061' + chr(0b100001 + 0o26), 21639 - 21631), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(50) + chr(0b100010 + 0o20) + chr(55), 8), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(1414 - 1303) + chr(0b100 + 0o56) + chr(0b110011 + 0o0), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b111011 + 0o64) + chr(0b110101) + '\065', 0b1000), ehT0Px3KOsy9('\060' + chr(1638 - 1527) + chr(1327 - 1278) + '\x32', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(50) + '\x32' + '\061', 24611 - 24603), ehT0Px3KOsy9('\x30' + chr(9743 - 9632) + chr(0b10 + 0o61) + chr(378 - 328) + '\061', 0o10), ehT0Px3KOsy9('\x30' + '\157' + '\x37' + '\061', 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110111) + '\066', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b100110 + 0o15) + chr(0b11001 + 0o31) + chr(50), 0b1000), ehT0Px3KOsy9(chr(0b100010 + 0o16) + '\x6f' + '\062' + chr(52) + chr(0b110000), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110010) + chr(50) + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(0b1101111) + chr(51) + '\x35' + '\x30', 0b1000), ehT0Px3KOsy9('\060' + chr(0b101000 + 0o107) + chr(51) + chr(0b10110 + 0o37) + '\061', 0o10), ehT0Px3KOsy9(chr(0b110 + 0o52) + '\x6f' + chr(50) + chr(0b110101) + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(111) + chr(1284 - 1234) + chr(0b110010 + 0o1), 8), ehT0Px3KOsy9(chr(2277 - 2229) + '\x6f' + '\x31' + '\060' + chr(1854 - 1806), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(2660 - 2549) + chr(51) + '\064' + '\066', 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000101 + 0o52) + chr(0b101110 + 0o5) + '\062', 0o10), ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(0b1010110 + 0o31) + chr(0b1 + 0o61) + chr(1040 - 985) + chr(0b1001 + 0o51), 0b1000), ehT0Px3KOsy9(chr(1610 - 1562) + '\x6f' + chr(0b1101 + 0o45) + '\x30' + chr(0b110011 + 0o3), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(52) + chr(52), 0o10), ehT0Px3KOsy9(chr(2191 - 2143) + chr(0b11010 + 0o125) + chr(496 - 443) + chr(398 - 347), 12548 - 12540), ehT0Px3KOsy9('\060' + chr(0b110000 + 0o77) + chr(50) + '\062' + chr(1448 - 1399), 8), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\062' + '\066' + '\060', ord("\x08")), ehT0Px3KOsy9(chr(1221 - 1173) + chr(0b1010100 + 0o33) + '\061' + chr(53), 39874 - 39866), ehT0Px3KOsy9('\060' + chr(2413 - 2302) + chr(51) + chr(0b110000) + chr(0b110100), 54359 - 54351)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(0b1101111) + '\065' + '\x30', 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xd1'), chr(0b1100100) + '\145' + chr(0b1100011) + chr(111) + '\x64' + '\145')(chr(11877 - 11760) + chr(116) + '\x66' + chr(0b101101) + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def Ezy3qOjK7A2g(oVre8I6UXc3b, z4Xs9XhDbg00): if xafqLlk3kkUe(ltvhPP4VhXre, xafqLlk3kkUe(SXOLrMavuUCe(b'\x8b\x9b\xc9\xc3'), chr(5517 - 5417) + '\145' + '\143' + chr(111) + chr(0b1100100) + '\x65')(chr(0b111001 + 0o74) + chr(0b1110100) + chr(7554 - 7452) + chr(516 - 471) + chr(0b111000)))() - xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa0\x9e\xc5\xd5\xe3"\xc5\x83\x1b\xd8\x81>l\xf2L_o\xf7\xa3\\M\xba'), chr(0b1100100) + chr(0b1100101) + chr(8331 - 8232) + '\x6f' + chr(0b1010010 + 0o22) + chr(0b10010 + 0o123))(chr(117) + '\164' + chr(4335 - 4233) + chr(286 - 241) + chr(645 - 589))) > xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa0\x80\xc1\xc0\xe5\x18\xc4\x8e7\xc7\x91>f\xf8w'), '\144' + '\145' + chr(0b1100011) + '\157' + chr(1074 - 974) + chr(5251 - 5150))(chr(117) + chr(8143 - 8027) + chr(102) + chr(45) + chr(0b110101 + 0o3))): xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa0\x87\xd4\xc2\xf6\t\xd2\xb9\t\xc1\x95%c\xc8aHy\xfe\xa4K]\xb7\xd3'), chr(8349 - 8249) + chr(0b1100101) + '\143' + chr(111) + '\x64' + chr(0b1100101))(chr(117) + chr(3150 - 3034) + chr(0b1010111 + 0o17) + chr(1424 - 1379) + '\x38'))() qzvpcoqE4Jp1 = kKoR5XlHFDti.subtract(oVre8I6UXc3b._avail_resources, oVre8I6UXc3b._committed_resources) TzA2WrosMF8R = z4Xs9XhDbg00.cpu_total() <= qzvpcoqE4Jp1.cpu and z4Xs9XhDbg00.gpu_total() <= qzvpcoqE4Jp1.gpu and Dl48nj1rbi23((z4Xs9XhDbg00.get_res_total(MsbwfslwLjRO) <= qzvpcoqE4Jp1.get(MsbwfslwLjRO) for MsbwfslwLjRO in z4Xs9XhDbg00.custom_resources)) if TzA2WrosMF8R: return ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(0b1010000 + 0o37) + '\061', 8) NbsaWUXbvVXc = oVre8I6UXc3b._queue_trials if xafqLlk3kkUe(z4Xs9XhDbg00, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9c\x82\xd1\xf9\xe3\x12\xc3\x87\x04'), '\144' + chr(101) + chr(9377 - 9278) + chr(3736 - 3625) + '\144' + chr(0b11110 + 0o107))('\x75' + '\164' + chr(0b1100110) + chr(0b101101) + chr(0b111000)))() > ehT0Px3KOsy9(chr(0b110000) + chr(0b11100 + 0o123) + chr(494 - 446), ord("\x08")) and xafqLlk3kkUe(qzvpcoqE4Jp1, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9c\x82\xd1'), '\144' + chr(101) + chr(99) + chr(0b1101111) + chr(0b101010 + 0o72) + chr(0b1010001 + 0o24))('\165' + '\x74' + '\146' + '\055' + '\070')) <= ehT0Px3KOsy9(chr(0b110000) + chr(6397 - 6286) + chr(0b110000), 8) or (xafqLlk3kkUe(z4Xs9XhDbg00, xafqLlk3kkUe(SXOLrMavuUCe(b'\x98\x82\xd1\xf9\xe3\x12\xc3\x87\x04'), '\144' + chr(0b110001 + 0o64) + '\143' + '\157' + '\x64' + chr(4004 - 3903))(chr(0b110000 + 0o105) + chr(9202 - 9086) + chr(0b10011 + 0o123) + chr(45) + chr(615 - 559)))() > ehT0Px3KOsy9('\x30' + '\157' + chr(48), 8) and xafqLlk3kkUe(qzvpcoqE4Jp1, xafqLlk3kkUe(SXOLrMavuUCe(b'\x98\x82\xd1'), '\x64' + '\145' + chr(99) + chr(9127 - 9016) + chr(0b101 + 0o137) + '\x65')(chr(0b1001100 + 0o51) + '\164' + chr(102) + chr(0b101101) + chr(0b1010 + 0o56))) <= ehT0Px3KOsy9(chr(0b111 + 0o51) + '\157' + '\060', 8)) or UVSi4XW7eBIM((xafqLlk3kkUe(z4Xs9XhDbg00, xafqLlk3kkUe(SXOLrMavuUCe(b'\x98\x97\xd0\xf9\xe5\x18\xc4\xb9\x1c\xd8\x80-c'), chr(100) + '\145' + chr(0b1100011) + chr(111) + '\144' + '\x65')(chr(709 - 592) + '\164' + '\x66' + chr(1457 - 1412) + chr(151 - 95)))(R7qLfVgKEqsr) > ehT0Px3KOsy9('\060' + chr(4375 - 4264) + chr(0b110000), 8) and xafqLlk3kkUe(qzvpcoqE4Jp1, xafqLlk3kkUe(SXOLrMavuUCe(b'\x98\x97\xd0'), chr(100) + '\145' + '\143' + '\x6f' + chr(0b1100100) + chr(4292 - 4191))(chr(0b1000011 + 0o62) + '\x74' + chr(5776 - 5674) + chr(1431 - 1386) + '\x38'))(R7qLfVgKEqsr) <= ehT0Px3KOsy9(chr(0b110000) + chr(4606 - 4495) + chr(0b110000), 8) for R7qLfVgKEqsr in xafqLlk3kkUe(z4Xs9XhDbg00, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9c\x87\xd7\xd2\xf8\x10\xe8\x94\r\xc4\x9b9}\xf4v^'), '\x64' + chr(101) + '\x63' + '\157' + '\144' + chr(0b1100101))(chr(0b11110 + 0o127) + chr(0b1010000 + 0o44) + chr(0b1011110 + 0o10) + chr(0b1 + 0o54) + chr(0b111000))))): NbsaWUXbvVXc = ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(111) + chr(48), 8) if NbsaWUXbvVXc: xafqLlk3kkUe(hdK8qOUhR6Or, xafqLlk3kkUe(SXOLrMavuUCe(b'\x88\x93\xd6\xc8\xfe\x13\xd0'), chr(100) + '\x65' + '\x63' + chr(111) + chr(7259 - 7159) + chr(0b1001110 + 0o27))(chr(0b1110101) + '\164' + '\x66' + '\x2d' + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xbe\x9e\xc8\xc9\xe0\x14\xd9\x81H\xc3\x86%n\xfb3Ye\xb1\xa2M_\xa0\xd4\xb3\x8d\x9f\xcb}`u\x8eu\xcf\xe1L\x0b\xe5\xd8h\xe4\x9c\x9e\xd1\xd5\xe3\x18\xc5\xc6\x0c\xd8\x91?/\xf9|Y*\xf9\xb0O[\xf2\xc5\xfd\x87\x9c\xc9{`g\x94\x7f\xdf\xa6VN\xe2\xdfx\xb6\x9c\x97\xd7\x88\xb7)\xc5\x8f\t\xdb\xd4-l\xe3|_y\xb1\xbcXG\xf2\xc1\xe3\x98\x8c\xcfa`u\x89:\xd2\xe7JL\xb1\xc5c\xb0\x96\x9e\x84\xc3\xf9\x12\xc2\x81\x00\x97\x86)|\xf8f_i\xf4\xa2\x19_\xa0\xc5\xb3\x89\x8d\xcav$!\x92u\x9a\xf2LN\xb1\xd3a\xb1\x8c\x86\xc1\xd4\xb7U\xd2\xc8\x0f\x99\xd8ly\xfer\rk\xe4\xa5VM\xb1\xc1\xff\x81\x87\xc9:n!\xbfu\xcf\xa6GJ\xff\x90i\xad\x8c\x93\xc6\xca\xf2]\xc3\x8e\x01\xc4\xd4.j\xffr[c\xfe\xa3\x19\\\xab\x80\xe0\x98\x8c\xcdz&x\x8ft\xdd\xa6DZ\xe4\xd5x\xa1\xa0\x86\xd6\xcf\xf6\x11\xc4\xdb.\xd6\x98?j\xf73Dd\xb1\xa3XG\xfc\xd4\xe6\x86\x8c\x80a5o\xce3\x94'), chr(0b101 + 0o137) + '\x65' + chr(99) + '\x6f' + chr(100) + chr(4774 - 4673))('\165' + chr(10391 - 10275) + chr(0b1100110) + chr(45) + '\070')) return ehT0Px3KOsy9('\060' + chr(0b1001101 + 0o42) + chr(0b110001), 8) return ehT0Px3KOsy9(chr(0b1010 + 0o46) + '\157' + chr(48), 8)
ray-project/ray
python/ray/tune/ray_trial_executor.py
RayTrialExecutor.debug_string
def debug_string(self): """Returns a human readable message for printing to the console.""" if self._resources_initialized: status = "Resources requested: {}/{} CPUs, {}/{} GPUs".format( self._committed_resources.cpu, self._avail_resources.cpu, self._committed_resources.gpu, self._avail_resources.gpu) customs = ", ".join([ "{}/{} {}".format( self._committed_resources.get_res_total(name), self._avail_resources.get_res_total(name), name) for name in self._avail_resources.custom_resources ]) if customs: status += " ({})".format(customs) return status else: return "Resources requested: ?"
python
def debug_string(self): """Returns a human readable message for printing to the console.""" if self._resources_initialized: status = "Resources requested: {}/{} CPUs, {}/{} GPUs".format( self._committed_resources.cpu, self._avail_resources.cpu, self._committed_resources.gpu, self._avail_resources.gpu) customs = ", ".join([ "{}/{} {}".format( self._committed_resources.get_res_total(name), self._avail_resources.get_res_total(name), name) for name in self._avail_resources.custom_resources ]) if customs: status += " ({})".format(customs) return status else: return "Resources requested: ?"
[ "def", "debug_string", "(", "self", ")", ":", "if", "self", ".", "_resources_initialized", ":", "status", "=", "\"Resources requested: {}/{} CPUs, {}/{} GPUs\"", ".", "format", "(", "self", ".", "_committed_resources", ".", "cpu", ",", "self", ".", "_avail_resources", ".", "cpu", ",", "self", ".", "_committed_resources", ".", "gpu", ",", "self", ".", "_avail_resources", ".", "gpu", ")", "customs", "=", "\", \"", ".", "join", "(", "[", "\"{}/{} {}\"", ".", "format", "(", "self", ".", "_committed_resources", ".", "get_res_total", "(", "name", ")", ",", "self", ".", "_avail_resources", ".", "get_res_total", "(", "name", ")", ",", "name", ")", "for", "name", "in", "self", ".", "_avail_resources", ".", "custom_resources", "]", ")", "if", "customs", ":", "status", "+=", "\" ({})\"", ".", "format", "(", "customs", ")", "return", "status", "else", ":", "return", "\"Resources requested: ?\"" ]
Returns a human readable message for printing to the console.
[ "Returns", "a", "human", "readable", "message", "for", "printing", "to", "the", "console", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/tune/ray_trial_executor.py#L432-L449
train
Returns a human readable message for printing to the console.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,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6_LpdIe,sbGAZlkZOtyh,Cf_Qef15s3_F,eX02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(49) + chr(1143 - 1091) + '\062', 0o10), ehT0Px3KOsy9(chr(1743 - 1695) + '\157' + chr(286 - 237) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000010 + 0o55) + '\061' + '\067' + chr(0b101101 + 0o4), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + '\063' + chr(0b110010) + chr(1219 - 1171), 52239 - 52231), ehT0Px3KOsy9(chr(0b101011 + 0o5) + chr(111) + chr(323 - 272) + '\x36' + '\x33', 14366 - 14358), ehT0Px3KOsy9(chr(182 - 134) + chr(0b1101111) + chr(0b1101 + 0o44) + chr(52) + '\067', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1010111 + 0o30) + '\062' + chr(0b11011 + 0o33) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(10380 - 10269) + chr(0b110010) + chr(52) + '\067', 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110011) + chr(2218 - 2164) + chr(0b101100 + 0o10), 0b1000), ehT0Px3KOsy9(chr(397 - 349) + '\157' + chr(219 - 168) + chr(0b100010 + 0o21) + chr(660 - 609), 35383 - 35375), ehT0Px3KOsy9(chr(393 - 345) + chr(111) + chr(49) + '\x30' + chr(48), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x31' + chr(0b1110 + 0o45), ord("\x08")), ehT0Px3KOsy9(chr(0b11 + 0o55) + '\157' + '\067' + chr(0b100001 + 0o26), 52745 - 52737), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110011) + chr(0b110000) + chr(0b110101), 1039 - 1031), ehT0Px3KOsy9('\060' + chr(0b1100 + 0o143) + '\x36' + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110001) + '\066' + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b101101 + 0o102) + chr(1912 - 1861) + chr(0b110110) + chr(0b1011 + 0o46), 0o10), ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(0b10111 + 0o130) + '\x32' + chr(0b1011 + 0o47) + '\x35', 52023 - 52015), ehT0Px3KOsy9('\x30' + chr(111) + chr(2326 - 2275) + chr(2519 - 2467) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(2493 - 2443) + chr(51) + '\x32', 23528 - 23520), ehT0Px3KOsy9('\060' + '\x6f' + '\065' + '\062', 26407 - 26399), ehT0Px3KOsy9(chr(0b10010 + 0o36) + '\157' + chr(0b110001 + 0o1) + chr(0b11110 + 0o22) + chr(0b100011 + 0o20), 0o10), ehT0Px3KOsy9(chr(0b10010 + 0o36) + '\x6f' + chr(0b110001) + '\x32' + chr(0b110110), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b100111 + 0o13) + '\x35' + chr(0b10101 + 0o37), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(50) + '\x37' + chr(2192 - 2139), 0b1000), ehT0Px3KOsy9(chr(1104 - 1056) + '\x6f' + '\x31' + chr(1126 - 1076) + chr(339 - 290), 0b1000), ehT0Px3KOsy9(chr(444 - 396) + chr(7891 - 7780) + '\x31' + chr(0b1001 + 0o52) + '\062', 51180 - 51172), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b11000 + 0o33) + '\x35' + '\066', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x31' + chr(0b101111 + 0o2) + chr(0b110000), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1100001 + 0o16) + chr(500 - 447) + chr(0b11010 + 0o27), 0o10), ehT0Px3KOsy9(chr(1216 - 1168) + chr(0b1101111) + chr(53) + '\062', 8), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b11100 + 0o26) + chr(0b110010) + chr(210 - 157), 8), ehT0Px3KOsy9('\x30' + chr(6479 - 6368) + chr(51) + '\061', 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x37' + chr(0b110110), 13511 - 13503), ehT0Px3KOsy9('\x30' + chr(5599 - 5488) + chr(50) + chr(50) + '\060', 0b1000), ehT0Px3KOsy9(chr(2158 - 2110) + chr(9002 - 8891) + chr(0b110010) + '\067' + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b11110 + 0o25) + chr(0b110110), 0b1000), ehT0Px3KOsy9('\060' + chr(0b10010 + 0o135) + chr(0b11110 + 0o30) + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(1280 - 1232) + chr(111) + chr(636 - 587) + '\x31' + '\066', ord("\x08")), ehT0Px3KOsy9('\060' + chr(5927 - 5816) + chr(906 - 856) + '\060', 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(792 - 739) + chr(0b10101 + 0o33), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'L'), chr(0b1100100) + chr(101) + '\143' + '\x6f' + chr(100) + chr(0b1100101))('\165' + chr(116) + '\146' + '\055' + chr(628 - 572)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def Od63c1BZNalH(oVre8I6UXc3b): if xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'=|\x1c\xa3\x9c\x12\xc2\xc4\x91\xa8\x1fbQ\xacA\x1c\x90\xf9\x8f\xe0O\xe7'), chr(0b1100100) + chr(5420 - 5319) + '\x63' + chr(11802 - 11691) + chr(0b1001000 + 0o34) + chr(101))(chr(0b1110101) + chr(116) + '\x66' + chr(1545 - 1500) + '\x38')): vBsMWH4gAEfy = xafqLlk3kkUe(SXOLrMavuUCe(b'0k\n\xbf\x86\x15\xd3\xc2\x87\xfb2nN\xb0P\x06\x85\xf0\x82\xa0\n\xf8+\x83\xc6,z\xad\x18|Y\xb99E\xed\x96eKnW2[\n'), chr(100) + chr(0b10101 + 0o120) + '\143' + chr(111) + chr(100) + chr(0b1000101 + 0o40))(chr(0b1110101) + chr(4631 - 4515) + chr(0b1100110) + '\x2d' + chr(0b11011 + 0o35)).V4roHaS3Ppej(oVre8I6UXc3b._committed_resources.cpu, oVre8I6UXc3b._avail_resources.cpu, oVre8I6UXc3b._committed_resources.gpu, oVre8I6UXc3b._avail_resources.gpu) Qt9AHVEuMoeE = xafqLlk3kkUe(SXOLrMavuUCe(b'N.'), chr(0b1000011 + 0o41) + chr(0b1100101) + '\143' + '\x6f' + chr(0b101111 + 0o65) + chr(0b110011 + 0o62))(chr(117) + '\x74' + chr(102) + chr(687 - 642) + chr(0b11010 + 0o36))._oWXztVNnqHF([xafqLlk3kkUe(SXOLrMavuUCe(b'\x19sV\xab\x8eG\xcb\xda'), chr(0b1100100) + chr(101) + chr(2646 - 2547) + chr(0b1101111) + '\144' + '\x65')(chr(0b1110101) + chr(0b1110100 + 0o0) + '\x66' + '\x2d' + chr(1710 - 1654)).V4roHaS3Ppej(oVre8I6UXc3b._committed_resources.get_res_total(AIvJRzLdDfgF), oVre8I6UXc3b._avail_resources.get_res_total(AIvJRzLdDfgF), AIvJRzLdDfgF) for AIvJRzLdDfgF in oVre8I6UXc3b._avail_resources.custom_resources]) if Qt9AHVEuMoeE: vBsMWH4gAEfy += xafqLlk3kkUe(SXOLrMavuUCe(b'B&\x02\xad\xda'), chr(0b11101 + 0o107) + chr(0b1001011 + 0o32) + '\x63' + chr(0b101110 + 0o101) + chr(6123 - 6023) + chr(8015 - 7914))(chr(117) + chr(116) + chr(102) + chr(45) + chr(0b111000)).V4roHaS3Ppej(Qt9AHVEuMoeE) return vBsMWH4gAEfy else: return xafqLlk3kkUe(SXOLrMavuUCe(b'0k\n\xbf\x86\x15\xd3\xc2\x87\xfb2nN\xb0P\x06\x85\xf0\x82\xa0\n\xbc'), chr(0b1001000 + 0o34) + '\145' + '\x63' + chr(10428 - 10317) + '\x64' + chr(0b10111 + 0o116))('\x75' + chr(0b1110100) + chr(0b1100110) + chr(1795 - 1750) + chr(0b100010 + 0o26))
ray-project/ray
python/ray/tune/ray_trial_executor.py
RayTrialExecutor.resource_string
def resource_string(self): """Returns a string describing the total resources available.""" if self._resources_initialized: res_str = "{} CPUs, {} GPUs".format(self._avail_resources.cpu, self._avail_resources.gpu) if self._avail_resources.custom_resources: custom = ", ".join( "{} {}".format( self._avail_resources.get_res_total(name), name) for name in self._avail_resources.custom_resources) res_str += " ({})".format(custom) return res_str else: return "? CPUs, ? GPUs"
python
def resource_string(self): """Returns a string describing the total resources available.""" if self._resources_initialized: res_str = "{} CPUs, {} GPUs".format(self._avail_resources.cpu, self._avail_resources.gpu) if self._avail_resources.custom_resources: custom = ", ".join( "{} {}".format( self._avail_resources.get_res_total(name), name) for name in self._avail_resources.custom_resources) res_str += " ({})".format(custom) return res_str else: return "? CPUs, ? GPUs"
[ "def", "resource_string", "(", "self", ")", ":", "if", "self", ".", "_resources_initialized", ":", "res_str", "=", "\"{} CPUs, {} GPUs\"", ".", "format", "(", "self", ".", "_avail_resources", ".", "cpu", ",", "self", ".", "_avail_resources", ".", "gpu", ")", "if", "self", ".", "_avail_resources", ".", "custom_resources", ":", "custom", "=", "\", \"", ".", "join", "(", "\"{} {}\"", ".", "format", "(", "self", ".", "_avail_resources", ".", "get_res_total", "(", "name", ")", ",", "name", ")", "for", "name", "in", "self", ".", "_avail_resources", ".", "custom_resources", ")", "res_str", "+=", "\" ({})\"", ".", "format", "(", "custom", ")", "return", "res_str", "else", ":", "return", "\"? CPUs, ? GPUs\"" ]
Returns a string describing the total resources available.
[ "Returns", "a", "string", "describing", "the", "total", "resources", "available", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/tune/ray_trial_executor.py#L451-L465
train
Returns a string describing the total resources available.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQ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Wzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + chr(0b1101 + 0o142) + '\061' + chr(0b110000) + chr(2520 - 2467), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1601 - 1550) + '\x33' + chr(0b10 + 0o64), 0o10), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(0b1101111) + chr(2388 - 2339) + chr(53) + '\x31', 0b1000), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(2857 - 2746) + '\066' + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110001 + 0o2) + '\063' + '\x37', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b111100 + 0o63) + chr(0b110011) + chr(0b11101 + 0o32) + chr(0b11001 + 0o35), ord("\x08")), ehT0Px3KOsy9(chr(0b10111 + 0o31) + chr(0b100001 + 0o116) + '\063' + chr(54) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(111) + chr(49) + chr(50) + chr(0b11 + 0o61), 0b1000), ehT0Px3KOsy9('\x30' + chr(6608 - 6497) + chr(51) + '\062' + chr(0b110000), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b11001 + 0o126) + chr(202 - 152) + chr(0b100011 + 0o23) + '\x31', 0o10), ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(111) + '\x33' + '\x37', 0b1000), ehT0Px3KOsy9(chr(0b100101 + 0o13) + '\157' + '\x35', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(124 - 73) + chr(55) + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(283 - 235) + chr(997 - 886) + chr(49) + chr(257 - 207) + chr(0b100010 + 0o16), 20698 - 20690), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b10000 + 0o42) + chr(54) + chr(51), 0b1000), ehT0Px3KOsy9(chr(0b1001 + 0o47) + '\157' + '\x31' + '\x32' + chr(53), 9689 - 9681), ehT0Px3KOsy9(chr(0b11100 + 0o24) + '\x6f' + chr(1132 - 1083) + '\061' + chr(54), 0o10), ehT0Px3KOsy9('\x30' + chr(6288 - 6177) + '\x35' + chr(0b100 + 0o54), 0o10), ehT0Px3KOsy9(chr(737 - 689) + chr(0b10101 + 0o132) + '\062' + chr(0b100101 + 0o17) + chr(50), 0b1000), ehT0Px3KOsy9(chr(1672 - 1624) + chr(111) + chr(50) + chr(53) + chr(0b100001 + 0o17), 0o10), ehT0Px3KOsy9(chr(0b11101 + 0o23) + '\x6f' + chr(50) + chr(470 - 422) + '\063', 0b1000), ehT0Px3KOsy9('\x30' + chr(2836 - 2725) + chr(50) + chr(0b110101) + chr(0b101000 + 0o17), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(51) + chr(0b110110) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(0b10 + 0o56) + chr(0b1101111) + chr(51) + chr(0b110011 + 0o2), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110011) + chr(49) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b111110 + 0o61) + chr(53 - 4) + chr(52) + '\065', 0o10), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(0b1010100 + 0o33) + '\063' + '\x35' + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(190 - 142) + '\x6f' + chr(49) + '\x35' + chr(0b1000 + 0o50), 0o10), ehT0Px3KOsy9(chr(1848 - 1800) + chr(0b1100000 + 0o17) + chr(0b11001 + 0o32) + '\060' + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000001 + 0o56) + chr(51) + chr(1268 - 1214) + chr(0b10010 + 0o37), 8), ehT0Px3KOsy9('\x30' + chr(9650 - 9539) + chr(755 - 705) + '\x32' + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(0b11010 + 0o26) + '\x6f' + chr(2035 - 1985) + '\061' + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110001) + chr(53) + '\x37', 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110101) + chr(49), 34571 - 34563), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b10 + 0o61) + '\063' + '\x37', 8), ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(0b1010011 + 0o34) + chr(50) + chr(0b11110 + 0o22) + chr(50), 4891 - 4883), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(51) + '\x33' + chr(1358 - 1303), 8), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b10111 + 0o34) + '\063' + '\x37', 8), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x32' + '\x35' + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110011) + chr(52), 19058 - 19050)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(2042 - 1994) + chr(111) + '\x35' + '\060', 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'k'), '\144' + chr(0b101001 + 0o74) + '\x63' + chr(0b1101111) + chr(4356 - 4256) + '\x65')(chr(117) + '\164' + chr(0b1100110) + chr(45) + chr(0b1011 + 0o55)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def z3EhyIeStkXJ(oVre8I6UXc3b): if xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x1a\xac\x0cC\xb0\x8b\x817\xb5\xc2@l\x919\xc7</D\xcb\xd2\xe6\xcb'), chr(0b1100100) + chr(0b1010001 + 0o24) + chr(0b1100011) + '\157' + chr(100) + chr(0b1100101))(chr(117) + chr(0b1110100) + chr(0b1011100 + 0o12) + '\x2d' + chr(0b1111 + 0o51))): kyxNvaAvwGv0 = xafqLlk3kkUe(SXOLrMavuUCe(b'>\xa3Is\x8f\xab\x80x\xf0\xcab%\xb8\x00\xe6&'), chr(0b1100100) + chr(4042 - 3941) + chr(6730 - 6631) + '\157' + chr(0b1100100) + chr(10089 - 9988))('\x75' + '\x74' + chr(0b1100110) + '\055' + chr(608 - 552)).V4roHaS3Ppej(oVre8I6UXc3b._avail_resources.cpu, oVre8I6UXc3b._avail_resources.gpu) if xafqLlk3kkUe(oVre8I6UXc3b._avail_resources, xafqLlk3kkUe(SXOLrMavuUCe(b'&\xab\x1aD\xb0\x93\xac&\xb5\xc2pp\x8d3\xd6&'), '\144' + '\145' + chr(0b111001 + 0o52) + '\157' + chr(0b1100100) + '\x65')(chr(0b1110101) + chr(0b110000 + 0o104) + chr(0b1011011 + 0o13) + '\055' + chr(0b111000))): JndAyNZOA6iR = xafqLlk3kkUe(SXOLrMavuUCe(b'i\xfe'), '\x64' + '\145' + chr(6081 - 5982) + chr(0b1101111) + '\x64' + chr(0b101010 + 0o73))(chr(117) + chr(0b110 + 0o156) + '\x66' + chr(0b11111 + 0o16) + chr(0b111000))._oWXztVNnqHF((xafqLlk3kkUe(SXOLrMavuUCe(b'>\xa3IK\xa2'), '\x64' + '\145' + '\x63' + '\x6f' + chr(0b1100100) + chr(1553 - 1452))(chr(117) + '\164' + chr(0b1000010 + 0o44) + chr(0b101101) + '\x38').V4roHaS3Ppej(oVre8I6UXc3b._avail_resources.get_res_total(AIvJRzLdDfgF), AIvJRzLdDfgF) for AIvJRzLdDfgF in oVre8I6UXc3b._avail_resources.custom_resources)) kyxNvaAvwGv0 += xafqLlk3kkUe(SXOLrMavuUCe(b'e\xf6\x12M\xf6'), chr(100) + chr(101) + '\143' + chr(0b1101111) + chr(0b1100100) + chr(101))('\165' + '\164' + '\146' + chr(1183 - 1138) + chr(0b11101 + 0o33)).V4roHaS3Ppej(JndAyNZOA6iR) return kyxNvaAvwGv0 else: return xafqLlk3kkUe(SXOLrMavuUCe(b'z\xfe*`\x8a\x8d\xdft\xef\x91XU\xaa#'), chr(0b101111 + 0o65) + chr(0b1100101) + chr(9541 - 9442) + chr(0b1101111) + '\x64' + chr(0b1100101))('\x75' + chr(0b1001 + 0o153) + chr(102) + chr(45) + chr(0b111000))
ray-project/ray
python/ray/tune/ray_trial_executor.py
RayTrialExecutor.save
def save(self, trial, storage=Checkpoint.DISK): """Saves the trial's state to a checkpoint.""" trial._checkpoint.storage = storage trial._checkpoint.last_result = trial.last_result if storage == Checkpoint.MEMORY: trial._checkpoint.value = trial.runner.save_to_object.remote() else: # Keeps only highest performing checkpoints if enabled if trial.keep_checkpoints_num: try: last_attr_val = trial.last_result[ trial.checkpoint_score_attr] if (trial.compare_checkpoints(last_attr_val) and not math.isnan(last_attr_val)): trial.best_checkpoint_attr_value = last_attr_val self._checkpoint_and_erase(trial) except KeyError: logger.warning( "Result dict has no key: {}. keep" "_checkpoints_num flag will not work".format( trial.checkpoint_score_attr)) else: with warn_if_slow("save_to_disk"): trial._checkpoint.value = ray.get( trial.runner.save.remote()) return trial._checkpoint.value
python
def save(self, trial, storage=Checkpoint.DISK): """Saves the trial's state to a checkpoint.""" trial._checkpoint.storage = storage trial._checkpoint.last_result = trial.last_result if storage == Checkpoint.MEMORY: trial._checkpoint.value = trial.runner.save_to_object.remote() else: # Keeps only highest performing checkpoints if enabled if trial.keep_checkpoints_num: try: last_attr_val = trial.last_result[ trial.checkpoint_score_attr] if (trial.compare_checkpoints(last_attr_val) and not math.isnan(last_attr_val)): trial.best_checkpoint_attr_value = last_attr_val self._checkpoint_and_erase(trial) except KeyError: logger.warning( "Result dict has no key: {}. keep" "_checkpoints_num flag will not work".format( trial.checkpoint_score_attr)) else: with warn_if_slow("save_to_disk"): trial._checkpoint.value = ray.get( trial.runner.save.remote()) return trial._checkpoint.value
[ "def", "save", "(", "self", ",", "trial", ",", "storage", "=", "Checkpoint", ".", "DISK", ")", ":", "trial", ".", "_checkpoint", ".", "storage", "=", "storage", "trial", ".", "_checkpoint", ".", "last_result", "=", "trial", ".", "last_result", "if", "storage", "==", "Checkpoint", ".", "MEMORY", ":", "trial", ".", "_checkpoint", ".", "value", "=", "trial", ".", "runner", ".", "save_to_object", ".", "remote", "(", ")", "else", ":", "# Keeps only highest performing checkpoints if enabled", "if", "trial", ".", "keep_checkpoints_num", ":", "try", ":", "last_attr_val", "=", "trial", ".", "last_result", "[", "trial", ".", "checkpoint_score_attr", "]", "if", "(", "trial", ".", "compare_checkpoints", "(", "last_attr_val", ")", "and", "not", "math", ".", "isnan", "(", "last_attr_val", ")", ")", ":", "trial", ".", "best_checkpoint_attr_value", "=", "last_attr_val", "self", ".", "_checkpoint_and_erase", "(", "trial", ")", "except", "KeyError", ":", "logger", ".", "warning", "(", "\"Result dict has no key: {}. keep\"", "\"_checkpoints_num flag will not work\"", ".", "format", "(", "trial", ".", "checkpoint_score_attr", ")", ")", "else", ":", "with", "warn_if_slow", "(", "\"save_to_disk\"", ")", ":", "trial", ".", "_checkpoint", ".", "value", "=", "ray", ".", "get", "(", "trial", ".", "runner", ".", "save", ".", "remote", "(", ")", ")", "return", "trial", ".", "_checkpoint", ".", "value" ]
Saves the trial's state to a checkpoint.
[ "Saves", "the", "trial", "s", "state", "to", "a", "checkpoint", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/tune/ray_trial_executor.py#L471-L497
train
Saves the trial s state to a checkpoint.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWY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4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(666 - 614) + '\061', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b110011 + 0o74) + '\061' + chr(53) + chr(0b101110 + 0o6), 7072 - 7064), ehT0Px3KOsy9('\x30' + chr(0b10110 + 0o131) + '\063' + chr(0b110111) + chr(2468 - 2415), 52926 - 52918), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(0b1110 + 0o141) + '\x31' + chr(54), 34898 - 34890), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110011) + chr(0b11001 + 0o34), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110000 + 0o2) + chr(810 - 758) + chr(0b101 + 0o57), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x36' + '\x35', 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(51) + '\067' + chr(0b110000 + 0o5), 8), ehT0Px3KOsy9('\x30' + chr(6025 - 5914) + chr(0b101011 + 0o6) + chr(0b110110) + chr(0b110010), 33068 - 33060), ehT0Px3KOsy9('\060' + chr(11257 - 11146) + chr(0b11000 + 0o31) + '\061' + '\065', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(9874 - 9763) + '\063' + chr(1829 - 1775) + chr(53), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b1110 + 0o45) + chr(0b110001) + chr(48), 0b1000), ehT0Px3KOsy9(chr(0b100001 + 0o17) + chr(0b1000011 + 0o54) + '\x36' + '\x32', 44257 - 44249), ehT0Px3KOsy9(chr(0b0 + 0o60) + '\x6f' + chr(0b110000 + 0o4) + chr(0b110011 + 0o0), 0b1000), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(7015 - 6904) + '\061' + chr(0b110101) + chr(584 - 536), 0o10), ehT0Px3KOsy9('\060' + chr(0b11010 + 0o125) + chr(0b10 + 0o60) + chr(0b110000) + chr(50), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + '\x32' + '\x34' + '\061', 32934 - 32926), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110011) + '\064', 13423 - 13415), ehT0Px3KOsy9(chr(0b11101 + 0o23) + '\x6f' + chr(2281 - 2232) + chr(0b110000) + '\x33', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(11105 - 10994) + '\x32' + chr(0b110010) + chr(48), 49003 - 48995), ehT0Px3KOsy9('\x30' + '\157' + chr(49) + chr(0b10111 + 0o37) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b11011 + 0o26) + chr(0b110011) + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + '\066', 26945 - 26937), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(50) + '\064' + '\065', 0b1000), ehT0Px3KOsy9(chr(237 - 189) + chr(0b101011 + 0o104) + '\x36' + chr(49), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b101010 + 0o105) + '\x33' + chr(0b110011), 6393 - 6385), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(49) + chr(0b110011) + chr(0b110010), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + '\063' + chr(0b110101) + '\x35', 53810 - 53802), ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(111) + chr(0b110001) + '\x32' + chr(0b110101), 21459 - 21451), ehT0Px3KOsy9(chr(0b110000) + chr(0b111000 + 0o67) + '\x33' + chr(620 - 571) + chr(0b110110), 11131 - 11123), ehT0Px3KOsy9(chr(792 - 744) + chr(0b1000110 + 0o51) + chr(49) + chr(48) + '\061', 0o10), ehT0Px3KOsy9('\x30' + chr(0b101010 + 0o105) + chr(0b110111) + chr(0b10100 + 0o34), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\063' + chr(0b110110) + chr(55), 0o10), ehT0Px3KOsy9('\060' + chr(0b100100 + 0o113) + '\061' + chr(52) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(111) + '\x33' + chr(0b11010 + 0o32), 8), ehT0Px3KOsy9(chr(0b110 + 0o52) + '\157' + '\063' + chr(53) + chr(0b1 + 0o66), 0o10), ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(0b100010 + 0o115) + chr(0b10111 + 0o34) + chr(1083 - 1029) + chr(0b110010), 64803 - 64795), ehT0Px3KOsy9(chr(0b10010 + 0o36) + '\157' + chr(0b11011 + 0o30) + chr(0b11111 + 0o21) + chr(0b10001 + 0o44), 59971 - 59963), ehT0Px3KOsy9(chr(48) + '\157' + '\x33' + chr(0b110000) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b111101 + 0o62) + chr(0b110011) + chr(52) + chr(50), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(111) + '\x35' + chr(1445 - 1397), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x0f'), chr(100) + '\145' + '\143' + chr(7732 - 7621) + '\x64' + chr(0b1100101))(chr(0b1110101) + '\x74' + '\x66' + chr(0b101101) + chr(2712 - 2656)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def oqBodScAtZiv(oVre8I6UXc3b, Alvsa0ue91Fo, SGlhJlEWrbsb=xafqLlk3kkUe(rxowUmkdemfv, xafqLlk3kkUe(SXOLrMavuUCe(b'e%\xaeE'), chr(4371 - 4271) + '\145' + '\143' + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(5427 - 5310) + chr(0b1 + 0o163) + '\x66' + chr(0b10101 + 0o30) + chr(0b100110 + 0o22)))): Alvsa0ue91Fo._checkpoint.SGlhJlEWrbsb = SGlhJlEWrbsb Alvsa0ue91Fo._checkpoint.v56NCZmHSz5s = Alvsa0ue91Fo.v56NCZmHSz5s if SGlhJlEWrbsb == xafqLlk3kkUe(rxowUmkdemfv, xafqLlk3kkUe(SXOLrMavuUCe(b'l)\xb0AO\xfd'), chr(100) + chr(0b1100101) + '\x63' + '\157' + chr(0b11100 + 0o110) + '\145')(chr(4505 - 4388) + chr(0b1110100) + '\x66' + '\055' + chr(0b101001 + 0o17))): Alvsa0ue91Fo._checkpoint.QmmgWUB13VCJ = Alvsa0ue91Fo.runner.save_to_object.remote() elif xafqLlk3kkUe(Alvsa0ue91Fo, xafqLlk3kkUe(SXOLrMavuUCe(b'J\t\x98~B\xc7]\x98\x11&\x85\xa7[M\x1c\xf1\xfer6\xfd'), chr(0b11111 + 0o105) + '\145' + '\x63' + chr(740 - 629) + chr(0b110 + 0o136) + '\x65')('\x75' + chr(0b1100000 + 0o24) + chr(102) + '\x2d' + '\x38')): try: he_nHRSqNpw9 = Alvsa0ue91Fo.v56NCZmHSz5s[Alvsa0ue91Fo.checkpoint_score_attr] if xafqLlk3kkUe(Alvsa0ue91Fo, xafqLlk3kkUe(SXOLrMavuUCe(b'B\x03\x90~|\xd6P\xa2\x11%\x90\xabYS\x07\xeb\xcfh0'), chr(0b1100100) + chr(101) + '\x63' + chr(0b110011 + 0o74) + '\x64' + chr(843 - 742))('\x75' + '\164' + chr(102) + '\055' + '\x38'))(he_nHRSqNpw9) and (not xafqLlk3kkUe(yhiZVkosCjBm, xafqLlk3kkUe(SXOLrMavuUCe(b'V"\xc9\\K\xfet\x858\x08\x9d\xb8'), chr(6542 - 6442) + chr(7554 - 7453) + chr(99) + chr(111) + '\144' + chr(0b1100101))(chr(0b1110001 + 0o4) + '\164' + '\x66' + chr(0b101101) + chr(0b101000 + 0o20)))(he_nHRSqNpw9)): Alvsa0ue91Fo.D5fF7eVQQX7z = he_nHRSqNpw9 xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'~\x0f\x95k~\xcfE\x92\x1b#\x81\x97SM\x0c\xdd\xc4n"\xe3\x13'), '\x64' + chr(0b11110 + 0o107) + chr(7390 - 7291) + chr(111) + '\144' + chr(0b1100101))(chr(117) + chr(0b1110100) + '\146' + chr(0b101101) + '\070'))(Alvsa0ue91Fo) except RQ6CSRrFArYB: xafqLlk3kkUe(hdK8qOUhR6Or, xafqLlk3kkUe(SXOLrMavuUCe(b'V\r\x8f`t\xcaR'), '\144' + '\x65' + chr(99) + '\x6f' + chr(9550 - 9450) + chr(101))(chr(0b1110101) + '\164' + chr(9460 - 9358) + '\055' + chr(0b10 + 0o66)))(xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b's\t\x8e{q\xd0\x15\x99\x1b.\x81\xe8ZB\x1b\xa2\xcfsc\xfb\x13&<\x85Jft\xcd>\xab$H\xa8\x00t\x8a\x91\xae\xb6\x8dH\x02\x89}B\xca@\x90R+\x99\xa9U\x03\x1f\xeb\xcdpc\xfe\x19+&\xd2^i1'), '\144' + chr(1773 - 1672) + chr(0b100011 + 0o100) + chr(0b1010000 + 0o37) + chr(100) + chr(0b110111 + 0o56))(chr(11108 - 10991) + '\x74' + chr(0b1100110) + chr(45) + '\070'), xafqLlk3kkUe(SXOLrMavuUCe(b'wX\x8faU\xc5f\xce"=\x90\xa2'), chr(0b1100100) + '\x65' + chr(99) + chr(0b1011110 + 0o21) + '\x64' + chr(101))(chr(117) + '\x74' + '\x66' + chr(45) + chr(0b111000)))(xafqLlk3kkUe(Alvsa0ue91Fo, xafqLlk3kkUe(SXOLrMavuUCe(b'B\x04\x98mv\xd4Z\x94\x1c9\xaa\xbbQL\x1a\xe7\xfe}7\xe4\x04'), chr(5656 - 5556) + chr(2643 - 2542) + chr(6030 - 5931) + chr(0b1101111) + chr(100) + '\x65')(chr(12575 - 12458) + chr(116) + chr(0b1100011 + 0o3) + chr(1196 - 1151) + chr(0b111000))))) else: with IhLRCTt_Dmej(xafqLlk3kkUe(SXOLrMavuUCe(b'R\r\x8bkB\xd0Z\xa2\x16$\x86\xa3'), '\x64' + chr(1159 - 1058) + chr(99) + chr(111) + '\x64' + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + chr(10044 - 9942) + chr(0b11 + 0o52) + '\070')): Alvsa0ue91Fo._checkpoint.QmmgWUB13VCJ = H9zaXRrGK6Cq.get(Alvsa0ue91Fo.runner.save.remote()) return xafqLlk3kkUe(Alvsa0ue91Fo._checkpoint, xafqLlk3kkUe(SXOLrMavuUCe(b'p\x01\x90iJ\xf1w\xccA\x1b\xb6\x82'), chr(0b10010 + 0o122) + chr(101) + chr(0b1100011) + chr(0b1101111) + chr(7653 - 7553) + '\x65')('\x75' + chr(0b1010 + 0o152) + chr(0b111001 + 0o55) + '\x2d' + chr(0b110110 + 0o2)))
ray-project/ray
python/ray/tune/ray_trial_executor.py
RayTrialExecutor._checkpoint_and_erase
def _checkpoint_and_erase(self, trial): """Checkpoints the model and erases old checkpoints if needed. Parameters ---------- trial : trial to save """ with warn_if_slow("save_to_disk"): trial._checkpoint.value = ray.get(trial.runner.save.remote()) if len(trial.history) >= trial.keep_checkpoints_num: ray.get(trial.runner.delete_checkpoint.remote(trial.history[-1])) trial.history.pop() trial.history.insert(0, trial._checkpoint.value)
python
def _checkpoint_and_erase(self, trial): """Checkpoints the model and erases old checkpoints if needed. Parameters ---------- trial : trial to save """ with warn_if_slow("save_to_disk"): trial._checkpoint.value = ray.get(trial.runner.save.remote()) if len(trial.history) >= trial.keep_checkpoints_num: ray.get(trial.runner.delete_checkpoint.remote(trial.history[-1])) trial.history.pop() trial.history.insert(0, trial._checkpoint.value)
[ "def", "_checkpoint_and_erase", "(", "self", ",", "trial", ")", ":", "with", "warn_if_slow", "(", "\"save_to_disk\"", ")", ":", "trial", ".", "_checkpoint", ".", "value", "=", "ray", ".", "get", "(", "trial", ".", "runner", ".", "save", ".", "remote", "(", ")", ")", "if", "len", "(", "trial", ".", "history", ")", ">=", "trial", ".", "keep_checkpoints_num", ":", "ray", ".", "get", "(", "trial", ".", "runner", ".", "delete_checkpoint", ".", "remote", "(", "trial", ".", "history", "[", "-", "1", "]", ")", ")", "trial", ".", "history", ".", "pop", "(", ")", "trial", ".", "history", ".", "insert", "(", "0", ",", "trial", ".", "_checkpoint", ".", "value", ")" ]
Checkpoints the model and erases old checkpoints if needed. Parameters ---------- trial : trial to save
[ "Checkpoints", "the", "model", "and", "erases", "old", "checkpoints", "if", "needed", ".", "Parameters", "----------", "trial", ":", "trial", "to", "save" ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/tune/ray_trial_executor.py#L499-L514
train
Checkpoints the model and erases old checkpoints
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bj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hj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\x30' + chr(111) + chr(0b100000 + 0o23) + '\x30' + chr(0b101 + 0o53), 0b1000), ehT0Px3KOsy9(chr(2075 - 2027) + '\x6f' + chr(0b101001 + 0o11) + chr(1979 - 1926) + '\062', 38860 - 38852), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(49) + chr(0b10101 + 0o42), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1011101 + 0o22) + '\x33' + '\061' + '\x37', 4342 - 4334), ehT0Px3KOsy9(chr(0b101100 + 0o4) + chr(111) + chr(0b110001) + '\x33' + chr(54), 0o10), ehT0Px3KOsy9(chr(1101 - 1053) + chr(111) + chr(51) + chr(0b110110) + '\x34', 0b1000), ehT0Px3KOsy9(chr(1793 - 1745) + chr(0b1101111) + chr(49) + chr(1333 - 1285) + chr(0b11 + 0o64), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110101) + chr(1335 - 1285), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110010) + '\x31' + chr(0b1010 + 0o51), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(51) + chr(0b110000) + chr(353 - 298), 9089 - 9081), ehT0Px3KOsy9(chr(1867 - 1819) + '\x6f' + chr(1209 - 1159) + chr(1837 - 1782) + '\067', 55246 - 55238), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(6209 - 6098) + chr(49) + '\063' + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(158 - 47) + chr(0b101110 + 0o3) + chr(0b11101 + 0o31) + chr(0b110101), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(50) + '\x33' + chr(49), 58769 - 58761), ehT0Px3KOsy9(chr(1039 - 991) + '\x6f' + chr(49) + chr(0b110010) + '\x33', 0o10), ehT0Px3KOsy9(chr(570 - 522) + chr(11314 - 11203) + '\063' + chr(330 - 279) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b11010 + 0o27) + '\065' + chr(1244 - 1189), 0o10), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(8388 - 8277) + chr(244 - 191) + '\066', 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(49) + chr(2353 - 2303), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(11448 - 11337) + chr(51) + chr(779 - 729) + chr(2164 - 2113), 59758 - 59750), ehT0Px3KOsy9(chr(48) + '\157' + '\062' + chr(51) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(48 - 0) + '\157' + chr(1970 - 1921) + chr(0b110110) + chr(0b110 + 0o61), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\061' + chr(2729 - 2674) + '\x33', 24935 - 24927), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x32' + chr(48) + '\x32', 0b1000), ehT0Px3KOsy9(chr(0b1111 + 0o41) + '\157' + chr(0b110001) + chr(0b110100) + '\x37', 9835 - 9827), ehT0Px3KOsy9('\x30' + chr(111) + chr(698 - 649) + chr(0b1 + 0o57) + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(3223 - 3112) + chr(49) + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(55) + chr(48), 38485 - 38477), ehT0Px3KOsy9(chr(0b101011 + 0o5) + '\157' + chr(2372 - 2321) + chr(0b100100 + 0o14) + '\x32', 6416 - 6408), ehT0Px3KOsy9(chr(356 - 308) + chr(0b1101111) + '\061' + chr(49) + chr(145 - 97), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(7238 - 7127) + '\063' + chr(0b11100 + 0o25) + chr(0b110011 + 0o3), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b11101 + 0o25) + chr(1811 - 1759) + '\067', 61192 - 61184), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\061' + chr(0b10010 + 0o42) + '\x35', 44768 - 44760), ehT0Px3KOsy9('\x30' + '\x6f' + '\061' + chr(0b110010) + '\063', 8), ehT0Px3KOsy9(chr(48) + chr(111) + chr(51) + '\064' + chr(48), 0b1000), ehT0Px3KOsy9(chr(48) + chr(9236 - 9125) + '\x32' + '\x37' + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1001111 + 0o40) + '\062' + chr(138 - 90) + chr(48), 61991 - 61983), ehT0Px3KOsy9(chr(1868 - 1820) + '\x6f' + '\062' + chr(2157 - 2102) + '\x34', 0o10), ehT0Px3KOsy9(chr(1456 - 1408) + '\x6f' + '\061' + '\060', 49144 - 49136), ehT0Px3KOsy9('\x30' + '\x6f' + '\x32' + chr(2152 - 2100) + '\061', 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(2988 - 2877) + '\x35' + chr(48), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xee'), chr(0b100100 + 0o100) + chr(101) + chr(0b1001 + 0o132) + chr(111) + chr(0b1100100) + '\x65')(chr(117) + '\164' + '\x66' + '\055' + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def YhUjYOfb6IY2(oVre8I6UXc3b, Alvsa0ue91Fo): with IhLRCTt_Dmej(xafqLlk3kkUe(SXOLrMavuUCe(b'\xb3\xcby\xaa\x01\x80(u\xef\xae\xcc7'), '\x64' + chr(101) + '\143' + chr(111) + chr(0b101010 + 0o72) + '\145')('\x75' + chr(0b1110100) + chr(0b1011101 + 0o11) + chr(0b0 + 0o55) + chr(0b111000))): Alvsa0ue91Fo._checkpoint.QmmgWUB13VCJ = H9zaXRrGK6Cq.get(Alvsa0ue91Fo.runner.save.remote()) if c2A0yzQpDQB3(xafqLlk3kkUe(Alvsa0ue91Fo, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb3\xee>\x84i\xa7\x0bL\xdb\xa9\xfb\x1e'), chr(100) + '\x65' + chr(99) + '\157' + '\x64' + chr(0b10110 + 0o117))(chr(0b1110101) + chr(1056 - 940) + chr(9027 - 8925) + chr(45) + chr(2145 - 2089)))) >= xafqLlk3kkUe(Alvsa0ue91Fo, xafqLlk3kkUe(SXOLrMavuUCe(b"\xab\xcfj\xbf\x01\x97/O\xe8\xac\xcf3\x1c\xf7'\xac0@\x7f\xbe"), chr(0b1100100) + '\x65' + chr(99) + chr(8811 - 8700) + chr(3151 - 3051) + chr(4937 - 4836))('\165' + '\164' + '\146' + chr(0b10010 + 0o33) + chr(0b111000))): xafqLlk3kkUe(H9zaXRrGK6Cq, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa7\xcf{'), chr(0b101100 + 0o70) + chr(101) + chr(99) + chr(111) + chr(100) + chr(101))(chr(117) + chr(0b1000000 + 0o64) + chr(2696 - 2594) + '\055' + chr(56)))(xafqLlk3kkUe(Alvsa0ue91Fo.runner.delete_checkpoint, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb2\xcfb\xa0*\x91'), chr(0b1100100) + '\x65' + chr(0b10 + 0o141) + chr(0b1101111) + chr(4280 - 4180) + chr(0b11 + 0o142))(chr(0b1110101) + chr(9870 - 9754) + chr(0b1100110) + chr(45) + '\x38'))(xafqLlk3kkUe(Alvsa0ue91Fo, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb3\xee>\x84i\xa7\x0bL\xdb\xa9\xfb\x1e'), chr(0b1100100) + '\145' + '\x63' + chr(0b1100101 + 0o12) + chr(4171 - 4071) + chr(0b1100101))(chr(0b1110101) + chr(0b111 + 0o155) + '\x66' + chr(0b101101) + '\070'))[-ehT0Px3KOsy9(chr(0b110000) + chr(0b10 + 0o155) + chr(1420 - 1371), 0o10)])) xafqLlk3kkUe(Alvsa0ue91Fo.history, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb0\xc5\x7f'), chr(100) + '\145' + '\143' + chr(0b1101111) + '\x64' + chr(0b1100101))(chr(0b100011 + 0o122) + '\x74' + chr(102) + chr(45) + chr(0b111000)))() xafqLlk3kkUe(Alvsa0ue91Fo.history, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa9\xc4|\xaa,\x80'), chr(0b1100100) + chr(1352 - 1251) + '\x63' + chr(111) + chr(0b101010 + 0o72) + chr(0b1100101))(chr(117) + chr(0b1110100) + '\x66' + '\x2d' + chr(0b111000)))(ehT0Px3KOsy9(chr(48) + '\157' + '\x30', 22245 - 22237), xafqLlk3kkUe(Alvsa0ue91Fo._checkpoint, xafqLlk3kkUe(SXOLrMavuUCe(b'\x91\xc7b\xa8\t\xa1\x05\x1b\xb8\x91\xfc\x16'), chr(8709 - 8609) + chr(101) + '\x63' + '\157' + chr(0b1100100) + '\x65')(chr(0b1110101) + chr(0b1110100) + '\x66' + chr(432 - 387) + '\x38')))
ray-project/ray
python/ray/tune/ray_trial_executor.py
RayTrialExecutor.restore
def restore(self, trial, checkpoint=None): """Restores training state from a given model checkpoint. This will also sync the trial results to a new location if restoring on a different node. """ if checkpoint is None or checkpoint.value is None: checkpoint = trial._checkpoint if checkpoint is None or checkpoint.value is None: return True if trial.runner is None: logger.error("Unable to restore - no runner.") self.set_status(trial, Trial.ERROR) return False try: value = checkpoint.value if checkpoint.storage == Checkpoint.MEMORY: assert type(value) != Checkpoint, type(value) trial.runner.restore_from_object.remote(value) else: worker_ip = ray.get(trial.runner.current_ip.remote()) trial.sync_logger_to_new_location(worker_ip) with warn_if_slow("restore_from_disk"): ray.get(trial.runner.restore.remote(value)) trial.last_result = checkpoint.last_result return True except Exception: logger.exception("Error restoring runner for Trial %s.", trial) self.set_status(trial, Trial.ERROR) return False
python
def restore(self, trial, checkpoint=None): """Restores training state from a given model checkpoint. This will also sync the trial results to a new location if restoring on a different node. """ if checkpoint is None or checkpoint.value is None: checkpoint = trial._checkpoint if checkpoint is None or checkpoint.value is None: return True if trial.runner is None: logger.error("Unable to restore - no runner.") self.set_status(trial, Trial.ERROR) return False try: value = checkpoint.value if checkpoint.storage == Checkpoint.MEMORY: assert type(value) != Checkpoint, type(value) trial.runner.restore_from_object.remote(value) else: worker_ip = ray.get(trial.runner.current_ip.remote()) trial.sync_logger_to_new_location(worker_ip) with warn_if_slow("restore_from_disk"): ray.get(trial.runner.restore.remote(value)) trial.last_result = checkpoint.last_result return True except Exception: logger.exception("Error restoring runner for Trial %s.", trial) self.set_status(trial, Trial.ERROR) return False
[ "def", "restore", "(", "self", ",", "trial", ",", "checkpoint", "=", "None", ")", ":", "if", "checkpoint", "is", "None", "or", "checkpoint", ".", "value", "is", "None", ":", "checkpoint", "=", "trial", ".", "_checkpoint", "if", "checkpoint", "is", "None", "or", "checkpoint", ".", "value", "is", "None", ":", "return", "True", "if", "trial", ".", "runner", "is", "None", ":", "logger", ".", "error", "(", "\"Unable to restore - no runner.\"", ")", "self", ".", "set_status", "(", "trial", ",", "Trial", ".", "ERROR", ")", "return", "False", "try", ":", "value", "=", "checkpoint", ".", "value", "if", "checkpoint", ".", "storage", "==", "Checkpoint", ".", "MEMORY", ":", "assert", "type", "(", "value", ")", "!=", "Checkpoint", ",", "type", "(", "value", ")", "trial", ".", "runner", ".", "restore_from_object", ".", "remote", "(", "value", ")", "else", ":", "worker_ip", "=", "ray", ".", "get", "(", "trial", ".", "runner", ".", "current_ip", ".", "remote", "(", ")", ")", "trial", ".", "sync_logger_to_new_location", "(", "worker_ip", ")", "with", "warn_if_slow", "(", "\"restore_from_disk\"", ")", ":", "ray", ".", "get", "(", "trial", ".", "runner", ".", "restore", ".", "remote", "(", "value", ")", ")", "trial", ".", "last_result", "=", "checkpoint", ".", "last_result", "return", "True", "except", "Exception", ":", "logger", ".", "exception", "(", "\"Error restoring runner for Trial %s.\"", ",", "trial", ")", "self", ".", "set_status", "(", "trial", ",", "Trial", ".", "ERROR", ")", "return", "False" ]
Restores training state from a given model checkpoint. This will also sync the trial results to a new location if restoring on a different node.
[ "Restores", "training", "state", "from", "a", "given", "model", "checkpoint", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/tune/ray_trial_executor.py#L516-L545
train
Restores training state from a given model checkpoint.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0C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Pw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b110000) + chr(0b100011 + 0o114) + chr(262 - 211) + chr(0b110101 + 0o2) + chr(0b110101), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(1011 - 961) + chr(55) + '\061', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b11 + 0o154) + chr(2714 - 2660) + chr(0b11010 + 0o31), 17242 - 17234), ehT0Px3KOsy9(chr(48) + chr(11032 - 10921) + chr(1497 - 1445) + chr(1075 - 1027), ord("\x08")), ehT0Px3KOsy9(chr(0b100001 + 0o17) + chr(6445 - 6334) + chr(0b101100 + 0o5) + chr(51) + '\063', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001) + chr(0b110000) + chr(881 - 830), 8065 - 8057), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(0b1101111) + '\x36' + chr(0b110011), 8), ehT0Px3KOsy9('\060' + chr(290 - 179) + chr(0b110001) + chr(51) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(0b11010 + 0o26) + '\x6f' + chr(49) + chr(0b11 + 0o55) + '\064', ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b101101 + 0o5) + chr(0b11 + 0o64) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(1055 - 1007) + chr(0b1011100 + 0o23) + '\x32' + '\067' + chr(1270 - 1221), 8), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(111) + '\x31' + chr(0b110011) + chr(1021 - 971), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1011001 + 0o26) + chr(51) + chr(0b1010 + 0o52) + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(2043 - 1995) + '\x6f' + chr(0b110111) + chr(1318 - 1270), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1011010 + 0o25) + chr(49) + chr(0b110101) + chr(52), 0o10), ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(0b1101111) + chr(0b110011) + chr(270 - 215), 55344 - 55336), ehT0Px3KOsy9(chr(48) + chr(111) + '\x31' + '\062' + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110010) + '\x30', 19468 - 19460), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(0b110000 + 0o77) + chr(1075 - 1024) + chr(49) + '\062', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1001000 + 0o47) + '\x33' + chr(55), 8), ehT0Px3KOsy9(chr(2202 - 2154) + '\157' + chr(2437 - 2386) + chr(2374 - 2325) + chr(50), 8), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(49) + '\065' + '\x37', 63749 - 63741), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b10010 + 0o40) + '\x35' + chr(0b1011 + 0o54), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(49) + chr(0b110111) + '\x30', 0b1000), ehT0Px3KOsy9(chr(0b11000 + 0o30) + '\x6f' + '\x33' + chr(218 - 168) + '\060', 58230 - 58222), ehT0Px3KOsy9(chr(1163 - 1115) + chr(111) + chr(50) + chr(0b110101) + chr(53), 0b1000), ehT0Px3KOsy9(chr(452 - 404) + chr(0b1100101 + 0o12) + chr(0b110011) + '\x36' + chr(54), 665 - 657), ehT0Px3KOsy9(chr(48) + chr(2323 - 2212) + chr(53) + chr(0b1100 + 0o46), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + '\067' + '\066', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1010001 + 0o36) + chr(0b110100) + chr(716 - 663), ord("\x08")), ehT0Px3KOsy9(chr(0b1101 + 0o43) + '\x6f' + chr(49) + chr(51) + chr(1177 - 1125), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110001) + chr(1840 - 1790) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(0b1011 + 0o45) + chr(0b1101111) + '\x32' + chr(0b110101) + chr(0b11011 + 0o34), 8), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(49) + chr(0b100011 + 0o17), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011100 + 0o23) + chr(49) + '\060' + chr(348 - 298), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(3566 - 3455) + chr(49) + chr(1369 - 1316) + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(205 - 157) + '\x6f' + chr(49) + '\x30', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x32' + chr(0b110111) + chr(51), 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\065' + chr(389 - 340), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(798 - 748) + chr(0b110100) + chr(0b110000), 2515 - 2507)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110101) + '\x30', 18881 - 18873)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xd3'), chr(6593 - 6493) + '\145' + chr(99) + chr(111) + chr(100) + chr(0b1010010 + 0o23))(chr(117) + chr(0b10011 + 0o141) + chr(1122 - 1020) + chr(0b101101) + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def Z4YDSWFz1Gfu(oVre8I6UXc3b, Alvsa0ue91Fo, DNoMzyusA3wb=None): if DNoMzyusA3wb is None or xafqLlk3kkUe(DNoMzyusA3wb, xafqLlk3kkUe(SXOLrMavuUCe(b'\xac\xd4^G\x0c\x16qhw\xed\xfa\x10'), chr(100) + chr(0b1100101) + '\143' + chr(111) + chr(0b101101 + 0o67) + chr(0b10110 + 0o117))(chr(117) + '\x74' + chr(0b1100110) + chr(45) + '\070')) is None: DNoMzyusA3wb = Alvsa0ue91Fo.k6thBf_tpghf if DNoMzyusA3wb is None or xafqLlk3kkUe(DNoMzyusA3wb, xafqLlk3kkUe(SXOLrMavuUCe(b'\xac\xd4^G\x0c\x16qhw\xed\xfa\x10'), chr(6942 - 6842) + chr(101) + chr(0b1100011) + chr(9887 - 9776) + '\144' + chr(9783 - 9682))(chr(10517 - 10400) + '\x74' + chr(0b111011 + 0o53) + chr(45) + chr(56))) is None: return ehT0Px3KOsy9(chr(1771 - 1723) + chr(0b1101111) + chr(49), 0o10) if xafqLlk3kkUe(Alvsa0ue91Fo, xafqLlk3kkUe(SXOLrMavuUCe(b'\x89\xffv\x19\x04:c/5\xc9\xc3\x1e'), chr(4406 - 4306) + chr(101) + chr(0b11000 + 0o113) + '\x6f' + chr(1733 - 1633) + chr(6952 - 6851))(chr(117) + chr(0b1100100 + 0o20) + '\x66' + chr(45) + '\070')) is None: xafqLlk3kkUe(hdK8qOUhR6Or, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb8\xecWp:7|\nu\xcc\xc1j'), '\x64' + chr(101) + chr(9331 - 9232) + '\157' + chr(7599 - 7499) + chr(0b1100101 + 0o0))('\165' + chr(0b1001110 + 0o46) + chr(102) + '\055' + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xa8\xd7RB7&\x13-+\x9b\xcb?\x91L\x03m00\xe7?\xa4\x00\x8f\n\xa5\xc3\x98OL\x0b'), chr(0b1100 + 0o130) + chr(0b1100101) + '\143' + chr(0b1101111) + chr(0b1100100) + chr(4988 - 4887))(chr(117) + chr(1449 - 1333) + '\x66' + '\x2d' + chr(0b110001 + 0o7))) xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x8e\xdcG\x7f(7R-1\xc8'), '\144' + chr(101) + chr(99) + chr(0b1101111) + chr(0b110001 + 0o63) + '\145')('\x75' + '\164' + chr(3148 - 3046) + chr(0b101101) + '\x38'))(Alvsa0ue91Fo, xafqLlk3kkUe(bKgNCjeVNupv, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb8\xebao\t'), chr(0b1100100) + chr(0b1100101) + '\x63' + chr(111) + '\144' + '\145')(chr(2545 - 2428) + '\164' + chr(0b11010 + 0o114) + chr(0b11101 + 0o20) + chr(0b100110 + 0o22)))) return ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(0b110101 + 0o72) + '\060', 0o10) try: QmmgWUB13VCJ = DNoMzyusA3wb.QmmgWUB13VCJ if xafqLlk3kkUe(DNoMzyusA3wb, xafqLlk3kkUe(SXOLrMavuUCe(b'\xae\xfe_H\x11/v\x0e6\xd9\xca8'), chr(0b1001 + 0o133) + chr(3811 - 3710) + chr(6957 - 6858) + chr(111) + '\x64' + chr(7757 - 7656))(chr(0b111100 + 0o71) + '\x74' + '\x66' + '\x2d' + '\x38')) == xafqLlk3kkUe(rxowUmkdemfv, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb0\xfc~o\t\x1a'), '\x64' + chr(0b1100101) + chr(0b1001010 + 0o31) + '\157' + '\x64' + chr(0b1100101))(chr(1287 - 1170) + chr(0b1100111 + 0o15) + '\146' + chr(0b101101) + '\070')): assert not PlSM16l2KDPD(QmmgWUB13VCJ, rxowUmkdemfv), wmQmyeWBmUpv(QmmgWUB13VCJ) xafqLlk3kkUe(Alvsa0ue91Fo.runner.restore_from_object, xafqLlk3kkUe(SXOLrMavuUCe(b'\x8f\xdc^O/&'), chr(0b10011 + 0o121) + chr(0b1100101) + chr(99) + chr(5385 - 5274) + chr(0b1010010 + 0o22) + '\145')(chr(117) + chr(6837 - 6721) + '\x66' + chr(1941 - 1896) + '\x38'))(QmmgWUB13VCJ) else: aS5y6eLFftup = H9zaXRrGK6Cq.get(Alvsa0ue91Fo.runner.current_ip.remote()) xafqLlk3kkUe(Alvsa0ue91Fo, xafqLlk3kkUe(SXOLrMavuUCe(b'\x8e\xc0]C\x04/\\>#\xde\xcb\x05\x96W3q0g\x95s\xa5\x0c\xce\x0c\xb9\xc2\x98'), '\144' + chr(101) + chr(0b1100011) + chr(0b1101111) + chr(7079 - 6979) + '\145')(chr(0b1110101) + '\164' + chr(1581 - 1479) + '\x2d' + '\x38'))(aS5y6eLFftup) with IhLRCTt_Dmej(xafqLlk3kkUe(SXOLrMavuUCe(b'\x8f\xdc@T41V\x06"\xc9\xd67\xbd\\\x05l>'), chr(0b1010001 + 0o23) + '\x65' + chr(0b110110 + 0o55) + chr(0b1101111) + chr(200 - 100) + chr(0b1010110 + 0o17))(chr(117) + chr(0b1110100) + '\x66' + chr(0b11101 + 0o20) + chr(0b111000))): xafqLlk3kkUe(H9zaXRrGK6Cq, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9a\xdcG'), '\x64' + '\145' + '\x63' + '\157' + chr(0b10001 + 0o123) + '\x65')(chr(117) + chr(116) + '\146' + '\x2d' + chr(2311 - 2255)))(xafqLlk3kkUe(Alvsa0ue91Fo.runner.restore, xafqLlk3kkUe(SXOLrMavuUCe(b'\x8f\xdc^O/&'), chr(0b1100100) + chr(5961 - 5860) + '\143' + '\157' + chr(0b110100 + 0o60) + '\145')(chr(0b1110100 + 0o1) + '\164' + chr(10029 - 9927) + '\055' + '\x38'))(QmmgWUB13VCJ)) Alvsa0ue91Fo.v56NCZmHSz5s = DNoMzyusA3wb.v56NCZmHSz5s return ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x31', 8) except jLmadlzMdunT: xafqLlk3kkUe(hdK8qOUhR6Or, xafqLlk3kkUe(SXOLrMavuUCe(b'\x98\xc1PE+7Z6*'), chr(0b1000110 + 0o36) + chr(0b10110 + 0o117) + chr(9648 - 9549) + '\x6f' + chr(100) + '\x65')(chr(12850 - 12733) + chr(12143 - 12027) + chr(0b111000 + 0o56) + '\055' + chr(0b10001 + 0o47)))(xafqLlk3kkUe(SXOLrMavuUCe(b"\xb8\xcbAO)cA<7\xcf\xd6(\x8bV\x0b?'e\xa4q\xaf\x1d\x8f\x1e\xbf\xdf\xd6~LL=<\x8f/1C"), '\144' + chr(101) + chr(99) + chr(0b110000 + 0o77) + chr(100) + chr(5532 - 5431))(chr(7309 - 7192) + chr(9060 - 8944) + chr(102) + chr(0b101101) + chr(0b10000 + 0o50)), Alvsa0ue91Fo) xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x8e\xdcG\x7f(7R-1\xc8'), chr(8588 - 8488) + chr(0b1001001 + 0o34) + '\x63' + chr(8994 - 8883) + chr(0b10 + 0o142) + chr(101))('\x75' + '\164' + '\146' + '\055' + chr(56)))(Alvsa0ue91Fo, xafqLlk3kkUe(bKgNCjeVNupv, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb8\xebao\t'), chr(0b110110 + 0o56) + '\145' + chr(0b1100011) + '\x6f' + chr(100) + '\x65')(chr(10764 - 10647) + chr(0b1110100) + '\146' + chr(45) + '\070'))) return ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x30', 8)
ray-project/ray
python/ray/tune/ray_trial_executor.py
RayTrialExecutor.export_trial_if_needed
def export_trial_if_needed(self, trial): """Exports model of this trial based on trial.export_formats. Return: A dict that maps ExportFormats to successfully exported models. """ if trial.export_formats and len(trial.export_formats) > 0: return ray.get( trial.runner.export_model.remote(trial.export_formats)) return {}
python
def export_trial_if_needed(self, trial): """Exports model of this trial based on trial.export_formats. Return: A dict that maps ExportFormats to successfully exported models. """ if trial.export_formats and len(trial.export_formats) > 0: return ray.get( trial.runner.export_model.remote(trial.export_formats)) return {}
[ "def", "export_trial_if_needed", "(", "self", ",", "trial", ")", ":", "if", "trial", ".", "export_formats", "and", "len", "(", "trial", ".", "export_formats", ")", ">", "0", ":", "return", "ray", ".", "get", "(", "trial", ".", "runner", ".", "export_model", ".", "remote", "(", "trial", ".", "export_formats", ")", ")", "return", "{", "}" ]
Exports model of this trial based on trial.export_formats. Return: A dict that maps ExportFormats to successfully exported models.
[ "Exports", "model", "of", "this", "trial", "based", "on", "trial", ".", "export_formats", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/tune/ray_trial_executor.py#L547-L556
train
Exports model of this trial based on export_formats.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,Rou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SoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(1598 - 1550) + chr(2015 - 1904) + chr(404 - 355) + '\066' + chr(55), 54449 - 54441), ehT0Px3KOsy9(chr(931 - 883) + chr(111) + '\067' + chr(2723 - 2669), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b10111 + 0o130) + '\061' + chr(0b0 + 0o66) + '\062', 33343 - 33335), ehT0Px3KOsy9(chr(48) + '\157' + '\063' + chr(252 - 201) + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b11001 + 0o35) + chr(0b100010 + 0o24), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b1011 + 0o46) + chr(0b100101 + 0o13) + chr(0b101100 + 0o5), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(2366 - 2315) + chr(0b110100) + chr(0b100011 + 0o15), 5257 - 5249), ehT0Px3KOsy9(chr(48) + '\157' + '\067' + chr(1381 - 1326), 37672 - 37664), ehT0Px3KOsy9(chr(0b10000 + 0o40) + '\157' + chr(0b110010) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(1896 - 1848) + chr(0b1101111) + '\x31' + chr(0b110011) + chr(0b110101), 40997 - 40989), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b101 + 0o55) + '\x31' + chr(0b101100 + 0o4), 0b1000), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(0b1101111) + '\x32' + '\062' + '\062', 7928 - 7920), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110010) + chr(0b10 + 0o63) + '\067', 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(51) + '\x37' + chr(0b11 + 0o61), 0o10), ehT0Px3KOsy9('\x30' + chr(7535 - 7424) + chr(0b110001) + chr(0b101101 + 0o3) + chr(54), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110001) + chr(954 - 905) + chr(1895 - 1844), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b1 + 0o60) + '\067' + chr(1036 - 986), 0b1000), ehT0Px3KOsy9(chr(48) + chr(2934 - 2823) + chr(49) + '\066' + chr(0b110110), 43869 - 43861), ehT0Px3KOsy9('\x30' + chr(0b10101 + 0o132) + chr(2594 - 2541) + '\066', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x31' + '\x34' + chr(0b1010 + 0o54), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110011) + chr(166 - 116) + chr(159 - 109), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b111101 + 0o62) + chr(2419 - 2368) + '\061' + chr(0b101110 + 0o4), 0b1000), ehT0Px3KOsy9('\x30' + chr(1180 - 1069) + chr(0b100000 + 0o21) + chr(0b110101) + chr(162 - 112), 0o10), ehT0Px3KOsy9('\060' + chr(10693 - 10582) + '\x33' + chr(50) + chr(1146 - 1095), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1100111 + 0o10) + '\062' + chr(49) + chr(50), 25505 - 25497), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b100010 + 0o23) + chr(1226 - 1172), 8), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\062' + chr(48) + chr(0b110101), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1537 - 1485) + chr(55), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(51) + chr(54) + '\066', 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + '\065' + chr(623 - 574), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\061' + '\060' + '\x33', 0b1000), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(111) + chr(49) + '\x33' + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(969 - 921) + chr(0b1101111) + '\061' + chr(2193 - 2145) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(1782 - 1734) + chr(111) + chr(2181 - 2131) + '\066' + chr(0b100100 + 0o22), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110001) + chr(49) + chr(0b10010 + 0o45), ord("\x08")), ehT0Px3KOsy9(chr(1311 - 1263) + '\x6f' + chr(0b10111 + 0o32) + chr(51) + '\x33', 0b1000), ehT0Px3KOsy9(chr(48) + chr(9951 - 9840) + chr(1038 - 983) + '\x31', 49426 - 49418), ehT0Px3KOsy9(chr(0b110000) + chr(2753 - 2642) + chr(369 - 320) + '\063' + chr(558 - 508), 8), ehT0Px3KOsy9(chr(209 - 161) + chr(0b1100011 + 0o14) + '\063' + chr(1151 - 1097) + '\067', 18586 - 18578), ehT0Px3KOsy9('\x30' + chr(0b111011 + 0o64) + chr(55), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(585 - 532) + chr(0b10101 + 0o33), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'Y'), chr(0b1100100) + chr(0b1101 + 0o130) + chr(99) + chr(0b1010110 + 0o31) + '\x64' + chr(0b1100101))('\165' + chr(116) + chr(2820 - 2718) + chr(1350 - 1305) + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def YhlIvPmOgpUM(oVre8I6UXc3b, Alvsa0ue91Fo): if xafqLlk3kkUe(Alvsa0ue91Fo, xafqLlk3kkUe(SXOLrMavuUCe(b'\x12F\x02\xb2D5\xbfY\x7f/\xe5\xf3\xdb\x8f'), chr(5766 - 5666) + chr(0b1100101) + chr(2077 - 1978) + chr(0b1000000 + 0o57) + chr(100) + chr(0b1000011 + 0o42))(chr(117) + chr(4867 - 4751) + chr(0b1011111 + 0o7) + chr(45) + chr(56))) and c2A0yzQpDQB3(xafqLlk3kkUe(Alvsa0ue91Fo, xafqLlk3kkUe(SXOLrMavuUCe(b'\x12F\x02\xb2D5\xbfY\x7f/\xe5\xf3\xdb\x8f'), '\x64' + chr(633 - 532) + chr(7183 - 7084) + chr(3515 - 3404) + chr(0b1011100 + 0o10) + '\145')('\x75' + '\164' + chr(102) + '\x2d' + chr(0b111000)))) > ehT0Px3KOsy9(chr(640 - 592) + '\157' + chr(48), 0b1000): return xafqLlk3kkUe(H9zaXRrGK6Cq, xafqLlk3kkUe(SXOLrMavuUCe(b'\x10[\x06'), chr(0b1100100) + chr(0b1100101) + chr(635 - 536) + chr(0b1101111 + 0o0) + '\x64' + '\x65')(chr(117) + '\x74' + chr(0b1100110) + '\x2d' + chr(0b111000)))(xafqLlk3kkUe(Alvsa0ue91Fo.runner.export_model, xafqLlk3kkUe(SXOLrMavuUCe(b'\x05[\x1f\xb2B$'), chr(0b110101 + 0o57) + '\145' + chr(0b1100011) + '\x6f' + '\144' + chr(0b1111 + 0o126))('\x75' + chr(0b1110100) + chr(0b1100110) + '\x2d' + '\x38'))(xafqLlk3kkUe(Alvsa0ue91Fo, xafqLlk3kkUe(SXOLrMavuUCe(b'\x12F\x02\xb2D5\xbfY\x7f/\xe5\xf3\xdb\x8f'), chr(4626 - 4526) + '\145' + chr(0b1100011) + '\157' + chr(0b1000100 + 0o40) + chr(0b1100101))('\165' + '\x74' + '\146' + '\055' + chr(290 - 234))))) return {}
ray-project/ray
python/ray/experimental/streaming/streaming.py
Environment.__generate_actor
def __generate_actor(self, instance_id, operator, input, output): """Generates an actor that will execute a particular instance of the logical operator Attributes: instance_id (UUID): The id of the instance the actor will execute. operator (Operator): The metadata of the logical operator. input (DataInput): The input gate that manages input channels of the instance (see: DataInput in communication.py). input (DataOutput): The output gate that manages output channels of the instance (see: DataOutput in communication.py). """ actor_id = (operator.id, instance_id) # Record the physical dataflow graph (for debugging purposes) self.__add_channel(actor_id, input, output) # Select actor to construct if operator.type == OpType.Source: source = operator_instance.Source.remote(actor_id, operator, input, output) source.register_handle.remote(source) return source.start.remote() elif operator.type == OpType.Map: map = operator_instance.Map.remote(actor_id, operator, input, output) map.register_handle.remote(map) return map.start.remote() elif operator.type == OpType.FlatMap: flatmap = operator_instance.FlatMap.remote(actor_id, operator, input, output) flatmap.register_handle.remote(flatmap) return flatmap.start.remote() elif operator.type == OpType.Filter: filter = operator_instance.Filter.remote(actor_id, operator, input, output) filter.register_handle.remote(filter) return filter.start.remote() elif operator.type == OpType.Reduce: reduce = operator_instance.Reduce.remote(actor_id, operator, input, output) reduce.register_handle.remote(reduce) return reduce.start.remote() elif operator.type == OpType.TimeWindow: pass elif operator.type == OpType.KeyBy: keyby = operator_instance.KeyBy.remote(actor_id, operator, input, output) keyby.register_handle.remote(keyby) return keyby.start.remote() elif operator.type == OpType.Sum: sum = operator_instance.Reduce.remote(actor_id, operator, input, output) # Register target handle at state actor state_actor = operator.state_actor if state_actor is not None: state_actor.register_target.remote(sum) # Register own handle sum.register_handle.remote(sum) return sum.start.remote() elif operator.type == OpType.Sink: pass elif operator.type == OpType.Inspect: inspect = operator_instance.Inspect.remote(actor_id, operator, input, output) inspect.register_handle.remote(inspect) return inspect.start.remote() elif operator.type == OpType.ReadTextFile: # TODO (john): Colocate the source with the input file read = operator_instance.ReadTextFile.remote( actor_id, operator, input, output) read.register_handle.remote(read) return read.start.remote() else: # TODO (john): Add support for other types of operators sys.exit("Unrecognized or unsupported {} operator type.".format( operator.type))
python
def __generate_actor(self, instance_id, operator, input, output): """Generates an actor that will execute a particular instance of the logical operator Attributes: instance_id (UUID): The id of the instance the actor will execute. operator (Operator): The metadata of the logical operator. input (DataInput): The input gate that manages input channels of the instance (see: DataInput in communication.py). input (DataOutput): The output gate that manages output channels of the instance (see: DataOutput in communication.py). """ actor_id = (operator.id, instance_id) # Record the physical dataflow graph (for debugging purposes) self.__add_channel(actor_id, input, output) # Select actor to construct if operator.type == OpType.Source: source = operator_instance.Source.remote(actor_id, operator, input, output) source.register_handle.remote(source) return source.start.remote() elif operator.type == OpType.Map: map = operator_instance.Map.remote(actor_id, operator, input, output) map.register_handle.remote(map) return map.start.remote() elif operator.type == OpType.FlatMap: flatmap = operator_instance.FlatMap.remote(actor_id, operator, input, output) flatmap.register_handle.remote(flatmap) return flatmap.start.remote() elif operator.type == OpType.Filter: filter = operator_instance.Filter.remote(actor_id, operator, input, output) filter.register_handle.remote(filter) return filter.start.remote() elif operator.type == OpType.Reduce: reduce = operator_instance.Reduce.remote(actor_id, operator, input, output) reduce.register_handle.remote(reduce) return reduce.start.remote() elif operator.type == OpType.TimeWindow: pass elif operator.type == OpType.KeyBy: keyby = operator_instance.KeyBy.remote(actor_id, operator, input, output) keyby.register_handle.remote(keyby) return keyby.start.remote() elif operator.type == OpType.Sum: sum = operator_instance.Reduce.remote(actor_id, operator, input, output) # Register target handle at state actor state_actor = operator.state_actor if state_actor is not None: state_actor.register_target.remote(sum) # Register own handle sum.register_handle.remote(sum) return sum.start.remote() elif operator.type == OpType.Sink: pass elif operator.type == OpType.Inspect: inspect = operator_instance.Inspect.remote(actor_id, operator, input, output) inspect.register_handle.remote(inspect) return inspect.start.remote() elif operator.type == OpType.ReadTextFile: # TODO (john): Colocate the source with the input file read = operator_instance.ReadTextFile.remote( actor_id, operator, input, output) read.register_handle.remote(read) return read.start.remote() else: # TODO (john): Add support for other types of operators sys.exit("Unrecognized or unsupported {} operator type.".format( operator.type))
[ "def", "__generate_actor", "(", "self", ",", "instance_id", ",", "operator", ",", "input", ",", "output", ")", ":", "actor_id", "=", "(", "operator", ".", "id", ",", "instance_id", ")", "# Record the physical dataflow graph (for debugging purposes)", "self", ".", "__add_channel", "(", "actor_id", ",", "input", ",", "output", ")", "# Select actor to construct", "if", "operator", ".", "type", "==", "OpType", ".", "Source", ":", "source", "=", "operator_instance", ".", "Source", ".", "remote", "(", "actor_id", ",", "operator", ",", "input", ",", "output", ")", "source", ".", "register_handle", ".", "remote", "(", "source", ")", "return", "source", ".", "start", ".", "remote", "(", ")", "elif", "operator", ".", "type", "==", "OpType", ".", "Map", ":", "map", "=", "operator_instance", ".", "Map", ".", "remote", "(", "actor_id", ",", "operator", ",", "input", ",", "output", ")", "map", ".", "register_handle", ".", "remote", "(", "map", ")", "return", "map", ".", "start", ".", "remote", "(", ")", "elif", "operator", ".", "type", "==", "OpType", ".", "FlatMap", ":", "flatmap", "=", "operator_instance", ".", "FlatMap", ".", "remote", "(", "actor_id", ",", "operator", ",", "input", ",", "output", ")", "flatmap", ".", "register_handle", ".", "remote", "(", "flatmap", ")", "return", "flatmap", ".", "start", ".", "remote", "(", ")", "elif", "operator", ".", "type", "==", "OpType", ".", "Filter", ":", "filter", "=", "operator_instance", ".", "Filter", ".", "remote", "(", "actor_id", ",", "operator", ",", "input", ",", "output", ")", "filter", ".", "register_handle", ".", "remote", "(", "filter", ")", "return", "filter", ".", "start", ".", "remote", "(", ")", "elif", "operator", ".", "type", "==", "OpType", ".", "Reduce", ":", "reduce", "=", "operator_instance", ".", "Reduce", ".", "remote", "(", "actor_id", ",", "operator", ",", "input", ",", "output", ")", "reduce", ".", "register_handle", ".", "remote", "(", "reduce", ")", "return", "reduce", ".", "start", ".", "remote", "(", ")", "elif", "operator", ".", "type", "==", "OpType", ".", "TimeWindow", ":", "pass", "elif", "operator", ".", "type", "==", "OpType", ".", "KeyBy", ":", "keyby", "=", "operator_instance", ".", "KeyBy", ".", "remote", "(", "actor_id", ",", "operator", ",", "input", ",", "output", ")", "keyby", ".", "register_handle", ".", "remote", "(", "keyby", ")", "return", "keyby", ".", "start", ".", "remote", "(", ")", "elif", "operator", ".", "type", "==", "OpType", ".", "Sum", ":", "sum", "=", "operator_instance", ".", "Reduce", ".", "remote", "(", "actor_id", ",", "operator", ",", "input", ",", "output", ")", "# Register target handle at state actor", "state_actor", "=", "operator", ".", "state_actor", "if", "state_actor", "is", "not", "None", ":", "state_actor", ".", "register_target", ".", "remote", "(", "sum", ")", "# Register own handle", "sum", ".", "register_handle", ".", "remote", "(", "sum", ")", "return", "sum", ".", "start", ".", "remote", "(", ")", "elif", "operator", ".", "type", "==", "OpType", ".", "Sink", ":", "pass", "elif", "operator", ".", "type", "==", "OpType", ".", "Inspect", ":", "inspect", "=", "operator_instance", ".", "Inspect", ".", "remote", "(", "actor_id", ",", "operator", ",", "input", ",", "output", ")", "inspect", ".", "register_handle", ".", "remote", "(", "inspect", ")", "return", "inspect", ".", "start", ".", "remote", "(", ")", "elif", "operator", ".", "type", "==", "OpType", ".", "ReadTextFile", ":", "# TODO (john): Colocate the source with the input file", "read", "=", "operator_instance", ".", "ReadTextFile", ".", "remote", "(", "actor_id", ",", "operator", ",", "input", ",", "output", ")", "read", ".", "register_handle", ".", "remote", "(", "read", ")", "return", "read", ".", "start", ".", "remote", "(", ")", "else", ":", "# TODO (john): Add support for other types of operators", "sys", ".", "exit", "(", "\"Unrecognized or unsupported {} operator type.\"", ".", "format", "(", "operator", ".", "type", ")", ")" ]
Generates an actor that will execute a particular instance of the logical operator Attributes: instance_id (UUID): The id of the instance the actor will execute. operator (Operator): The metadata of the logical operator. input (DataInput): The input gate that manages input channels of the instance (see: DataInput in communication.py). input (DataOutput): The output gate that manages output channels of the instance (see: DataOutput in communication.py).
[ "Generates", "an", "actor", "that", "will", "execute", "a", "particular", "instance", "of", "the", "logical", "operator" ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/experimental/streaming/streaming.py#L96-L169
train
Generates an actor that will execute a particular instance of the logical operator.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPvpP4xdo3,cW7yQuyEnJ6E,KOHQGQ8qL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t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b10111 + 0o31) + chr(0b1100100 + 0o13) + chr(2248 - 2198) + chr(0b101111 + 0o7) + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\062' + '\x30' + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b10001 + 0o136) + '\x36' + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(1773 - 1725) + '\157' + chr(50) + '\x34' + '\x34', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1001100 + 0o43) + chr(0b110010) + chr(53) + chr(2418 - 2366), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\063' + chr(0b110101) + chr(0b100100 + 0o21), 0b1000), ehT0Px3KOsy9(chr(533 - 485) + chr(111) + chr(0b1101 + 0o45) + chr(1396 - 1342) + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\061' + chr(50) + chr(771 - 716), 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\063' + chr(51) + '\067', 41038 - 41030), ehT0Px3KOsy9(chr(857 - 809) + chr(0b1101111) + '\065' + '\x34', 0o10), ehT0Px3KOsy9(chr(212 - 164) + chr(0b1101111) + chr(0b110011) + '\066', 0b1000), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(0b1101111) + '\x33' + chr(0b1101 + 0o43) + chr(708 - 654), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110011) + '\x33' + chr(52), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011011 + 0o24) + '\x32' + '\x37', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\063' + chr(0b110100) + chr(0b110101), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101010 + 0o5) + '\x36' + '\067', 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(2757 - 2704), 5546 - 5538), ehT0Px3KOsy9(chr(0b111 + 0o51) + '\x6f' + chr(49) + chr(0b0 + 0o62) + chr(670 - 617), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(3787 - 3676) + chr(1809 - 1760) + '\062', 0b1000), ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(111) + chr(405 - 355) + chr(0b110111) + '\x32', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b101000 + 0o107) + '\067' + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b11100 + 0o26) + chr(0b100111 + 0o14) + chr(0b11000 + 0o32), 22332 - 22324), ehT0Px3KOsy9(chr(307 - 259) + '\x6f' + '\x31' + '\x32' + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(283 - 235) + '\x6f' + chr(0b110011) + chr(353 - 304) + chr(0b110110), 62757 - 62749), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110001) + chr(0b1101 + 0o43) + chr(48), 0o10), ehT0Px3KOsy9(chr(0b100110 + 0o12) + '\157' + chr(428 - 379) + chr(0b101001 + 0o13), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101 + 0o142) + '\x33' + chr(1945 - 1894) + chr(0b100010 + 0o25), 8), ehT0Px3KOsy9('\x30' + chr(6691 - 6580) + '\x33' + '\x34', 55790 - 55782), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b101111 + 0o4) + chr(2264 - 2211) + chr(326 - 273), 8), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(111) + chr(0b110001) + chr(0b110010 + 0o1) + '\x36', 64282 - 64274), ehT0Px3KOsy9(chr(1870 - 1822) + chr(111) + chr(992 - 941) + chr(50) + chr(0b110100), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1011101 + 0o22) + chr(868 - 817), 0b1000), ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(111) + chr(0b101110 + 0o5) + chr(0b110001 + 0o0) + chr(2706 - 2652), 8), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b10100 + 0o35) + chr(1272 - 1222) + '\x36', 25150 - 25142), ehT0Px3KOsy9(chr(0b110000) + chr(7082 - 6971) + chr(0b110010) + chr(0b11001 + 0o33) + '\x34', 8), ehT0Px3KOsy9(chr(48) + chr(111) + chr(599 - 548) + '\x33', 58954 - 58946), ehT0Px3KOsy9('\060' + chr(3037 - 2926) + chr(49) + '\x36' + '\067', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(1958 - 1908) + chr(785 - 734) + chr(1854 - 1804), 8), ehT0Px3KOsy9(chr(1018 - 970) + chr(0b10000 + 0o137) + '\065' + chr(0b110100), 8), ehT0Px3KOsy9(chr(0b100010 + 0o16) + '\157' + '\063' + chr(0b110100) + '\063', ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + '\157' + '\x35' + '\x30', 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x9c'), chr(0b1100100) + chr(1250 - 1149) + '\143' + '\157' + chr(7334 - 7234) + '\145')(chr(0b1110101) + '\x74' + '\146' + '\055' + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def j2WUPIIGQN48(oVre8I6UXc3b, pj8u1hDpF7b4, xJShi6yitBWy, Y3jVKaC8LEDU, e1jVqMSBZ01Y): CitUWzhkzn0O = (xJShi6yitBWy.z8EhBlYI2Bx4, pj8u1hDpF7b4) xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xed\xddW\xc0\xc8\xb2\xd5?\xbeBp\xa3\xb0'), chr(4096 - 3996) + chr(0b1111 + 0o126) + chr(0b1100011) + chr(0b1101111) + chr(1816 - 1716) + chr(6841 - 6740))(chr(0b10101 + 0o140) + chr(0b10011 + 0o141) + '\146' + chr(0b101101) + '\x38'))(CitUWzhkzn0O, Y3jVKaC8LEDU, e1jVqMSBZ01Y) if xafqLlk3kkUe(xJShi6yitBWy, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc5\xefg\xc9\xd5\x88\xe1\x15\xb2yn\xb0'), chr(0b1100100) + '\x65' + chr(7097 - 6998) + '\x6f' + chr(0b1100100) + chr(3223 - 3122))('\x75' + '\164' + chr(0b0 + 0o146) + chr(0b11100 + 0o21) + chr(0b111000))) == xafqLlk3kkUe(llBkVzKbPFml, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe1\xedC\xd6\xcf\x88'), chr(100) + chr(101) + '\x63' + '\x6f' + '\x64' + chr(101))('\x75' + chr(1089 - 973) + chr(0b1100110) + chr(0b101000 + 0o5) + chr(56))): Qas9W3D0Xbzi = k_lMT1iWDq7v.Source.remote(CitUWzhkzn0O, xJShi6yitBWy, Y3jVKaC8LEDU, e1jVqMSBZ01Y) xafqLlk3kkUe(Qas9W3D0Xbzi.register_handle, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc0\xe7[\xcb\xd8\x88'), chr(2633 - 2533) + chr(101) + chr(99) + '\157' + chr(0b1100100) + chr(101))(chr(117) + '\x74' + chr(417 - 315) + '\x2d' + chr(0b10010 + 0o46)))(Qas9W3D0Xbzi) return xafqLlk3kkUe(Qas9W3D0Xbzi.start, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc0\xe7[\xcb\xd8\x88'), chr(0b100110 + 0o76) + chr(0b1100101) + chr(1829 - 1730) + chr(0b111010 + 0o65) + '\x64' + chr(9010 - 8909))('\165' + '\164' + chr(102) + chr(635 - 590) + chr(0b111000)))() elif xafqLlk3kkUe(xJShi6yitBWy, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc5\xefg\xc9\xd5\x88\xe1\x15\xb2yn\xb0'), chr(510 - 410) + chr(0b111000 + 0o55) + chr(3779 - 3680) + chr(111) + '\x64' + '\145')(chr(11832 - 11715) + chr(0b1010111 + 0o35) + chr(0b1100110) + chr(0b101101) + '\x38')) == xafqLlk3kkUe(llBkVzKbPFml, xafqLlk3kkUe(SXOLrMavuUCe(b'\xff\xe3F'), chr(0b110010 + 0o62) + '\145' + chr(99) + chr(9065 - 8954) + chr(100) + '\145')('\x75' + '\164' + chr(0b1100110) + '\x2d' + chr(2115 - 2059))): abA97kOQKaLo = k_lMT1iWDq7v.Map.remote(CitUWzhkzn0O, xJShi6yitBWy, Y3jVKaC8LEDU, e1jVqMSBZ01Y) xafqLlk3kkUe(abA97kOQKaLo.register_handle, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc0\xe7[\xcb\xd8\x88'), chr(0b1010011 + 0o21) + chr(101) + chr(0b101011 + 0o70) + '\157' + chr(4170 - 4070) + '\x65')('\165' + '\164' + '\146' + chr(0b101101) + '\070'))(abA97kOQKaLo) return xafqLlk3kkUe(abA97kOQKaLo.start, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc0\xe7[\xcb\xd8\x88'), chr(0b111011 + 0o51) + chr(0b1010011 + 0o22) + chr(6042 - 5943) + chr(111) + '\x64' + chr(101))('\x75' + '\164' + '\x66' + chr(0b100001 + 0o14) + '\070'))() elif xafqLlk3kkUe(xJShi6yitBWy, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc5\xefg\xc9\xd5\x88\xe1\x15\xb2yn\xb0'), chr(0b1100100) + chr(0b1001010 + 0o33) + chr(0b1011010 + 0o11) + chr(0b1101001 + 0o6) + chr(100) + '\x65')('\x75' + chr(685 - 569) + chr(4866 - 4764) + chr(1169 - 1124) + '\x38')) == xafqLlk3kkUe(llBkVzKbPFml, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf4\xeeW\xd0\xe1\x8c\xc6'), chr(100) + '\145' + '\143' + chr(111) + '\x64' + chr(4405 - 4304))(chr(0b1110101) + chr(116) + chr(6363 - 6261) + chr(0b11000 + 0o25) + chr(0b1000 + 0o60))): wNZTF8UIeNMx = k_lMT1iWDq7v.FlatMap.remote(CitUWzhkzn0O, xJShi6yitBWy, Y3jVKaC8LEDU, e1jVqMSBZ01Y) xafqLlk3kkUe(wNZTF8UIeNMx.register_handle, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc0\xe7[\xcb\xd8\x88'), '\x64' + chr(101) + '\x63' + chr(3112 - 3001) + chr(8309 - 8209) + chr(101))('\x75' + chr(0b1110100) + '\x66' + '\055' + chr(56)))(wNZTF8UIeNMx) return xafqLlk3kkUe(wNZTF8UIeNMx.start, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc0\xe7[\xcb\xd8\x88'), '\144' + '\x65' + chr(9267 - 9168) + '\157' + chr(0b1100100) + chr(5963 - 5862))(chr(0b10001 + 0o144) + chr(4088 - 3972) + chr(0b11100 + 0o112) + '\x2d' + chr(0b101101 + 0o13)))() elif xafqLlk3kkUe(xJShi6yitBWy, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc5\xefg\xc9\xd5\x88\xe1\x15\xb2yn\xb0'), '\144' + chr(0b10011 + 0o122) + '\143' + '\x6f' + chr(7631 - 7531) + '\x65')('\165' + chr(0b1110100) + '\146' + '\x2d' + chr(0b11000 + 0o40))) == xafqLlk3kkUe(llBkVzKbPFml, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf4\xebZ\xd0\xc9\x9f'), chr(0b101010 + 0o72) + '\x65' + chr(8187 - 8088) + '\x6f' + '\144' + chr(5506 - 5405))('\165' + chr(116) + '\x66' + chr(771 - 726) + '\x38')): hi1V0ySZcNds = k_lMT1iWDq7v.Filter.remote(CitUWzhkzn0O, xJShi6yitBWy, Y3jVKaC8LEDU, e1jVqMSBZ01Y) xafqLlk3kkUe(hi1V0ySZcNds.register_handle, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc0\xe7[\xcb\xd8\x88'), '\144' + chr(3272 - 3171) + chr(1333 - 1234) + chr(0b1000001 + 0o56) + chr(0b1100100) + '\145')(chr(0b100011 + 0o122) + '\164' + chr(0b1100110) + '\055' + chr(56)))(hi1V0ySZcNds) return xafqLlk3kkUe(hi1V0ySZcNds.start, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc0\xe7[\xcb\xd8\x88'), chr(7294 - 7194) + chr(4001 - 3900) + chr(0b11011 + 0o110) + chr(0b1101111) + chr(1696 - 1596) + '\x65')('\165' + '\x74' + chr(910 - 808) + chr(513 - 468) + chr(1680 - 1624)))() elif xafqLlk3kkUe(xJShi6yitBWy, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc5\xefg\xc9\xd5\x88\xe1\x15\xb2yn\xb0'), chr(100) + chr(0b10111 + 0o116) + chr(4593 - 4494) + chr(0b1010 + 0o145) + '\144' + '\x65')(chr(0b1110101) + chr(116) + chr(9412 - 9310) + chr(1050 - 1005) + '\070')) == xafqLlk3kkUe(llBkVzKbPFml, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe0\xe7R\xd1\xcf\x88'), chr(100) + '\x65' + chr(1889 - 1790) + chr(111) + chr(7791 - 7691) + chr(0b1100101))('\x75' + '\164' + chr(102) + chr(45) + '\070')): RSYsB9TMxo_y = k_lMT1iWDq7v.Reduce.remote(CitUWzhkzn0O, xJShi6yitBWy, Y3jVKaC8LEDU, e1jVqMSBZ01Y) xafqLlk3kkUe(RSYsB9TMxo_y.register_handle, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc0\xe7[\xcb\xd8\x88'), '\144' + '\145' + chr(0b1100011) + chr(111) + '\144' + chr(0b1100101))('\165' + chr(0b1110100) + '\146' + '\x2d' + chr(0b10 + 0o66)))(RSYsB9TMxo_y) return xafqLlk3kkUe(RSYsB9TMxo_y.start, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc0\xe7[\xcb\xd8\x88'), chr(0b1100100) + chr(0b1100101) + '\143' + '\157' + '\144' + '\x65')(chr(0b1101100 + 0o11) + chr(116) + '\146' + chr(0b1100 + 0o41) + chr(0b101111 + 0o11)))() elif xafqLlk3kkUe(xJShi6yitBWy, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc5\xefg\xc9\xd5\x88\xe1\x15\xb2yn\xb0'), chr(0b1100100) + chr(0b1100101) + chr(99) + chr(0b1101011 + 0o4) + '\144' + chr(0b1100101))('\x75' + '\x74' + chr(0b1100110) + chr(0b100110 + 0o7) + '\070')) == xafqLlk3kkUe(llBkVzKbPFml, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe6\xeb[\xc1\xfb\x84\xd83\xb0['), '\144' + chr(0b1100101) + chr(99) + chr(12186 - 12075) + chr(4585 - 4485) + chr(101))('\165' + chr(116) + '\x66' + chr(888 - 843) + '\x38')): pass elif xafqLlk3kkUe(xJShi6yitBWy, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc5\xefg\xc9\xd5\x88\xe1\x15\xb2yn\xb0'), chr(100) + chr(0b1100101) + chr(99) + chr(0b1010101 + 0o32) + chr(0b1100100) + '\x65')(chr(3127 - 3010) + chr(4121 - 4005) + '\146' + chr(0b101101) + '\070')) == xafqLlk3kkUe(llBkVzKbPFml, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf9\xe7O\xe6\xd5'), '\x64' + '\145' + chr(0b10000 + 0o123) + chr(0b11100 + 0o123) + chr(6053 - 5953) + '\145')('\165' + chr(0b1110100) + '\x66' + chr(45) + chr(0b100100 + 0o24))): ZF6x75mwi1fj = k_lMT1iWDq7v.KeyBy.remote(CitUWzhkzn0O, xJShi6yitBWy, Y3jVKaC8LEDU, e1jVqMSBZ01Y) xafqLlk3kkUe(ZF6x75mwi1fj.register_handle, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc0\xe7[\xcb\xd8\x88'), chr(0b1100100) + chr(2081 - 1980) + chr(0b10101 + 0o116) + chr(3704 - 3593) + chr(0b1100100) + chr(0b1100101))(chr(3833 - 3716) + chr(13145 - 13029) + chr(102) + '\055' + chr(0b110101 + 0o3)))(ZF6x75mwi1fj) return xafqLlk3kkUe(ZF6x75mwi1fj.start, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc0\xe7[\xcb\xd8\x88'), '\x64' + '\x65' + '\143' + '\157' + chr(100) + '\x65')(chr(117) + chr(116) + chr(0b1100110) + chr(842 - 797) + chr(0b1010 + 0o56)))() elif xafqLlk3kkUe(xJShi6yitBWy, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc5\xefg\xc9\xd5\x88\xe1\x15\xb2yn\xb0'), chr(0b1100001 + 0o3) + '\x65' + chr(0b1100011) + chr(0b1011101 + 0o22) + chr(100) + '\145')(chr(117) + '\164' + chr(0b10110 + 0o120) + chr(1228 - 1183) + chr(1077 - 1021))) == xafqLlk3kkUe(llBkVzKbPFml, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe1\xf7['), chr(9748 - 9648) + chr(1768 - 1667) + chr(4701 - 4602) + chr(0b1101111) + chr(0b1100100) + chr(0b110001 + 0o64))('\165' + chr(116) + '\x66' + chr(0b11000 + 0o25) + '\x38')): xkxBmo49x2An = k_lMT1iWDq7v.Reduce.remote(CitUWzhkzn0O, xJShi6yitBWy, Y3jVKaC8LEDU, e1jVqMSBZ01Y) MLgbTcmn7FnG = xJShi6yitBWy.state_actor if MLgbTcmn7FnG is not None: xafqLlk3kkUe(MLgbTcmn7FnG.register_target, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc0\xe7[\xcb\xd8\x88'), chr(0b1100100) + chr(0b1100101) + '\x63' + chr(0b1101111) + chr(0b101100 + 0o70) + chr(7214 - 7113))(chr(0b1110101) + chr(116) + chr(4307 - 4205) + chr(0b101101) + chr(0b111000)))(xkxBmo49x2An) xafqLlk3kkUe(xkxBmo49x2An.register_handle, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc0\xe7[\xcb\xd8\x88'), chr(0b11110 + 0o106) + chr(0b1100101) + chr(99) + chr(111) + chr(0b1000011 + 0o41) + chr(6211 - 6110))('\165' + chr(0b101010 + 0o112) + '\x66' + '\x2d' + '\x38'))(xkxBmo49x2An) return xafqLlk3kkUe(xkxBmo49x2An.start, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc0\xe7[\xcb\xd8\x88'), '\144' + chr(0b1011010 + 0o13) + '\x63' + chr(654 - 543) + chr(0b1100100) + chr(0b10000 + 0o125))(chr(117) + chr(0b101000 + 0o114) + '\x66' + '\x2d' + chr(0b101101 + 0o13)))() elif xafqLlk3kkUe(xJShi6yitBWy, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc5\xefg\xc9\xd5\x88\xe1\x15\xb2yn\xb0'), '\x64' + '\145' + chr(99) + chr(0b1101111) + chr(0b1100100) + chr(10150 - 10049))('\x75' + '\164' + '\x66' + '\055' + chr(0b111000))) == xafqLlk3kkUe(llBkVzKbPFml, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe1\xebX\xcf'), '\144' + chr(0b1100101) + chr(99) + chr(111) + chr(100) + chr(0b1010100 + 0o21))(chr(0b1110101) + chr(116) + '\146' + '\055' + chr(0b111000))): pass elif xafqLlk3kkUe(xJShi6yitBWy, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc5\xefg\xc9\xd5\x88\xe1\x15\xb2yn\xb0'), '\144' + chr(0b1100101) + '\x63' + chr(0b1010001 + 0o36) + chr(8226 - 8126) + '\145')('\x75' + '\164' + chr(102) + chr(0b100111 + 0o6) + chr(505 - 449))) == xafqLlk3kkUe(llBkVzKbPFml, xafqLlk3kkUe(SXOLrMavuUCe(b'\xfb\xecE\xd4\xc9\x8e\xc2'), chr(0b10101 + 0o117) + '\x65' + chr(3738 - 3639) + '\157' + '\x64' + '\145')('\165' + '\x74' + chr(1798 - 1696) + chr(989 - 944) + chr(0b11001 + 0o37))): kzXqv8ZZwm75 = k_lMT1iWDq7v.Inspect.remote(CitUWzhkzn0O, xJShi6yitBWy, Y3jVKaC8LEDU, e1jVqMSBZ01Y) xafqLlk3kkUe(kzXqv8ZZwm75.register_handle, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc0\xe7[\xcb\xd8\x88'), '\x64' + chr(0b101001 + 0o74) + '\143' + '\157' + chr(9369 - 9269) + chr(0b101100 + 0o71))(chr(0b10111 + 0o136) + chr(116) + chr(0b11000 + 0o116) + '\055' + chr(0b100110 + 0o22)))(kzXqv8ZZwm75) return xafqLlk3kkUe(kzXqv8ZZwm75.start, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc0\xe7[\xcb\xd8\x88'), chr(7509 - 7409) + '\145' + '\143' + '\157' + chr(0b10011 + 0o121) + chr(101))(chr(117) + chr(0b1110100) + chr(102) + chr(0b110 + 0o47) + chr(602 - 546)))() elif xafqLlk3kkUe(xJShi6yitBWy, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc5\xefg\xc9\xd5\x88\xe1\x15\xb2yn\xb0'), chr(100) + chr(101) + '\143' + chr(5381 - 5270) + chr(0b1100100) + chr(0b1010 + 0o133))(chr(117) + chr(0b1110000 + 0o4) + '\146' + chr(0b101101) + chr(56))) == xafqLlk3kkUe(llBkVzKbPFml, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe0\xe7W\xc0\xf8\x88\xce#\x99Er\xa3'), chr(0b1100100) + chr(101) + '\x63' + chr(3918 - 3807) + chr(4723 - 4623) + chr(0b10001 + 0o124))('\x75' + chr(4976 - 4860) + chr(102) + chr(45) + chr(0b111000))): U6MiWrhuCi2Y = k_lMT1iWDq7v.ReadTextFile.remote(CitUWzhkzn0O, xJShi6yitBWy, Y3jVKaC8LEDU, e1jVqMSBZ01Y) xafqLlk3kkUe(U6MiWrhuCi2Y.register_handle, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc0\xe7[\xcb\xd8\x88'), '\x64' + chr(0b1001111 + 0o26) + chr(0b0 + 0o143) + chr(111) + chr(0b1100100) + chr(0b1100101))('\x75' + '\x74' + chr(0b1100110) + chr(0b100001 + 0o14) + chr(56)))(U6MiWrhuCi2Y) return xafqLlk3kkUe(U6MiWrhuCi2Y.start, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc0\xe7[\xcb\xd8\x88'), chr(0b1100100) + chr(101) + chr(0b1100011) + chr(11114 - 11003) + chr(8354 - 8254) + chr(9534 - 9433))('\x75' + '\x74' + '\x66' + chr(0b100110 + 0o7) + '\070'))() else: xafqLlk3kkUe(a2SYDDomXDZ2, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd7\xfa_\xd0'), chr(0b1100100) + '\x65' + '\143' + chr(0b1000001 + 0o56) + chr(8440 - 8340) + '\145')('\165' + chr(8604 - 8488) + chr(0b1100110) + chr(1459 - 1414) + '\070'))(xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b'\xe7\xecD\xc1\xcf\x82\xd19\xb6V{\xa2\xfcx\x97\x17p;y\xcfL\xea=\xbc4i\xbb<\x96#\xf4l\xbe3\xd6z\x03\xf5^\xc3\xc6\xfbF\xc1\x82'), chr(0b1100100) + chr(3751 - 3650) + chr(0b1100011) + '\x6f' + chr(3835 - 3735) + chr(0b1100101))('\165' + chr(0b1110100) + chr(213 - 111) + chr(518 - 473) + chr(1905 - 1849)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xe4\xb6D\xcb\xe4\x8c\xe5d\x8f\\{\xac'), chr(100) + '\145' + '\x63' + '\157' + '\x64' + chr(0b1100101))(chr(4452 - 4335) + chr(116) + chr(102) + chr(136 - 91) + '\070'))(xafqLlk3kkUe(xJShi6yitBWy, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc5\xefg\xc9\xd5\x88\xe1\x15\xb2yn\xb0'), '\144' + chr(0b1100101) + chr(0b111100 + 0o47) + '\157' + '\144' + chr(0b101100 + 0o71))(chr(4851 - 4734) + chr(0b1110100) + chr(0b1100110) + '\055' + '\070'))))
ray-project/ray
python/ray/experimental/streaming/streaming.py
Environment.__generate_actors
def __generate_actors(self, operator, upstream_channels, downstream_channels): """Generates one actor for each instance of the given logical operator. Attributes: operator (Operator): The logical operator metadata. upstream_channels (list): A list of all upstream channels for all instances of the operator. downstream_channels (list): A list of all downstream channels for all instances of the operator. """ num_instances = operator.num_instances logger.info("Generating {} actors of type {}...".format( num_instances, operator.type)) in_channels = upstream_channels.pop( operator.id) if upstream_channels else [] handles = [] for i in range(num_instances): # Collect input and output channels for the particular instance ip = [ channel for channel in in_channels if channel.dst_instance_id == i ] if in_channels else [] op = [ channel for channels_list in downstream_channels.values() for channel in channels_list if channel.src_instance_id == i ] log = "Constructed {} input and {} output channels " log += "for the {}-th instance of the {} operator." logger.debug(log.format(len(ip), len(op), i, operator.type)) input_gate = DataInput(ip) output_gate = DataOutput(op, operator.partitioning_strategies) handle = self.__generate_actor(i, operator, input_gate, output_gate) if handle: handles.append(handle) return handles
python
def __generate_actors(self, operator, upstream_channels, downstream_channels): """Generates one actor for each instance of the given logical operator. Attributes: operator (Operator): The logical operator metadata. upstream_channels (list): A list of all upstream channels for all instances of the operator. downstream_channels (list): A list of all downstream channels for all instances of the operator. """ num_instances = operator.num_instances logger.info("Generating {} actors of type {}...".format( num_instances, operator.type)) in_channels = upstream_channels.pop( operator.id) if upstream_channels else [] handles = [] for i in range(num_instances): # Collect input and output channels for the particular instance ip = [ channel for channel in in_channels if channel.dst_instance_id == i ] if in_channels else [] op = [ channel for channels_list in downstream_channels.values() for channel in channels_list if channel.src_instance_id == i ] log = "Constructed {} input and {} output channels " log += "for the {}-th instance of the {} operator." logger.debug(log.format(len(ip), len(op), i, operator.type)) input_gate = DataInput(ip) output_gate = DataOutput(op, operator.partitioning_strategies) handle = self.__generate_actor(i, operator, input_gate, output_gate) if handle: handles.append(handle) return handles
[ "def", "__generate_actors", "(", "self", ",", "operator", ",", "upstream_channels", ",", "downstream_channels", ")", ":", "num_instances", "=", "operator", ".", "num_instances", "logger", ".", "info", "(", "\"Generating {} actors of type {}...\"", ".", "format", "(", "num_instances", ",", "operator", ".", "type", ")", ")", "in_channels", "=", "upstream_channels", ".", "pop", "(", "operator", ".", "id", ")", "if", "upstream_channels", "else", "[", "]", "handles", "=", "[", "]", "for", "i", "in", "range", "(", "num_instances", ")", ":", "# Collect input and output channels for the particular instance", "ip", "=", "[", "channel", "for", "channel", "in", "in_channels", "if", "channel", ".", "dst_instance_id", "==", "i", "]", "if", "in_channels", "else", "[", "]", "op", "=", "[", "channel", "for", "channels_list", "in", "downstream_channels", ".", "values", "(", ")", "for", "channel", "in", "channels_list", "if", "channel", ".", "src_instance_id", "==", "i", "]", "log", "=", "\"Constructed {} input and {} output channels \"", "log", "+=", "\"for the {}-th instance of the {} operator.\"", "logger", ".", "debug", "(", "log", ".", "format", "(", "len", "(", "ip", ")", ",", "len", "(", "op", ")", ",", "i", ",", "operator", ".", "type", ")", ")", "input_gate", "=", "DataInput", "(", "ip", ")", "output_gate", "=", "DataOutput", "(", "op", ",", "operator", ".", "partitioning_strategies", ")", "handle", "=", "self", ".", "__generate_actor", "(", "i", ",", "operator", ",", "input_gate", ",", "output_gate", ")", "if", "handle", ":", "handles", ".", "append", "(", "handle", ")", "return", "handles" ]
Generates one actor for each instance of the given logical operator. Attributes: operator (Operator): The logical operator metadata. upstream_channels (list): A list of all upstream channels for all instances of the operator. downstream_channels (list): A list of all downstream channels for all instances of the operator.
[ "Generates", "one", "actor", "for", "each", "instance", "of", "the", "given", "logical", "operator", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/experimental/streaming/streaming.py#L173-L210
train
Generates one actor for each instance of the given logicalCOOKIE.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,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9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110010) + chr(52) + chr(0b10111 + 0o40), ord("\x08")), ehT0Px3KOsy9('\060' + chr(3196 - 3085) + '\x33' + '\x37' + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(1061 - 1013) + chr(0b1101101 + 0o2) + chr(50) + chr(0b110010) + chr(0b1001 + 0o51), 0b1000), ehT0Px3KOsy9(chr(987 - 939) + chr(111) + chr(0b100001 + 0o22) + '\064' + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110010) + chr(0b10011 + 0o43) + '\062', 0o10), ehT0Px3KOsy9(chr(1834 - 1786) + chr(0b1101111) + chr(1706 - 1656) + chr(51) + chr(0b110100), 34042 - 34034), ehT0Px3KOsy9(chr(975 - 927) + chr(111) + '\x32' + chr(0b110111) + chr(0b110 + 0o57), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b100000 + 0o24) + chr(0b101000 + 0o17), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(485 - 436) + chr(49) + chr(0b110001 + 0o1), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(2344 - 2294) + chr(1804 - 1756) + chr(0b110110), 4328 - 4320), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x32' + '\066' + chr(0b10000 + 0o42), 8), ehT0Px3KOsy9(chr(0b110000) + chr(3655 - 3544) + '\x33' + chr(55), 0b1000), ehT0Px3KOsy9(chr(1128 - 1080) + '\x6f' + chr(0b110010) + '\x31' + chr(0b101110 + 0o6), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(51) + chr(2483 - 2428) + chr(341 - 289), 0o10), ehT0Px3KOsy9(chr(992 - 944) + chr(9757 - 9646) + chr(49) + chr(2517 - 2464) + chr(0b101111 + 0o5), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(679 - 628) + chr(2701 - 2649) + '\x31', ord("\x08")), ehT0Px3KOsy9('\060' + chr(11885 - 11774) + chr(2086 - 2035) + chr(1995 - 1943), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + '\062' + chr(0b110110) + '\061', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(54), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(49) + chr(48) + chr(50), 0b1000), ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(9632 - 9521) + '\x31' + chr(54) + chr(0b110110), 14182 - 14174), ehT0Px3KOsy9(chr(48) + '\x6f' + '\063' + chr(2171 - 2123) + chr(2016 - 1968), 10001 - 9993), ehT0Px3KOsy9(chr(0b100111 + 0o11) + '\157' + chr(2173 - 2124) + '\067' + chr(1890 - 1837), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\x31' + chr(0b11011 + 0o32) + '\x36', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(968 - 913) + chr(908 - 855), 0o10), ehT0Px3KOsy9(chr(0b1100 + 0o44) + '\157' + chr(0b110011) + chr(50), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b101111 + 0o2) + chr(0b10111 + 0o34) + '\067', 0o10), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(111) + '\x33' + chr(0b110110), 23326 - 23318), ehT0Px3KOsy9(chr(0b1010 + 0o46) + '\157' + chr(0b110001) + '\x32' + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(8008 - 7897) + chr(0b10101 + 0o36) + chr(55) + chr(0b110000), 8), ehT0Px3KOsy9('\x30' + chr(111) + chr(1425 - 1376) + '\x37', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b111011 + 0o64) + chr(806 - 755) + chr(55) + '\061', 9772 - 9764), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\061' + chr(0b110000) + chr(1587 - 1536), 50443 - 50435), ehT0Px3KOsy9('\060' + '\157' + chr(244 - 193) + chr(48) + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(1029 - 981) + chr(5474 - 5363) + chr(0b110001 + 0o2) + '\065' + chr(0b101010 + 0o13), 0o10), ehT0Px3KOsy9('\x30' + chr(5348 - 5237) + chr(0b110010) + '\061' + '\x30', 63222 - 63214), ehT0Px3KOsy9('\060' + chr(111) + chr(49) + chr(0b10111 + 0o33) + '\x36', 0b1000), ehT0Px3KOsy9(chr(1067 - 1019) + chr(2973 - 2862) + chr(50) + '\060' + '\063', 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b1111 + 0o44) + chr(53), 14511 - 14503), ehT0Px3KOsy9(chr(0b110000) + chr(0b1100000 + 0o17) + chr(49) + chr(1862 - 1808) + chr(0b10100 + 0o42), 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(1991 - 1880) + chr(53) + chr(0b110000), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x89'), '\144' + chr(0b1100101) + '\x63' + chr(111) + chr(0b10 + 0o142) + '\x65')('\165' + chr(116) + chr(353 - 251) + '\x2d' + chr(0b101111 + 0o11)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def aoCEN6XH8wX7(oVre8I6UXc3b, xJShi6yitBWy, HpTv58p66ea0, ZxHaCf5n4aFT): VeB868DcjU0T = xJShi6yitBWy.num_instances xafqLlk3kkUe(hdK8qOUhR6Or, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf4\xcf\xda\x9b\xc7\xff\xda\x10 \xea\xe8t'), chr(9772 - 9672) + '\x65' + chr(0b110111 + 0o54) + chr(2665 - 2554) + '\x64' + chr(3325 - 3224))(chr(117) + '\164' + chr(3181 - 3079) + chr(0b11001 + 0o24) + chr(0b110110 + 0o2)))(xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b'\xe0\x9d\xfc\x86\xc0\xfd\xc9N$\xe1\x92d\xf1\xdc\r\x82h\xdet1V\xaf\x1bNIc/{q\x83r\xd7m\xeb'), '\x64' + chr(0b1100101) + chr(0b1100011) + '\157' + chr(100) + '\145')(chr(117) + '\x74' + '\x66' + '\055' + chr(1308 - 1252)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xf1\xcc\xe0\x8c\xfa\xfd\xee\x14\x1a\xf6\xd7u'), chr(0b1100100) + chr(0b110001 + 0o64) + '\x63' + '\157' + '\144' + chr(6426 - 6325))(chr(6017 - 5900) + '\x74' + '\146' + chr(45) + chr(56)))(VeB868DcjU0T, xafqLlk3kkUe(xJShi6yitBWy, xafqLlk3kkUe(SXOLrMavuUCe(b"\xd0\x95\xc3\x8e\xcb\xf9\xeae'\xd3\xc2i"), '\144' + chr(0b111111 + 0o46) + chr(99) + chr(4464 - 4353) + chr(4951 - 4851) + chr(0b1100101))('\x75' + chr(9160 - 9044) + chr(102) + chr(45) + chr(56))))) JlLwHF2h9_2X = HpTv58p66ea0.pop(xJShi6yitBWy.z8EhBlYI2Bx4) if HpTv58p66ea0 else [] tPycZqQN1oSb = [] for WVxHKyX45z_L in vQr8gNKaIaWE(VeB868DcjU0T): Hsra_lSlb8Qx = [dT44mTcZ2_e6 for dT44mTcZ2_e6 in JlLwHF2h9_2X if dT44mTcZ2_e6.dst_instance_id == WVxHKyX45z_L] if JlLwHF2h9_2X else [] C8dAr6Ujq2Tn = [dT44mTcZ2_e6 for a4gaFV0gAuDu in ZxHaCf5n4aFT.SPnCNu54H1db() for dT44mTcZ2_e6 in a4gaFV0gAuDu if dT44mTcZ2_e6.src_instance_id == WVxHKyX45z_L] WHAFymdp8Jcy = xafqLlk3kkUe(SXOLrMavuUCe(b'\xe4\x97\xfc\x90\xc6\xee\xc8D>\xe3\xd6?\xf7\x81L\x88r\xc1s6V\xa1\x13\n\x1da">>\x8d{\x896\xb1\xcd\xeb>\xe2s\x18\xc2\x94\xe1\xc3'), chr(5295 - 5195) + chr(0b1100101) + chr(99) + '\x6f' + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + chr(0b1101 + 0o40) + chr(0b110011 + 0o5)) WHAFymdp8Jcy += xafqLlk3kkUe(SXOLrMavuUCe(b'\xc1\x97\xe0\xc3\xc6\xf4\xd8\x071\xfb\x9fk\xe4\xdc\x05\x8fo\xc5g,\x15\xa5]\x01[:+v4\xd8t\x84c\xaa\x9d\xed$\xe2i\x19\xd5\xd6'), '\x64' + chr(0b100 + 0o141) + chr(99) + '\x6f' + chr(9103 - 9003) + '\145')('\165' + '\x74' + chr(8113 - 8011) + '\x2d' + chr(0b111000)) xafqLlk3kkUe(hdK8qOUhR6Or, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc3\x9d\xf0\x96\xd5'), '\144' + '\145' + chr(0b1001101 + 0o26) + chr(0b1101111) + chr(100) + chr(101))(chr(3423 - 3306) + chr(3438 - 3322) + '\x66' + '\x2d' + '\x38'))(xafqLlk3kkUe(WHAFymdp8Jcy, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf1\xcc\xe0\x8c\xfa\xfd\xee\x14\x1a\xf6\xd7u'), '\x64' + '\145' + chr(0b1100011) + chr(0b1000101 + 0o52) + chr(100) + chr(101))(chr(0b1110101) + chr(0b1110100) + chr(3020 - 2918) + chr(0b1001 + 0o44) + chr(56)))(c2A0yzQpDQB3(Hsra_lSlb8Qx), c2A0yzQpDQB3(C8dAr6Ujq2Tn), WVxHKyX45z_L, xafqLlk3kkUe(xJShi6yitBWy, xafqLlk3kkUe(SXOLrMavuUCe(b"\xd0\x95\xc3\x8e\xcb\xf9\xeae'\xd3\xc2i"), chr(0b11101 + 0o107) + chr(0b1011 + 0o132) + chr(0b1100011) + chr(5427 - 5316) + chr(0b1100100) + chr(0b1100101))('\x75' + chr(10905 - 10789) + chr(0b1100110) + chr(0b101101) + '\x38')))) vgtffqk8P5SG = P5vfonppGRyX(Hsra_lSlb8Qx) rnNqrNokqpiS = T41AudUMQka3(C8dAr6Ujq2Tn, xJShi6yitBWy.partitioning_strategies) SxTuMqFZdzZx = oVre8I6UXc3b.__generate_actor(WVxHKyX45z_L, xJShi6yitBWy, vgtffqk8P5SG, rnNqrNokqpiS) if SxTuMqFZdzZx: xafqLlk3kkUe(tPycZqQN1oSb, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc6\x88\xe2\x86\xdc\xf8'), chr(0b1001110 + 0o26) + '\x65' + chr(99) + '\157' + chr(0b1100100) + chr(0b1011101 + 0o10))(chr(117) + chr(8096 - 7980) + chr(10136 - 10034) + '\055' + chr(0b111000)))(SxTuMqFZdzZx) return tPycZqQN1oSb
ray-project/ray
python/ray/experimental/streaming/streaming.py
Environment._generate_channels
def _generate_channels(self, operator): """Generates all output data channels (see: DataChannel in communication.py) for all instances of the given logical operator. The function constructs one data channel for each pair of communicating operator instances (instance_1,instance_2), where instance_1 is an instance of the given operator and instance_2 is an instance of a direct downstream operator. The number of total channels generated depends on the partitioning strategy specified by the user. """ channels = {} # destination operator id -> channels strategies = operator.partitioning_strategies for dst_operator, p_scheme in strategies.items(): num_dest_instances = self.operators[dst_operator].num_instances entry = channels.setdefault(dst_operator, []) if p_scheme.strategy == PStrategy.Forward: for i in range(operator.num_instances): # ID of destination instance to connect id = i % num_dest_instances channel = DataChannel(self, operator.id, dst_operator, i, id) entry.append(channel) elif p_scheme.strategy in all_to_all_strategies: for i in range(operator.num_instances): for j in range(num_dest_instances): channel = DataChannel(self, operator.id, dst_operator, i, j) entry.append(channel) else: # TODO (john): Add support for other partitioning strategies sys.exit("Unrecognized or unsupported partitioning strategy.") return channels
python
def _generate_channels(self, operator): """Generates all output data channels (see: DataChannel in communication.py) for all instances of the given logical operator. The function constructs one data channel for each pair of communicating operator instances (instance_1,instance_2), where instance_1 is an instance of the given operator and instance_2 is an instance of a direct downstream operator. The number of total channels generated depends on the partitioning strategy specified by the user. """ channels = {} # destination operator id -> channels strategies = operator.partitioning_strategies for dst_operator, p_scheme in strategies.items(): num_dest_instances = self.operators[dst_operator].num_instances entry = channels.setdefault(dst_operator, []) if p_scheme.strategy == PStrategy.Forward: for i in range(operator.num_instances): # ID of destination instance to connect id = i % num_dest_instances channel = DataChannel(self, operator.id, dst_operator, i, id) entry.append(channel) elif p_scheme.strategy in all_to_all_strategies: for i in range(operator.num_instances): for j in range(num_dest_instances): channel = DataChannel(self, operator.id, dst_operator, i, j) entry.append(channel) else: # TODO (john): Add support for other partitioning strategies sys.exit("Unrecognized or unsupported partitioning strategy.") return channels
[ "def", "_generate_channels", "(", "self", ",", "operator", ")", ":", "channels", "=", "{", "}", "# destination operator id -> channels", "strategies", "=", "operator", ".", "partitioning_strategies", "for", "dst_operator", ",", "p_scheme", "in", "strategies", ".", "items", "(", ")", ":", "num_dest_instances", "=", "self", ".", "operators", "[", "dst_operator", "]", ".", "num_instances", "entry", "=", "channels", ".", "setdefault", "(", "dst_operator", ",", "[", "]", ")", "if", "p_scheme", ".", "strategy", "==", "PStrategy", ".", "Forward", ":", "for", "i", "in", "range", "(", "operator", ".", "num_instances", ")", ":", "# ID of destination instance to connect", "id", "=", "i", "%", "num_dest_instances", "channel", "=", "DataChannel", "(", "self", ",", "operator", ".", "id", ",", "dst_operator", ",", "i", ",", "id", ")", "entry", ".", "append", "(", "channel", ")", "elif", "p_scheme", ".", "strategy", "in", "all_to_all_strategies", ":", "for", "i", "in", "range", "(", "operator", ".", "num_instances", ")", ":", "for", "j", "in", "range", "(", "num_dest_instances", ")", ":", "channel", "=", "DataChannel", "(", "self", ",", "operator", ".", "id", ",", "dst_operator", ",", "i", ",", "j", ")", "entry", ".", "append", "(", "channel", ")", "else", ":", "# TODO (john): Add support for other partitioning strategies", "sys", ".", "exit", "(", "\"Unrecognized or unsupported partitioning strategy.\"", ")", "return", "channels" ]
Generates all output data channels (see: DataChannel in communication.py) for all instances of the given logical operator. The function constructs one data channel for each pair of communicating operator instances (instance_1,instance_2), where instance_1 is an instance of the given operator and instance_2 is an instance of a direct downstream operator. The number of total channels generated depends on the partitioning strategy specified by the user.
[ "Generates", "all", "output", "data", "channels", "(", "see", ":", "DataChannel", "in", "communication", ".", "py", ")", "for", "all", "instances", "of", "the", "given", "logical", "operator", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/experimental/streaming/streaming.py#L219-L253
train
Generates all output data channels for all instances of the given logical operator.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,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Error,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(49) + '\064' + chr(54), 0b1000), ehT0Px3KOsy9('\x30' + chr(1793 - 1682) + chr(999 - 949) + '\x32' + chr(55), 0o10), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(111) + '\x37' + chr(54), 0b1000), ehT0Px3KOsy9(chr(0b101110 + 0o2) + '\157' + chr(0b100001 + 0o22) + '\067' + chr(0b11110 + 0o22), ord("\x08")), ehT0Px3KOsy9(chr(791 - 743) + chr(111) + chr(0b110011) + chr(0b110111) + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(51) + '\x35', 57178 - 57170), ehT0Px3KOsy9(chr(0b100001 + 0o17) + '\157' + chr(50) + '\x34' + chr(55), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b111011 + 0o64) + chr(2344 - 2293) + chr(55) + '\x33', ord("\x08")), ehT0Px3KOsy9('\060' + chr(6583 - 6472) + chr(0b101111 + 0o6) + chr(2635 - 2580), 0b1000), ehT0Px3KOsy9(chr(48) + chr(1624 - 1513) + chr(50) + chr(51) + '\x30', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(52) + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b11111 + 0o22) + '\064' + chr(0b11000 + 0o33), 0o10), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(0b1101111) + chr(53) + chr(2115 - 2060), 8), ehT0Px3KOsy9(chr(1210 - 1162) + chr(7099 - 6988) + '\061' + chr(48) + '\x31', 23663 - 23655), ehT0Px3KOsy9(chr(48) + chr(111) + '\062' + chr(55) + '\063', 0o10), ehT0Px3KOsy9('\x30' + '\157' + '\061' + '\066', 47518 - 47510), ehT0Px3KOsy9(chr(48) + chr(10465 - 10354) + chr(1009 - 960) + chr(0b110001) + chr(0b110001), 51132 - 51124), ehT0Px3KOsy9('\060' + '\x6f' + '\063' + chr(1446 - 1393) + chr(2189 - 2134), 58048 - 58040), ehT0Px3KOsy9(chr(48) + '\x6f' + '\061' + chr(0b110101) + chr(0b110111), 0b1000), ehT0Px3KOsy9('\x30' + chr(5110 - 4999) + chr(0b110001) + '\067', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110111) + chr(0b0 + 0o67), 23469 - 23461), ehT0Px3KOsy9('\x30' + chr(2651 - 2540) + chr(1360 - 1305) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(1532 - 1484) + chr(12081 - 11970) + chr(2215 - 2166) + '\062' + chr(0b10110 + 0o40), 21847 - 21839), ehT0Px3KOsy9(chr(48) + chr(111) + chr(49) + chr(0b100 + 0o54) + chr(0b10001 + 0o45), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + '\x33' + chr(52) + chr(1568 - 1520), 0b1000), ehT0Px3KOsy9(chr(944 - 896) + '\x6f' + chr(0b10010 + 0o37) + '\x33' + '\x32', 0o10), ehT0Px3KOsy9('\x30' + chr(2983 - 2872) + chr(49) + chr(0b110001) + chr(48), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b101011 + 0o6) + chr(0b110111) + chr(53), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1001110 + 0o41) + chr(1909 - 1858) + chr(2082 - 2027) + chr(350 - 298), 0o10), ehT0Px3KOsy9(chr(1138 - 1090) + chr(0b1000100 + 0o53) + chr(49) + chr(0b110100) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b11110 + 0o22) + '\x6f' + '\x32' + chr(50) + '\067', 8), ehT0Px3KOsy9('\x30' + chr(0b1000111 + 0o50) + chr(50) + chr(0b10000 + 0o42) + '\063', 44634 - 44626), ehT0Px3KOsy9(chr(0b101110 + 0o2) + chr(0b1101111) + '\063' + chr(0b110111) + chr(49), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\061' + chr(52) + chr(49), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(49) + chr(0b11 + 0o57) + chr(51), 29902 - 29894), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b101110 + 0o4) + chr(0b110101) + chr(49), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x32' + chr(455 - 406) + chr(827 - 778), 51275 - 51267), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110010) + chr(2561 - 2509), 48066 - 48058), ehT0Px3KOsy9(chr(791 - 743) + '\x6f' + '\x32' + '\065' + chr(50), 18887 - 18879), ehT0Px3KOsy9(chr(1519 - 1471) + chr(111) + chr(0b10011 + 0o36) + chr(50) + '\065', ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(0b1111 + 0o140) + '\065' + chr(48), 7280 - 7272)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'H'), chr(0b1100100) + chr(6778 - 6677) + chr(0b101111 + 0o64) + chr(0b110 + 0o151) + '\144' + chr(101))(chr(0b1110101) + chr(0b1110100) + '\146' + '\055' + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def lnT82KIcfLs2(oVre8I6UXc3b, xJShi6yitBWy): H2MQqAZeamNo = {} PBvi_gmm0Od3 = xJShi6yitBWy.partitioning_strategies for (XduTuxXyV29S, itxBAkuIx1QN) in xafqLlk3kkUe(PBvi_gmm0Od3, xafqLlk3kkUe(SXOLrMavuUCe(b'(\xedH\x9d\xb7G\x94\xb2C\xcbmZ'), chr(100) + chr(0b1000100 + 0o41) + '\143' + chr(2510 - 2399) + chr(100) + chr(4895 - 4794))(chr(0b1110101) + '\x74' + '\x66' + chr(434 - 389) + chr(2583 - 2527)))(): mIKJbhRCdziK = oVre8I6UXc3b.operators[XduTuxXyV29S].num_instances DuP5x7rEFa7R = H2MQqAZeamNo.setdefault(XduTuxXyV29S, []) if xafqLlk3kkUe(itxBAkuIx1QN, xafqLlk3kkUe(SXOLrMavuUCe(b'\x15\xe3L\x99\x8ax\xc0\x82'), '\x64' + '\x65' + chr(0b111100 + 0o47) + chr(0b101100 + 0o103) + chr(0b1100100) + '\x65')('\165' + '\x74' + chr(4645 - 4543) + '\x2d' + chr(0b111000))) == xafqLlk3kkUe(HsEXFgqB763r, xafqLlk3kkUe(SXOLrMavuUCe(b' \xf8L\x8f\x9fo\xc3'), chr(684 - 584) + chr(101) + chr(3997 - 3898) + chr(0b1101111) + chr(100) + chr(0b11001 + 0o114))(chr(0b1100010 + 0o23) + chr(5110 - 4994) + chr(0b111111 + 0o47) + '\055' + chr(0b10001 + 0o47))): for WVxHKyX45z_L in vQr8gNKaIaWE(xafqLlk3kkUe(xJShi6yitBWy, xafqLlk3kkUe(SXOLrMavuUCe(b'\x08\xe2S\xa7\x97s\xd4\x8fN\xf6F\x06\\'), chr(100) + chr(7998 - 7897) + '\143' + '\x6f' + chr(103 - 3) + '\x65')('\165' + chr(4721 - 4605) + chr(102) + '\x2d' + '\x38'))): z8EhBlYI2Bx4 = WVxHKyX45z_L % mIKJbhRCdziK dT44mTcZ2_e6 = a_NHZAUYxXwn(oVre8I6UXc3b, xJShi6yitBWy.z8EhBlYI2Bx4, XduTuxXyV29S, WVxHKyX45z_L, z8EhBlYI2Bx4) xafqLlk3kkUe(DuP5x7rEFa7R, xafqLlk3kkUe(SXOLrMavuUCe(b'\x07\xe7N\x9d\x90y'), '\x64' + chr(0b1010110 + 0o17) + chr(4408 - 4309) + chr(0b1000010 + 0o55) + chr(0b1100010 + 0o2) + chr(0b1100101))('\165' + chr(11750 - 11634) + chr(734 - 632) + chr(0b101011 + 0o2) + chr(0b111000)))(dT44mTcZ2_e6) elif xafqLlk3kkUe(itxBAkuIx1QN, xafqLlk3kkUe(SXOLrMavuUCe(b'\x15\xe3L\x99\x8ax\xc0\x82'), '\x64' + '\x65' + '\143' + chr(0b1101111) + chr(2424 - 2324) + chr(0b1011001 + 0o14))('\x75' + chr(0b1110100) + '\x66' + chr(45) + chr(56))) in a_cp6ean0wwg: for WVxHKyX45z_L in vQr8gNKaIaWE(xafqLlk3kkUe(xJShi6yitBWy, xafqLlk3kkUe(SXOLrMavuUCe(b'\x08\xe2S\xa7\x97s\xd4\x8fN\xf6F\x06\\'), chr(100) + chr(0b1001010 + 0o33) + chr(0b1000 + 0o133) + chr(3468 - 3357) + chr(6500 - 6400) + chr(101))(chr(0b1110101) + chr(0b1110100) + chr(0b1010011 + 0o23) + chr(1969 - 1924) + chr(56)))): for tlORBuYsiw3X in vQr8gNKaIaWE(mIKJbhRCdziK): dT44mTcZ2_e6 = a_NHZAUYxXwn(oVre8I6UXc3b, xJShi6yitBWy.z8EhBlYI2Bx4, XduTuxXyV29S, WVxHKyX45z_L, tlORBuYsiw3X) xafqLlk3kkUe(DuP5x7rEFa7R, xafqLlk3kkUe(SXOLrMavuUCe(b'\x07\xe7N\x9d\x90y'), '\144' + chr(0b1100101) + chr(9643 - 9544) + '\x6f' + chr(573 - 473) + '\x65')('\x75' + chr(3975 - 3859) + chr(6836 - 6734) + '\055' + chr(1029 - 973)))(dT44mTcZ2_e6) else: xafqLlk3kkUe(a2SYDDomXDZ2, xafqLlk3kkUe(SXOLrMavuUCe(b'\x03\xefW\x8c'), '\x64' + chr(0b110111 + 0o56) + '\x63' + chr(1877 - 1766) + chr(100) + '\x65')(chr(6711 - 6594) + '\x74' + '\146' + '\x2d' + chr(2670 - 2614)))(xafqLlk3kkUe(SXOLrMavuUCe(b'3\xf9L\x9d\x9dr\xc0\x95F\xe2@\x07\x0f.\xc9.<\x81\x1czOJ94\x94?,]\x8c\x03\xe5\xe7\x90\x15:\xc6\xe7}\xc42F\xe4J\x8a\x9fi\xc2\x9cV\xb6'), chr(0b1100100) + chr(8450 - 8349) + chr(0b1000101 + 0o36) + chr(111) + '\x64' + chr(101))(chr(117) + chr(116) + '\x66' + '\055' + '\070')) return H2MQqAZeamNo
ray-project/ray
python/ray/experimental/streaming/streaming.py
Environment.execute
def execute(self): """Deploys and executes the physical dataflow.""" self._collect_garbage() # Make sure everything is clean # TODO (john): Check if dataflow has any 'logical inconsistencies' # For example, if there is a forward partitioning strategy but # the number of downstream instances is larger than the number of # upstream instances, some of the downstream instances will not be # used at all # Each operator instance is implemented as a Ray actor # Actors are deployed in topological order, as we traverse the # logical dataflow from sources to sinks. At each step, data # producers wait for acknowledge from consumers before starting # generating data. upstream_channels = {} for node in nx.topological_sort(self.logical_topo): operator = self.operators[node] # Generate downstream data channels downstream_channels = self._generate_channels(operator) # Instantiate Ray actors handles = self.__generate_actors(operator, upstream_channels, downstream_channels) if handles: self.actor_handles.extend(handles) upstream_channels.update(downstream_channels) logger.debug("Running...") return self.actor_handles
python
def execute(self): """Deploys and executes the physical dataflow.""" self._collect_garbage() # Make sure everything is clean # TODO (john): Check if dataflow has any 'logical inconsistencies' # For example, if there is a forward partitioning strategy but # the number of downstream instances is larger than the number of # upstream instances, some of the downstream instances will not be # used at all # Each operator instance is implemented as a Ray actor # Actors are deployed in topological order, as we traverse the # logical dataflow from sources to sinks. At each step, data # producers wait for acknowledge from consumers before starting # generating data. upstream_channels = {} for node in nx.topological_sort(self.logical_topo): operator = self.operators[node] # Generate downstream data channels downstream_channels = self._generate_channels(operator) # Instantiate Ray actors handles = self.__generate_actors(operator, upstream_channels, downstream_channels) if handles: self.actor_handles.extend(handles) upstream_channels.update(downstream_channels) logger.debug("Running...") return self.actor_handles
[ "def", "execute", "(", "self", ")", ":", "self", ".", "_collect_garbage", "(", ")", "# Make sure everything is clean", "# TODO (john): Check if dataflow has any 'logical inconsistencies'", "# For example, if there is a forward partitioning strategy but", "# the number of downstream instances is larger than the number of", "# upstream instances, some of the downstream instances will not be", "# used at all", "# Each operator instance is implemented as a Ray actor", "# Actors are deployed in topological order, as we traverse the", "# logical dataflow from sources to sinks. At each step, data", "# producers wait for acknowledge from consumers before starting", "# generating data.", "upstream_channels", "=", "{", "}", "for", "node", "in", "nx", ".", "topological_sort", "(", "self", ".", "logical_topo", ")", ":", "operator", "=", "self", ".", "operators", "[", "node", "]", "# Generate downstream data channels", "downstream_channels", "=", "self", ".", "_generate_channels", "(", "operator", ")", "# Instantiate Ray actors", "handles", "=", "self", ".", "__generate_actors", "(", "operator", ",", "upstream_channels", ",", "downstream_channels", ")", "if", "handles", ":", "self", ".", "actor_handles", ".", "extend", "(", "handles", ")", "upstream_channels", ".", "update", "(", "downstream_channels", ")", "logger", ".", "debug", "(", "\"Running...\"", ")", "return", "self", ".", "actor_handles" ]
Deploys and executes the physical dataflow.
[ "Deploys", "and", "executes", "the", "physical", "dataflow", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/experimental/streaming/streaming.py#L306-L332
train
Deploys and executes the physical dataflow.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,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V9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b10010 + 0o41) + '\065' + chr(0b101 + 0o57), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101011 + 0o4) + chr(0b101110 + 0o4) + '\x34' + chr(54), 29433 - 29425), ehT0Px3KOsy9(chr(0b110000) + chr(1619 - 1508) + chr(1958 - 1909) + chr(54) + chr(1163 - 1114), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1740 - 1690) + chr(862 - 809) + '\x35', 0o10), ehT0Px3KOsy9('\x30' + chr(10008 - 9897) + '\061' + chr(0b1010 + 0o53) + chr(257 - 208), 0b1000), ehT0Px3KOsy9(chr(467 - 419) + chr(9236 - 9125) + chr(0b1111 + 0o44) + '\067', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\062' + chr(1837 - 1789) + chr(0b1000 + 0o55), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(51) + chr(860 - 807) + chr(51), 0b1000), ehT0Px3KOsy9(chr(1293 - 1245) + chr(0b1101111) + '\063' + chr(0b110110 + 0o0) + chr(0b100010 + 0o25), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(0b10111 + 0o31) + '\x6f' + chr(0b100001 + 0o21) + chr(0b101110 + 0o3), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(54) + '\x31', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(49) + '\067' + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(49), 0b1000), ehT0Px3KOsy9('\060' + chr(161 - 50) + '\x33' + chr(0b110110) + chr(0b100 + 0o60), 0o10), ehT0Px3KOsy9('\x30' + chr(0b10010 + 0o135) + chr(0b110001) + chr(0b100000 + 0o24) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(530 - 482) + chr(0b1100110 + 0o11) + chr(1624 - 1574) + '\063' + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(0b1101011 + 0o4) + '\065' + chr(51), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\x32' + chr(0b1101 + 0o52) + '\x30', 0b1000), ehT0Px3KOsy9(chr(2072 - 2024) + '\157' + chr(0b110111) + '\067', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1010010 + 0o35) + '\x32' + '\x36' + chr(2387 - 2332), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110100) + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(1525 - 1477) + chr(111) + chr(50) + chr(49), 8), ehT0Px3KOsy9(chr(48) + chr(0b1000111 + 0o50) + chr(0b110010) + chr(0b100011 + 0o15) + chr(51), 0o10), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(7179 - 7068) + '\x33' + chr(54) + chr(0b110001 + 0o5), ord("\x08")), ehT0Px3KOsy9(chr(523 - 475) + '\x6f' + '\063' + chr(0b110010) + chr(54), 0b1000), ehT0Px3KOsy9(chr(48) + chr(12047 - 11936) + chr(0b1 + 0o62) + chr(0b110000) + chr(0b110001 + 0o6), ord("\x08")), ehT0Px3KOsy9(chr(0b101100 + 0o4) + '\x6f' + '\061' + chr(998 - 947) + '\064', 9597 - 9589), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(50) + chr(0b1010 + 0o54) + chr(167 - 119), 53627 - 53619), ehT0Px3KOsy9('\x30' + '\x6f' + '\x30', 0o10), ehT0Px3KOsy9('\x30' + '\157' + '\x32' + chr(0b10011 + 0o43) + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(0b1001 + 0o47) + '\157' + chr(0b110001) + chr(2168 - 2119) + chr(55), 31648 - 31640), ehT0Px3KOsy9('\060' + chr(11236 - 11125) + '\x36' + chr(51), 61563 - 61555), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b1000 + 0o53) + '\x31' + chr(0b101011 + 0o7), 0o10), ehT0Px3KOsy9(chr(1951 - 1903) + chr(111) + '\061' + '\x33' + '\060', ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + '\062' + chr(0b10001 + 0o45) + '\063', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110001) + '\066' + chr(0b100110 + 0o14), 40461 - 40453), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(82 - 33), 8), ehT0Px3KOsy9(chr(1877 - 1829) + chr(0b101001 + 0o106) + chr(1920 - 1871) + '\067' + '\x32', 0b1000), ehT0Px3KOsy9('\x30' + '\157' + '\x32' + chr(55) + chr(0b111 + 0o53), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + '\157' + '\065' + chr(1940 - 1892), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xc2'), '\x64' + '\145' + chr(0b1100011) + chr(9667 - 9556) + '\144' + chr(2703 - 2602))(chr(117) + '\164' + chr(102) + '\x2d' + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def TaiENS9_ww2W(oVre8I6UXc3b): xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb3\xc5\x1e\xc1\x05z\xe6\x9f\xa8epC\x19`\x93\x00'), chr(0b1100100) + chr(0b101011 + 0o72) + chr(8220 - 8121) + chr(0b1101111) + chr(0b10 + 0o142) + chr(7516 - 7415))(chr(3346 - 3229) + chr(11762 - 11646) + chr(0b1011111 + 0o7) + '\x2d' + chr(56)))() HpTv58p66ea0 = {} for FDgyextYBrUF in xafqLlk3kkUe(RevCSQl8gXpb, xafqLlk3kkUe(SXOLrMavuUCe(b'\x98\xc9\x01\xc2\x05p\xe2\x82\x94c}n\x08n\x86\x11'), chr(100) + chr(101) + chr(99) + '\157' + chr(1715 - 1615) + chr(101))(chr(117) + '\164' + chr(3913 - 3811) + chr(45) + '\070'))(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x80\xc9\x16\xc4\n~\xe9\xb4\x83ma^'), '\x64' + '\x65' + chr(0b10 + 0o141) + chr(11070 - 10959) + chr(0b100011 + 0o101) + '\145')(chr(9631 - 9514) + '\164' + chr(0b11011 + 0o113) + chr(45) + '\070'))): xJShi6yitBWy = oVre8I6UXc3b.operators[FDgyextYBrUF] ZxHaCf5n4aFT = oVre8I6UXc3b._generate_channels(xJShi6yitBWy) tPycZqQN1oSb = oVre8I6UXc3b.__generate_actors(xJShi6yitBWy, HpTv58p66ea0, ZxHaCf5n4aFT) if tPycZqQN1oSb: xafqLlk3kkUe(oVre8I6UXc3b.actor_handles, xafqLlk3kkUe(SXOLrMavuUCe(b'\x89\xde\x05\xc8\x07{'), chr(100) + chr(101) + '\143' + chr(0b11010 + 0o125) + chr(4412 - 4312) + chr(0b1100101))(chr(0b101101 + 0o110) + chr(0b1100100 + 0o20) + chr(102) + '\x2d' + '\x38'))(tPycZqQN1oSb) xafqLlk3kkUe(HpTv58p66ea0, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb6\xd20\xe8\x00Q\xcf\x85\x8e6t\x01'), '\144' + chr(7720 - 7619) + '\x63' + '\x6f' + '\x64' + '\145')('\x75' + chr(0b1110100) + '\146' + chr(45) + chr(0b111000)))(ZxHaCf5n4aFT) xafqLlk3kkUe(hdK8qOUhR6Or, xafqLlk3kkUe(SXOLrMavuUCe(b'\x88\xc3\x13\xd8\x0e'), chr(0b1100100) + chr(0b100001 + 0o104) + chr(7305 - 7206) + '\157' + chr(0b1001111 + 0o25) + chr(0b111010 + 0o53))(chr(0b11110 + 0o127) + '\x74' + chr(9616 - 9514) + chr(171 - 126) + chr(1894 - 1838)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xbe\xd3\x1f\xc3\x00q\xe2\xc5\xd9,'), chr(0b1100100) + '\145' + '\143' + '\157' + chr(0b1100100) + chr(101))('\x75' + chr(0b1110100) + chr(4108 - 4006) + chr(0b100111 + 0o6) + '\x38')) return xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x8d\xc5\x05\xc2\x1b@\xed\x8a\x99f}T\x08'), chr(5021 - 4921) + '\145' + chr(99) + chr(111) + chr(9695 - 9595) + chr(0b1100101))(chr(0b1100011 + 0o22) + chr(0b100110 + 0o116) + chr(0b1001001 + 0o35) + chr(0b101101) + '\070'))
ray-project/ray
python/ray/experimental/streaming/streaming.py
DataStream.__register
def __register(self, operator): """Registers the given logical operator to the environment and connects it to its upstream operator (if any). A call to this function adds a new edge to the logical topology. Attributes: operator (Operator): The metadata of the logical operator. """ self.env.operators[operator.id] = operator self.dst_operator_id = operator.id logger.debug("Adding new dataflow edge ({},{}) --> ({},{})".format( self.src_operator_id, self.env.operators[self.src_operator_id].name, self.dst_operator_id, self.env.operators[self.dst_operator_id].name)) # Update logical dataflow graphs self.env._add_edge(self.src_operator_id, self.dst_operator_id) # Keep track of the partitioning strategy and the destination operator src_operator = self.env.operators[self.src_operator_id] if self.is_partitioned is True: partitioning, _ = src_operator._get_partition_strategy(self.id) src_operator._set_partition_strategy(_generate_uuid(), partitioning, operator.id) elif src_operator.type == OpType.KeyBy: # Set the output partitioning strategy to shuffle by key partitioning = PScheme(PStrategy.ShuffleByKey) src_operator._set_partition_strategy(_generate_uuid(), partitioning, operator.id) else: # No partitioning strategy has been defined - set default partitioning = PScheme(PStrategy.Forward) src_operator._set_partition_strategy(_generate_uuid(), partitioning, operator.id) return self.__expand()
python
def __register(self, operator): """Registers the given logical operator to the environment and connects it to its upstream operator (if any). A call to this function adds a new edge to the logical topology. Attributes: operator (Operator): The metadata of the logical operator. """ self.env.operators[operator.id] = operator self.dst_operator_id = operator.id logger.debug("Adding new dataflow edge ({},{}) --> ({},{})".format( self.src_operator_id, self.env.operators[self.src_operator_id].name, self.dst_operator_id, self.env.operators[self.dst_operator_id].name)) # Update logical dataflow graphs self.env._add_edge(self.src_operator_id, self.dst_operator_id) # Keep track of the partitioning strategy and the destination operator src_operator = self.env.operators[self.src_operator_id] if self.is_partitioned is True: partitioning, _ = src_operator._get_partition_strategy(self.id) src_operator._set_partition_strategy(_generate_uuid(), partitioning, operator.id) elif src_operator.type == OpType.KeyBy: # Set the output partitioning strategy to shuffle by key partitioning = PScheme(PStrategy.ShuffleByKey) src_operator._set_partition_strategy(_generate_uuid(), partitioning, operator.id) else: # No partitioning strategy has been defined - set default partitioning = PScheme(PStrategy.Forward) src_operator._set_partition_strategy(_generate_uuid(), partitioning, operator.id) return self.__expand()
[ "def", "__register", "(", "self", ",", "operator", ")", ":", "self", ".", "env", ".", "operators", "[", "operator", ".", "id", "]", "=", "operator", "self", ".", "dst_operator_id", "=", "operator", ".", "id", "logger", ".", "debug", "(", "\"Adding new dataflow edge ({},{}) --> ({},{})\"", ".", "format", "(", "self", ".", "src_operator_id", ",", "self", ".", "env", ".", "operators", "[", "self", ".", "src_operator_id", "]", ".", "name", ",", "self", ".", "dst_operator_id", ",", "self", ".", "env", ".", "operators", "[", "self", ".", "dst_operator_id", "]", ".", "name", ")", ")", "# Update logical dataflow graphs", "self", ".", "env", ".", "_add_edge", "(", "self", ".", "src_operator_id", ",", "self", ".", "dst_operator_id", ")", "# Keep track of the partitioning strategy and the destination operator", "src_operator", "=", "self", ".", "env", ".", "operators", "[", "self", ".", "src_operator_id", "]", "if", "self", ".", "is_partitioned", "is", "True", ":", "partitioning", ",", "_", "=", "src_operator", ".", "_get_partition_strategy", "(", "self", ".", "id", ")", "src_operator", ".", "_set_partition_strategy", "(", "_generate_uuid", "(", ")", ",", "partitioning", ",", "operator", ".", "id", ")", "elif", "src_operator", ".", "type", "==", "OpType", ".", "KeyBy", ":", "# Set the output partitioning strategy to shuffle by key", "partitioning", "=", "PScheme", "(", "PStrategy", ".", "ShuffleByKey", ")", "src_operator", ".", "_set_partition_strategy", "(", "_generate_uuid", "(", ")", ",", "partitioning", ",", "operator", ".", "id", ")", "else", ":", "# No partitioning strategy has been defined - set default", "partitioning", "=", "PScheme", "(", "PStrategy", ".", "Forward", ")", "src_operator", ".", "_set_partition_strategy", "(", "_generate_uuid", "(", ")", ",", "partitioning", ",", "operator", ".", "id", ")", "return", "self", ".", "__expand", "(", ")" ]
Registers the given logical operator to the environment and connects it to its upstream operator (if any). A call to this function adds a new edge to the logical topology. Attributes: operator (Operator): The metadata of the logical operator.
[ "Registers", "the", "given", "logical", "operator", "to", "the", "environment", "and", "connects", "it", "to", "its", "upstream", "operator", "(", "if", "any", ")", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/experimental/streaming/streaming.py#L429-L462
train
Registers the given logical operator to the environment and connects it to its upstream operator.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_O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,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(2183 - 2135) + chr(0b10000 + 0o137) + '\064' + chr(0b110001), 45773 - 45765), ehT0Px3KOsy9('\060' + chr(6598 - 6487) + chr(1227 - 1177) + chr(0b110100) + '\066', 56923 - 56915), ehT0Px3KOsy9('\060' + chr(111) + chr(0b1101 + 0o45) + '\061' + chr(55), 0b1000), ehT0Px3KOsy9(chr(0b11100 + 0o24) + '\x6f' + '\062' + chr(51) + chr(1534 - 1481), 32596 - 32588), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x31' + chr(2288 - 2235) + '\066', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + '\062' + chr(0b1111 + 0o46) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\062' + chr(51) + chr(1053 - 1001), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110110) + '\061', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(51) + '\065' + chr(0b110100), 0b1000), ehT0Px3KOsy9('\x30' + chr(861 - 750) + chr(50) + chr(50) + chr(0b110001 + 0o0), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\065' + '\x36', 6303 - 6295), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110110) + '\x32', 0o10), ehT0Px3KOsy9(chr(0b11001 + 0o27) + chr(7059 - 6948) + chr(51) + chr(54) + chr(0b10001 + 0o44), ord("\x08")), ehT0Px3KOsy9(chr(942 - 894) + chr(0b1000111 + 0o50) + chr(297 - 246) + '\066' + '\x33', ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b100110 + 0o14) + '\x31' + chr(0b110101), 37482 - 37474), ehT0Px3KOsy9('\x30' + '\157' + '\062' + chr(50) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1010111 + 0o30) + '\x36' + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110011) + '\067' + chr(147 - 96), ord("\x08")), ehT0Px3KOsy9(chr(1230 - 1182) + chr(0b1101110 + 0o1) + '\x31' + chr(0b100111 + 0o12) + chr(52), 42933 - 42925), ehT0Px3KOsy9('\060' + chr(1782 - 1671) + chr(50) + chr(49) + chr(0b110101), 8), ehT0Px3KOsy9(chr(0b101011 + 0o5) + '\x6f' + chr(0b11000 + 0o31) + '\060', ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\061' + '\063' + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\063' + chr(52) + chr(0b100111 + 0o13), 32638 - 32630), ehT0Px3KOsy9(chr(1809 - 1761) + chr(0b1111 + 0o140) + chr(815 - 761), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(1429 - 1318) + chr(1398 - 1348) + chr(54) + '\060', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(4949 - 4838) + chr(0b110110) + chr(1734 - 1686), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1011001 + 0o26) + chr(0b101000 + 0o13) + chr(48) + '\060', 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(2752 - 2699) + chr(0b110 + 0o61), 0o10), ehT0Px3KOsy9(chr(2303 - 2255) + '\157' + chr(2397 - 2347) + chr(122 - 73) + chr(0b110111), 8), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(51) + chr(0b10000 + 0o45) + '\065', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x32' + chr(456 - 402) + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\066' + chr(854 - 801), 8881 - 8873), ehT0Px3KOsy9(chr(631 - 583) + '\x6f' + chr(51) + chr(50) + chr(51), 0o10), ehT0Px3KOsy9('\060' + chr(7059 - 6948) + chr(0b110010) + '\x37' + chr(0b1 + 0o66), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b100011 + 0o114) + chr(678 - 627) + '\x36' + chr(0b101 + 0o62), 0o10), ehT0Px3KOsy9('\x30' + chr(6443 - 6332) + chr(0b110001) + chr(0b1100 + 0o51) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1011001 + 0o26) + chr(0b1100 + 0o47) + '\x36' + '\x34', 33178 - 33170), ehT0Px3KOsy9('\060' + chr(7441 - 7330) + '\x31' + '\x37', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(49) + chr(0b111 + 0o56) + chr(0b101111 + 0o1), 49633 - 49625), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b100001 + 0o25) + '\x30', 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(0b1101111) + chr(1716 - 1663) + '\x30', 11473 - 11465)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x0f'), chr(0b1100100) + '\145' + '\143' + chr(0b1101101 + 0o2) + chr(4843 - 4743) + '\145')(chr(117) + chr(0b101 + 0o157) + chr(0b1100110) + chr(0b1110 + 0o37) + chr(1388 - 1332)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def rl8Fsakh1_Cv(oVre8I6UXc3b, xJShi6yitBWy): oVre8I6UXc3b.env.hfABhGHur4OC[xJShi6yitBWy.z8EhBlYI2Bx4] = xJShi6yitBWy oVre8I6UXc3b.nRvWdCzTTWhB = xJShi6yitBWy.z8EhBlYI2Bx4 xafqLlk3kkUe(hdK8qOUhR6Or, xafqLlk3kkUe(SXOLrMavuUCe(b'E\xc3\xed\xe8\t'), '\x64' + '\145' + chr(99) + chr(10195 - 10084) + '\x64' + chr(101))(chr(0b10010 + 0o143) + chr(3792 - 3676) + chr(102) + '\055' + '\070'))(xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b"`\xc2\xeb\xf4\x00\xca\xbc_\x89\xe6\x0eV\x94\x87\xec\xf4_\x94;\xadm<\x85c\x90\x18\xbbR\xa3\x96\xcf\x1c\xf3\x92\xdaW\xd4'\x13M\r\xdd\xf2\xb4"), chr(0b1011000 + 0o14) + chr(3891 - 3790) + '\x63' + chr(0b1101111) + '\x64' + chr(6973 - 6872))(chr(117) + chr(0b101010 + 0o112) + chr(8393 - 8291) + chr(1875 - 1830) + chr(56)), xafqLlk3kkUe(SXOLrMavuUCe(b'w\x92\xfd\xf2&\xcc\xcf\x02\xbc\xe1KX'), '\144' + chr(0b110110 + 0o57) + '\x63' + '\x6f' + chr(0b100000 + 0o104) + chr(0b110000 + 0o65))('\165' + chr(0b1010 + 0o152) + '\146' + chr(0b101101) + chr(1187 - 1131)))(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'R\xd4\xec\xc2\x01\xdd\xf9C\x8d\xe5A@\xaa\x9a\xe9'), chr(1461 - 1361) + chr(7623 - 7522) + chr(2267 - 2168) + chr(11051 - 10940) + '\144' + chr(0b1100101))(chr(0b1001111 + 0o46) + chr(9007 - 8891) + chr(1239 - 1137) + chr(0b1000 + 0o45) + '\070')), xafqLlk3kkUe(oVre8I6UXc3b.env.operators[oVre8I6UXc3b.src_operator_id], xafqLlk3kkUe(SXOLrMavuUCe(b'`\xef\xf9\xd7<\xd7\xd0U\xa8\xf7It'), '\x64' + chr(0b1100101) + '\x63' + chr(0b1101111) + chr(0b11010 + 0o112) + chr(5240 - 5139))(chr(0b1110101) + chr(116) + '\146' + '\055' + chr(56))), xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'O\xf4\xf9\xca\n\xee\xe6e\xb8\xc6Fp'), '\144' + chr(0b1011101 + 0o10) + chr(0b1100011) + chr(2247 - 2136) + chr(4073 - 3973) + chr(0b1100101))(chr(0b101111 + 0o106) + '\x74' + chr(6970 - 6868) + chr(0b101101) + chr(1639 - 1583))), xafqLlk3kkUe(oVre8I6UXc3b.env.operators[oVre8I6UXc3b.dst_operator_id], xafqLlk3kkUe(SXOLrMavuUCe(b'`\xef\xf9\xd7<\xd7\xd0U\xa8\xf7It'), chr(100) + '\145' + '\x63' + chr(662 - 551) + chr(100) + chr(10084 - 9983))('\x75' + chr(0b1110100) + '\146' + chr(0b101101) + chr(1852 - 1796))))) xafqLlk3kkUe(oVre8I6UXc3b.env, xafqLlk3kkUe(SXOLrMavuUCe(b'~\xc7\xeb\xf91\xc8\xf8V\x89'), chr(0b11111 + 0o105) + chr(0b1100101) + chr(1222 - 1123) + '\x6f' + '\x64' + chr(9923 - 9822))('\x75' + chr(0b1110100) + chr(0b100111 + 0o77) + chr(0b100001 + 0o14) + chr(367 - 311)))(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'R\xd4\xec\xc2\x01\xdd\xf9C\x8d\xe5A@\xaa\x9a\xe9'), chr(8270 - 8170) + '\x65' + chr(0b1100011) + chr(0b0 + 0o157) + '\x64' + chr(0b1100 + 0o131))(chr(0b1110101) + chr(2262 - 2146) + '\146' + chr(0b11011 + 0o22) + chr(0b111000))), xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'O\xf4\xf9\xca\n\xee\xe6e\xb8\xc6Fp'), '\144' + chr(0b1100101) + '\x63' + chr(0b1101011 + 0o4) + '\144' + '\x65')(chr(117) + '\164' + '\146' + '\x2d' + chr(56)))) OovERb62ZPLR = oVre8I6UXc3b.env.hfABhGHur4OC[oVre8I6UXc3b.src_operator_id] if xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'H\xd5\xd0\xed\x0f\xdf\xe8X\x98\xf8A\\\x90\x97'), chr(0b1100100) + chr(0b101111 + 0o66) + chr(0b1000 + 0o133) + chr(111) + '\144' + chr(0b1100101))(chr(7310 - 7193) + chr(116) + '\146' + chr(0b101101) + chr(56))) is ehT0Px3KOsy9(chr(48) + chr(111) + '\061', 0o10): (AhkhuMjj737j, VNGQdHSFPrso) = OovERb62ZPLR._get_partition_strategy(oVre8I6UXc3b.z8EhBlYI2Bx4) xafqLlk3kkUe(OovERb62ZPLR, xafqLlk3kkUe(SXOLrMavuUCe(b'~\xd5\xea\xe91\xdd\xfdC\x98\xf8Z[\x9a\x9d\xd2\xe1G\x89-\xf9m?\x9b'), '\x64' + '\x65' + '\143' + chr(0b100010 + 0o115) + chr(0b1100100) + chr(5263 - 5162))(chr(117) + '\x74' + chr(102) + chr(1765 - 1720) + chr(0b1110 + 0o52)))(IvZvng5u0Kpk(), AhkhuMjj737j, xafqLlk3kkUe(xJShi6yitBWy, xafqLlk3kkUe(SXOLrMavuUCe(b'[\x9e\xca\xf5,\xc1\xc5x\xde\xd3V\x06'), chr(100) + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + chr(3358 - 3258) + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + chr(102) + chr(0b101101) + '\070'))) elif xafqLlk3kkUe(OovERb62ZPLR, xafqLlk3kkUe(SXOLrMavuUCe(b'V\xcb\xde\xf0\x17\xc8\xcbs\x81\xc4^D'), '\x64' + chr(0b1011110 + 0o7) + chr(99) + chr(0b1101111) + chr(100) + chr(0b1100101))('\x75' + chr(0b11 + 0o161) + chr(0b1010110 + 0o20) + chr(0b101010 + 0o3) + chr(842 - 786))) == xafqLlk3kkUe(llBkVzKbPFml, xafqLlk3kkUe(SXOLrMavuUCe(b'j\xc3\xf6\xdf\x17'), '\144' + '\145' + chr(0b1100011) + chr(11909 - 11798) + chr(0b1011110 + 0o6) + chr(8425 - 8324))('\165' + '\164' + '\x66' + chr(45) + chr(56))): AhkhuMjj737j = R6LXc7wFbBai(HsEXFgqB763r.ShuffleByKey) xafqLlk3kkUe(OovERb62ZPLR, xafqLlk3kkUe(SXOLrMavuUCe(b'~\xd5\xea\xe91\xdd\xfdC\x98\xf8Z[\x9a\x9d\xd2\xe1G\x89-\xf9m?\x9b'), chr(7708 - 7608) + '\145' + chr(0b110001 + 0o62) + chr(0b10110 + 0o131) + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + chr(4079 - 3963) + chr(0b1100110) + chr(1933 - 1888) + chr(0b10 + 0o66)))(IvZvng5u0Kpk(), AhkhuMjj737j, xafqLlk3kkUe(xJShi6yitBWy, xafqLlk3kkUe(SXOLrMavuUCe(b'[\x9e\xca\xf5,\xc1\xc5x\xde\xd3V\x06'), '\x64' + chr(101) + chr(99) + '\157' + chr(0b1100100) + chr(3032 - 2931))(chr(0b1011110 + 0o27) + '\164' + chr(102) + chr(0b101101) + '\x38'))) else: AhkhuMjj737j = R6LXc7wFbBai(HsEXFgqB763r.Forward) xafqLlk3kkUe(OovERb62ZPLR, xafqLlk3kkUe(SXOLrMavuUCe(b'~\xd5\xea\xe91\xdd\xfdC\x98\xf8Z[\x9a\x9d\xd2\xe1G\x89-\xf9m?\x9b'), chr(0b1100100) + chr(0b11111 + 0o106) + '\x63' + chr(0b10 + 0o155) + chr(0b1100100) + chr(2009 - 1908))('\x75' + chr(0b1110001 + 0o3) + '\146' + '\055' + '\070'))(IvZvng5u0Kpk(), AhkhuMjj737j, xafqLlk3kkUe(xJShi6yitBWy, xafqLlk3kkUe(SXOLrMavuUCe(b'[\x9e\xca\xf5,\xc1\xc5x\xde\xd3V\x06'), chr(0b1001001 + 0o33) + chr(101) + chr(0b1100011) + chr(0b1101111) + chr(4978 - 4878) + '\x65')(chr(0b1110101) + chr(0b1100110 + 0o16) + chr(0b110110 + 0o60) + chr(57 - 12) + '\070'))) return xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'~\xf9\xea\xe5\x1e\xcc\xf2U'), chr(5105 - 5005) + '\145' + '\143' + '\x6f' + chr(0b1100100) + '\145')(chr(7162 - 7045) + '\164' + chr(102) + chr(0b101101) + chr(0b111000)))()
ray-project/ray
python/ray/experimental/streaming/streaming.py
DataStream.set_parallelism
def set_parallelism(self, num_instances): """Sets the number of instances for the source operator of the stream. Attributes: num_instances (int): The level of parallelism for the source operator of the stream. """ assert (num_instances > 0) self.env._set_parallelism(self.src_operator_id, num_instances) return self
python
def set_parallelism(self, num_instances): """Sets the number of instances for the source operator of the stream. Attributes: num_instances (int): The level of parallelism for the source operator of the stream. """ assert (num_instances > 0) self.env._set_parallelism(self.src_operator_id, num_instances) return self
[ "def", "set_parallelism", "(", "self", ",", "num_instances", ")", ":", "assert", "(", "num_instances", ">", "0", ")", "self", ".", "env", ".", "_set_parallelism", "(", "self", ".", "src_operator_id", ",", "num_instances", ")", "return", "self" ]
Sets the number of instances for the source operator of the stream. Attributes: num_instances (int): The level of parallelism for the source operator of the stream.
[ "Sets", "the", "number", "of", "instances", "for", "the", "source", "operator", "of", "the", "stream", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/experimental/streaming/streaming.py#L467-L476
train
Sets the number of instances for the source operator of the stream.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPvpP4xdo3,cW7yQuyEnJ6E,KOHQGQ8qLDWm,NE1Yam2HHroQ,ygAzbDzrvRMh,SBRjvOU1ufVC,hOkXjmluKZfJ,q1QCh3W88sgk,TLbJ60djyws0,rIcPej9ZqMqV,WTxpD_zsEOh2,LgE_IO_tHXvM,Kk1hd194VKEC,OZYzwAeSQh7N,jFWsnp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dVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(1837 - 1789) + '\157' + '\x32' + chr(0b1100 + 0o51) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(111) + '\x31' + '\x33', 8251 - 8243), ehT0Px3KOsy9('\x30' + '\x6f' + '\x33' + chr(685 - 631) + chr(1522 - 1472), 15660 - 15652), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(3656 - 3545) + '\062' + '\x36' + chr(0b110101), 41205 - 41197), ehT0Px3KOsy9('\060' + chr(111) + '\063' + chr(2140 - 2090), ord("\x08")), ehT0Px3KOsy9('\060' + chr(8861 - 8750) + chr(0b100100 + 0o20) + chr(1167 - 1115), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\061' + chr(52) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(111) + chr(0b100101 + 0o16) + '\x37' + chr(548 - 498), 65452 - 65444), ehT0Px3KOsy9('\060' + '\x6f' + '\063' + chr(2101 - 2047) + '\060', 14676 - 14668), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110010) + '\x34' + chr(0b110000 + 0o4), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x33' + chr(53) + chr(607 - 558), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110001) + chr(54) + chr(0b110001), 0o10), ehT0Px3KOsy9('\060' + chr(0b1001010 + 0o45) + chr(52) + chr(53), 0o10), ehT0Px3KOsy9(chr(0b101111 + 0o1) + '\157' + chr(51) + '\067' + chr(344 - 289), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x32' + chr(55), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b11 + 0o57) + '\x32' + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(244 - 133) + chr(0b110010) + chr(51) + '\062', 0b1000), ehT0Px3KOsy9(chr(1144 - 1096) + '\157' + chr(50) + chr(1330 - 1280) + chr(49), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1000010 + 0o55) + chr(49) + chr(1606 - 1556) + chr(1395 - 1345), 0b1000), ehT0Px3KOsy9(chr(0b11111 + 0o21) + '\157' + chr(1167 - 1118) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(1191 - 1143) + '\157' + chr(0b10100 + 0o40) + chr(49), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(53) + chr(48), 31559 - 31551), ehT0Px3KOsy9(chr(2144 - 2096) + chr(111) + chr(0b11100 + 0o27) + chr(0b110000) + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(0b101011 + 0o5) + '\157' + chr(51) + '\065' + chr(866 - 814), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b0 + 0o62) + chr(0b110011) + chr(0b110101), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110001) + chr(50) + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(0b1000101 + 0o52) + '\x32' + '\x37' + '\067', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(51) + '\x31', 60636 - 60628), ehT0Px3KOsy9(chr(0b101111 + 0o1) + '\x6f' + chr(50) + chr(48) + '\x36', 0o10), ehT0Px3KOsy9(chr(0b101101 + 0o3) + '\157' + chr(0b110001) + '\064' + chr(644 - 591), 61761 - 61753), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b100000 + 0o23) + chr(0b111 + 0o57) + chr(0b11011 + 0o32), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(52) + '\065', 8), ehT0Px3KOsy9('\x30' + chr(4567 - 4456) + chr(50) + chr(0b1 + 0o63) + chr(0b101101 + 0o10), 0o10), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(5645 - 5534) + chr(0b11 + 0o56) + chr(53) + chr(553 - 500), 44130 - 44122), ehT0Px3KOsy9(chr(0b110000) + chr(4883 - 4772) + chr(269 - 220) + chr(0b110110) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(0b1101111) + chr(0b100110 + 0o13) + chr(0b10101 + 0o40) + chr(1760 - 1706), 0o10), ehT0Px3KOsy9('\x30' + chr(1892 - 1781) + chr(0b110001) + chr(54) + chr(0b11 + 0o60), 8), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(0b1101111) + chr(0b100110 + 0o17) + '\x35', 11467 - 11459), ehT0Px3KOsy9('\x30' + chr(8485 - 8374) + chr(0b110110) + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1100101 + 0o12) + '\x34' + '\x36', 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(111) + chr(0b1101 + 0o50) + chr(0b110000), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x85'), chr(0b111100 + 0o50) + chr(101) + '\143' + chr(5183 - 5072) + '\x64' + chr(0b1100101))(chr(0b1110101) + chr(116) + chr(0b11000 + 0o116) + chr(45) + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def Q99GpRMHaFRd(oVre8I6UXc3b, VeB868DcjU0T): assert VeB868DcjU0T > ehT0Px3KOsy9(chr(1179 - 1131) + '\x6f' + chr(2084 - 2036), 0o10) xafqLlk3kkUe(oVre8I6UXc3b.env, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf4x\x97\xc1ET\x06\x88\x91\xc8\x85\x14I\x96d\xff'), chr(100) + '\145' + chr(1770 - 1671) + chr(111) + chr(0b1100100) + chr(0b1100000 + 0o5))('\x75' + chr(6494 - 6378) + '\x66' + chr(0b101101) + '\070'))(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd8y\x91\xeauT\x02\x88\x91\xd0\x86\x03z\x96s'), '\x64' + chr(2072 - 1971) + '\x63' + chr(111) + chr(9103 - 9003) + chr(101))(chr(117) + chr(0b1110100) + chr(102) + chr(1156 - 1111) + chr(2919 - 2863))), VeB868DcjU0T) return oVre8I6UXc3b
ray-project/ray
python/ray/experimental/streaming/streaming.py
DataStream.map
def map(self, map_fn, name="Map"): """Applies a map operator to the stream. Attributes: map_fn (function): The user-defined logic of the map. """ op = Operator( _generate_uuid(), OpType.Map, name, map_fn, num_instances=self.env.config.parallelism) return self.__register(op)
python
def map(self, map_fn, name="Map"): """Applies a map operator to the stream. Attributes: map_fn (function): The user-defined logic of the map. """ op = Operator( _generate_uuid(), OpType.Map, name, map_fn, num_instances=self.env.config.parallelism) return self.__register(op)
[ "def", "map", "(", "self", ",", "map_fn", ",", "name", "=", "\"Map\"", ")", ":", "op", "=", "Operator", "(", "_generate_uuid", "(", ")", ",", "OpType", ".", "Map", ",", "name", ",", "map_fn", ",", "num_instances", "=", "self", ".", "env", ".", "config", ".", "parallelism", ")", "return", "self", ".", "__register", "(", "op", ")" ]
Applies a map operator to the stream. Attributes: map_fn (function): The user-defined logic of the map.
[ "Applies", "a", "map", "operator", "to", "the", "stream", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/experimental/streaming/streaming.py#L521-L533
train
Applies a map operator to the stream.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,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,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\x30' + '\157' + chr(1117 - 1066) + chr(54) + chr(0b110001), 65273 - 65265), ehT0Px3KOsy9('\060' + '\157' + chr(377 - 328) + chr(0b110100) + chr(0b100111 + 0o20), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\062' + '\x32' + chr(0b1100 + 0o52), 0o10), ehT0Px3KOsy9(chr(0b110000 + 0o0) + '\157' + chr(0b1 + 0o60) + chr(0b100100 + 0o16) + chr(52), 0o10), ehT0Px3KOsy9(chr(1348 - 1300) + chr(0b1101111) + '\063' + chr(53) + chr(1365 - 1310), 0o10), ehT0Px3KOsy9('\x30' + '\157' + '\065' + chr(0b111 + 0o52), 44620 - 44612), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(4156 - 4045) + chr(0b11111 + 0o24) + chr(50), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b100110 + 0o111) + chr(49) + chr(0b110011) + chr(48), 12153 - 12145), ehT0Px3KOsy9('\060' + '\157' + chr(0b10 + 0o61) + chr(0b110100) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110010) + chr(0b110100) + chr(53), 51512 - 51504), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110001) + chr(0b110100) + chr(0b1110 + 0o50), 0o10), ehT0Px3KOsy9('\060' + chr(0b111010 + 0o65) + chr(0b110011) + chr(51) + chr(0b110110), 0b1000), ehT0Px3KOsy9('\x30' + chr(9909 - 9798) + '\065' + '\066', 0o10), ehT0Px3KOsy9(chr(792 - 744) + chr(3243 - 3132) + chr(0b110101) + '\065', 0o10), ehT0Px3KOsy9('\x30' + chr(0b110110 + 0o71) + chr(51) + '\061' + chr(1530 - 1482), 0b1000), ehT0Px3KOsy9('\x30' + chr(1865 - 1754) + chr(0b110010) + chr(0b110010) + chr(1571 - 1523), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110001) + chr(0b110001) + chr(0b110010), 20745 - 20737), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110010) + '\x35' + '\x33', 0o10), ehT0Px3KOsy9('\x30' + chr(10229 - 10118) + '\061' + chr(0b110000) + chr(49), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b10100 + 0o133) + '\x31' + '\x34' + chr(1973 - 1923), 0b1000), ehT0Px3KOsy9('\x30' + chr(10985 - 10874) + chr(0b101011 + 0o5), 0o10), ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(0b100000 + 0o117) + '\067', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b10 + 0o57) + chr(927 - 876) + '\067', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(2221 - 2172) + '\067' + chr(1080 - 1029), 0o10), ehT0Px3KOsy9('\x30' + chr(3814 - 3703) + '\x33' + chr(1661 - 1612) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(522 - 474) + chr(11116 - 11005) + chr(1989 - 1938) + '\062' + chr(0b1000 + 0o50), 0o10), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(111) + chr(49) + '\066' + '\061', 0b1000), ehT0Px3KOsy9(chr(1501 - 1453) + '\157' + '\066' + chr(0b110100), 17991 - 17983), ehT0Px3KOsy9('\x30' + chr(12269 - 12158) + chr(0b110011) + '\x33' + '\x33', 0o10), ehT0Px3KOsy9(chr(1949 - 1901) + '\157' + chr(51) + '\x37' + chr(2549 - 2494), 0o10), ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(0b1010111 + 0o30) + '\061' + '\065' + chr(698 - 644), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101101 + 0o2) + chr(2208 - 2157) + chr(49) + chr(0b101011 + 0o7), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(2233 - 2182) + '\x31', 65418 - 65410), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(2428 - 2377) + chr(1310 - 1261) + chr(920 - 866), ord("\x08")), ehT0Px3KOsy9('\060' + chr(4518 - 4407) + '\x36' + chr(709 - 656), 34581 - 34573), ehT0Px3KOsy9(chr(1824 - 1776) + chr(0b110111 + 0o70) + '\063' + chr(0b110100) + chr(53), 0b1000), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(10824 - 10713) + chr(1737 - 1686) + chr(48) + '\062', 52193 - 52185), ehT0Px3KOsy9(chr(0b11101 + 0o23) + '\157' + chr(1465 - 1414) + chr(0b110100) + chr(0b101011 + 0o5), ord("\x08")), ehT0Px3KOsy9(chr(2269 - 2221) + chr(0b1001001 + 0o46) + chr(0b110001) + chr(0b101111 + 0o6) + '\067', 17276 - 17268), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x37' + chr(542 - 492), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(1668 - 1620) + '\157' + chr(53) + '\x30', 63707 - 63699)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xdf'), chr(100) + chr(0b1100001 + 0o4) + chr(0b111 + 0o134) + chr(0b1000001 + 0o56) + chr(100) + chr(0b101100 + 0o71))(chr(117) + chr(0b1001101 + 0o47) + '\x66' + chr(0b101101) + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def abA97kOQKaLo(oVre8I6UXc3b, wyesm0YLHJR_, AIvJRzLdDfgF=xafqLlk3kkUe(SXOLrMavuUCe(b'\xbc\x06\xe6'), '\144' + chr(392 - 291) + '\x63' + chr(111) + chr(0b1100100) + chr(0b1100101))('\x75' + chr(5994 - 5878) + chr(3146 - 3044) + chr(0b101101) + chr(0b100010 + 0o26))): C8dAr6Ujq2Tn = Jo82Sscdm2jn(IvZvng5u0Kpk(), llBkVzKbPFml.Map, AIvJRzLdDfgF, wyesm0YLHJR_, num_instances=oVre8I6UXc3b.env.config.parallelism) return xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xae8\xe41\x88@i,\x87\xd7'), '\144' + chr(0b1100101) + chr(0b1001010 + 0o31) + chr(0b1101111) + chr(159 - 59) + '\x65')(chr(0b1010 + 0o153) + '\164' + chr(0b1100110) + chr(45) + chr(56)))(C8dAr6Ujq2Tn)
ray-project/ray
python/ray/experimental/streaming/streaming.py
DataStream.flat_map
def flat_map(self, flatmap_fn): """Applies a flatmap operator to the stream. Attributes: flatmap_fn (function): The user-defined logic of the flatmap (e.g. split()). """ op = Operator( _generate_uuid(), OpType.FlatMap, "FlatMap", flatmap_fn, num_instances=self.env.config.parallelism) return self.__register(op)
python
def flat_map(self, flatmap_fn): """Applies a flatmap operator to the stream. Attributes: flatmap_fn (function): The user-defined logic of the flatmap (e.g. split()). """ op = Operator( _generate_uuid(), OpType.FlatMap, "FlatMap", flatmap_fn, num_instances=self.env.config.parallelism) return self.__register(op)
[ "def", "flat_map", "(", "self", ",", "flatmap_fn", ")", ":", "op", "=", "Operator", "(", "_generate_uuid", "(", ")", ",", "OpType", ".", "FlatMap", ",", "\"FlatMap\"", ",", "flatmap_fn", ",", "num_instances", "=", "self", ".", "env", ".", "config", ".", "parallelism", ")", "return", "self", ".", "__register", "(", "op", ")" ]
Applies a flatmap operator to the stream. Attributes: flatmap_fn (function): The user-defined logic of the flatmap (e.g. split()).
[ "Applies", "a", "flatmap", "operator", "to", "the", "stream", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/experimental/streaming/streaming.py#L536-L549
train
Applies a flatmap operator to the stream.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ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6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110011) + chr(1153 - 1103) + '\063', 54781 - 54773), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\061', 0o10), ehT0Px3KOsy9(chr(0b11000 + 0o30) + '\157' + chr(0b110110) + chr(51), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110011) + '\066' + chr(0b10001 + 0o41), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(51) + chr(54), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110010) + '\x35' + chr(0b101110 + 0o3), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101100 + 0o3) + chr(0b110010) + chr(0b110111) + '\062', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + '\061' + chr(48) + chr(0b100011 + 0o23), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b100011 + 0o20) + '\x30' + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(7504 - 7393) + chr(49) + '\066' + chr(49), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(51) + chr(127 - 77) + chr(0b110100), 0o10), ehT0Px3KOsy9('\060' + chr(1235 - 1124) + chr(51) + chr(533 - 485) + '\062', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\x31' + chr(126 - 72) + chr(0b100101 + 0o16), 26916 - 26908), ehT0Px3KOsy9(chr(48) + chr(111) + chr(1323 - 1272) + chr(0b110101) + '\067', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1010110 + 0o31) + chr(0b110010) + chr(0b10010 + 0o42) + chr(55), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x32' + chr(50) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(49) + chr(0b110111) + chr(52), 2657 - 2649), ehT0Px3KOsy9(chr(480 - 432) + '\x6f' + chr(1167 - 1116) + chr(1489 - 1436) + chr(0b100101 + 0o16), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110001) + chr(1884 - 1834) + '\060', 0o10), ehT0Px3KOsy9('\x30' + chr(2947 - 2836) + chr(1373 - 1324) + '\065' + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b101101 + 0o5) + chr(0b110101) + chr(48), 0b1000), ehT0Px3KOsy9(chr(48) + chr(10279 - 10168) + chr(0b101111 + 0o2) + '\060', 0b1000), ehT0Px3KOsy9('\060' + chr(6969 - 6858) + chr(571 - 522) + chr(0b110101) + '\x33', 0b1000), ehT0Px3KOsy9('\060' + chr(9379 - 9268) + chr(49) + chr(0b110010) + chr(53), 0b1000), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(3068 - 2957) + chr(0b1011 + 0o47) + chr(55) + chr(1608 - 1554), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b10 + 0o60) + '\x34', 1491 - 1483), ehT0Px3KOsy9('\060' + '\x6f' + '\x36' + '\x33', 8), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(49) + '\x35' + chr(48), 8), ehT0Px3KOsy9(chr(859 - 811) + chr(0b1101111) + '\062' + chr(0b111 + 0o52), 10976 - 10968), ehT0Px3KOsy9(chr(48) + '\157' + '\x33' + chr(134 - 81) + chr(0b100100 + 0o23), 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110001 + 0o2) + chr(0b101111 + 0o10) + chr(52), 34031 - 34023), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(249 - 199) + chr(49) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(1668 - 1620) + '\157' + chr(0b110001) + '\x32' + '\063', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101110 + 0o1) + chr(0b100 + 0o56) + chr(49) + chr(861 - 808), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101 + 0o142) + '\x33' + chr(2244 - 2192) + '\064', 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(49) + chr(55) + chr(606 - 555), 0o10), ehT0Px3KOsy9(chr(0b1010 + 0o46) + '\x6f' + chr(50) + chr(0b110011) + chr(616 - 565), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b110 + 0o151) + '\x36' + '\x34', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b10011 + 0o40) + chr(1980 - 1931) + chr(1130 - 1077), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\061' + '\x32' + chr(1238 - 1186), 11226 - 11218)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(419 - 308) + '\x35' + '\x30', ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xfd'), '\144' + chr(2780 - 2679) + chr(317 - 218) + chr(0b10001 + 0o136) + '\144' + chr(1871 - 1770))('\x75' + chr(116) + chr(0b1100110) + chr(0b11011 + 0o22) + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def MfsxYxgcMPZ1(oVre8I6UXc3b, k3CInIQ5m1pR): C8dAr6Ujq2Tn = Jo82Sscdm2jn(IvZvng5u0Kpk(), llBkVzKbPFml.FlatMap, xafqLlk3kkUe(SXOLrMavuUCe(b'\x95mR\x86S\xc8\xca'), chr(0b11 + 0o141) + chr(0b1011011 + 0o12) + chr(1645 - 1546) + chr(0b1000101 + 0o52) + chr(0b1100100) + chr(630 - 529))(chr(117) + '\x74' + chr(102) + chr(0b101101) + chr(0b111000)), k3CInIQ5m1pR, num_instances=oVre8I6UXc3b.env.config.parallelism) return xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x8c^A\x97y\xc0\xc92\xa6\x03'), chr(233 - 133) + chr(8606 - 8505) + chr(0b1100000 + 0o3) + chr(111) + chr(0b111111 + 0o45) + chr(101))(chr(10511 - 10394) + chr(116) + chr(6318 - 6216) + chr(0b10011 + 0o32) + chr(0b100111 + 0o21)))(C8dAr6Ujq2Tn)
ray-project/ray
python/ray/experimental/streaming/streaming.py
DataStream.key_by
def key_by(self, key_selector): """Applies a key_by operator to the stream. Attributes: key_attribute_index (int): The index of the key attributed (assuming tuple records). """ op = Operator( _generate_uuid(), OpType.KeyBy, "KeyBy", other=key_selector, num_instances=self.env.config.parallelism) return self.__register(op)
python
def key_by(self, key_selector): """Applies a key_by operator to the stream. Attributes: key_attribute_index (int): The index of the key attributed (assuming tuple records). """ op = Operator( _generate_uuid(), OpType.KeyBy, "KeyBy", other=key_selector, num_instances=self.env.config.parallelism) return self.__register(op)
[ "def", "key_by", "(", "self", ",", "key_selector", ")", ":", "op", "=", "Operator", "(", "_generate_uuid", "(", ")", ",", "OpType", ".", "KeyBy", ",", "\"KeyBy\"", ",", "other", "=", "key_selector", ",", "num_instances", "=", "self", ".", "env", ".", "config", ".", "parallelism", ")", "return", "self", ".", "__register", "(", "op", ")" ]
Applies a key_by operator to the stream. Attributes: key_attribute_index (int): The index of the key attributed (assuming tuple records).
[ "Applies", "a", "key_by", "operator", "to", "the", "stream", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/experimental/streaming/streaming.py#L553-L566
train
Applies a key_by operator to the stream.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPvpP4xdo3,cW7yQuyEnJ6E,KOHQGQ8qLDWm,NE1Yam2HHroQ,ygAzbDzrvR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UlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x31' + chr(53) + '\067', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b0 + 0o62) + '\067' + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(773 - 725) + chr(0b100000 + 0o117) + chr(51) + chr(0b110101) + '\062', 58208 - 58200), ehT0Px3KOsy9(chr(0b110000) + chr(6226 - 6115) + chr(0b101 + 0o62) + chr(0b110000), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(1600 - 1549) + chr(1982 - 1927) + chr(52), 41248 - 41240), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(5757 - 5646) + '\x35' + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(2276 - 2228) + chr(0b1101111) + chr(49) + '\063' + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(111) + chr(867 - 818) + chr(53) + '\061', 47767 - 47759), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(50) + '\x37' + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1001101 + 0o42) + chr(0b110110) + chr(50), 34324 - 34316), ehT0Px3KOsy9(chr(724 - 676) + chr(6681 - 6570) + '\x33' + chr(0b110100) + chr(1973 - 1921), 8294 - 8286), ehT0Px3KOsy9('\060' + '\x6f' + '\065' + chr(53), 0o10), ehT0Px3KOsy9(chr(1850 - 1802) + chr(8207 - 8096) + chr(0b10010 + 0o37) + chr(1580 - 1532) + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(50) + '\x35' + chr(717 - 662), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b1000 + 0o57), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b11000 + 0o127) + '\x36' + chr(0b1011 + 0o51), 0o10), ehT0Px3KOsy9(chr(1002 - 954) + chr(0b1101111) + '\063' + chr(53) + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(1307 - 1259) + chr(0b1101111) + chr(0b110010) + '\065' + chr(0b101011 + 0o5), 60386 - 60378), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b101011 + 0o10) + chr(0b110111 + 0o0) + '\067', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110110) + chr(50), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(50) + chr(54) + '\061', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110011) + chr(2195 - 2143) + chr(48), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1010000 + 0o37) + chr(50) + '\x37' + chr(0b110 + 0o54), 627 - 619), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110110) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(0b1101111) + chr(0b110100) + '\061', 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(2186 - 2135) + chr(0b110101) + '\060', 0o10), ehT0Px3KOsy9(chr(0b11001 + 0o27) + chr(0b1101111) + chr(0b110001) + chr(55) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110010) + '\x32', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(267 - 217) + '\067' + '\x37', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(1551 - 1501) + chr(1840 - 1785) + chr(0b100101 + 0o13), 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b101010 + 0o11) + chr(53), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(2322 - 2211) + chr(49) + '\065' + chr(2529 - 2475), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b11111 + 0o23) + chr(0b100111 + 0o13) + chr(0b100101 + 0o16), 49483 - 49475), ehT0Px3KOsy9(chr(1135 - 1087) + chr(111) + chr(335 - 286) + chr(55) + chr(0b110010), 46615 - 46607), ehT0Px3KOsy9(chr(0b11000 + 0o30) + '\157' + chr(2389 - 2340) + chr(49) + chr(1780 - 1729), 0b1000), ehT0Px3KOsy9(chr(0b100111 + 0o11) + '\157' + chr(0b110010) + chr(1617 - 1569) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110010 + 0o0) + chr(1331 - 1281) + chr(2620 - 2568), 27679 - 27671), ehT0Px3KOsy9('\x30' + chr(0b1010100 + 0o33) + chr(0b11111 + 0o23) + '\x33' + chr(707 - 659), 0b1000), ehT0Px3KOsy9(chr(450 - 402) + chr(7458 - 7347) + chr(0b110011) + '\067' + chr(50), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(2296 - 2248) + chr(111) + chr(0b110101) + chr(0b110000), 35256 - 35248)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'A'), '\x64' + chr(3450 - 3349) + chr(99) + chr(0b1101111) + '\x64' + chr(101))('\165' + chr(116) + '\x66' + '\x2d' + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def FBa4xTDz2k6J(oVre8I6UXc3b, v6HHpwM2KXp6): C8dAr6Ujq2Tn = Jo82Sscdm2jn(IvZvng5u0Kpk(), llBkVzKbPFml.KeyBy, xafqLlk3kkUe(SXOLrMavuUCe(b'$\xde\x93z\x85'), chr(100) + chr(0b1100101) + chr(99) + '\157' + chr(100) + chr(101))(chr(117) + chr(0b1110100) + '\146' + chr(0b10111 + 0o26) + chr(1596 - 1540)), other=v6HHpwM2KXp6, num_instances=oVre8I6UXc3b.env.config.parallelism) return xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'0\xe4\x98]\x9bE/\x1d\xdd@'), chr(2376 - 2276) + chr(9957 - 9856) + '\x63' + '\157' + '\x64' + chr(0b11111 + 0o106))(chr(0b101010 + 0o113) + chr(0b11 + 0o161) + chr(0b1100110) + '\x2d' + '\070'))(C8dAr6Ujq2Tn)
ray-project/ray
python/ray/experimental/streaming/streaming.py
DataStream.reduce
def reduce(self, reduce_fn): """Applies a rolling sum operator to the stream. Attributes: sum_attribute_index (int): The index of the attribute to sum (assuming tuple records). """ op = Operator( _generate_uuid(), OpType.Reduce, "Sum", reduce_fn, num_instances=self.env.config.parallelism) return self.__register(op)
python
def reduce(self, reduce_fn): """Applies a rolling sum operator to the stream. Attributes: sum_attribute_index (int): The index of the attribute to sum (assuming tuple records). """ op = Operator( _generate_uuid(), OpType.Reduce, "Sum", reduce_fn, num_instances=self.env.config.parallelism) return self.__register(op)
[ "def", "reduce", "(", "self", ",", "reduce_fn", ")", ":", "op", "=", "Operator", "(", "_generate_uuid", "(", ")", ",", "OpType", ".", "Reduce", ",", "\"Sum\"", ",", "reduce_fn", ",", "num_instances", "=", "self", ".", "env", ".", "config", ".", "parallelism", ")", "return", "self", ".", "__register", "(", "op", ")" ]
Applies a rolling sum operator to the stream. Attributes: sum_attribute_index (int): The index of the attribute to sum (assuming tuple records).
[ "Applies", "a", "rolling", "sum", "operator", "to", "the", "stream", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/experimental/streaming/streaming.py#L569-L582
train
Applies a rolling sum operator to the stream.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu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pS8s,QOfmzcVJsrp8,tzcpInYwBvYW,iDQ_gSK8V7h0,Rurm1zTRfSmY,reqGiMiVQ77y,bsS9P6_LpdIe,sbGAZlkZOtyh,Cf_Qef15s3_F,eX02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x32' + chr(324 - 273) + chr(1524 - 1476), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b11100 + 0o123) + chr(0b101110 + 0o4) + '\x31', 0b1000), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(8803 - 8692) + chr(1886 - 1837) + chr(0b110111) + chr(1629 - 1580), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(50) + '\x30' + chr(2324 - 2275), 50657 - 50649), ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(111) + chr(52) + chr(0b10011 + 0o37), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101110 + 0o1) + chr(50) + chr(52) + chr(0b10011 + 0o44), ord("\x08")), ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(0b110 + 0o151) + chr(0b110011) + chr(0b110101 + 0o2) + chr(0b110110), 46549 - 46541), ehT0Px3KOsy9(chr(446 - 398) + chr(111) + chr(50) + chr(0b110100) + chr(0b1110 + 0o50), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b11111 + 0o24) + '\065' + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(0b101010 + 0o6) + '\157' + chr(873 - 823) + chr(0b110010 + 0o5) + '\x33', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(1957 - 1905) + chr(0b11101 + 0o31), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\064' + '\061', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(4771 - 4660) + chr(0b11101 + 0o25) + '\x30' + '\x34', 26081 - 26073), ehT0Px3KOsy9(chr(48) + chr(1667 - 1556) + '\x31' + chr(0b110100) + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(1057 - 1009) + chr(0b101011 + 0o104) + chr(0b110001) + chr(49) + '\064', 34184 - 34176), ehT0Px3KOsy9('\x30' + '\157' + '\x33' + '\064', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b100011 + 0o114) + '\063' + chr(55), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b10000 + 0o42) + chr(51) + '\063', 0b1000), ehT0Px3KOsy9('\x30' + chr(7589 - 7478) + '\x31' + chr(49) + '\x37', 18498 - 18490), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110011) + '\063' + chr(0b110000 + 0o5), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b100010 + 0o20) + chr(1123 - 1075), 0o10), ehT0Px3KOsy9('\x30' + chr(11394 - 11283) + chr(0b110001) + chr(0b100100 + 0o22) + chr(1276 - 1226), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b11010 + 0o125) + chr(0b10010 + 0o41) + chr(0b110101) + chr(1357 - 1302), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(1453 - 1398) + chr(51), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\064' + '\x34', 21412 - 21404), ehT0Px3KOsy9(chr(48) + chr(0b1000 + 0o147) + chr(51) + chr(0b101010 + 0o15) + '\063', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(6410 - 6299) + chr(1045 - 996) + '\064' + '\x32', 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + '\x33' + '\064' + '\x34', 47061 - 47053), ehT0Px3KOsy9(chr(48) + chr(111) + '\x32' + chr(0b100011 + 0o23) + '\x32', 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + '\x33' + chr(314 - 263), 11482 - 11474), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x32' + chr(1874 - 1826) + chr(55), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(1853 - 1742) + chr(0b101100 + 0o5), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(5432 - 5321) + chr(0b101000 + 0o12) + '\x34' + chr(0b11111 + 0o21), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(10710 - 10599) + '\x33' + '\066' + '\066', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x31' + '\066' + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(1097 - 1049) + chr(8373 - 8262) + chr(51) + '\x33' + '\x33', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(1839 - 1728) + '\062' + chr(2692 - 2640) + chr(1268 - 1217), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(50) + '\062' + chr(2204 - 2153), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(8993 - 8882) + chr(0b110010) + '\x31' + chr(0b111 + 0o52), 30369 - 30361), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110001) + chr(53) + chr(0b11000 + 0o35), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + '\x6f' + chr(53) + chr(0b11 + 0o55), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xb6'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + chr(0b1000100 + 0o40) + chr(9824 - 9723))('\x75' + chr(11141 - 11025) + chr(0b10010 + 0o124) + '\055' + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def RSYsB9TMxo_y(oVre8I6UXc3b, GANVVmMoicCy): C8dAr6Ujq2Tn = Jo82Sscdm2jn(IvZvng5u0Kpk(), llBkVzKbPFml.Reduce, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcbd\x14'), chr(1993 - 1893) + chr(6743 - 6642) + '\143' + '\x6f' + chr(6095 - 5995) + chr(0b1100101))('\x75' + chr(116) + '\146' + chr(0b1000 + 0o45) + chr(0b111000 + 0o0)), GANVVmMoicCy, num_instances=oVre8I6UXc3b.env.config.parallelism) return xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc7N\x0b\xe4E\xce\x8d\xd2\x8b\xc9'), '\x64' + chr(0b1100101) + chr(0b1100011) + '\x6f' + '\144' + chr(7747 - 7646))(chr(0b1110101) + chr(3817 - 3701) + '\x66' + chr(45) + chr(0b11101 + 0o33)))(C8dAr6Ujq2Tn)
ray-project/ray
python/ray/experimental/streaming/streaming.py
DataStream.sum
def sum(self, attribute_selector, state_keeper=None): """Applies a rolling sum operator to the stream. Attributes: sum_attribute_index (int): The index of the attribute to sum (assuming tuple records). """ op = Operator( _generate_uuid(), OpType.Sum, "Sum", _sum, other=attribute_selector, state_actor=state_keeper, num_instances=self.env.config.parallelism) return self.__register(op)
python
def sum(self, attribute_selector, state_keeper=None): """Applies a rolling sum operator to the stream. Attributes: sum_attribute_index (int): The index of the attribute to sum (assuming tuple records). """ op = Operator( _generate_uuid(), OpType.Sum, "Sum", _sum, other=attribute_selector, state_actor=state_keeper, num_instances=self.env.config.parallelism) return self.__register(op)
[ "def", "sum", "(", "self", ",", "attribute_selector", ",", "state_keeper", "=", "None", ")", ":", "op", "=", "Operator", "(", "_generate_uuid", "(", ")", ",", "OpType", ".", "Sum", ",", "\"Sum\"", ",", "_sum", ",", "other", "=", "attribute_selector", ",", "state_actor", "=", "state_keeper", ",", "num_instances", "=", "self", ".", "env", ".", "config", ".", "parallelism", ")", "return", "self", ".", "__register", "(", "op", ")" ]
Applies a rolling sum operator to the stream. Attributes: sum_attribute_index (int): The index of the attribute to sum (assuming tuple records).
[ "Applies", "a", "rolling", "sum", "operator", "to", "the", "stream", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/experimental/streaming/streaming.py#L585-L600
train
Applies a rolling sum operator to the stream.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7Cc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L8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + '\x6f' + chr(1830 - 1781) + chr(71 - 18) + chr(1619 - 1566), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110001) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(8240 - 8129) + '\x33' + chr(49) + chr(52), ord("\x08")), ehT0Px3KOsy9('\060' + chr(4005 - 3894) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(0b1101111) + chr(0b110001) + chr(0b10101 + 0o41) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\063' + chr(50) + '\x30', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x32' + chr(50) + chr(1939 - 1888), 16772 - 16764), ehT0Px3KOsy9(chr(2092 - 2044) + chr(0b1001001 + 0o46) + chr(0b110010) + chr(1778 - 1724) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(999 - 951) + chr(0b1101111) + chr(0b0 + 0o62) + chr(0b110000) + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(0b101111 + 0o1) + '\x6f' + chr(0b1101 + 0o46) + chr(0b110100) + chr(49), 0o10), ehT0Px3KOsy9('\x30' + chr(3899 - 3788) + '\x33' + chr(0b10100 + 0o35) + chr(741 - 691), 3856 - 3848), ehT0Px3KOsy9(chr(0b101000 + 0o10) + '\x6f' + chr(791 - 742) + '\062' + chr(49), 63177 - 63169), ehT0Px3KOsy9('\x30' + chr(111) + chr(51) + '\061' + chr(0b10111 + 0o33), 8), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110001) + chr(0b110011) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b101101 + 0o6) + chr(0b110111) + chr(0b10110 + 0o41), 0o10), ehT0Px3KOsy9(chr(48) + chr(5642 - 5531) + '\063' + chr(52) + chr(1712 - 1664), 60535 - 60527), ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(0b111010 + 0o65) + chr(1994 - 1939) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x31' + chr(0b110110) + chr(0b1111 + 0o50), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110001) + '\063', 63154 - 63146), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b1011 + 0o50) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(0b1101111) + chr(55) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(3796 - 3685) + chr(1847 - 1798) + '\061' + chr(456 - 407), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(2356 - 2307) + chr(2179 - 2128) + chr(55), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(1957 - 1908) + chr(0b11001 + 0o33) + chr(52), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(929 - 880) + chr(0b101100 + 0o6), 8), ehT0Px3KOsy9(chr(1710 - 1662) + chr(4530 - 4419) + chr(0b110010) + chr(54) + '\x34', 0o10), ehT0Px3KOsy9(chr(0b10011 + 0o35) + '\x6f' + '\x32' + chr(52) + chr(2445 - 2393), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110111) + '\060', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\063' + chr(0b101111 + 0o10) + '\061', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(54) + chr(0b110001 + 0o2), 33437 - 33429), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(0b1101111) + '\063' + chr(0b11110 + 0o24) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b101010 + 0o105) + '\062' + chr(0b101100 + 0o4) + '\066', 0o10), ehT0Px3KOsy9('\060' + chr(12095 - 11984) + chr(0b110011) + chr(0b110011) + '\x31', 19532 - 19524), ehT0Px3KOsy9(chr(2286 - 2238) + '\157' + chr(0b110110) + chr(49), 19090 - 19082), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b10100 + 0o37) + chr(0b110010) + chr(0b1001 + 0o51), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(0b101001 + 0o11) + '\064' + '\x35', 0b1000), ehT0Px3KOsy9(chr(858 - 810) + chr(111) + chr(0b100 + 0o57) + chr(0b110010) + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011111 + 0o20) + chr(0b110011) + chr(0b110000) + '\x35', 30046 - 30038), ehT0Px3KOsy9(chr(197 - 149) + '\x6f' + chr(0b110011) + chr(1296 - 1242) + chr(708 - 655), 51010 - 51002), ehT0Px3KOsy9(chr(48) + '\157' + '\x32' + chr(0b110000 + 0o0), 48924 - 48916)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x35' + '\060', 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'C'), chr(7699 - 7599) + chr(101) + '\x63' + '\x6f' + '\x64' + chr(0b1100101))('\165' + '\x74' + '\x66' + chr(1627 - 1582) + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def xkxBmo49x2An(oVre8I6UXc3b, UetznzCpX2AB, jDJZNPYXEyA0=None): C8dAr6Ujq2Tn = Jo82Sscdm2jn(IvZvng5u0Kpk(), llBkVzKbPFml.Sum, xafqLlk3kkUe(SXOLrMavuUCe(b'>\x7f\xa1'), chr(0b1011 + 0o131) + chr(101) + chr(99) + '\x6f' + chr(100) + chr(1463 - 1362))('\x75' + chr(0b1000 + 0o154) + chr(10073 - 9971) + chr(0b10100 + 0o31) + chr(1808 - 1752)), eJ76yreWylLD, other=UetznzCpX2AB, state_actor=jDJZNPYXEyA0, num_instances=oVre8I6UXc3b.env.config.parallelism) return xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'2U\xbea\x17\xb9\xe0\xc2\xe0\x93'), chr(8980 - 8880) + chr(0b1100101) + '\143' + chr(0b1101111) + chr(9904 - 9804) + '\x65')(chr(423 - 306) + chr(0b1110100) + chr(6842 - 6740) + '\x2d' + chr(0b111000)))(C8dAr6Ujq2Tn)
ray-project/ray
python/ray/experimental/streaming/streaming.py
DataStream.time_window
def time_window(self, window_width_ms): """Applies a system time window to the stream. Attributes: window_width_ms (int): The length of the window in ms. """ op = Operator( _generate_uuid(), OpType.TimeWindow, "TimeWindow", num_instances=self.env.config.parallelism, other=window_width_ms) return self.__register(op)
python
def time_window(self, window_width_ms): """Applies a system time window to the stream. Attributes: window_width_ms (int): The length of the window in ms. """ op = Operator( _generate_uuid(), OpType.TimeWindow, "TimeWindow", num_instances=self.env.config.parallelism, other=window_width_ms) return self.__register(op)
[ "def", "time_window", "(", "self", ",", "window_width_ms", ")", ":", "op", "=", "Operator", "(", "_generate_uuid", "(", ")", ",", "OpType", ".", "TimeWindow", ",", "\"TimeWindow\"", ",", "num_instances", "=", "self", ".", "env", ".", "config", ".", "parallelism", ",", "other", "=", "window_width_ms", ")", "return", "self", ".", "__register", "(", "op", ")" ]
Applies a system time window to the stream. Attributes: window_width_ms (int): The length of the window in ms.
[ "Applies", "a", "system", "time", "window", "to", "the", "stream", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/experimental/streaming/streaming.py#L605-L617
train
Applies a system time window to the stream.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ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L,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110 + 0o54) + '\065' + chr(53), 36529 - 36521), ehT0Px3KOsy9(chr(48) + '\157' + chr(334 - 283) + '\063' + chr(55), ord("\x08")), ehT0Px3KOsy9('\060' + chr(2039 - 1928) + chr(2149 - 2098) + chr(0b110111) + '\x37', 0o10), ehT0Px3KOsy9(chr(612 - 564) + chr(0b1101111) + chr(233 - 184) + chr(0b11011 + 0o27) + chr(0b100 + 0o61), 25809 - 25801), ehT0Px3KOsy9('\060' + chr(7349 - 7238) + chr(49) + '\067' + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(5078 - 4967) + chr(0b110010) + chr(54) + '\061', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\063' + '\x36' + chr(53), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + '\x32' + chr(55) + '\060', 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(1190 - 1141) + chr(1976 - 1925) + chr(50), 62470 - 62462), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(111) + chr(927 - 876) + chr(0b110011 + 0o2) + chr(688 - 638), 0o10), ehT0Px3KOsy9(chr(1546 - 1498) + '\157' + chr(1649 - 1598) + '\x34' + '\x34', 63915 - 63907), ehT0Px3KOsy9(chr(0b110000) + chr(214 - 103) + chr(0b100001 + 0o26), 0o10), ehT0Px3KOsy9(chr(1956 - 1908) + chr(0b100010 + 0o115) + chr(51) + chr(1947 - 1894) + '\x36', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b11111 + 0o23) + chr(0b101 + 0o54) + '\x36', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(3403 - 3292) + chr(0b101000 + 0o14) + chr(54), 64841 - 64833), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\065' + '\x36', 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110001) + chr(50), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b100100 + 0o113) + '\x36' + '\065', 63417 - 63409), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(0b1101111 + 0o0) + '\061' + '\060' + chr(54), 28442 - 28434), ehT0Px3KOsy9('\x30' + chr(0b1001001 + 0o46) + chr(0b110010) + '\x37', 55664 - 55656), ehT0Px3KOsy9('\060' + '\157' + chr(51) + chr(0b110110) + chr(248 - 196), 4508 - 4500), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110101), 36468 - 36460), ehT0Px3KOsy9(chr(0b110000) + chr(10603 - 10492) + chr(306 - 256) + '\x33', 1249 - 1241), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b1 + 0o61) + '\x34' + chr(0b110110), 49804 - 49796), ehT0Px3KOsy9('\060' + chr(0b110101 + 0o72) + chr(0b10101 + 0o35) + chr(0b101100 + 0o10) + '\x30', 49084 - 49076), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(111) + chr(357 - 307) + chr(0b110000) + '\062', ord("\x08")), ehT0Px3KOsy9(chr(2100 - 2052) + chr(111) + '\065', 8), ehT0Px3KOsy9('\060' + chr(111) + chr(2044 - 1994) + chr(0b110101) + '\062', 0o10), ehT0Px3KOsy9('\060' + chr(0b1011 + 0o144) + chr(0b110001) + chr(48) + chr(48), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(1163 - 1114) + '\065' + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(260 - 212) + '\x6f' + chr(998 - 949) + chr(699 - 648) + '\064', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1111 + 0o140) + '\062' + '\x31' + chr(1805 - 1755), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(437 - 326) + chr(0b110011) + chr(2656 - 2601) + '\x34', 26086 - 26078), ehT0Px3KOsy9(chr(0b110000) + chr(1233 - 1122) + chr(0b110011 + 0o3) + chr(0b101000 + 0o17), 0b1000), ehT0Px3KOsy9('\x30' + chr(1465 - 1354) + chr(2157 - 2107) + '\x35' + chr(53), 8), ehT0Px3KOsy9(chr(1134 - 1086) + chr(7049 - 6938) + chr(618 - 569) + '\x34' + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(50) + chr(0b110111) + chr(0b11011 + 0o25), 8), ehT0Px3KOsy9(chr(48) + chr(111) + '\062' + chr(0b110111) + '\067', ord("\x08")), ehT0Px3KOsy9('\060' + chr(118 - 7) + chr(0b110001) + chr(53) + chr(0b110011), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + '\063' + chr(1689 - 1641) + '\x30', ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(1672 - 1624) + '\157' + chr(0b10110 + 0o37) + '\060', ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x83'), chr(0b1100100) + chr(101) + chr(99) + chr(0b101110 + 0o101) + '\x64' + '\145')(chr(0b1011110 + 0o27) + '\164' + chr(102) + '\055' + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def NWzGuzg0g7By(oVre8I6UXc3b, HHjaPVA82903): C8dAr6Ujq2Tn = Jo82Sscdm2jn(IvZvng5u0Kpk(), llBkVzKbPFml.TimeWindow, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf9\xb6\x920)\xd8\x9b\xdc5\x9d'), chr(827 - 727) + '\x65' + chr(0b1100011 + 0o0) + '\x6f' + chr(100) + chr(0b1100101))('\165' + chr(5512 - 5396) + '\x66' + chr(0b101101) + '\070'), num_instances=oVre8I6UXc3b.env.config.parallelism, other=HHjaPVA82903) return xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf2\x80\x8d0\x19\xd8\x86\xcc?\x98'), '\x64' + chr(101) + chr(0b1100011) + chr(0b1101111) + '\144' + chr(9152 - 9051))(chr(6159 - 6042) + chr(0b1010011 + 0o41) + chr(2426 - 2324) + chr(0b101101) + '\x38'))(C8dAr6Ujq2Tn)
ray-project/ray
python/ray/experimental/streaming/streaming.py
DataStream.filter
def filter(self, filter_fn): """Applies a filter to the stream. Attributes: filter_fn (function): The user-defined filter function. """ op = Operator( _generate_uuid(), OpType.Filter, "Filter", filter_fn, num_instances=self.env.config.parallelism) return self.__register(op)
python
def filter(self, filter_fn): """Applies a filter to the stream. Attributes: filter_fn (function): The user-defined filter function. """ op = Operator( _generate_uuid(), OpType.Filter, "Filter", filter_fn, num_instances=self.env.config.parallelism) return self.__register(op)
[ "def", "filter", "(", "self", ",", "filter_fn", ")", ":", "op", "=", "Operator", "(", "_generate_uuid", "(", ")", ",", "OpType", ".", "Filter", ",", "\"Filter\"", ",", "filter_fn", ",", "num_instances", "=", "self", ".", "env", ".", "config", ".", "parallelism", ")", "return", "self", ".", "__register", "(", "op", ")" ]
Applies a filter to the stream. Attributes: filter_fn (function): The user-defined filter function.
[ "Applies", "a", "filter", "to", "the", "stream", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0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LaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\x30' + chr(111) + chr(0b11001 + 0o32) + chr(55) + chr(50), 0o10), ehT0Px3KOsy9(chr(1236 - 1188) + chr(9349 - 9238) + chr(0b10 + 0o61) + chr(0b11110 + 0o30) + chr(52), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110011) + chr(683 - 634) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x34' + chr(305 - 257), 48827 - 48819), ehT0Px3KOsy9('\060' + '\x6f' + '\x33' + chr(0b110011) + chr(1381 - 1328), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\067' + chr(0b100010 + 0o25), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b11000 + 0o37) + chr(0b11000 + 0o32), 44155 - 44147), ehT0Px3KOsy9('\060' + chr(0b11111 + 0o120) + chr(0b1010 + 0o47) + chr(50), 0o10), ehT0Px3KOsy9(chr(0b100100 + 0o14) + chr(111) + chr(0b101 + 0o54) + chr(2331 - 2279) + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(602 - 554) + chr(8312 - 8201) + chr(49) + chr(0b110010) + chr(52), 0b1000), ehT0Px3KOsy9(chr(1090 - 1042) + chr(0b1101010 + 0o5) + chr(55) + chr(54), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(8889 - 8778) + '\063' + chr(1753 - 1704) + chr(0b100111 + 0o12), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b101001 + 0o106) + chr(0b1 + 0o62) + '\x33' + chr(0b100100 + 0o22), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(49) + chr(1589 - 1537) + chr(2806 - 2752), 44487 - 44479), ehT0Px3KOsy9(chr(1011 - 963) + chr(0b10000 + 0o137) + chr(0b110110) + '\063', 0o10), ehT0Px3KOsy9(chr(0b101001 + 0o7) + '\x6f' + '\063' + chr(50) + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(335 - 287) + chr(5398 - 5287) + chr(380 - 329) + chr(55) + '\x30', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x32' + '\x34' + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(621 - 570) + chr(0b110100) + '\061', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1010010 + 0o35) + chr(0b110011) + '\x33' + chr(2065 - 2017), 0b1000), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(0b11011 + 0o124) + chr(50) + chr(0b110011) + '\065', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1100110 + 0o11) + chr(1439 - 1389) + chr(0b110101) + chr(2166 - 2116), 3952 - 3944), ehT0Px3KOsy9(chr(0b1011 + 0o45) + '\157' + chr(49) + chr(0b100011 + 0o20) + chr(52), 60362 - 60354), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(0b101100 + 0o103) + chr(1014 - 964) + chr(858 - 804) + '\x32', ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b1100 + 0o53), 0b1000), ehT0Px3KOsy9(chr(1664 - 1616) + chr(111) + chr(0b110000 + 0o3) + chr(0b100101 + 0o22) + '\x37', 0o10), ehT0Px3KOsy9(chr(0b1101 + 0o43) + '\157' + chr(1729 - 1678) + '\067' + chr(55), 8), ehT0Px3KOsy9('\x30' + chr(111) + '\067' + chr(0b11001 + 0o32), 5689 - 5681), ehT0Px3KOsy9(chr(1103 - 1055) + chr(0b1101010 + 0o5) + chr(485 - 435) + chr(0b110001) + chr(0b110011 + 0o0), 6665 - 6657), ehT0Px3KOsy9(chr(0b11001 + 0o27) + '\x6f' + chr(1516 - 1462), 50948 - 50940), ehT0Px3KOsy9('\060' + '\x6f' + '\x33' + chr(803 - 755), ord("\x08")), ehT0Px3KOsy9('\060' + chr(4316 - 4205) + chr(412 - 361) + chr(0b10001 + 0o41) + chr(0b110110), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110001) + chr(2815 - 2761) + '\x30', 23929 - 23921), ehT0Px3KOsy9('\x30' + chr(1062 - 951) + '\061' + chr(0b110111) + '\x36', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x31' + chr(50) + chr(1497 - 1443), 54729 - 54721), ehT0Px3KOsy9(chr(260 - 212) + chr(111) + '\061' + '\060' + '\x32', 0b1000), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(111) + chr(0b110001) + chr(288 - 233) + chr(1969 - 1915), 8), ehT0Px3KOsy9(chr(0b110000) + chr(5404 - 5293) + '\x33' + chr(1969 - 1917), 0o10), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(111) + chr(1797 - 1748) + chr(479 - 431) + '\060', 0o10), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(111) + chr(0b110001) + chr(53) + chr(0b11010 + 0o27), 37034 - 37026)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b101001 + 0o7) + '\x6f' + chr(53) + '\x30', 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xd4'), chr(0b0 + 0o144) + chr(0b0 + 0o145) + chr(0b111100 + 0o47) + chr(0b1000110 + 0o51) + chr(2919 - 2819) + chr(9380 - 9279))('\165' + chr(12298 - 12182) + chr(0b1100110) + chr(0b100111 + 0o6) + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def hi1V0ySZcNds(oVre8I6UXc3b, eGKCGnTedtwn): C8dAr6Ujq2Tn = Jo82Sscdm2jn(IvZvng5u0Kpk(), llBkVzKbPFml.Filter, xafqLlk3kkUe(SXOLrMavuUCe(b'\xbc\x9d\xa4T\xb8M'), chr(100) + chr(0b1001010 + 0o33) + chr(0b100111 + 0o74) + chr(0b111110 + 0o61) + chr(0b11011 + 0o111) + chr(0b11101 + 0o110))(chr(6674 - 6557) + chr(6343 - 6227) + '\x66' + chr(429 - 384) + chr(56)), eGKCGnTedtwn, num_instances=oVre8I6UXc3b.env.config.parallelism) return xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa5\xab\xbaE\xbaVI~\x07&'), chr(0b1010111 + 0o15) + chr(6136 - 6035) + chr(0b1100011) + '\157' + '\x64' + chr(101))(chr(117) + '\x74' + chr(102) + chr(0b101000 + 0o5) + chr(0b11101 + 0o33)))(C8dAr6Ujq2Tn)
ray-project/ray
python/ray/experimental/streaming/streaming.py
DataStream.inspect
def inspect(self, inspect_logic): """Inspects the content of the stream. Attributes: inspect_logic (function): The user-defined inspect function. """ op = Operator( _generate_uuid(), OpType.Inspect, "Inspect", inspect_logic, num_instances=self.env.config.parallelism) return self.__register(op)
python
def inspect(self, inspect_logic): """Inspects the content of the stream. Attributes: inspect_logic (function): The user-defined inspect function. """ op = Operator( _generate_uuid(), OpType.Inspect, "Inspect", inspect_logic, num_instances=self.env.config.parallelism) return self.__register(op)
[ "def", "inspect", "(", "self", ",", "inspect_logic", ")", ":", "op", "=", "Operator", "(", "_generate_uuid", "(", ")", ",", "OpType", ".", "Inspect", ",", "\"Inspect\"", ",", "inspect_logic", ",", "num_instances", "=", "self", ".", "env", ".", "config", ".", "parallelism", ")", "return", "self", ".", "__register", "(", "op", ")" ]
Inspects the content of the stream. Attributes: inspect_logic (function): The user-defined inspect function.
[ "Inspects", "the", "content", "of", "the", "stream", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/experimental/streaming/streaming.py#L644-L656
train
Inspects the content of the stream.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7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W,iDQ_gSK8V7h0,Rurm1zTRfSmY,reqGiMiVQ77y,bsS9P6_LpdIe,sbGAZlkZOtyh,Cf_Qef15s3_F,eX02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110011) + chr(48) + chr(52), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(51) + chr(50), 9481 - 9473), ehT0Px3KOsy9('\x30' + chr(0b10101 + 0o132) + '\x33' + '\x36' + '\061', ord("\x08")), ehT0Px3KOsy9(chr(1170 - 1122) + chr(0b1101111) + '\x32' + '\066' + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110011) + '\061' + '\x34', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(51) + chr(51) + chr(52), 0b1000), ehT0Px3KOsy9(chr(1490 - 1442) + chr(111) + '\x37' + chr(60 - 8), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b100101 + 0o112) + '\x32' + chr(54), 18297 - 18289), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(50) + '\065' + '\x33', 53898 - 53890), ehT0Px3KOsy9('\x30' + chr(6311 - 6200) + chr(0b110011) + chr(55) + chr(50), 0b1000), ehT0Px3KOsy9(chr(0b10001 + 0o37) + '\x6f' + chr(0b101101 + 0o4) + '\x33' + chr(1462 - 1413), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\061' + '\x35' + chr(50), 11837 - 11829), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x32' + chr(154 - 100) + chr(51), 64992 - 64984), ehT0Px3KOsy9('\x30' + chr(0b1011000 + 0o27) + chr(0b110001) + chr(1373 - 1324), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(312 - 263) + chr(901 - 852) + '\x31', 0b1000), ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(1968 - 1857) + chr(50) + chr(0b1101 + 0o45), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(120 - 70) + chr(0b110001) + chr(0b110100), 4940 - 4932), ehT0Px3KOsy9(chr(0b10000 + 0o40) + '\157' + '\062' + '\063' + '\x33', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b10010 + 0o41) + '\x31' + chr(49), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(1641 - 1590) + '\064' + chr(966 - 914), 0b1000), ehT0Px3KOsy9(chr(2097 - 2049) + '\x6f' + chr(51) + '\x37' + '\x36', 9909 - 9901), ehT0Px3KOsy9(chr(1876 - 1828) + '\x6f' + '\061' + '\064' + '\064', 48220 - 48212), ehT0Px3KOsy9('\060' + chr(3115 - 3004) + chr(0b11101 + 0o25), 0b1000), ehT0Px3KOsy9(chr(1623 - 1575) + chr(0b1010000 + 0o37) + '\x32' + '\x32' + '\061', 62986 - 62978), ehT0Px3KOsy9(chr(355 - 307) + chr(0b1101111) + chr(0b100100 + 0o17) + chr(0b110000) + '\062', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x33' + '\061' + '\061', 8), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(7418 - 7307) + '\x32' + '\061' + '\x32', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(51) + chr(49) + '\x36', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x32' + chr(55) + chr(0b11000 + 0o36), 0o10), ehT0Px3KOsy9(chr(2135 - 2087) + chr(10090 - 9979) + chr(1784 - 1732) + '\064', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110001) + chr(48) + chr(0b110 + 0o52), 52100 - 52092), ehT0Px3KOsy9('\x30' + chr(0b100011 + 0o114) + '\x32' + '\064' + chr(54), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b111100 + 0o63) + '\x32' + chr(48) + chr(0b11011 + 0o30), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\065' + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b10010 + 0o135) + chr(959 - 910) + chr(0b100110 + 0o16), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(50) + chr(2523 - 2470) + chr(1842 - 1790), 0o10), ehT0Px3KOsy9(chr(960 - 912) + chr(111) + '\x31' + chr(0b110001) + chr(0b101111 + 0o4), 49837 - 49829), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(2380 - 2329) + '\062', 8), ehT0Px3KOsy9(chr(48) + '\157' + chr(193 - 142) + chr(828 - 775) + chr(50), 33276 - 33268), ehT0Px3KOsy9(chr(1607 - 1559) + chr(0b1101111) + '\062' + '\x34' + chr(0b110101), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(0b111101 + 0o62) + chr(0b110101) + '\x30', 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xea'), '\144' + chr(0b10111 + 0o116) + chr(99) + chr(11214 - 11103) + '\x64' + '\x65')(chr(10420 - 10303) + '\164' + chr(0b10010 + 0o124) + chr(0b101101) + chr(0b10110 + 0o42)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def kzXqv8ZZwm75(oVre8I6UXc3b, pYcBoD6sWzZb): C8dAr6Ujq2Tn = Jo82Sscdm2jn(IvZvng5u0Kpk(), llBkVzKbPFml.Inspect, xafqLlk3kkUe(SXOLrMavuUCe(b'\x8dt\x82\xc4\xa9\xbfH'), chr(0b1011001 + 0o13) + chr(0b100111 + 0o76) + chr(0b1100011) + '\x6f' + '\144' + chr(0b1100101))(chr(0b11 + 0o162) + chr(116) + chr(102) + chr(0b101101) + chr(2498 - 2442)), pYcBoD6sWzZb, num_instances=oVre8I6UXc3b.env.config.parallelism) return xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9bE\x83\xd1\xab\xb5Ob\xce\x88'), '\x64' + '\145' + chr(0b1100011) + chr(111) + chr(0b1100100) + chr(8608 - 8507))(chr(10670 - 10553) + chr(9866 - 9750) + '\146' + chr(0b101101) + chr(0b111000)))(C8dAr6Ujq2Tn)
ray-project/ray
python/ray/experimental/streaming/streaming.py
DataStream.sink
def sink(self): """Closes the stream with a sink operator.""" op = Operator( _generate_uuid(), OpType.Sink, "Sink", num_instances=self.env.config.parallelism) return self.__register(op)
python
def sink(self): """Closes the stream with a sink operator.""" op = Operator( _generate_uuid(), OpType.Sink, "Sink", num_instances=self.env.config.parallelism) return self.__register(op)
[ "def", "sink", "(", "self", ")", ":", "op", "=", "Operator", "(", "_generate_uuid", "(", ")", ",", "OpType", ".", "Sink", ",", "\"Sink\"", ",", "num_instances", "=", "self", ".", "env", ".", "config", ".", "parallelism", ")", "return", "self", ".", "__register", "(", "op", ")" ]
Closes the stream with a sink operator.
[ "Closes", "the", "stream", "with", "a", "sink", "operator", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/experimental/streaming/streaming.py#L661-L668
train
Closes the stream with a sink operator.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSb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Fey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b100000 + 0o20) + '\x6f' + chr(55) + chr(1157 - 1105), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x33' + chr(0b110100) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b10111 + 0o130) + '\063' + chr(854 - 802) + '\x34', 0b1000), ehT0Px3KOsy9('\x30' + '\157' + '\067' + chr(1447 - 1398), 40805 - 40797), ehT0Px3KOsy9(chr(1690 - 1642) + chr(0b100001 + 0o116) + chr(0b110011) + chr(762 - 709) + '\x31', 11606 - 11598), ehT0Px3KOsy9(chr(48) + chr(5298 - 5187) + '\061' + chr(0b101110 + 0o2) + chr(922 - 871), 0b1000), ehT0Px3KOsy9(chr(1646 - 1598) + chr(4827 - 4716) + '\062' + chr(992 - 941) + '\x34', 32957 - 32949), ehT0Px3KOsy9('\x30' + '\157' + chr(50) + chr(0b101011 + 0o6), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b101111 + 0o6) + chr(0b101010 + 0o10), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(54) + chr(1304 - 1255), 0b1000), ehT0Px3KOsy9('\060' + '\157' + '\061' + '\066' + chr(0b1110 + 0o51), ord("\x08")), ehT0Px3KOsy9(chr(1873 - 1825) + chr(0b1001 + 0o146) + chr(51) + chr(0b110010) + chr(0b110010), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(1614 - 1565) + chr(102 - 48) + chr(0b110011), 60542 - 60534), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110010) + chr(0b110101) + '\065', 42295 - 42287), ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(5376 - 5265) + '\062' + '\067' + chr(1387 - 1332), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(51) + chr(2345 - 2291) + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(111) + '\061' + chr(0b110000) + chr(2217 - 2168), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b10100 + 0o133) + '\065' + chr(0b110010), 8), ehT0Px3KOsy9(chr(58 - 10) + '\x6f' + chr(49) + chr(1962 - 1914) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(1393 - 1345) + '\x6f' + chr(2206 - 2155) + '\061' + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1010110 + 0o31) + chr(0b110010) + chr(0b110001), 8), ehT0Px3KOsy9('\x30' + chr(111) + '\x33', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b100010 + 0o20) + chr(0b110011) + chr(0b111 + 0o53), 29140 - 29132), ehT0Px3KOsy9(chr(766 - 718) + '\x6f' + chr(0b11011 + 0o30) + chr(54) + chr(0b110000), 8), ehT0Px3KOsy9('\x30' + chr(111) + chr(51) + chr(0b110101) + chr(48), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + '\x33' + chr(2201 - 2152), 0b1000), ehT0Px3KOsy9(chr(0b11010 + 0o26) + '\157' + chr(0b1 + 0o61) + chr(0b100111 + 0o17) + chr(699 - 651), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1001 + 0o146) + '\063' + '\063', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(50) + chr(55) + chr(49), 57334 - 57326), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(7391 - 7280) + '\062' + '\x36' + chr(0b110101), ord("\x08")), ehT0Px3KOsy9('\060' + chr(11125 - 11014) + '\x33' + '\x37' + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(433 - 383) + '\067' + chr(0b110010), 51047 - 51039), ehT0Px3KOsy9(chr(329 - 281) + chr(10978 - 10867) + '\x31' + chr(1437 - 1388) + '\x33', 0b1000), ehT0Px3KOsy9(chr(1586 - 1538) + chr(111) + '\x31' + chr(0b11111 + 0o23) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(1056 - 1008) + '\157' + chr(49) + chr(0b11 + 0o60) + chr(911 - 859), 0b1000), ehT0Px3KOsy9(chr(645 - 597) + chr(0b1011 + 0o144) + chr(0b110011) + '\x35' + chr(1994 - 1941), 0o10), ehT0Px3KOsy9('\060' + chr(5466 - 5355) + '\061' + '\060' + chr(0b110 + 0o53), 8), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(0b1101111) + chr(50) + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(1519 - 1471) + '\x6f' + '\061' + '\x33' + '\x34', 8), ehT0Px3KOsy9(chr(48) + '\157' + '\x33' + chr(51) + chr(0b110000), 19874 - 19866)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + '\x6f' + chr(2077 - 2024) + chr(48), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x12'), '\144' + chr(101) + chr(1864 - 1765) + chr(111) + '\x64' + chr(3052 - 2951))('\165' + '\x74' + chr(0b1100110) + chr(0b101101) + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def ygMwjYsY2KzH(oVre8I6UXc3b): C8dAr6Ujq2Tn = Jo82Sscdm2jn(IvZvng5u0Kpk(), llBkVzKbPFml.Sink, xafqLlk3kkUe(SXOLrMavuUCe(b'o\x8a\x8aR'), chr(100) + chr(101) + chr(1094 - 995) + '\x6f' + '\144' + chr(0b1100101))(chr(10560 - 10443) + chr(0b110010 + 0o102) + '\x66' + chr(114 - 69) + '\070'), num_instances=oVre8I6UXc3b.env.config.parallelism) return xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'c\xbc\x96\\\x8e*\xefeOC'), chr(0b1100100) + chr(0b1100101) + chr(99) + chr(0b1101111 + 0o0) + chr(5937 - 5837) + '\x65')(chr(0b1100000 + 0o25) + chr(0b1110100) + chr(0b1100110) + '\x2d' + chr(56)))(C8dAr6Ujq2Tn)
ray-project/ray
python/ray/log_monitor.py
LogMonitor.close_all_files
def close_all_files(self): """Close all open files (so that we can open more).""" while len(self.open_file_infos) > 0: file_info = self.open_file_infos.pop(0) file_info.file_handle.close() file_info.file_handle = None self.closed_file_infos.append(file_info) self.can_open_more_files = True
python
def close_all_files(self): """Close all open files (so that we can open more).""" while len(self.open_file_infos) > 0: file_info = self.open_file_infos.pop(0) file_info.file_handle.close() file_info.file_handle = None self.closed_file_infos.append(file_info) self.can_open_more_files = True
[ "def", "close_all_files", "(", "self", ")", ":", "while", "len", "(", "self", ".", "open_file_infos", ")", ">", "0", ":", "file_info", "=", "self", ".", "open_file_infos", ".", "pop", "(", "0", ")", "file_info", ".", "file_handle", ".", "close", "(", ")", "file_info", ".", "file_handle", "=", "None", "self", ".", "closed_file_infos", ".", "append", "(", "file_info", ")", "self", ".", "can_open_more_files", "=", "True" ]
Close all open files (so that we can open more).
[ "Close", "all", "open", "files", "(", "so", "that", "we", "can", "open", "more", ")", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/log_monitor.py#L81-L88
train
Close all open files.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MS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s,QOfmzcVJsrp8,tzcpInYwBvYW,iDQ_gSK8V7h0,Rurm1zTRfSmY,reqGiMiVQ77y,bsS9P6_LpdIe,sbGAZlkZOtyh,Cf_Qef15s3_F,eX02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + '\157' + chr(336 - 287) + chr(0b110010) + chr(0b100100 + 0o17), ord("\x08")), ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(3627 - 3516) + chr(51) + chr(48) + '\066', 11740 - 11732), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(49) + chr(0b10110 + 0o37) + chr(0b100001 + 0o20), ord("\x08")), ehT0Px3KOsy9('\060' + chr(9169 - 9058) + chr(0b110010) + chr(0b11101 + 0o23), ord("\x08")), ehT0Px3KOsy9(chr(996 - 948) + chr(0b1101111) + chr(51) + chr(0b110010) + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(0b110 + 0o52) + '\157' + chr(55) + chr(55), 31472 - 31464), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b101111 + 0o3) + chr(49) + '\x34', 0o10), ehT0Px3KOsy9(chr(817 - 769) + chr(111) + '\061' + '\066' + chr(0b110111), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110011) + chr(0b101011 + 0o14) + chr(0b110101), 48143 - 48135), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(0b1101111) + chr(1787 - 1736) + '\x32' + chr(0b101110 + 0o11), 0o10), ehT0Px3KOsy9(chr(1665 - 1617) + '\157' + '\x32' + '\x34' + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\064' + '\067', ord("\x08")), ehT0Px3KOsy9(chr(1260 - 1212) + chr(0b1011000 + 0o27) + chr(49) + chr(49) + '\063', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\062' + chr(50) + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(1777 - 1727) + '\063' + chr(0b10110 + 0o40), 25523 - 25515), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000110 + 0o51) + chr(0b10001 + 0o40) + '\x34' + chr(52), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(0b100111 + 0o16), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(0b1100 + 0o46) + chr(760 - 707) + '\060', 0o10), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(0b1110 + 0o141) + '\067' + '\064', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110011) + '\x31' + chr(52), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + '\061' + '\x31', 54649 - 54641), ehT0Px3KOsy9('\x30' + '\157' + '\062' + chr(150 - 95) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(1157 - 1109) + chr(0b1101111) + chr(0b101000 + 0o11) + chr(0b110101) + chr(0b11100 + 0o25), 8), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\062' + chr(821 - 773) + '\065', 0b1000), ehT0Px3KOsy9(chr(61 - 13) + chr(0b1101111) + chr(0b10001 + 0o42) + '\x33' + '\x37', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(50) + chr(0b1 + 0o60), 0b1000), ehT0Px3KOsy9(chr(338 - 290) + '\x6f' + '\x32' + chr(827 - 777) + chr(0b0 + 0o67), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1010111 + 0o30) + chr(0b110011) + '\x33' + chr(2146 - 2091), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1100011 + 0o14) + chr(0b110010) + chr(2311 - 2256) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b1100 + 0o44) + '\x6f' + chr(1921 - 1867) + chr(0b11111 + 0o27), 0b1000), ehT0Px3KOsy9('\060' + chr(1568 - 1457) + '\x32' + '\066' + chr(0b110000), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(2210 - 2160) + '\067' + chr(0b1 + 0o57), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(1525 - 1470), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + '\063' + chr(52) + chr(0b110010), 0o10), ehT0Px3KOsy9('\x30' + chr(808 - 697) + chr(57 - 6) + '\x32' + chr(48), 61601 - 61593), ehT0Px3KOsy9(chr(0b110000) + chr(4986 - 4875) + chr(2096 - 2046) + '\061' + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(111) + chr(49) + '\x37' + chr(0b110100), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + '\x31' + '\062', 55725 - 55717), ehT0Px3KOsy9('\060' + chr(111) + chr(49) + '\x37' + '\x35', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b10100 + 0o37) + chr(0b101110 + 0o11) + chr(0b10101 + 0o33), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(53) + '\x30', 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'}'), '\144' + '\x65' + chr(5401 - 5302) + chr(0b1101111) + chr(6029 - 5929) + '\145')(chr(3311 - 3194) + '\x74' + chr(0b1100110) + '\055' + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def lTWqRQfXPKvT(oVre8I6UXc3b): while c2A0yzQpDQB3(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'<\xb6\x0c~\x8cY\xe5\x1b\x98\x88\xcaI-\xfa\xed'), chr(6382 - 6282) + chr(0b1100101) + chr(0b1100011) + '\x6f' + '\144' + chr(101))('\x75' + chr(0b1110100) + chr(102) + chr(0b101101) + chr(0b111000)))) > ehT0Px3KOsy9(chr(48) + chr(111) + '\x30', 531 - 523): HfGOmsePz_YG = oVre8I6UXc3b.open_file_infos.pop(ehT0Px3KOsy9(chr(0b110000) + chr(2346 - 2235) + chr(1273 - 1225), 8)) xafqLlk3kkUe(HfGOmsePz_YG.file_handle, xafqLlk3kkUe(SXOLrMavuUCe(b'0\xaa\x06c\xb6'), '\144' + chr(0b1011110 + 0o7) + chr(0b1100011) + chr(12074 - 11963) + chr(0b1100100) + '\x65')(chr(0b1010111 + 0o36) + chr(0b1110100) + chr(102) + chr(1191 - 1146) + chr(56)))() HfGOmsePz_YG.AeMiztGb7Fhc = None xafqLlk3kkUe(oVre8I6UXc3b.closed_file_infos, xafqLlk3kkUe(SXOLrMavuUCe(b'2\xb6\x19u\xbd['), chr(4745 - 4645) + '\145' + '\x63' + chr(111) + chr(100) + chr(0b1101 + 0o130))(chr(12052 - 11935) + chr(5433 - 5317) + chr(0b110000 + 0o66) + chr(0b101101) + chr(56)))(HfGOmsePz_YG) oVre8I6UXc3b.Z26fADrPWxcO = ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110001), 1230 - 1222)
ray-project/ray
python/ray/log_monitor.py
LogMonitor.update_log_filenames
def update_log_filenames(self): """Update the list of log files to monitor.""" log_filenames = os.listdir(self.logs_dir) for log_filename in log_filenames: full_path = os.path.join(self.logs_dir, log_filename) if full_path not in self.log_filenames: self.log_filenames.add(full_path) self.closed_file_infos.append( LogFileInfo( filename=full_path, size_when_last_opened=0, file_position=0, file_handle=None)) logger.info("Beginning to track file {}".format(log_filename))
python
def update_log_filenames(self): """Update the list of log files to monitor.""" log_filenames = os.listdir(self.logs_dir) for log_filename in log_filenames: full_path = os.path.join(self.logs_dir, log_filename) if full_path not in self.log_filenames: self.log_filenames.add(full_path) self.closed_file_infos.append( LogFileInfo( filename=full_path, size_when_last_opened=0, file_position=0, file_handle=None)) logger.info("Beginning to track file {}".format(log_filename))
[ "def", "update_log_filenames", "(", "self", ")", ":", "log_filenames", "=", "os", ".", "listdir", "(", "self", ".", "logs_dir", ")", "for", "log_filename", "in", "log_filenames", ":", "full_path", "=", "os", ".", "path", ".", "join", "(", "self", ".", "logs_dir", ",", "log_filename", ")", "if", "full_path", "not", "in", "self", ".", "log_filenames", ":", "self", ".", "log_filenames", ".", "add", "(", "full_path", ")", "self", ".", "closed_file_infos", ".", "append", "(", "LogFileInfo", "(", "filename", "=", "full_path", ",", "size_when_last_opened", "=", "0", ",", "file_position", "=", "0", ",", "file_handle", "=", "None", ")", ")", "logger", ".", "info", "(", "\"Beginning to track file {}\"", ".", "format", "(", "log_filename", ")", ")" ]
Update the list of log files to monitor.
[ "Update", "the", "list", "of", "log", "files", "to", "monitor", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/log_monitor.py#L90-L104
train
Update the list of log files to monitor.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPvpP4xdo3,cW7yQuyEnJ6E,KOHQGQ8qLDWm,NE1Yam2HHroQ,ygAzbDzrvRMh,SBRjvOU1ufVC,hOkXjmluKZfJ,q1QCh3W88sgk,TLbJ60djyws0,rIcPej9ZqMqV,WTxpD_zsEOh2,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yeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\x30' + '\x6f' + '\062' + chr(55) + chr(1239 - 1187), 0o10), ehT0Px3KOsy9(chr(969 - 921) + chr(111) + chr(0b110001) + '\064' + chr(2304 - 2254), 10607 - 10599), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(51) + '\064', 0b1000), ehT0Px3KOsy9(chr(2272 - 2224) + chr(0b1000011 + 0o54) + chr(0b110110) + chr(53), 11618 - 11610), ehT0Px3KOsy9('\060' + chr(111) + '\062' + chr(50), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(53) + chr(1185 - 1137), 51784 - 51776), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b100000 + 0o21) + chr(54) + chr(51), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101000 + 0o7) + '\063' + '\x36' + chr(55), 65351 - 65343), ehT0Px3KOsy9('\x30' + '\x6f' + '\x34' + '\x34', 0o10), ehT0Px3KOsy9(chr(0b11110 + 0o22) + '\157' + chr(0b110001) + '\x32' + chr(0b101010 + 0o13), 62454 - 62446), ehT0Px3KOsy9('\060' + chr(111) + '\064' + '\x36', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b1110 + 0o43) + chr(0b110101) + chr(0b1101 + 0o51), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + '\x33' + '\x31' + chr(49), 0b1000), ehT0Px3KOsy9(chr(1584 - 1536) + '\x6f' + chr(0b110011) + '\062' + chr(48), 49697 - 49689), ehT0Px3KOsy9('\x30' + chr(0b110110 + 0o71) + chr(54) + '\061', 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110011) + '\x31' + '\x33', 341 - 333), ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(111) + chr(0b10 + 0o65) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(382 - 333) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(2450 - 2399) + '\x33' + '\x32', 0o10), ehT0Px3KOsy9(chr(48) + chr(9248 - 9137) + chr(0b110010) + chr(0b1010 + 0o46) + chr(0b110101), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\062' + chr(0b100110 + 0o20) + chr(0b101010 + 0o6), 0o10), ehT0Px3KOsy9('\x30' + chr(7165 - 7054) + '\063' + chr(0b101011 + 0o12), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(54) + '\062', 0o10), ehT0Px3KOsy9('\x30' + chr(0b110110 + 0o71) + chr(0b110001) + chr(1819 - 1765) + '\x30', 40532 - 40524), ehT0Px3KOsy9(chr(48) + '\157' + '\x32' + chr(0b1 + 0o61) + '\063', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110010) + chr(52) + '\x32', 37136 - 37128), ehT0Px3KOsy9('\x30' + chr(111) + chr(49) + '\066', 8579 - 8571), ehT0Px3KOsy9('\060' + chr(0b1101 + 0o142) + '\x37' + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b111110 + 0o61) + '\x33' + '\065' + chr(1701 - 1652), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x33' + '\061' + chr(51), 8), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(0b1001101 + 0o42) + chr(0b11010 + 0o34) + chr(0b100010 + 0o25), 28399 - 28391), ehT0Px3KOsy9(chr(48) + '\x6f' + '\064' + chr(2021 - 1973), 0o10), ehT0Px3KOsy9(chr(0b1010 + 0o46) + '\157' + chr(0b110100) + chr(0b11001 + 0o27), 8), ehT0Px3KOsy9('\060' + '\x6f' + chr(50) + chr(0b1001 + 0o52) + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b10110 + 0o35) + chr(685 - 630) + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(51) + '\065' + '\061', 8), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110001) + '\065' + '\x36', 8), ehT0Px3KOsy9(chr(0b101100 + 0o4) + chr(0b1101111) + chr(0b110001) + '\066' + chr(0b110101), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x33' + chr(0b110111) + '\067', 8), ehT0Px3KOsy9('\x30' + chr(0b1100011 + 0o14) + '\061' + chr(817 - 766), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\065' + chr(0b110000), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x92'), chr(0b1100100) + chr(0b1011101 + 0o10) + chr(0b1010010 + 0o21) + chr(0b1101111) + '\x64' + chr(4214 - 4113))('\x75' + '\164' + chr(0b1100110) + '\055' + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def tauYWklQn3HH(oVre8I6UXc3b): n1tiEfGCukqN = oqhJDdMJfuwx.listdir(oVre8I6UXc3b.logs_dir) for KjgmRQQMLkml in n1tiEfGCukqN: rI6LPzVe_y18 = oqhJDdMJfuwx.path._oWXztVNnqHF(oVre8I6UXc3b.logs_dir, KjgmRQQMLkml) if rI6LPzVe_y18 not in xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd0\r{jtA\x1f\x92J4K\x0b\xba'), '\144' + chr(0b1100101) + chr(971 - 872) + chr(9627 - 9516) + '\x64' + chr(0b1100101))(chr(5994 - 5877) + '\x74' + '\x66' + '\055' + chr(56))): xafqLlk3kkUe(oVre8I6UXc3b.log_filenames, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc9(,D+K4\xc2~\x1at]'), chr(0b1100100) + chr(3546 - 3445) + '\x63' + chr(10021 - 9910) + '\144' + '\145')('\x75' + chr(0b1011000 + 0o34) + '\x66' + '\x2d' + '\070'))(rI6LPzVe_y18) xafqLlk3kkUe(oVre8I6UXc3b.closed_file_infos, xafqLlk3kkUe(SXOLrMavuUCe(b'\xdd\x12lP|L'), chr(0b1100100) + chr(101) + chr(99) + '\157' + chr(0b1100100) + chr(101))('\165' + '\x74' + chr(0b100000 + 0o106) + chr(45) + chr(0b100101 + 0o23)))(BePvlaiN8ghL(filename=rI6LPzVe_y18, size_when_last_opened=ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b10111 + 0o31), 0b1000), file_position=ehT0Px3KOsy9(chr(48) + chr(0b10001 + 0o136) + chr(0b1001 + 0o47), 8), file_handle=None)) xafqLlk3kkUe(hdK8qOUhR6Or, xafqLlk3kkUe(SXOLrMavuUCe(b'\xefUTMgK\x14\xc0N9|\x05'), '\x64' + chr(0b1100101) + chr(0b1100011) + '\x6f' + '\x64' + chr(0b100 + 0o141))(chr(117) + chr(0b1110100) + '\x66' + chr(1709 - 1664) + chr(56)))(xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b'\xfe\x07{\\|F\x1a\x99CuR\x01\xe9\xa4C\xaaYg\xfa\xe3\xd9qWP\xe8\xdf'), chr(0b1100100) + '\x65' + chr(99) + chr(0b1101111) + chr(3209 - 3109) + chr(0b1100101))(chr(5175 - 5058) + chr(0b1110000 + 0o4) + '\146' + chr(0b101101 + 0o0) + '\x38'), xafqLlk3kkUe(SXOLrMavuUCe(b'\xeaVnZZI \xc4t%C\x04'), chr(100) + chr(0b1010110 + 0o17) + chr(0b1001110 + 0o25) + chr(0b1101111) + '\144' + chr(532 - 431))(chr(117) + chr(116) + chr(6549 - 6447) + '\x2d' + '\x38'))(KjgmRQQMLkml))
ray-project/ray
python/ray/log_monitor.py
LogMonitor.open_closed_files
def open_closed_files(self): """Open some closed files if they may have new lines. Opening more files may require us to close some of the already open files. """ if not self.can_open_more_files: # If we can't open any more files. Close all of the files. self.close_all_files() files_with_no_updates = [] while len(self.closed_file_infos) > 0: if (len(self.open_file_infos) >= ray_constants.LOG_MONITOR_MAX_OPEN_FILES): self.can_open_more_files = False break file_info = self.closed_file_infos.pop(0) assert file_info.file_handle is None # Get the file size to see if it has gotten bigger since we last # opened it. try: file_size = os.path.getsize(file_info.filename) except (IOError, OSError) as e: # Catch "file not found" errors. if e.errno == errno.ENOENT: logger.warning("Warning: The file {} was not " "found.".format(file_info.filename)) self.log_filenames.remove(file_info.filename) continue raise e # If some new lines have been added to this file, try to reopen the # file. if file_size > file_info.size_when_last_opened: try: f = open(file_info.filename, "r") except (IOError, OSError) as e: if e.errno == errno.ENOENT: logger.warning("Warning: The file {} was not " "found.".format(file_info.filename)) self.log_filenames.remove(file_info.filename) continue else: raise e f.seek(file_info.file_position) file_info.filesize_when_last_opened = file_size file_info.file_handle = f self.open_file_infos.append(file_info) else: files_with_no_updates.append(file_info) # Add the files with no changes back to the list of closed files. self.closed_file_infos += files_with_no_updates
python
def open_closed_files(self): """Open some closed files if they may have new lines. Opening more files may require us to close some of the already open files. """ if not self.can_open_more_files: # If we can't open any more files. Close all of the files. self.close_all_files() files_with_no_updates = [] while len(self.closed_file_infos) > 0: if (len(self.open_file_infos) >= ray_constants.LOG_MONITOR_MAX_OPEN_FILES): self.can_open_more_files = False break file_info = self.closed_file_infos.pop(0) assert file_info.file_handle is None # Get the file size to see if it has gotten bigger since we last # opened it. try: file_size = os.path.getsize(file_info.filename) except (IOError, OSError) as e: # Catch "file not found" errors. if e.errno == errno.ENOENT: logger.warning("Warning: The file {} was not " "found.".format(file_info.filename)) self.log_filenames.remove(file_info.filename) continue raise e # If some new lines have been added to this file, try to reopen the # file. if file_size > file_info.size_when_last_opened: try: f = open(file_info.filename, "r") except (IOError, OSError) as e: if e.errno == errno.ENOENT: logger.warning("Warning: The file {} was not " "found.".format(file_info.filename)) self.log_filenames.remove(file_info.filename) continue else: raise e f.seek(file_info.file_position) file_info.filesize_when_last_opened = file_size file_info.file_handle = f self.open_file_infos.append(file_info) else: files_with_no_updates.append(file_info) # Add the files with no changes back to the list of closed files. self.closed_file_infos += files_with_no_updates
[ "def", "open_closed_files", "(", "self", ")", ":", "if", "not", "self", ".", "can_open_more_files", ":", "# If we can't open any more files. Close all of the files.", "self", ".", "close_all_files", "(", ")", "files_with_no_updates", "=", "[", "]", "while", "len", "(", "self", ".", "closed_file_infos", ")", ">", "0", ":", "if", "(", "len", "(", "self", ".", "open_file_infos", ")", ">=", "ray_constants", ".", "LOG_MONITOR_MAX_OPEN_FILES", ")", ":", "self", ".", "can_open_more_files", "=", "False", "break", "file_info", "=", "self", ".", "closed_file_infos", ".", "pop", "(", "0", ")", "assert", "file_info", ".", "file_handle", "is", "None", "# Get the file size to see if it has gotten bigger since we last", "# opened it.", "try", ":", "file_size", "=", "os", ".", "path", ".", "getsize", "(", "file_info", ".", "filename", ")", "except", "(", "IOError", ",", "OSError", ")", "as", "e", ":", "# Catch \"file not found\" errors.", "if", "e", ".", "errno", "==", "errno", ".", "ENOENT", ":", "logger", ".", "warning", "(", "\"Warning: The file {} was not \"", "\"found.\"", ".", "format", "(", "file_info", ".", "filename", ")", ")", "self", ".", "log_filenames", ".", "remove", "(", "file_info", ".", "filename", ")", "continue", "raise", "e", "# If some new lines have been added to this file, try to reopen the", "# file.", "if", "file_size", ">", "file_info", ".", "size_when_last_opened", ":", "try", ":", "f", "=", "open", "(", "file_info", ".", "filename", ",", "\"r\"", ")", "except", "(", "IOError", ",", "OSError", ")", "as", "e", ":", "if", "e", ".", "errno", "==", "errno", ".", "ENOENT", ":", "logger", ".", "warning", "(", "\"Warning: The file {} was not \"", "\"found.\"", ".", "format", "(", "file_info", ".", "filename", ")", ")", "self", ".", "log_filenames", ".", "remove", "(", "file_info", ".", "filename", ")", "continue", "else", ":", "raise", "e", "f", ".", "seek", "(", "file_info", ".", "file_position", ")", "file_info", ".", "filesize_when_last_opened", "=", "file_size", "file_info", ".", "file_handle", "=", "f", "self", ".", "open_file_infos", ".", "append", "(", "file_info", ")", "else", ":", "files_with_no_updates", ".", "append", "(", "file_info", ")", "# Add the files with no changes back to the list of closed files.", "self", ".", "closed_file_infos", "+=", "files_with_no_updates" ]
Open some closed files if they may have new lines. Opening more files may require us to close some of the already open files.
[ "Open", "some", "closed", "files", "if", "they", "may", "have", "new", "lines", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/log_monitor.py#L106-L160
train
Open some closed files.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,szn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M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(111) + '\x33' + chr(0b110110) + chr(0b1010 + 0o54), 38113 - 38105), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\061' + chr(0b110011) + chr(1233 - 1183), 0b1000), ehT0Px3KOsy9(chr(1064 - 1016) + chr(0b1101010 + 0o5) + chr(0b11000 + 0o31) + '\x33' + chr(0b110010), 8), ehT0Px3KOsy9('\060' + chr(111) + '\061' + chr(51) + chr(0b110111), 0o10), ehT0Px3KOsy9('\060' + '\157' + '\062' + chr(48) + chr(0b1000 + 0o57), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x32' + '\x33' + chr(54), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(51) + chr(2439 - 2384) + '\062', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b10001 + 0o40) + chr(55) + chr(739 - 691), 19652 - 19644), ehT0Px3KOsy9(chr(48) + '\157' + '\066' + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + '\x32' + '\062' + chr(0b100100 + 0o17), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(4034 - 3923) + chr(0b110101) + chr(0b110010), 41052 - 41044), ehT0Px3KOsy9(chr(2272 - 2224) + '\x6f' + chr(0b110110) + '\x34', 0o10), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(10227 - 10116) + chr(0b110000), 31301 - 31293), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1241 - 1190) + chr(145 - 95), 0b1000), ehT0Px3KOsy9(chr(497 - 449) + chr(0b1101111) + chr(0b110001 + 0o0) + chr(0b110011) + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(10317 - 10206) + chr(50) + '\x30' + '\x35', 0o10), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(2347 - 2236) + chr(0b110010) + chr(50) + chr(398 - 347), 8), ehT0Px3KOsy9(chr(48) + chr(0b1101100 + 0o3) + '\061' + '\x30' + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(1101 - 1053) + chr(0b101010 + 0o105) + '\x31' + chr(0b110101) + '\062', 19941 - 19933), ehT0Px3KOsy9('\x30' + chr(0b1011001 + 0o26) + chr(0b110111) + chr(55), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1831 - 1781) + chr(0b110110) + chr(0b100011 + 0o24), 11310 - 11302), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x32' + chr(55) + chr(1749 - 1700), 0b1000), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(0b1101111 + 0o0) + '\061' + chr(822 - 769) + chr(52), 0o10), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(111) + chr(51) + chr(715 - 667) + '\063', ord("\x08")), ehT0Px3KOsy9(chr(2217 - 2169) + chr(0b1101111) + chr(945 - 895) + '\x30' + '\065', 8), ehT0Px3KOsy9('\060' + '\x6f' + '\062' + '\067' + chr(2035 - 1984), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110010) + chr(0b110111) + chr(0b110111), 58204 - 58196), ehT0Px3KOsy9('\060' + '\x6f' + '\066', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1552 - 1502) + '\x30' + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b10011 + 0o40) + '\060' + '\x37', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(387 - 338) + '\x35' + chr(0b110010), 8), ehT0Px3KOsy9(chr(1277 - 1229) + chr(0b1101111) + chr(0b110010) + '\x30' + chr(1161 - 1111), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b11011 + 0o26) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(2126 - 2078) + '\157' + '\061', 0b1000), ehT0Px3KOsy9(chr(48) + chr(1706 - 1595) + chr(0b1000 + 0o51) + '\064' + '\067', 0b1000), ehT0Px3KOsy9('\x30' + chr(4568 - 4457) + '\062' + chr(0b110011 + 0o4) + chr(48), 1499 - 1491), ehT0Px3KOsy9(chr(70 - 22) + chr(111) + chr(0b110010) + chr(1237 - 1189) + chr(0b10110 + 0o32), 8), ehT0Px3KOsy9('\x30' + '\x6f' + '\063' + chr(0b10101 + 0o40) + chr(0b1100 + 0o46), 65011 - 65003), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110011) + chr(52) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(2316 - 2266) + chr(50) + '\063', 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(62 - 14) + '\x6f' + chr(1759 - 1706) + chr(0b110000), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xd8'), '\x64' + chr(0b1100101) + '\x63' + '\157' + '\x64' + '\x65')(chr(0b1110101) + chr(0b1110100) + chr(0b1000101 + 0o41) + chr(45) + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def Ci5WH_Ye2pyK(oVre8I6UXc3b): if not xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xachl9\xc6\xda\x88(f\xebI{'), chr(0b1100010 + 0o2) + chr(547 - 446) + '\143' + '\x6f' + chr(0b1100 + 0o130) + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + chr(0b10010 + 0o33) + '\x38')): xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9565,\xe2\xc1\x9b\x14]\xccL]l\x7f.'), chr(5970 - 5870) + '\x65' + '\x63' + '\157' + chr(100) + chr(0b1100101))('\x75' + chr(0b1110100) + chr(0b1100101 + 0o1) + chr(45) + chr(2834 - 2778)))() TN3qdBJPgLT4 = [] while c2A0yzQpDQB3(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9565,\xe2\xfa\xa5\x1eX\xffOkit;\xea\xe0'), chr(0b1100100) + '\x65' + chr(99) + chr(0b1101111) + chr(0b101101 + 0o67) + '\x65')(chr(0b1110101 + 0o0) + chr(0b1110100) + '\146' + chr(0b10010 + 0o33) + '\x38'))) > ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(567 - 519), 8): if c2A0yzQpDQB3(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x99*?1\xd8\xf8\x93\x14T\xccCZfu.'), chr(100) + chr(0b1100101) + chr(99) + chr(111) + chr(0b11111 + 0o105) + chr(0b1001 + 0o134))(chr(7710 - 7593) + chr(0b101101 + 0o107) + '\x66' + '\055' + chr(2224 - 2168)))) >= xafqLlk3kkUe(NAlxrfaLQgar, xafqLlk3kkUe(SXOLrMavuUCe(b'\xba\x15\x1d\x00\xca\xd1\xb41e\xdcxkM[\x05\xda\xdc\x15/q\xe8\xff%\x8f\xc0\xe8'), '\144' + chr(101) + chr(99) + '\157' + '\x64' + chr(101))(chr(0b1110101) + chr(10836 - 10720) + chr(0b1010 + 0o134) + chr(0b101101) + '\070')): oVre8I6UXc3b.Z26fADrPWxcO = ehT0Px3KOsy9('\x30' + '\157' + '\060', 8) break HfGOmsePz_YG = oVre8I6UXc3b.closed_file_infos.pop(ehT0Px3KOsy9(chr(48) + chr(111) + '\x30', 8)) assert xafqLlk3kkUe(HfGOmsePz_YG, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb7?\x176\xfd\xea\xbd\x1a\x06\xd5BW'), chr(6040 - 5940) + chr(0b100001 + 0o104) + '\x63' + '\x6f' + chr(100) + '\145')(chr(0b1110101) + chr(0b10011 + 0o141) + '\x66' + chr(45) + '\x38')) is None try: EJ21fFXkDNKR = oqhJDdMJfuwx.path.getsize(HfGOmsePz_YG.filename) except (sR2sPcm7Zrfn, KlPSljPzIJ_u) as GlnVAPeT6CUe: if xafqLlk3kkUe(GlnVAPeT6CUe, xafqLlk3kkUe(SXOLrMavuUCe(b'\x93((1\xe8'), chr(100) + chr(6239 - 6138) + chr(7092 - 6993) + chr(0b1101111) + chr(0b111111 + 0o45) + chr(4298 - 4197))(chr(0b101010 + 0o113) + '\164' + chr(102) + chr(1927 - 1882) + '\x38')) == xafqLlk3kkUe(lKz5VhncMjGe, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb3\x14\x15\x1a\xc9\xca'), chr(100) + '\x65' + '\x63' + '\157' + chr(100) + chr(101))('\x75' + chr(0b10011 + 0o141) + '\x66' + '\055' + chr(0b111000))): xafqLlk3kkUe(hdK8qOUhR6Or, xafqLlk3kkUe(SXOLrMavuUCe(b'\x81;(1\xee\xf0\x9d'), chr(0b110111 + 0o55) + '\x65' + chr(228 - 129) + '\157' + '\x64' + '\x65')('\165' + '\x74' + chr(0b11001 + 0o115) + chr(45) + chr(56)))(xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b'\xa1;(1\xee\xf0\x9dB\x11\xc7BQ |4\xe9\xf6e\x11B\x97\xce\r\xb0\xa5\xd5\xd0r\xa0\xa1\x05\xf7feI'), '\144' + '\x65' + '\143' + '\157' + chr(100) + '\145')(chr(0b1110101) + chr(116) + chr(0b1100110) + chr(0b101101) + chr(809 - 753)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xa0n(0\xcf\xff\xa9Ka\xe3O^'), chr(100) + chr(0b111000 + 0o55) + '\143' + chr(0b1011100 + 0o23) + chr(541 - 441) + chr(101))('\165' + '\x74' + chr(4628 - 4526) + chr(45) + chr(2666 - 2610)))(xafqLlk3kkUe(HfGOmsePz_YG, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9036:\xe9\xff\x97\x1d'), chr(0b1100100) + '\145' + chr(0b1011000 + 0o13) + chr(111) + chr(100) + chr(0b1100101))(chr(117) + '\x74' + chr(0b100 + 0o142) + '\x2d' + '\x38')))) xafqLlk3kkUe(oVre8I6UXc3b.log_filenames, xafqLlk3kkUe(SXOLrMavuUCe(b'\x84?70\xf1\xfb'), chr(0b1000110 + 0o36) + chr(0b111001 + 0o54) + chr(99) + chr(111) + '\144' + '\145')(chr(9691 - 9574) + chr(4310 - 4194) + chr(732 - 630) + chr(0b101101) + chr(119 - 63)))(xafqLlk3kkUe(HfGOmsePz_YG, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9036:\xe9\xff\x97\x1d'), chr(0b1100100) + chr(101) + '\x63' + chr(0b1010100 + 0o33) + '\x64' + '\x65')(chr(4403 - 4286) + '\x74' + chr(102) + chr(0b101101) + chr(0b111000)))) continue raise GlnVAPeT6CUe if EJ21fFXkDNKR > xafqLlk3kkUe(HfGOmsePz_YG, xafqLlk3kkUe(SXOLrMavuUCe(b'\x853 :\xd8\xe9\x92\x1d_\xccFUsn\x02\xea\xe3 \x04Z\xd3'), '\144' + chr(4038 - 3937) + chr(0b1100011) + '\x6f' + '\x64' + chr(0b1010000 + 0o25))(chr(0b1110101) + '\164' + chr(0b1100110) + '\055' + chr(0b10 + 0o66))): try: EGyt1xfPT1P6 = _fwkIVCGgtAN(HfGOmsePz_YG.filename, xafqLlk3kkUe(SXOLrMavuUCe(b'\x84'), chr(0b11111 + 0o105) + '\x65' + chr(0b101000 + 0o73) + '\157' + chr(4795 - 4695) + '\145')(chr(0b1000000 + 0o65) + '\164' + chr(0b1100110) + chr(1713 - 1668) + '\070')) except (sR2sPcm7Zrfn, KlPSljPzIJ_u) as GlnVAPeT6CUe: if xafqLlk3kkUe(GlnVAPeT6CUe, xafqLlk3kkUe(SXOLrMavuUCe(b'\x93((1\xe8'), chr(4393 - 4293) + chr(101) + chr(99) + chr(0b110 + 0o151) + '\x64' + chr(0b1100101))('\x75' + chr(0b111110 + 0o66) + chr(0b1100110) + '\x2d' + '\x38')) == xafqLlk3kkUe(lKz5VhncMjGe, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb3\x14\x15\x1a\xc9\xca'), '\144' + '\145' + chr(0b1101 + 0o126) + chr(0b1101111) + chr(9044 - 8944) + '\x65')(chr(0b1110101) + chr(0b1110100) + '\146' + chr(724 - 679) + chr(0b111000))): xafqLlk3kkUe(hdK8qOUhR6Or, xafqLlk3kkUe(SXOLrMavuUCe(b'\x81;(1\xee\xf0\x9d'), chr(0b1001011 + 0o31) + '\145' + '\x63' + '\157' + chr(100) + '\145')('\165' + chr(0b1110100) + chr(0b1100110) + '\x2d' + chr(56)))(xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b'\xa1;(1\xee\xf0\x9dB\x11\xc7BQ |4\xe9\xf6e\x11B\x97\xce\r\xb0\xa5\xd5\xd0r\xa0\xa1\x05\xf7feI'), chr(0b1100100) + chr(7791 - 7690) + '\143' + chr(111) + '\x64' + chr(0b111011 + 0o52))(chr(0b1110101) + chr(116) + chr(0b1100110) + chr(45) + chr(56)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xa0n(0\xcf\xff\xa9Ka\xe3O^'), chr(100) + '\x65' + chr(0b1100011) + chr(111) + chr(0b1100100) + chr(1293 - 1192))('\x75' + chr(0b1110100) + '\x66' + '\x2d' + chr(0b111000)))(xafqLlk3kkUe(HfGOmsePz_YG, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9036:\xe9\xff\x97\x1d'), chr(0b110111 + 0o55) + chr(0b1011010 + 0o13) + chr(9025 - 8926) + chr(111) + chr(100) + chr(9548 - 9447))('\x75' + chr(0b1110100) + '\x66' + '\055' + '\070')))) xafqLlk3kkUe(oVre8I6UXc3b.log_filenames, xafqLlk3kkUe(SXOLrMavuUCe(b'\x84?70\xf1\xfb'), '\x64' + '\x65' + chr(99) + chr(892 - 781) + chr(7540 - 7440) + '\145')(chr(0b1101101 + 0o10) + chr(116) + '\146' + '\x2d' + chr(56)))(xafqLlk3kkUe(HfGOmsePz_YG, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9036:\xe9\xff\x97\x1d'), chr(100) + chr(4608 - 4507) + chr(0b1100011) + chr(111) + chr(7847 - 7747) + '\x65')(chr(1050 - 933) + chr(2463 - 2347) + chr(0b1001110 + 0o30) + chr(0b111 + 0o46) + '\x38'))) continue else: raise GlnVAPeT6CUe xafqLlk3kkUe(EGyt1xfPT1P6, xafqLlk3kkUe(SXOLrMavuUCe(b'\x85??4'), chr(0b111000 + 0o54) + chr(0b10111 + 0o116) + chr(1399 - 1300) + chr(11305 - 11194) + chr(0b1100100) + chr(0b1000001 + 0o44))(chr(117) + '\x74' + chr(102) + '\055' + '\x38'))(xafqLlk3kkUe(HfGOmsePz_YG, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9036:\xd8\xee\x95\x0bX\xe7C[n'), chr(100) + chr(2149 - 2048) + chr(99) + '\157' + chr(100) + chr(0b1100101))('\165' + '\x74' + chr(0b1100110) + chr(45) + '\070'))) HfGOmsePz_YG.Otq34Zkij7Ni = EJ21fFXkDNKR HfGOmsePz_YG.AeMiztGb7Fhc = EGyt1xfPT1P6 xafqLlk3kkUe(oVre8I6UXc3b.open_file_infos, xafqLlk3kkUe(SXOLrMavuUCe(b'\x97**:\xe9\xfa'), chr(0b10010 + 0o122) + '\x65' + chr(99) + chr(0b1101111) + '\x64' + chr(0b1100101))('\x75' + chr(0b1010101 + 0o37) + chr(102) + '\055' + chr(56)))(HfGOmsePz_YG) else: xafqLlk3kkUe(TN3qdBJPgLT4, xafqLlk3kkUe(SXOLrMavuUCe(b'\x97**:\xe9\xfa'), chr(0b1100100) + '\x65' + chr(2397 - 2298) + chr(0b1101111) + chr(0b1001 + 0o133) + chr(0b1000101 + 0o40))(chr(0b1110101) + chr(2977 - 2861) + '\x66' + chr(1020 - 975) + chr(2726 - 2670)))(HfGOmsePz_YG) oVre8I6UXc3b.ndLFT7JiT14B += TN3qdBJPgLT4
ray-project/ray
python/ray/log_monitor.py
LogMonitor.check_log_files_and_publish_updates
def check_log_files_and_publish_updates(self): """Get any changes to the log files and push updates to Redis. Returns: True if anything was published and false otherwise. """ anything_published = False for file_info in self.open_file_infos: assert not file_info.file_handle.closed lines_to_publish = [] max_num_lines_to_read = 100 for _ in range(max_num_lines_to_read): next_line = file_info.file_handle.readline() if next_line == "": break if next_line[-1] == "\n": next_line = next_line[:-1] lines_to_publish.append(next_line) # Publish the lines if this is a worker process. filename = file_info.filename.split("/")[-1] is_worker = (filename.startswith("worker") and (filename.endswith("out") or filename.endswith("err"))) if is_worker and file_info.file_position == 0: if (len(lines_to_publish) > 0 and lines_to_publish[0].startswith("Ray worker pid: ")): file_info.worker_pid = int( lines_to_publish[0].split(" ")[-1]) lines_to_publish = lines_to_publish[1:] # Record the current position in the file. file_info.file_position = file_info.file_handle.tell() if len(lines_to_publish) > 0 and is_worker: self.redis_client.publish( ray.gcs_utils.LOG_FILE_CHANNEL, json.dumps({ "ip": self.ip, "pid": file_info.worker_pid, "lines": lines_to_publish })) anything_published = True return anything_published
python
def check_log_files_and_publish_updates(self): """Get any changes to the log files and push updates to Redis. Returns: True if anything was published and false otherwise. """ anything_published = False for file_info in self.open_file_infos: assert not file_info.file_handle.closed lines_to_publish = [] max_num_lines_to_read = 100 for _ in range(max_num_lines_to_read): next_line = file_info.file_handle.readline() if next_line == "": break if next_line[-1] == "\n": next_line = next_line[:-1] lines_to_publish.append(next_line) # Publish the lines if this is a worker process. filename = file_info.filename.split("/")[-1] is_worker = (filename.startswith("worker") and (filename.endswith("out") or filename.endswith("err"))) if is_worker and file_info.file_position == 0: if (len(lines_to_publish) > 0 and lines_to_publish[0].startswith("Ray worker pid: ")): file_info.worker_pid = int( lines_to_publish[0].split(" ")[-1]) lines_to_publish = lines_to_publish[1:] # Record the current position in the file. file_info.file_position = file_info.file_handle.tell() if len(lines_to_publish) > 0 and is_worker: self.redis_client.publish( ray.gcs_utils.LOG_FILE_CHANNEL, json.dumps({ "ip": self.ip, "pid": file_info.worker_pid, "lines": lines_to_publish })) anything_published = True return anything_published
[ "def", "check_log_files_and_publish_updates", "(", "self", ")", ":", "anything_published", "=", "False", "for", "file_info", "in", "self", ".", "open_file_infos", ":", "assert", "not", "file_info", ".", "file_handle", ".", "closed", "lines_to_publish", "=", "[", "]", "max_num_lines_to_read", "=", "100", "for", "_", "in", "range", "(", "max_num_lines_to_read", ")", ":", "next_line", "=", "file_info", ".", "file_handle", ".", "readline", "(", ")", "if", "next_line", "==", "\"\"", ":", "break", "if", "next_line", "[", "-", "1", "]", "==", "\"\\n\"", ":", "next_line", "=", "next_line", "[", ":", "-", "1", "]", "lines_to_publish", ".", "append", "(", "next_line", ")", "# Publish the lines if this is a worker process.", "filename", "=", "file_info", ".", "filename", ".", "split", "(", "\"/\"", ")", "[", "-", "1", "]", "is_worker", "=", "(", "filename", ".", "startswith", "(", "\"worker\"", ")", "and", "(", "filename", ".", "endswith", "(", "\"out\"", ")", "or", "filename", ".", "endswith", "(", "\"err\"", ")", ")", ")", "if", "is_worker", "and", "file_info", ".", "file_position", "==", "0", ":", "if", "(", "len", "(", "lines_to_publish", ")", ">", "0", "and", "lines_to_publish", "[", "0", "]", ".", "startswith", "(", "\"Ray worker pid: \"", ")", ")", ":", "file_info", ".", "worker_pid", "=", "int", "(", "lines_to_publish", "[", "0", "]", ".", "split", "(", "\" \"", ")", "[", "-", "1", "]", ")", "lines_to_publish", "=", "lines_to_publish", "[", "1", ":", "]", "# Record the current position in the file.", "file_info", ".", "file_position", "=", "file_info", ".", "file_handle", ".", "tell", "(", ")", "if", "len", "(", "lines_to_publish", ")", ">", "0", "and", "is_worker", ":", "self", ".", "redis_client", ".", "publish", "(", "ray", ".", "gcs_utils", ".", "LOG_FILE_CHANNEL", ",", "json", ".", "dumps", "(", "{", "\"ip\"", ":", "self", ".", "ip", ",", "\"pid\"", ":", "file_info", ".", "worker_pid", ",", "\"lines\"", ":", "lines_to_publish", "}", ")", ")", "anything_published", "=", "True", "return", "anything_published" ]
Get any changes to the log files and push updates to Redis. Returns: True if anything was published and false otherwise.
[ "Get", "any", "changes", "to", "the", "log", "files", "and", "push", "updates", "to", "Redis", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/log_monitor.py#L162-L208
train
Check if any changes to the log files and publish updates to Redis.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCe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6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\060' + '\157' + chr(0b110001), 8689 - 8681), ehT0Px3KOsy9('\060' + '\x6f' + chr(49) + chr(0b110000 + 0o5) + chr(1451 - 1396), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(2460 - 2409) + chr(1673 - 1622) + '\x36', ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + '\x31' + chr(0b110111) + '\x32', 11539 - 11531), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(616 - 567) + chr(0b1000 + 0o54) + '\064', 0b1000), ehT0Px3KOsy9(chr(0b101 + 0o53) + '\x6f' + chr(50) + chr(2217 - 2162) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(7124 - 7013) + chr(49) + chr(49) + chr(0b11101 + 0o24), 0b1000), ehT0Px3KOsy9('\x30' + chr(4276 - 4165) + '\x32' + chr(55) + '\x34', 8), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(0b1100001 + 0o16) + chr(0b110111) + '\x32', 12929 - 12921), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(1071 - 1021) + '\x32' + chr(410 - 359), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(3023 - 2912) + chr(0b10101 + 0o40) + chr(51), 0b1000), ehT0Px3KOsy9(chr(1024 - 976) + chr(0b1101111) + chr(0b110010) + '\x30' + '\x33', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\061' + '\061' + chr(256 - 206), 0o10), ehT0Px3KOsy9(chr(236 - 188) + chr(0b110001 + 0o76) + chr(51) + chr(1151 - 1103), ord("\x08")), ehT0Px3KOsy9(chr(1436 - 1388) + chr(0b1101111) + chr(1483 - 1432) + chr(0b110110) + '\x30', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b100010 + 0o20) + chr(0b100100 + 0o14) + '\067', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1010110 + 0o31) + '\062' + chr(48) + '\x31', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1100110 + 0o11) + chr(0b110001) + chr(0b11010 + 0o31) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1100010 + 0o15) + '\063' + chr(0b110111), 53541 - 53533), ehT0Px3KOsy9(chr(48) + chr(0b111111 + 0o60) + '\065', 23255 - 23247), ehT0Px3KOsy9(chr(1272 - 1224) + chr(2475 - 2364) + chr(0b1 + 0o60) + chr(0b110110) + chr(51), 38151 - 38143), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b0 + 0o62) + chr(50) + chr(0b110011), 8), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(111) + chr(51) + chr(0b101001 + 0o11) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110010) + '\065', 0o10), ehT0Px3KOsy9(chr(48) + chr(12275 - 12164) + chr(52) + chr(695 - 644), 19805 - 19797), ehT0Px3KOsy9(chr(48) + chr(0b110100 + 0o73) + '\061' + '\064' + '\x35', 22845 - 22837), ehT0Px3KOsy9('\x30' + chr(0b111 + 0o150) + '\x34', 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\063' + chr(2425 - 2372) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(111) + chr(0b1100 + 0o46) + chr(1943 - 1888) + chr(0b110111), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b101110 + 0o4) + '\066' + '\x35', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b101001 + 0o106) + chr(0b110011) + chr(52) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(48) + chr(9529 - 9418) + '\061' + chr(1417 - 1368) + chr(0b110000), 61458 - 61450), ehT0Px3KOsy9(chr(48) + chr(111) + '\x31' + '\x36', 48261 - 48253), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110011) + '\x32' + chr(0b101011 + 0o14), 0b1000), ehT0Px3KOsy9(chr(259 - 211) + chr(0b1010001 + 0o36) + chr(1653 - 1600) + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(430 - 382) + '\157' + chr(1359 - 1308) + chr(2256 - 2204) + chr(2162 - 2109), 43689 - 43681), ehT0Px3KOsy9('\x30' + chr(111) + '\061' + '\063' + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b11001 + 0o31), 0o10), ehT0Px3KOsy9(chr(0b100111 + 0o11) + '\x6f' + chr(0b101110 + 0o5) + chr(51) + chr(2137 - 2083), 8), ehT0Px3KOsy9(chr(1017 - 969) + '\157' + '\063' + chr(53) + '\067', 5527 - 5519)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(53) + '\x30', 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'/'), chr(100) + chr(0b1100101) + chr(8841 - 8742) + chr(111) + '\144' + chr(0b11001 + 0o114))(chr(117) + '\164' + chr(7708 - 7606) + chr(0b100000 + 0o15) + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def eWVM43eu45VP(oVre8I6UXc3b): hRSTEkSGGvCq = ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(111) + chr(0b110000), 38298 - 38290) for HfGOmsePz_YG in xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'n\x1f\xbb\x14;\xda \xd0_\xccB\xed,w\x83'), chr(0b1010010 + 0o22) + chr(2431 - 2330) + chr(5936 - 5837) + '\157' + '\144' + chr(0b1100101))('\x75' + chr(0b1110100) + '\146' + '\x2d' + '\x38')): assert not xafqLlk3kkUe(HfGOmsePz_YG.file_handle, xafqLlk3kkUe(SXOLrMavuUCe(b'b\x03\xb1\t\x01\xd8'), chr(5559 - 5459) + '\145' + '\143' + chr(0b1101111) + '\x64' + '\145')(chr(9769 - 9652) + '\x74' + '\146' + chr(45) + '\070')) QQXpA9ArGMfq = [] FOhGxGzeBTwl = ehT0Px3KOsy9(chr(48) + '\x6f' + chr(917 - 868) + '\064' + chr(0b110100), 8) for VNGQdHSFPrso in vQr8gNKaIaWE(FOhGxGzeBTwl): TdUurQev58Ai = HfGOmsePz_YG.file_handle.readline() if TdUurQev58Ai == xafqLlk3kkUe(SXOLrMavuUCe(b''), chr(0b1100100) + chr(0b1100101) + '\x63' + chr(10023 - 9912) + chr(100) + '\145')('\165' + chr(0b1010111 + 0o35) + chr(102) + '\x2d' + chr(1066 - 1010)): break if TdUurQev58Ai[-ehT0Px3KOsy9(chr(48) + '\157' + chr(49), 8)] == xafqLlk3kkUe(SXOLrMavuUCe(b'\x0b'), chr(3009 - 2909) + '\145' + chr(0b101010 + 0o71) + chr(111) + '\144' + chr(101))(chr(10357 - 10240) + '\x74' + chr(102) + chr(45) + chr(0b110000 + 0o10)): TdUurQev58Ai = TdUurQev58Ai[:-ehT0Px3KOsy9('\x30' + chr(0b1010010 + 0o35) + chr(49), 8)] xafqLlk3kkUe(QQXpA9ArGMfq, xafqLlk3kkUe(SXOLrMavuUCe(b'`\x1f\xae\x1f\n\xd8'), chr(1794 - 1694) + chr(0b1001 + 0o134) + chr(0b1100011) + chr(3858 - 3747) + chr(0b1011 + 0o131) + chr(101))(chr(0b1000100 + 0o61) + chr(0b1110100) + chr(0b1001110 + 0o30) + '\x2d' + chr(56)))(TdUurQev58Ai) xw4DsBfIJ22E = HfGOmsePz_YG.filename.split(xafqLlk3kkUe(SXOLrMavuUCe(b'.'), chr(0b1100100) + '\145' + '\143' + '\157' + chr(0b1100100) + chr(0b10101 + 0o120))(chr(519 - 402) + chr(116) + chr(5241 - 5139) + chr(45) + chr(0b1010 + 0o56)))[-ehT0Px3KOsy9('\x30' + '\157' + chr(71 - 22), 8)] JlzF3wBp2_IA = xw4DsBfIJ22E.startswith(xafqLlk3kkUe(SXOLrMavuUCe(b'v\x00\xac\x11\x01\xce'), chr(6775 - 6675) + chr(101) + chr(0b1100011) + '\x6f' + '\x64' + '\145')(chr(0b1110101) + chr(116) + chr(0b1100110) + chr(0b0 + 0o55) + '\x38')) and (xw4DsBfIJ22E.endswith(xafqLlk3kkUe(SXOLrMavuUCe(b'n\x1a\xaa'), chr(5235 - 5135) + chr(0b1100101) + chr(0b1100011) + '\x6f' + chr(0b1000100 + 0o40) + chr(0b101000 + 0o75))('\165' + chr(9914 - 9798) + '\x66' + chr(1643 - 1598) + '\x38')) or xw4DsBfIJ22E.endswith(xafqLlk3kkUe(SXOLrMavuUCe(b'd\x1d\xac'), chr(701 - 601) + chr(0b1100101) + '\x63' + chr(111) + chr(100) + chr(0b1100101))(chr(0b1110101) + chr(8911 - 8795) + chr(102) + chr(0b101101) + chr(0b111000)))) if JlzF3wBp2_IA and xafqLlk3kkUe(HfGOmsePz_YG, xafqLlk3kkUe(SXOLrMavuUCe(b'g\x06\xb2\x1f;\xcc&\xcfS\xe7B\xec$'), chr(100) + '\145' + chr(3191 - 3092) + '\x6f' + chr(0b101100 + 0o70) + '\145')(chr(0b1100001 + 0o24) + '\164' + '\146' + chr(0b11101 + 0o20) + chr(0b111000))) == ehT0Px3KOsy9(chr(48) + chr(9638 - 9527) + chr(48), 8): if c2A0yzQpDQB3(QQXpA9ArGMfq) > ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(0b1101111) + chr(2011 - 1963), 8) and xafqLlk3kkUe(QQXpA9ArGMfq[ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(48), 8)], xafqLlk3kkUe(SXOLrMavuUCe(b'r\x1b\xbf\x08\x10\xcf>\xd5N\xfb'), chr(6185 - 6085) + chr(0b1100101) + chr(0b1010111 + 0o14) + chr(0b1101111) + chr(100) + '\x65')(chr(0b10101 + 0o140) + chr(0b1110100) + '\x66' + chr(45) + chr(417 - 361)))(xafqLlk3kkUe(SXOLrMavuUCe(b'S\x0e\xa7Z\x13\xd3;\xd7_\xe1\x0b\xf3#|\xca\xa7'), chr(100) + chr(5271 - 5170) + chr(99) + chr(111) + chr(100) + chr(0b1100101))('\165' + chr(7214 - 7098) + chr(0b1100110) + chr(45) + chr(56))): HfGOmsePz_YG.CNWmNzFzzgIM = ehT0Px3KOsy9(QQXpA9ArGMfq[ehT0Px3KOsy9(chr(1217 - 1169) + chr(0b1101111) + chr(1742 - 1694), 8)].split(xafqLlk3kkUe(SXOLrMavuUCe(b'!'), '\144' + chr(0b1100101) + chr(99) + chr(6165 - 6054) + '\x64' + chr(101))('\165' + chr(0b1001100 + 0o50) + chr(0b1100110) + chr(45) + chr(56)))[-ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b11 + 0o56), 8)]) QQXpA9ArGMfq = QQXpA9ArGMfq[ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(4732 - 4621) + chr(264 - 215), 8):] HfGOmsePz_YG.RByQPRFm2aiQ = HfGOmsePz_YG.file_handle.tell() if c2A0yzQpDQB3(QQXpA9ArGMfq) > ehT0Px3KOsy9('\060' + chr(0b10001 + 0o136) + chr(910 - 862), 8) and JlzF3wBp2_IA: xafqLlk3kkUe(oVre8I6UXc3b.redis_client, xafqLlk3kkUe(SXOLrMavuUCe(b'q\x1a\xbc\x16\r\xcf!'), chr(0b1100100) + '\145' + '\143' + chr(111) + '\144' + '\145')('\x75' + '\164' + chr(102) + chr(0b101101) + chr(0b111000)))(xafqLlk3kkUe(H9zaXRrGK6Cq.gcs_utils, xafqLlk3kkUe(SXOLrMavuUCe(b'M \x99%"\xf5\x05\xf9e\xd0c\xc2\x04V\xb5\xcb'), chr(0b1100100) + chr(101) + '\x63' + chr(7600 - 7489) + '\144' + chr(0b1011011 + 0o12))('\x75' + chr(116) + chr(102) + chr(45) + '\x38')), xafqLlk3kkUe(fXk443epxtd5, xafqLlk3kkUe(SXOLrMavuUCe(b'e\x1a\xb3\n\x17'), chr(100) + chr(6603 - 6502) + '\x63' + chr(0b1101111) + chr(0b1101 + 0o127) + chr(2252 - 2151))(chr(117) + chr(5836 - 5720) + chr(5788 - 5686) + '\055' + chr(1594 - 1538)))({xafqLlk3kkUe(SXOLrMavuUCe(b'h\x1f'), '\x64' + chr(101) + chr(2456 - 2357) + chr(5199 - 5088) + chr(0b1011001 + 0o13) + chr(101))('\165' + chr(4309 - 4193) + chr(0b101 + 0o141) + chr(45) + chr(2401 - 2345)): xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'h\x1f'), '\x64' + chr(0b111001 + 0o54) + chr(0b1100011) + '\x6f' + chr(0b1100100) + chr(0b1100101))(chr(9338 - 9221) + chr(116) + '\x66' + '\055' + chr(0b101100 + 0o14))), xafqLlk3kkUe(SXOLrMavuUCe(b'q\x06\xba'), chr(0b11101 + 0o107) + chr(8234 - 8133) + '\143' + chr(111) + '\x64' + chr(0b1000111 + 0o36))(chr(6143 - 6026) + chr(5779 - 5663) + chr(0b1100110) + '\x2d' + chr(56)): xafqLlk3kkUe(HfGOmsePz_YG, xafqLlk3kkUe(SXOLrMavuUCe(b'B!\x89\x17*\xc6\x0f\xc6@\xf4b\xce'), chr(7218 - 7118) + chr(0b1100101) + chr(5018 - 4919) + chr(111) + chr(6126 - 6026) + '\145')('\165' + chr(0b1001100 + 0o50) + chr(0b11111 + 0o107) + chr(0b101011 + 0o2) + '\x38')), xafqLlk3kkUe(SXOLrMavuUCe(b'm\x06\xb0\x1f\x17'), chr(0b1011100 + 0o10) + chr(0b1100101) + chr(99) + '\157' + chr(0b1100100) + chr(9754 - 9653))(chr(0b1011110 + 0o27) + '\x74' + chr(0b1100110) + chr(45) + chr(0b110110 + 0o2)): QQXpA9ArGMfq})) hRSTEkSGGvCq = ehT0Px3KOsy9(chr(48) + '\x6f' + '\061', 8) return hRSTEkSGGvCq
ray-project/ray
python/ray/log_monitor.py
LogMonitor.run
def run(self): """Run the log monitor. This will query Redis once every second to check if there are new log files to monitor. It will also store those log files in Redis. """ while True: self.update_log_filenames() self.open_closed_files() anything_published = self.check_log_files_and_publish_updates() # If nothing was published, then wait a little bit before checking # for logs to avoid using too much CPU. if not anything_published: time.sleep(0.05)
python
def run(self): """Run the log monitor. This will query Redis once every second to check if there are new log files to monitor. It will also store those log files in Redis. """ while True: self.update_log_filenames() self.open_closed_files() anything_published = self.check_log_files_and_publish_updates() # If nothing was published, then wait a little bit before checking # for logs to avoid using too much CPU. if not anything_published: time.sleep(0.05)
[ "def", "run", "(", "self", ")", ":", "while", "True", ":", "self", ".", "update_log_filenames", "(", ")", "self", ".", "open_closed_files", "(", ")", "anything_published", "=", "self", ".", "check_log_files_and_publish_updates", "(", ")", "# If nothing was published, then wait a little bit before checking", "# for logs to avoid using too much CPU.", "if", "not", "anything_published", ":", "time", ".", "sleep", "(", "0.05", ")" ]
Run the log monitor. This will query Redis once every second to check if there are new log files to monitor. It will also store those log files in Redis.
[ "Run", "the", "log", "monitor", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/log_monitor.py#L210-L223
train
Run the log monitor.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4p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h0,Rurm1zTRfSmY,reqGiMiVQ77y,bsS9P6_LpdIe,sbGAZlkZOtyh,Cf_Qef15s3_F,eX02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(373 - 324) + chr(0b110010) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(0b101011 + 0o5) + '\x6f' + chr(1275 - 1220) + chr(48), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(486 - 434) + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(488 - 440) + chr(111) + '\x32' + chr(0b100101 + 0o15) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b110100 + 0o73) + chr(0b110010) + chr(0b111 + 0o51) + chr(0b100001 + 0o26), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1100 + 0o143) + '\x32' + chr(2139 - 2084) + chr(53), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x31' + chr(833 - 781) + chr(0b1010 + 0o47), ord("\x08")), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(12244 - 12133) + chr(0b110010) + chr(51) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(0b10010 + 0o36) + '\x6f' + chr(0b110010) + '\x35' + '\x31', 48993 - 48985), ehT0Px3KOsy9(chr(945 - 897) + '\x6f' + chr(0b101111 + 0o3) + '\x36' + '\061', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\062' + chr(0b101111 + 0o5) + chr(2141 - 2086), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b10110 + 0o131) + chr(0b110011) + chr(0b110011) + '\066', 31678 - 31670), ehT0Px3KOsy9('\x30' + '\x6f' + '\x31' + chr(53) + '\x31', 0o10), ehT0Px3KOsy9(chr(0b10011 + 0o35) + '\x6f' + chr(0b101 + 0o55) + chr(53) + chr(0b110010 + 0o4), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(50) + chr(53) + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(0b11111 + 0o21) + '\157' + chr(0b110 + 0o54), 0o10), ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(0b11110 + 0o121) + chr(52) + '\x31', 8), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(111) + '\x32' + '\065' + '\x36', 8), ehT0Px3KOsy9(chr(362 - 314) + chr(111) + '\061' + '\x37' + chr(0b1100 + 0o46), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(1862 - 1811) + chr(55) + chr(52), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110001) + chr(49) + chr(0b100111 + 0o14), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b1 + 0o62) + chr(0b110001) + chr(2365 - 2314), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x32' + chr(49) + '\x31', 0o10), ehT0Px3KOsy9(chr(743 - 695) + chr(7092 - 6981) + '\x31' + chr(1407 - 1358) + chr(55), 40930 - 40922), ehT0Px3KOsy9(chr(0b110000) + chr(0b10100 + 0o133) + chr(50) + chr(1262 - 1214) + '\x30', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110011) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(1836 - 1788) + chr(10735 - 10624) + chr(50) + chr(50), 0b1000), ehT0Px3KOsy9(chr(1472 - 1424) + chr(111) + chr(0b110010) + chr(52) + chr(52), 0b1000), ehT0Px3KOsy9(chr(1497 - 1449) + chr(0b10100 + 0o133) + chr(0b11001 + 0o31) + chr(125 - 75) + chr(0b110101), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(1035 - 986) + chr(1889 - 1835) + chr(52), 0b1000), ehT0Px3KOsy9(chr(545 - 497) + chr(0b100000 + 0o117) + chr(0b110001) + chr(1333 - 1282) + chr(977 - 922), ord("\x08")), ehT0Px3KOsy9(chr(1573 - 1525) + chr(111) + '\x33' + chr(1204 - 1156) + chr(0b110101 + 0o1), ord("\x08")), ehT0Px3KOsy9(chr(719 - 671) + '\157' + chr(49) + chr(49) + '\x30', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1414 - 1365) + chr(0b110101), 7135 - 7127), ehT0Px3KOsy9('\060' + chr(6676 - 6565) + chr(228 - 178) + chr(0b110101) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(1218 - 1170) + chr(111) + chr(0b110001) + chr(0b110010) + chr(943 - 888), 0o10), ehT0Px3KOsy9(chr(1188 - 1140) + chr(111) + chr(49) + chr(53) + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(0b1101111) + chr(49) + '\060' + '\x34', 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\061' + chr(0b110011) + '\064', 29805 - 29797), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(1845 - 1794) + chr(0b110010) + chr(946 - 892), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b10111 + 0o31) + '\x6f' + chr(0b110101) + '\x30', 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'x'), '\144' + '\145' + chr(9347 - 9248) + chr(111) + '\x64' + '\145')('\165' + chr(9344 - 9228) + chr(102) + '\x2d' + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def sgt5BU61bwZ2(oVre8I6UXc3b): while ehT0Px3KOsy9(chr(1014 - 966) + chr(111) + chr(0b110001), 0b1000): xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'#HE\xf5\xf3\xd8>\xf2\xc6\xd6\xf8\xb8\x00\xc2\xc8l@\xc3\x1f\x8f'), '\144' + chr(101) + '\143' + '\157' + chr(0b1100100) + '\x65')('\165' + chr(0b1110100) + '\146' + chr(1869 - 1824) + chr(56)))() xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'9HD\xfa\xd8\xde\r\xf1\xda\xd4\xc3\x81\x0f\xc7\xc1gR'), '\x64' + chr(101) + chr(0b1100011) + chr(0b101000 + 0o107) + chr(0b1100100) + chr(0b1100000 + 0o5))(chr(117) + chr(0b1110100) + '\x66' + '\x2d' + chr(428 - 372)))() hRSTEkSGGvCq = oVre8I6UXc3b.check_log_files_and_publish_updates() if not hRSTEkSGGvCq: xafqLlk3kkUe(ltvhPP4VhXre, xafqLlk3kkUe(SXOLrMavuUCe(b'%TD\xf1\xf7'), '\x64' + chr(6712 - 6611) + chr(0b1100011) + '\x6f' + chr(100) + chr(1281 - 1180))('\165' + '\164' + '\146' + chr(45) + '\x38'))(0.05)
ray-project/ray
python/ray/tune/suggest/suggestion.py
SuggestionAlgorithm.add_configurations
def add_configurations(self, experiments): """Chains generator given experiment specifications. Arguments: experiments (Experiment | list | dict): Experiments to run. """ experiment_list = convert_to_experiment_list(experiments) for experiment in experiment_list: self._trial_generator = itertools.chain( self._trial_generator, self._generate_trials(experiment.spec, experiment.name))
python
def add_configurations(self, experiments): """Chains generator given experiment specifications. Arguments: experiments (Experiment | list | dict): Experiments to run. """ experiment_list = convert_to_experiment_list(experiments) for experiment in experiment_list: self._trial_generator = itertools.chain( self._trial_generator, self._generate_trials(experiment.spec, experiment.name))
[ "def", "add_configurations", "(", "self", ",", "experiments", ")", ":", "experiment_list", "=", "convert_to_experiment_list", "(", "experiments", ")", "for", "experiment", "in", "experiment_list", ":", "self", ".", "_trial_generator", "=", "itertools", ".", "chain", "(", "self", ".", "_trial_generator", ",", "self", ".", "_generate_trials", "(", "experiment", ".", "spec", ",", "experiment", ".", "name", ")", ")" ]
Chains generator given experiment specifications. Arguments: experiments (Experiment | list | dict): Experiments to run.
[ "Chains", "generator", "given", "experiment", "specifications", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/tune/suggest/suggestion.py#L43-L53
train
Chains generator given experiment specifications.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT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02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\x30' + chr(0b101011 + 0o104) + '\061' + chr(0b11110 + 0o30) + '\x35', 31114 - 31106), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\061' + '\x36' + chr(1812 - 1762), 43792 - 43784), ehT0Px3KOsy9('\060' + chr(0b1100111 + 0o10) + chr(0b110010) + chr(0b101110 + 0o10) + chr(1538 - 1487), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(2304 - 2254), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b11010 + 0o30) + '\060' + '\x32', 0o10), ehT0Px3KOsy9(chr(1743 - 1695) + '\x6f' + chr(51) + chr(0b1010 + 0o50), 0o10), ehT0Px3KOsy9('\x30' + chr(9568 - 9457) + chr(1844 - 1795) + chr(1535 - 1482) + '\067', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b110111 + 0o70) + chr(964 - 914) + chr(2027 - 1975) + '\x31', 0b1000), ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(0b1101111) + chr(0b101100 + 0o7) + chr(0b101111 + 0o3) + chr(52), 45147 - 45139), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(9597 - 9486) + chr(0b110010) + chr(52), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(2040 - 1988) + chr(0b110100), 50414 - 50406), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\063' + '\065' + '\x31', 10776 - 10768), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110001) + chr(2596 - 2542), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b100010 + 0o20) + chr(0b110001) + chr(0b11 + 0o61), 0b1000), ehT0Px3KOsy9(chr(930 - 882) + '\157' + '\061' + chr(2622 - 2570) + chr(174 - 125), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(2002 - 1951) + chr(0b110000 + 0o0) + chr(0b110010 + 0o5), 0o10), ehT0Px3KOsy9('\x30' + '\157' + '\x33' + '\x32' + chr(51), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(51) + '\x30' + chr(51), 0o10), ehT0Px3KOsy9(chr(1035 - 987) + chr(630 - 519) + chr(1697 - 1647) + chr(1853 - 1805), 0b1000), ehT0Px3KOsy9(chr(2190 - 2142) + '\x6f' + chr(0b110010) + chr(0b10000 + 0o46) + chr(0b100110 + 0o15), 8), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b10101 + 0o35) + '\x30' + chr(0b110100), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110011) + chr(0b110101) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101011 + 0o4) + chr(0b110011) + chr(794 - 745) + '\061', ord("\x08")), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(0b10101 + 0o132) + '\063' + '\x31', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x31' + '\x31' + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(0b1101111) + '\061' + chr(1065 - 1016) + '\061', 8), ehT0Px3KOsy9(chr(0b10100 + 0o34) + '\x6f' + chr(51) + chr(50) + chr(0b110011), 8), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b0 + 0o63) + '\063' + chr(53), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b10100 + 0o36) + chr(2077 - 2026) + chr(55), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(2928 - 2873) + chr(0b111 + 0o52), 0o10), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(111) + chr(0b100100 + 0o17) + chr(0b110100) + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(48) + chr(11535 - 11424) + chr(0b101010 + 0o10) + chr(0b110 + 0o57) + chr(0b110000 + 0o7), 0b1000), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(111) + chr(0b110011) + '\x31' + chr(0b100001 + 0o24), 60657 - 60649), ehT0Px3KOsy9('\x30' + chr(111) + chr(53 - 2) + '\065' + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b101100 + 0o5) + chr(53) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(1091 - 1043) + '\157' + '\062' + '\x34' + chr(54), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110001) + chr(456 - 403), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(2239 - 2188) + '\x34' + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b1011 + 0o45) + '\x6f' + chr(0b110001) + chr(0b110001) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(111) + chr(0b110010) + chr(0b101001 + 0o14) + chr(0b10011 + 0o43), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(111) + '\065' + '\x30', 58276 - 58268)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'['), chr(0b11111 + 0o105) + '\145' + chr(0b1100011) + chr(111) + '\144' + chr(0b1100101))(chr(117) + '\164' + chr(5400 - 5298) + chr(0b101101) + chr(0b10001 + 0o47)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def K2qrPWmM0bCj(oVre8I6UXc3b, SpbUAwSHCnfJ): CmNpz_eRsEq7 = w64M__EhNnyu(SpbUAwSHCnfJ) for LeATV1fChSRY in CmNpz_eRsEq7: oVre8I6UXc3b.x6nOl7XdZ15R = nLSuLqmR6kNP.chain(oVre8I6UXc3b.x6nOl7XdZ15R, oVre8I6UXc3b._generate_trials(LeATV1fChSRY.spec, LeATV1fChSRY.AIvJRzLdDfgF))
ray-project/ray
python/ray/tune/suggest/suggestion.py
SuggestionAlgorithm.next_trials
def next_trials(self): """Provides a batch of Trial objects to be queued into the TrialRunner. A batch ends when self._trial_generator returns None. Returns: trials (list): Returns a list of trials. """ trials = [] for trial in self._trial_generator: if trial is None: return trials trials += [trial] self._finished = True return trials
python
def next_trials(self): """Provides a batch of Trial objects to be queued into the TrialRunner. A batch ends when self._trial_generator returns None. Returns: trials (list): Returns a list of trials. """ trials = [] for trial in self._trial_generator: if trial is None: return trials trials += [trial] self._finished = True return trials
[ "def", "next_trials", "(", "self", ")", ":", "trials", "=", "[", "]", "for", "trial", "in", "self", ".", "_trial_generator", ":", "if", "trial", "is", "None", ":", "return", "trials", "trials", "+=", "[", "trial", "]", "self", ".", "_finished", "=", "True", "return", "trials" ]
Provides a batch of Trial objects to be queued into the TrialRunner. A batch ends when self._trial_generator returns None. Returns: trials (list): Returns a list of trials.
[ "Provides", "a", "batch", "of", "Trial", "objects", "to", "be", "queued", "into", "the", "TrialRunner", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/tune/suggest/suggestion.py#L55-L71
train
Provides a batch of Trial objects to be queued into the TrialRunner.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qk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k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110011) + '\067', 1715 - 1707), ehT0Px3KOsy9(chr(1492 - 1444) + chr(2551 - 2440) + chr(50) + '\063' + '\x34', 37668 - 37660), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x33' + '\x31' + '\065', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(2955 - 2844) + '\x32' + chr(52) + chr(0b11010 + 0o27), 0b1000), ehT0Px3KOsy9(chr(613 - 565) + '\x6f' + chr(1058 - 1008) + chr(510 - 456) + chr(55), 14533 - 14525), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(774 - 724) + '\x31' + '\067', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\061' + '\x32' + '\065', 52175 - 52167), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110011) + chr(0b101 + 0o62) + chr(0b110010 + 0o1), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(10095 - 9984) + '\062' + chr(49) + chr(0b100010 + 0o16), 0b1000), ehT0Px3KOsy9('\060' + chr(0b111011 + 0o64) + '\x32' + '\060' + chr(352 - 301), 25638 - 25630), ehT0Px3KOsy9('\060' + chr(0b11 + 0o154) + chr(2184 - 2135) + '\x30' + chr(932 - 879), 11877 - 11869), ehT0Px3KOsy9('\060' + chr(7009 - 6898) + chr(0b101 + 0o54) + '\x32' + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(0b100 + 0o54) + '\x6f' + '\061' + '\063' + '\067', 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b11001 + 0o30) + chr(51) + chr(0b110010 + 0o0), 0o10), ehT0Px3KOsy9(chr(0b11001 + 0o27) + '\x6f' + chr(250 - 200) + '\067' + chr(55), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b101111 + 0o4) + chr(2072 - 2018) + chr(53), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\063' + '\x33' + '\062', 0b1000), ehT0Px3KOsy9(chr(206 - 158) + '\157' + chr(52) + chr(55), 10771 - 10763), ehT0Px3KOsy9('\060' + chr(11603 - 11492) + chr(1579 - 1528) + chr(0b110001 + 0o1) + chr(525 - 476), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1001111 + 0o40) + chr(0b110001) + '\x32' + '\067', 21916 - 21908), ehT0Px3KOsy9(chr(0b1100 + 0o44) + chr(0b1101111) + chr(0b110011) + chr(52) + '\x30', 0o10), ehT0Px3KOsy9('\x30' + chr(0b101 + 0o152) + chr(0b110010 + 0o5), 61964 - 61956), ehT0Px3KOsy9(chr(317 - 269) + '\x6f' + '\062' + chr(0b10011 + 0o36) + chr(54), 0o10), ehT0Px3KOsy9('\x30' + '\157' + '\062' + '\x33', 20507 - 20499), ehT0Px3KOsy9(chr(0b110000) + chr(1453 - 1342) + chr(0b110010) + chr(165 - 115) + chr(0b110111), 13346 - 13338), ehT0Px3KOsy9(chr(912 - 864) + chr(0b1010110 + 0o31) + chr(2038 - 1985) + chr(0b0 + 0o63), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1010000 + 0o37) + chr(1389 - 1339) + chr(0b110011) + chr(0b101001 + 0o10), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\062' + chr(1509 - 1457) + '\x35', 0b1000), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(7686 - 7575) + chr(2467 - 2414) + chr(314 - 263), 8), ehT0Px3KOsy9('\x30' + chr(7995 - 7884) + chr(50) + '\x32' + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110011) + '\061' + '\061', 34051 - 34043), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110100) + chr(55), 8), ehT0Px3KOsy9(chr(48) + '\157' + '\x32' + chr(0b110111) + chr(1728 - 1680), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(1057 - 1007) + chr(2370 - 2317) + chr(51), 63756 - 63748), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\061' + '\x32' + '\062', 34969 - 34961), ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(0b100111 + 0o110) + chr(0b11010 + 0o30) + chr(0b110001) + chr(1418 - 1364), 8), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(111) + '\x31' + chr(0b1111 + 0o44) + '\061', ord("\x08")), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(111) + chr(0b110011) + '\x33' + chr(765 - 710), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b1001 + 0o50) + chr(0b11000 + 0o32) + '\x36', 0o10), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(0b100010 + 0o115) + chr(0b110011) + '\061' + '\x36', 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(10887 - 10776) + chr(53) + '\060', ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'1'), chr(0b1001001 + 0o33) + chr(2754 - 2653) + chr(7671 - 7572) + '\157' + chr(0b1100100) + '\x65')(chr(980 - 863) + chr(0b1001000 + 0o54) + chr(102) + '\x2d' + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def O8iH95Uw4Ow5(oVre8I6UXc3b): i1GKrIxxsZwp = [] for Alvsa0ue91Fo in xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'g\xaa\xa3\xee\xdb\xb8\r\x9f\xd2\xb2p\x02'), chr(0b1010100 + 0o20) + chr(0b1011101 + 0o10) + chr(0b10101 + 0o116) + '\157' + chr(0b1100100) + '\145')(chr(12489 - 12372) + '\x74' + chr(102) + chr(0b101101) + '\070')): if Alvsa0ue91Fo is None: return i1GKrIxxsZwp i1GKrIxxsZwp += [Alvsa0ue91Fo] oVre8I6UXc3b.W41DoKKYJFTG = ehT0Px3KOsy9('\x30' + chr(10410 - 10299) + chr(0b10011 + 0o36), ord("\x08")) return i1GKrIxxsZwp
ray-project/ray
python/ray/tune/suggest/suggestion.py
SuggestionAlgorithm._generate_trials
def _generate_trials(self, experiment_spec, output_path=""): """Generates trials with configurations from `_suggest`. Creates a trial_id that is passed into `_suggest`. Yields: Trial objects constructed according to `spec` """ if "run" not in experiment_spec: raise TuneError("Must specify `run` in {}".format(experiment_spec)) for _ in range(experiment_spec.get("num_samples", 1)): trial_id = Trial.generate_id() while True: suggested_config = self._suggest(trial_id) if suggested_config is None: yield None else: break spec = copy.deepcopy(experiment_spec) spec["config"] = merge_dicts(spec["config"], suggested_config) flattened_config = resolve_nested_dict(spec["config"]) self._counter += 1 tag = "{0}_{1}".format( str(self._counter), format_vars(flattened_config)) yield create_trial_from_spec( spec, output_path, self._parser, experiment_tag=tag, trial_id=trial_id)
python
def _generate_trials(self, experiment_spec, output_path=""): """Generates trials with configurations from `_suggest`. Creates a trial_id that is passed into `_suggest`. Yields: Trial objects constructed according to `spec` """ if "run" not in experiment_spec: raise TuneError("Must specify `run` in {}".format(experiment_spec)) for _ in range(experiment_spec.get("num_samples", 1)): trial_id = Trial.generate_id() while True: suggested_config = self._suggest(trial_id) if suggested_config is None: yield None else: break spec = copy.deepcopy(experiment_spec) spec["config"] = merge_dicts(spec["config"], suggested_config) flattened_config = resolve_nested_dict(spec["config"]) self._counter += 1 tag = "{0}_{1}".format( str(self._counter), format_vars(flattened_config)) yield create_trial_from_spec( spec, output_path, self._parser, experiment_tag=tag, trial_id=trial_id)
[ "def", "_generate_trials", "(", "self", ",", "experiment_spec", ",", "output_path", "=", "\"\"", ")", ":", "if", "\"run\"", "not", "in", "experiment_spec", ":", "raise", "TuneError", "(", "\"Must specify `run` in {}\"", ".", "format", "(", "experiment_spec", ")", ")", "for", "_", "in", "range", "(", "experiment_spec", ".", "get", "(", "\"num_samples\"", ",", "1", ")", ")", ":", "trial_id", "=", "Trial", ".", "generate_id", "(", ")", "while", "True", ":", "suggested_config", "=", "self", ".", "_suggest", "(", "trial_id", ")", "if", "suggested_config", "is", "None", ":", "yield", "None", "else", ":", "break", "spec", "=", "copy", ".", "deepcopy", "(", "experiment_spec", ")", "spec", "[", "\"config\"", "]", "=", "merge_dicts", "(", "spec", "[", "\"config\"", "]", ",", "suggested_config", ")", "flattened_config", "=", "resolve_nested_dict", "(", "spec", "[", "\"config\"", "]", ")", "self", ".", "_counter", "+=", "1", "tag", "=", "\"{0}_{1}\"", ".", "format", "(", "str", "(", "self", ".", "_counter", ")", ",", "format_vars", "(", "flattened_config", ")", ")", "yield", "create_trial_from_spec", "(", "spec", ",", "output_path", ",", "self", ".", "_parser", ",", "experiment_tag", "=", "tag", ",", "trial_id", "=", "trial_id", ")" ]
Generates trials with configurations from `_suggest`. Creates a trial_id that is passed into `_suggest`. Yields: Trial objects constructed according to `spec`
[ "Generates", "trials", "with", "configurations", "from", "_suggest", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/tune/suggest/suggestion.py#L73-L102
train
Generates trials with configurations from _suggest.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pI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0,Rurm1zTRfSmY,reqGiMiVQ77y,bsS9P6_LpdIe,sbGAZlkZOtyh,Cf_Qef15s3_F,eX02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110001) + chr(0b110010) + chr(304 - 251), 13809 - 13801), ehT0Px3KOsy9(chr(48) + chr(10927 - 10816) + chr(50) + chr(49) + '\x32', 0b1000), ehT0Px3KOsy9('\060' + chr(0b10 + 0o155) + chr(81 - 26) + chr(0b110 + 0o54), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101001 + 0o6) + chr(0b1010 + 0o51) + '\x37' + chr(51), 42588 - 42580), ehT0Px3KOsy9('\060' + chr(5034 - 4923) + chr(0b11010 + 0o27) + '\063' + chr(0b110011 + 0o3), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(9284 - 9173) + chr(0b110010) + chr(50) + chr(0b100000 + 0o27), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110010) + '\062' + chr(0b110001 + 0o3), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000110 + 0o51) + '\063' + '\061' + '\x37', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + '\062' + chr(0b10110 + 0o36) + '\063', ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\062' + chr(0b0 + 0o62) + chr(53), 0b1000), ehT0Px3KOsy9('\x30' + chr(5244 - 5133) + '\x33' + '\061' + '\x36', 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(172 - 123) + chr(0b100010 + 0o17), 38041 - 38033), ehT0Px3KOsy9('\x30' + chr(0b1001101 + 0o42) + chr(49) + chr(0b1000 + 0o56) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(11439 - 11328) + '\061' + chr(0b101101 + 0o7) + chr(164 - 114), 0b1000), ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(7247 - 7136) + '\067' + chr(49), 27305 - 27297), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(51) + chr(1302 - 1252) + chr(49), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110001) + chr(49) + chr(48), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x31' + chr(0b10100 + 0o35), 8), ehT0Px3KOsy9('\x30' + chr(111) + '\x33' + '\x37' + chr(51), 8), ehT0Px3KOsy9(chr(0b11100 + 0o24) + '\x6f' + chr(50) + '\x34' + chr(2348 - 2297), 8), ehT0Px3KOsy9(chr(1316 - 1268) + chr(111) + '\x33' + chr(0b110110) + '\x32', 0b1000), ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(0b1101111) + chr(0b100101 + 0o15) + chr(0b111 + 0o52) + '\x31', 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(1091 - 1040) + '\067' + '\x30', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\062' + chr(0b10100 + 0o36) + chr(710 - 661), 54928 - 54920), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110001) + chr(625 - 576) + chr(0b101110 + 0o11), 36099 - 36091), ehT0Px3KOsy9(chr(48) + '\157' + chr(50) + chr(0b101001 + 0o15), ord("\x08")), ehT0Px3KOsy9(chr(562 - 514) + '\157' + '\x31' + chr(0b10101 + 0o41) + '\061', 8), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110011) + chr(0b1010 + 0o54) + chr(0b101001 + 0o7), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b10101 + 0o132) + chr(456 - 405) + chr(0b110010) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(559 - 508) + chr(0b11101 + 0o25) + chr(834 - 783), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\063' + chr(0b100111 + 0o14) + '\065', 689 - 681), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(1141 - 1090) + chr(0b101001 + 0o13) + '\063', 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\x32' + chr(50), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b101110 + 0o101) + '\x37' + '\x30', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x35' + chr(52), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1110 + 0o141) + chr(0b101110 + 0o7) + chr(0b1100 + 0o51), 0b1000), ehT0Px3KOsy9(chr(0b1010 + 0o46) + '\157' + chr(0b11111 + 0o23) + '\x31', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\063' + '\x33' + chr(0b110010), 48972 - 48964), ehT0Px3KOsy9(chr(0b110000) + chr(1738 - 1627) + '\x31' + chr(0b110100) + '\x32', 8), ehT0Px3KOsy9(chr(0b100011 + 0o15) + '\157' + '\063' + chr(0b110100) + chr(0b110101), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b11000 + 0o30) + '\x6f' + '\065' + chr(0b11101 + 0o23), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'{'), '\x64' + chr(9653 - 9552) + chr(1671 - 1572) + chr(0b10111 + 0o130) + '\144' + '\145')('\x75' + '\x74' + chr(0b1000101 + 0o41) + chr(1527 - 1482) + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def spOIzGhV3XlQ(oVre8I6UXc3b, o7UB7NN4p38b, pybif4rGbt58=xafqLlk3kkUe(SXOLrMavuUCe(b''), chr(100) + '\x65' + chr(99) + chr(111) + chr(2880 - 2780) + chr(0b1100 + 0o131))('\x75' + chr(116) + '\x66' + chr(0b101101) + chr(0b111000))): if xafqLlk3kkUe(SXOLrMavuUCe(b"'\xffT"), chr(0b101110 + 0o66) + chr(3118 - 3017) + '\143' + '\x6f' + chr(0b1100100 + 0o0) + chr(0b1100101))(chr(8196 - 8079) + chr(7787 - 7671) + chr(0b111100 + 0o52) + '\055' + chr(356 - 300)) not in o7UB7NN4p38b: raise HJKwRlaB772i(xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b'\x18\xffI\x8f~\xe4\xe4\xaa\xc0\xfc\xa8pQ\x02K\xa4&i\xdb\xca\x9c\xa9\x83\xec'), '\x64' + '\145' + '\x63' + '\x6f' + chr(100) + chr(101))('\165' + chr(0b100 + 0o160) + '\146' + chr(1313 - 1268) + chr(0b100110 + 0o22)), xafqLlk3kkUe(SXOLrMavuUCe(b'\x03\xbeH\x94\x16\xf6\xc7\xfc\xf3\xe5\xabc'), '\x64' + '\145' + chr(0b1011001 + 0o12) + '\x6f' + chr(100) + chr(0b1010010 + 0o23))(chr(0b1110101) + '\x74' + '\146' + chr(0b10011 + 0o32) + '\070'))(o7UB7NN4p38b)) for VNGQdHSFPrso in vQr8gNKaIaWE(xafqLlk3kkUe(o7UB7NN4p38b, xafqLlk3kkUe(SXOLrMavuUCe(b'2\xefN'), chr(1135 - 1035) + chr(0b101000 + 0o75) + chr(0b1011011 + 0o10) + chr(0b1101111) + chr(4163 - 4063) + '\x65')('\x75' + '\164' + chr(0b11001 + 0o115) + '\x2d' + chr(0b11001 + 0o37)))(xafqLlk3kkUe(SXOLrMavuUCe(b';\xffW\xa4-\xf6\xf9\xbf\xcf\xf0\xbd'), chr(6330 - 6230) + '\145' + chr(2056 - 1957) + '\157' + '\x64' + chr(0b111001 + 0o54))('\165' + chr(0b100111 + 0o115) + chr(9940 - 9838) + chr(45) + chr(0b100100 + 0o24)), ehT0Px3KOsy9(chr(48) + '\157' + '\x31', 6515 - 6507))): rv8CNRYETQhs = bKgNCjeVNupv.generate_id() while ehT0Px3KOsy9(chr(0b110000) + '\157' + '\061', 8): kzG6zvbs_iZ6 = oVre8I6UXc3b._suggest(rv8CNRYETQhs) if kzG6zvbs_iZ6 is None: yield None else: break IH4wfF5htxM9 = igThHS4jwVsa.deepcopy(o7UB7NN4p38b) IH4wfF5htxM9[xafqLlk3kkUe(SXOLrMavuUCe(b'6\xe5T\x9d7\xf0'), chr(0b1100100) + chr(0b11110 + 0o107) + '\143' + chr(0b1000100 + 0o53) + chr(0b1011 + 0o131) + '\x65')('\x75' + '\x74' + '\146' + chr(598 - 553) + chr(2839 - 2783))] = Mc21yxXumDYo(IH4wfF5htxM9[xafqLlk3kkUe(SXOLrMavuUCe(b'6\xe5T\x9d7\xf0'), chr(0b1000100 + 0o40) + chr(0b1100101) + chr(0b100000 + 0o103) + chr(111) + chr(3902 - 3802) + chr(0b111001 + 0o54))('\x75' + chr(8306 - 8190) + chr(102) + chr(604 - 559) + chr(520 - 464))], kzG6zvbs_iZ6) jEKkH7PnPMrM = CKQfRiNjU76u(IH4wfF5htxM9[xafqLlk3kkUe(SXOLrMavuUCe(b'6\xe5T\x9d7\xf0'), '\144' + chr(3435 - 3334) + chr(0b1100011) + '\157' + chr(0b111010 + 0o52) + chr(0b1001111 + 0o26))(chr(10443 - 10326) + chr(116) + chr(102) + chr(1849 - 1804) + chr(0b10101 + 0o43))]) oVre8I6UXc3b.cDZJac0b8sY6 += ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(1357 - 1246) + '\x31', 8) CPdEsc5O1sf7 = xafqLlk3kkUe(SXOLrMavuUCe(b'.\xbaG\xa4%\xa6\xe9'), chr(100) + chr(0b11101 + 0o110) + chr(1284 - 1185) + chr(0b110000 + 0o77) + chr(0b1100100) + chr(0b1100101))(chr(117) + chr(0b1101001 + 0o13) + chr(0b1100110) + '\x2d' + chr(56)).V4roHaS3Ppej(M8_cKLkHVB2V(oVre8I6UXc3b.cDZJac0b8sY6), lj4qFFZkq3c_(jEKkH7PnPMrM)) yield oAlfjvN9IBcv(IH4wfF5htxM9, pybif4rGbt58, xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\n\xfa[\x89-\xf2\xe6'), '\144' + '\x65' + chr(99) + chr(0b10010 + 0o135) + '\x64' + chr(0b1100101))('\165' + chr(0b1110100) + '\146' + chr(0b101101) + '\x38')), experiment_tag=CPdEsc5O1sf7, trial_id=rv8CNRYETQhs)
ray-project/ray
python/ray/tune/suggest/variant_generator.py
generate_variants
def generate_variants(unresolved_spec): """Generates variants from a spec (dict) with unresolved values. There are two types of unresolved values: Grid search: These define a grid search over values. For example, the following grid search values in a spec will produce six distinct variants in combination: "activation": grid_search(["relu", "tanh"]) "learning_rate": grid_search([1e-3, 1e-4, 1e-5]) Lambda functions: These are evaluated to produce a concrete value, and can express dependencies or conditional distributions between values. They can also be used to express random search (e.g., by calling into the `random` or `np` module). "cpu": lambda spec: spec.config.num_workers "batch_size": lambda spec: random.uniform(1, 1000) Finally, to support defining specs in plain JSON / YAML, grid search and lambda functions can also be defined alternatively as follows: "activation": {"grid_search": ["relu", "tanh"]} "cpu": {"eval": "spec.config.num_workers"} """ for resolved_vars, spec in _generate_variants(unresolved_spec): assert not _unresolved_values(spec) yield format_vars(resolved_vars), spec
python
def generate_variants(unresolved_spec): """Generates variants from a spec (dict) with unresolved values. There are two types of unresolved values: Grid search: These define a grid search over values. For example, the following grid search values in a spec will produce six distinct variants in combination: "activation": grid_search(["relu", "tanh"]) "learning_rate": grid_search([1e-3, 1e-4, 1e-5]) Lambda functions: These are evaluated to produce a concrete value, and can express dependencies or conditional distributions between values. They can also be used to express random search (e.g., by calling into the `random` or `np` module). "cpu": lambda spec: spec.config.num_workers "batch_size": lambda spec: random.uniform(1, 1000) Finally, to support defining specs in plain JSON / YAML, grid search and lambda functions can also be defined alternatively as follows: "activation": {"grid_search": ["relu", "tanh"]} "cpu": {"eval": "spec.config.num_workers"} """ for resolved_vars, spec in _generate_variants(unresolved_spec): assert not _unresolved_values(spec) yield format_vars(resolved_vars), spec
[ "def", "generate_variants", "(", "unresolved_spec", ")", ":", "for", "resolved_vars", ",", "spec", "in", "_generate_variants", "(", "unresolved_spec", ")", ":", "assert", "not", "_unresolved_values", "(", "spec", ")", "yield", "format_vars", "(", "resolved_vars", ")", ",", "spec" ]
Generates variants from a spec (dict) with unresolved values. There are two types of unresolved values: Grid search: These define a grid search over values. For example, the following grid search values in a spec will produce six distinct variants in combination: "activation": grid_search(["relu", "tanh"]) "learning_rate": grid_search([1e-3, 1e-4, 1e-5]) Lambda functions: These are evaluated to produce a concrete value, and can express dependencies or conditional distributions between values. They can also be used to express random search (e.g., by calling into the `random` or `np` module). "cpu": lambda spec: spec.config.num_workers "batch_size": lambda spec: random.uniform(1, 1000) Finally, to support defining specs in plain JSON / YAML, grid search and lambda functions can also be defined alternatively as follows: "activation": {"grid_search": ["relu", "tanh"]} "cpu": {"eval": "spec.config.num_workers"}
[ "Generates", "variants", "from", "a", "spec", "(", "dict", ")", "with", "unresolved", "values", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/tune/suggest/variant_generator.py#L16-L44
train
Generates a list of variants from a spec with unresolved values.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPvpP4xdo3,cW7yQuyEnJ6E,KOHQGQ8qLDWm,NE1Yam2HHroQ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84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110011) + chr(1674 - 1626) + chr(0b1 + 0o60), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b10000 + 0o137) + chr(49) + '\061', ord("\x08")), ehT0Px3KOsy9(chr(0b10100 + 0o34) + '\x6f' + chr(0b110011) + chr(53) + '\064', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x33' + chr(0b110010) + chr(0b1101 + 0o44), 0b1000), ehT0Px3KOsy9(chr(218 - 170) + '\x6f' + '\x33' + chr(0b11010 + 0o33) + chr(0b1100 + 0o44), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(2423 - 2373) + chr(48) + '\x36', 0o10), ehT0Px3KOsy9(chr(0b11100 + 0o24) + '\x6f' + '\063' + chr(53) + chr(0b110101 + 0o0), 0o10), ehT0Px3KOsy9(chr(908 - 860) + chr(0b1011110 + 0o21) + '\x31' + chr(54) + chr(0b110010), 0o10), ehT0Px3KOsy9('\060' + chr(0b1100110 + 0o11) + '\062' + '\061' + chr(0b11111 + 0o26), ord("\x08")), ehT0Px3KOsy9(chr(311 - 263) + chr(0b1101111) + '\061' + chr(0b110100) + chr(0b100000 + 0o20), 0b1000), ehT0Px3KOsy9('\060' + chr(10931 - 10820) + chr(1435 - 1387), 18383 - 18375), ehT0Px3KOsy9('\060' + '\157' + chr(49) + chr(0b101101 + 0o5) + '\x32', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(875 - 825) + '\065' + '\x34', 40688 - 40680), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x31' + chr(51) + chr(1950 - 1896), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b0 + 0o63) + '\062' + '\x37', 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\061' + chr(0b110011) + '\065', 11418 - 11410), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(2237 - 2188) + chr(49) + chr(50), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(50) + '\x31' + chr(0b101111 + 0o5), 18757 - 18749), ehT0Px3KOsy9('\x30' + chr(111) + '\x33' + chr(0b100101 + 0o22) + '\062', ord("\x08")), ehT0Px3KOsy9('\060' + chr(143 - 32) + chr(0b110001) + chr(55) + chr(0b110011), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + '\067' + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(2201 - 2153) + chr(0b10111 + 0o130) + '\x34' + '\062', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(557 - 506) + '\x34' + '\062', ord("\x08")), ehT0Px3KOsy9(chr(1856 - 1808) + chr(0b1101111) + chr(0b110 + 0o54) + chr(1753 - 1705), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x37' + chr(0b110000), 42480 - 42472), ehT0Px3KOsy9('\x30' + '\157' + chr(51) + chr(0b110011 + 0o4) + chr(1926 - 1871), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1397 - 1346) + chr(0b110110) + '\063', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(1984 - 1935) + chr(145 - 92) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(50) + chr(52) + chr(378 - 323), 45069 - 45061), ehT0Px3KOsy9('\x30' + chr(111) + chr(51) + '\062' + '\065', ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(0b101100 + 0o5) + '\064' + chr(52), 28006 - 27998), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\062' + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(0b1101111) + '\x33' + chr(50) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110010) + '\065' + chr(1977 - 1925), 8), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(0b1101111) + chr(0b110111) + chr(0b10011 + 0o41), 38718 - 38710), ehT0Px3KOsy9(chr(48) + chr(4261 - 4150) + chr(0b110010) + chr(0b101000 + 0o10) + chr(0b101111 + 0o5), 0o10), ehT0Px3KOsy9('\060' + chr(9208 - 9097) + chr(2849 - 2795) + '\064', 48759 - 48751), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(1271 - 1220) + '\061' + '\066', 0o10), ehT0Px3KOsy9('\x30' + chr(0b11000 + 0o127) + chr(49) + chr(0b101110 + 0o6) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(994 - 946) + '\x6f' + '\064', 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(0b1101111) + chr(53) + chr(1541 - 1493), 16224 - 16216)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xef'), '\144' + chr(0b1000001 + 0o44) + chr(99) + chr(0b1101111) + '\x64' + chr(7624 - 7523))('\165' + chr(0b11010 + 0o132) + chr(0b1001010 + 0o34) + chr(0b101101) + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def XLBMgSL7m8fL(p9KjjoWEm0RG): for (BMLY91R8lBDY, IH4wfF5htxM9) in x66Z5uPfK4Jw(p9KjjoWEm0RG): assert not OSEp4vhj8Bn2(IH4wfF5htxM9) yield (lj4qFFZkq3c_(BMLY91R8lBDY), IH4wfF5htxM9)
ray-project/ray
python/ray/tune/suggest/variant_generator.py
resolve_nested_dict
def resolve_nested_dict(nested_dict): """Flattens a nested dict by joining keys into tuple of paths. Can then be passed into `format_vars`. """ res = {} for k, v in nested_dict.items(): if isinstance(v, dict): for k_, v_ in resolve_nested_dict(v).items(): res[(k, ) + k_] = v_ else: res[(k, )] = v return res
python
def resolve_nested_dict(nested_dict): """Flattens a nested dict by joining keys into tuple of paths. Can then be passed into `format_vars`. """ res = {} for k, v in nested_dict.items(): if isinstance(v, dict): for k_, v_ in resolve_nested_dict(v).items(): res[(k, ) + k_] = v_ else: res[(k, )] = v return res
[ "def", "resolve_nested_dict", "(", "nested_dict", ")", ":", "res", "=", "{", "}", "for", "k", ",", "v", "in", "nested_dict", ".", "items", "(", ")", ":", "if", "isinstance", "(", "v", ",", "dict", ")", ":", "for", "k_", ",", "v_", "in", "resolve_nested_dict", "(", "v", ")", ".", "items", "(", ")", ":", "res", "[", "(", "k", ",", ")", "+", "k_", "]", "=", "v_", "else", ":", "res", "[", "(", "k", ",", ")", "]", "=", "v", "return", "res" ]
Flattens a nested dict by joining keys into tuple of paths. Can then be passed into `format_vars`.
[ "Flattens", "a", "nested", "dict", "by", "joining", "keys", "into", "tuple", "of", "paths", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/tune/suggest/variant_generator.py#L108-L120
train
Flattens a nested dict by joining keys into tuple of paths.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPth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k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b100001 + 0o17) + '\x6f' + chr(380 - 330) + chr(1719 - 1664) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(49) + '\065' + chr(54), 64076 - 64068), ehT0Px3KOsy9(chr(1584 - 1536) + chr(0b1101111) + chr(0b110011) + '\x37' + '\x36', 60040 - 60032), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110010) + '\x31' + '\x32', 0b1000), ehT0Px3KOsy9(chr(0b10 + 0o56) + '\157' + '\063' + chr(2446 - 2394) + '\062', 0b1000), ehT0Px3KOsy9(chr(393 - 345) + chr(111) + chr(0b1000 + 0o53) + chr(52) + '\x37', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(2195 - 2144) + '\x37' + chr(0b11010 + 0o32), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110001) + chr(2865 - 2811) + '\x32', 0b1000), ehT0Px3KOsy9(chr(1273 - 1225) + chr(0b111110 + 0o61) + '\063' + chr(0b1 + 0o60) + '\x36', 32893 - 32885), ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(0b1100000 + 0o17) + '\x33' + chr(0b0 + 0o61) + chr(0b110 + 0o53), 21178 - 21170), ehT0Px3KOsy9(chr(1378 - 1330) + chr(0b1101111) + chr(916 - 866) + chr(50) + chr(0b1100 + 0o45), 0b1000), ehT0Px3KOsy9(chr(0b11001 + 0o27) + '\x6f' + chr(1823 - 1772) + '\061' + chr(54), 8), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(0b10111 + 0o31) + chr(111) + '\x32' + chr(988 - 940) + chr(51), 56002 - 55994), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x32' + '\065' + '\x31', 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(53), 0o10), ehT0Px3KOsy9('\060' + chr(4749 - 4638) + chr(0b101000 + 0o12) + '\x36' + '\x32', 0o10), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(0b1101111) + chr(49) + chr(54) + chr(0b11110 + 0o30), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\062' + chr(865 - 817), 0b1000), ehT0Px3KOsy9(chr(48) + chr(9962 - 9851) + chr(0b10101 + 0o34) + '\060' + chr(0b1000 + 0o50), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(1215 - 1164) + '\061' + chr(0b110100), 10129 - 10121), ehT0Px3KOsy9(chr(2221 - 2173) + chr(6408 - 6297) + chr(0b100100 + 0o17) + '\x36' + chr(0b101 + 0o60), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1010011 + 0o34) + chr(50) + chr(52) + chr(2164 - 2110), 45139 - 45131), ehT0Px3KOsy9(chr(325 - 277) + chr(2738 - 2627) + chr(51) + chr(2456 - 2404) + '\066', 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110000), 8), ehT0Px3KOsy9(chr(2215 - 2167) + chr(0b10110 + 0o131) + chr(762 - 713) + chr(50) + chr(1946 - 1896), ord("\x08")), ehT0Px3KOsy9(chr(252 - 204) + chr(111) + chr(355 - 305) + '\x34' + chr(2241 - 2193), 0o10), ehT0Px3KOsy9('\060' + chr(0b10001 + 0o136) + chr(453 - 404) + chr(0b11110 + 0o26) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(0b110 + 0o52) + '\157' + chr(0b1011 + 0o46) + '\x35' + chr(544 - 493), 14772 - 14764), ehT0Px3KOsy9(chr(0b110000) + chr(0b11111 + 0o120) + chr(2428 - 2377) + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(2193 - 2145) + '\157' + '\x32' + '\061' + chr(0b11001 + 0o32), 0o10), ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(1002 - 891) + chr(0b1110 + 0o43) + chr(52) + '\x35', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110001 + 0o0) + '\x30' + chr(0b100000 + 0o22), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110001) + '\062' + chr(0b100011 + 0o24), 0o10), ehT0Px3KOsy9(chr(2258 - 2210) + '\x6f' + chr(0b110011) + '\x31' + '\067', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x37' + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(1471 - 1423) + chr(2170 - 2059) + '\x31' + chr(0b100100 + 0o14) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(779 - 731) + chr(0b1101111) + chr(49) + '\x32' + chr(55), 8), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110001 + 0o6) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(1034 - 986) + chr(0b1101110 + 0o1) + chr(0b110001) + '\063' + chr(0b110010), 65284 - 65276)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(2131 - 2083) + chr(111) + '\065' + '\060', ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x96'), '\x64' + chr(0b110111 + 0o56) + chr(0b10011 + 0o120) + '\157' + '\x64' + '\145')(chr(117) + '\164' + chr(0b1100110) + '\x2d' + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def CKQfRiNjU76u(JjLb6GjucBJP): MsbwfslwLjRO = {} for (OolUPRJhRaJd, cMbll0QYhULo) in xafqLlk3kkUe(JjLb6GjucBJP, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf6\x14\x88\xef\xab\xbd\xcf;\xa2\x9a\xd9\xf7'), '\x64' + chr(101) + chr(99) + chr(523 - 412) + chr(6123 - 6023) + '\145')(chr(0b1111 + 0o146) + chr(0b100111 + 0o115) + chr(0b1100110) + '\055' + chr(0b111000)))(): if PlSM16l2KDPD(cMbll0QYhULo, wLqBDw8l0eIm): for (ndptOa2Vs0Mu, Mo_LVHEqwSie) in xafqLlk3kkUe(CKQfRiNjU76u(cMbll0QYhULo), xafqLlk3kkUe(SXOLrMavuUCe(b'\xf6\x14\x88\xef\xab\xbd\xcf;\xa2\x9a\xd9\xf7'), '\x64' + '\145' + '\143' + chr(111) + chr(9435 - 9335) + '\x65')(chr(12258 - 12141) + chr(0b1110100) + chr(0b11 + 0o143) + chr(1171 - 1126) + '\070'))(): MsbwfslwLjRO[(OolUPRJhRaJd,) + ndptOa2Vs0Mu] = Mo_LVHEqwSie else: MsbwfslwLjRO[OolUPRJhRaJd,] = cMbll0QYhULo return MsbwfslwLjRO
ray-project/ray
python/ray/tune/automlboard/run.py
run_board
def run_board(args): """ Run main entry for AutoMLBoard. Args: args: args parsed from command line """ init_config(args) # backend service, should import after django settings initialized from backend.collector import CollectorService service = CollectorService( args.logdir, args.reload_interval, standalone=False, log_level=args.log_level) service.run() # frontend service logger.info("Try to start automlboard on port %s\n" % args.port) command = [ os.path.join(root_path, "manage.py"), "runserver", "0.0.0.0:%s" % args.port, "--noreload" ] execute_from_command_line(command)
python
def run_board(args): """ Run main entry for AutoMLBoard. Args: args: args parsed from command line """ init_config(args) # backend service, should import after django settings initialized from backend.collector import CollectorService service = CollectorService( args.logdir, args.reload_interval, standalone=False, log_level=args.log_level) service.run() # frontend service logger.info("Try to start automlboard on port %s\n" % args.port) command = [ os.path.join(root_path, "manage.py"), "runserver", "0.0.0.0:%s" % args.port, "--noreload" ] execute_from_command_line(command)
[ "def", "run_board", "(", "args", ")", ":", "init_config", "(", "args", ")", "# backend service, should import after django settings initialized", "from", "backend", ".", "collector", "import", "CollectorService", "service", "=", "CollectorService", "(", "args", ".", "logdir", ",", "args", ".", "reload_interval", ",", "standalone", "=", "False", ",", "log_level", "=", "args", ".", "log_level", ")", "service", ".", "run", "(", ")", "# frontend service", "logger", ".", "info", "(", "\"Try to start automlboard on port %s\\n\"", "%", "args", ".", "port", ")", "command", "=", "[", "os", ".", "path", ".", "join", "(", "root_path", ",", "\"manage.py\"", ")", ",", "\"runserver\"", ",", "\"0.0.0.0:%s\"", "%", "args", ".", "port", ",", "\"--noreload\"", "]", "execute_from_command_line", "(", "command", ")" ]
Run main entry for AutoMLBoard. Args: args: args parsed from command line
[ "Run", "main", "entry", "for", "AutoMLBoard", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/tune/automlboard/run.py#L18-L43
train
Run main entry for AutoMLBoard.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pI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0,Rurm1zTRfSmY,reqGiMiVQ77y,bsS9P6_LpdIe,sbGAZlkZOtyh,Cf_Qef15s3_F,eX02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(2001 - 1953) + '\x6f' + chr(51) + chr(0b10100 + 0o36) + chr(50), 0o10), ehT0Px3KOsy9(chr(1508 - 1460) + '\x6f' + '\061' + '\x33' + '\067', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(5181 - 5070) + chr(49) + chr(0b110000 + 0o3) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(0b1000 + 0o50) + '\x6f' + '\x33' + chr(0b101000 + 0o13) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(1432 - 1384) + chr(0b1010110 + 0o31) + chr(55) + chr(0b10110 + 0o33), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x33' + '\061' + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(1309 - 1259) + '\062' + '\x34', 0b1000), ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(111) + chr(0b1011 + 0o50) + chr(0b110111) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(511 - 463) + '\x6f' + chr(2153 - 2104) + chr(0b10011 + 0o40), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b11011 + 0o124) + chr(0b110001) + chr(48) + chr(48), 0b1000), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(0b1010100 + 0o33) + chr(0b110010) + '\066', 0o10), ehT0Px3KOsy9(chr(48) + chr(10320 - 10209) + chr(0b101001 + 0o10) + '\x30' + chr(0b110011), 5590 - 5582), ehT0Px3KOsy9('\060' + chr(0b1100000 + 0o17) + '\061' + chr(0b111 + 0o52) + chr(0b1100 + 0o50), 0o10), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(0b1101111) + chr(924 - 874) + chr(0b110001), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\061' + '\x35', 54198 - 54190), ehT0Px3KOsy9('\060' + chr(0b101 + 0o152) + chr(0b11111 + 0o22) + chr(0b110111) + chr(0b11001 + 0o34), 25973 - 25965), ehT0Px3KOsy9('\060' + '\x6f' + '\x32' + chr(0b10010 + 0o43) + chr(0b110100 + 0o1), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110100 + 0o2) + chr(0b100 + 0o57), 0b1000), ehT0Px3KOsy9(chr(2096 - 2048) + chr(0b111011 + 0o64) + '\063' + chr(0b110101) + chr(48), 0o10), ehT0Px3KOsy9(chr(0b101110 + 0o2) + chr(0b111010 + 0o65) + chr(51) + chr(0b110011) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(1313 - 1265) + '\x6f' + chr(1145 - 1091) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(416 - 368) + chr(5882 - 5771) + '\061' + chr(51) + chr(2677 - 2623), 36100 - 36092), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(573 - 523) + chr(2002 - 1951) + chr(0b1101 + 0o46), 0b1000), ehT0Px3KOsy9(chr(1607 - 1559) + '\157' + chr(0b101111 + 0o2) + chr(0b100110 + 0o12), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + '\061' + '\x33' + chr(0b1010 + 0o54), 8), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110011) + chr(53) + chr(1907 - 1859), 8), ehT0Px3KOsy9(chr(2195 - 2147) + '\157' + chr(0b110000 + 0o1) + chr(396 - 345) + '\062', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + '\061' + chr(781 - 729) + '\060', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(52) + chr(0b101 + 0o62), 0b1000), ehT0Px3KOsy9(chr(132 - 84) + chr(111) + chr(575 - 524) + '\x31', 0b1000), ehT0Px3KOsy9(chr(409 - 361) + chr(0b1010101 + 0o32) + chr(0b1 + 0o60) + chr(54) + chr(964 - 910), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110100) + chr(2416 - 2362), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(5873 - 5762) + chr(0b110011) + chr(1019 - 965) + chr(53), 0o10), ehT0Px3KOsy9(chr(2184 - 2136) + '\157' + chr(1922 - 1871) + chr(0b10101 + 0o36) + chr(227 - 178), 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\062' + chr(53) + chr(48), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x35' + chr(388 - 336), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x31' + chr(1652 - 1597) + '\067', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\062' + chr(0b101001 + 0o14) + chr(0b110 + 0o52), 8), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110010) + '\x35' + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(1784 - 1736) + chr(0b1001100 + 0o43) + chr(1798 - 1748) + chr(0b110010), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + '\x6f' + chr(0b11111 + 0o26) + chr(1732 - 1684), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xfc'), '\144' + chr(101) + chr(99) + chr(0b1101111) + chr(0b101101 + 0o67) + chr(0b1100101))('\x75' + chr(0b11000 + 0o134) + chr(0b1100110) + chr(0b100000 + 0o15) + chr(979 - 923)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def Vjg_9a_sTlrB(kJDRfRhcZHjS): VEaUOz8spat_(kJDRfRhcZHjS) (nTxrnnTrf3ZF,) = (xafqLlk3kkUe(xafqLlk3kkUe(NPPHb59961Bv(xafqLlk3kkUe(SXOLrMavuUCe(b'\xb0>:\xb4\\\xa7\xf0\xd7h/z/)ry\x12\xdf'), chr(5175 - 5075) + chr(101) + chr(0b1010000 + 0o23) + '\x6f' + chr(0b100101 + 0o77) + chr(9915 - 9814))('\165' + '\x74' + chr(2956 - 2854) + chr(0b101101) + chr(0b10000 + 0o50)), xafqLlk3kkUe(SXOLrMavuUCe(b'\x9105\xb3\\\xaa\xe0\x96y\x13s1:xn\x18'), '\144' + chr(0b1100101) + '\143' + chr(111) + chr(0b100100 + 0o100) + '\145')(chr(0b1110101) + chr(116) + chr(1812 - 1710) + '\x2d' + chr(1734 - 1678))), xafqLlk3kkUe(SXOLrMavuUCe(b'\xb105\xb3\\\xaa\xe0\x96y'), chr(100) + chr(2681 - 2580) + chr(0b1100011) + chr(0b1101111) + chr(100) + '\145')(chr(0b1110101) + chr(0b1110100) + chr(102) + '\x2d' + chr(1399 - 1343))), xafqLlk3kkUe(SXOLrMavuUCe(b'\x9105\xb3\\\xaa\xe0\x96y\x13s1:xn\x18'), chr(100) + chr(0b1010011 + 0o22) + chr(0b1010110 + 0o15) + chr(0b0 + 0o157) + '\x64' + chr(101))(chr(7085 - 6968) + chr(2826 - 2710) + chr(102) + '\055' + chr(0b111000))),) vCx4K6V3edcr = nTxrnnTrf3ZF(kJDRfRhcZHjS.logdir, kJDRfRhcZHjS.reload_interval, standalone=ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x30', 47342 - 47334), log_level=kJDRfRhcZHjS.log_level) xafqLlk3kkUe(vCx4K6V3edcr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa18-\xea{\x9c\xa2\xc8i7Lq'), chr(0b1100100) + '\145' + '\x63' + chr(5459 - 5348) + chr(0b111100 + 0o50) + '\x65')(chr(9266 - 9149) + chr(0b10 + 0o162) + '\146' + '\x2d' + chr(56)))() xafqLlk3kkUe(hdK8qOUhR6Or, xafqLlk3kkUe(SXOLrMavuUCe(b'\x81h\x11\xa7L\xaa\xf3\xcea,L('), chr(0b110100 + 0o60) + '\x65' + chr(2596 - 2497) + chr(111) + chr(7538 - 7438) + chr(5377 - 5276))(chr(0b1010111 + 0o36) + '\164' + chr(102) + '\055' + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x86- \xffM\xa6\xb4\x8a\x7f!d7lpx\t\xc2^\x84\xbc^?\xe9l~\x874@Wv\x04R\xd5\xfc\xdb&'), chr(100) + chr(0b1100 + 0o131) + chr(0b1100 + 0o127) + chr(0b101 + 0o152) + chr(0b11000 + 0o114) + '\145')(chr(0b1110101) + '\164' + chr(0b1010 + 0o134) + '\x2d' + '\070') % xafqLlk3kkUe(kJDRfRhcZHjS, xafqLlk3kkUe(SXOLrMavuUCe(b'\x86\x0e\r\x8bX\xbd\xc1\xb0I\x11.:'), '\144' + '\145' + '\143' + '\x6f' + chr(0b1100100) + '\145')(chr(117) + chr(116) + chr(0b11000 + 0o116) + chr(189 - 144) + chr(1583 - 1527)))) CVh_Z3xeqjku = [oqhJDdMJfuwx.path._oWXztVNnqHF(WMh1_Swma6hS, xafqLlk3kkUe(SXOLrMavuUCe(b'\xbf>7\xbe^\xac\xba\x89r'), '\144' + chr(0b1100101) + '\x63' + '\x6f' + chr(0b101010 + 0o72) + chr(101))(chr(117) + '\x74' + chr(102) + '\x2d' + '\x38')), xafqLlk3kkUe(SXOLrMavuUCe(b'\xa0*7\xac\\\xbb\xe2\x9cy'), chr(0b1100100) + chr(1132 - 1031) + '\143' + chr(111) + chr(0b1100100) + chr(101))(chr(0b1110101) + '\x74' + chr(0b10000 + 0o126) + chr(45) + chr(0b111000)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xe2qi\xf1\t\xe7\xa4\xc3.3'), chr(0b1100100) + chr(101) + chr(99) + '\157' + '\x64' + chr(3849 - 3748))('\x75' + chr(0b1110100) + chr(8437 - 8335) + chr(904 - 859) + '\070') % kJDRfRhcZHjS.TQTTatUIBQ8y, xafqLlk3kkUe(SXOLrMavuUCe(b'\xffr7\xb0K\xac\xf8\x96j$'), chr(0b1100100) + chr(0b1010000 + 0o25) + chr(99) + chr(4013 - 3902) + '\144' + chr(0b1100101))('\x75' + chr(0b11100 + 0o130) + '\146' + chr(45) + chr(0b111000))] zmVCieiMjMBZ(CVh_Z3xeqjku)
ray-project/ray
python/ray/tune/automlboard/run.py
init_config
def init_config(args): """ Initialize configs of the service. Do the following things: 1. automl board settings 2. database settings 3. django settings """ os.environ["AUTOMLBOARD_LOGDIR"] = args.logdir os.environ["AUTOMLBOARD_LOGLEVEL"] = args.log_level os.environ["AUTOMLBOARD_RELOAD_INTERVAL"] = str(args.reload_interval) if args.db: try: db_address_reg = re.compile(r"(.*)://(.*):(.*)@(.*):(.*)/(.*)") match = re.match(db_address_reg, args.db_address) os.environ["AUTOMLBOARD_DB_ENGINE"] = match.group(1) os.environ["AUTOMLBOARD_DB_USER"] = match.group(2) os.environ["AUTOMLBOARD_DB_PASSWORD"] = match.group(3) os.environ["AUTOMLBOARD_DB_HOST"] = match.group(4) os.environ["AUTOMLBOARD_DB_PORT"] = match.group(5) os.environ["AUTOMLBOARD_DB_NAME"] = match.group(6) logger.info("Using %s as the database backend." % match.group(1)) except BaseException as e: raise DatabaseError(e) else: logger.info("Using sqlite3 as the database backend, " "information will be stored in automlboard.db") os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ray.tune.automlboard.settings") django.setup() command = [os.path.join(root_path, "manage.py"), "migrate", "--run-syncdb"] execute_from_command_line(command)
python
def init_config(args): """ Initialize configs of the service. Do the following things: 1. automl board settings 2. database settings 3. django settings """ os.environ["AUTOMLBOARD_LOGDIR"] = args.logdir os.environ["AUTOMLBOARD_LOGLEVEL"] = args.log_level os.environ["AUTOMLBOARD_RELOAD_INTERVAL"] = str(args.reload_interval) if args.db: try: db_address_reg = re.compile(r"(.*)://(.*):(.*)@(.*):(.*)/(.*)") match = re.match(db_address_reg, args.db_address) os.environ["AUTOMLBOARD_DB_ENGINE"] = match.group(1) os.environ["AUTOMLBOARD_DB_USER"] = match.group(2) os.environ["AUTOMLBOARD_DB_PASSWORD"] = match.group(3) os.environ["AUTOMLBOARD_DB_HOST"] = match.group(4) os.environ["AUTOMLBOARD_DB_PORT"] = match.group(5) os.environ["AUTOMLBOARD_DB_NAME"] = match.group(6) logger.info("Using %s as the database backend." % match.group(1)) except BaseException as e: raise DatabaseError(e) else: logger.info("Using sqlite3 as the database backend, " "information will be stored in automlboard.db") os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ray.tune.automlboard.settings") django.setup() command = [os.path.join(root_path, "manage.py"), "migrate", "--run-syncdb"] execute_from_command_line(command)
[ "def", "init_config", "(", "args", ")", ":", "os", ".", "environ", "[", "\"AUTOMLBOARD_LOGDIR\"", "]", "=", "args", ".", "logdir", "os", ".", "environ", "[", "\"AUTOMLBOARD_LOGLEVEL\"", "]", "=", "args", ".", "log_level", "os", ".", "environ", "[", "\"AUTOMLBOARD_RELOAD_INTERVAL\"", "]", "=", "str", "(", "args", ".", "reload_interval", ")", "if", "args", ".", "db", ":", "try", ":", "db_address_reg", "=", "re", ".", "compile", "(", "r\"(.*)://(.*):(.*)@(.*):(.*)/(.*)\"", ")", "match", "=", "re", ".", "match", "(", "db_address_reg", ",", "args", ".", "db_address", ")", "os", ".", "environ", "[", "\"AUTOMLBOARD_DB_ENGINE\"", "]", "=", "match", ".", "group", "(", "1", ")", "os", ".", "environ", "[", "\"AUTOMLBOARD_DB_USER\"", "]", "=", "match", ".", "group", "(", "2", ")", "os", ".", "environ", "[", "\"AUTOMLBOARD_DB_PASSWORD\"", "]", "=", "match", ".", "group", "(", "3", ")", "os", ".", "environ", "[", "\"AUTOMLBOARD_DB_HOST\"", "]", "=", "match", ".", "group", "(", "4", ")", "os", ".", "environ", "[", "\"AUTOMLBOARD_DB_PORT\"", "]", "=", "match", ".", "group", "(", "5", ")", "os", ".", "environ", "[", "\"AUTOMLBOARD_DB_NAME\"", "]", "=", "match", ".", "group", "(", "6", ")", "logger", ".", "info", "(", "\"Using %s as the database backend.\"", "%", "match", ".", "group", "(", "1", ")", ")", "except", "BaseException", "as", "e", ":", "raise", "DatabaseError", "(", "e", ")", "else", ":", "logger", ".", "info", "(", "\"Using sqlite3 as the database backend, \"", "\"information will be stored in automlboard.db\"", ")", "os", ".", "environ", ".", "setdefault", "(", "\"DJANGO_SETTINGS_MODULE\"", ",", "\"ray.tune.automlboard.settings\"", ")", "django", ".", "setup", "(", ")", "command", "=", "[", "os", ".", "path", ".", "join", "(", "root_path", ",", "\"manage.py\"", ")", ",", "\"migrate\"", ",", "\"--run-syncdb\"", "]", "execute_from_command_line", "(", "command", ")" ]
Initialize configs of the service. Do the following things: 1. automl board settings 2. database settings 3. django settings
[ "Initialize", "configs", "of", "the", "service", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/tune/automlboard/run.py#L46-L80
train
Initialize the configuration of the service.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPvpP4xdo3,cW7yQuyEnJ6E,KOHQGQ8qLDWm,NE1Yam2HHroQ,ygAzbDzrvRMh,SBRjvOU1ufVC,hOkXjmluKZfJ,q1QCh3W88sgk,TLbJ60djyws0,rIcPej9ZqMqV,WTxpD_zsEOh2,LgE_IO_tHXvM,Kk1hd194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ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b110000) + chr(9459 - 9348) + chr(0b110001) + '\066' + chr(54), 0b1000), ehT0Px3KOsy9(chr(385 - 337) + '\157' + '\063' + chr(2915 - 2860), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110 + 0o53) + '\065' + chr(0b100101 + 0o13), 32662 - 32654), ehT0Px3KOsy9('\060' + '\x6f' + '\x33' + '\x31' + '\x33', 0b1000), ehT0Px3KOsy9(chr(1073 - 1025) + chr(0b1101111) + '\063' + chr(0b1010 + 0o50) + '\062', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x33' + chr(50) + '\067', 35721 - 35713), ehT0Px3KOsy9(chr(48) + chr(0b1000011 + 0o54) + chr(51) + '\x33' + chr(2216 - 2163), 51119 - 51111), ehT0Px3KOsy9('\060' + '\157' + '\x33' + chr(58 - 6) + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b100110 + 0o15) + chr(0b110111) + chr(518 - 469), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(49) + chr(0b110111) + chr(54), 32725 - 32717), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(909 - 859) + chr(0b11101 + 0o26) + '\x32', 0o10), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(1503 - 1392) + '\061' + '\066', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b11001 + 0o36) + chr(1283 - 1229), ord("\x08")), ehT0Px3KOsy9(chr(924 - 876) + chr(0b1101111) + '\x33' + '\061' + chr(55), 0o10), ehT0Px3KOsy9(chr(222 - 174) + '\157' + chr(0b110011) + chr(0b11111 + 0o25) + chr(0b101 + 0o53), 0o10), ehT0Px3KOsy9('\060' + chr(0b1000001 + 0o56) + chr(55) + chr(0b101011 + 0o5), 39498 - 39490), ehT0Px3KOsy9(chr(1811 - 1763) + '\157' + chr(50) + chr(0b110100) + chr(0b110100), 6764 - 6756), ehT0Px3KOsy9(chr(0b100111 + 0o11) + chr(111) + chr(0b100110 + 0o14) + chr(55), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\063' + '\x32' + '\063', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110010) + chr(0b0 + 0o65) + chr(0b110100), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x32' + chr(0b110001) + chr(116 - 67), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110010) + chr(0b1110 + 0o44), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1001111 + 0o40) + '\x33' + chr(53) + '\x32', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x36' + '\x37', 55667 - 55659), ehT0Px3KOsy9('\x30' + '\157' + chr(50) + '\x31' + chr(2539 - 2487), ord("\x08")), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(9875 - 9764) + '\062' + chr(0b11110 + 0o26) + '\x37', 55339 - 55331), ehT0Px3KOsy9(chr(1610 - 1562) + '\x6f' + chr(50) + chr(1817 - 1764) + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110010) + chr(1259 - 1207) + '\x30', 8854 - 8846), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000 + 0o147) + chr(0b10110 + 0o33) + chr(0b110000) + '\066', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(81 - 31) + chr(347 - 297) + chr(0b1110 + 0o43), 0o10), ehT0Px3KOsy9(chr(0b100100 + 0o14) + chr(0b101110 + 0o101) + '\x32' + '\x35' + chr(0b110111), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1100 + 0o143) + chr(1334 - 1285) + chr(49) + '\062', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b111011 + 0o64) + '\x33' + chr(1802 - 1747), 8), ehT0Px3KOsy9(chr(48) + chr(4646 - 4535) + '\063' + '\x33' + '\x36', 24596 - 24588), ehT0Px3KOsy9(chr(48) + chr(111) + '\061' + chr(707 - 655) + chr(53), 0b1000), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(111) + chr(0b110010) + '\x35' + '\x34', 8), ehT0Px3KOsy9(chr(0b110000) + chr(6043 - 5932) + chr(50) + '\066' + chr(1057 - 1007), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(7300 - 7189) + chr(0b11000 + 0o36) + '\065', 61354 - 61346), ehT0Px3KOsy9(chr(0b110000) + chr(4983 - 4872) + chr(0b110010) + chr(49) + chr(1913 - 1858), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\062' + chr(1034 - 980) + chr(0b110111), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(3792 - 3681) + chr(766 - 713) + chr(1537 - 1489), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'X'), chr(0b1100100 + 0o0) + '\x65' + chr(99) + chr(0b1101111) + chr(0b110110 + 0o56) + chr(0b111000 + 0o55))(chr(0b1110101) + chr(0b1010110 + 0o36) + '\x66' + '\055' + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def VEaUOz8spat_(kJDRfRhcZHjS): oqhJDdMJfuwx.rNK60KZ67nXB[xafqLlk3kkUe(SXOLrMavuUCe(b'7J<\x84\x9f\x9b\x9f\xac\xb8,\xdeQr\x80\xa7|\xedE'), '\x64' + chr(101) + '\143' + '\x6f' + '\144' + chr(0b1100101))('\165' + chr(116) + chr(102) + '\x2d' + chr(0b111000))] = kJDRfRhcZHjS.logdir oqhJDdMJfuwx.rNK60KZ67nXB[xafqLlk3kkUe(SXOLrMavuUCe(b'7J<\x84\x9f\x9b\x9f\xac\xb8,\xdeQr\x80\xa7t\xe1A\x96\xe0'), chr(0b1000 + 0o134) + chr(0b1100101) + '\143' + chr(111) + '\x64' + chr(4251 - 4150))(chr(9130 - 9013) + '\164' + chr(102) + chr(45) + '\070')] = kJDRfRhcZHjS.log_level oqhJDdMJfuwx.rNK60KZ67nXB[xafqLlk3kkUe(SXOLrMavuUCe(b'7J<\x84\x9f\x9b\x9f\xac\xb8,\xdeQl\x8a\xacw\xe5S\x8c\xe5\xc7F\xafe\xda\xe6\xe4'), chr(1638 - 1538) + chr(101) + chr(8622 - 8523) + chr(111) + chr(0b1100100) + chr(4877 - 4776))(chr(0b11001 + 0o134) + chr(9119 - 9003) + '\x66' + chr(1408 - 1363) + '\070')] = M8_cKLkHVB2V(kJDRfRhcZHjS.reload_interval) if xafqLlk3kkUe(kJDRfRhcZHjS, xafqLlk3kkUe(SXOLrMavuUCe(b'\x12}'), chr(8777 - 8677) + '\145' + chr(99) + chr(0b1101111) + chr(100) + chr(101))(chr(0b110 + 0o157) + '\164' + chr(102) + chr(0b101101) + chr(56))): try: _JYBOC8gTStN = _7u55U49WwX2.compile(xafqLlk3kkUe(SXOLrMavuUCe(b'^1B\xe2\xe8\xf8\xf2\xcb\xd7T\xb34\x16\xe1\xca\x11\xe4?\xfd\x86\xa0(\xc2\x19\xa6\x8e\x87\x88h\xbb\x86'), chr(100) + chr(101) + '\x63' + chr(0b1101101 + 0o2) + chr(5966 - 5866) + chr(101))(chr(117) + chr(0b1110100) + '\x66' + chr(0b1000 + 0o45) + chr(56))) AZi1vqvu7T1_ = _7u55U49WwX2.match(_JYBOC8gTStN, kJDRfRhcZHjS.db_address) oqhJDdMJfuwx.rNK60KZ67nXB[xafqLlk3kkUe(SXOLrMavuUCe(b'7J<\x84\x9f\x9b\x9f\xac\xb8,\xdeQz\x8d\xbf}\xeaP\x9a\xe2\xcc'), chr(0b111011 + 0o51) + chr(2994 - 2893) + '\143' + chr(0b1101111) + '\144' + chr(9105 - 9004))(chr(0b1100110 + 0o17) + '\x74' + '\x66' + chr(0b101101) + '\070')] = AZi1vqvu7T1_.N9UnmYvaW1pO(ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(0b1101111) + chr(49), 0b1000)) oqhJDdMJfuwx.rNK60KZ67nXB[xafqLlk3kkUe(SXOLrMavuUCe(b'7J<\x84\x9f\x9b\x9f\xac\xb8,\xdeQz\x8d\xbfm\xf7R\x81'), chr(0b1010 + 0o132) + chr(7299 - 7198) + '\143' + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + '\164' + chr(0b1001011 + 0o33) + '\x2d' + '\070')] = AZi1vqvu7T1_.N9UnmYvaW1pO(ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(0b1101111) + chr(0b100011 + 0o17), 0b1000)) oqhJDdMJfuwx.rNK60KZ67nXB[xafqLlk3kkUe(SXOLrMavuUCe(b'7J<\x84\x9f\x9b\x9f\xac\xb8,\xdeQz\x8d\xbfh\xe5D\x80\xfb\xc6@\xae'), '\144' + '\145' + chr(6881 - 6782) + chr(0b1001111 + 0o40) + '\144' + chr(101))(chr(117) + chr(116) + chr(0b1100110) + chr(938 - 893) + chr(56))] = AZi1vqvu7T1_.N9UnmYvaW1pO(ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110011), 28598 - 28590)) oqhJDdMJfuwx.rNK60KZ67nXB[xafqLlk3kkUe(SXOLrMavuUCe(b'7J<\x84\x9f\x9b\x9f\xac\xb8,\xdeQz\x8d\xbfp\xebD\x87'), chr(100) + chr(4853 - 4752) + chr(5581 - 5482) + chr(0b1101111) + chr(0b1100100) + '\145')(chr(117) + chr(8703 - 8587) + chr(102) + '\x2d' + chr(56))] = AZi1vqvu7T1_.N9UnmYvaW1pO(ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(0b1101111) + chr(0b100 + 0o60), 21412 - 21404)) oqhJDdMJfuwx.rNK60KZ67nXB[xafqLlk3kkUe(SXOLrMavuUCe(b'7J<\x84\x9f\x9b\x9f\xac\xb8,\xdeQz\x8d\xbfh\xebE\x87'), chr(0b1100100) + chr(8247 - 8146) + '\143' + chr(111) + chr(0b1001110 + 0o26) + '\x65')(chr(117) + '\164' + chr(1113 - 1011) + '\x2d' + chr(0b11111 + 0o31))] = AZi1vqvu7T1_.N9UnmYvaW1pO(ehT0Px3KOsy9(chr(48) + chr(3861 - 3750) + '\x35', 0o10)) oqhJDdMJfuwx.rNK60KZ67nXB[xafqLlk3kkUe(SXOLrMavuUCe(b'7J<\x84\x9f\x9b\x9f\xac\xb8,\xdeQz\x8d\xbfv\xe5Z\x96'), chr(0b1100100) + chr(8380 - 8279) + chr(0b10100 + 0o117) + chr(0b1101111) + chr(0b1100100) + chr(6898 - 6797))('\x75' + chr(8376 - 8260) + chr(6166 - 6064) + chr(391 - 346) + '\x38')] = AZi1vqvu7T1_.N9UnmYvaW1pO(ehT0Px3KOsy9('\060' + '\157' + '\066', 0b1000)) xafqLlk3kkUe(hdK8qOUhR6Or, xafqLlk3kkUe(SXOLrMavuUCe(b'%( \xb3\xa7\xb4\xba\xd4\x93\x12\xc0e'), chr(6152 - 6052) + chr(0b1100101) + chr(4318 - 4219) + chr(0b1101111) + chr(5839 - 5739) + '\x65')('\x75' + chr(12875 - 12759) + chr(102) + '\055' + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'#l\x01\xa5\xb5\xf7\xf8\x90\xd9\x1f\xe9.J\xa7\x85\x18\xc0v\xa7\xcd\xebs\x99R\xac\xc5\xc9\xc3-\xf4\xc1.1'), '\x64' + '\x65' + chr(0b1100011) + chr(0b1101111) + chr(100) + '\145')('\x75' + '\x74' + chr(1858 - 1756) + chr(0b1 + 0o54) + chr(0b10000 + 0o50)) % xafqLlk3kkUe(AZi1vqvu7T1_, xafqLlk3kkUe(SXOLrMavuUCe(b'8&=\xa5\xbf\x8e\xab\x82\xaeO\xeaA'), '\x64' + '\x65' + chr(99) + chr(0b1101111) + chr(0b1100100) + chr(866 - 765))(chr(0b1001111 + 0o46) + '\164' + chr(102) + chr(979 - 934) + '\x38'))(ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(0b1101111) + chr(0b111 + 0o52), 8))) except ZVWAAMjVVHHl as GlnVAPeT6CUe: raise wMo9xmekcvjD(GlnVAPeT6CUe) else: xafqLlk3kkUe(hdK8qOUhR6Or, xafqLlk3kkUe(SXOLrMavuUCe(b'%( \xb3\xa7\xb4\xba\xd4\x93\x12\xc0e'), chr(100) + '\145' + '\143' + '\157' + chr(3298 - 3198) + chr(101))(chr(3142 - 3025) + chr(7967 - 7851) + chr(0b10000 + 0o126) + '\x2d' + chr(0b110 + 0o62)))(xafqLlk3kkUe(SXOLrMavuUCe(b'#l\x01\xa5\xb5\xf7\xae\x92\x95\x17\xeek\r\xef\x81K\x84c\xbb\xc9\xa9v\x8bC\xed\xc5\xc9\xd3#\xb1\xcd+|\xb5\x00\xc2\xd6\x19\xaf\xde\x18y\x07\xb9\xbf\xb6\xa9\x8a\x96\x10\xbayW\xa3\x8c\x18\xc6r\xf3\xdf\xfd}\x98R\xe8\x87\xc1\xcef\xf0\xda>p\xb3\t\xce\xddT\xfd\xd3X{\n'), chr(100) + '\x65' + chr(3429 - 3330) + chr(111) + chr(1011 - 911) + chr(101))(chr(0b1011 + 0o152) + chr(0b1010110 + 0o36) + chr(4074 - 3972) + chr(1069 - 1024) + chr(56))) xafqLlk3kkUe(oqhJDdMJfuwx.environ, xafqLlk3kkUe(SXOLrMavuUCe(b'\x05z\x1c\xaf\xb7\xb1\xbc\x96\x95\n'), chr(0b11 + 0o141) + chr(0b1100101) + '\x63' + chr(0b1101111) + chr(0b1100100) + '\x65')(chr(0b1110011 + 0o2) + chr(0b11010 + 0o132) + chr(0b1100110) + '\055' + chr(0b1 + 0o67)))(xafqLlk3kkUe(SXOLrMavuUCe(b'2U)\x85\x95\x98\x82\xb0\xbc*\xceGp\x88\xb3g\xe9X\x97\xf9\xc5W'), chr(100) + chr(0b1100101) + chr(0b1100011) + '\157' + chr(100) + chr(5473 - 5372))(chr(1258 - 1141) + '\164' + '\x66' + chr(0b101101) + chr(731 - 675)), xafqLlk3kkUe(SXOLrMavuUCe(b'\x04~\x11\xe5\xa6\xa2\xb3\x86\xd7\x1f\xefzQ\xa2\x8cZ\xcbv\xa1\xc8\xa7a\x8fC\xf8\xce\xc6\xc75'), '\x64' + chr(0b1100101) + '\x63' + '\157' + chr(100) + chr(0b10010 + 0o123))(chr(0b1011111 + 0o26) + chr(0b1110100) + chr(3369 - 3267) + chr(164 - 119) + chr(56))) xafqLlk3kkUe(ZX0xQhlJ6uSt, xafqLlk3kkUe(SXOLrMavuUCe(b'\x05z\x1c\xbe\xa2'), '\144' + chr(5047 - 4946) + '\143' + '\x6f' + '\144' + chr(0b11011 + 0o112))(chr(0b1110101) + chr(4929 - 4813) + chr(9143 - 9041) + '\x2d' + chr(56)))() CVh_Z3xeqjku = [oqhJDdMJfuwx.path._oWXztVNnqHF(WMh1_Swma6hS, xafqLlk3kkUe(SXOLrMavuUCe(b'\x1b~\x06\xaa\xb5\xb2\xf3\x93\x80'), chr(0b1100100) + '\145' + chr(99) + chr(6366 - 6255) + chr(100) + chr(0b1100101))('\165' + '\x74' + chr(0b1100110) + chr(0b10010 + 0o33) + chr(0b111000))), xafqLlk3kkUe(SXOLrMavuUCe(b'\x1bv\x0f\xb9\xb3\xa3\xb8'), chr(0b1100100) + chr(0b110000 + 0o65) + chr(8973 - 8874) + '\x6f' + chr(0b111100 + 0o50) + '\145')('\165' + '\164' + chr(0b1100110) + chr(0b11011 + 0o22) + '\070'), xafqLlk3kkUe(SXOLrMavuUCe(b'[2\x1a\xbe\xbc\xfa\xae\x9a\x97\x1d\xfel'), chr(0b1100100) + chr(101) + '\x63' + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(4660 - 4543) + chr(116) + chr(1209 - 1107) + chr(257 - 212) + chr(0b111000))] zmVCieiMjMBZ(CVh_Z3xeqjku)
ray-project/ray
python/ray/worker.py
get_gpu_ids
def get_gpu_ids(): """Get the IDs of the GPUs that are available to the worker. If the CUDA_VISIBLE_DEVICES environment variable was set when the worker started up, then the IDs returned by this method will be a subset of the IDs in CUDA_VISIBLE_DEVICES. If not, the IDs will fall in the range [0, NUM_GPUS - 1], where NUM_GPUS is the number of GPUs that the node has. Returns: A list of GPU IDs. """ if _mode() == LOCAL_MODE: raise Exception("ray.get_gpu_ids() currently does not work in PYTHON " "MODE.") all_resource_ids = global_worker.raylet_client.resource_ids() assigned_ids = [ resource_id for resource_id, _ in all_resource_ids.get("GPU", []) ] # If the user had already set CUDA_VISIBLE_DEVICES, then respect that (in # the sense that only GPU IDs that appear in CUDA_VISIBLE_DEVICES should be # returned). if global_worker.original_gpu_ids is not None: assigned_ids = [ global_worker.original_gpu_ids[gpu_id] for gpu_id in assigned_ids ] return assigned_ids
python
def get_gpu_ids(): """Get the IDs of the GPUs that are available to the worker. If the CUDA_VISIBLE_DEVICES environment variable was set when the worker started up, then the IDs returned by this method will be a subset of the IDs in CUDA_VISIBLE_DEVICES. If not, the IDs will fall in the range [0, NUM_GPUS - 1], where NUM_GPUS is the number of GPUs that the node has. Returns: A list of GPU IDs. """ if _mode() == LOCAL_MODE: raise Exception("ray.get_gpu_ids() currently does not work in PYTHON " "MODE.") all_resource_ids = global_worker.raylet_client.resource_ids() assigned_ids = [ resource_id for resource_id, _ in all_resource_ids.get("GPU", []) ] # If the user had already set CUDA_VISIBLE_DEVICES, then respect that (in # the sense that only GPU IDs that appear in CUDA_VISIBLE_DEVICES should be # returned). if global_worker.original_gpu_ids is not None: assigned_ids = [ global_worker.original_gpu_ids[gpu_id] for gpu_id in assigned_ids ] return assigned_ids
[ "def", "get_gpu_ids", "(", ")", ":", "if", "_mode", "(", ")", "==", "LOCAL_MODE", ":", "raise", "Exception", "(", "\"ray.get_gpu_ids() currently does not work in PYTHON \"", "\"MODE.\"", ")", "all_resource_ids", "=", "global_worker", ".", "raylet_client", ".", "resource_ids", "(", ")", "assigned_ids", "=", "[", "resource_id", "for", "resource_id", ",", "_", "in", "all_resource_ids", ".", "get", "(", "\"GPU\"", ",", "[", "]", ")", "]", "# If the user had already set CUDA_VISIBLE_DEVICES, then respect that (in", "# the sense that only GPU IDs that appear in CUDA_VISIBLE_DEVICES should be", "# returned).", "if", "global_worker", ".", "original_gpu_ids", "is", "not", "None", ":", "assigned_ids", "=", "[", "global_worker", ".", "original_gpu_ids", "[", "gpu_id", "]", "for", "gpu_id", "in", "assigned_ids", "]", "return", "assigned_ids" ]
Get the IDs of the GPUs that are available to the worker. If the CUDA_VISIBLE_DEVICES environment variable was set when the worker started up, then the IDs returned by this method will be a subset of the IDs in CUDA_VISIBLE_DEVICES. If not, the IDs will fall in the range [0, NUM_GPUS - 1], where NUM_GPUS is the number of GPUs that the node has. Returns: A list of GPU IDs.
[ "Get", "the", "IDs", "of", "the", "GPUs", "that", "are", "available", "to", "the", "worker", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/worker.py#L1042-L1069
train
Get the GPU IDs that are available to the worker.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6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px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(959 - 909) + '\062' + '\060', 45493 - 45485), ehT0Px3KOsy9(chr(48) + '\157' + '\062' + chr(51) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(10896 - 10785) + '\063' + chr(2821 - 2767) + '\067', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110010) + chr(0b100111 + 0o12) + chr(52), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\061' + chr(54) + chr(50), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(940 - 890) + '\061' + chr(1529 - 1479), ord("\x08")), ehT0Px3KOsy9('\060' + chr(11132 - 11021) + '\062' + '\061' + chr(0b110001), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1001011 + 0o44) + '\x32' + chr(0b10110 + 0o40) + '\x33', 36461 - 36453), ehT0Px3KOsy9(chr(48) + chr(0b1000100 + 0o53) + '\x33' + chr(0b100100 + 0o22) + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(316 - 268) + '\157' + '\062' + chr(0b110110) + chr(0b110100), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\063' + '\067' + chr(0b1 + 0o62), 65067 - 65059), ehT0Px3KOsy9('\x30' + '\157' + '\x32' + '\065' + '\067', 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110100), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110 + 0o53) + chr(0b10000 + 0o41) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110001) + chr(48) + chr(0b101100 + 0o11), 28933 - 28925), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(49) + chr(1133 - 1084) + '\064', 41405 - 41397), ehT0Px3KOsy9(chr(0b11011 + 0o25) + '\157' + chr(50) + chr(55) + chr(0b110101), 18341 - 18333), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x37' + chr(0b10101 + 0o37), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1001111 + 0o40) + chr(0b110011) + '\x37' + '\065', ord("\x08")), ehT0Px3KOsy9(chr(0b111 + 0o51) + '\x6f' + chr(0b11001 + 0o33) + '\x34', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1293 - 1243) + '\x34' + chr(49), 0o10), ehT0Px3KOsy9(chr(48) + chr(11022 - 10911) + chr(49) + chr(0b110110) + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(929 - 880) + chr(0b10100 + 0o35) + chr(52), 8), ehT0Px3KOsy9(chr(48) + chr(8096 - 7985) + chr(51) + '\062', 13091 - 13083), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b10101 + 0o34) + chr(0b110101) + chr(1220 - 1170), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b10110 + 0o131) + chr(0b1101 + 0o45) + '\060' + chr(0b100 + 0o62), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + '\061' + chr(0b1100 + 0o50) + chr(0b1101 + 0o46), 42914 - 42906), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b101000 + 0o11) + chr(0b110110) + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(917 - 869) + '\x6f' + chr(49) + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(1391 - 1343) + chr(0b1101111) + chr(2315 - 2266) + chr(55) + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(0b101 + 0o53) + '\157' + chr(2312 - 2263) + '\063', 16928 - 16920), ehT0Px3KOsy9(chr(48) + chr(111) + '\x33' + '\062' + chr(0b110101 + 0o1), 0o10), ehT0Px3KOsy9(chr(1091 - 1043) + chr(0b1000001 + 0o56) + chr(51) + chr(1192 - 1142) + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(1952 - 1904) + chr(0b1101111) + '\x32' + chr(0b110100) + chr(54), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\061' + chr(526 - 477) + chr(60 - 6), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\061' + chr(0b110110) + chr(391 - 337), 8), ehT0Px3KOsy9(chr(48) + chr(0b1101101 + 0o2) + '\064', 8), ehT0Px3KOsy9(chr(48) + chr(0b110110 + 0o71) + chr(0b10100 + 0o35) + chr(0b1100 + 0o47) + '\066', 0o10), ehT0Px3KOsy9('\x30' + chr(9783 - 9672) + chr(0b110010) + chr(51) + '\061', 0o10), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(7897 - 7786) + chr(2340 - 2290) + chr(50) + chr(52), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(0b1101111) + chr(53) + chr(0b110000), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xbe'), chr(5396 - 5296) + chr(0b1100101) + '\x63' + chr(0b1101111) + chr(0b101100 + 0o70) + '\x65')('\165' + chr(6783 - 6667) + chr(0b1100110) + chr(45) + chr(2306 - 2250)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def VHMldSgJauTL(): if TuvGINXTrIij() == vegegFjq4lAA: raise jLmadlzMdunT(xafqLlk3kkUe(SXOLrMavuUCe(b'\xe2\xfd\x8e\xa2\x15\xef\xfd\xec\x95\xc4\x8e\xf0m-6d\x94\x1c\x9eQ\xd3\x04)t\x1e\xea\x1aQn\x11n\xa5\xf1\xc8!\x02$)\xf6\xe6\xfb\xbc\x9e\xe2R\xda\xd0\xe7\xba\xfb\xb5\x8fI\x06\x01\t\x93'), chr(100) + '\x65' + '\x63' + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))('\x75' + '\x74' + '\x66' + chr(678 - 633) + chr(968 - 912))) kx9GcfZK5z_w = Fn_g0gvMIHCm.raylet_client.resource_ids() ng2Z21AQaxQU = [NSHLmvZ3rELK for (NSHLmvZ3rELK, VNGQdHSFPrso) in kx9GcfZK5z_w.get(xafqLlk3kkUe(SXOLrMavuUCe(b'\xd7\xcc\xa2'), '\x64' + '\x65' + chr(8938 - 8839) + '\157' + chr(0b1001000 + 0o34) + '\145')(chr(0b1000 + 0o155) + chr(0b10001 + 0o143) + chr(102) + chr(134 - 89) + chr(0b111000)), [])] if xafqLlk3kkUe(Fn_g0gvMIHCm, xafqLlk3kkUe(SXOLrMavuUCe(b'\xff\xee\x9e\xeb\x1b\xe4\xe8\xdf\xad\xd3\x8b\xda[ !?'), chr(2427 - 2327) + chr(0b1000011 + 0o42) + chr(99) + '\157' + chr(0b1100100) + chr(10201 - 10100))(chr(0b1100010 + 0o23) + chr(0b111111 + 0o65) + '\x66' + chr(45) + '\070')) is not None: ng2Z21AQaxQU = [Fn_g0gvMIHCm.original_gpu_ids[zi7tvpcAQk_H] for zi7tvpcAQk_H in ng2Z21AQaxQU] return ng2Z21AQaxQU
ray-project/ray
python/ray/worker.py
error_info
def error_info(): """Return information about failed tasks.""" worker = global_worker worker.check_connected() return (global_state.error_messages(driver_id=worker.task_driver_id) + global_state.error_messages(driver_id=DriverID.nil()))
python
def error_info(): """Return information about failed tasks.""" worker = global_worker worker.check_connected() return (global_state.error_messages(driver_id=worker.task_driver_id) + global_state.error_messages(driver_id=DriverID.nil()))
[ "def", "error_info", "(", ")", ":", "worker", "=", "global_worker", "worker", ".", "check_connected", "(", ")", "return", "(", "global_state", ".", "error_messages", "(", "driver_id", "=", "worker", ".", "task_driver_id", ")", "+", "global_state", ".", "error_messages", "(", "driver_id", "=", "DriverID", ".", "nil", "(", ")", ")", ")" ]
Return information about failed tasks.
[ "Return", "information", "about", "failed", "tasks", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/worker.py#L1134-L1139
train
Return information about failed tasks.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OT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4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(1878 - 1830) + chr(0b1101111) + '\062' + chr(0b110010 + 0o4) + chr(733 - 679), 0o10), ehT0Px3KOsy9(chr(0b111 + 0o51) + '\x6f' + chr(911 - 862) + chr(0b110010) + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(1574 - 1526) + '\x6f' + chr(49) + chr(1495 - 1442) + chr(50), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\062' + '\065' + chr(50), 15167 - 15159), ehT0Px3KOsy9(chr(48) + chr(0b10110 + 0o131) + '\063' + chr(164 - 114) + '\x35', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(0b110011) + '\x32' + chr(53), 8), ehT0Px3KOsy9(chr(1342 - 1294) + chr(8768 - 8657) + chr(0b1010 + 0o50) + '\x31' + '\060', 0o10), ehT0Px3KOsy9('\060' + chr(0b1 + 0o156) + chr(0b110010) + chr(0b110101) + chr(53), 29123 - 29115), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\063' + chr(0b110010) + chr(1300 - 1252), 54317 - 54309), ehT0Px3KOsy9(chr(914 - 866) + '\157' + chr(0b110010) + chr(0b100111 + 0o15) + chr(48), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(988 - 938) + chr(0b110100) + '\067', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011101 + 0o22) + chr(1678 - 1629) + chr(51) + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1001010 + 0o45) + chr(0b1010 + 0o50) + chr(0b10111 + 0o36) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(1792 - 1744) + chr(111) + chr(519 - 468) + chr(0b110010), 40551 - 40543), ehT0Px3KOsy9(chr(922 - 874) + chr(0b1100010 + 0o15) + chr(53) + chr(0b101 + 0o60), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(50) + '\060', 10792 - 10784), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000111 + 0o50) + chr(2404 - 2353) + chr(1033 - 979) + chr(0b11001 + 0o33), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b10010 + 0o37) + chr(758 - 708), 18257 - 18249), ehT0Px3KOsy9(chr(968 - 920) + chr(0b1010010 + 0o35) + '\x33' + '\x37' + chr(0b11101 + 0o31), 33202 - 33194), ehT0Px3KOsy9('\060' + '\157' + chr(260 - 211) + '\060' + chr(53), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(0b1010 + 0o50) + '\x34' + chr(49), 26406 - 26398), ehT0Px3KOsy9(chr(1766 - 1718) + chr(3201 - 3090) + chr(49) + chr(0b11001 + 0o36) + chr(0b11001 + 0o33), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110 + 0o57) + '\066', 0b1000), ehT0Px3KOsy9(chr(0b100 + 0o54) + '\157' + chr(905 - 855) + chr(0b110001) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b11100 + 0o25) + '\x36' + '\062', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b100000 + 0o117) + chr(0b110011) + chr(0b11111 + 0o22) + chr(961 - 912), 11044 - 11036), ehT0Px3KOsy9('\x30' + '\157' + '\062' + '\064' + chr(52), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x32' + '\061', 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b101010 + 0o13) + '\063', 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b1101 + 0o47) + chr(53), 21097 - 21089), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(0b1101111) + chr(2077 - 2028) + '\x31' + chr(0b1 + 0o57), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b11 + 0o60) + '\x30', 63844 - 63836), ehT0Px3KOsy9('\x30' + chr(7398 - 7287) + '\x31' + '\063' + '\064', 0o10), ehT0Px3KOsy9(chr(2070 - 2022) + chr(111) + chr(49) + '\x35', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\061' + '\063' + '\065', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b100100 + 0o15) + '\x37' + chr(49), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(51) + '\062' + '\066', 0o10), ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(6274 - 6163) + chr(0b11101 + 0o31) + '\064', 0b1000), ehT0Px3KOsy9(chr(0b100001 + 0o17) + chr(8145 - 8034) + chr(0b100001 + 0o20) + '\064', 3460 - 3452), ehT0Px3KOsy9(chr(0b10111 + 0o31) + chr(0b1101111) + chr(1334 - 1285) + '\x31' + chr(50), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + '\157' + chr(752 - 699) + chr(0b110000), 13748 - 13740)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x98'), chr(100) + '\x65' + chr(0b1000111 + 0o34) + chr(111) + chr(0b1010101 + 0o17) + '\x65')(chr(0b111110 + 0o67) + chr(3303 - 3187) + chr(102) + '\055' + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def UCtCMsNxvnaI(): sijXcSaDomT1 = Fn_g0gvMIHCm xafqLlk3kkUe(sijXcSaDomT1, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd5?\x0f\xc9\xbe\x8a\xeb\xc2\xbe\xce\xc28\xda\x7fI'), '\144' + chr(0b1100101) + chr(0b1100011) + chr(0b101100 + 0o103) + '\x64' + chr(0b1000001 + 0o44))(chr(2695 - 2578) + chr(116) + chr(0b1100001 + 0o5) + chr(0b1001 + 0o44) + chr(1229 - 1173)))() return xafqLlk3kkUe(wLpAFVq6NX6z, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd3%\x18\xc5\xa7\x8a\xe5\xc8\xa3\xd3\xc6<\xcbi'), chr(0b100000 + 0o104) + '\145' + chr(0b110101 + 0o56) + chr(2012 - 1901) + '\144' + chr(0b1010 + 0o133))(chr(5062 - 4945) + '\x74' + chr(0b11100 + 0o112) + chr(45) + chr(1391 - 1335)))(driver_id=xafqLlk3kkUe(sijXcSaDomT1, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc26\x19\xc1\x8a\xb1\xfa\xc4\xa6\xc5\xd5\x04\xc7~'), chr(100) + '\145' + chr(0b11000 + 0o113) + chr(0b1101111) + chr(100) + chr(0b1100101))(chr(0b10101 + 0o140) + chr(116) + '\146' + chr(1390 - 1345) + chr(56)))) + xafqLlk3kkUe(wLpAFVq6NX6z, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd3%\x18\xc5\xa7\x8a\xe5\xc8\xa3\xd3\xc6<\xcbi'), chr(0b1100100) + chr(101) + chr(0b101010 + 0o71) + chr(0b1101111) + chr(4643 - 4543) + '\x65')(chr(7435 - 7318) + chr(1402 - 1286) + chr(0b110110 + 0o60) + '\055' + chr(56)))(driver_id=xafqLlk3kkUe(bAkkLgl6Zv7t, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd8>\x06'), chr(0b1001110 + 0o26) + '\x65' + '\x63' + chr(0b1010110 + 0o31) + '\x64' + chr(101))(chr(0b1110100 + 0o1) + chr(116) + chr(0b1010100 + 0o22) + '\x2d' + chr(760 - 704)))())
ray-project/ray
python/ray/worker.py
_initialize_serialization
def _initialize_serialization(driver_id, worker=global_worker): """Initialize the serialization library. This defines a custom serializer for object IDs and also tells ray to serialize several exception classes that we define for error handling. """ serialization_context = pyarrow.default_serialization_context() # Tell the serialization context to use the cloudpickle version that we # ship with Ray. serialization_context.set_pickle(pickle.dumps, pickle.loads) pyarrow.register_torch_serialization_handlers(serialization_context) for id_type in ray._raylet._ID_TYPES: serialization_context.register_type( id_type, "{}.{}".format(id_type.__module__, id_type.__name__), pickle=True) def actor_handle_serializer(obj): return obj._serialization_helper(True) def actor_handle_deserializer(serialized_obj): new_handle = ray.actor.ActorHandle.__new__(ray.actor.ActorHandle) new_handle._deserialization_helper(serialized_obj, True) return new_handle # We register this serializer on each worker instead of calling # register_custom_serializer from the driver so that isinstance still # works. serialization_context.register_type( ray.actor.ActorHandle, "ray.ActorHandle", pickle=False, custom_serializer=actor_handle_serializer, custom_deserializer=actor_handle_deserializer) worker.serialization_context_map[driver_id] = serialization_context # Register exception types. for error_cls in RAY_EXCEPTION_TYPES: register_custom_serializer( error_cls, use_dict=True, local=True, driver_id=driver_id, class_id=error_cls.__module__ + ". " + error_cls.__name__, ) # Tell Ray to serialize lambdas with pickle. register_custom_serializer( type(lambda: 0), use_pickle=True, local=True, driver_id=driver_id, class_id="lambda") # Tell Ray to serialize types with pickle. register_custom_serializer( type(int), use_pickle=True, local=True, driver_id=driver_id, class_id="type") # Tell Ray to serialize FunctionSignatures as dictionaries. This is # used when passing around actor handles. register_custom_serializer( ray.signature.FunctionSignature, use_dict=True, local=True, driver_id=driver_id, class_id="ray.signature.FunctionSignature")
python
def _initialize_serialization(driver_id, worker=global_worker): """Initialize the serialization library. This defines a custom serializer for object IDs and also tells ray to serialize several exception classes that we define for error handling. """ serialization_context = pyarrow.default_serialization_context() # Tell the serialization context to use the cloudpickle version that we # ship with Ray. serialization_context.set_pickle(pickle.dumps, pickle.loads) pyarrow.register_torch_serialization_handlers(serialization_context) for id_type in ray._raylet._ID_TYPES: serialization_context.register_type( id_type, "{}.{}".format(id_type.__module__, id_type.__name__), pickle=True) def actor_handle_serializer(obj): return obj._serialization_helper(True) def actor_handle_deserializer(serialized_obj): new_handle = ray.actor.ActorHandle.__new__(ray.actor.ActorHandle) new_handle._deserialization_helper(serialized_obj, True) return new_handle # We register this serializer on each worker instead of calling # register_custom_serializer from the driver so that isinstance still # works. serialization_context.register_type( ray.actor.ActorHandle, "ray.ActorHandle", pickle=False, custom_serializer=actor_handle_serializer, custom_deserializer=actor_handle_deserializer) worker.serialization_context_map[driver_id] = serialization_context # Register exception types. for error_cls in RAY_EXCEPTION_TYPES: register_custom_serializer( error_cls, use_dict=True, local=True, driver_id=driver_id, class_id=error_cls.__module__ + ". " + error_cls.__name__, ) # Tell Ray to serialize lambdas with pickle. register_custom_serializer( type(lambda: 0), use_pickle=True, local=True, driver_id=driver_id, class_id="lambda") # Tell Ray to serialize types with pickle. register_custom_serializer( type(int), use_pickle=True, local=True, driver_id=driver_id, class_id="type") # Tell Ray to serialize FunctionSignatures as dictionaries. This is # used when passing around actor handles. register_custom_serializer( ray.signature.FunctionSignature, use_dict=True, local=True, driver_id=driver_id, class_id="ray.signature.FunctionSignature")
[ "def", "_initialize_serialization", "(", "driver_id", ",", "worker", "=", "global_worker", ")", ":", "serialization_context", "=", "pyarrow", ".", "default_serialization_context", "(", ")", "# Tell the serialization context to use the cloudpickle version that we", "# ship with Ray.", "serialization_context", ".", "set_pickle", "(", "pickle", ".", "dumps", ",", "pickle", ".", "loads", ")", "pyarrow", ".", "register_torch_serialization_handlers", "(", "serialization_context", ")", "for", "id_type", "in", "ray", ".", "_raylet", ".", "_ID_TYPES", ":", "serialization_context", ".", "register_type", "(", "id_type", ",", "\"{}.{}\"", ".", "format", "(", "id_type", ".", "__module__", ",", "id_type", ".", "__name__", ")", ",", "pickle", "=", "True", ")", "def", "actor_handle_serializer", "(", "obj", ")", ":", "return", "obj", ".", "_serialization_helper", "(", "True", ")", "def", "actor_handle_deserializer", "(", "serialized_obj", ")", ":", "new_handle", "=", "ray", ".", "actor", ".", "ActorHandle", ".", "__new__", "(", "ray", ".", "actor", ".", "ActorHandle", ")", "new_handle", ".", "_deserialization_helper", "(", "serialized_obj", ",", "True", ")", "return", "new_handle", "# We register this serializer on each worker instead of calling", "# register_custom_serializer from the driver so that isinstance still", "# works.", "serialization_context", ".", "register_type", "(", "ray", ".", "actor", ".", "ActorHandle", ",", "\"ray.ActorHandle\"", ",", "pickle", "=", "False", ",", "custom_serializer", "=", "actor_handle_serializer", ",", "custom_deserializer", "=", "actor_handle_deserializer", ")", "worker", ".", "serialization_context_map", "[", "driver_id", "]", "=", "serialization_context", "# Register exception types.", "for", "error_cls", "in", "RAY_EXCEPTION_TYPES", ":", "register_custom_serializer", "(", "error_cls", ",", "use_dict", "=", "True", ",", "local", "=", "True", ",", "driver_id", "=", "driver_id", ",", "class_id", "=", "error_cls", ".", "__module__", "+", "\". \"", "+", "error_cls", ".", "__name__", ",", ")", "# Tell Ray to serialize lambdas with pickle.", "register_custom_serializer", "(", "type", "(", "lambda", ":", "0", ")", ",", "use_pickle", "=", "True", ",", "local", "=", "True", ",", "driver_id", "=", "driver_id", ",", "class_id", "=", "\"lambda\"", ")", "# Tell Ray to serialize types with pickle.", "register_custom_serializer", "(", "type", "(", "int", ")", ",", "use_pickle", "=", "True", ",", "local", "=", "True", ",", "driver_id", "=", "driver_id", ",", "class_id", "=", "\"type\"", ")", "# Tell Ray to serialize FunctionSignatures as dictionaries. This is", "# used when passing around actor handles.", "register_custom_serializer", "(", "ray", ".", "signature", ".", "FunctionSignature", ",", "use_dict", "=", "True", ",", "local", "=", "True", ",", "driver_id", "=", "driver_id", ",", "class_id", "=", "\"ray.signature.FunctionSignature\"", ")" ]
Initialize the serialization library. This defines a custom serializer for object IDs and also tells ray to serialize several exception classes that we define for error handling.
[ "Initialize", "the", "serialization", "library", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/worker.py#L1142-L1210
train
Initialize the internal serialization library.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPvpP4xdo3,cW7yQuyEnJ6E,KOHQGQ8qLDWm,NE1Yam2HHroQ,ygAzbDzrvRMh,SBRjvOU1ufVC,h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_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + '\157' + chr(51) + chr(733 - 678) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(2008 - 1960) + chr(111) + chr(2446 - 2395) + chr(55) + chr(2354 - 2300), 56349 - 56341), ehT0Px3KOsy9(chr(950 - 902) + chr(0b110011 + 0o74) + chr(2234 - 2185) + '\x34' + chr(0b101 + 0o62), 0b1000), ehT0Px3KOsy9(chr(601 - 553) + chr(0b1101110 + 0o1) + chr(268 - 218) + '\061' + chr(0b101101 + 0o10), 9001 - 8993), ehT0Px3KOsy9('\060' + chr(111) + chr(1875 - 1826) + '\x34' + chr(0b110000), 45387 - 45379), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(111) + '\x37', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(50) + chr(54), 26673 - 26665), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b11010 + 0o27) + chr(50) + chr(1432 - 1383), 51002 - 50994), ehT0Px3KOsy9('\060' + '\157' + chr(0b10101 + 0o34), 0b1000), ehT0Px3KOsy9(chr(0b101100 + 0o4) + chr(0b1101111) + '\063' + '\x33' + chr(0b101 + 0o56), 0o10), ehT0Px3KOsy9(chr(1203 - 1155) + '\x6f' + chr(1165 - 1115) + '\x31' + '\x30', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(664 - 615) + chr(50) + chr(0b110100 + 0o3), 47925 - 47917), ehT0Px3KOsy9('\x30' + chr(111) + '\062' + chr(2225 - 2175) + chr(0b10110 + 0o34), 38544 - 38536), ehT0Px3KOsy9('\060' + '\x6f' + '\062' + '\064' + chr(90 - 41), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1000111 + 0o50) + chr(0b100110 + 0o13) + chr(52) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(0b101100 + 0o4) + chr(405 - 294) + chr(0b1 + 0o60) + '\067' + chr(0b10010 + 0o40), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110010) + '\066' + chr(1826 - 1778), ord("\x08")), ehT0Px3KOsy9('\060' + chr(10802 - 10691) + '\x32' + chr(1832 - 1779) + '\x33', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b11100 + 0o25) + chr(52) + chr(55), 8), ehT0Px3KOsy9('\060' + chr(111) + chr(49) + '\x32' + '\065', 0o10), ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(111) + '\063' + chr(48) + chr(49), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110 + 0o55) + chr(0b11 + 0o57) + chr(661 - 611), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1000111 + 0o50) + chr(0b110001) + '\062' + '\x37', 8), ehT0Px3KOsy9(chr(1933 - 1885) + '\x6f' + chr(0b101010 + 0o12) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\063' + chr(0b11110 + 0o25) + '\064', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x35' + chr(1281 - 1227), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b11000 + 0o37) + chr(53), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(3214 - 3103) + chr(54) + chr(54), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x37' + '\x32', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110 + 0o55) + chr(0b11000 + 0o33) + chr(628 - 580), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x33' + chr(52) + chr(52), 29662 - 29654), ehT0Px3KOsy9('\x30' + chr(6894 - 6783) + chr(0b1101 + 0o45) + '\x31' + '\x37', 17850 - 17842), ehT0Px3KOsy9(chr(610 - 562) + chr(3654 - 3543) + chr(51) + chr(0b110100) + chr(48), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + '\063' + '\064', ord("\x08")), ehT0Px3KOsy9(chr(1230 - 1182) + '\157' + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110001) + chr(0b110000) + chr(2559 - 2507), 30970 - 30962), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x31' + chr(0b110100) + chr(0b101000 + 0o13), 310 - 302), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\063' + '\x33' + '\x31', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b10010 + 0o37) + '\060' + chr(0b10011 + 0o41), 8), ehT0Px3KOsy9(chr(2266 - 2218) + chr(0b1101111) + '\062' + chr(53) + '\062', 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b1011 + 0o52) + chr(0b110000), 35654 - 35646)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xd2'), '\x64' + chr(0b1100101) + '\143' + chr(0b0 + 0o157) + chr(100) + '\x65')(chr(0b10011 + 0o142) + chr(0b1110100) + '\146' + '\x2d' + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def TkNAcBi6q63b(xrb3JXGvKq_I, sijXcSaDomT1=Fn_g0gvMIHCm): _bqQfnqZP_Lp = ltmjOVlVue2G.default_serialization_context() xafqLlk3kkUe(_bqQfnqZP_Lp, xafqLlk3kkUe(SXOLrMavuUCe(b'\x8f\x9b\x13\xd2\x10nu:m\xbe'), '\x64' + chr(10015 - 9914) + '\x63' + chr(0b1100100 + 0o13) + chr(0b1100010 + 0o2) + chr(101))(chr(0b1110101) + chr(1533 - 1417) + chr(0b1100110) + chr(953 - 908) + chr(1210 - 1154)))(xafqLlk3kkUe(b1Ng5DsPF9ZY, xafqLlk3kkUe(SXOLrMavuUCe(b'\x98\x8b\n\xfd\x13'), chr(100) + '\x65' + chr(0b1100011) + chr(10682 - 10571) + '\144' + '\x65')(chr(0b1110101) + chr(116) + chr(7273 - 7171) + chr(0b101101) + '\x38')), xafqLlk3kkUe(b1Ng5DsPF9ZY, xafqLlk3kkUe(SXOLrMavuUCe(b'\x90\x91\x06\xe9\x13'), chr(100) + chr(0b1100101) + chr(99) + chr(7036 - 6925) + '\144' + '\x65')(chr(117) + chr(116) + chr(102) + chr(0b11000 + 0o25) + chr(56)))) xafqLlk3kkUe(ltmjOVlVue2G, xafqLlk3kkUe(SXOLrMavuUCe(b'\x8e\x9b\x00\xe4\x13ss#^\xaf\xe7%\xf1\xc99\t\xd5\xd9\x0e4\xad\xbb-F\xa8GRXe\xb0\x85\xe1\x84pc6\x10'), chr(100) + chr(0b1100101) + chr(0b100111 + 0o74) + '\x6f' + '\x64' + '\x65')(chr(1149 - 1032) + chr(0b110110 + 0o76) + chr(102) + chr(0b101101) + chr(0b111000)))(_bqQfnqZP_Lp) for RpDcYTn6ck2s in xafqLlk3kkUe(H9zaXRrGK6Cq._raylet, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa3\xb7#\xd24^F\x14R'), '\144' + chr(7694 - 7593) + chr(0b1100011) + chr(111) + chr(4786 - 4686) + chr(0b1010000 + 0o25))(chr(0b1110101) + chr(0b1110100) + '\x66' + chr(45) + '\x38')): xafqLlk3kkUe(_bqQfnqZP_Lp, xafqLlk3kkUe(SXOLrMavuUCe(b"\x8e\x9b\x00\xe4\x13ss#^\xaf\xf1'\xf7"), chr(4874 - 4774) + chr(101) + chr(99) + '\x6f' + chr(9090 - 8990) + chr(0b1100101))(chr(0b1110101) + chr(0b1001 + 0o153) + chr(102) + chr(45) + chr(382 - 326)))(RpDcYTn6ck2s, xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b'\x87\x83I\xf6\x1d'), '\144' + chr(4852 - 4751) + '\143' + chr(111) + '\x64' + '\145')(chr(0b11011 + 0o132) + '\164' + '\146' + '\x2d' + '\x38'), xafqLlk3kkUe(SXOLrMavuUCe(b'\xaa\xca\x15\xe2(fEbQ\xab\xed='), '\x64' + '\145' + '\143' + chr(11123 - 11012) + chr(0b101000 + 0o74) + '\x65')(chr(0b10001 + 0o144) + chr(0b101100 + 0o110) + chr(0b1100110) + chr(0b101101) + chr(1822 - 1766)))(xafqLlk3kkUe(RpDcYTn6ck2s, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5\xba-\xba\x16Wf\x1bg\xb4\xb9\x12'), '\x64' + chr(1423 - 1322) + '\143' + chr(0b1101111) + chr(0b1011001 + 0o13) + '\145')(chr(2785 - 2668) + chr(0b1011000 + 0o34) + chr(0b1100000 + 0o6) + '\x2d' + chr(2551 - 2495))), xafqLlk3kkUe(RpDcYTn6ck2s, xafqLlk3kkUe(SXOLrMavuUCe(b'\xbb\x9c\x02\xe7ThL J\x97\xc9a'), chr(0b1100100) + chr(0b1011110 + 0o7) + '\x63' + chr(9086 - 8975) + chr(100) + '\x65')('\x75' + chr(7658 - 7542) + '\146' + chr(1902 - 1857) + chr(56)))), pickle=ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110001), 8)) def sTnCVeiLmZQU(mDuDykdz0pcm): return xafqLlk3kkUe(mDuDykdz0pcm, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa3\x8d\x02\xff\tfz8{\xba\xfc>\xfd\xcf9\x12\xd5\xc7\x170\xb3'), chr(324 - 224) + chr(101) + '\x63' + chr(1550 - 1439) + chr(8071 - 7971) + chr(0b100111 + 0o76))('\165' + chr(0b1110100) + '\x66' + '\x2d' + chr(447 - 391)))(ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(7249 - 7138) + '\061', 8)) def BwJXdOI6tw0P(cSyCJt5b6b5m): v1k2Q623NO8f = H9zaXRrGK6Cq.actor.ActorHandle.c6dlduv8kHnJ(H9zaXRrGK6Cq.actor.ActorHandle) xafqLlk3kkUe(v1k2Q623NO8f, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa3\x9a\x02\xfe\x05u\x7f0m\xb2\xf26\xe6\xc8\t\x14\xef\xc3\x029\xb1\xb7%'), '\x64' + chr(0b10001 + 0o124) + chr(0b1011010 + 0o11) + '\x6f' + '\144' + '\145')(chr(0b1011110 + 0o27) + '\x74' + chr(8278 - 8176) + chr(0b10000 + 0o35) + chr(0b111000)))(cSyCJt5b6b5m, ehT0Px3KOsy9(chr(48) + chr(5059 - 4948) + '\061', 8)) return v1k2Q623NO8f xafqLlk3kkUe(_bqQfnqZP_Lp, xafqLlk3kkUe(SXOLrMavuUCe(b"\x8e\x9b\x00\xe4\x13ss#^\xaf\xf1'\xf7"), '\144' + chr(101) + chr(99) + chr(3114 - 3003) + chr(0b1100100) + chr(101))('\x75' + chr(0b101110 + 0o106) + chr(102) + chr(45) + chr(0b111000)))(xafqLlk3kkUe(H9zaXRrGK6Cq.actor, xafqLlk3kkUe(SXOLrMavuUCe(b'\xbd\x9d\x13\xe2\x12Ow?e\xb7\xed'), chr(0b110 + 0o136) + chr(101) + chr(7473 - 7374) + '\157' + chr(0b1100100) + chr(101))('\165' + chr(0b101011 + 0o111) + '\x66' + chr(818 - 773) + '\070')), xafqLlk3kkUe(SXOLrMavuUCe(b'\x8e\x9f\x1e\xa3!db>s\x93\xe99\xf6\xcd\x03'), chr(0b1011010 + 0o12) + chr(9643 - 9542) + chr(99) + chr(111) + chr(4803 - 4703) + chr(0b1110 + 0o127))(chr(0b1110101) + '\164' + chr(0b100100 + 0o102) + chr(0b101001 + 0o4) + chr(0b10110 + 0o42)), pickle=ehT0Px3KOsy9(chr(0b10011 + 0o35) + '\157' + chr(48), 0o10), custom_serializer=sTnCVeiLmZQU, custom_deserializer=BwJXdOI6tw0P) sijXcSaDomT1.mD8q7rzd3rWa[xrb3JXGvKq_I] = _bqQfnqZP_Lp for TElUq0qFDyOT in dFJQzphoWMjl: mCiUIaeXcvtr(TElUq0qFDyOT, use_dict=ehT0Px3KOsy9('\x30' + '\157' + '\061', 8), local=ehT0Px3KOsy9(chr(48) + '\157' + '\061', 8), driver_id=xrb3JXGvKq_I, class_id=xafqLlk3kkUe(TElUq0qFDyOT, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5\xba-\xba\x16Wf\x1bg\xb4\xb9\x12'), chr(0b11 + 0o141) + '\x65' + chr(99) + chr(0b100111 + 0o110) + chr(0b1100100) + '\x65')(chr(117) + chr(116) + chr(0b1100110) + chr(0b101101) + chr(0b100101 + 0o23))) + xafqLlk3kkUe(SXOLrMavuUCe(b'\xd2\xde'), chr(0b1100100) + chr(3459 - 3358) + chr(2920 - 2821) + chr(7743 - 7632) + chr(0b1100100) + '\x65')(chr(1304 - 1187) + chr(2417 - 2301) + chr(102) + '\x2d' + '\070') + xafqLlk3kkUe(TElUq0qFDyOT, xafqLlk3kkUe(SXOLrMavuUCe(b'\xbb\x9c\x02\xe7ThL J\x97\xc9a'), chr(100) + '\x65' + chr(0b1100011) + '\x6f' + chr(0b1101 + 0o127) + '\145')('\x75' + '\164' + chr(3660 - 3558) + chr(1211 - 1166) + chr(0b11101 + 0o33)))) mCiUIaeXcvtr(wmQmyeWBmUpv(lambda : ehT0Px3KOsy9('\x30' + '\157' + '\060', 8)), use_pickle=ehT0Px3KOsy9(chr(48) + chr(0b1011010 + 0o25) + chr(0b10001 + 0o40), 8), local=ehT0Px3KOsy9('\060' + '\157' + chr(0b110001), 8), driver_id=xrb3JXGvKq_I, class_id=xafqLlk3kkUe(SXOLrMavuUCe(b'\x90\x9f\n\xef\x04f'), chr(0b1100100) + chr(0b1110 + 0o127) + '\143' + '\x6f' + '\x64' + chr(7974 - 7873))(chr(0b1110101) + '\x74' + chr(0b100001 + 0o105) + chr(45) + chr(0b1101 + 0o53))) mCiUIaeXcvtr(wmQmyeWBmUpv(ehT0Px3KOsy9), use_pickle=ehT0Px3KOsy9(chr(48) + '\x6f' + chr(1560 - 1511), 8), local=ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b10101 + 0o34), 8), driver_id=xrb3JXGvKq_I, class_id=xafqLlk3kkUe(SXOLrMavuUCe(b'\x88\x87\x17\xe8'), '\x64' + '\145' + chr(99) + '\x6f' + chr(0b1100100) + '\x65')(chr(117) + chr(0b1110100) + '\x66' + chr(45) + '\070')) mCiUIaeXcvtr(xafqLlk3kkUe(H9zaXRrGK6Cq.signature, xafqLlk3kkUe(SXOLrMavuUCe(b'\xba\x8b\t\xee\x14ny?R\xb2\xef9\xf3\xd5\x13\x08\xd5'), chr(100) + '\145' + chr(99) + '\157' + '\x64' + chr(6999 - 6898))('\165' + chr(0b1010111 + 0o35) + '\x66' + chr(0b101101) + '\070')), use_dict=ehT0Px3KOsy9(chr(0b101 + 0o53) + '\x6f' + '\061', 8), local=ehT0Px3KOsy9(chr(0b110000) + '\157' + '\061', 8), driver_id=xrb3JXGvKq_I, class_id=xafqLlk3kkUe(SXOLrMavuUCe(b'\x8e\x9f\x1e\xa3\x13nq?`\xaf\xfd%\xf7\x8f \x0f\xde\xc8\x13<\xae\xbc\x04N\xbb@\\BO\xaa\x81'), '\144' + '\145' + chr(0b111110 + 0o45) + chr(111) + chr(0b1001001 + 0o33) + chr(0b1100101))(chr(117) + chr(0b1110100) + chr(1790 - 1688) + chr(0b1100 + 0o41) + '\070'))
ray-project/ray
python/ray/worker.py
init
def init(redis_address=None, num_cpus=None, num_gpus=None, resources=None, object_store_memory=None, redis_max_memory=None, log_to_driver=True, node_ip_address=None, object_id_seed=None, local_mode=False, redirect_worker_output=None, redirect_output=None, ignore_reinit_error=False, num_redis_shards=None, redis_max_clients=None, redis_password=None, plasma_directory=None, huge_pages=False, include_webui=False, driver_id=None, configure_logging=True, logging_level=logging.INFO, logging_format=ray_constants.LOGGER_FORMAT, plasma_store_socket_name=None, raylet_socket_name=None, temp_dir=None, load_code_from_local=False, _internal_config=None): """Connect to an existing Ray cluster or start one and connect to it. This method handles two cases. Either a Ray cluster already exists and we just attach this driver to it, or we start all of the processes associated with a Ray cluster and attach to the newly started cluster. To start Ray and all of the relevant processes, use this as follows: .. code-block:: python ray.init() To connect to an existing Ray cluster, use this as follows (substituting in the appropriate address): .. code-block:: python ray.init(redis_address="123.45.67.89:6379") Args: redis_address (str): The address of the Redis server to connect to. If this address is not provided, then this command will start Redis, a raylet, a plasma store, a plasma manager, and some workers. It will also kill these processes when Python exits. num_cpus (int): Number of cpus the user wishes all raylets to be configured with. num_gpus (int): Number of gpus the user wishes all raylets to be configured with. resources: A dictionary mapping the name of a resource to the quantity of that resource available. object_store_memory: The amount of memory (in bytes) to start the object store with. By default, this is capped at 20GB but can be set higher. redis_max_memory: The max amount of memory (in bytes) to allow each redis shard to use. Once the limit is exceeded, redis will start LRU eviction of entries. This only applies to the sharded redis tables (task, object, and profile tables). By default, this is capped at 10GB but can be set higher. log_to_driver (bool): If true, then output from all of the worker processes on all nodes will be directed to the driver. node_ip_address (str): The IP address of the node that we are on. object_id_seed (int): Used to seed the deterministic generation of object IDs. The same value can be used across multiple runs of the same driver in order to generate the object IDs in a consistent manner. However, the same ID should not be used for different drivers. local_mode (bool): True if the code should be executed serially without Ray. This is useful for debugging. ignore_reinit_error: True if we should suppress errors from calling ray.init() a second time. num_redis_shards: The number of Redis shards to start in addition to the primary Redis shard. redis_max_clients: If provided, attempt to configure Redis with this maxclients number. redis_password (str): Prevents external clients without the password from connecting to Redis if provided. plasma_directory: A directory where the Plasma memory mapped files will be created. huge_pages: Boolean flag indicating whether to start the Object Store with hugetlbfs support. Requires plasma_directory. include_webui: Boolean flag indicating whether to start the web UI, which displays the status of the Ray cluster. driver_id: The ID of driver. configure_logging: True if allow the logging cofiguration here. Otherwise, the users may want to configure it by their own. logging_level: Logging level, default will be logging.INFO. logging_format: Logging format, default contains a timestamp, filename, line number, and message. See ray_constants.py. plasma_store_socket_name (str): If provided, it will specify the socket name used by the plasma store. raylet_socket_name (str): If provided, it will specify the socket path used by the raylet process. temp_dir (str): If provided, it will specify the root temporary directory for the Ray process. load_code_from_local: Whether code should be loaded from a local module or from the GCS. _internal_config (str): JSON configuration for overriding RayConfig defaults. For testing purposes ONLY. Returns: Address information about the started processes. Raises: Exception: An exception is raised if an inappropriate combination of arguments is passed in. """ if configure_logging: setup_logger(logging_level, logging_format) if local_mode: driver_mode = LOCAL_MODE else: driver_mode = SCRIPT_MODE if setproctitle is None: logger.warning( "WARNING: Not updating worker name since `setproctitle` is not " "installed. Install this with `pip install setproctitle` " "(or ray[debug]) to enable monitoring of worker processes.") if global_worker.connected: if ignore_reinit_error: logger.error("Calling ray.init() again after it has already been " "called.") return else: raise Exception("Perhaps you called ray.init twice by accident? " "This error can be suppressed by passing in " "'ignore_reinit_error=True' or by calling " "'ray.shutdown()' prior to 'ray.init()'.") # Convert hostnames to numerical IP address. if node_ip_address is not None: node_ip_address = services.address_to_ip(node_ip_address) if redis_address is not None: redis_address = services.address_to_ip(redis_address) global _global_node if driver_mode == LOCAL_MODE: # If starting Ray in LOCAL_MODE, don't start any other processes. _global_node = ray.node.LocalNode() elif redis_address is None: # In this case, we need to start a new cluster. ray_params = ray.parameter.RayParams( redis_address=redis_address, node_ip_address=node_ip_address, object_id_seed=object_id_seed, local_mode=local_mode, driver_mode=driver_mode, redirect_worker_output=redirect_worker_output, redirect_output=redirect_output, num_cpus=num_cpus, num_gpus=num_gpus, resources=resources, num_redis_shards=num_redis_shards, redis_max_clients=redis_max_clients, redis_password=redis_password, plasma_directory=plasma_directory, huge_pages=huge_pages, include_webui=include_webui, object_store_memory=object_store_memory, redis_max_memory=redis_max_memory, plasma_store_socket_name=plasma_store_socket_name, raylet_socket_name=raylet_socket_name, temp_dir=temp_dir, load_code_from_local=load_code_from_local, _internal_config=_internal_config, ) # Start the Ray processes. We set shutdown_at_exit=False because we # shutdown the node in the ray.shutdown call that happens in the atexit # handler. _global_node = ray.node.Node( head=True, shutdown_at_exit=False, ray_params=ray_params) else: # In this case, we are connecting to an existing cluster. if num_cpus is not None or num_gpus is not None: raise Exception("When connecting to an existing cluster, num_cpus " "and num_gpus must not be provided.") if resources is not None: raise Exception("When connecting to an existing cluster, " "resources must not be provided.") if num_redis_shards is not None: raise Exception("When connecting to an existing cluster, " "num_redis_shards must not be provided.") if redis_max_clients is not None: raise Exception("When connecting to an existing cluster, " "redis_max_clients must not be provided.") if object_store_memory is not None: raise Exception("When connecting to an existing cluster, " "object_store_memory must not be provided.") if redis_max_memory is not None: raise Exception("When connecting to an existing cluster, " "redis_max_memory must not be provided.") if plasma_directory is not None: raise Exception("When connecting to an existing cluster, " "plasma_directory must not be provided.") if huge_pages: raise Exception("When connecting to an existing cluster, " "huge_pages must not be provided.") if temp_dir is not None: raise Exception("When connecting to an existing cluster, " "temp_dir must not be provided.") if plasma_store_socket_name is not None: raise Exception("When connecting to an existing cluster, " "plasma_store_socket_name must not be provided.") if raylet_socket_name is not None: raise Exception("When connecting to an existing cluster, " "raylet_socket_name must not be provided.") if _internal_config is not None: raise Exception("When connecting to an existing cluster, " "_internal_config must not be provided.") # In this case, we only need to connect the node. ray_params = ray.parameter.RayParams( node_ip_address=node_ip_address, redis_address=redis_address, redis_password=redis_password, object_id_seed=object_id_seed, temp_dir=temp_dir, load_code_from_local=load_code_from_local) _global_node = ray.node.Node( ray_params, head=False, shutdown_at_exit=False, connect_only=True) connect( _global_node, mode=driver_mode, log_to_driver=log_to_driver, worker=global_worker, driver_id=driver_id) for hook in _post_init_hooks: hook() return _global_node.address_info
python
def init(redis_address=None, num_cpus=None, num_gpus=None, resources=None, object_store_memory=None, redis_max_memory=None, log_to_driver=True, node_ip_address=None, object_id_seed=None, local_mode=False, redirect_worker_output=None, redirect_output=None, ignore_reinit_error=False, num_redis_shards=None, redis_max_clients=None, redis_password=None, plasma_directory=None, huge_pages=False, include_webui=False, driver_id=None, configure_logging=True, logging_level=logging.INFO, logging_format=ray_constants.LOGGER_FORMAT, plasma_store_socket_name=None, raylet_socket_name=None, temp_dir=None, load_code_from_local=False, _internal_config=None): """Connect to an existing Ray cluster or start one and connect to it. This method handles two cases. Either a Ray cluster already exists and we just attach this driver to it, or we start all of the processes associated with a Ray cluster and attach to the newly started cluster. To start Ray and all of the relevant processes, use this as follows: .. code-block:: python ray.init() To connect to an existing Ray cluster, use this as follows (substituting in the appropriate address): .. code-block:: python ray.init(redis_address="123.45.67.89:6379") Args: redis_address (str): The address of the Redis server to connect to. If this address is not provided, then this command will start Redis, a raylet, a plasma store, a plasma manager, and some workers. It will also kill these processes when Python exits. num_cpus (int): Number of cpus the user wishes all raylets to be configured with. num_gpus (int): Number of gpus the user wishes all raylets to be configured with. resources: A dictionary mapping the name of a resource to the quantity of that resource available. object_store_memory: The amount of memory (in bytes) to start the object store with. By default, this is capped at 20GB but can be set higher. redis_max_memory: The max amount of memory (in bytes) to allow each redis shard to use. Once the limit is exceeded, redis will start LRU eviction of entries. This only applies to the sharded redis tables (task, object, and profile tables). By default, this is capped at 10GB but can be set higher. log_to_driver (bool): If true, then output from all of the worker processes on all nodes will be directed to the driver. node_ip_address (str): The IP address of the node that we are on. object_id_seed (int): Used to seed the deterministic generation of object IDs. The same value can be used across multiple runs of the same driver in order to generate the object IDs in a consistent manner. However, the same ID should not be used for different drivers. local_mode (bool): True if the code should be executed serially without Ray. This is useful for debugging. ignore_reinit_error: True if we should suppress errors from calling ray.init() a second time. num_redis_shards: The number of Redis shards to start in addition to the primary Redis shard. redis_max_clients: If provided, attempt to configure Redis with this maxclients number. redis_password (str): Prevents external clients without the password from connecting to Redis if provided. plasma_directory: A directory where the Plasma memory mapped files will be created. huge_pages: Boolean flag indicating whether to start the Object Store with hugetlbfs support. Requires plasma_directory. include_webui: Boolean flag indicating whether to start the web UI, which displays the status of the Ray cluster. driver_id: The ID of driver. configure_logging: True if allow the logging cofiguration here. Otherwise, the users may want to configure it by their own. logging_level: Logging level, default will be logging.INFO. logging_format: Logging format, default contains a timestamp, filename, line number, and message. See ray_constants.py. plasma_store_socket_name (str): If provided, it will specify the socket name used by the plasma store. raylet_socket_name (str): If provided, it will specify the socket path used by the raylet process. temp_dir (str): If provided, it will specify the root temporary directory for the Ray process. load_code_from_local: Whether code should be loaded from a local module or from the GCS. _internal_config (str): JSON configuration for overriding RayConfig defaults. For testing purposes ONLY. Returns: Address information about the started processes. Raises: Exception: An exception is raised if an inappropriate combination of arguments is passed in. """ if configure_logging: setup_logger(logging_level, logging_format) if local_mode: driver_mode = LOCAL_MODE else: driver_mode = SCRIPT_MODE if setproctitle is None: logger.warning( "WARNING: Not updating worker name since `setproctitle` is not " "installed. Install this with `pip install setproctitle` " "(or ray[debug]) to enable monitoring of worker processes.") if global_worker.connected: if ignore_reinit_error: logger.error("Calling ray.init() again after it has already been " "called.") return else: raise Exception("Perhaps you called ray.init twice by accident? " "This error can be suppressed by passing in " "'ignore_reinit_error=True' or by calling " "'ray.shutdown()' prior to 'ray.init()'.") # Convert hostnames to numerical IP address. if node_ip_address is not None: node_ip_address = services.address_to_ip(node_ip_address) if redis_address is not None: redis_address = services.address_to_ip(redis_address) global _global_node if driver_mode == LOCAL_MODE: # If starting Ray in LOCAL_MODE, don't start any other processes. _global_node = ray.node.LocalNode() elif redis_address is None: # In this case, we need to start a new cluster. ray_params = ray.parameter.RayParams( redis_address=redis_address, node_ip_address=node_ip_address, object_id_seed=object_id_seed, local_mode=local_mode, driver_mode=driver_mode, redirect_worker_output=redirect_worker_output, redirect_output=redirect_output, num_cpus=num_cpus, num_gpus=num_gpus, resources=resources, num_redis_shards=num_redis_shards, redis_max_clients=redis_max_clients, redis_password=redis_password, plasma_directory=plasma_directory, huge_pages=huge_pages, include_webui=include_webui, object_store_memory=object_store_memory, redis_max_memory=redis_max_memory, plasma_store_socket_name=plasma_store_socket_name, raylet_socket_name=raylet_socket_name, temp_dir=temp_dir, load_code_from_local=load_code_from_local, _internal_config=_internal_config, ) # Start the Ray processes. We set shutdown_at_exit=False because we # shutdown the node in the ray.shutdown call that happens in the atexit # handler. _global_node = ray.node.Node( head=True, shutdown_at_exit=False, ray_params=ray_params) else: # In this case, we are connecting to an existing cluster. if num_cpus is not None or num_gpus is not None: raise Exception("When connecting to an existing cluster, num_cpus " "and num_gpus must not be provided.") if resources is not None: raise Exception("When connecting to an existing cluster, " "resources must not be provided.") if num_redis_shards is not None: raise Exception("When connecting to an existing cluster, " "num_redis_shards must not be provided.") if redis_max_clients is not None: raise Exception("When connecting to an existing cluster, " "redis_max_clients must not be provided.") if object_store_memory is not None: raise Exception("When connecting to an existing cluster, " "object_store_memory must not be provided.") if redis_max_memory is not None: raise Exception("When connecting to an existing cluster, " "redis_max_memory must not be provided.") if plasma_directory is not None: raise Exception("When connecting to an existing cluster, " "plasma_directory must not be provided.") if huge_pages: raise Exception("When connecting to an existing cluster, " "huge_pages must not be provided.") if temp_dir is not None: raise Exception("When connecting to an existing cluster, " "temp_dir must not be provided.") if plasma_store_socket_name is not None: raise Exception("When connecting to an existing cluster, " "plasma_store_socket_name must not be provided.") if raylet_socket_name is not None: raise Exception("When connecting to an existing cluster, " "raylet_socket_name must not be provided.") if _internal_config is not None: raise Exception("When connecting to an existing cluster, " "_internal_config must not be provided.") # In this case, we only need to connect the node. ray_params = ray.parameter.RayParams( node_ip_address=node_ip_address, redis_address=redis_address, redis_password=redis_password, object_id_seed=object_id_seed, temp_dir=temp_dir, load_code_from_local=load_code_from_local) _global_node = ray.node.Node( ray_params, head=False, shutdown_at_exit=False, connect_only=True) connect( _global_node, mode=driver_mode, log_to_driver=log_to_driver, worker=global_worker, driver_id=driver_id) for hook in _post_init_hooks: hook() return _global_node.address_info
[ "def", "init", "(", "redis_address", "=", "None", ",", "num_cpus", "=", "None", ",", "num_gpus", "=", "None", ",", "resources", "=", "None", ",", "object_store_memory", "=", "None", ",", "redis_max_memory", "=", "None", ",", "log_to_driver", "=", "True", ",", "node_ip_address", "=", "None", ",", "object_id_seed", "=", "None", ",", "local_mode", "=", "False", ",", "redirect_worker_output", "=", "None", ",", "redirect_output", "=", "None", ",", "ignore_reinit_error", "=", "False", ",", "num_redis_shards", "=", "None", ",", "redis_max_clients", "=", "None", ",", "redis_password", "=", "None", ",", "plasma_directory", "=", "None", ",", "huge_pages", "=", "False", ",", "include_webui", "=", "False", ",", "driver_id", "=", "None", ",", "configure_logging", "=", "True", ",", "logging_level", "=", "logging", ".", "INFO", ",", "logging_format", "=", "ray_constants", ".", "LOGGER_FORMAT", ",", "plasma_store_socket_name", "=", "None", ",", "raylet_socket_name", "=", "None", ",", "temp_dir", "=", "None", ",", "load_code_from_local", "=", "False", ",", "_internal_config", "=", "None", ")", ":", "if", "configure_logging", ":", "setup_logger", "(", "logging_level", ",", "logging_format", ")", "if", "local_mode", ":", "driver_mode", "=", "LOCAL_MODE", "else", ":", "driver_mode", "=", "SCRIPT_MODE", "if", "setproctitle", "is", "None", ":", "logger", ".", "warning", "(", "\"WARNING: Not updating worker name since `setproctitle` is not \"", "\"installed. Install this with `pip install setproctitle` \"", "\"(or ray[debug]) to enable monitoring of worker processes.\"", ")", "if", "global_worker", ".", "connected", ":", "if", "ignore_reinit_error", ":", "logger", ".", "error", "(", "\"Calling ray.init() again after it has already been \"", "\"called.\"", ")", "return", "else", ":", "raise", "Exception", "(", "\"Perhaps you called ray.init twice by accident? \"", "\"This error can be suppressed by passing in \"", "\"'ignore_reinit_error=True' or by calling \"", "\"'ray.shutdown()' prior to 'ray.init()'.\"", ")", "# Convert hostnames to numerical IP address.", "if", "node_ip_address", "is", "not", "None", ":", "node_ip_address", "=", "services", ".", "address_to_ip", "(", "node_ip_address", ")", "if", "redis_address", "is", "not", "None", ":", "redis_address", "=", "services", ".", "address_to_ip", "(", "redis_address", ")", "global", "_global_node", "if", "driver_mode", "==", "LOCAL_MODE", ":", "# If starting Ray in LOCAL_MODE, don't start any other processes.", "_global_node", "=", "ray", ".", "node", ".", "LocalNode", "(", ")", "elif", "redis_address", "is", "None", ":", "# In this case, we need to start a new cluster.", "ray_params", "=", "ray", ".", "parameter", ".", "RayParams", "(", "redis_address", "=", "redis_address", ",", "node_ip_address", "=", "node_ip_address", ",", "object_id_seed", "=", "object_id_seed", ",", "local_mode", "=", "local_mode", ",", "driver_mode", "=", "driver_mode", ",", "redirect_worker_output", "=", "redirect_worker_output", ",", "redirect_output", "=", "redirect_output", ",", "num_cpus", "=", "num_cpus", ",", "num_gpus", "=", "num_gpus", ",", "resources", "=", "resources", ",", "num_redis_shards", "=", "num_redis_shards", ",", "redis_max_clients", "=", "redis_max_clients", ",", "redis_password", "=", "redis_password", ",", "plasma_directory", "=", "plasma_directory", ",", "huge_pages", "=", "huge_pages", ",", "include_webui", "=", "include_webui", ",", "object_store_memory", "=", "object_store_memory", ",", "redis_max_memory", "=", "redis_max_memory", ",", "plasma_store_socket_name", "=", "plasma_store_socket_name", ",", "raylet_socket_name", "=", "raylet_socket_name", ",", "temp_dir", "=", "temp_dir", ",", "load_code_from_local", "=", "load_code_from_local", ",", "_internal_config", "=", "_internal_config", ",", ")", "# Start the Ray processes. We set shutdown_at_exit=False because we", "# shutdown the node in the ray.shutdown call that happens in the atexit", "# handler.", "_global_node", "=", "ray", ".", "node", ".", "Node", "(", "head", "=", "True", ",", "shutdown_at_exit", "=", "False", ",", "ray_params", "=", "ray_params", ")", "else", ":", "# In this case, we are connecting to an existing cluster.", "if", "num_cpus", "is", "not", "None", "or", "num_gpus", "is", "not", "None", ":", "raise", "Exception", "(", "\"When connecting to an existing cluster, num_cpus \"", "\"and num_gpus must not be provided.\"", ")", "if", "resources", "is", "not", "None", ":", "raise", "Exception", "(", "\"When connecting to an existing cluster, \"", "\"resources must not be provided.\"", ")", "if", "num_redis_shards", "is", "not", "None", ":", "raise", "Exception", "(", "\"When connecting to an existing cluster, \"", "\"num_redis_shards must not be provided.\"", ")", "if", "redis_max_clients", "is", "not", "None", ":", "raise", "Exception", "(", "\"When connecting to an existing cluster, \"", "\"redis_max_clients must not be provided.\"", ")", "if", "object_store_memory", "is", "not", "None", ":", "raise", "Exception", "(", "\"When connecting to an existing cluster, \"", "\"object_store_memory must not be provided.\"", ")", "if", "redis_max_memory", "is", "not", "None", ":", "raise", "Exception", "(", "\"When connecting to an existing cluster, \"", "\"redis_max_memory must not be provided.\"", ")", "if", "plasma_directory", "is", "not", "None", ":", "raise", "Exception", "(", "\"When connecting to an existing cluster, \"", "\"plasma_directory must not be provided.\"", ")", "if", "huge_pages", ":", "raise", "Exception", "(", "\"When connecting to an existing cluster, \"", "\"huge_pages must not be provided.\"", ")", "if", "temp_dir", "is", "not", "None", ":", "raise", "Exception", "(", "\"When connecting to an existing cluster, \"", "\"temp_dir must not be provided.\"", ")", "if", "plasma_store_socket_name", "is", "not", "None", ":", "raise", "Exception", "(", "\"When connecting to an existing cluster, \"", "\"plasma_store_socket_name must not be provided.\"", ")", "if", "raylet_socket_name", "is", "not", "None", ":", "raise", "Exception", "(", "\"When connecting to an existing cluster, \"", "\"raylet_socket_name must not be provided.\"", ")", "if", "_internal_config", "is", "not", "None", ":", "raise", "Exception", "(", "\"When connecting to an existing cluster, \"", "\"_internal_config must not be provided.\"", ")", "# In this case, we only need to connect the node.", "ray_params", "=", "ray", ".", "parameter", ".", "RayParams", "(", "node_ip_address", "=", "node_ip_address", ",", "redis_address", "=", "redis_address", ",", "redis_password", "=", "redis_password", ",", "object_id_seed", "=", "object_id_seed", ",", "temp_dir", "=", "temp_dir", ",", "load_code_from_local", "=", "load_code_from_local", ")", "_global_node", "=", "ray", ".", "node", ".", "Node", "(", "ray_params", ",", "head", "=", "False", ",", "shutdown_at_exit", "=", "False", ",", "connect_only", "=", "True", ")", "connect", "(", "_global_node", ",", "mode", "=", "driver_mode", ",", "log_to_driver", "=", "log_to_driver", ",", "worker", "=", "global_worker", ",", "driver_id", "=", "driver_id", ")", "for", "hook", "in", "_post_init_hooks", ":", "hook", "(", ")", "return", "_global_node", ".", "address_info" ]
Connect to an existing Ray cluster or start one and connect to it. This method handles two cases. Either a Ray cluster already exists and we just attach this driver to it, or we start all of the processes associated with a Ray cluster and attach to the newly started cluster. To start Ray and all of the relevant processes, use this as follows: .. code-block:: python ray.init() To connect to an existing Ray cluster, use this as follows (substituting in the appropriate address): .. code-block:: python ray.init(redis_address="123.45.67.89:6379") Args: redis_address (str): The address of the Redis server to connect to. If this address is not provided, then this command will start Redis, a raylet, a plasma store, a plasma manager, and some workers. It will also kill these processes when Python exits. num_cpus (int): Number of cpus the user wishes all raylets to be configured with. num_gpus (int): Number of gpus the user wishes all raylets to be configured with. resources: A dictionary mapping the name of a resource to the quantity of that resource available. object_store_memory: The amount of memory (in bytes) to start the object store with. By default, this is capped at 20GB but can be set higher. redis_max_memory: The max amount of memory (in bytes) to allow each redis shard to use. Once the limit is exceeded, redis will start LRU eviction of entries. This only applies to the sharded redis tables (task, object, and profile tables). By default, this is capped at 10GB but can be set higher. log_to_driver (bool): If true, then output from all of the worker processes on all nodes will be directed to the driver. node_ip_address (str): The IP address of the node that we are on. object_id_seed (int): Used to seed the deterministic generation of object IDs. The same value can be used across multiple runs of the same driver in order to generate the object IDs in a consistent manner. However, the same ID should not be used for different drivers. local_mode (bool): True if the code should be executed serially without Ray. This is useful for debugging. ignore_reinit_error: True if we should suppress errors from calling ray.init() a second time. num_redis_shards: The number of Redis shards to start in addition to the primary Redis shard. redis_max_clients: If provided, attempt to configure Redis with this maxclients number. redis_password (str): Prevents external clients without the password from connecting to Redis if provided. plasma_directory: A directory where the Plasma memory mapped files will be created. huge_pages: Boolean flag indicating whether to start the Object Store with hugetlbfs support. Requires plasma_directory. include_webui: Boolean flag indicating whether to start the web UI, which displays the status of the Ray cluster. driver_id: The ID of driver. configure_logging: True if allow the logging cofiguration here. Otherwise, the users may want to configure it by their own. logging_level: Logging level, default will be logging.INFO. logging_format: Logging format, default contains a timestamp, filename, line number, and message. See ray_constants.py. plasma_store_socket_name (str): If provided, it will specify the socket name used by the plasma store. raylet_socket_name (str): If provided, it will specify the socket path used by the raylet process. temp_dir (str): If provided, it will specify the root temporary directory for the Ray process. load_code_from_local: Whether code should be loaded from a local module or from the GCS. _internal_config (str): JSON configuration for overriding RayConfig defaults. For testing purposes ONLY. Returns: Address information about the started processes. Raises: Exception: An exception is raised if an inappropriate combination of arguments is passed in.
[ "Connect", "to", "an", "existing", "Ray", "cluster", "or", "start", "one", "and", "connect", "to", "it", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/worker.py#L1213-L1455
train
Initializes a new Ray cluster.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPvpP4xdo3,cW7yQuyEnJ6E,KOHQGQ8qLDWm,N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srOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(111) + chr(1659 - 1608) + '\x36' + '\062', 0o10), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(111) + chr(0b110010) + chr(0b11001 + 0o32) + chr(1190 - 1140), 58439 - 58431), ehT0Px3KOsy9(chr(0b10100 + 0o34) + '\x6f' + chr(50) + chr(49) + chr(614 - 565), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(51) + chr(0b110000) + chr(463 - 409), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(4261 - 4150) + chr(787 - 738) + '\062' + '\x36', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(10454 - 10343) + '\061' + chr(0b110110) + chr(0b101 + 0o56), ord("\x08")), ehT0Px3KOsy9(chr(0b10001 + 0o37) + '\x6f' + chr(0b1 + 0o60) + '\067' + chr(0b1100 + 0o46), 0b1000), ehT0Px3KOsy9(chr(0b110 + 0o52) + '\157' + '\063' + chr(0b1011 + 0o51) + '\065', 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(1631 - 1582) + '\x34' + chr(0b100110 + 0o16), 14873 - 14865), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b1111 + 0o42) + '\x35' + chr(0b11011 + 0o33), 0o10), ehT0Px3KOsy9(chr(0b1100 + 0o44) + chr(8981 - 8870) + chr(0b110001) + chr(55) + chr(55), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x32' + chr(171 - 120) + '\063', 48341 - 48333), ehT0Px3KOsy9(chr(2007 - 1959) + chr(111) + chr(1803 - 1753) + chr(0b110100) + '\x30', 0o10), ehT0Px3KOsy9(chr(1969 - 1921) + '\x6f' + chr(2132 - 2083) + chr(1631 - 1583) + chr(53), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + '\067' + '\x32', 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b11111 + 0o22) + '\x32' + '\x35', 0o10), ehT0Px3KOsy9(chr(1860 - 1812) + chr(111) + chr(1006 - 956) + chr(0b110110) + chr(52), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110011) + '\x37' + '\061', 9209 - 9201), ehT0Px3KOsy9('\060' + '\157' + chr(0b110001) + '\x37' + '\x34', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\063' + chr(764 - 712) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x32' + chr(51) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(111) + chr(635 - 585) + chr(0b111 + 0o54) + '\065', 8), ehT0Px3KOsy9(chr(1249 - 1201) + chr(0b1101111) + chr(0b1111 + 0o43) + '\x33', 0o10), ehT0Px3KOsy9(chr(932 - 884) + chr(11170 - 11059) + '\067' + '\063', 35914 - 35906), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x32' + chr(0b110010) + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(0b10100 + 0o34) + '\157' + '\x31' + chr(0b110000) + chr(113 - 63), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1100011 + 0o14) + chr(0b100001 + 0o23) + chr(50), 0o10), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(0b1101111) + chr(0b110010) + chr(54) + chr(52), 8), ehT0Px3KOsy9(chr(0b110000) + chr(11521 - 11410) + chr(51) + chr(54) + chr(0b1100 + 0o44), ord("\x08")), ehT0Px3KOsy9(chr(2171 - 2123) + chr(0b100 + 0o153) + chr(0b110010) + '\066' + chr(0b11011 + 0o30), 0b1000), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(111) + '\063' + chr(0b110000) + chr(0b1100 + 0o52), 8), ehT0Px3KOsy9(chr(1336 - 1288) + '\x6f' + chr(54) + chr(0b110000), 48237 - 48229), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x31' + '\066' + '\x35', 13013 - 13005), ehT0Px3KOsy9(chr(0b100011 + 0o15) + '\157' + '\061' + chr(1517 - 1469) + '\x36', 6909 - 6901), ehT0Px3KOsy9(chr(0b110000) + chr(899 - 788) + chr(0b110101 + 0o1), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(51) + '\062' + chr(0b101010 + 0o6), 0o10), ehT0Px3KOsy9('\060' + chr(0b1001011 + 0o44) + '\x31' + chr(0b110101) + chr(0b110010), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(1403 - 1354) + '\x33' + chr(0b110000), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(51) + chr(1904 - 1854), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b1 + 0o62) + chr(2942 - 2887) + chr(1081 - 1028), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(53) + chr(48), 17545 - 17537)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xdc'), '\144' + chr(0b1100101) + chr(0b1100011) + '\157' + chr(0b1100100) + chr(0b1100101))(chr(117) + chr(116) + '\x66' + chr(89 - 44) + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def A5GIpkDsgP4U(rKcC7jKCY6RT=None, Mrs8455cKlOd=None, zcNH1ym8cZBx=None, z4Xs9XhDbg00=None, LtjBDsQnu8PS=None, B5GAbfIzRu_z=None, UYEmslrudt2y=ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(49), 0b1000), aeKspuvwh5PG=None, hrEthrytT73p=None, D062GpmnjfPn=ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x30', ord("\x08")), evQgmUHgHWiU=None, saP6f0UsZMP5=None, vZkuCkCQUD61=ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(48), 8), fbnzuaNhHAyn=None, VdEmi1xG8ERD=None, PGzU6CS1HKzj=None, i8mcX_aWNSMR=None, qCGo25o7UUme=ehT0Px3KOsy9('\x30' + chr(111) + '\060', 8), zq6fdUBC2d9v=ehT0Px3KOsy9(chr(2154 - 2106) + chr(0b1101111) + chr(0b110000), 8), xrb3JXGvKq_I=None, B2kvlcQTnbBI=ehT0Px3KOsy9('\x30' + chr(111) + '\061', 8), YyKhALLbeI_I=xafqLlk3kkUe(UeotCCWOPSQS, xafqLlk3kkUe(SXOLrMavuUCe(b'\xbb\xd4\xcf\x89'), chr(0b1100100) + '\x65' + chr(0b11010 + 0o111) + chr(11525 - 11414) + chr(100) + chr(0b100110 + 0o77))('\x75' + chr(11346 - 11230) + '\146' + chr(1430 - 1385) + '\070')), VpkxQz_OkIYj=xafqLlk3kkUe(NAlxrfaLQgar, xafqLlk3kkUe(SXOLrMavuUCe(b'\xbe\xd5\xce\x81\x13!%\xa3+<2\xda\xf4'), chr(100) + chr(0b111101 + 0o50) + chr(0b1000110 + 0o35) + '\x6f' + '\x64' + chr(101))('\x75' + chr(0b111111 + 0o65) + '\146' + '\x2d' + '\x38')), AKc6A_gDEjl8=None, X11PJeCTgQRV=None, D5zvfopPAzlX=None, OlXHZB4xECs3=ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(0b1101111) + chr(1093 - 1045), 8), J86H2K668mDW=None): if B2kvlcQTnbBI: xYEsfI81duqz(YyKhALLbeI_I, VpkxQz_OkIYj) if D062GpmnjfPn: N1fxHhg8Tyj5 = vegegFjq4lAA else: N1fxHhg8Tyj5 = QFleJOhZ8mu8 if GkuYXrFIAk64 is None: xafqLlk3kkUe(hdK8qOUhR6Or, xafqLlk3kkUe(SXOLrMavuUCe(b'\x85\xfb\xfb\xa8?\x1d\x1d'), chr(100) + '\x65' + '\143' + chr(111) + chr(100) + chr(0b1000101 + 0o40))(chr(0b1110101) + '\x74' + '\146' + chr(1048 - 1003) + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b"\xa5\xdb\xdb\x88\x1f==\xdfD \x10\xef\x800J1\xd5\x8d\x15\x89\xfa\xbddT\xe4)G\xc6\xd0\xdd\xa7]\x10fu\xb9\x04;\x7f\xdd\x92\xe9\xec\xb2&\x01\x15\x86\x10\x07\x0b\xf7\xc5%\x1a<\xc7\xd9\x12\x88\xe9\xbdzU\xe56C\xd8\x9c\xd6\xa2\x1eU\x0fh\xa3\x1e9v\x91\xd2\xee\xe1\xaf%S\r\x8c\x10\x06_\xfb\xd0,Ju\xdd\x97\x0f\x93\xfc\xf1\x7f\x1b\xe5'V\xc4\x82\xdc\xa5D\x1c2j\xb5\nx2\x92\x80\xba\xfb\xa7/(\x1e\x80\x06\x1b\x18\xc6\x89eN:\x94\x9c\x12\x86\xff\xf1v\x1b\xfb-L\xdd\x84\xdc\xb4Y\x1b!&\xbf\x0cxm\x92\x80\xf1\xec\xb4v\x03\x08\x8a\x07\x0b\x0c\xe8\xc56\x14"), '\x64' + '\x65' + chr(0b1100011) + chr(0b1101111) + '\x64' + chr(0b1100101))(chr(8010 - 7893) + chr(0b1110100) + '\x66' + chr(0b101101) + chr(0b111000))) if xafqLlk3kkUe(Fn_g0gvMIHCm, xafqLlk3kkUe(SXOLrMavuUCe(b'\x91\xf5\xe7\xa83\x10\x0e\x80\x00'), chr(1217 - 1117) + chr(7573 - 7472) + '\x63' + '\157' + chr(7723 - 7623) + chr(101))(chr(13679 - 13562) + '\x74' + chr(0b100000 + 0o106) + chr(0b101101) + chr(56))): if vZkuCkCQUD61: xafqLlk3kkUe(hdK8qOUhR6Or, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb7\xcf\xed\x967\x075\xb6U\x19\x07\xab'), chr(0b1100100) + '\x65' + chr(6336 - 6237) + '\157' + chr(0b1101 + 0o127) + '\x65')(chr(0b11001 + 0o134) + '\164' + chr(0b1100110) + chr(0b10101 + 0o30) + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xb1\xfb\xe5\xaa?\x1d\x1d\xc5\x16\x0f\x06\xb5\xc9+S!\x9c\xd0\\\x86\xfa\xfczU\xb6#D\xc0\x95\xc1\xe6Y\x01fn\xb1\x19x{\x91\x80\xff\xe8\xa2/S\x18\x80\x01\x00_\xf8\xc1)V0\xd0\xd7'), chr(0b1100100) + chr(101) + '\x63' + chr(0b1001100 + 0o43) + chr(0b110 + 0o136) + '\145')(chr(3421 - 3304) + chr(0b1110100) + '\146' + '\055' + '\x38')) return else: raise jLmadlzMdunT(xafqLlk3kkUe(SXOLrMavuUCe(b'\xa2\xff\xfb\xae7\x03\t\xc5\x1d\x01\n\xbb\xc3$V9\xd1\x9d\\\x95\xfc\xe4=R\xf8+V\x94\x84\xc4\xafS\x10fd\xa9J9y\x9e\x9b\xfe\xec\xa8"LZ\xb1\x0c\x07\x0c\xbb\xc57H:\xc6\xd9\x1f\x86\xf3\xbdq^\xb61W\xc4\x80\xc1\xa3C\x06#b\xf0\x08!:\x8d\x93\xe9\xfa\xaf8\x14Z\x8c\nNX\xf2\xc7+U\'\xd1\xa6\x0e\x82\xf4\xf3zO\xc9\'P\xc6\x9f\xc1\xfbd\x073c\xf7J7h\xdd\x90\xe3\xa9\xa57\x1f\x16\x8c\n\t_\xbc\xd2$C{\xc7\x91\t\x93\xf9\xf2dU\xbek\x05\x94\x80\xc1\xaf_\x07fr\xbfJ\x7fh\x9c\x8b\xb4\xe0\xa8?\x07R\xccC@'), chr(100) + '\145' + chr(99) + chr(111) + chr(0b1100100) + chr(2348 - 2247))(chr(117) + '\164' + '\146' + '\055' + '\x38')) if aeKspuvwh5PG is not None: aeKspuvwh5PG = CCpJAZp2Upe6.address_to_ip(aeKspuvwh5PG) if rKcC7jKCY6RT is not None: rKcC7jKCY6RT = CCpJAZp2Upe6.address_to_ip(rKcC7jKCY6RT) global zzdVbNp66faG if N1fxHhg8Tyj5 == vegegFjq4lAA: zzdVbNp66faG = H9zaXRrGK6Cq.node.LocalNode() elif rKcC7jKCY6RT is None: _qvkNatvmqd2 = H9zaXRrGK6Cq.parameter.RayParams(redis_address=rKcC7jKCY6RT, node_ip_address=aeKspuvwh5PG, object_id_seed=hrEthrytT73p, local_mode=D062GpmnjfPn, driver_mode=N1fxHhg8Tyj5, redirect_worker_output=evQgmUHgHWiU, redirect_output=saP6f0UsZMP5, num_cpus=Mrs8455cKlOd, num_gpus=zcNH1ym8cZBx, resources=z4Xs9XhDbg00, num_redis_shards=fbnzuaNhHAyn, redis_max_clients=VdEmi1xG8ERD, redis_password=PGzU6CS1HKzj, plasma_directory=i8mcX_aWNSMR, huge_pages=qCGo25o7UUme, include_webui=zq6fdUBC2d9v, object_store_memory=LtjBDsQnu8PS, redis_max_memory=B5GAbfIzRu_z, plasma_store_socket_name=AKc6A_gDEjl8, raylet_socket_name=X11PJeCTgQRV, temp_dir=D5zvfopPAzlX, load_code_from_local=OlXHZB4xECs3, _internal_config=J86H2K668mDW) zzdVbNp66faG = H9zaXRrGK6Cq.node.Node(head=ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(370 - 321), 8), shutdown_at_exit=ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(48), 8), ray_params=_qvkNatvmqd2) else: if Mrs8455cKlOd is not None or zcNH1ym8cZBx is not None: raise jLmadlzMdunT(xafqLlk3kkUe(SXOLrMavuUCe(b'\xa5\xf2\xec\xa8v\x10\x15\x8b\n\x0b\x1c\xef\xc9+]u\xc0\x96\\\x86\xf3\xbdvC\xff1V\xdd\x9e\xd4\xe6S\x193u\xa4\x0f*6\xdd\x9c\xef\xe4\x995\x03\x0f\x96D\x0f\x11\xff\x80+O8\xeb\x9e\x0c\x92\xee\xbd~N\xe56\x02\xda\x9f\xc7\xe6R\x10fv\xa2\x05.s\x99\x97\xfe\xa7'), chr(4386 - 4286) + chr(101) + chr(8347 - 8248) + chr(0b1101111) + chr(2724 - 2624) + chr(101))('\165' + '\164' + chr(1220 - 1118) + chr(916 - 871) + chr(56))) if z4Xs9XhDbg00 is not None: raise jLmadlzMdunT(xafqLlk3kkUe(SXOLrMavuUCe(b'\xa5\xf2\xec\xa8v\x10\x15\x8b\n\x0b\x1c\xef\xc9+]u\xc0\x96\\\x86\xf3\xbdvC\xff1V\xdd\x9e\xd4\xe6S\x193u\xa4\x0f*6\xdd\x80\xff\xfa\xa9#\x01\x19\x80\x17N\x12\xee\xd31\x1a;\xdb\x8d\\\x85\xf8\xbdcI\xf94K\xd0\x95\xd7\xe8'), '\144' + '\x65' + '\143' + chr(5143 - 5032) + chr(0b1100100) + '\145')('\x75' + '\164' + chr(4185 - 4083) + '\055' + '\070')) if fbnzuaNhHAyn is not None: raise jLmadlzMdunT(xafqLlk3kkUe(SXOLrMavuUCe(b'\xa5\xf2\xec\xa8v\x10\x15\x8b\n\x0b\x1c\xef\xc9+]u\xc0\x96\\\x86\xf3\xbdvC\xff1V\xdd\x9e\xd4\xe6S\x193u\xa4\x0f*6\xdd\x9c\xef\xe4\x99$\x16\x1e\x8c\x171\x0c\xf3\xc17^&\x94\x94\t\x94\xe9\xbd}T\xe2b@\xd1\xd0\xc3\xb4_\x03/b\xb5\x0ev'), '\144' + chr(0b1011110 + 0o7) + chr(99) + '\157' + '\144' + '\x65')(chr(117) + '\164' + chr(8598 - 8496) + '\055' + '\070')) if VdEmi1xG8ERD is not None: raise jLmadlzMdunT(xafqLlk3kkUe(SXOLrMavuUCe(b'\xa5\xf2\xec\xa8v\x10\x15\x8b\n\x0b\x1c\xef\xc9+]u\xc0\x96\\\x86\xf3\xbdvC\xff1V\xdd\x9e\xd4\xe6S\x193u\xa4\x0f*6\xdd\x80\xff\xed\xaf%,\x17\x84\x1c1\x1c\xf7\xc9 T!\xc7\xd9\x11\x92\xee\xe93U\xf96\x02\xd6\x95\x93\xb6B\x1a0o\xb4\x0f<4'), '\144' + chr(0b1010011 + 0o22) + '\x63' + '\x6f' + chr(100) + chr(101))(chr(0b1110101) + chr(2649 - 2533) + chr(5370 - 5268) + '\055' + chr(0b1101 + 0o53))) if LtjBDsQnu8PS is not None: raise jLmadlzMdunT(xafqLlk3kkUe(SXOLrMavuUCe(b'\xa5\xf2\xec\xa8v\x10\x15\x8b\n\x0b\x1c\xef\xc9+]u\xc0\x96\\\x86\xf3\xbdvC\xff1V\xdd\x9e\xd4\xe6S\x193u\xa4\x0f*6\xdd\x9d\xf8\xe3\xa35\x07%\x96\x10\x01\r\xfe\xff(_8\xdb\x8b\x05\xc7\xf0\xe8`O\xb6,M\xc0\xd0\xd1\xa3\x10\x054i\xa6\x03<\x7f\x99\xdc'), chr(0b1100100) + chr(101) + chr(0b1100011) + '\157' + '\x64' + chr(101))('\165' + chr(0b1110100) + chr(0b11011 + 0o113) + '\055' + '\x38')) if B5GAbfIzRu_z is not None: raise jLmadlzMdunT(xafqLlk3kkUe(SXOLrMavuUCe(b'\xa5\xf2\xec\xa8v\x10\x15\x8b\n\x0b\x1c\xef\xc9+]u\xc0\x96\\\x86\xf3\xbdvC\xff1V\xdd\x9e\xd4\xe6S\x193u\xa4\x0f*6\xdd\x80\xff\xed\xaf%,\x17\x84\x1c1\x12\xfe\xcd*H,\x94\x94\t\x94\xe9\xbd}T\xe2b@\xd1\xd0\xc3\xb4_\x03/b\xb5\x0ev'), chr(0b110111 + 0o55) + '\145' + chr(0b1100011) + chr(111) + chr(0b1100100) + chr(0b1100101))(chr(7761 - 7644) + chr(0b1110100) + '\x66' + chr(0b101101) + chr(585 - 529))) if i8mcX_aWNSMR is not None: raise jLmadlzMdunT(xafqLlk3kkUe(SXOLrMavuUCe(b'\xa5\xf2\xec\xa8v\x10\x15\x8b\n\x0b\x1c\xef\xc9+]u\xc0\x96\\\x86\xf3\xbdvC\xff1V\xdd\x9e\xd4\xe6S\x193u\xa4\x0f*6\xdd\x82\xf6\xe8\xb5;\x12%\x81\r\x1c\x1a\xf8\xd4*H,\x94\x94\t\x94\xe9\xbd}T\xe2b@\xd1\xd0\xc3\xb4_\x03/b\xb5\x0ev'), '\x64' + '\x65' + '\143' + chr(111) + '\144' + '\145')(chr(0b100001 + 0o124) + '\164' + chr(0b1100110) + chr(0b100101 + 0o10) + '\070')) if qCGo25o7UUme: raise jLmadlzMdunT(xafqLlk3kkUe(SXOLrMavuUCe(b'\xa5\xf2\xec\xa8v\x10\x15\x8b\n\x0b\x1c\xef\xc9+]u\xc0\x96\\\x86\xf3\xbdvC\xff1V\xdd\x9e\xd4\xe6S\x193u\xa4\x0f*6\xdd\x9a\xef\xee\xa3\t\x03\x1b\x82\x01\x1d_\xf6\xd56Nu\xda\x96\x08\xc7\xff\xf83K\xe4-T\xdd\x94\xd6\xa2\x1e'), '\x64' + chr(0b1100101) + chr(0b1100011) + chr(111) + chr(0b1100100) + '\145')(chr(117) + chr(116) + chr(5931 - 5829) + chr(1177 - 1132) + '\070')) if D5zvfopPAzlX is not None: raise jLmadlzMdunT(xafqLlk3kkUe(SXOLrMavuUCe(b'\xa5\xf2\xec\xa8v\x10\x15\x8b\n\x0b\x1c\xef\xc9+]u\xc0\x96\\\x86\xf3\xbdvC\xff1V\xdd\x9e\xd4\xe6S\x193u\xa4\x0f*6\xdd\x86\xff\xe4\xb6\t\x17\x13\x97D\x03\n\xe8\xd4eT:\xc0\xd9\x1e\x82\xbd\xedaT\xe0+F\xd1\x94\x9d'), chr(0b1100100) + chr(0b1100101) + '\x63' + chr(8122 - 8011) + chr(100) + chr(0b1001001 + 0o34))(chr(11310 - 11193) + '\164' + '\x66' + chr(0b101101) + '\070')) if AKc6A_gDEjl8 is not None: raise jLmadlzMdunT(xafqLlk3kkUe(SXOLrMavuUCe(b'\xa5\xf2\xec\xa8v\x10\x15\x8b\n\x0b\x1c\xef\xc9+]u\xc0\x96\\\x86\xf3\xbdvC\xff1V\xdd\x9e\xd4\xe6S\x193u\xa4\x0f*6\xdd\x82\xf6\xe8\xb5;\x12%\x96\x10\x01\r\xfe\xff6U6\xdf\x9c\x08\xb8\xf3\xfc~^\xb6/W\xc7\x84\x93\xa8_\x01fd\xb5J(h\x92\x84\xf3\xed\xa32]'), '\144' + '\145' + chr(0b1000000 + 0o43) + chr(0b1010001 + 0o36) + chr(0b1100100) + '\145')(chr(0b1110101) + chr(5332 - 5216) + chr(0b1100110) + chr(0b101101) + chr(0b111000))) if X11PJeCTgQRV is not None: raise jLmadlzMdunT(xafqLlk3kkUe(SXOLrMavuUCe(b'\xa5\xf2\xec\xa8v\x10\x15\x8b\n\x0b\x1c\xef\xc9+]u\xc0\x96\\\x86\xf3\xbdvC\xff1V\xdd\x9e\xd4\xe6S\x193u\xa4\x0f*6\xdd\x80\xfb\xf0\xaa3\x07%\x96\x0b\r\x14\xfe\xd4\x1aT4\xd9\x9c\\\x8a\xe8\xeeg\x1b\xf8-V\x94\x92\xd6\xe6@\x07)p\xb9\x0e=~\xd3'), chr(0b1100100) + '\145' + '\x63' + chr(111) + chr(0b1100100) + chr(0b10000 + 0o125))(chr(0b1110101) + '\164' + chr(102) + '\055' + '\070')) if J86H2K668mDW is not None: raise jLmadlzMdunT(xafqLlk3kkUe(SXOLrMavuUCe(b'\xa5\xf2\xec\xa8v\x10\x15\x8b\n\x0b\x1c\xef\xc9+]u\xc0\x96\\\x86\xf3\xbdvC\xff1V\xdd\x9e\xd4\xe6S\x193u\xa4\x0f*6\xdd\xad\xf3\xe7\xb23\x01\x14\x84\x081\x1c\xf4\xce#S2\x94\x94\t\x94\xe9\xbd}T\xe2b@\xd1\xd0\xc3\xb4_\x03/b\xb5\x0ev'), '\144' + chr(101) + chr(99) + chr(111) + '\144' + chr(0b1100101))('\x75' + chr(116) + chr(0b1100110) + chr(45) + chr(0b11111 + 0o31))) _qvkNatvmqd2 = H9zaXRrGK6Cq.parameter.RayParams(node_ip_address=aeKspuvwh5PG, redis_address=rKcC7jKCY6RT, redis_password=PGzU6CS1HKzj, object_id_seed=hrEthrytT73p, temp_dir=D5zvfopPAzlX, load_code_from_local=OlXHZB4xECs3) zzdVbNp66faG = H9zaXRrGK6Cq.node.Node(_qvkNatvmqd2, head=ehT0Px3KOsy9('\x30' + chr(0b1011100 + 0o23) + '\060', 8), shutdown_at_exit=ehT0Px3KOsy9(chr(2134 - 2086) + chr(0b1101111) + '\060', 8), connect_only=ehT0Px3KOsy9('\x30' + chr(8850 - 8739) + chr(0b110001), 8)) eg1Ei2W_dvMC(zzdVbNp66faG, mode=N1fxHhg8Tyj5, log_to_driver=UYEmslrudt2y, worker=Fn_g0gvMIHCm, driver_id=xrb3JXGvKq_I) for SjzcWMjGgX7L in DWWVSAnmKRRe: SjzcWMjGgX7L() return xafqLlk3kkUe(zzdVbNp66faG, xafqLlk3kkUe(SXOLrMavuUCe(b'\x93\xfe\xed\xb43\x00\t\xba\r\x00\x19\xf4'), chr(4712 - 4612) + chr(0b1100101) + chr(99) + chr(111) + chr(0b101011 + 0o71) + chr(101))(chr(0b1110101) + '\164' + '\146' + chr(45) + chr(0b111000)))
ray-project/ray
python/ray/worker.py
shutdown
def shutdown(exiting_interpreter=False): """Disconnect the worker, and terminate processes started by ray.init(). This will automatically run at the end when a Python process that uses Ray exits. It is ok to run this twice in a row. The primary use case for this function is to cleanup state between tests. Note that this will clear any remote function definitions, actor definitions, and existing actors, so if you wish to use any previously defined remote functions or actors after calling ray.shutdown(), then you need to redefine them. If they were defined in an imported module, then you will need to reload the module. Args: exiting_interpreter (bool): True if this is called by the atexit hook and false otherwise. If we are exiting the interpreter, we will wait a little while to print any extra error messages. """ if exiting_interpreter and global_worker.mode == SCRIPT_MODE: # This is a duration to sleep before shutting down everything in order # to make sure that log messages finish printing. time.sleep(0.5) disconnect() # Disconnect global state from GCS. global_state.disconnect() # Shut down the Ray processes. global _global_node if _global_node is not None: _global_node.kill_all_processes(check_alive=False, allow_graceful=True) _global_node = None global_worker.set_mode(None)
python
def shutdown(exiting_interpreter=False): """Disconnect the worker, and terminate processes started by ray.init(). This will automatically run at the end when a Python process that uses Ray exits. It is ok to run this twice in a row. The primary use case for this function is to cleanup state between tests. Note that this will clear any remote function definitions, actor definitions, and existing actors, so if you wish to use any previously defined remote functions or actors after calling ray.shutdown(), then you need to redefine them. If they were defined in an imported module, then you will need to reload the module. Args: exiting_interpreter (bool): True if this is called by the atexit hook and false otherwise. If we are exiting the interpreter, we will wait a little while to print any extra error messages. """ if exiting_interpreter and global_worker.mode == SCRIPT_MODE: # This is a duration to sleep before shutting down everything in order # to make sure that log messages finish printing. time.sleep(0.5) disconnect() # Disconnect global state from GCS. global_state.disconnect() # Shut down the Ray processes. global _global_node if _global_node is not None: _global_node.kill_all_processes(check_alive=False, allow_graceful=True) _global_node = None global_worker.set_mode(None)
[ "def", "shutdown", "(", "exiting_interpreter", "=", "False", ")", ":", "if", "exiting_interpreter", "and", "global_worker", ".", "mode", "==", "SCRIPT_MODE", ":", "# This is a duration to sleep before shutting down everything in order", "# to make sure that log messages finish printing.", "time", ".", "sleep", "(", "0.5", ")", "disconnect", "(", ")", "# Disconnect global state from GCS.", "global_state", ".", "disconnect", "(", ")", "# Shut down the Ray processes.", "global", "_global_node", "if", "_global_node", "is", "not", "None", ":", "_global_node", ".", "kill_all_processes", "(", "check_alive", "=", "False", ",", "allow_graceful", "=", "True", ")", "_global_node", "=", "None", "global_worker", ".", "set_mode", "(", "None", ")" ]
Disconnect the worker, and terminate processes started by ray.init(). This will automatically run at the end when a Python process that uses Ray exits. It is ok to run this twice in a row. The primary use case for this function is to cleanup state between tests. Note that this will clear any remote function definitions, actor definitions, and existing actors, so if you wish to use any previously defined remote functions or actors after calling ray.shutdown(), then you need to redefine them. If they were defined in an imported module, then you will need to reload the module. Args: exiting_interpreter (bool): True if this is called by the atexit hook and false otherwise. If we are exiting the interpreter, we will wait a little while to print any extra error messages.
[ "Disconnect", "the", "worker", "and", "terminate", "processes", "started", "by", "ray", ".", "init", "()", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray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Qh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(2860 - 2749) + '\x31' + chr(48) + '\064', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110101) + chr(0b101000 + 0o10), 55286 - 55278), ehT0Px3KOsy9(chr(48) + chr(111) + chr(49), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\x32' + chr(54) + chr(2826 - 2771), 0o10), ehT0Px3KOsy9('\060' + chr(0b11110 + 0o121) + '\x33' + '\063' + '\x32', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\063' + chr(0b100110 + 0o17) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110011) + chr(0b110111) + chr(0b110101), 41018 - 41010), ehT0Px3KOsy9(chr(48) + chr(0b110001 + 0o76) + chr(50) + '\066' + chr(0b110100 + 0o0), 0o10), ehT0Px3KOsy9(chr(399 - 351) + chr(111) + chr(0b10110 + 0o33) + chr(2590 - 2537) + '\064', 0b1000), ehT0Px3KOsy9('\x30' + chr(4840 - 4729) + chr(51) + chr(50) + chr(612 - 564), 23556 - 23548), ehT0Px3KOsy9(chr(0b110000) + chr(9944 - 9833) + chr(1468 - 1417) + chr(0b10110 + 0o34), 0b1000), ehT0Px3KOsy9(chr(277 - 229) + '\x6f' + chr(50) + '\x34' + chr(0b110101), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110110) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b1100 + 0o46) + chr(0b110000) + chr(585 - 530), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\063' + chr(51) + chr(0b11100 + 0o31), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b100001 + 0o20) + chr(53) + chr(0b110011), 35961 - 35953), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110011) + chr(1429 - 1379), 8), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\062' + chr(53) + chr(0b10000 + 0o42), 0o10), ehT0Px3KOsy9('\060' + chr(0b1100011 + 0o14) + chr(0b110001) + '\x35' + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(50) + chr(0b110001) + '\063', 0o10), ehT0Px3KOsy9('\060' + chr(0b101001 + 0o106) + '\x31' + chr(0b110100) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b10000 + 0o137) + '\x32' + chr(0b101010 + 0o11) + chr(0b10110 + 0o32), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\x37' + chr(52), 49545 - 49537), ehT0Px3KOsy9('\x30' + chr(0b11100 + 0o123) + chr(0b110010) + chr(0b110101) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\061' + chr(0b110111) + chr(0b11110 + 0o26), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b100011 + 0o17) + chr(0b11 + 0o61) + '\067', 41946 - 41938), ehT0Px3KOsy9(chr(397 - 349) + chr(111) + chr(0b110010 + 0o0) + chr(2314 - 2260) + '\x36', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110010) + chr(49) + chr(310 - 256), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b10111 + 0o33) + chr(1893 - 1842), 5499 - 5491), ehT0Px3KOsy9('\060' + chr(9917 - 9806) + '\062' + chr(55) + chr(48), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + '\062' + '\064', 0b1000), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(111) + chr(0b110011) + '\067' + chr(1329 - 1281), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(0b100 + 0o55) + '\066' + '\x32', 64812 - 64804), ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(4094 - 3983) + chr(55) + chr(0b110 + 0o54), 45279 - 45271), ehT0Px3KOsy9(chr(1202 - 1154) + '\x6f' + chr(1555 - 1505) + '\060' + chr(0b100111 + 0o14), 20159 - 20151), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110101) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(49) + chr(0b110100) + chr(0b100 + 0o54), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\063' + '\x36' + chr(1261 - 1212), 0o10), ehT0Px3KOsy9(chr(48) + chr(8274 - 8163) + chr(49) + chr(49) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110010) + '\x37', 31429 - 31421)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(4718 - 4607) + chr(0b1 + 0o64) + chr(0b110000), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'j'), chr(3688 - 3588) + chr(4329 - 4228) + chr(8391 - 8292) + '\x6f' + chr(1263 - 1163) + chr(0b110101 + 0o60))(chr(1443 - 1326) + chr(0b1110100) + chr(102) + '\055' + chr(0b1001 + 0o57)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def ueh22mwO3hKE(ld5G9wzFOT6v=ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(0b1101111) + chr(0b100110 + 0o12), ord("\x08"))): if ld5G9wzFOT6v and xafqLlk3kkUe(Fn_g0gvMIHCm, xafqLlk3kkUe(SXOLrMavuUCe(b')Ge\xd2'), chr(100) + '\x65' + '\x63' + '\157' + '\x64' + '\145')(chr(1545 - 1428) + chr(7150 - 7034) + chr(0b1100110) + chr(0b101101) + chr(56))) == QFleJOhZ8mu8: xafqLlk3kkUe(ltvhPP4VhXre, xafqLlk3kkUe(SXOLrMavuUCe(b'7Dd\xd2\xaa'), chr(100) + '\x65' + '\143' + chr(0b1101111) + chr(4615 - 4515) + chr(0b1011001 + 0o14))(chr(117) + chr(11225 - 11109) + chr(102) + chr(45) + chr(56)))(0.5) akLp7mNJkXPg() xafqLlk3kkUe(wLpAFVq6NX6z, xafqLlk3kkUe(SXOLrMavuUCe(b' Ar\xd4\xb5\x87\x93\xd1\x0f\xa4'), chr(100) + chr(101) + '\143' + chr(1501 - 1390) + chr(0b1100100) + chr(3533 - 3432))(chr(117) + chr(6537 - 6421) + chr(0b1100101 + 0o1) + chr(0b101101) + '\070'))() global zzdVbNp66faG if zzdVbNp66faG is not None: xafqLlk3kkUe(zzdVbNp66faG, xafqLlk3kkUe(SXOLrMavuUCe(b'/Am\xdb\x85\x88\x91\xd83\xa0h\xcaS\xe2\xae\x18\x7f\xd9'), chr(5441 - 5341) + '\145' + '\x63' + '\157' + chr(0b1100100) + chr(101))(chr(117) + chr(11798 - 11682) + chr(4404 - 4302) + chr(0b101101) + chr(0b1110 + 0o52)))(check_alive=ehT0Px3KOsy9(chr(99 - 51) + chr(111) + chr(0b110000), 8), allow_graceful=ehT0Px3KOsy9(chr(48) + chr(1958 - 1847) + '\x31', 8)) zzdVbNp66faG = None xafqLlk3kkUe(Fn_g0gvMIHCm, xafqLlk3kkUe(SXOLrMavuUCe(b'7Mu\xe8\xb7\x86\x99\xd1'), chr(7423 - 7323) + chr(2043 - 1942) + '\x63' + chr(2346 - 2235) + chr(3644 - 3544) + '\x65')(chr(0b1011010 + 0o33) + chr(0b100100 + 0o120) + '\x66' + chr(0b11100 + 0o21) + chr(56)))(None)
ray-project/ray
python/ray/worker.py
print_logs
def print_logs(redis_client, threads_stopped): """Prints log messages from workers on all of the nodes. Args: redis_client: A client to the primary Redis shard. threads_stopped (threading.Event): A threading event used to signal to the thread that it should exit. """ pubsub_client = redis_client.pubsub(ignore_subscribe_messages=True) pubsub_client.subscribe(ray.gcs_utils.LOG_FILE_CHANNEL) localhost = services.get_node_ip_address() try: # Keep track of the number of consecutive log messages that have been # received with no break in between. If this number grows continually, # then the worker is probably not able to process the log messages as # rapidly as they are coming in. num_consecutive_messages_received = 0 while True: # Exit if we received a signal that we should stop. if threads_stopped.is_set(): return msg = pubsub_client.get_message() if msg is None: num_consecutive_messages_received = 0 threads_stopped.wait(timeout=0.01) continue num_consecutive_messages_received += 1 data = json.loads(ray.utils.decode(msg["data"])) if data["ip"] == localhost: for line in data["lines"]: print("{}{}(pid={}){} {}".format( colorama.Style.DIM, colorama.Fore.CYAN, data["pid"], colorama.Style.RESET_ALL, line)) else: for line in data["lines"]: print("{}{}(pid={}, ip={}){} {}".format( colorama.Style.DIM, colorama.Fore.CYAN, data["pid"], data["ip"], colorama.Style.RESET_ALL, line)) if (num_consecutive_messages_received % 100 == 0 and num_consecutive_messages_received > 0): logger.warning( "The driver may not be able to keep up with the " "stdout/stderr of the workers. To avoid forwarding logs " "to the driver, use 'ray.init(log_to_driver=False)'.") finally: # Close the pubsub client to avoid leaking file descriptors. pubsub_client.close()
python
def print_logs(redis_client, threads_stopped): """Prints log messages from workers on all of the nodes. Args: redis_client: A client to the primary Redis shard. threads_stopped (threading.Event): A threading event used to signal to the thread that it should exit. """ pubsub_client = redis_client.pubsub(ignore_subscribe_messages=True) pubsub_client.subscribe(ray.gcs_utils.LOG_FILE_CHANNEL) localhost = services.get_node_ip_address() try: # Keep track of the number of consecutive log messages that have been # received with no break in between. If this number grows continually, # then the worker is probably not able to process the log messages as # rapidly as they are coming in. num_consecutive_messages_received = 0 while True: # Exit if we received a signal that we should stop. if threads_stopped.is_set(): return msg = pubsub_client.get_message() if msg is None: num_consecutive_messages_received = 0 threads_stopped.wait(timeout=0.01) continue num_consecutive_messages_received += 1 data = json.loads(ray.utils.decode(msg["data"])) if data["ip"] == localhost: for line in data["lines"]: print("{}{}(pid={}){} {}".format( colorama.Style.DIM, colorama.Fore.CYAN, data["pid"], colorama.Style.RESET_ALL, line)) else: for line in data["lines"]: print("{}{}(pid={}, ip={}){} {}".format( colorama.Style.DIM, colorama.Fore.CYAN, data["pid"], data["ip"], colorama.Style.RESET_ALL, line)) if (num_consecutive_messages_received % 100 == 0 and num_consecutive_messages_received > 0): logger.warning( "The driver may not be able to keep up with the " "stdout/stderr of the workers. To avoid forwarding logs " "to the driver, use 'ray.init(log_to_driver=False)'.") finally: # Close the pubsub client to avoid leaking file descriptors. pubsub_client.close()
[ "def", "print_logs", "(", "redis_client", ",", "threads_stopped", ")", ":", "pubsub_client", "=", "redis_client", ".", "pubsub", "(", "ignore_subscribe_messages", "=", "True", ")", "pubsub_client", ".", "subscribe", "(", "ray", ".", "gcs_utils", ".", "LOG_FILE_CHANNEL", ")", "localhost", "=", "services", ".", "get_node_ip_address", "(", ")", "try", ":", "# Keep track of the number of consecutive log messages that have been", "# received with no break in between. If this number grows continually,", "# then the worker is probably not able to process the log messages as", "# rapidly as they are coming in.", "num_consecutive_messages_received", "=", "0", "while", "True", ":", "# Exit if we received a signal that we should stop.", "if", "threads_stopped", ".", "is_set", "(", ")", ":", "return", "msg", "=", "pubsub_client", ".", "get_message", "(", ")", "if", "msg", "is", "None", ":", "num_consecutive_messages_received", "=", "0", "threads_stopped", ".", "wait", "(", "timeout", "=", "0.01", ")", "continue", "num_consecutive_messages_received", "+=", "1", "data", "=", "json", ".", "loads", "(", "ray", ".", "utils", ".", "decode", "(", "msg", "[", "\"data\"", "]", ")", ")", "if", "data", "[", "\"ip\"", "]", "==", "localhost", ":", "for", "line", "in", "data", "[", "\"lines\"", "]", ":", "print", "(", "\"{}{}(pid={}){} {}\"", ".", "format", "(", "colorama", ".", "Style", ".", "DIM", ",", "colorama", ".", "Fore", ".", "CYAN", ",", "data", "[", "\"pid\"", "]", ",", "colorama", ".", "Style", ".", "RESET_ALL", ",", "line", ")", ")", "else", ":", "for", "line", "in", "data", "[", "\"lines\"", "]", ":", "print", "(", "\"{}{}(pid={}, ip={}){} {}\"", ".", "format", "(", "colorama", ".", "Style", ".", "DIM", ",", "colorama", ".", "Fore", ".", "CYAN", ",", "data", "[", "\"pid\"", "]", ",", "data", "[", "\"ip\"", "]", ",", "colorama", ".", "Style", ".", "RESET_ALL", ",", "line", ")", ")", "if", "(", "num_consecutive_messages_received", "%", "100", "==", "0", "and", "num_consecutive_messages_received", ">", "0", ")", ":", "logger", ".", "warning", "(", "\"The driver may not be able to keep up with the \"", "\"stdout/stderr of the workers. To avoid forwarding logs \"", "\"to the driver, use 'ray.init(log_to_driver=False)'.\"", ")", "finally", ":", "# Close the pubsub client to avoid leaking file descriptors.", "pubsub_client", ".", "close", "(", ")" ]
Prints log messages from workers on all of the nodes. Args: redis_client: A client to the primary Redis shard. threads_stopped (threading.Event): A threading event used to signal to the thread that it should exit.
[ "Prints", "log", "messages", "from", "workers", "on", "all", "of", "the", "nodes", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/worker.py#L1526-L1575
train
Prints log messages from all of the nodes in the primary Redis shard.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,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vlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110010) + chr(0b1100 + 0o47) + '\065', 38787 - 38779), ehT0Px3KOsy9(chr(48) + chr(0b110101 + 0o72) + chr(529 - 476) + chr(0b110000 + 0o7), 0b1000), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(6407 - 6296) + chr(0b100010 + 0o21) + chr(49) + chr(0b101000 + 0o10), 16307 - 16299), ehT0Px3KOsy9(chr(532 - 484) + '\x6f' + '\x32' + chr(0b110101 + 0o1) + chr(1609 - 1560), 28620 - 28612), ehT0Px3KOsy9('\060' + chr(0b1100110 + 0o11) + chr(49) + chr(0b110001) + '\x36', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(4879 - 4768) + chr(710 - 661) + chr(55), 16583 - 16575), ehT0Px3KOsy9(chr(48) + '\157' + chr(49) + chr(0b110110) + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(745 - 697) + chr(0b1101111) + chr(0b11101 + 0o24) + chr(0b101011 + 0o5) + chr(718 - 669), ord("\x08")), ehT0Px3KOsy9(chr(1911 - 1863) + chr(0b1101111) + chr(1262 - 1211) + chr(53) + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b101101 + 0o102) + '\x31' + chr(52) + chr(735 - 682), 0o10), ehT0Px3KOsy9(chr(2166 - 2118) + chr(3243 - 3132) + chr(0b101111 + 0o2) + chr(0b110101) + chr(0b100101 + 0o15), 0b1000), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(0b1101111) + '\061' + chr(0b110100) + chr(370 - 317), 8), ehT0Px3KOsy9(chr(48) + chr(0b1001001 + 0o46) + '\062' + '\064' + chr(0b110011 + 0o0), 37527 - 37519), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(2461 - 2350) + chr(400 - 349) + '\064' + '\x33', 64147 - 64139), ehT0Px3KOsy9(chr(2135 - 2087) + chr(0b1101011 + 0o4) + chr(0b110010) + chr(1223 - 1174) + chr(0b110101), 6953 - 6945), ehT0Px3KOsy9(chr(48) + chr(7935 - 7824) + '\062' + chr(0b101010 + 0o12) + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(839 - 791) + chr(0b101000 + 0o107) + chr(0b100100 + 0o21) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(0b1100 + 0o44) + chr(111) + chr(0b110001) + chr(1735 - 1683), 0o10), ehT0Px3KOsy9(chr(1370 - 1322) + chr(6359 - 6248) + chr(0b110110) + '\x33', 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b101111 + 0o2) + chr(0b110001) + '\062', 40748 - 40740), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(51) + chr(0b1111 + 0o45) + chr(0b10010 + 0o41), 8), ehT0Px3KOsy9(chr(1142 - 1094) + chr(111) + '\x34', 35681 - 35673), ehT0Px3KOsy9('\x30' + '\x6f' + chr(177 - 128) + '\063' + chr(1037 - 989), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b101111 + 0o4) + '\066' + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(0b1101111) + '\062' + '\067' + chr(0b1011 + 0o50), ord("\x08")), ehT0Px3KOsy9(chr(1359 - 1311) + '\x6f' + '\062' + chr(2420 - 2367) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(50) + chr(0b101101 + 0o3) + chr(0b110101), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(197 - 149) + '\157' + chr(0b110100), 8), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b1000 + 0o52) + chr(308 - 255) + '\061', 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\063' + '\x37' + chr(0b110 + 0o57), 0b1000), ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(9594 - 9483) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(51) + chr(0b110101) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b100011 + 0o114) + '\063' + chr(49) + chr(1637 - 1582), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\065', 56442 - 56434), ehT0Px3KOsy9('\060' + chr(5246 - 5135) + chr(0b110001) + chr(0b110111) + '\067', 0o10), ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(0b1101111) + chr(0b110010) + chr(2460 - 2408) + chr(0b110011), 8), ehT0Px3KOsy9(chr(963 - 915) + '\x6f' + chr(0b11010 + 0o27) + chr(0b100000 + 0o26) + chr(0b110011), 0b1000), ehT0Px3KOsy9('\x30' + chr(5940 - 5829) + chr(0b110011) + chr(0b110001) + '\x35', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(5936 - 5825) + chr(0b110011) + chr(0b100111 + 0o13) + '\x30', 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + '\x6f' + chr(0b10000 + 0o45) + chr(0b10100 + 0o34), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xb3'), chr(2287 - 2187) + chr(0b1100101) + '\143' + chr(0b1101010 + 0o5) + chr(4218 - 4118) + '\x65')(chr(117) + '\x74' + '\146' + chr(1942 - 1897) + chr(0b10010 + 0o46)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def uM_OQLu94VlZ(znULerELFfBL, qDp7obBabn1r): z0ooCm7OTVi1 = znULerELFfBL.pubsub(ignore_subscribe_messages=ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(0b1001 + 0o146) + chr(0b111 + 0o52), 8)) xafqLlk3kkUe(z0ooCm7OTVi1, xafqLlk3kkUe(SXOLrMavuUCe(b'\xeeZ\xaa\xc2-}\x1c#\x88'), chr(0b100101 + 0o77) + chr(101) + chr(0b101 + 0o136) + chr(6715 - 6604) + chr(4768 - 4668) + chr(0b1011111 + 0o6))('\x75' + chr(0b110011 + 0o101) + chr(0b1000110 + 0o40) + chr(0b10101 + 0o30) + '\070'))(xafqLlk3kkUe(H9zaXRrGK6Cq.gcs_utils, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd1`\x8f\xee\x08F9\x04\xb2&"$\xed\xad\xc8\xed'), chr(0b1100100) + chr(6311 - 6210) + chr(99) + chr(0b10100 + 0o133) + chr(100) + chr(1476 - 1375))('\x75' + '\164' + chr(5317 - 5215) + chr(1341 - 1296) + '\070'))) MOyYe1fPYLcM = CCpJAZp2Upe6.get_node_ip_address() try: qqxKLHWbqHOV = ehT0Px3KOsy9(chr(0b10010 + 0o36) + '\x6f' + '\x30', 8) while ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b101010 + 0o7), 8): if xafqLlk3kkUe(qDp7obBabn1r, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf4\\\x97\xc2+{'), '\144' + '\x65' + chr(0b1010001 + 0o22) + chr(111) + chr(7703 - 7603) + chr(0b1100101))(chr(11661 - 11544) + '\x74' + chr(0b111 + 0o137) + chr(0b101101) + chr(56)))(): return jtbovtaIYjRB = z0ooCm7OTVi1.get_message() if jtbovtaIYjRB is None: qqxKLHWbqHOV = ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\060', 8) xafqLlk3kkUe(qDp7obBabn1r, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf4F\xa3\x889i\x0cy\x83(/3'), '\144' + '\145' + '\143' + chr(10981 - 10870) + '\x64' + chr(102 - 1))(chr(117) + chr(116) + chr(0b1100110) + chr(0b101101) + chr(56)))(timeout=0.01) continue qqxKLHWbqHOV += ehT0Px3KOsy9(chr(0b110000) + chr(0b1101 + 0o142) + chr(0b10 + 0o57), 8) ULnjp6D6efFH = fXk443epxtd5.loads(H9zaXRrGK6Cq.utils.decode(jtbovtaIYjRB[xafqLlk3kkUe(SXOLrMavuUCe(b'\xf9N\xbc\xd0'), chr(0b111101 + 0o47) + chr(1153 - 1052) + '\x63' + chr(10999 - 10888) + chr(2273 - 2173) + chr(0b1001011 + 0o32))(chr(117) + '\x74' + chr(0b1100110) + '\055' + chr(82 - 26))])) if ULnjp6D6efFH[xafqLlk3kkUe(SXOLrMavuUCe(b'\xf4_'), chr(0b1100100) + '\x65' + chr(0b1100011) + chr(6232 - 6121) + '\x64' + chr(0b1010101 + 0o20))('\x75' + chr(4689 - 4573) + chr(102) + '\x2d' + chr(56))] == MOyYe1fPYLcM: for LycYkDpyelF6 in ULnjp6D6efFH[xafqLlk3kkUe(SXOLrMavuUCe(b'\xf1F\xa6\xd4='), '\144' + chr(3450 - 3349) + '\x63' + '\157' + chr(0b1101 + 0o127) + '\145')(chr(117) + '\164' + chr(0b1100 + 0o132) + chr(508 - 463) + chr(0b10010 + 0o46))]: zLUzGokYBM2Z(xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b'\xe6R\xb3\xccf\x7f\x1c%\xd0\x1e\x17L\xd8\x9e\xad\xdaU'), chr(100) + chr(101) + chr(0b1100011) + '\x6f' + chr(0b1011100 + 0o10) + '\x65')(chr(0b1110101) + '\x74' + chr(102) + '\055' + chr(3136 - 3080)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xcb\x1b\xba\xde\x06n&r\xbd\x15\x0f\x0f'), chr(1231 - 1131) + chr(6561 - 6460) + '\143' + chr(0b1111 + 0o140) + chr(9922 - 9822) + chr(0b1100101))(chr(12185 - 12068) + chr(116) + '\x66' + chr(0b101101) + chr(0b101110 + 0o12)))(xafqLlk3kkUe(nCKQDOkeKO9n.Style, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd9f\x85'), '\x64' + chr(2357 - 2256) + chr(1709 - 1610) + '\157' + '\144' + '\145')(chr(117) + chr(0b1110100) + chr(0b101110 + 0o70) + chr(0b101101) + '\x38')), xafqLlk3kkUe(nCKQDOkeKO9n.Fore, xafqLlk3kkUe(SXOLrMavuUCe(b'\xdev\x89\xff'), '\144' + chr(0b1001100 + 0o31) + chr(0b110110 + 0o55) + '\x6f' + chr(8360 - 8260) + chr(3177 - 3076))(chr(0b1001100 + 0o51) + chr(0b1110100) + chr(102) + '\055' + chr(0b101 + 0o63))), ULnjp6D6efFH[xafqLlk3kkUe(SXOLrMavuUCe(b'\xedF\xac'), '\x64' + '\x65' + chr(0b110100 + 0o57) + chr(111) + chr(100) + chr(101))('\165' + chr(0b1100101 + 0o17) + chr(0b1100110) + '\055' + chr(2746 - 2690))], xafqLlk3kkUe(nCKQDOkeKO9n.Style, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcfj\x9b\xf4\x1aP4\r\xa1'), chr(0b1000010 + 0o42) + chr(101) + '\143' + '\157' + chr(0b1100100) + chr(101))('\165' + chr(7594 - 7478) + chr(102) + '\055' + '\x38')), LycYkDpyelF6)) else: for LycYkDpyelF6 in ULnjp6D6efFH[xafqLlk3kkUe(SXOLrMavuUCe(b'\xf1F\xa6\xd4='), chr(100) + chr(101) + chr(5645 - 5546) + chr(0b1101111) + chr(0b1100100) + '\145')(chr(0b1110101) + chr(0b1110100) + chr(0b11011 + 0o113) + chr(45) + '\x38')]: zLUzGokYBM2Z(xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b'\xe6R\xb3\xccf\x7f\x1c%\xd0\x1e\x17I\x83\x8a\xfd\x9cSq\x1a1\x9e$#\x8e'), chr(100) + chr(101) + chr(7740 - 7641) + chr(111) + '\144' + chr(101))(chr(8692 - 8575) + '\x74' + chr(0b1001101 + 0o31) + chr(0b101101) + '\x38'), xafqLlk3kkUe(SXOLrMavuUCe(b'\xcb\x1b\xba\xde\x06n&r\xbd\x15\x0f\x0f'), '\x64' + chr(9610 - 9509) + chr(0b111100 + 0o47) + chr(4096 - 3985) + chr(0b1100100) + chr(595 - 494))(chr(0b1110101) + chr(0b1110100) + '\x66' + chr(1335 - 1290) + chr(1981 - 1925)))(xafqLlk3kkUe(nCKQDOkeKO9n.Style, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd9f\x85'), '\144' + chr(5764 - 5663) + chr(99) + chr(0b10011 + 0o134) + '\144' + chr(0b101000 + 0o75))(chr(0b111101 + 0o70) + chr(0b10 + 0o162) + '\146' + '\055' + '\x38')), xafqLlk3kkUe(nCKQDOkeKO9n.Fore, xafqLlk3kkUe(SXOLrMavuUCe(b'\xdev\x89\xff'), '\144' + chr(0b1010111 + 0o16) + chr(6496 - 6397) + chr(0b1101111) + chr(100) + chr(0b1100 + 0o131))('\165' + chr(0b1110100) + chr(1220 - 1118) + '\x2d' + '\x38')), ULnjp6D6efFH[xafqLlk3kkUe(SXOLrMavuUCe(b'\xedF\xac'), '\x64' + chr(0b1100101) + chr(0b11010 + 0o111) + chr(0b1101111) + '\144' + chr(101))(chr(0b1110101) + chr(0b1011000 + 0o34) + chr(4275 - 4173) + chr(45) + chr(56))], ULnjp6D6efFH[xafqLlk3kkUe(SXOLrMavuUCe(b'\xf4_'), '\144' + chr(0b1100101) + chr(0b11100 + 0o107) + '\x6f' + chr(100) + chr(101))(chr(9170 - 9053) + '\164' + '\146' + chr(0b100010 + 0o13) + chr(1845 - 1789))], xafqLlk3kkUe(nCKQDOkeKO9n.Style, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcfj\x9b\xf4\x1aP4\r\xa1'), '\x64' + '\x65' + '\143' + '\157' + chr(0b1100100) + chr(2117 - 2016))('\x75' + chr(6983 - 6867) + chr(3403 - 3301) + '\055' + chr(56))), LycYkDpyelF6)) if qqxKLHWbqHOV % ehT0Px3KOsy9(chr(0b11001 + 0o27) + chr(0b1101111) + '\061' + chr(52) + chr(0b10111 + 0o35), 0o10) == ehT0Px3KOsy9('\x30' + chr(0b1100011 + 0o14) + chr(2159 - 2111), 8) and qqxKLHWbqHOV > ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(481 - 433), 8): xafqLlk3kkUe(hdK8qOUhR6Or, xafqLlk3kkUe(SXOLrMavuUCe(b"\xeaN\xba\xdf'a\x12"), chr(0b101000 + 0o74) + chr(0b11111 + 0o106) + chr(99) + chr(0b1101111) + '\144' + chr(0b1100101))(chr(117) + '\164' + '\146' + '\055' + chr(0b1 + 0o67)))(xafqLlk3kkUe(SXOLrMavuUCe(b"\xc9G\xad\x91*}\x1c7\x88\x17J\x08\xc2\x9a\xad\xcfGx\x13(\x86$9\x91\xd7\xcc\xa5tk\x89\x96d\x8d\xbf%\n\xd3S\xba\xb9\xe9G\xe8\xc5&jU2\x99\x01\x05\x10\xd7\xcc\xfe\xd5LiA8\xc3k>\xd3\xcf\xc1\xe0 s\xc6\x8fj\x8d\xbdvQ\x83'\xa2\xf0\xfcY\xa7\xd8*/\x13.\x9f\x12\x0b\x17\xc7\x8a\xe3\xc6\x08`\\-\x90$,\x9c\x9b\xdd\xede$\xcd\x8fh\x9e\xaawS\x83\x06\xbe\xb5\xbd\x08\xba\xd07!\x1c/\x84\x11B\t\xcc\x84\xd2\xd5GSW8\x8ar=\x81\x86\xef\xe4lw\xcc\xd4&\xc6"), chr(0b1100 + 0o130) + chr(0b10 + 0o143) + chr(8045 - 7946) + chr(0b1101111) + chr(0b1100100) + chr(2782 - 2681))(chr(117) + chr(0b1001111 + 0o45) + chr(102) + chr(0b1101 + 0o40) + '\070')) finally: xafqLlk3kkUe(z0ooCm7OTVi1, xafqLlk3kkUe(SXOLrMavuUCe(b'\xfeC\xa7\xc2+'), chr(6392 - 6292) + '\145' + chr(99) + chr(0b1010011 + 0o34) + chr(100) + chr(9987 - 9886))('\x75' + chr(0b1110100) + '\x66' + '\x2d' + chr(0b100010 + 0o26)))()
ray-project/ray
python/ray/worker.py
print_error_messages_raylet
def print_error_messages_raylet(task_error_queue, threads_stopped): """Prints message received in the given output queue. This checks periodically if any un-raised errors occured in the background. Args: task_error_queue (queue.Queue): A queue used to receive errors from the thread that listens to Redis. threads_stopped (threading.Event): A threading event used to signal to the thread that it should exit. """ while True: # Exit if we received a signal that we should stop. if threads_stopped.is_set(): return try: error, t = task_error_queue.get(block=False) except queue.Empty: threads_stopped.wait(timeout=0.01) continue # Delay errors a little bit of time to attempt to suppress redundant # messages originating from the worker. while t + UNCAUGHT_ERROR_GRACE_PERIOD > time.time(): threads_stopped.wait(timeout=1) if threads_stopped.is_set(): break if t < last_task_error_raise_time + UNCAUGHT_ERROR_GRACE_PERIOD: logger.debug("Suppressing error from worker: {}".format(error)) else: logger.error( "Possible unhandled error from worker: {}".format(error))
python
def print_error_messages_raylet(task_error_queue, threads_stopped): """Prints message received in the given output queue. This checks periodically if any un-raised errors occured in the background. Args: task_error_queue (queue.Queue): A queue used to receive errors from the thread that listens to Redis. threads_stopped (threading.Event): A threading event used to signal to the thread that it should exit. """ while True: # Exit if we received a signal that we should stop. if threads_stopped.is_set(): return try: error, t = task_error_queue.get(block=False) except queue.Empty: threads_stopped.wait(timeout=0.01) continue # Delay errors a little bit of time to attempt to suppress redundant # messages originating from the worker. while t + UNCAUGHT_ERROR_GRACE_PERIOD > time.time(): threads_stopped.wait(timeout=1) if threads_stopped.is_set(): break if t < last_task_error_raise_time + UNCAUGHT_ERROR_GRACE_PERIOD: logger.debug("Suppressing error from worker: {}".format(error)) else: logger.error( "Possible unhandled error from worker: {}".format(error))
[ "def", "print_error_messages_raylet", "(", "task_error_queue", ",", "threads_stopped", ")", ":", "while", "True", ":", "# Exit if we received a signal that we should stop.", "if", "threads_stopped", ".", "is_set", "(", ")", ":", "return", "try", ":", "error", ",", "t", "=", "task_error_queue", ".", "get", "(", "block", "=", "False", ")", "except", "queue", ".", "Empty", ":", "threads_stopped", ".", "wait", "(", "timeout", "=", "0.01", ")", "continue", "# Delay errors a little bit of time to attempt to suppress redundant", "# messages originating from the worker.", "while", "t", "+", "UNCAUGHT_ERROR_GRACE_PERIOD", ">", "time", ".", "time", "(", ")", ":", "threads_stopped", ".", "wait", "(", "timeout", "=", "1", ")", "if", "threads_stopped", ".", "is_set", "(", ")", ":", "break", "if", "t", "<", "last_task_error_raise_time", "+", "UNCAUGHT_ERROR_GRACE_PERIOD", ":", "logger", ".", "debug", "(", "\"Suppressing error from worker: {}\"", ".", "format", "(", "error", ")", ")", "else", ":", "logger", ".", "error", "(", "\"Possible unhandled error from worker: {}\"", ".", "format", "(", "error", ")", ")" ]
Prints message received in the given output queue. This checks periodically if any un-raised errors occured in the background. Args: task_error_queue (queue.Queue): A queue used to receive errors from the thread that listens to Redis. threads_stopped (threading.Event): A threading event used to signal to the thread that it should exit.
[ "Prints", "message", "received", "in", "the", "given", "output", "queue", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/worker.py#L1578-L1610
train
Prints the messages received from the given task_error_queue to the given output queue.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHA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kZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + chr(111) + '\062' + chr(0b110110) + chr(1511 - 1462), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(951 - 901) + chr(837 - 785) + '\064', 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(2157 - 2108) + '\061' + chr(1696 - 1641), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(50) + chr(733 - 682) + chr(2932 - 2877), 10337 - 10329), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110011) + '\x37' + '\063', 0b1000), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(0b100 + 0o153) + '\x31' + chr(0b110110) + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(2141 - 2093) + '\x6f' + chr(51) + chr(0b110000) + chr(2888 - 2833), ord("\x08")), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(977 - 866) + '\x34' + chr(51), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + '\062' + '\064' + chr(0b1000 + 0o54), 8), ehT0Px3KOsy9(chr(1734 - 1686) + '\157' + chr(0b110100) + chr(1548 - 1496), 40802 - 40794), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x32' + chr(51) + chr(1000 - 952), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110011) + chr(919 - 867) + chr(2416 - 2365), ord("\x08")), ehT0Px3KOsy9(chr(0b11001 + 0o27) + chr(0b1101111) + '\066' + '\x31', 28945 - 28937), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b100100 + 0o15) + chr(0b110001), 47506 - 47498), ehT0Px3KOsy9(chr(48) + chr(0b110100 + 0o73) + chr(0b110001) + chr(55) + chr(51), 51799 - 51791), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(0b1101111) + '\x33' + chr(51) + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(0b11101 + 0o23) + '\x6f' + chr(0b110001) + '\062' + chr(54), 26482 - 26474), ehT0Px3KOsy9('\x30' + chr(10585 - 10474) + chr(51) + chr(0b110010) + '\x30', 41066 - 41058), ehT0Px3KOsy9(chr(1916 - 1868) + chr(111) + chr(50) + '\065' + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1000100 + 0o53) + '\x32' + '\x30' + '\067', ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(1567 - 1517) + chr(48) + '\067', 8), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(49) + chr(1936 - 1886) + chr(2211 - 2162), 0o10), ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(0b1101111) + chr(609 - 560) + '\067' + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(0b1101111) + chr(0b10110 + 0o35) + '\060' + chr(351 - 298), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110011) + chr(54), 29201 - 29193), ehT0Px3KOsy9(chr(0b101011 + 0o5) + chr(0b1101111) + chr(257 - 206) + chr(54) + '\066', 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x35' + chr(49), 31656 - 31648), ehT0Px3KOsy9(chr(48) + '\157' + '\x33' + chr(2434 - 2384) + chr(98 - 44), 0b1000), ehT0Px3KOsy9(chr(0b11000 + 0o30) + '\157' + chr(0b110100 + 0o1) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\x33' + chr(2538 - 2485) + chr(0b0 + 0o66), ord("\x08")), ehT0Px3KOsy9(chr(1087 - 1039) + '\x6f' + chr(2337 - 2287) + '\066' + '\066', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(333 - 284) + chr(0b110101) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(1569 - 1458) + chr(0b11010 + 0o30) + '\061' + chr(1685 - 1631), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(2376 - 2326) + '\066' + '\060', ord("\x08")), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(11543 - 11432) + chr(51) + chr(1199 - 1150) + '\x37', ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(0b10001 + 0o41) + '\065' + chr(48), 0b1000), ehT0Px3KOsy9(chr(0b101101 + 0o3) + '\157' + '\x33' + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\061' + chr(664 - 609) + '\x32', 0b1000), ehT0Px3KOsy9('\x30' + chr(8160 - 8049) + chr(51) + '\x30' + chr(0b101 + 0o54), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x32' + chr(0b101010 + 0o12) + chr(0b10000 + 0o44), 8)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + '\x6f' + chr(1535 - 1482) + chr(0b110000), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x9f'), '\x64' + '\x65' + '\143' + chr(0b1101111) + chr(100) + chr(101))('\x75' + chr(116) + chr(3446 - 3344) + chr(0b101101) + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def fuHCBOCDsgZ7(CSBOsS97eclE, qDp7obBabn1r): while ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(49), 0b1000): if xafqLlk3kkUe(qDp7obBabn1r, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd8\xd7\x10\xec\x9e\x04'), chr(0b1100100) + chr(0b1100101) + '\x63' + chr(111) + '\144' + chr(0b1100101))('\165' + chr(0b1110100) + '\x66' + chr(0b1110 + 0o37) + chr(56)))(): return try: (EUdPatOS1wx0, YeT3l7JgTbWR) = CSBOsS97eclE.get(block=ehT0Px3KOsy9('\060' + '\157' + chr(48), 0b1000)) except xafqLlk3kkUe(Mg4Qu1R8AQg2, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf4\xc9?\xeb\x82'), '\x64' + chr(0b110111 + 0o56) + chr(0b1100011) + chr(111) + chr(100) + '\145')(chr(2249 - 2132) + '\x74' + chr(3865 - 3763) + chr(45) + chr(0b11110 + 0o32))): xafqLlk3kkUe(qDp7obBabn1r, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd8\xcd$\xa6\x8c\x16\xbe\x1b\xcai\xdd\xb5'), chr(2166 - 2066) + '\x65' + chr(99) + chr(111) + '\x64' + '\145')('\165' + chr(1717 - 1601) + '\x66' + chr(1177 - 1132) + chr(56)))(timeout=0.01) continue while YeT3l7JgTbWR + N5_OYJhuQmJ9 > xafqLlk3kkUe(ltvhPP4VhXre, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc5\xcd"\xfa'), chr(0b1010001 + 0o23) + chr(0b1100101) + '\x63' + chr(111) + '\144' + chr(0b11110 + 0o107))(chr(117) + '\x74' + chr(4508 - 4406) + '\x2d' + '\x38'))(): xafqLlk3kkUe(qDp7obBabn1r, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd8\xcd$\xa6\x8c\x16\xbe\x1b\xcai\xdd\xb5'), '\x64' + '\145' + '\143' + chr(111) + chr(8447 - 8347) + '\x65')(chr(0b1110101) + chr(0b1110100) + chr(10119 - 10017) + chr(45) + chr(56)))(timeout=ehT0Px3KOsy9('\x30' + '\x6f' + chr(883 - 834), 8)) if xafqLlk3kkUe(qDp7obBabn1r, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd8\xd7\x10\xec\x9e\x04'), chr(100) + chr(0b1100101) + chr(0b1100011) + '\x6f' + chr(100) + '\145')('\x75' + chr(4473 - 4357) + chr(0b1100110) + '\055' + chr(0b101011 + 0o15)))(): break if YeT3l7JgTbWR < qUhYyFh6LYHH + N5_OYJhuQmJ9: xafqLlk3kkUe(hdK8qOUhR6Or, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd5\xc1-\xea\x9c'), '\x64' + chr(0b1100101) + chr(0b10000 + 0o123) + chr(111) + '\x64' + chr(0b1100101))(chr(0b1001 + 0o154) + chr(116) + chr(102) + '\055' + chr(0b101100 + 0o14)))(xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b'\xe2\xd1?\xef\x89\x15\xb4P\xcdJ\xff\xc3T{\t\xb1$\xf0\xca\xf5\xe8<^\xb2q\x84B\xb3\\\xd4\x96\x12\xf3'), chr(100) + chr(7458 - 7357) + chr(99) + '\157' + chr(100) + chr(7908 - 7807))(chr(2990 - 2873) + '\164' + '\146' + chr(45) + chr(846 - 790)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xe7\x90=\xf0\xb3\x11\x94\x10\xf4T\xfd\x89'), chr(0b1100100) + '\x65' + '\143' + chr(0b1011100 + 0o23) + chr(0b1100001 + 0o3) + chr(0b1100101))(chr(117) + chr(116) + '\x66' + '\055' + '\070'))(EUdPatOS1wx0)) else: xafqLlk3kkUe(hdK8qOUhR6Or, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf4\xf1+\xcf\x9a\x04\x88p\x95S\xe0\xd3'), chr(0b1100100) + chr(0b1010011 + 0o22) + chr(0b10 + 0o141) + chr(0b1001100 + 0o43) + chr(0b1001 + 0o133) + '\x65')(chr(0b1110101) + chr(12455 - 12339) + chr(1994 - 1892) + chr(0b101101) + chr(3112 - 3056)))(xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b'\xe1\xcb<\xec\x92\x12\xabF\x84Q\xf6\x8bPg\x1f\xb23\xb4\x8c\xe2\xf5#\x11\xb7>\x90[\xb9C\xce\xc1\x06\xfc\xdb\xaa\xda&Z\xba\xd9'), '\x64' + chr(0b1000100 + 0o41) + chr(3701 - 3602) + chr(0b101000 + 0o107) + chr(0b1010010 + 0o22) + '\145')(chr(0b111111 + 0o66) + '\x74' + chr(487 - 385) + chr(45) + '\x38'), xafqLlk3kkUe(SXOLrMavuUCe(b'\xe7\x90=\xf0\xb3\x11\x94\x10\xf4T\xfd\x89'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(0b1101 + 0o142) + chr(0b1100100) + chr(0b1100101))(chr(117) + chr(0b1110100) + chr(0b1100110) + '\x2d' + chr(56)))(EUdPatOS1wx0))
ray-project/ray
python/ray/worker.py
listen_error_messages_raylet
def listen_error_messages_raylet(worker, task_error_queue, threads_stopped): """Listen to error messages in the background on the driver. This runs in a separate thread on the driver and pushes (error, time) tuples to the output queue. Args: worker: The worker class that this thread belongs to. task_error_queue (queue.Queue): A queue used to communicate with the thread that prints the errors found by this thread. threads_stopped (threading.Event): A threading event used to signal to the thread that it should exit. """ worker.error_message_pubsub_client = worker.redis_client.pubsub( ignore_subscribe_messages=True) # Exports that are published after the call to # error_message_pubsub_client.subscribe and before the call to # error_message_pubsub_client.listen will still be processed in the loop. # Really we should just subscribe to the errors for this specific job. # However, currently all errors seem to be published on the same channel. error_pubsub_channel = str( ray.gcs_utils.TablePubsub.ERROR_INFO).encode("ascii") worker.error_message_pubsub_client.subscribe(error_pubsub_channel) # worker.error_message_pubsub_client.psubscribe("*") try: # Get the exports that occurred before the call to subscribe. error_messages = global_state.error_messages(worker.task_driver_id) for error_message in error_messages: logger.error(error_message) while True: # Exit if we received a signal that we should stop. if threads_stopped.is_set(): return msg = worker.error_message_pubsub_client.get_message() if msg is None: threads_stopped.wait(timeout=0.01) continue gcs_entry = ray.gcs_utils.GcsTableEntry.GetRootAsGcsTableEntry( msg["data"], 0) assert gcs_entry.EntriesLength() == 1 error_data = ray.gcs_utils.ErrorTableData.GetRootAsErrorTableData( gcs_entry.Entries(0), 0) driver_id = error_data.DriverId() if driver_id not in [ worker.task_driver_id.binary(), DriverID.nil().binary() ]: continue error_message = ray.utils.decode(error_data.ErrorMessage()) if (ray.utils.decode( error_data.Type()) == ray_constants.TASK_PUSH_ERROR): # Delay it a bit to see if we can suppress it task_error_queue.put((error_message, time.time())) else: logger.error(error_message) finally: # Close the pubsub client to avoid leaking file descriptors. worker.error_message_pubsub_client.close()
python
def listen_error_messages_raylet(worker, task_error_queue, threads_stopped): """Listen to error messages in the background on the driver. This runs in a separate thread on the driver and pushes (error, time) tuples to the output queue. Args: worker: The worker class that this thread belongs to. task_error_queue (queue.Queue): A queue used to communicate with the thread that prints the errors found by this thread. threads_stopped (threading.Event): A threading event used to signal to the thread that it should exit. """ worker.error_message_pubsub_client = worker.redis_client.pubsub( ignore_subscribe_messages=True) # Exports that are published after the call to # error_message_pubsub_client.subscribe and before the call to # error_message_pubsub_client.listen will still be processed in the loop. # Really we should just subscribe to the errors for this specific job. # However, currently all errors seem to be published on the same channel. error_pubsub_channel = str( ray.gcs_utils.TablePubsub.ERROR_INFO).encode("ascii") worker.error_message_pubsub_client.subscribe(error_pubsub_channel) # worker.error_message_pubsub_client.psubscribe("*") try: # Get the exports that occurred before the call to subscribe. error_messages = global_state.error_messages(worker.task_driver_id) for error_message in error_messages: logger.error(error_message) while True: # Exit if we received a signal that we should stop. if threads_stopped.is_set(): return msg = worker.error_message_pubsub_client.get_message() if msg is None: threads_stopped.wait(timeout=0.01) continue gcs_entry = ray.gcs_utils.GcsTableEntry.GetRootAsGcsTableEntry( msg["data"], 0) assert gcs_entry.EntriesLength() == 1 error_data = ray.gcs_utils.ErrorTableData.GetRootAsErrorTableData( gcs_entry.Entries(0), 0) driver_id = error_data.DriverId() if driver_id not in [ worker.task_driver_id.binary(), DriverID.nil().binary() ]: continue error_message = ray.utils.decode(error_data.ErrorMessage()) if (ray.utils.decode( error_data.Type()) == ray_constants.TASK_PUSH_ERROR): # Delay it a bit to see if we can suppress it task_error_queue.put((error_message, time.time())) else: logger.error(error_message) finally: # Close the pubsub client to avoid leaking file descriptors. worker.error_message_pubsub_client.close()
[ "def", "listen_error_messages_raylet", "(", "worker", ",", "task_error_queue", ",", "threads_stopped", ")", ":", "worker", ".", "error_message_pubsub_client", "=", "worker", ".", "redis_client", ".", "pubsub", "(", "ignore_subscribe_messages", "=", "True", ")", "# Exports that are published after the call to", "# error_message_pubsub_client.subscribe and before the call to", "# error_message_pubsub_client.listen will still be processed in the loop.", "# Really we should just subscribe to the errors for this specific job.", "# However, currently all errors seem to be published on the same channel.", "error_pubsub_channel", "=", "str", "(", "ray", ".", "gcs_utils", ".", "TablePubsub", ".", "ERROR_INFO", ")", ".", "encode", "(", "\"ascii\"", ")", "worker", ".", "error_message_pubsub_client", ".", "subscribe", "(", "error_pubsub_channel", ")", "# worker.error_message_pubsub_client.psubscribe(\"*\")", "try", ":", "# Get the exports that occurred before the call to subscribe.", "error_messages", "=", "global_state", ".", "error_messages", "(", "worker", ".", "task_driver_id", ")", "for", "error_message", "in", "error_messages", ":", "logger", ".", "error", "(", "error_message", ")", "while", "True", ":", "# Exit if we received a signal that we should stop.", "if", "threads_stopped", ".", "is_set", "(", ")", ":", "return", "msg", "=", "worker", ".", "error_message_pubsub_client", ".", "get_message", "(", ")", "if", "msg", "is", "None", ":", "threads_stopped", ".", "wait", "(", "timeout", "=", "0.01", ")", "continue", "gcs_entry", "=", "ray", ".", "gcs_utils", ".", "GcsTableEntry", ".", "GetRootAsGcsTableEntry", "(", "msg", "[", "\"data\"", "]", ",", "0", ")", "assert", "gcs_entry", ".", "EntriesLength", "(", ")", "==", "1", "error_data", "=", "ray", ".", "gcs_utils", ".", "ErrorTableData", ".", "GetRootAsErrorTableData", "(", "gcs_entry", ".", "Entries", "(", "0", ")", ",", "0", ")", "driver_id", "=", "error_data", ".", "DriverId", "(", ")", "if", "driver_id", "not", "in", "[", "worker", ".", "task_driver_id", ".", "binary", "(", ")", ",", "DriverID", ".", "nil", "(", ")", ".", "binary", "(", ")", "]", ":", "continue", "error_message", "=", "ray", ".", "utils", ".", "decode", "(", "error_data", ".", "ErrorMessage", "(", ")", ")", "if", "(", "ray", ".", "utils", ".", "decode", "(", "error_data", ".", "Type", "(", ")", ")", "==", "ray_constants", ".", "TASK_PUSH_ERROR", ")", ":", "# Delay it a bit to see if we can suppress it", "task_error_queue", ".", "put", "(", "(", "error_message", ",", "time", ".", "time", "(", ")", ")", ")", "else", ":", "logger", ".", "error", "(", "error_message", ")", "finally", ":", "# Close the pubsub client to avoid leaking file descriptors.", "worker", ".", "error_message_pubsub_client", ".", "close", "(", ")" ]
Listen to error messages in the background on the driver. This runs in a separate thread on the driver and pushes (error, time) tuples to the output queue. Args: worker: The worker class that this thread belongs to. task_error_queue (queue.Queue): A queue used to communicate with the thread that prints the errors found by this thread. threads_stopped (threading.Event): A threading event used to signal to the thread that it should exit.
[ "Listen", "to", "error", "messages", "in", "the", "background", "on", "the", "driver", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/worker.py#L1613-L1675
train
Listen to error messages in the background on the given task_error_queue.
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Wp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b111 + 0o51) + '\x6f' + chr(50) + chr(0b110100) + chr(52), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b101101 + 0o6) + '\x32' + chr(0b100111 + 0o16), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + '\063' + chr(49) + chr(0b110001), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x36' + chr(0b1 + 0o60), 0b1000), ehT0Px3KOsy9(chr(48) + chr(10045 - 9934) + '\063' + chr(0b110110) + '\064', 29148 - 29140), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(111) + chr(51) + '\064' + chr(0b110001), 43268 - 43260), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(51) + chr(53) + chr(49), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + '\062' + '\065' + chr(1977 - 1925), 0b1000), ehT0Px3KOsy9(chr(48) + chr(5842 - 5731) + chr(319 - 270) + '\062' + chr(0b1011 + 0o51), 0b1000), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(0b1101111) + chr(49) + chr(0b110111) + '\x36', 0b1000), ehT0Px3KOsy9('\060' + chr(11924 - 11813) + chr(0b101110 + 0o5) + chr(0b110011) + '\x35', 13938 - 13930), ehT0Px3KOsy9(chr(48) + '\157' + '\062' + chr(0b100110 + 0o17) + chr(1747 - 1699), 4777 - 4769), ehT0Px3KOsy9(chr(0b110000 + 0o0) + '\157' + chr(0b11010 + 0o30) + '\063' + chr(0b110011), 10216 - 10208), ehT0Px3KOsy9(chr(0b100001 + 0o17) + chr(111) + '\063' + chr(2627 - 2573) + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(49) + chr(51) + chr(2886 - 2832), 0b1000), ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(8651 - 8540) + chr(0b100111 + 0o12) + chr(55) + chr(51), 0b1000), ehT0Px3KOsy9(chr(1661 - 1613) + '\157' + chr(912 - 863) + chr(0b110101) + chr(1967 - 1915), ord("\x08")), ehT0Px3KOsy9(chr(0b100001 + 0o17) + '\157' + chr(1951 - 1900) + chr(0b0 + 0o67) + '\x36', 23704 - 23696), ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(9293 - 9182) + chr(0b110010) + chr(0b100101 + 0o13) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(48) + chr(6742 - 6631) + '\061' + chr(0b110010) + chr(2323 - 2272), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(3908 - 3797) + '\x33' + '\x33' + chr(55), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\062' + '\x37' + chr(2616 - 2563), 53634 - 53626), ehT0Px3KOsy9(chr(1793 - 1745) + chr(0b1101111) + chr(0b1011 + 0o53) + chr(0b100000 + 0o22), 35375 - 35367), ehT0Px3KOsy9(chr(48) + chr(12140 - 12029) + chr(49) + chr(50) + chr(55), 0o10), ehT0Px3KOsy9(chr(1110 - 1062) + '\x6f' + chr(51) + chr(0b100 + 0o63) + chr(0b110010), 8386 - 8378), ehT0Px3KOsy9(chr(1434 - 1386) + chr(111) + '\x31' + chr(2036 - 1984) + chr(0b110110), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(50) + '\062' + chr(49), 9604 - 9596), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b11001 + 0o30) + '\065' + chr(54), 443 - 435), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x31' + chr(0b110101 + 0o2) + '\x35', 0b1000), ehT0Px3KOsy9(chr(0b10 + 0o56) + '\x6f' + chr(1459 - 1410) + chr(1468 - 1418), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + '\061' + '\060' + '\061', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x31' + chr(54) + chr(0b1011 + 0o47), 57234 - 57226), ehT0Px3KOsy9('\060' + '\x6f' + '\x31' + chr(0b100001 + 0o17) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(0b1011 + 0o45) + chr(111) + chr(1566 - 1517) + chr(0b101011 + 0o13) + '\063', 11414 - 11406), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110011) + chr(0b110011) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x32' + '\060' + '\062', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + '\x35' + chr(53), 0o10), ehT0Px3KOsy9(chr(0b10101 + 0o33) + '\x6f' + '\x34' + '\060', ord("\x08")), ehT0Px3KOsy9(chr(1157 - 1109) + chr(0b1000001 + 0o56) + chr(0b1011 + 0o50) + chr(0b110000 + 0o3) + '\063', 8), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x36' + '\065', 43311 - 43303)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(1509 - 1461) + chr(11902 - 11791) + chr(0b100100 + 0o21) + '\060', ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x8a'), chr(0b1100100) + chr(0b1100101) + chr(0b100001 + 0o102) + chr(111) + chr(0b1100100) + chr(0b111100 + 0o51))(chr(0b1110101) + chr(0b1010 + 0o152) + chr(102) + '\x2d' + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def Lf6k93ia4dDl(sijXcSaDomT1, CSBOsS97eclE, qDp7obBabn1r): sijXcSaDomT1.JvAWKhbx_gUO = sijXcSaDomT1.redis_client.pubsub(ignore_subscribe_messages=ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(11432 - 11321) + chr(0b110001), 0b1000)) vTHEFseEV7Ym = M8_cKLkHVB2V(H9zaXRrGK6Cq.gcs_utils.TablePubsub.ERROR_INFO).encode(xafqLlk3kkUe(SXOLrMavuUCe(b'\xc5\xa6\xaaX\x9d'), chr(0b1000010 + 0o42) + '\x65' + chr(0b1100011) + '\x6f' + chr(9135 - 9035) + chr(5416 - 5315))('\x75' + '\x74' + '\146' + chr(0b10011 + 0o32) + '\070')) xafqLlk3kkUe(sijXcSaDomT1.error_message_pubsub_client, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd7\xa0\xabB\x97\x93\x80\xce1'), '\144' + '\x65' + chr(99) + chr(0b1101111) + '\x64' + '\x65')('\x75' + chr(12519 - 12403) + chr(102) + chr(0b1010 + 0o43) + '\x38'))(vTHEFseEV7Ym) try: uFU8KWzExuZz = wLpAFVq6NX6z.error_messages(sijXcSaDomT1.task_driver_id) for RACuGzVUu2U8 in uFU8KWzExuZz: xafqLlk3kkUe(hdK8qOUhR6Or, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe1\x80\xada\x95\x95\xa6\xffe\t\xa5\x98'), chr(0b1100100) + chr(101) + '\x63' + chr(0b1101111) + chr(0b1001100 + 0o30) + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + chr(102) + '\x2d' + '\070'))(RACuGzVUu2U8) while ehT0Px3KOsy9(chr(534 - 486) + '\x6f' + '\061', 8): if xafqLlk3kkUe(qDp7obBabn1r, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcd\xa6\x96B\x91\x95'), chr(0b1100100) + chr(9043 - 8942) + chr(0b100010 + 0o101) + '\157' + '\144' + '\x65')(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + '\x2d' + '\x38'))(): return jtbovtaIYjRB = sijXcSaDomT1.error_message_pubsub_client.get_message() if jtbovtaIYjRB is None: xafqLlk3kkUe(qDp7obBabn1r, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcd\xbc\xa2\x08\x83\x87\x90\x94:3\x98\xfe'), chr(6800 - 6700) + chr(5592 - 5491) + '\x63' + '\157' + chr(0b1010110 + 0o16) + chr(0b1100101))('\165' + chr(0b10101 + 0o137) + chr(1486 - 1384) + '\x2d' + chr(1696 - 1640)))(timeout=0.01) continue T0e_4q2U4LsU = H9zaXRrGK6Cq.gcs_utils.GcsTableEntry.GetRootAsGcsTableEntry(jtbovtaIYjRB[xafqLlk3kkUe(SXOLrMavuUCe(b'\xc0\xb4\xbdP'), chr(2004 - 1904) + chr(0b1100101) + chr(0b1000001 + 0o42) + chr(111) + chr(0b100011 + 0o101) + chr(101))(chr(117) + chr(116) + chr(0b1100110) + chr(0b11111 + 0o16) + chr(56))], ehT0Px3KOsy9('\060' + chr(111) + chr(0b10011 + 0o35), ord("\x08"))) assert xafqLlk3kkUe(T0e_4q2U4LsU, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe1\xbb\xbdC\x9d\x84\x9a\xe01\x10\xba\xdc\xf3'), chr(0b110100 + 0o60) + chr(101) + '\143' + '\x6f' + '\144' + '\x65')(chr(0b1110101) + chr(463 - 347) + chr(3408 - 3306) + chr(0b100 + 0o51) + '\x38'))() == ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(49), 8) nQdI1xYu1xrO = H9zaXRrGK6Cq.gcs_utils.ErrorTableData.GetRootAsErrorTableData(T0e_4q2U4LsU.Entries(ehT0Px3KOsy9(chr(355 - 307) + chr(0b1101111) + chr(230 - 182), 8)), ehT0Px3KOsy9('\x30' + '\157' + chr(1180 - 1132), 8)) xrb3JXGvKq_I = nQdI1xYu1xrO.DriverId() if xrb3JXGvKq_I not in [xafqLlk3kkUe(sijXcSaDomT1.task_driver_id, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc6\xbc\xa7P\x86\x98'), '\x64' + '\145' + chr(0b10000 + 0o123) + '\157' + chr(0b1100100) + '\145')('\165' + '\x74' + chr(10282 - 10180) + chr(0b100 + 0o51) + chr(2608 - 2552)))(), xafqLlk3kkUe(bAkkLgl6Zv7t.nil(), xafqLlk3kkUe(SXOLrMavuUCe(b'\xc6\xbc\xa7P\x86\x98'), '\144' + chr(0b1010101 + 0o20) + '\x63' + chr(0b1000111 + 0o50) + chr(1010 - 910) + chr(101))('\165' + chr(0b100111 + 0o115) + '\146' + chr(0b11000 + 0o25) + chr(2955 - 2899)))()]: continue RACuGzVUu2U8 = H9zaXRrGK6Cq.utils.decode(nQdI1xYu1xrO.ErrorMessage()) if xafqLlk3kkUe(H9zaXRrGK6Cq.utils, '\144' + '\x65' + chr(8236 - 8137) + chr(0b1101111) + '\x64' + chr(8128 - 8027))(xafqLlk3kkUe(nQdI1xYu1xrO, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0\xac\xb9T'), '\x64' + chr(3685 - 3584) + chr(0b100000 + 0o103) + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))('\x75' + '\164' + '\146' + chr(45) + '\x38'))()) == xafqLlk3kkUe(NAlxrfaLQgar, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0\x94\x9az\xab\xb1\xbc\xff\x1c!\x98\xfa\xc9\xbe\x0c'), '\144' + '\145' + chr(535 - 436) + '\157' + chr(0b1100100) + chr(0b1100101))('\165' + chr(7071 - 6955) + '\x66' + chr(45) + '\x38')): xafqLlk3kkUe(CSBOsS97eclE, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd4\xa0\xbd'), chr(0b110110 + 0o56) + chr(0b1100101) + '\143' + chr(111) + chr(8374 - 8274) + chr(0b1010 + 0o133))(chr(117) + chr(0b100000 + 0o124) + '\146' + '\x2d' + chr(830 - 774)))((RACuGzVUu2U8, xafqLlk3kkUe(ltvhPP4VhXre, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd0\xbc\xa4T'), chr(0b1100100) + chr(101) + chr(0b1100011) + chr(0b1101111) + chr(274 - 174) + chr(101))(chr(0b1110100 + 0o1) + chr(9099 - 8983) + chr(10138 - 10036) + chr(0b11111 + 0o16) + '\070'))())) else: xafqLlk3kkUe(hdK8qOUhR6Or, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe1\x80\xada\x95\x95\xa6\xffe\t\xa5\x98'), chr(0b1100 + 0o130) + chr(215 - 114) + chr(99) + chr(4300 - 4189) + chr(0b10110 + 0o116) + chr(0b1100101))(chr(117) + chr(1310 - 1194) + '\x66' + chr(0b101101) + '\x38'))(RACuGzVUu2U8) finally: xafqLlk3kkUe(sijXcSaDomT1.error_message_pubsub_client, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc7\xb9\xa6B\x91'), chr(0b100001 + 0o103) + chr(4762 - 4661) + chr(99) + chr(12226 - 12115) + '\x64' + '\145')('\165' + '\164' + chr(0b1100110) + chr(0b101101) + chr(56)))()
ray-project/ray
python/ray/worker.py
connect
def connect(node, mode=WORKER_MODE, log_to_driver=False, worker=global_worker, driver_id=None, load_code_from_local=False): """Connect this worker to the raylet, to Plasma, and to Redis. Args: node (ray.node.Node): The node to connect. mode: The mode of the worker. One of SCRIPT_MODE, WORKER_MODE, and LOCAL_MODE. log_to_driver (bool): If true, then output from all of the worker processes on all nodes will be directed to the driver. worker: The ray.Worker instance. driver_id: The ID of driver. If it's None, then we will generate one. """ # Do some basic checking to make sure we didn't call ray.init twice. error_message = "Perhaps you called ray.init twice by accident?" assert not worker.connected, error_message assert worker.cached_functions_to_run is not None, error_message # Enable nice stack traces on SIGSEGV etc. if not faulthandler.is_enabled(): faulthandler.enable(all_threads=False) worker.profiler = profiling.Profiler(worker, worker.threads_stopped) # Initialize some fields. if mode is WORKER_MODE: worker.worker_id = _random_string() if setproctitle: setproctitle.setproctitle("ray_worker") else: # This is the code path of driver mode. if driver_id is None: driver_id = DriverID(_random_string()) if not isinstance(driver_id, DriverID): raise TypeError("The type of given driver id must be DriverID.") worker.worker_id = driver_id.binary() # When tasks are executed on remote workers in the context of multiple # drivers, the task driver ID is used to keep track of which driver is # responsible for the task so that error messages will be propagated to # the correct driver. if mode != WORKER_MODE: worker.task_driver_id = DriverID(worker.worker_id) # All workers start out as non-actors. A worker can be turned into an actor # after it is created. worker.actor_id = ActorID.nil() worker.node = node worker.set_mode(mode) # If running Ray in LOCAL_MODE, there is no need to create call # create_worker or to start the worker service. if mode == LOCAL_MODE: return # Create a Redis client. # The Redis client can safely be shared between threads. However, that is # not true of Redis pubsub clients. See the documentation at # https://github.com/andymccurdy/redis-py#thread-safety. worker.redis_client = node.create_redis_client() # For driver's check that the version information matches the version # information that the Ray cluster was started with. try: ray.services.check_version_info(worker.redis_client) except Exception as e: if mode == SCRIPT_MODE: raise e elif mode == WORKER_MODE: traceback_str = traceback.format_exc() ray.utils.push_error_to_driver_through_redis( worker.redis_client, ray_constants.VERSION_MISMATCH_PUSH_ERROR, traceback_str, driver_id=None) worker.lock = threading.RLock() # Create an object for interfacing with the global state. global_state._initialize_global_state( node.redis_address, redis_password=node.redis_password) # Register the worker with Redis. if mode == SCRIPT_MODE: # The concept of a driver is the same as the concept of a "job". # Register the driver/job with Redis here. import __main__ as main driver_info = { "node_ip_address": node.node_ip_address, "driver_id": worker.worker_id, "start_time": time.time(), "plasma_store_socket": node.plasma_store_socket_name, "raylet_socket": node.raylet_socket_name, "name": (main.__file__ if hasattr(main, "__file__") else "INTERACTIVE MODE") } worker.redis_client.hmset(b"Drivers:" + worker.worker_id, driver_info) elif mode == WORKER_MODE: # Register the worker with Redis. worker_dict = { "node_ip_address": node.node_ip_address, "plasma_store_socket": node.plasma_store_socket_name, } # Check the RedirectOutput key in Redis and based on its value redirect # worker output and error to their own files. # This key is set in services.py when Redis is started. redirect_worker_output_val = worker.redis_client.get("RedirectOutput") if (redirect_worker_output_val is not None and int(redirect_worker_output_val) == 1): log_stdout_file, log_stderr_file = ( node.new_worker_redirected_log_file(worker.worker_id)) # Redirect stdout/stderr at the file descriptor level. If we simply # set sys.stdout and sys.stderr, then logging from C++ can fail to # be redirected. os.dup2(log_stdout_file.fileno(), sys.stdout.fileno()) os.dup2(log_stderr_file.fileno(), sys.stderr.fileno()) # We also manually set sys.stdout and sys.stderr because that seems # to have an affect on the output buffering. Without doing this, # stdout and stderr are heavily buffered resulting in seemingly # lost logging statements. sys.stdout = log_stdout_file sys.stderr = log_stderr_file # This should always be the first message to appear in the worker's # stdout and stderr log files. The string "Ray worker pid:" is # parsed in the log monitor process. print("Ray worker pid: {}".format(os.getpid())) print("Ray worker pid: {}".format(os.getpid()), file=sys.stderr) sys.stdout.flush() sys.stderr.flush() worker_dict["stdout_file"] = os.path.abspath(log_stdout_file.name) worker_dict["stderr_file"] = os.path.abspath(log_stderr_file.name) worker.redis_client.hmset(b"Workers:" + worker.worker_id, worker_dict) else: raise Exception("This code should be unreachable.") # Create an object store client. worker.plasma_client = thread_safe_client( plasma.connect(node.plasma_store_socket_name, None, 0, 300)) # If this is a driver, set the current task ID, the task driver ID, and set # the task index to 0. if mode == SCRIPT_MODE: # If the user provided an object_id_seed, then set the current task ID # deterministically based on that seed (without altering the state of # the user's random number generator). Otherwise, set the current task # ID randomly to avoid object ID collisions. numpy_state = np.random.get_state() if node.object_id_seed is not None: np.random.seed(node.object_id_seed) else: # Try to use true randomness. np.random.seed(None) # Reset the state of the numpy random number generator. np.random.set_state(numpy_state) # Create an entry for the driver task in the task table. This task is # added immediately with status RUNNING. This allows us to push errors # related to this driver task back to the driver. For example, if the # driver creates an object that is later evicted, we should notify the # user that we're unable to reconstruct the object, since we cannot # rerun the driver. nil_actor_counter = 0 function_descriptor = FunctionDescriptor.for_driver_task() driver_task = ray._raylet.Task( worker.task_driver_id, function_descriptor.get_function_descriptor_list(), [], # arguments. 0, # num_returns. TaskID(_random_string()), # parent_task_id. 0, # parent_counter. ActorID.nil(), # actor_creation_id. ObjectID.nil(), # actor_creation_dummy_object_id. 0, # max_actor_reconstructions. ActorID.nil(), # actor_id. ActorHandleID.nil(), # actor_handle_id. nil_actor_counter, # actor_counter. [], # new_actor_handles. [], # execution_dependencies. {}, # resource_map. {}, # placement_resource_map. ) # Add the driver task to the task table. global_state._execute_command(driver_task.task_id(), "RAY.TABLE_ADD", ray.gcs_utils.TablePrefix.RAYLET_TASK, ray.gcs_utils.TablePubsub.RAYLET_TASK, driver_task.task_id().binary(), driver_task._serialized_raylet_task()) # Set the driver's current task ID to the task ID assigned to the # driver task. worker.task_context.current_task_id = driver_task.task_id() worker.raylet_client = ray._raylet.RayletClient( node.raylet_socket_name, ClientID(worker.worker_id), (mode == WORKER_MODE), DriverID(worker.current_task_id.binary()), ) # Start the import thread worker.import_thread = import_thread.ImportThread(worker, mode, worker.threads_stopped) worker.import_thread.start() # If this is a driver running in SCRIPT_MODE, start a thread to print error # messages asynchronously in the background. Ideally the scheduler would # push messages to the driver's worker service, but we ran into bugs when # trying to properly shutdown the driver's worker service, so we are # temporarily using this implementation which constantly queries the # scheduler for new error messages. if mode == SCRIPT_MODE: q = queue.Queue() worker.listener_thread = threading.Thread( target=listen_error_messages_raylet, name="ray_listen_error_messages", args=(worker, q, worker.threads_stopped)) worker.printer_thread = threading.Thread( target=print_error_messages_raylet, name="ray_print_error_messages", args=(q, worker.threads_stopped)) worker.listener_thread.daemon = True worker.listener_thread.start() worker.printer_thread.daemon = True worker.printer_thread.start() if log_to_driver: worker.logger_thread = threading.Thread( target=print_logs, name="ray_print_logs", args=(worker.redis_client, worker.threads_stopped)) worker.logger_thread.daemon = True worker.logger_thread.start() # If we are using the raylet code path and we are not in local mode, start # a background thread to periodically flush profiling data to the GCS. if mode != LOCAL_MODE: worker.profiler.start_flush_thread() if mode == SCRIPT_MODE: # Add the directory containing the script that is running to the Python # paths of the workers. Also add the current directory. Note that this # assumes that the directory structures on the machines in the clusters # are the same. script_directory = os.path.abspath(os.path.dirname(sys.argv[0])) current_directory = os.path.abspath(os.path.curdir) worker.run_function_on_all_workers( lambda worker_info: sys.path.insert(1, script_directory)) worker.run_function_on_all_workers( lambda worker_info: sys.path.insert(1, current_directory)) # TODO(rkn): Here we first export functions to run, then remote # functions. The order matters. For example, one of the functions to # run may set the Python path, which is needed to import a module used # to define a remote function. We may want to change the order to # simply be the order in which the exports were defined on the driver. # In addition, we will need to retain the ability to decide what the # first few exports are (mostly to set the Python path). Additionally, # note that the first exports to be defined on the driver will be the # ones defined in separate modules that are imported by the driver. # Export cached functions_to_run. for function in worker.cached_functions_to_run: worker.run_function_on_all_workers(function) # Export cached remote functions and actors to the workers. worker.function_actor_manager.export_cached() worker.cached_functions_to_run = None
python
def connect(node, mode=WORKER_MODE, log_to_driver=False, worker=global_worker, driver_id=None, load_code_from_local=False): """Connect this worker to the raylet, to Plasma, and to Redis. Args: node (ray.node.Node): The node to connect. mode: The mode of the worker. One of SCRIPT_MODE, WORKER_MODE, and LOCAL_MODE. log_to_driver (bool): If true, then output from all of the worker processes on all nodes will be directed to the driver. worker: The ray.Worker instance. driver_id: The ID of driver. If it's None, then we will generate one. """ # Do some basic checking to make sure we didn't call ray.init twice. error_message = "Perhaps you called ray.init twice by accident?" assert not worker.connected, error_message assert worker.cached_functions_to_run is not None, error_message # Enable nice stack traces on SIGSEGV etc. if not faulthandler.is_enabled(): faulthandler.enable(all_threads=False) worker.profiler = profiling.Profiler(worker, worker.threads_stopped) # Initialize some fields. if mode is WORKER_MODE: worker.worker_id = _random_string() if setproctitle: setproctitle.setproctitle("ray_worker") else: # This is the code path of driver mode. if driver_id is None: driver_id = DriverID(_random_string()) if not isinstance(driver_id, DriverID): raise TypeError("The type of given driver id must be DriverID.") worker.worker_id = driver_id.binary() # When tasks are executed on remote workers in the context of multiple # drivers, the task driver ID is used to keep track of which driver is # responsible for the task so that error messages will be propagated to # the correct driver. if mode != WORKER_MODE: worker.task_driver_id = DriverID(worker.worker_id) # All workers start out as non-actors. A worker can be turned into an actor # after it is created. worker.actor_id = ActorID.nil() worker.node = node worker.set_mode(mode) # If running Ray in LOCAL_MODE, there is no need to create call # create_worker or to start the worker service. if mode == LOCAL_MODE: return # Create a Redis client. # The Redis client can safely be shared between threads. However, that is # not true of Redis pubsub clients. See the documentation at # https://github.com/andymccurdy/redis-py#thread-safety. worker.redis_client = node.create_redis_client() # For driver's check that the version information matches the version # information that the Ray cluster was started with. try: ray.services.check_version_info(worker.redis_client) except Exception as e: if mode == SCRIPT_MODE: raise e elif mode == WORKER_MODE: traceback_str = traceback.format_exc() ray.utils.push_error_to_driver_through_redis( worker.redis_client, ray_constants.VERSION_MISMATCH_PUSH_ERROR, traceback_str, driver_id=None) worker.lock = threading.RLock() # Create an object for interfacing with the global state. global_state._initialize_global_state( node.redis_address, redis_password=node.redis_password) # Register the worker with Redis. if mode == SCRIPT_MODE: # The concept of a driver is the same as the concept of a "job". # Register the driver/job with Redis here. import __main__ as main driver_info = { "node_ip_address": node.node_ip_address, "driver_id": worker.worker_id, "start_time": time.time(), "plasma_store_socket": node.plasma_store_socket_name, "raylet_socket": node.raylet_socket_name, "name": (main.__file__ if hasattr(main, "__file__") else "INTERACTIVE MODE") } worker.redis_client.hmset(b"Drivers:" + worker.worker_id, driver_info) elif mode == WORKER_MODE: # Register the worker with Redis. worker_dict = { "node_ip_address": node.node_ip_address, "plasma_store_socket": node.plasma_store_socket_name, } # Check the RedirectOutput key in Redis and based on its value redirect # worker output and error to their own files. # This key is set in services.py when Redis is started. redirect_worker_output_val = worker.redis_client.get("RedirectOutput") if (redirect_worker_output_val is not None and int(redirect_worker_output_val) == 1): log_stdout_file, log_stderr_file = ( node.new_worker_redirected_log_file(worker.worker_id)) # Redirect stdout/stderr at the file descriptor level. If we simply # set sys.stdout and sys.stderr, then logging from C++ can fail to # be redirected. os.dup2(log_stdout_file.fileno(), sys.stdout.fileno()) os.dup2(log_stderr_file.fileno(), sys.stderr.fileno()) # We also manually set sys.stdout and sys.stderr because that seems # to have an affect on the output buffering. Without doing this, # stdout and stderr are heavily buffered resulting in seemingly # lost logging statements. sys.stdout = log_stdout_file sys.stderr = log_stderr_file # This should always be the first message to appear in the worker's # stdout and stderr log files. The string "Ray worker pid:" is # parsed in the log monitor process. print("Ray worker pid: {}".format(os.getpid())) print("Ray worker pid: {}".format(os.getpid()), file=sys.stderr) sys.stdout.flush() sys.stderr.flush() worker_dict["stdout_file"] = os.path.abspath(log_stdout_file.name) worker_dict["stderr_file"] = os.path.abspath(log_stderr_file.name) worker.redis_client.hmset(b"Workers:" + worker.worker_id, worker_dict) else: raise Exception("This code should be unreachable.") # Create an object store client. worker.plasma_client = thread_safe_client( plasma.connect(node.plasma_store_socket_name, None, 0, 300)) # If this is a driver, set the current task ID, the task driver ID, and set # the task index to 0. if mode == SCRIPT_MODE: # If the user provided an object_id_seed, then set the current task ID # deterministically based on that seed (without altering the state of # the user's random number generator). Otherwise, set the current task # ID randomly to avoid object ID collisions. numpy_state = np.random.get_state() if node.object_id_seed is not None: np.random.seed(node.object_id_seed) else: # Try to use true randomness. np.random.seed(None) # Reset the state of the numpy random number generator. np.random.set_state(numpy_state) # Create an entry for the driver task in the task table. This task is # added immediately with status RUNNING. This allows us to push errors # related to this driver task back to the driver. For example, if the # driver creates an object that is later evicted, we should notify the # user that we're unable to reconstruct the object, since we cannot # rerun the driver. nil_actor_counter = 0 function_descriptor = FunctionDescriptor.for_driver_task() driver_task = ray._raylet.Task( worker.task_driver_id, function_descriptor.get_function_descriptor_list(), [], # arguments. 0, # num_returns. TaskID(_random_string()), # parent_task_id. 0, # parent_counter. ActorID.nil(), # actor_creation_id. ObjectID.nil(), # actor_creation_dummy_object_id. 0, # max_actor_reconstructions. ActorID.nil(), # actor_id. ActorHandleID.nil(), # actor_handle_id. nil_actor_counter, # actor_counter. [], # new_actor_handles. [], # execution_dependencies. {}, # resource_map. {}, # placement_resource_map. ) # Add the driver task to the task table. global_state._execute_command(driver_task.task_id(), "RAY.TABLE_ADD", ray.gcs_utils.TablePrefix.RAYLET_TASK, ray.gcs_utils.TablePubsub.RAYLET_TASK, driver_task.task_id().binary(), driver_task._serialized_raylet_task()) # Set the driver's current task ID to the task ID assigned to the # driver task. worker.task_context.current_task_id = driver_task.task_id() worker.raylet_client = ray._raylet.RayletClient( node.raylet_socket_name, ClientID(worker.worker_id), (mode == WORKER_MODE), DriverID(worker.current_task_id.binary()), ) # Start the import thread worker.import_thread = import_thread.ImportThread(worker, mode, worker.threads_stopped) worker.import_thread.start() # If this is a driver running in SCRIPT_MODE, start a thread to print error # messages asynchronously in the background. Ideally the scheduler would # push messages to the driver's worker service, but we ran into bugs when # trying to properly shutdown the driver's worker service, so we are # temporarily using this implementation which constantly queries the # scheduler for new error messages. if mode == SCRIPT_MODE: q = queue.Queue() worker.listener_thread = threading.Thread( target=listen_error_messages_raylet, name="ray_listen_error_messages", args=(worker, q, worker.threads_stopped)) worker.printer_thread = threading.Thread( target=print_error_messages_raylet, name="ray_print_error_messages", args=(q, worker.threads_stopped)) worker.listener_thread.daemon = True worker.listener_thread.start() worker.printer_thread.daemon = True worker.printer_thread.start() if log_to_driver: worker.logger_thread = threading.Thread( target=print_logs, name="ray_print_logs", args=(worker.redis_client, worker.threads_stopped)) worker.logger_thread.daemon = True worker.logger_thread.start() # If we are using the raylet code path and we are not in local mode, start # a background thread to periodically flush profiling data to the GCS. if mode != LOCAL_MODE: worker.profiler.start_flush_thread() if mode == SCRIPT_MODE: # Add the directory containing the script that is running to the Python # paths of the workers. Also add the current directory. Note that this # assumes that the directory structures on the machines in the clusters # are the same. script_directory = os.path.abspath(os.path.dirname(sys.argv[0])) current_directory = os.path.abspath(os.path.curdir) worker.run_function_on_all_workers( lambda worker_info: sys.path.insert(1, script_directory)) worker.run_function_on_all_workers( lambda worker_info: sys.path.insert(1, current_directory)) # TODO(rkn): Here we first export functions to run, then remote # functions. The order matters. For example, one of the functions to # run may set the Python path, which is needed to import a module used # to define a remote function. We may want to change the order to # simply be the order in which the exports were defined on the driver. # In addition, we will need to retain the ability to decide what the # first few exports are (mostly to set the Python path). Additionally, # note that the first exports to be defined on the driver will be the # ones defined in separate modules that are imported by the driver. # Export cached functions_to_run. for function in worker.cached_functions_to_run: worker.run_function_on_all_workers(function) # Export cached remote functions and actors to the workers. worker.function_actor_manager.export_cached() worker.cached_functions_to_run = None
[ "def", "connect", "(", "node", ",", "mode", "=", "WORKER_MODE", ",", "log_to_driver", "=", "False", ",", "worker", "=", "global_worker", ",", "driver_id", "=", "None", ",", "load_code_from_local", "=", "False", ")", ":", "# Do some basic checking to make sure we didn't call ray.init twice.", "error_message", "=", "\"Perhaps you called ray.init twice by accident?\"", "assert", "not", "worker", ".", "connected", ",", "error_message", "assert", "worker", ".", "cached_functions_to_run", "is", "not", "None", ",", "error_message", "# Enable nice stack traces on SIGSEGV etc.", "if", "not", "faulthandler", ".", "is_enabled", "(", ")", ":", "faulthandler", ".", "enable", "(", "all_threads", "=", "False", ")", "worker", ".", "profiler", "=", "profiling", ".", "Profiler", "(", "worker", ",", "worker", ".", "threads_stopped", ")", "# Initialize some fields.", "if", "mode", "is", "WORKER_MODE", ":", "worker", ".", "worker_id", "=", "_random_string", "(", ")", "if", "setproctitle", ":", "setproctitle", ".", "setproctitle", "(", "\"ray_worker\"", ")", "else", ":", "# This is the code path of driver mode.", "if", "driver_id", "is", "None", ":", "driver_id", "=", "DriverID", "(", "_random_string", "(", ")", ")", "if", "not", "isinstance", "(", "driver_id", ",", "DriverID", ")", ":", "raise", "TypeError", "(", "\"The type of given driver id must be DriverID.\"", ")", "worker", ".", "worker_id", "=", "driver_id", ".", "binary", "(", ")", "# When tasks are executed on remote workers in the context of multiple", "# drivers, the task driver ID is used to keep track of which driver is", "# responsible for the task so that error messages will be propagated to", "# the correct driver.", "if", "mode", "!=", "WORKER_MODE", ":", "worker", ".", "task_driver_id", "=", "DriverID", "(", "worker", ".", "worker_id", ")", "# All workers start out as non-actors. A worker can be turned into an actor", "# after it is created.", "worker", ".", "actor_id", "=", "ActorID", ".", "nil", "(", ")", "worker", ".", "node", "=", "node", "worker", ".", "set_mode", "(", "mode", ")", "# If running Ray in LOCAL_MODE, there is no need to create call", "# create_worker or to start the worker service.", "if", "mode", "==", "LOCAL_MODE", ":", "return", "# Create a Redis client.", "# The Redis client can safely be shared between threads. However, that is", "# not true of Redis pubsub clients. See the documentation at", "# https://github.com/andymccurdy/redis-py#thread-safety.", "worker", ".", "redis_client", "=", "node", ".", "create_redis_client", "(", ")", "# For driver's check that the version information matches the version", "# information that the Ray cluster was started with.", "try", ":", "ray", ".", "services", ".", "check_version_info", "(", "worker", ".", "redis_client", ")", "except", "Exception", "as", "e", ":", "if", "mode", "==", "SCRIPT_MODE", ":", "raise", "e", "elif", "mode", "==", "WORKER_MODE", ":", "traceback_str", "=", "traceback", ".", "format_exc", "(", ")", "ray", ".", "utils", ".", "push_error_to_driver_through_redis", "(", "worker", ".", "redis_client", ",", "ray_constants", ".", "VERSION_MISMATCH_PUSH_ERROR", ",", "traceback_str", ",", "driver_id", "=", "None", ")", "worker", ".", "lock", "=", "threading", ".", "RLock", "(", ")", "# Create an object for interfacing with the global state.", "global_state", ".", "_initialize_global_state", "(", "node", ".", "redis_address", ",", "redis_password", "=", "node", ".", "redis_password", ")", "# Register the worker with Redis.", "if", "mode", "==", "SCRIPT_MODE", ":", "# The concept of a driver is the same as the concept of a \"job\".", "# Register the driver/job with Redis here.", "import", "__main__", "as", "main", "driver_info", "=", "{", "\"node_ip_address\"", ":", "node", ".", "node_ip_address", ",", "\"driver_id\"", ":", "worker", ".", "worker_id", ",", "\"start_time\"", ":", "time", ".", "time", "(", ")", ",", "\"plasma_store_socket\"", ":", "node", ".", "plasma_store_socket_name", ",", "\"raylet_socket\"", ":", "node", ".", "raylet_socket_name", ",", "\"name\"", ":", "(", "main", ".", "__file__", "if", "hasattr", "(", "main", ",", "\"__file__\"", ")", "else", "\"INTERACTIVE MODE\"", ")", "}", "worker", ".", "redis_client", ".", "hmset", "(", "b\"Drivers:\"", "+", "worker", ".", "worker_id", ",", "driver_info", ")", "elif", "mode", "==", "WORKER_MODE", ":", "# Register the worker with Redis.", "worker_dict", "=", "{", "\"node_ip_address\"", ":", "node", ".", "node_ip_address", ",", "\"plasma_store_socket\"", ":", "node", ".", "plasma_store_socket_name", ",", "}", "# Check the RedirectOutput key in Redis and based on its value redirect", "# worker output and error to their own files.", "# This key is set in services.py when Redis is started.", "redirect_worker_output_val", "=", "worker", ".", "redis_client", ".", "get", "(", "\"RedirectOutput\"", ")", "if", "(", "redirect_worker_output_val", "is", "not", "None", "and", "int", "(", "redirect_worker_output_val", ")", "==", "1", ")", ":", "log_stdout_file", ",", "log_stderr_file", "=", "(", "node", ".", "new_worker_redirected_log_file", "(", "worker", ".", "worker_id", ")", ")", "# Redirect stdout/stderr at the file descriptor level. If we simply", "# set sys.stdout and sys.stderr, then logging from C++ can fail to", "# be redirected.", "os", ".", "dup2", "(", "log_stdout_file", ".", "fileno", "(", ")", ",", "sys", ".", "stdout", ".", "fileno", "(", ")", ")", "os", ".", "dup2", "(", "log_stderr_file", ".", "fileno", "(", ")", ",", "sys", ".", "stderr", ".", "fileno", "(", ")", ")", "# We also manually set sys.stdout and sys.stderr because that seems", "# to have an affect on the output buffering. Without doing this,", "# stdout and stderr are heavily buffered resulting in seemingly", "# lost logging statements.", "sys", ".", "stdout", "=", "log_stdout_file", "sys", ".", "stderr", "=", "log_stderr_file", "# This should always be the first message to appear in the worker's", "# stdout and stderr log files. The string \"Ray worker pid:\" is", "# parsed in the log monitor process.", "print", "(", "\"Ray worker pid: {}\"", ".", "format", "(", "os", ".", "getpid", "(", ")", ")", ")", "print", "(", "\"Ray worker pid: {}\"", ".", "format", "(", "os", ".", "getpid", "(", ")", ")", ",", "file", "=", "sys", ".", "stderr", ")", "sys", ".", "stdout", ".", "flush", "(", ")", "sys", ".", "stderr", ".", "flush", "(", ")", "worker_dict", "[", "\"stdout_file\"", "]", "=", "os", ".", "path", ".", "abspath", "(", "log_stdout_file", ".", "name", ")", "worker_dict", "[", "\"stderr_file\"", "]", "=", "os", ".", "path", ".", "abspath", "(", "log_stderr_file", ".", "name", ")", "worker", ".", "redis_client", ".", "hmset", "(", "b\"Workers:\"", "+", "worker", ".", "worker_id", ",", "worker_dict", ")", "else", ":", "raise", "Exception", "(", "\"This code should be unreachable.\"", ")", "# Create an object store client.", "worker", ".", "plasma_client", "=", "thread_safe_client", "(", "plasma", ".", "connect", "(", "node", ".", "plasma_store_socket_name", ",", "None", ",", "0", ",", "300", ")", ")", "# If this is a driver, set the current task ID, the task driver ID, and set", "# the task index to 0.", "if", "mode", "==", "SCRIPT_MODE", ":", "# If the user provided an object_id_seed, then set the current task ID", "# deterministically based on that seed (without altering the state of", "# the user's random number generator). Otherwise, set the current task", "# ID randomly to avoid object ID collisions.", "numpy_state", "=", "np", ".", "random", ".", "get_state", "(", ")", "if", "node", ".", "object_id_seed", "is", "not", "None", ":", "np", ".", "random", ".", "seed", "(", "node", ".", "object_id_seed", ")", "else", ":", "# Try to use true randomness.", "np", ".", "random", ".", "seed", "(", "None", ")", "# Reset the state of the numpy random number generator.", "np", ".", "random", ".", "set_state", "(", "numpy_state", ")", "# Create an entry for the driver task in the task table. This task is", "# added immediately with status RUNNING. This allows us to push errors", "# related to this driver task back to the driver. For example, if the", "# driver creates an object that is later evicted, we should notify the", "# user that we're unable to reconstruct the object, since we cannot", "# rerun the driver.", "nil_actor_counter", "=", "0", "function_descriptor", "=", "FunctionDescriptor", ".", "for_driver_task", "(", ")", "driver_task", "=", "ray", ".", "_raylet", ".", "Task", "(", "worker", ".", "task_driver_id", ",", "function_descriptor", ".", "get_function_descriptor_list", "(", ")", ",", "[", "]", ",", "# arguments.", "0", ",", "# num_returns.", "TaskID", "(", "_random_string", "(", ")", ")", ",", "# parent_task_id.", "0", ",", "# parent_counter.", "ActorID", ".", "nil", "(", ")", ",", "# actor_creation_id.", "ObjectID", ".", "nil", "(", ")", ",", "# actor_creation_dummy_object_id.", "0", ",", "# max_actor_reconstructions.", "ActorID", ".", "nil", "(", ")", ",", "# actor_id.", "ActorHandleID", ".", "nil", "(", ")", ",", "# actor_handle_id.", "nil_actor_counter", ",", "# actor_counter.", "[", "]", ",", "# new_actor_handles.", "[", "]", ",", "# execution_dependencies.", "{", "}", ",", "# resource_map.", "{", "}", ",", "# placement_resource_map.", ")", "# Add the driver task to the task table.", "global_state", ".", "_execute_command", "(", "driver_task", ".", "task_id", "(", ")", ",", "\"RAY.TABLE_ADD\"", ",", "ray", ".", "gcs_utils", ".", "TablePrefix", ".", "RAYLET_TASK", ",", "ray", ".", "gcs_utils", ".", "TablePubsub", ".", "RAYLET_TASK", ",", "driver_task", ".", "task_id", "(", ")", ".", "binary", "(", ")", ",", "driver_task", ".", "_serialized_raylet_task", "(", ")", ")", "# Set the driver's current task ID to the task ID assigned to the", "# driver task.", "worker", ".", "task_context", ".", "current_task_id", "=", "driver_task", ".", "task_id", "(", ")", "worker", ".", "raylet_client", "=", "ray", ".", "_raylet", ".", "RayletClient", "(", "node", ".", "raylet_socket_name", ",", "ClientID", "(", "worker", ".", "worker_id", ")", ",", "(", "mode", "==", "WORKER_MODE", ")", ",", "DriverID", "(", "worker", ".", "current_task_id", ".", "binary", "(", ")", ")", ",", ")", "# Start the import thread", "worker", ".", "import_thread", "=", "import_thread", ".", "ImportThread", "(", "worker", ",", "mode", ",", "worker", ".", "threads_stopped", ")", "worker", ".", "import_thread", ".", "start", "(", ")", "# If this is a driver running in SCRIPT_MODE, start a thread to print error", "# messages asynchronously in the background. Ideally the scheduler would", "# push messages to the driver's worker service, but we ran into bugs when", "# trying to properly shutdown the driver's worker service, so we are", "# temporarily using this implementation which constantly queries the", "# scheduler for new error messages.", "if", "mode", "==", "SCRIPT_MODE", ":", "q", "=", "queue", ".", "Queue", "(", ")", "worker", ".", "listener_thread", "=", "threading", ".", "Thread", "(", "target", "=", "listen_error_messages_raylet", ",", "name", "=", "\"ray_listen_error_messages\"", ",", "args", "=", "(", "worker", ",", "q", ",", "worker", ".", "threads_stopped", ")", ")", "worker", ".", "printer_thread", "=", "threading", ".", "Thread", "(", "target", "=", "print_error_messages_raylet", ",", "name", "=", "\"ray_print_error_messages\"", ",", "args", "=", "(", "q", ",", "worker", ".", "threads_stopped", ")", ")", "worker", ".", "listener_thread", ".", "daemon", "=", "True", "worker", ".", "listener_thread", ".", "start", "(", ")", "worker", ".", "printer_thread", ".", "daemon", "=", "True", "worker", ".", "printer_thread", ".", "start", "(", ")", "if", "log_to_driver", ":", "worker", ".", "logger_thread", "=", "threading", ".", "Thread", "(", "target", "=", "print_logs", ",", "name", "=", "\"ray_print_logs\"", ",", "args", "=", "(", "worker", ".", "redis_client", ",", "worker", ".", "threads_stopped", ")", ")", "worker", ".", "logger_thread", ".", "daemon", "=", "True", "worker", ".", "logger_thread", ".", "start", "(", ")", "# If we are using the raylet code path and we are not in local mode, start", "# a background thread to periodically flush profiling data to the GCS.", "if", "mode", "!=", "LOCAL_MODE", ":", "worker", ".", "profiler", ".", "start_flush_thread", "(", ")", "if", "mode", "==", "SCRIPT_MODE", ":", "# Add the directory containing the script that is running to the Python", "# paths of the workers. Also add the current directory. Note that this", "# assumes that the directory structures on the machines in the clusters", "# are the same.", "script_directory", "=", "os", ".", "path", ".", "abspath", "(", "os", ".", "path", ".", "dirname", "(", "sys", ".", "argv", "[", "0", "]", ")", ")", "current_directory", "=", "os", ".", "path", ".", "abspath", "(", "os", ".", "path", ".", "curdir", ")", "worker", ".", "run_function_on_all_workers", "(", "lambda", "worker_info", ":", "sys", ".", "path", ".", "insert", "(", "1", ",", "script_directory", ")", ")", "worker", ".", "run_function_on_all_workers", "(", "lambda", "worker_info", ":", "sys", ".", "path", ".", "insert", "(", "1", ",", "current_directory", ")", ")", "# TODO(rkn): Here we first export functions to run, then remote", "# functions. The order matters. For example, one of the functions to", "# run may set the Python path, which is needed to import a module used", "# to define a remote function. We may want to change the order to", "# simply be the order in which the exports were defined on the driver.", "# In addition, we will need to retain the ability to decide what the", "# first few exports are (mostly to set the Python path). Additionally,", "# note that the first exports to be defined on the driver will be the", "# ones defined in separate modules that are imported by the driver.", "# Export cached functions_to_run.", "for", "function", "in", "worker", ".", "cached_functions_to_run", ":", "worker", ".", "run_function_on_all_workers", "(", "function", ")", "# Export cached remote functions and actors to the workers.", "worker", ".", "function_actor_manager", ".", "export_cached", "(", ")", "worker", ".", "cached_functions_to_run", "=", "None" ]
Connect this worker to the raylet, to Plasma, and to Redis. Args: node (ray.node.Node): The node to connect. mode: The mode of the worker. One of SCRIPT_MODE, WORKER_MODE, and LOCAL_MODE. log_to_driver (bool): If true, then output from all of the worker processes on all nodes will be directed to the driver. worker: The ray.Worker instance. driver_id: The ID of driver. If it's None, then we will generate one.
[ "Connect", "this", "worker", "to", "the", "raylet", "to", "Plasma", "and", "to", "Redis", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/worker.py#L1687-L1958
train
Connect this worker to the Redis and Redis.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPvpP4xdo3,cW7yQuyEnJ6E,KOHQGQ8qLDWm,NE1Yam2HHroQ,ygAzbDzrvRMh,SBRjvOU1ufVC,hOkXjmluKZfJ,q1QCh3W88sgk,TLbJ60djyws0,rIcPej9ZqMqV,WTxpD_zsEOh2,LgE_IO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pv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\060' + chr(0b10000 + 0o137) + chr(1854 - 1804) + '\063' + '\x36', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(9650 - 9539) + '\x35' + chr(48), 64155 - 64147), ehT0Px3KOsy9('\060' + '\157' + chr(1523 - 1473) + '\063' + '\x33', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101010 + 0o5) + chr(50) + chr(0b1 + 0o65) + chr(0b11 + 0o63), 6810 - 6802), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011000 + 0o27) + chr(0b1001 + 0o52) + '\x37' + '\064', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(51) + chr(0b110101) + '\061', 0b1000), ehT0Px3KOsy9('\x30' + chr(4253 - 4142) + chr(0b110001 + 0o1) + chr(48) + '\065', ord("\x08")), ehT0Px3KOsy9(chr(1575 - 1527) + chr(111) + chr(0b110010) + chr(54), 0o10), ehT0Px3KOsy9(chr(1140 - 1092) + chr(111) + chr(0b110010) + chr(0b110111) + chr(53), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\x32' + chr(1090 - 1041) + chr(149 - 101), 20605 - 20597), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b101000 + 0o11) + '\x31' + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(50) + '\061' + chr(0b110010), 44529 - 44521), ehT0Px3KOsy9(chr(912 - 864) + chr(111) + chr(0b110001) + '\061' + chr(2001 - 1947), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(51) + chr(2471 - 2419) + chr(54), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + '\062' + chr(55) + chr(0b110100), 32363 - 32355), ehT0Px3KOsy9('\060' + chr(0b1100110 + 0o11) + chr(0b110001) + chr(0b110000) + chr(53), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(1825 - 1773) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(1882 - 1834) + chr(111) + '\x33' + chr(0b100011 + 0o23) + chr(53), 0o10), ehT0Px3KOsy9('\060' + chr(6004 - 5893) + chr(49) + '\x30' + chr(51), 49373 - 49365), ehT0Px3KOsy9(chr(48) + '\157' + chr(49) + chr(0b100 + 0o55), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\065' + chr(0b1010 + 0o51), ord("\x08")), ehT0Px3KOsy9(chr(1693 - 1645) + '\157' + chr(695 - 644) + '\x34' + '\x30', 0b1000), ehT0Px3KOsy9('\060' + chr(0b10011 + 0o134) + chr(0b110010), 59641 - 59633), ehT0Px3KOsy9('\060' + '\x6f' + '\062' + '\x30' + chr(0b101001 + 0o14), 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(51) + chr(554 - 500) + '\x37', 58123 - 58115), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(0b1101111) + '\x31', 0b1000), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(111) + chr(0b100001 + 0o20) + '\x37' + chr(1090 - 1042), 19057 - 19049), ehT0Px3KOsy9('\x30' + chr(111) + chr(51) + '\x36' + chr(0b100 + 0o62), 0b1000), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(412 - 301) + '\x32' + chr(49) + chr(49), 0o10), ehT0Px3KOsy9('\x30' + chr(3165 - 3054) + '\067', 0o10), ehT0Px3KOsy9('\x30' + '\157' + '\x32' + chr(0b110100) + chr(0b1001 + 0o50), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(49) + chr(0b110010) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(2239 - 2187) + '\x35', 0b1000), ehT0Px3KOsy9(chr(48) + chr(8555 - 8444) + chr(0b101101 + 0o5) + '\x34' + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(51) + '\x35' + '\063', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1011110 + 0o21) + chr(0b110001) + chr(2564 - 2512) + chr(292 - 237), 38162 - 38154), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(0b1100101 + 0o12) + chr(2139 - 2085) + '\x35', 57789 - 57781), ehT0Px3KOsy9(chr(1960 - 1912) + chr(111) + '\x31' + chr(55) + chr(0b110111), 0b1000), ehT0Px3KOsy9('\x30' + chr(11554 - 11443) + chr(0b101011 + 0o10) + chr(0b1011 + 0o47), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x31' + '\x30' + chr(2336 - 2284), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + '\x6f' + chr(0b10100 + 0o41) + chr(309 - 261), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xb0'), chr(3017 - 2917) + chr(0b1010 + 0o133) + '\x63' + chr(0b100101 + 0o112) + chr(0b111010 + 0o52) + '\x65')('\165' + chr(0b1110100) + '\x66' + chr(0b101101) + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def eg1Ei2W_dvMC(FDgyextYBrUF, holLFgwB7vsP=JKh3W5EkMNxh, UYEmslrudt2y=ehT0Px3KOsy9('\060' + '\157' + '\x30', ord("\x08")), sijXcSaDomT1=Fn_g0gvMIHCm, xrb3JXGvKq_I=None, OlXHZB4xECs3=ehT0Px3KOsy9('\x30' + chr(111) + '\060', 8)): RACuGzVUu2U8 = xafqLlk3kkUe(SXOLrMavuUCe(b"\xceM\xe9\xde\x9d\x99\xf66\xc4\xe7;\xaa-\x87\xd0)E\x91c{J\x99,\xec\x99h\x0c\xd6\xfdp\xc86@\x85\x89\x1e\x15\x1ey'\xf7L\xfe\xd8\x88\xd6"), chr(4874 - 4774) + chr(101) + '\143' + '\157' + chr(4931 - 4831) + chr(0b11001 + 0o114))(chr(0b1110101) + chr(0b1011000 + 0o34) + chr(0b10010 + 0o124) + chr(0b101101) + chr(739 - 683)) assert not xafqLlk3kkUe(sijXcSaDomT1, xafqLlk3kkUe(SXOLrMavuUCe(b'\xfdG\xf5\xd8\x99\x8a\xf1s\xd9'), '\144' + chr(9027 - 8926) + '\143' + chr(0b1000001 + 0o56) + chr(0b1000110 + 0o36) + chr(0b1100101))(chr(0b100011 + 0o122) + '\x74' + chr(4069 - 3967) + chr(0b101101) + '\x38')), RACuGzVUu2U8 assert xafqLlk3kkUe(sijXcSaDomT1, xafqLlk3kkUe(SXOLrMavuUCe(b"\xfdI\xf8\xde\x99\x8d\xdap\xc8\xe6-\xfe'\x89\xd26\x7f\x81,VY\x95l"), chr(9567 - 9467) + chr(197 - 96) + '\x63' + chr(111) + '\x64' + chr(0b1100101))(chr(0b110010 + 0o103) + chr(116) + '\146' + chr(45) + chr(3132 - 3076))) is not None, RACuGzVUu2U8 if not xafqLlk3kkUe(rxiRTVettV37, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf7[\xc4\xd3\x92\x88\xe7z\xd8\xec'), chr(0b1110 + 0o126) + '\x65' + chr(0b1100011) + chr(111) + chr(3697 - 3597) + chr(6830 - 6729))(chr(0b1110101) + '\164' + chr(102) + '\055' + chr(0b11100 + 0o34)))(): xafqLlk3kkUe(rxiRTVettV37, xafqLlk3kkUe(SXOLrMavuUCe(b'\xfbF\xfa\xd4\x90\x8c'), '\144' + '\x65' + chr(0b10011 + 0o120) + chr(111) + chr(0b101000 + 0o74) + chr(0b1100101))('\165' + '\164' + chr(102) + chr(0b10101 + 0o30) + chr(458 - 402)))(all_threads=ehT0Px3KOsy9(chr(0b110000) + '\157' + '\060', 8)) sijXcSaDomT1.pxyH1Polibvt = LDyEj3hDqI8y.Profiler(sijXcSaDomT1, sijXcSaDomT1.threads_stopped) if holLFgwB7vsP is JKh3W5EkMNxh: sijXcSaDomT1.LPBkMz6QzyaB = _ziDFDWKkR8w() if GkuYXrFIAk64: xafqLlk3kkUe(GkuYXrFIAk64, xafqLlk3kkUe(SXOLrMavuUCe(b'\xedM\xef\xc6\x8e\x86\xe6b\xd4\xfc"\xef'), '\x64' + chr(4768 - 4667) + '\143' + chr(8727 - 8616) + chr(0b1100100) + '\x65')('\x75' + chr(13437 - 13321) + chr(102) + chr(0b101101) + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xecI\xe2\xe9\x8b\x86\xf7}\xd8\xfa'), chr(8947 - 8847) + chr(0b1100101) + chr(3302 - 3203) + '\157' + '\x64' + '\x65')('\x75' + chr(116) + chr(0b1010100 + 0o22) + chr(431 - 386) + '\x38')) else: if xrb3JXGvKq_I is None: xrb3JXGvKq_I = bAkkLgl6Zv7t(_ziDFDWKkR8w()) if not PlSM16l2KDPD(xrb3JXGvKq_I, bAkkLgl6Zv7t): raise sznFqDbNBHlx(xafqLlk3kkUe(SXOLrMavuUCe(b"\xca@\xfe\x96\x88\x90\xf5s\x9d\xe7(\xaa)\x8f\xca N\xd5'{B\x96g\xf7\xd7h\x1c\xd6\xe4r\xd2!\x05\xc7\x8eGq\rs2\xfbZ\xd2\xf2\xd2"), '\144' + '\145' + chr(6591 - 6492) + '\157' + chr(100) + chr(0b1100101))(chr(117) + chr(0b1110100) + chr(0b1100110) + '\x2d' + '\x38')) sijXcSaDomT1.LPBkMz6QzyaB = xrb3JXGvKq_I.binary() if holLFgwB7vsP != JKh3W5EkMNxh: sijXcSaDomT1.kKUFZvz2Gqts = bAkkLgl6Zv7t(sijXcSaDomT1.LPBkMz6QzyaB) sijXcSaDomT1.CitUWzhkzn0O = regQJFY_L3F0.nil() sijXcSaDomT1.FDgyextYBrUF = FDgyextYBrUF xafqLlk3kkUe(sijXcSaDomT1, xafqLlk3kkUe(SXOLrMavuUCe(b'\xedM\xef\xe9\x91\x86\xe1s'), '\144' + chr(0b101000 + 0o75) + chr(3133 - 3034) + '\157' + '\x64' + chr(101))('\165' + chr(0b1110100) + chr(6186 - 6084) + '\x2d' + chr(0b100000 + 0o30)))(holLFgwB7vsP) if holLFgwB7vsP == vegegFjq4lAA: return sijXcSaDomT1.znULerELFfBL = FDgyextYBrUF.create_redis_client() try: xafqLlk3kkUe(H9zaXRrGK6Cq.services, xafqLlk3kkUe(SXOLrMavuUCe(b"\xfd@\xfe\xd5\x97\xb6\xf3s\xcf\xfb'\xe5 \xb9\xd5+F\x9a"), chr(0b1100100) + chr(0b1100101) + chr(3939 - 3840) + chr(7987 - 7876) + chr(0b1011101 + 0o7) + chr(101))(chr(5318 - 5201) + '\164' + chr(102) + chr(45) + '\070'))(xafqLlk3kkUe(sijXcSaDomT1, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe4F\xce\xfa\x99\x9b\xc0Z\xfb\xee\x0c\xc6'), chr(0b1011111 + 0o5) + '\x65' + chr(0b1100011) + '\157' + chr(100) + chr(0b1100101))('\165' + '\x74' + '\146' + chr(0b101101) + '\x38'))) except jLmadlzMdunT as GlnVAPeT6CUe: if holLFgwB7vsP == QFleJOhZ8mu8: raise GlnVAPeT6CUe elif holLFgwB7vsP == JKh3W5EkMNxh: PnMtNsIg7PGC = CiXxQDnt84wa.format_exc() xafqLlk3kkUe(H9zaXRrGK6Cq.utils, xafqLlk3kkUe(SXOLrMavuUCe(b'\xee]\xe8\xde\xa3\x8c\xf7d\xd2\xfa\x11\xfe!\xb9\xd87I\x83&{t\x94j\xf7\x98t\x1f\x9e\xd6u\xc41L\xd6'), chr(100) + chr(101) + chr(0b111010 + 0o51) + '\157' + chr(4710 - 4610) + '\145')(chr(0b1010010 + 0o43) + chr(5671 - 5555) + '\146' + chr(45) + '\070'))(xafqLlk3kkUe(sijXcSaDomT1, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe4F\xce\xfa\x99\x9b\xc0Z\xfb\xee\x0c\xc6'), chr(0b10100 + 0o120) + '\x65' + chr(0b1100011) + chr(0b110 + 0o151) + '\x64' + '\x65')(chr(0b1101110 + 0o7) + '\x74' + '\146' + chr(1990 - 1945) + '\070')), xafqLlk3kkUe(NAlxrfaLQgar, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc8m\xc9\xe5\xb5\xa6\xcbI\xf0\xc1\x1d\xc7\x0f\xb2\xff\r\x7f\xa5\x16Zc\xbfG\xd7\xa5N*'), chr(100) + '\145' + chr(99) + chr(0b101000 + 0o107) + '\144' + chr(4899 - 4798))(chr(0b101000 + 0o115) + '\x74' + '\146' + chr(0b101101) + chr(56))), PnMtNsIg7PGC, driver_id=None) sijXcSaDomT1.Y7V80STXAqQ8 = mitHeYQsEXej.RLock() xafqLlk3kkUe(wLpAFVq6NX6z, xafqLlk3kkUe(SXOLrMavuUCe(b"\xc1A\xf5\xdf\x88\x80\xe4z\xd4\xf2+\xd5)\x8a\xd3'A\x99\x1cz_\x81v\xe0"), chr(0b100 + 0o140) + '\145' + chr(99) + chr(111) + chr(0b1100100) + chr(7712 - 7611))('\x75' + '\x74' + chr(102) + '\055' + chr(296 - 240)))(xafqLlk3kkUe(FDgyextYBrUF, xafqLlk3kkUe(SXOLrMavuUCe(b'\xecM\xff\xdf\x8f\xb6\xe4r\xd9\xfa+\xf9='), chr(0b1100100) + chr(101) + chr(0b11001 + 0o112) + '\157' + chr(100) + chr(0b1001 + 0o134))(chr(0b100110 + 0o117) + chr(0b110101 + 0o77) + '\x66' + '\x2d' + chr(56))), redis_password=xafqLlk3kkUe(FDgyextYBrUF, xafqLlk3kkUe(SXOLrMavuUCe(b'\xecM\xff\xdf\x8f\xb6\xf5w\xce\xfb9\xe5<\x82'), chr(100) + chr(0b10010 + 0o123) + chr(99) + '\x6f' + chr(8085 - 7985) + chr(0b1100101))(chr(0b1110101) + '\x74' + chr(102) + chr(45) + chr(56)))) if holLFgwB7vsP == QFleJOhZ8mu8: (PGNrezus7XpS,) = (jFWsnpHpAUWz(xafqLlk3kkUe(SXOLrMavuUCe(b'\xc1w\xf6\xd7\x95\x87\xdaI'), chr(0b1100100) + '\x65' + '\143' + '\x6f' + chr(0b1100100) + '\145')('\165' + chr(0b1110100) + chr(0b1100110) + chr(0b101101) + '\070')),) IvcbuyGYG1S3 = {xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0G\xff\xd3\xa3\x80\xf5I\xdc\xec*\xf8+\x95\xcf'), chr(3503 - 3403) + chr(8878 - 8777) + chr(0b1100011) + chr(0b1100111 + 0o10) + chr(0b1100100) + chr(7298 - 7197))('\x75' + chr(116) + chr(102) + chr(0b101101) + chr(56)): FDgyextYBrUF.node_ip_address, xafqLlk3kkUe(SXOLrMavuUCe(b'\xfaZ\xf2\xc0\x99\x9b\xda\x7f\xd9'), chr(0b1000011 + 0o41) + chr(3754 - 3653) + '\143' + chr(3530 - 3419) + chr(0b1100100) + chr(0b100111 + 0o76))(chr(117) + '\x74' + chr(102) + '\x2d' + '\070'): sijXcSaDomT1.LPBkMz6QzyaB, xafqLlk3kkUe(SXOLrMavuUCe(b'\xed\\\xfa\xc4\x88\xb6\xf1\x7f\xd0\xed'), chr(100) + chr(10005 - 9904) + chr(0b1011000 + 0o13) + chr(0b1101111) + '\144' + chr(101))(chr(0b1110101) + chr(3382 - 3266) + '\146' + chr(1543 - 1498) + '\070'): ltvhPP4VhXre.time(), xafqLlk3kkUe(SXOLrMavuUCe(b'\xeeD\xfa\xc5\x91\x88\xdae\xc9\xe7<\xef\x11\x95\xd3&K\x907'), chr(0b1001101 + 0o27) + chr(0b1100101) + chr(6972 - 6873) + chr(0b101000 + 0o107) + '\144' + chr(101))(chr(117) + chr(116) + '\146' + chr(0b101101) + chr(56)): FDgyextYBrUF.plasma_store_socket_name, xafqLlk3kkUe(SXOLrMavuUCe(b'\xecI\xe2\xda\x99\x9d\xdae\xd2\xeb%\xef:'), chr(0b101110 + 0o66) + '\x65' + chr(0b1100011) + chr(111) + '\144' + '\145')(chr(0b1001010 + 0o53) + '\164' + '\x66' + chr(0b101101) + chr(56)): FDgyextYBrUF.raylet_socket_name, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0I\xf6\xd3'), chr(0b1101 + 0o127) + chr(0b1100101) + '\x63' + chr(854 - 743) + chr(0b1100 + 0o130) + chr(4123 - 4022))(chr(117) + '\164' + chr(0b1100110) + chr(45) + chr(1122 - 1066)): PGNrezus7XpS.__file__ if lot1PSoAwYhj(PGNrezus7XpS, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc1w\xfd\xdf\x90\x8c\xdaI'), chr(0b101100 + 0o70) + chr(0b101010 + 0o73) + chr(0b110001 + 0o62) + chr(0b1 + 0o156) + chr(0b110000 + 0o64) + '\145')('\165' + chr(1504 - 1388) + '\x66' + chr(45) + chr(1566 - 1510))) else xafqLlk3kkUe(SXOLrMavuUCe(b'\xd7f\xcf\xf3\xae\xa8\xc6B\xf4\xde\x0b\xaa\x03\xa9\xf8\x00'), chr(100) + '\145' + chr(99) + chr(111) + chr(6781 - 6681) + chr(0b1011010 + 0o13))('\x75' + chr(116) + '\146' + chr(45) + chr(56))} xafqLlk3kkUe(sijXcSaDomT1.redis_client, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf6E\xe8\xd3\x88'), '\144' + '\145' + '\143' + chr(0b1000001 + 0o56) + '\144' + '\145')(chr(0b1100000 + 0o25) + chr(0b101100 + 0o110) + chr(8889 - 8787) + '\055' + '\070'))(SXOLrMavuUCe(b'\xdaZ\xf2\xc0\x99\x9b\xf6,') + xafqLlk3kkUe(sijXcSaDomT1, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd2x\xd9\xdd\xb1\x93\xb3G\xc7\xf1/\xc8'), '\x64' + '\x65' + chr(99) + chr(0b1101111) + chr(1278 - 1178) + '\x65')(chr(0b1110101) + chr(0b1110100) + '\x66' + chr(1731 - 1686) + '\x38')), IvcbuyGYG1S3) elif holLFgwB7vsP == JKh3W5EkMNxh: OQ1oPrTMAvBq = {xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0G\xff\xd3\xa3\x80\xf5I\xdc\xec*\xf8+\x95\xcf'), chr(2086 - 1986) + '\145' + '\x63' + chr(10993 - 10882) + chr(0b1001111 + 0o25) + chr(0b1001011 + 0o32))(chr(117) + chr(0b111010 + 0o72) + chr(102) + chr(0b111 + 0o46) + '\x38'): FDgyextYBrUF.node_ip_address, xafqLlk3kkUe(SXOLrMavuUCe(b'\xeeD\xfa\xc5\x91\x88\xdae\xc9\xe7<\xef\x11\x95\xd3&K\x907'), chr(0b1100100) + chr(0b110111 + 0o56) + chr(0b1100011) + chr(0b1101111) + '\144' + chr(101))(chr(0b1110101) + chr(116) + chr(102) + '\055' + chr(1059 - 1003)): FDgyextYBrUF.plasma_store_socket_name} CvZOJAnveNQq = sijXcSaDomT1.redis_client.get(xafqLlk3kkUe(SXOLrMavuUCe(b'\xccM\xff\xdf\x8e\x8c\xe6b\xf2\xfd:\xfa;\x92'), chr(0b1100100) + chr(0b101111 + 0o66) + chr(1958 - 1859) + chr(111) + chr(5450 - 5350) + chr(0b1100101))(chr(4689 - 4572) + '\x74' + chr(6184 - 6082) + chr(1580 - 1535) + chr(0b111000))) if CvZOJAnveNQq is not None and ehT0Px3KOsy9(CvZOJAnveNQq) == ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\061', 8): (WhmhXLyLD9UX, rIKI2XfU9fUf) = FDgyextYBrUF.new_worker_redirected_log_file(sijXcSaDomT1.LPBkMz6QzyaB) xafqLlk3kkUe(oqhJDdMJfuwx, xafqLlk3kkUe(SXOLrMavuUCe(b'\xfa]\xeb\x84'), chr(100) + chr(0b101101 + 0o70) + '\143' + chr(111) + chr(0b110100 + 0o60) + '\x65')(chr(6543 - 6426) + '\164' + '\x66' + '\x2d' + chr(0b1110 + 0o52)))(xafqLlk3kkUe(WhmhXLyLD9UX, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf8A\xf7\xd3\x92\x86'), '\x64' + chr(5639 - 5538) + chr(0b101111 + 0o64) + '\157' + chr(0b110100 + 0o60) + chr(101))(chr(0b1110101 + 0o0) + chr(0b1110100) + chr(102) + '\x2d' + chr(0b111000)))(), xafqLlk3kkUe(a2SYDDomXDZ2.stdout, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf8A\xf7\xd3\x92\x86'), chr(0b1100100) + chr(0b1100101) + '\x63' + chr(111) + chr(100) + chr(9680 - 9579))(chr(0b1010000 + 0o45) + chr(116) + chr(466 - 364) + chr(123 - 78) + chr(0b10100 + 0o44)))()) xafqLlk3kkUe(oqhJDdMJfuwx, xafqLlk3kkUe(SXOLrMavuUCe(b'\xfa]\xeb\x84'), chr(0b1110 + 0o126) + chr(0b1100101) + '\x63' + chr(7561 - 7450) + chr(0b1100100) + '\145')('\165' + chr(8988 - 8872) + chr(102) + chr(0b101010 + 0o3) + chr(0b11110 + 0o32)))(xafqLlk3kkUe(rIKI2XfU9fUf, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf8A\xf7\xd3\x92\x86'), chr(0b1100100) + '\145' + chr(99) + chr(111) + '\144' + '\x65')('\165' + chr(116) + chr(756 - 654) + '\055' + '\070'))(), xafqLlk3kkUe(a2SYDDomXDZ2.stderr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf8A\xf7\xd3\x92\x86'), chr(6116 - 6016) + chr(101) + chr(0b1100011) + chr(111) + '\x64' + chr(8636 - 8535))(chr(117) + chr(0b11000 + 0o134) + '\146' + chr(45) + chr(0b111000)))()) a2SYDDomXDZ2.GnvYj2DgYjeo = WhmhXLyLD9UX a2SYDDomXDZ2.A3pdyqhrZVRK = rIKI2XfU9fUf zLUzGokYBM2Z(xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b"\xccI\xe2\x96\x8b\x86\xf7}\xd8\xfan\xfa'\x82\x86e[\x88"), chr(0b1100100) + chr(101) + chr(0b1100011) + chr(10921 - 10810) + chr(4139 - 4039) + chr(2646 - 2545))(chr(0b1110101) + chr(116) + '\146' + chr(0b11010 + 0o23) + '\x38'), xafqLlk3kkUe(SXOLrMavuUCe(b'\xc8\x1c\xe9\xd9\xb4\x88\xd6%\xed\xf8+\xe0'), chr(0b1100100) + '\145' + '\143' + '\x6f' + chr(8324 - 8224) + chr(3455 - 3354))('\165' + '\x74' + '\x66' + chr(0b101101) + chr(1017 - 961)))(xafqLlk3kkUe(oqhJDdMJfuwx, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf9M\xef\xc6\x95\x8d'), '\144' + chr(101) + chr(99) + '\x6f' + chr(3917 - 3817) + '\x65')(chr(117) + '\x74' + chr(0b1100110) + chr(1027 - 982) + chr(0b11 + 0o65)))())) zLUzGokYBM2Z(xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b"\xccI\xe2\x96\x8b\x86\xf7}\xd8\xfan\xfa'\x82\x86e[\x88"), chr(1961 - 1861) + chr(101) + chr(0b101010 + 0o71) + chr(0b1101111) + '\144' + chr(1509 - 1408))(chr(117) + chr(0b11000 + 0o134) + chr(102) + '\055' + '\070'), xafqLlk3kkUe(SXOLrMavuUCe(b'\xc8\x1c\xe9\xd9\xb4\x88\xd6%\xed\xf8+\xe0'), '\x64' + '\145' + '\x63' + chr(111) + chr(5546 - 5446) + chr(0b1100101))(chr(117) + '\164' + chr(0b10111 + 0o117) + '\055' + chr(56)))(xafqLlk3kkUe(oqhJDdMJfuwx, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf9M\xef\xc6\x95\x8d'), '\x64' + chr(0b1100 + 0o131) + chr(0b1100011) + '\157' + chr(100) + chr(3428 - 3327))(chr(0b1100 + 0o151) + chr(116) + '\x66' + chr(0b101101) + '\x38'))()), file=xafqLlk3kkUe(a2SYDDomXDZ2, xafqLlk3kkUe(SXOLrMavuUCe(b'\xdf\x1b\xeb\xd2\x85\x98\xedd\xe7\xde\x1c\xc1'), chr(0b1100100) + chr(0b1010100 + 0o21) + chr(8973 - 8874) + chr(0b10110 + 0o131) + chr(100) + chr(0b1100101))(chr(117) + chr(0b111111 + 0o65) + '\146' + chr(0b101101) + chr(2454 - 2398)))) xafqLlk3kkUe(a2SYDDomXDZ2.stdout, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf8D\xee\xc5\x94'), chr(6080 - 5980) + '\145' + '\x63' + '\x6f' + '\144' + '\145')(chr(0b1110101) + '\164' + chr(0b1100110) + chr(0b100111 + 0o6) + '\070'))() xafqLlk3kkUe(a2SYDDomXDZ2.stderr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf8D\xee\xc5\x94'), chr(4844 - 4744) + chr(0b11110 + 0o107) + '\x63' + chr(0b1101111) + chr(0b100000 + 0o104) + '\x65')(chr(0b1110101) + '\x74' + chr(0b101101 + 0o71) + chr(0b0 + 0o55) + '\x38'))() OQ1oPrTMAvBq[xafqLlk3kkUe(SXOLrMavuUCe(b'\xed\\\xff\xd9\x89\x9d\xdap\xd4\xe4+'), chr(0b1100100) + chr(0b1100101) + chr(0b1010110 + 0o15) + chr(12091 - 11980) + chr(100) + chr(4399 - 4298))(chr(117) + '\164' + chr(102) + chr(0b110 + 0o47) + '\x38')] = oqhJDdMJfuwx.path.abspath(WhmhXLyLD9UX.AIvJRzLdDfgF) OQ1oPrTMAvBq[xafqLlk3kkUe(SXOLrMavuUCe(b'\xed\\\xff\xd3\x8e\x9b\xdap\xd4\xe4+'), '\x64' + chr(0b1000101 + 0o40) + chr(3509 - 3410) + chr(0b1101111) + '\144' + chr(0b1100101))('\x75' + '\164' + chr(102) + chr(45) + '\070')] = oqhJDdMJfuwx.path.abspath(rIKI2XfU9fUf.AIvJRzLdDfgF) xafqLlk3kkUe(sijXcSaDomT1.redis_client, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf6E\xe8\xd3\x88'), chr(203 - 103) + chr(9028 - 8927) + '\143' + chr(111) + chr(0b1100100) + '\145')('\x75' + chr(0b1110100) + chr(102) + '\055' + chr(56)))(SXOLrMavuUCe(b'\xc9G\xe9\xdd\x99\x9b\xf6,') + xafqLlk3kkUe(sijXcSaDomT1, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd2x\xd9\xdd\xb1\x93\xb3G\xc7\xf1/\xc8'), chr(100) + '\145' + '\x63' + '\x6f' + chr(0b101101 + 0o67) + chr(0b1100101))('\x75' + chr(0b110 + 0o156) + chr(3824 - 3722) + '\055' + chr(0b111000))), OQ1oPrTMAvBq) else: raise jLmadlzMdunT(xafqLlk3kkUe(SXOLrMavuUCe(b'\xca@\xf2\xc5\xdc\x8a\xear\xd8\xa8=\xe2!\x93\xd0!\x00\x97&)^\x8ep\xe0\x96b\x10\x97\xebk\xc4{'), chr(9538 - 9438) + '\145' + chr(0b1100011) + '\x6f' + '\144' + chr(0b1010001 + 0o24))(chr(0b1110101) + '\164' + chr(0b1100110) + chr(0b10001 + 0o34) + chr(0b10100 + 0o44))) sijXcSaDomT1.nElQlT1AjeaK = kRv1POBaHLFj(TBMZCz2H7ze6.connect(FDgyextYBrUF.plasma_store_socket_name, None, ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110000), 8), ehT0Px3KOsy9(chr(1595 - 1547) + '\157' + '\064' + chr(53) + chr(186 - 134), 45708 - 45700))) if holLFgwB7vsP == QFleJOhZ8mu8: c6IvjA9recj5 = WqUC3KWvYVup.random.get_state() if xafqLlk3kkUe(FDgyextYBrUF, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf1J\xf1\xd3\x9f\x9d\xda\x7f\xd9\xd7=\xef+\x82'), '\144' + chr(101) + '\x63' + chr(111) + chr(4633 - 4533) + '\145')('\x75' + chr(116) + '\x66' + chr(0b101101) + chr(56))) is not None: xafqLlk3kkUe(WqUC3KWvYVup.random, xafqLlk3kkUe(SXOLrMavuUCe(b'\xedM\xfe\xd2'), chr(0b1100100) + chr(101) + chr(0b1100011) + chr(111) + '\144' + chr(0b101010 + 0o73))(chr(3907 - 3790) + chr(0b1011100 + 0o30) + '\x66' + chr(45) + chr(69 - 13)))(xafqLlk3kkUe(FDgyextYBrUF, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf1J\xf1\xd3\x9f\x9d\xda\x7f\xd9\xd7=\xef+\x82'), chr(4343 - 4243) + chr(0b1011 + 0o132) + '\143' + chr(198 - 87) + chr(0b1100100) + '\x65')(chr(10226 - 10109) + chr(116) + chr(0b1100110) + chr(0b1011 + 0o42) + chr(853 - 797)))) else: xafqLlk3kkUe(WqUC3KWvYVup.random, xafqLlk3kkUe(SXOLrMavuUCe(b'\xedM\xfe\xd2'), '\x64' + chr(0b1100101) + '\x63' + chr(0b1100 + 0o143) + chr(100) + chr(101))(chr(0b1011111 + 0o26) + chr(0b1110100) + '\x66' + '\x2d' + '\070'))(None) xafqLlk3kkUe(WqUC3KWvYVup.random, xafqLlk3kkUe(SXOLrMavuUCe(b'\xedM\xef\xe9\x8f\x9d\xe4b\xd8'), chr(100) + '\x65' + '\x63' + chr(111) + chr(0b1100100) + chr(101))('\x75' + '\164' + '\x66' + chr(45) + chr(558 - 502)))(c6IvjA9recj5) TdwEKJLFlRiD = ehT0Px3KOsy9(chr(0b110000) + chr(0b1001001 + 0o46) + chr(0b11000 + 0o30), 8) Rnxjm6OeEOBe = Q_fVLFHEUrgb.for_driver_task() WbNyvXnsfAJk = H9zaXRrGK6Cq._raylet.Task(sijXcSaDomT1.kKUFZvz2Gqts, Rnxjm6OeEOBe.get_function_descriptor_list(), [], ehT0Px3KOsy9('\x30' + chr(111) + '\x30', 8), UWrdDWNsLCrL(_ziDFDWKkR8w()), ehT0Px3KOsy9(chr(48) + chr(11051 - 10940) + chr(1222 - 1174), 8), regQJFY_L3F0.nil(), O_W8KG047Mor.nil(), ehT0Px3KOsy9('\x30' + chr(3465 - 3354) + chr(0b110000), 8), regQJFY_L3F0.nil(), kbjwfqwgoyeK.nil(), TdwEKJLFlRiD, [], [], {}, {}) xafqLlk3kkUe(wLpAFVq6NX6z, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc1M\xe3\xd3\x9f\x9c\xf1s\xe2\xeb!\xe7#\x87\xd2!'), chr(0b1100100) + '\x65' + chr(0b111110 + 0o45) + chr(0b101111 + 0o100) + chr(0b100010 + 0o102) + chr(3462 - 3361))('\x75' + chr(0b1110100) + chr(4776 - 4674) + chr(45) + chr(0b111000)))(xafqLlk3kkUe(WbNyvXnsfAJk, xafqLlk3kkUe(SXOLrMavuUCe(b'\xeaI\xe8\xdd\xa3\x80\xe1'), chr(0b100111 + 0o75) + chr(101) + chr(0b1100011) + chr(111) + chr(0b100001 + 0o103) + '\145')(chr(0b1110101) + '\164' + chr(6118 - 6016) + '\x2d' + chr(1498 - 1442)))(), xafqLlk3kkUe(SXOLrMavuUCe(b'\xcci\xc2\x98\xa8\xa8\xc7Z\xf8\xd7\x0f\xce\n'), chr(0b100 + 0o140) + chr(0b10 + 0o143) + '\x63' + '\157' + chr(0b1011001 + 0o13) + '\x65')('\165' + chr(116) + chr(0b1010100 + 0o22) + chr(0b101101) + '\070'), xafqLlk3kkUe(H9zaXRrGK6Cq.gcs_utils.TablePrefix, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcci\xc2\xfa\xb9\xbd\xdaB\xfc\xdb\x05'), '\144' + '\x65' + '\143' + chr(0b1001 + 0o146) + chr(0b100111 + 0o75) + chr(0b101101 + 0o70))('\x75' + '\164' + chr(0b111 + 0o137) + '\055' + chr(0b111000))), xafqLlk3kkUe(H9zaXRrGK6Cq.gcs_utils.TablePubsub, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcci\xc2\xfa\xb9\xbd\xdaB\xfc\xdb\x05'), chr(100) + '\x65' + '\143' + chr(0b1101111) + '\x64' + chr(0b1011011 + 0o12))('\x75' + chr(116) + chr(0b1001101 + 0o31) + chr(0b101101) + chr(0b101 + 0o63))), xafqLlk3kkUe(WbNyvXnsfAJk.task_id(), xafqLlk3kkUe(SXOLrMavuUCe(b'\xfcA\xf5\xd7\x8e\x90'), chr(0b1100000 + 0o4) + '\x65' + chr(7414 - 7315) + '\x6f' + '\144' + '\x65')(chr(1512 - 1395) + '\164' + '\x66' + chr(0b101101) + '\070'))(), xafqLlk3kkUe(WbNyvXnsfAJk, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc1[\xfe\xc4\x95\x88\xe9\x7f\xc7\xed*\xd5<\x87\xc5)E\x81\x1c}J\x93i'), '\x64' + chr(101) + chr(322 - 223) + chr(440 - 329) + chr(5900 - 5800) + chr(101))(chr(0b1011000 + 0o35) + '\164' + chr(102) + chr(0b101001 + 0o4) + chr(0b11111 + 0o31)))()) sijXcSaDomT1.task_context.SjcyWRd98p5e = WbNyvXnsfAJk.task_id() sijXcSaDomT1.NPeqddmqygTv = H9zaXRrGK6Cq._raylet.RayletClient(FDgyextYBrUF.raylet_socket_name, InWAJ_3PynsX(sijXcSaDomT1.LPBkMz6QzyaB), holLFgwB7vsP == JKh3W5EkMNxh, bAkkLgl6Zv7t(sijXcSaDomT1.current_task_id.binary())) sijXcSaDomT1.fScz1f4MaLvH = fScz1f4MaLvH.ImportThread(sijXcSaDomT1, holLFgwB7vsP, sijXcSaDomT1.threads_stopped) xafqLlk3kkUe(sijXcSaDomT1.import_thread, xafqLlk3kkUe(SXOLrMavuUCe(b'\xed\\\xfa\xc4\x88'), '\x64' + '\145' + chr(2032 - 1933) + chr(0b111101 + 0o62) + chr(0b10000 + 0o124) + chr(0b1100101))(chr(117) + '\164' + chr(3463 - 3361) + chr(45) + '\x38'))() if holLFgwB7vsP == QFleJOhZ8mu8: WtwjCI_b3w8O = Mg4Qu1R8AQg2.Queue() sijXcSaDomT1.bmOTr7xls4Et = mitHeYQsEXej.Thread(target=Lf6k93ia4dDl, name=xafqLlk3kkUe(SXOLrMavuUCe(b'\xecI\xe2\xe9\x90\x80\xf6b\xd8\xe6\x11\xef<\x94\xd37\x7f\x98&zX\x81e\xe0\x84'), chr(0b101000 + 0o74) + chr(101) + chr(4383 - 4284) + chr(0b1101111) + chr(0b1001011 + 0o31) + chr(0b100011 + 0o102))(chr(117) + '\x74' + '\146' + chr(0b100011 + 0o12) + '\070'), args=(sijXcSaDomT1, WtwjCI_b3w8O, sijXcSaDomT1.threads_stopped)) sijXcSaDomT1.uptgqB03zhnL = mitHeYQsEXej.Thread(target=fuHCBOCDsgZ7, name=xafqLlk3kkUe(SXOLrMavuUCe(b'\xecI\xe2\xe9\x8c\x9b\xecx\xc9\xd7+\xf8<\x89\xce\x1aM\x900zJ\x87g\xf6'), chr(0b110010 + 0o62) + chr(8950 - 8849) + chr(0b1010100 + 0o17) + chr(12036 - 11925) + '\144' + chr(4740 - 4639))(chr(0b1010011 + 0o42) + '\x74' + chr(0b11100 + 0o112) + '\055' + '\070'), args=(WtwjCI_b3w8O, sijXcSaDomT1.threads_stopped)) sijXcSaDomT1.listener_thread.ZpUj6kxTlMmn = ehT0Px3KOsy9('\060' + '\157' + chr(0b110001), 8) xafqLlk3kkUe(sijXcSaDomT1.listener_thread, xafqLlk3kkUe(SXOLrMavuUCe(b'\xed\\\xfa\xc4\x88'), chr(0b100110 + 0o76) + chr(3798 - 3697) + '\x63' + chr(0b1101111) + '\144' + chr(0b1100101))('\165' + chr(0b101000 + 0o114) + chr(0b1100110) + chr(0b101100 + 0o1) + chr(0b11100 + 0o34)))() sijXcSaDomT1.printer_thread.ZpUj6kxTlMmn = ehT0Px3KOsy9('\x30' + chr(0b11101 + 0o122) + '\x31', 8) xafqLlk3kkUe(sijXcSaDomT1.printer_thread, xafqLlk3kkUe(SXOLrMavuUCe(b'\xed\\\xfa\xc4\x88'), '\x64' + '\x65' + '\143' + chr(0b1101111) + chr(100) + '\x65')(chr(117) + '\164' + '\x66' + chr(0b101101) + '\x38'))() if UYEmslrudt2y: sijXcSaDomT1.s7xFWEdTP1RD = mitHeYQsEXej.Thread(target=uM_OQLu94VlZ, name=xafqLlk3kkUe(SXOLrMavuUCe(b'\xecI\xe2\xe9\x8c\x9b\xecx\xc9\xd7"\xe5)\x95'), chr(100) + chr(4911 - 4810) + chr(912 - 813) + '\157' + chr(2057 - 1957) + chr(1096 - 995))(chr(2415 - 2298) + '\x74' + '\x66' + chr(0b10010 + 0o33) + chr(0b111000)), args=(sijXcSaDomT1.znULerELFfBL, sijXcSaDomT1.threads_stopped)) sijXcSaDomT1.logger_thread.ZpUj6kxTlMmn = ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110001), 8) xafqLlk3kkUe(sijXcSaDomT1.logger_thread, xafqLlk3kkUe(SXOLrMavuUCe(b'\xed\\\xfa\xc4\x88'), chr(3273 - 3173) + chr(0b10111 + 0o116) + chr(99) + chr(111) + chr(0b1100100) + '\145')(chr(0b1110101) + '\x74' + chr(0b101100 + 0o72) + chr(1667 - 1622) + chr(0b10111 + 0o41)))() if holLFgwB7vsP != vegegFjq4lAA: xafqLlk3kkUe(sijXcSaDomT1.profiler, xafqLlk3kkUe(SXOLrMavuUCe(b'\xed\\\xfa\xc4\x88\xb6\xe3z\xc8\xfb&\xd5:\x8e\xce A\x91'), chr(100) + '\145' + '\x63' + chr(111) + chr(0b1010111 + 0o15) + chr(0b1100101))(chr(0b1110101) + '\x74' + chr(4267 - 4165) + '\x2d' + chr(56)))() if holLFgwB7vsP == QFleJOhZ8mu8: _SJzK5uJxAtt = oqhJDdMJfuwx.path.abspath(oqhJDdMJfuwx.path.dirname(a2SYDDomXDZ2.argv[ehT0Px3KOsy9('\060' + chr(0b100001 + 0o116) + chr(2298 - 2250), 8)])) CcwaGkvusnxZ = oqhJDdMJfuwx.path.abspath(oqhJDdMJfuwx.path.curdir) xafqLlk3kkUe(sijXcSaDomT1, xafqLlk3kkUe(SXOLrMavuUCe(b'\xec]\xf5\xe9\x9a\x9c\xebu\xc9\xe1!\xe4\x11\x89\xd2\x1aA\x99/V\\\x8fp\xee\x92s\x0b'), chr(0b1000010 + 0o42) + '\x65' + '\x63' + chr(0b11111 + 0o120) + chr(0b10111 + 0o115) + chr(8038 - 7937))('\x75' + chr(6385 - 6269) + chr(8907 - 8805) + '\x2d' + '\070'))(lambda xAj9EW_R7udH: xafqLlk3kkUe(a2SYDDomXDZ2.path, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf7F\xe8\xd3\x8e\x9d'), '\x64' + chr(0b10001 + 0o124) + chr(1106 - 1007) + chr(7543 - 7432) + '\144' + '\x65')('\165' + chr(13238 - 13122) + '\x66' + chr(0b11011 + 0o22) + chr(65 - 9)))(ehT0Px3KOsy9('\060' + '\x6f' + chr(0b10110 + 0o33), 8), _SJzK5uJxAtt)) xafqLlk3kkUe(sijXcSaDomT1, xafqLlk3kkUe(SXOLrMavuUCe(b'\xec]\xf5\xe9\x9a\x9c\xebu\xc9\xe1!\xe4\x11\x89\xd2\x1aA\x99/V\\\x8fp\xee\x92s\x0b'), chr(0b1010000 + 0o24) + chr(0b1100101) + chr(5157 - 5058) + chr(6005 - 5894) + chr(0b1100100) + '\x65')(chr(3443 - 3326) + chr(6771 - 6655) + chr(0b1100110) + '\x2d' + chr(0b100100 + 0o24)))(lambda xAj9EW_R7udH: xafqLlk3kkUe(a2SYDDomXDZ2.path, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf7F\xe8\xd3\x8e\x9d'), '\144' + '\145' + '\143' + chr(0b11001 + 0o126) + chr(0b100100 + 0o100) + chr(0b110000 + 0o65))(chr(0b1110101) + chr(0b1010111 + 0o35) + chr(102) + chr(0b1001 + 0o44) + chr(56)))(ehT0Px3KOsy9(chr(0b110000) + chr(6736 - 6625) + '\x31', 8), CcwaGkvusnxZ)) for bBC93MgSHzUB in xafqLlk3kkUe(sijXcSaDomT1, xafqLlk3kkUe(SXOLrMavuUCe(b"\xfdI\xf8\xde\x99\x8d\xdap\xc8\xe6-\xfe'\x89\xd26\x7f\x81,VY\x95l"), chr(0b1100100) + '\x65' + chr(0b1100011) + chr(111) + '\x64' + chr(101))('\x75' + chr(0b101100 + 0o110) + chr(102) + chr(0b101101) + chr(0b111000))): xafqLlk3kkUe(sijXcSaDomT1, xafqLlk3kkUe(SXOLrMavuUCe(b'\xec]\xf5\xe9\x9a\x9c\xebu\xc9\xe1!\xe4\x11\x89\xd2\x1aA\x99/V\\\x8fp\xee\x92s\x0b'), chr(100) + chr(0b1000010 + 0o43) + '\143' + '\x6f' + chr(0b1010 + 0o132) + '\145')(chr(2895 - 2778) + chr(0b101000 + 0o114) + chr(102) + chr(0b101101) + chr(0b111000)))(bBC93MgSHzUB) xafqLlk3kkUe(sijXcSaDomT1.function_actor_manager, xafqLlk3kkUe(SXOLrMavuUCe(b'\xfbP\xeb\xd9\x8e\x9d\xdau\xdc\xeb&\xef*'), '\x64' + chr(5726 - 5625) + '\143' + '\157' + chr(100) + chr(0b111110 + 0o47))(chr(0b1000011 + 0o62) + chr(0b1110100) + '\146' + chr(0b100100 + 0o11) + chr(56)))() sijXcSaDomT1.T0dbcfyZIDHq = None
ray-project/ray
python/ray/worker.py
disconnect
def disconnect(): """Disconnect this worker from the raylet and object store.""" # Reset the list of cached remote functions and actors so that if more # remote functions or actors are defined and then connect is called again, # the remote functions will be exported. This is mostly relevant for the # tests. worker = global_worker if worker.connected: # Shutdown all of the threads that we've started. TODO(rkn): This # should be handled cleanly in the worker object's destructor and not # in this disconnect method. worker.threads_stopped.set() if hasattr(worker, "import_thread"): worker.import_thread.join_import_thread() if hasattr(worker, "profiler") and hasattr(worker.profiler, "t"): worker.profiler.join_flush_thread() if hasattr(worker, "listener_thread"): worker.listener_thread.join() if hasattr(worker, "printer_thread"): worker.printer_thread.join() if hasattr(worker, "logger_thread"): worker.logger_thread.join() worker.threads_stopped.clear() worker._session_index += 1 worker.node = None # Disconnect the worker from the node. worker.cached_functions_to_run = [] worker.function_actor_manager.reset_cache() worker.serialization_context_map.clear() if hasattr(worker, "raylet_client"): del worker.raylet_client if hasattr(worker, "plasma_client"): worker.plasma_client.disconnect()
python
def disconnect(): """Disconnect this worker from the raylet and object store.""" # Reset the list of cached remote functions and actors so that if more # remote functions or actors are defined and then connect is called again, # the remote functions will be exported. This is mostly relevant for the # tests. worker = global_worker if worker.connected: # Shutdown all of the threads that we've started. TODO(rkn): This # should be handled cleanly in the worker object's destructor and not # in this disconnect method. worker.threads_stopped.set() if hasattr(worker, "import_thread"): worker.import_thread.join_import_thread() if hasattr(worker, "profiler") and hasattr(worker.profiler, "t"): worker.profiler.join_flush_thread() if hasattr(worker, "listener_thread"): worker.listener_thread.join() if hasattr(worker, "printer_thread"): worker.printer_thread.join() if hasattr(worker, "logger_thread"): worker.logger_thread.join() worker.threads_stopped.clear() worker._session_index += 1 worker.node = None # Disconnect the worker from the node. worker.cached_functions_to_run = [] worker.function_actor_manager.reset_cache() worker.serialization_context_map.clear() if hasattr(worker, "raylet_client"): del worker.raylet_client if hasattr(worker, "plasma_client"): worker.plasma_client.disconnect()
[ "def", "disconnect", "(", ")", ":", "# Reset the list of cached remote functions and actors so that if more", "# remote functions or actors are defined and then connect is called again,", "# the remote functions will be exported. This is mostly relevant for the", "# tests.", "worker", "=", "global_worker", "if", "worker", ".", "connected", ":", "# Shutdown all of the threads that we've started. TODO(rkn): This", "# should be handled cleanly in the worker object's destructor and not", "# in this disconnect method.", "worker", ".", "threads_stopped", ".", "set", "(", ")", "if", "hasattr", "(", "worker", ",", "\"import_thread\"", ")", ":", "worker", ".", "import_thread", ".", "join_import_thread", "(", ")", "if", "hasattr", "(", "worker", ",", "\"profiler\"", ")", "and", "hasattr", "(", "worker", ".", "profiler", ",", "\"t\"", ")", ":", "worker", ".", "profiler", ".", "join_flush_thread", "(", ")", "if", "hasattr", "(", "worker", ",", "\"listener_thread\"", ")", ":", "worker", ".", "listener_thread", ".", "join", "(", ")", "if", "hasattr", "(", "worker", ",", "\"printer_thread\"", ")", ":", "worker", ".", "printer_thread", ".", "join", "(", ")", "if", "hasattr", "(", "worker", ",", "\"logger_thread\"", ")", ":", "worker", ".", "logger_thread", ".", "join", "(", ")", "worker", ".", "threads_stopped", ".", "clear", "(", ")", "worker", ".", "_session_index", "+=", "1", "worker", ".", "node", "=", "None", "# Disconnect the worker from the node.", "worker", ".", "cached_functions_to_run", "=", "[", "]", "worker", ".", "function_actor_manager", ".", "reset_cache", "(", ")", "worker", ".", "serialization_context_map", ".", "clear", "(", ")", "if", "hasattr", "(", "worker", ",", "\"raylet_client\"", ")", ":", "del", "worker", ".", "raylet_client", "if", "hasattr", "(", "worker", ",", "\"plasma_client\"", ")", ":", "worker", ".", "plasma_client", ".", "disconnect", "(", ")" ]
Disconnect this worker from the raylet and object store.
[ "Disconnect", "this", "worker", "from", "the", "raylet", "and", "object", "store", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/worker.py#L1961-L1994
train
Disconnect this worker from the raylet and object store.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPvpP4xdo3,cW7yQuyEnJ6E,KOHQGQ8qLDWm,NE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rOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001) + chr(0b101 + 0o61) + chr(0b1011 + 0o51), 13618 - 13610), ehT0Px3KOsy9(chr(48) + chr(0b10010 + 0o135) + '\x31' + '\062' + chr(54), 32594 - 32586), ehT0Px3KOsy9(chr(0b110000) + chr(2105 - 1994) + '\x31' + '\x34' + '\061', 22663 - 22655), ehT0Px3KOsy9(chr(347 - 299) + chr(0b1101111) + chr(49) + chr(0b110111) + chr(49), 18116 - 18108), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x32' + chr(59 - 8) + '\x35', 22837 - 22829), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(0b101000 + 0o107) + chr(2630 - 2576), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110001) + '\x37' + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1100101 + 0o12) + chr(49) + '\061' + '\x33', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110010) + '\061' + chr(54), 0o10), ehT0Px3KOsy9(chr(1702 - 1654) + chr(0b1000101 + 0o52) + '\062' + '\064' + chr(479 - 428), 20169 - 20161), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110101) + '\x36', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + '\x35' + chr(1121 - 1067), 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110001) + chr(843 - 794) + chr(48), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(51) + chr(0b110101) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(1981 - 1933) + chr(0b1101111) + chr(49) + '\063' + '\060', 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(50) + chr(49) + '\060', 36142 - 36134), ehT0Px3KOsy9(chr(202 - 154) + chr(4085 - 3974) + '\x36' + chr(1856 - 1806), 54597 - 54589), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(50) + chr(0b10001 + 0o41) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(0b1100101 + 0o12) + '\062' + '\x32' + chr(1214 - 1163), 45971 - 45963), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110010) + '\062' + '\065', ord("\x08")), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(0b1001110 + 0o41) + chr(0b100001 + 0o21) + '\065' + chr(0b100000 + 0o23), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\064' + chr(113 - 60), 0b1000), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(111) + chr(50) + '\x34' + chr(1235 - 1187), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(55) + chr(93 - 43), 0o10), ehT0Px3KOsy9('\060' + '\157' + '\x33' + chr(55) + chr(0b110000), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110001) + chr(0b110111 + 0o0) + chr(0b100 + 0o60), 6270 - 6262), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b101 + 0o55) + chr(50) + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(88 - 40) + '\157' + chr(0b110011) + chr(0b110010) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(0b1101110 + 0o1) + chr(0b110010) + '\x34', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\062' + '\065' + chr(1942 - 1891), 8), ehT0Px3KOsy9(chr(48) + chr(0b110010 + 0o75) + chr(0b10000 + 0o47) + '\065', 0b1000), ehT0Px3KOsy9(chr(921 - 873) + chr(111) + '\061' + chr(54) + chr(2142 - 2093), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b10001 + 0o43) + chr(51), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(828 - 778) + '\063' + '\062', ord("\x08")), ehT0Px3KOsy9(chr(1716 - 1668) + chr(4201 - 4090) + '\062' + '\064' + '\x33', 8), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(51) + chr(0b100001 + 0o26) + chr(1751 - 1699), ord("\x08")), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(111) + '\x36' + '\062', 8), ehT0Px3KOsy9(chr(0b110 + 0o52) + '\x6f' + chr(0b1010 + 0o47) + chr(1202 - 1147) + chr(1831 - 1778), 0b1000), ehT0Px3KOsy9(chr(48) + chr(2715 - 2604) + chr(50) + chr(0b110001) + chr(1794 - 1740), 8), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(0b1101011 + 0o4) + '\063' + '\061' + chr(0b110101), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(10978 - 10867) + '\065' + chr(249 - 201), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'Z'), chr(100) + chr(0b1100101) + chr(99) + '\x6f' + chr(100) + chr(3373 - 3272))(chr(117) + chr(0b1110100) + chr(102) + chr(45) + chr(0b10110 + 0o42)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def akLp7mNJkXPg(): sijXcSaDomT1 = Fn_g0gvMIHCm if xafqLlk3kkUe(sijXcSaDomT1, xafqLlk3kkUe(SXOLrMavuUCe(b'\x179\x0f\x17\xf8e\x0e.\xea'), chr(0b1100100) + '\145' + chr(0b1011001 + 0o12) + '\157' + '\x64' + chr(7813 - 7712))(chr(0b1110101) + '\164' + '\x66' + chr(0b101101) + '\070')): xafqLlk3kkUe(sijXcSaDomT1.threads_stopped, xafqLlk3kkUe(SXOLrMavuUCe(b'\x073\x15'), chr(0b10110 + 0o116) + chr(101) + chr(6765 - 6666) + '\x6f' + chr(683 - 583) + chr(0b1100101))('\x75' + chr(116) + chr(0b1011001 + 0o15) + '\055' + chr(0b111000)))() if lot1PSoAwYhj(sijXcSaDomT1, xafqLlk3kkUe(SXOLrMavuUCe(b'\x1d;\x11\x16\xefr%?\xe6\xd1KO,'), chr(100) + '\x65' + chr(99) + '\157' + chr(0b1000100 + 0o40) + chr(0b100010 + 0o103))('\165' + chr(0b101010 + 0o112) + '\146' + chr(0b11100 + 0o21) + '\070')): xafqLlk3kkUe(sijXcSaDomT1.import_thread, xafqLlk3kkUe(SXOLrMavuUCe(b'\x1e9\x08\x17\xc2o\x17;\xe1\xd1Zq<\x84*\xedS\xf3'), chr(100) + '\x65' + chr(0b1100011) + chr(0b1101100 + 0o3) + '\x64' + '\x65')(chr(117) + chr(7500 - 7384) + chr(0b1010110 + 0o20) + '\x2d' + '\070'))() if lot1PSoAwYhj(sijXcSaDomT1, xafqLlk3kkUe(SXOLrMavuUCe(b'\x04$\x0e\x1f\xf4j\x1f9'), chr(100) + chr(0b110100 + 0o61) + chr(99) + chr(111) + '\x64' + chr(101))(chr(0b1011101 + 0o30) + chr(0b1001110 + 0o46) + '\x66' + '\x2d' + chr(0b111000))) and lot1PSoAwYhj(xafqLlk3kkUe(sijXcSaDomT1, xafqLlk3kkUe(SXOLrMavuUCe(b"\x04.\x181\xacV\x15'\xe7\xc1XZ"), '\x64' + chr(101) + chr(99) + '\x6f' + chr(2485 - 2385) + chr(0b1010111 + 0o16))(chr(2199 - 2082) + chr(116) + chr(4974 - 4872) + chr(0b11 + 0o52) + chr(56))), xafqLlk3kkUe(SXOLrMavuUCe(b'\x00'), '\x64' + chr(0b1100101) + chr(0b100111 + 0o74) + chr(545 - 434) + chr(6900 - 6800) + '\145')(chr(0b1110101) + chr(4107 - 3991) + '\146' + '\055' + '\070')): xafqLlk3kkUe(sijXcSaDomT1.profiler, xafqLlk3kkUe(SXOLrMavuUCe(b'\x1e9\x08\x17\xc2`\x16>\xfd\xcbqZ \x9e=\xe9V'), chr(0b1100100) + chr(0b11111 + 0o106) + chr(99) + chr(4231 - 4120) + '\x64' + '\145')(chr(757 - 640) + '\x74' + chr(0b10100 + 0o122) + chr(1234 - 1189) + '\070'))() if lot1PSoAwYhj(sijXcSaDomT1, xafqLlk3kkUe(SXOLrMavuUCe(b'\x18?\x12\r\xf8h\x1f9\xd1\xd7F\\-\x8d<'), chr(0b1100100) + chr(101) + '\143' + chr(0b1011100 + 0o23) + chr(100) + chr(0b10100 + 0o121))('\165' + '\164' + '\x66' + '\x2d' + '\070')): xafqLlk3kkUe(sijXcSaDomT1.listener_thread, xafqLlk3kkUe(SXOLrMavuUCe(b'+96!\xe7r,\x05\xe0\xd2fh'), '\x64' + chr(0b1100101) + '\143' + '\157' + chr(0b1000111 + 0o35) + '\145')('\165' + chr(116) + chr(0b1100110) + '\x2d' + '\x38'))() if lot1PSoAwYhj(sijXcSaDomT1, xafqLlk3kkUe(SXOLrMavuUCe(b'\x04$\x08\x17\xe9c\x08\x14\xfa\xcb\\K)\x88'), chr(0b1100100) + chr(0b1100101) + '\x63' + '\x6f' + chr(0b10 + 0o142) + chr(0b1101 + 0o130))('\165' + chr(0b1110100) + chr(102) + chr(0b101101) + chr(1679 - 1623))): xafqLlk3kkUe(sijXcSaDomT1.printer_thread, xafqLlk3kkUe(SXOLrMavuUCe(b'+96!\xe7r,\x05\xe0\xd2fh'), '\144' + chr(0b1100101) + chr(0b111001 + 0o52) + chr(4452 - 4341) + chr(0b1100100) + '\x65')(chr(0b1100101 + 0o20) + '\164' + '\x66' + chr(45) + chr(0b110100 + 0o4)))() if lot1PSoAwYhj(sijXcSaDomT1, xafqLlk3kkUe(SXOLrMavuUCe(b'\x189\x06\x1e\xf8t%?\xe6\xd1KO,'), chr(100) + chr(0b1100101) + chr(99) + '\x6f' + '\x64' + chr(7240 - 7139))(chr(117) + chr(10727 - 10611) + '\146' + '\x2d' + chr(0b111000))): xafqLlk3kkUe(sijXcSaDomT1.logger_thread, xafqLlk3kkUe(SXOLrMavuUCe(b'+96!\xe7r,\x05\xe0\xd2fh'), '\144' + chr(0b1100101) + chr(0b1100011) + chr(4820 - 4709) + chr(7847 - 7747) + chr(0b111101 + 0o50))('\165' + chr(116) + chr(0b1100110) + chr(0b10 + 0o53) + chr(3106 - 3050)))() xafqLlk3kkUe(sijXcSaDomT1.threads_stopped, xafqLlk3kkUe(SXOLrMavuUCe(b'\x17:\x04\x18\xef'), chr(100) + chr(0b101000 + 0o75) + chr(0b1100011) + chr(0b110111 + 0o70) + chr(0b1011011 + 0o11) + '\145')(chr(0b1110101) + chr(0b100111 + 0o115) + chr(3628 - 3526) + chr(0b101101) + chr(0b111000)))() sijXcSaDomT1.a32wqICB9QxU += ehT0Px3KOsy9(chr(48) + '\157' + chr(0b10100 + 0o35), 0o10) sijXcSaDomT1.FDgyextYBrUF = None sijXcSaDomT1.T0dbcfyZIDHq = [] xafqLlk3kkUe(sijXcSaDomT1.function_actor_manager, xafqLlk3kkUe(SXOLrMavuUCe(b'\x063\x12\x1c\xe9Y\x19*\xed\xcbK'), chr(0b1100100) + chr(101) + chr(99) + '\x6f' + chr(0b1100100) + chr(0b1000000 + 0o45))(chr(117) + '\x74' + chr(0b1100110) + '\x2d' + chr(56)))() xafqLlk3kkUe(sijXcSaDomT1.serialization_context_map, xafqLlk3kkUe(SXOLrMavuUCe(b'\x17:\x04\x18\xef'), '\x64' + '\x65' + '\x63' + chr(111) + '\x64' + '\x65')(chr(0b1110101) + '\x74' + chr(102) + '\x2d' + '\x38'))() if lot1PSoAwYhj(sijXcSaDomT1, xafqLlk3kkUe(SXOLrMavuUCe(b'\x067\x18\x15\xf8r%(\xe2\xcaK@<'), '\144' + chr(0b1100101) + chr(5716 - 5617) + chr(7743 - 7632) + '\144' + '\145')(chr(0b1 + 0o164) + chr(0b1110100) + chr(1422 - 1320) + '\x2d' + '\x38')): del xafqLlk3kkUe(sijXcSaDomT1, xafqLlk3kkUe(SXOLrMavuUCe(b':\x06\x04\x08\xf9b\x17:\xf7\xc4zX'), '\144' + '\145' + '\x63' + '\157' + chr(0b1100100) + chr(0b101 + 0o140))(chr(117) + chr(116) + chr(766 - 664) + chr(45) + chr(0b111000))) if lot1PSoAwYhj(sijXcSaDomT1, xafqLlk3kkUe(SXOLrMavuUCe(b'\x04:\x00\n\xf0g%(\xe2\xcaK@<'), chr(100) + '\x65' + chr(99) + chr(0b1101111) + '\x64' + '\x65')('\x75' + chr(5212 - 5096) + chr(0b1100110) + chr(45) + chr(0b111000))): xafqLlk3kkUe(sijXcSaDomT1.plasma_client, xafqLlk3kkUe(SXOLrMavuUCe(b'\x10?\x12\x1a\xf2h\x14.\xed\xd7'), chr(0b10111 + 0o115) + chr(8135 - 8034) + chr(0b1100011) + chr(1987 - 1876) + chr(100) + '\145')(chr(3966 - 3849) + chr(0b1110100) + chr(2857 - 2755) + chr(45) + chr(0b111000)))()
ray-project/ray
python/ray/worker.py
_try_to_compute_deterministic_class_id
def _try_to_compute_deterministic_class_id(cls, depth=5): """Attempt to produce a deterministic class ID for a given class. The goal here is for the class ID to be the same when this is run on different worker processes. Pickling, loading, and pickling again seems to produce more consistent results than simply pickling. This is a bit crazy and could cause problems, in which case we should revert it and figure out something better. Args: cls: The class to produce an ID for. depth: The number of times to repeatedly try to load and dump the string while trying to reach a fixed point. Returns: A class ID for this class. We attempt to make the class ID the same when this function is run on different workers, but that is not guaranteed. Raises: Exception: This could raise an exception if cloudpickle raises an exception. """ # Pickling, loading, and pickling again seems to produce more consistent # results than simply pickling. This is a bit class_id = pickle.dumps(cls) for _ in range(depth): new_class_id = pickle.dumps(pickle.loads(class_id)) if new_class_id == class_id: # We appear to have reached a fix point, so use this as the ID. return hashlib.sha1(new_class_id).digest() class_id = new_class_id # We have not reached a fixed point, so we may end up with a different # class ID for this custom class on each worker, which could lead to the # same class definition being exported many many times. logger.warning( "WARNING: Could not produce a deterministic class ID for class " "{}".format(cls)) return hashlib.sha1(new_class_id).digest()
python
def _try_to_compute_deterministic_class_id(cls, depth=5): """Attempt to produce a deterministic class ID for a given class. The goal here is for the class ID to be the same when this is run on different worker processes. Pickling, loading, and pickling again seems to produce more consistent results than simply pickling. This is a bit crazy and could cause problems, in which case we should revert it and figure out something better. Args: cls: The class to produce an ID for. depth: The number of times to repeatedly try to load and dump the string while trying to reach a fixed point. Returns: A class ID for this class. We attempt to make the class ID the same when this function is run on different workers, but that is not guaranteed. Raises: Exception: This could raise an exception if cloudpickle raises an exception. """ # Pickling, loading, and pickling again seems to produce more consistent # results than simply pickling. This is a bit class_id = pickle.dumps(cls) for _ in range(depth): new_class_id = pickle.dumps(pickle.loads(class_id)) if new_class_id == class_id: # We appear to have reached a fix point, so use this as the ID. return hashlib.sha1(new_class_id).digest() class_id = new_class_id # We have not reached a fixed point, so we may end up with a different # class ID for this custom class on each worker, which could lead to the # same class definition being exported many many times. logger.warning( "WARNING: Could not produce a deterministic class ID for class " "{}".format(cls)) return hashlib.sha1(new_class_id).digest()
[ "def", "_try_to_compute_deterministic_class_id", "(", "cls", ",", "depth", "=", "5", ")", ":", "# Pickling, loading, and pickling again seems to produce more consistent", "# results than simply pickling. This is a bit", "class_id", "=", "pickle", ".", "dumps", "(", "cls", ")", "for", "_", "in", "range", "(", "depth", ")", ":", "new_class_id", "=", "pickle", ".", "dumps", "(", "pickle", ".", "loads", "(", "class_id", ")", ")", "if", "new_class_id", "==", "class_id", ":", "# We appear to have reached a fix point, so use this as the ID.", "return", "hashlib", ".", "sha1", "(", "new_class_id", ")", ".", "digest", "(", ")", "class_id", "=", "new_class_id", "# We have not reached a fixed point, so we may end up with a different", "# class ID for this custom class on each worker, which could lead to the", "# same class definition being exported many many times.", "logger", ".", "warning", "(", "\"WARNING: Could not produce a deterministic class ID for class \"", "\"{}\"", ".", "format", "(", "cls", ")", ")", "return", "hashlib", ".", "sha1", "(", "new_class_id", ")", ".", "digest", "(", ")" ]
Attempt to produce a deterministic class ID for a given class. The goal here is for the class ID to be the same when this is run on different worker processes. Pickling, loading, and pickling again seems to produce more consistent results than simply pickling. This is a bit crazy and could cause problems, in which case we should revert it and figure out something better. Args: cls: The class to produce an ID for. depth: The number of times to repeatedly try to load and dump the string while trying to reach a fixed point. Returns: A class ID for this class. We attempt to make the class ID the same when this function is run on different workers, but that is not guaranteed. Raises: Exception: This could raise an exception if cloudpickle raises an exception.
[ "Attempt", "to", "produce", "a", "deterministic", "class", "ID", "for", "a", "given", "class", "." ]
4eade036a0505e244c976f36aaa2d64386b5129b
https://github.com/ray-project/ray/blob/4eade036a0505e244c976f36aaa2d64386b5129b/python/ray/worker.py#L2006-L2045
train
Attempt to produce a deterministic class ID for a given class.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8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,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b11000 + 0o30) + '\x6f' + '\x35' + chr(0b10001 + 0o41), 0o10), ehT0Px3KOsy9(chr(1912 - 1864) + chr(0b1101111) + chr(0b10110 + 0o40) + '\067', ord("\x08")), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(0b1010111 + 0o30) + '\067' + chr(1760 - 1707), 0b1000), ehT0Px3KOsy9(chr(48) + chr(2119 - 2008) + chr(52), 0b1000), ehT0Px3KOsy9(chr(2264 - 2216) + chr(111) + chr(0b110011) + '\x37' + chr(2178 - 2129), 37430 - 37422), ehT0Px3KOsy9('\x30' + chr(0b1101100 + 0o3) + '\x32' + '\067' + '\064', 0o10), ehT0Px3KOsy9(chr(0b11101 + 0o23) + '\157' + '\061' + chr(1807 - 1752) + '\061', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b101011 + 0o10) + chr(0b110001) + chr(0b110111), 64232 - 64224), ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(111) + chr(0b10001 + 0o41) + chr(1464 - 1414), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b11111 + 0o120) + chr(51) + chr(0b110010) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(0b100000 + 0o117) + chr(0b10101 + 0o34) + chr(0b11000 + 0o37) + chr(0b110001), 8), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(51) + chr(0b11100 + 0o30) + chr(0b100111 + 0o13), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(50) + chr(52) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + '\067' + '\060', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1114 - 1063) + chr(1918 - 1870), 0o10), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(111) + chr(0b110111) + chr(54), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(970 - 921) + '\x37' + '\060', 0o10), ehT0Px3KOsy9(chr(1036 - 988) + chr(111) + chr(0b110100) + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(48) + chr(5844 - 5733) + chr(0b10100 + 0o36) + chr(895 - 847) + chr(192 - 140), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\062' + '\061', 53743 - 53735), ehT0Px3KOsy9(chr(0b10010 + 0o36) + '\157' + chr(0b110011) + '\065' + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(0b1001 + 0o47) + '\157' + chr(148 - 98) + chr(51) + chr(0b100111 + 0o12), 19317 - 19309), ehT0Px3KOsy9(chr(0b110000) + chr(6540 - 6429) + chr(50) + chr(0b101111 + 0o10) + chr(0b10 + 0o56), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b11001 + 0o35) + '\065', 38865 - 38857), ehT0Px3KOsy9(chr(0b11111 + 0o21) + '\157' + chr(0b11001 + 0o31) + '\x30' + '\065', 25560 - 25552), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\062' + '\x32' + chr(0b101010 + 0o12), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x31' + '\x33' + chr(0b110000), 0o10), ehT0Px3KOsy9('\060' + chr(0b10101 + 0o132) + '\063' + '\x33' + chr(2327 - 2272), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b11001 + 0o32) + '\060' + '\062', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + '\x33' + '\x32' + '\060', 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(512 - 463) + chr(933 - 885) + '\x33', 54075 - 54067), ehT0Px3KOsy9('\x30' + '\x6f' + '\x31' + chr(51) + chr(1277 - 1228), 61123 - 61115), ehT0Px3KOsy9('\060' + '\157' + chr(0b101101 + 0o4) + chr(0b11000 + 0o37), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(49) + chr(0b10 + 0o60) + chr(53), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + '\x36' + '\060', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b1111 + 0o42) + '\060' + chr(0b11000 + 0o31), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\065' + chr(0b110111), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b1100 + 0o47) + '\x30' + '\065', 49104 - 49096), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\064' + '\x35', 0o10), ehT0Px3KOsy9(chr(549 - 501) + '\157' + chr(1834 - 1785) + chr(726 - 672) + chr(0b100010 + 0o17), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + '\x6f' + chr(0b101011 + 0o12) + chr(0b110000), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x04'), chr(0b1100100) + chr(101) + chr(0b1100011) + '\x6f' + chr(5275 - 5175) + '\x65')(chr(117) + chr(4517 - 4401) + chr(0b1100110) + '\x2d' + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def CaMWDFEmy9eq(NSstowUUZlxS, UEys4_lSwsID=ehT0Px3KOsy9('\x30' + chr(10940 - 10829) + chr(53), 46532 - 46524)): BshyLHM1dmii = b1Ng5DsPF9ZY.dumps(NSstowUUZlxS) for VNGQdHSFPrso in vQr8gNKaIaWE(UEys4_lSwsID): OCuwL9_0HSBu = b1Ng5DsPF9ZY.dumps(b1Ng5DsPF9ZY.loads(BshyLHM1dmii)) if OCuwL9_0HSBu == BshyLHM1dmii: return xafqLlk3kkUe(sNzNrLIR8V9g.sha1(OCuwL9_0HSBu), xafqLlk3kkUe(SXOLrMavuUCe(b'N^Za\x8a\xc8'), chr(0b1100100) + chr(579 - 478) + chr(0b100000 + 0o103) + '\x6f' + chr(0b1100100) + '\145')(chr(2507 - 2390) + '\164' + '\146' + chr(0b101101) + '\070'))() BshyLHM1dmii = OCuwL9_0HSBu xafqLlk3kkUe(hdK8qOUhR6Or, xafqLlk3kkUe(SXOLrMavuUCe(b']VOj\x90\xd2\x1e'), '\144' + '\x65' + chr(0b100011 + 0o100) + chr(111) + chr(100) + '\145')('\165' + chr(0b100100 + 0o120) + chr(0b1100110) + '\055' + '\070'))(xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b"}voJ\xb0\xf2>\xf52\x97\x16\x97\xcc\\8P\x17V\xa4a\x9d\xf6\xdc@\xe6\xf1x\xbe\xe2\xb4&-j'](A\xacV\x05CT\x1dg\x95\xdd\n\xbc2\x9d=\xc2\xc6Wj\x1e\x1bN\xe5b\x9c\xb9\xc3H"), '\144' + '\x65' + '\143' + '\x6f' + chr(0b1100100) + chr(9446 - 9345))(chr(0b11110 + 0o127) + chr(0b1110100) + '\x66' + chr(0b100111 + 0o6) + chr(0b110110 + 0o2)), xafqLlk3kkUe(SXOLrMavuUCe(b'|\x03Ok\xb1\xdd*\xfcB\xa4\x1c\x88'), chr(100) + chr(8159 - 8058) + chr(0b1100011) + '\x6f' + '\144' + '\x65')(chr(1554 - 1437) + '\164' + chr(0b1100110) + chr(45) + '\x38'))(NSstowUUZlxS)) return xafqLlk3kkUe(sNzNrLIR8V9g.sha1(OCuwL9_0HSBu), xafqLlk3kkUe(SXOLrMavuUCe(b'N^Za\x8a\xc8'), '\x64' + chr(3141 - 3040) + chr(99) + chr(0b1011000 + 0o27) + chr(0b1010101 + 0o17) + chr(0b100110 + 0o77))(chr(0b1110101) + '\x74' + chr(102) + '\055' + chr(0b111000)))()