BUILD 143 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503
  1. # --------------------------------------------------------------------
  2. # BAZEL/Buildkite-CI test cases.
  3. # --------------------------------------------------------------------
  4. # To add new RLlib tests, first find the correct category of your new test
  5. # within this file.
  6. # All new tests - within their category - should be added alphabetically!
  7. # Do not just add tests to the bottom of the file.
  8. # Currently we have the following categories:
  9. # - Learning tests/regression, tagged:
  10. # -- "learning_tests_[discrete|continuous]": distinguish discrete
  11. # actions vs continuous actions.
  12. # -- "crashing_cartpole" and "stateless_cartpole" to distinguish between
  13. # simple CartPole and more advanced variants of it.
  14. # -- "fake_gpus": Tests that run using 2 fake GPUs.
  15. # -- "ray_data": Tests that rely on ray_data.
  16. # -- "learning_tests_with_ray_data": Learning tests that rely on ray_data.
  17. # - Quick algo compilation/tune-train tests, tagged "quick_train".
  18. # NOTE: These should be obsoleted in favor of "algorithms_dir" tests as
  19. # they cover the same functionality.
  20. # - Folder-bound tests, tagged with the name of the top-level dir:
  21. # - `env` directory tests.
  22. # - `evaluation` directory tests.
  23. # - `execution` directory tests.
  24. # - `models` directory tests.
  25. # - `offline` directory tests.
  26. # - `policy` directory tests.
  27. # - `utils` directory tests.
  28. # - Algorithm tests, tagged "algorithms_dir".
  29. # - Tests directory (everything in rllib/tests/...), tagged: "tests_dir"
  30. # - Examples directory (everything in rllib/examples/...), tagged: "examples"
  31. # - Memory leak tests tagged "memory_leak_tests".
  32. # Note: There is a special directory in examples: "documentation" which contains
  33. # all code that is linked to from within the RLlib docs. This code is tested
  34. # separately via the "documentation" tag.
  35. # Additional tags are:
  36. # - "team:rllib": Indicating that all tests in this file are the responsibility of
  37. # the RLlib Team.
  38. # - "needs_gpu": Indicating that a test needs to have a GPU in order to run.
  39. # - "gpu": Indicating that a test may (but doesn't have to) be run in the GPU
  40. # pipeline, defined in .buildkite/pipeline.gpu.yml.
  41. # - "multi_gpu": Indicating that a test will definitely be run in the Large GPU
  42. # pipeline, defined in .buildkite/pipeline.gpu.large.yml.
  43. # - "no_gpu": Indicating that a test should not be run in the GPU pipeline due
  44. # to certain incompatibilities.
  45. # - "no_tf_eager_tracing": Exclude this test from tf-eager tracing tests.
  46. # - "torch_only": Only run this test case with framework=torch.
  47. # Our .buildkite/pipeline.yml and .buildkite/pipeline.gpu.yml files execute all
  48. # these tests in n different jobs.
  49. load("//bazel:python.bzl", "py_test_module_list")
  50. load("//bazel:python.bzl", "doctest")
  51. doctest(
  52. files = glob(
  53. ["**/*.py"],
  54. exclude=[
  55. "**/examples/**",
  56. "**/tests/**",
  57. "**/test_*.py",
  58. # Deprecated modules
  59. "utils/window_stat.py",
  60. "utils/timer.py",
  61. "utils/memory.py",
  62. "offline/off_policy_estimator.py",
  63. "offline/estimators/feature_importance.py",
  64. "env/wrappers/recsim_wrapper.py",
  65. "env/remote_vector_env.py",
  66. # Missing imports
  67. "algorithms/dreamerv3/**",
  68. # FIXME: These modules contain broken examples that weren't previously
  69. # tested.
  70. "algorithms/algorithm_config.py",
  71. "algorithms/alpha_star/alpha_star.py",
  72. "algorithms/r2d2/r2d2.py",
  73. "algorithms/sac/rnnsac.py",
  74. "algorithms/simple_q/simple_q.py",
  75. "core/models/base.py",
  76. "core/models/specs/specs_base.py",
  77. "core/models/specs/specs_dict.py",
  78. "env/wrappers/pettingzoo_env.py",
  79. "evaluation/collectors/sample_collector.py",
  80. "evaluation/episode.py",
  81. "evaluation/metrics.py",
  82. "evaluation/observation_function.py",
  83. "evaluation/postprocessing.py",
  84. "execution/buffers/mixin_replay_buffer.py",
  85. "models/base_model.py",
  86. "models/catalog.py",
  87. "models/preprocessors.py",
  88. "models/repeated_values.py",
  89. "models/tf/tf_distributions.py",
  90. "models/torch/model.py",
  91. "models/torch/torch_distributions.py",
  92. "policy/rnn_sequencing.py",
  93. "utils/actor_manager.py",
  94. "utils/filter.py",
  95. "utils/from_config.py",
  96. "utils/metrics/window_stat.py",
  97. "utils/nested_dict.py",
  98. "utils/pre_checks/env.py",
  99. "utils/replay_buffers/multi_agent_mixin_replay_buffer.py",
  100. "utils/spaces/space_utils.py"
  101. ]
  102. ),
  103. tags = ["team:rllib"]
  104. )
  105. # --------------------------------------------------------------------
  106. # Benchmarks
  107. #
  108. # Tag: benchmark
  109. #
  110. # This is smoke-testing the benchmark scripts.
  111. # --------------------------------------------------------------------
  112. py_test(
  113. name = "torch_compile_inference_bm",
  114. main = "benchmarks/torch_compile/run_inference_bm.py",
  115. tags = ["team:rllib", "exclusive", "benchmark", "torch_2.x_only_benchmark"],
  116. size = "small",
  117. srcs = ["benchmarks/torch_compile/run_inference_bm.py"],
  118. args = ["--smoke-test"]
  119. )
  120. py_test(
  121. name = "torch_compile_ppo_with_inference",
  122. main = "benchmarks/torch_compile/run_ppo_with_inference_bm.py",
  123. tags = ["team:rllib", "exclusive", "benchmark", "torch_2.x_only_benchmark"],
  124. size = "medium",
  125. srcs = ["benchmarks/torch_compile/run_ppo_with_inference_bm.py"],
  126. args = ["--smoke-test"]
  127. )
  128. # --------------------------------------------------------------------
  129. # Algorithms learning regression tests.
  130. #
  131. # Tag: learning_tests
  132. #
  133. # This will test all yaml files (via `rllib train`)
  134. # inside rllib/tuned_examples/[algo-name] for actual learning success.
  135. # --------------------------------------------------------------------
  136. # A2C
  137. # py_test(
  138. # name = "learning_tests_cartpole_a2c",
  139. # main = "tests/run_regression_tests.py",
  140. # tags = ["team:rllib", "", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete"],
  141. # size = "large",
  142. # srcs = ["tests/run_regression_tests.py"],
  143. # data = ["tuned_examples/a2c/cartpole-a2c.yaml"],
  144. # args = ["--dir=tuned_examples/a2c"]
  145. # )
  146. py_test(
  147. name = "learning_tests_cartpole_a2c_microbatch",
  148. main = "tests/run_regression_tests.py",
  149. tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete"],
  150. size = "large",
  151. srcs = ["tests/run_regression_tests.py"],
  152. data = ["tuned_examples/a2c/cartpole-a2c-microbatch.yaml"],
  153. args = ["--dir=tuned_examples/a2c"]
  154. )
  155. py_test(
  156. name = "learning_tests_cartpole_a2c_fake_gpus",
  157. main = "tests/run_regression_tests.py",
  158. tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete", "fake_gpus"],
  159. size = "medium",
  160. srcs = ["tests/run_regression_tests.py"],
  161. data = ["tuned_examples/a2c/cartpole-a2c-fake-gpus.yaml"],
  162. args = ["--dir=tuned_examples/a2c"]
  163. )
  164. # A3C
  165. # py_test(
  166. # name = "learning_tests_cartpole_a3c",
  167. # main = "tests/run_regression_tests.py",
  168. # tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete"],
  169. # size = "large",
  170. # srcs = ["tests/run_regression_tests.py"],
  171. # data = ["tuned_examples/a3c/cartpole-a3c.yaml"],
  172. # args = ["--dir=tuned_examples/a3c"]
  173. # )
  174. # AlphaStar
  175. py_test(
  176. name = "learning_tests_cartpole_alpha_star",
  177. main = "tests/run_regression_tests.py",
  178. tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete"],
  179. size = "medium",
  180. srcs = ["tests/run_regression_tests.py"],
  181. data = ["tuned_examples/alpha_star/multi-agent-cartpole-alpha-star.yaml"],
  182. args = ["--dir=tuned_examples/alpha_star", "--num-cpus=10"]
  183. )
  184. # AlphaZero
  185. py_test(
  186. name = "learning_tests_cartpole_sparse_rewards_alpha_zero",
  187. tags = ["team:rllib", "exclusive", "torch_only", "learning_tests", "learning_tests_discrete"],
  188. main = "tests/run_regression_tests.py",
  189. size = "medium",
  190. srcs = ["tests/run_regression_tests.py"],
  191. data = ["tuned_examples/alpha_zero/cartpole-sparse-rewards-alpha-zero.yaml"],
  192. args = ["--dir=tuned_examples/alpha_zero", "--num-cpus=8"]
  193. )
  194. # APEX-DQN
  195. # py_test(
  196. # name = "learning_tests_cartpole_apex",
  197. # main = "tests/run_regression_tests.py",
  198. # tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete"],
  199. # size = "large",
  200. # srcs = ["tests/run_regression_tests.py"],
  201. # data = [
  202. # "tuned_examples/apex_dqn/cartpole-apex.yaml",
  203. # ],
  204. # args = ["--dir=tuned_examples/apex_dqn", "--num-cpus=6"]
  205. # )
  206. # Once APEX supports multi-GPU.
  207. # py_test(
  208. # name = "learning_cartpole_apex_fake_gpus",
  209. # main = "tests/run_regression_tests.py",
  210. # tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete", "fake_gpus"],
  211. # size = "large",
  212. # srcs = ["tests/run_regression_tests.py"],
  213. # data = ["tuned_examples/apex_dqn/cartpole-apex-fake-gpus.yaml"],
  214. # args = ["--dir=tuned_examples/apex_dqn"]
  215. # )
  216. # APPO
  217. py_test(
  218. name = "learning_tests_cartpole_appo_no_vtrace",
  219. main = "tests/run_regression_tests.py",
  220. tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete"],
  221. size = "medium", # bazel may complain about it being too long sometimes - medium is on purpose as some frameworks take longer
  222. srcs = ["tests/run_regression_tests.py"],
  223. data = ["tuned_examples/appo/cartpole-appo.yaml"],
  224. args = ["--dir=tuned_examples/appo"]
  225. )
  226. py_test(
  227. name = "learning_tests_cartpole_appo_w_rl_modules_and_learner",
  228. main = "tests/run_regression_tests.py",
  229. tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete", "no_tf_static_graph"],
  230. size = "medium", # bazel may complain about it being too long sometimes - medium is on purpose as some frameworks take longer
  231. srcs = ["tests/run_regression_tests.py"],
  232. data = ["tuned_examples/appo/cartpole-appo-w-rl-modules-and-learner.yaml"],
  233. args = ["--dir=tuned_examples/appo"]
  234. )
  235. # py_test(
  236. # name = "learning_tests_cartpole_appo_vtrace",
  237. # main = "tests/run_regression_tests.py",
  238. # tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete"],
  239. # size = "large",
  240. # srcs = ["tests/run_regression_tests.py"],
  241. # data = ["tuned_examples/appo/cartpole-appo-vtrace.yaml"],
  242. # args = ["--dir=tuned_examples/appo"]
  243. # )
  244. py_test(
  245. name = "learning_tests_cartpole_separate_losses_appo",
  246. main = "tests/run_regression_tests.py",
  247. tags = ["team:rllib", "tf_only", "exclusive", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete"],
  248. size = "medium",
  249. srcs = ["tests/run_regression_tests.py"],
  250. data = [
  251. "tuned_examples/appo/cartpole-appo-vtrace-separate-losses.yaml"
  252. ],
  253. args = ["--dir=tuned_examples/appo", "--framework=tf"]
  254. )
  255. py_test(
  256. name = "learning_tests_multi_agent_cartpole_appo",
  257. main = "tests/run_regression_tests.py",
  258. tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete"],
  259. size = "medium",
  260. srcs = ["tests/run_regression_tests.py"],
  261. data = ["tuned_examples/appo/multi-agent-cartpole-appo.yaml"],
  262. args = ["--dir=tuned_examples/appo"]
  263. )
  264. py_test(
  265. name = "learning_tests_multi_agent_cartpole_w_100_policies_appo",
  266. main = "tests/run_regression_tests.py",
  267. tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete"],
  268. size = "large",
  269. srcs = ["tests/run_regression_tests.py"],
  270. data = ["tuned_examples/appo/multi-agent-cartpole-w-100-policies-appo.py"],
  271. args = ["--dir=tuned_examples/appo"]
  272. )
  273. # py_test(
  274. # name = "learning_tests_frozenlake_appo",
  275. # main = "tests/run_regression_tests.py",
  276. # tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_discrete"],
  277. # size = "large",
  278. # srcs = ["tests/run_regression_tests.py"],
  279. # data = ["tuned_examples/appo/frozenlake-appo-vtrace.yaml"],
  280. # args = ["--dir=tuned_examples/appo"]
  281. # )
  282. py_test(
  283. name = "learning_tests_cartpole_appo_fake_gpus",
  284. main = "tests/run_regression_tests.py",
  285. tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete", "fake_gpus"],
  286. size = "medium",
  287. srcs = ["tests/run_regression_tests.py"],
  288. data = ["tuned_examples/appo/cartpole-appo-vtrace-fake-gpus.yaml"],
  289. args = ["--dir=tuned_examples/appo"]
  290. )
  291. py_test(
  292. name = "learning_tests_stateless_cartpole_appo_vtrace",
  293. main = "tests/run_regression_tests.py",
  294. tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete"],
  295. size = "large",
  296. srcs = ["tests/run_regression_tests.py"],
  297. data = ["tuned_examples/appo/stateless-cartpole-appo-vtrace.py"],
  298. args = ["--dir=tuned_examples/appo"]
  299. )
  300. # ARS
  301. py_test(
  302. name = "learning_tests_cartpole_ars",
  303. main = "tests/run_regression_tests.py",
  304. tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete"],
  305. size = "medium",
  306. srcs = ["tests/run_regression_tests.py"],
  307. data = ["tuned_examples/ars/cartpole-ars.yaml"],
  308. args = ["--dir=tuned_examples/ars"]
  309. )
  310. # CQL
  311. py_test(
  312. name = "learning_tests_pendulum_cql",
  313. main = "tests/run_regression_tests.py",
  314. tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_pendulum", "learning_tests_continuous", "learning_tests_with_ray_data"],
  315. size = "medium",
  316. srcs = ["tests/run_regression_tests.py"],
  317. # Include the zipped json data file as well.
  318. data = [
  319. "tuned_examples/cql/pendulum-cql.yaml",
  320. "tests/data/pendulum/enormous.zip",
  321. ],
  322. args = ["--dir=tuned_examples/cql"]
  323. )
  324. # CRR
  325. py_test(
  326. name = "learning_tests_pendulum_crr",
  327. main = "tests/run_regression_tests.py",
  328. tags = ["team:rllib", "torch_only", "learning_tests", "learning_tests_pendulum", "learning_tests_continuous", "learning_tests_with_ray_data"],
  329. size = "large",
  330. srcs = ["tests/run_regression_tests.py"],
  331. # Include an offline json data file as well.
  332. data = [
  333. "tuned_examples/crr/pendulum-v1-crr.yaml",
  334. "tests/data/pendulum/pendulum_replay_v1.1.0.zip",
  335. ],
  336. args = ["--dir=tuned_examples/crr"]
  337. )
  338. py_test(
  339. name = "learning_tests_cartpole_crr",
  340. main = "tests/run_regression_tests.py",
  341. tags = ["team:rllib", "torch_only", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete", "learning_tests_with_ray_data"],
  342. size = "medium",
  343. srcs = ["tests/run_regression_tests.py"],
  344. # Include an offline json data file as well.
  345. data = [
  346. "tuned_examples/crr/cartpole-v1-crr.yaml",
  347. "tests/data/cartpole/large.json",
  348. ],
  349. args = ["--dir=tuned_examples/crr", '--framework=torch']
  350. )
  351. py_test(
  352. name = "learning_tests_cartpole_crr_expectation",
  353. main = "tests/run_regression_tests.py",
  354. tags = ["team:rllib", "torch_only", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete", "learning_tests_with_ray_data"],
  355. size = "large",
  356. srcs = ["tests/run_regression_tests.py"],
  357. # Include an offline json data file as well.
  358. data = [
  359. "tuned_examples/crr/cartpole-v1-crr_expectation.yaml",
  360. "tests/data/cartpole/large.json",
  361. ],
  362. args = ["--dir=tuned_examples/crr", '--framework=torch']
  363. )
  364. # DDPG
  365. # py_test(
  366. # name = "learning_tests_pendulum_ddpg",
  367. # main = "tests/run_regression_tests.py",
  368. # tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_pendulum", "learning_tests_continuous"],
  369. # size = "large",
  370. # srcs = ["tests/run_regression_tests.py"],
  371. # data = glob(["tuned_examples/ddpg/pendulum-ddpg.yaml"]),
  372. # args = ["--dir=tuned_examples/ddpg"]
  373. # )
  374. py_test(
  375. name = "learning_tests_pendulum_ddpg_fake_gpus",
  376. main = "tests/run_regression_tests.py",
  377. tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_pendulum", "learning_tests_continuous", "fake_gpus"],
  378. size = "large",
  379. srcs = ["tests/run_regression_tests.py"],
  380. data = ["tuned_examples/ddpg/pendulum-ddpg-fake-gpus.yaml"],
  381. args = ["--dir=tuned_examples/ddpg"]
  382. )
  383. # DDPPO
  384. py_test(
  385. name = "learning_tests_cartpole_ddppo",
  386. main = "tests/run_regression_tests.py",
  387. tags = ["team:rllib", "exclusive", "torch_only", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete"],
  388. size = "small",
  389. srcs = ["tests/run_regression_tests.py"],
  390. data = glob(["tuned_examples/ddppo/cartpole-ddppo.yaml"]),
  391. args = ["--dir=tuned_examples/ddppo"]
  392. )
  393. py_test(
  394. name = "learning_tests_pendulum_ddppo",
  395. main = "tests/run_regression_tests.py",
  396. tags = ["team:rllib", "exclusive", "torch_only", "learning_tests", "learning_tests_pendulum", "learning_tests_continuous"],
  397. size = "large",
  398. srcs = ["tests/run_regression_tests.py"],
  399. data = glob(["tuned_examples/ddppo/pendulum-ddppo.yaml"]),
  400. args = ["--dir=tuned_examples/ddppo"]
  401. )
  402. # DQN
  403. # py_test(
  404. # name = "learning_tests_cartpole_dqn",
  405. # main = "tests/run_regression_tests.py",
  406. # tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete"],
  407. # size = "large",
  408. # srcs = ["tests/run_regression_tests.py"],
  409. # data = ["tuned_examples/dqn/cartpole-dqn.yaml"],
  410. # args = ["--dir=tuned_examples/dqn"]
  411. # )
  412. py_test(
  413. name = "learning_tests_cartpole_dqn_softq",
  414. main = "tests/run_regression_tests.py",
  415. tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete"],
  416. size = "large", # bazel may complain about it being too long sometimes - large is on purpose as some frameworks take longer
  417. srcs = ["tests/run_regression_tests.py"],
  418. data = ["tuned_examples/dqn/cartpole-dqn-softq.yaml"],
  419. args = ["--dir=tuned_examples/dqn"]
  420. )
  421. # Does not work with tf-eager tracing due to Exploration's postprocessing
  422. # method injecting a tensor into a new graph. Revisit when tf-eager tracing
  423. # is better supported.
  424. py_test(
  425. name = "learning_tests_cartpole_dqn_param_noise",
  426. main = "tests/run_regression_tests.py",
  427. tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete", "no_tf_eager_tracing"],
  428. size = "medium",
  429. srcs = ["tests/run_regression_tests.py"],
  430. data = ["tuned_examples/dqn/cartpole-dqn-param-noise.yaml"],
  431. args = ["--dir=tuned_examples/dqn"]
  432. )
  433. py_test(
  434. name = "learning_tests_cartpole_dqn_fake_gpus",
  435. main = "tests/run_regression_tests.py",
  436. tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete", "fake_gpus"],
  437. size = "large",
  438. srcs = ["tests/run_regression_tests.py"],
  439. data = ["tuned_examples/dqn/cartpole-dqn-fake-gpus.yaml"],
  440. args = ["--dir=tuned_examples/dqn"]
  441. )
  442. # DT
  443. py_test(
  444. name = "learning_tests_pendulum_dt",
  445. main = "tests/run_regression_tests.py",
  446. tags = ["team:rllib", "torch_only", "learning_tests", "learning_tests_pendulum", "learning_tests_continuous", "learning_tests_with_ray_data"],
  447. size = "large",
  448. srcs = ["tests/run_regression_tests.py"],
  449. # Include an offline json data file as well.
  450. data = [
  451. "tuned_examples/dt/pendulum-v1-dt.yaml",
  452. "tests/data/pendulum/pendulum_expert_sac_50eps.zip",
  453. ],
  454. args = ["--dir=tuned_examples/dt"]
  455. )
  456. py_test(
  457. name = "learning_tests_cartpole_dt",
  458. main = "tests/run_regression_tests.py",
  459. tags = ["team:rllib", "torch_only", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete", "learning_tests_with_ray_data"],
  460. size = "medium",
  461. srcs = ["tests/run_regression_tests.py"],
  462. # Include an offline json data file as well.
  463. data = [
  464. "tuned_examples/dt/cartpole-v1-dt.yaml",
  465. "tests/data/cartpole/large.json",
  466. ],
  467. args = ["--dir=tuned_examples/dt"]
  468. )
  469. # Simple-Q
  470. py_test(
  471. name = "learning_tests_cartpole_simpleq",
  472. main = "tests/run_regression_tests.py",
  473. tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete"],
  474. size = "medium",
  475. srcs = ["tests/run_regression_tests.py"],
  476. data = [
  477. "tuned_examples/simple_q/cartpole-simpleq.yaml",
  478. ],
  479. args = ["--dir=tuned_examples/simple_q"]
  480. )
  481. py_test(
  482. name = "learning_tests_cartpole_simpleq_fake_gpus",
  483. main = "tests/run_regression_tests.py",
  484. tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete", "fake_gpus"],
  485. size = "medium",
  486. srcs = ["tests/run_regression_tests.py"],
  487. data = ["tuned_examples/simple_q/cartpole-simpleq-fake-gpus.yaml"],
  488. args = ["--dir=tuned_examples/simple_q"]
  489. )
  490. # ES
  491. # py_test(
  492. # name = "learning_tests_cartpole_es",
  493. # main = "tests/run_regression_tests.py",
  494. # tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete"],
  495. # size = "large",
  496. # srcs = ["tests/run_regression_tests.py"],
  497. # data = ["tuned_examples/es/cartpole-es.yaml"],
  498. # args = ["--dir=tuned_examples/es"]
  499. # )
  500. # IMPALA
  501. # py_test(
  502. # name = "learning_tests_cartpole_impala",
  503. # main = "tests/run_regression_tests.py",
  504. # tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete"],
  505. # size = "large",
  506. # srcs = ["tests/run_regression_tests.py"],
  507. # data = ["tuned_examples/impala/cartpole-impala.yaml"],
  508. # args = ["--dir=tuned_examples/impala"]
  509. # )
  510. py_test(
  511. name = "learning_tests_multi_agent_cartpole_impala",
  512. main = "tests/run_regression_tests.py",
  513. tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete"],
  514. size = "medium",
  515. srcs = ["tests/run_regression_tests.py"],
  516. data = ["tuned_examples/impala/multi-agent-cartpole-impala.yaml"],
  517. args = ["--dir=tuned_examples/impala"]
  518. )
  519. py_test(
  520. name = "learning_tests_cartpole_impala_fake_gpus",
  521. main = "tests/run_regression_tests.py",
  522. tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete", "fake_gpus"],
  523. size = "large",
  524. srcs = ["tests/run_regression_tests.py"],
  525. data = ["tuned_examples/impala/cartpole-impala-fake-gpus.yaml"],
  526. args = ["--dir=tuned_examples/impala"]
  527. )
  528. # MADDPG
  529. py_test(
  530. name = "learning_tests_two_step_game_maddpg",
  531. main = "tests/run_regression_tests.py",
  532. tags = ["team:rllib", "exclusive", "tf_only", "no_tf_eager_tracing", "learning_tests", "learning_tests_discrete"],
  533. size = "large", # bazel may complain about it being too long sometimes - large is on purpose as some frameworks take longer
  534. srcs = ["tests/run_regression_tests.py"],
  535. data = ["tuned_examples/maddpg/two-step-game-maddpg.yaml"],
  536. args = ["--dir=tuned_examples/maddpg", "--framework=tf"]
  537. )
  538. # Working, but takes a long time to learn (>15min).
  539. # Removed due to Higher API conflicts with Pytorch-Import tests
  540. ## MB-MPO
  541. #py_test(
  542. # name = "learning_tests_pendulum_mbmpo",
  543. # main = "tests/run_regression_tests.py",
  544. # tags = ["team:rllib", "exclusive", "torch_only", "learning_tests", "learning_tests_pendulum", "learning_tests_continuous"],
  545. # size = "large",
  546. # srcs = ["tests/run_regression_tests.py"],
  547. # data = ["tuned_examples/mbmpo/pendulum-mbmpo.yaml"],
  548. # args = ["--dir=tuned_examples/mbmpo"]
  549. #)
  550. # PG
  551. py_test(
  552. name = "learning_tests_cartpole_pg",
  553. main = "tests/run_regression_tests.py",
  554. tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete"],
  555. size = "medium", # bazel may complain about it being too long sometimes - medium is on purpose as some frameworks take longer
  556. srcs = ["tests/run_regression_tests.py"],
  557. data = ["tuned_examples/pg/cartpole-pg.yaml"],
  558. args = ["--dir=tuned_examples/pg"]
  559. )
  560. py_test(
  561. name = "learning_tests_cartpole_crashing_pg",
  562. main = "tests/run_regression_tests.py",
  563. tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete", "crashing_cartpole"],
  564. size = "large", # bazel may complain about it being too long sometimes - large is on purpose as some frameworks take longer
  565. srcs = ["tests/run_regression_tests.py"],
  566. data = ["tuned_examples/pg/cartpole-crashing-pg.yaml"],
  567. args = ["--dir=tuned_examples/pg"]
  568. )
  569. py_test(
  570. name = "learning_tests_cartpole_crashing_with_remote_envs_pg",
  571. main = "tests/run_regression_tests.py",
  572. tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete", "crashing_cartpole"],
  573. size = "large", # bazel may complain about it being too long sometimes - large is on purpose as some frameworks take longer
  574. srcs = ["tests/run_regression_tests.py"],
  575. data = ["tuned_examples/pg/cartpole-crashing-with-remote-envs-pg.yaml"],
  576. args = ["--dir=tuned_examples/pg"]
  577. )
  578. py_test(
  579. name = "learning_tests_multi_agent_cartpole_crashing_restart_sub_envs_pg",
  580. main = "tests/run_regression_tests.py",
  581. tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete", "crashing_cartpole"],
  582. size = "large", # bazel may complain about it being too long sometimes - large is on purpose as some frameworks take longer
  583. srcs = ["tests/run_regression_tests.py"],
  584. data = ["tuned_examples/pg/multi-agent-cartpole-crashing-restart-sub-envs-pg.yaml"],
  585. args = ["--dir=tuned_examples/pg"]
  586. )
  587. py_test(
  588. name = "learning_tests_multi_agent_cartpole_crashing_with_remote_envs_pg",
  589. main = "tests/run_regression_tests.py",
  590. tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete", "crashing_cartpole"],
  591. size = "large", # bazel may complain about it being too long sometimes - large is on purpose as some frameworks take longer
  592. srcs = ["tests/run_regression_tests.py"],
  593. data = ["tuned_examples/pg/multi-agent-cartpole-crashing-with-remote-envs-pg.yaml"],
  594. args = ["--dir=tuned_examples/pg", "--num-cpus=14"]
  595. )
  596. py_test(
  597. name = "learning_tests_cartpole_pg_fake_gpus",
  598. main = "tests/run_regression_tests.py",
  599. tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete", "fake_gpus"],
  600. size = "medium",
  601. srcs = ["tests/run_regression_tests.py"],
  602. data = ["tuned_examples/pg/cartpole-pg-fake-gpus.yaml"],
  603. args = ["--dir=tuned_examples/pg"]
  604. )
  605. # PPO
  606. py_test(
  607. name = "learning_tests_cartpole_truncated_ppo",
  608. main = "tests/run_regression_tests.py",
  609. tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete"],
  610. size = "large",
  611. srcs = ["tests/run_regression_tests.py"],
  612. data = ["tuned_examples/ppo/cartpole-truncated-ppo.py"],
  613. args = ["--dir=tuned_examples/ppo"]
  614. )
  615. py_test(
  616. name = "learning_tests_pendulum_ppo",
  617. main = "tests/run_regression_tests.py",
  618. tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_pendulum", "learning_tests_continuous"],
  619. size = "large", # bazel may complain about it being too long sometimes - large is on purpose as some frameworks take longer
  620. srcs = ["tests/run_regression_tests.py"],
  621. data = ["tuned_examples/ppo/pendulum-ppo.yaml"],
  622. args = ["--dir=tuned_examples/ppo"]
  623. )
  624. py_test(
  625. name = "learning_tests_pendulum_ppo_with_rl_module",
  626. main = "tests/run_regression_tests.py",
  627. tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_pendulum", "learning_tests_continuous", "no_tf_static_graph"],
  628. size = "large", # bazel may complain about it being too long sometimes - large is on purpose as some frameworks take longer
  629. srcs = ["tests/run_regression_tests.py"],
  630. data = ["tuned_examples/ppo/pendulum-ppo-with-rl-module.yaml"],
  631. args = ["--dir=tuned_examples/ppo"]
  632. )
  633. py_test(
  634. name = "learning_tests_multi_agent_pendulum_ppo",
  635. main = "tests/run_regression_tests.py",
  636. tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_pendulum", "learning_tests_continuous"],
  637. size = "large", # bazel may complain about it being too long sometimes - large is on purpose as some frameworks take longer
  638. srcs = ["tests/run_regression_tests.py"],
  639. data = ["tuned_examples/ppo/multi_agent_pendulum_ppo.py"],
  640. args = ["--dir=tuned_examples/ppo"]
  641. )
  642. py_test(
  643. name = "learning_tests_transformed_actions_pendulum_ppo",
  644. main = "tests/run_regression_tests.py",
  645. tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_pendulum", "learning_tests_continuous"],
  646. size = "large", # bazel may complain about it being too long sometimes - large is on purpose as some frameworks take longer
  647. srcs = ["tests/run_regression_tests.py"],
  648. data = ["tuned_examples/ppo/pendulum-transformed-actions-ppo.yaml"],
  649. args = ["--dir=tuned_examples/ppo"]
  650. )
  651. py_test(
  652. name = "learning_tests_repeat_after_me_ppo",
  653. main = "tests/run_regression_tests.py",
  654. tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_discrete"],
  655. size = "medium",
  656. srcs = ["tests/run_regression_tests.py"],
  657. data = ["tuned_examples/ppo/repeatafterme-ppo-lstm.yaml"],
  658. args = ["--dir=tuned_examples/ppo"]
  659. )
  660. py_test(
  661. name = "learning_tests_repeat_after_me_ppo_with_rl_module",
  662. main = "tests/run_regression_tests.py",
  663. tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_discrete", "torch_only"],
  664. size = "medium",
  665. srcs = ["tests/run_regression_tests.py"],
  666. data = ["tuned_examples/ppo/repeatafterme-ppo-lstm-with-rl-module.yaml"],
  667. args = ["--dir=tuned_examples/ppo"]
  668. )
  669. py_test(
  670. name = "learning_tests_cartpole_ppo_fake_gpus",
  671. main = "tests/run_regression_tests.py",
  672. tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete", "fake_gpus"],
  673. size = "large",
  674. srcs = ["tests/run_regression_tests.py"],
  675. data = ["tuned_examples/ppo/cartpole-ppo-fake-gpus.yaml"],
  676. args = ["--dir=tuned_examples/ppo"]
  677. )
  678. # QMIX
  679. py_test(
  680. name = "learning_tests_two_step_game_qmix",
  681. main = "tests/run_regression_tests.py",
  682. tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_discrete"],
  683. size = "large",
  684. srcs = ["tests/run_regression_tests.py"],
  685. data = ["tuned_examples/qmix/two-step-game-qmix.yaml"],
  686. args = ["--dir=tuned_examples/qmix", "--framework=torch"]
  687. )
  688. py_test(
  689. name = "learning_tests_two_step_game_qmix_vdn_mixer",
  690. main = "tests/run_regression_tests.py",
  691. tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_discrete"],
  692. size = "large",
  693. srcs = ["tests/run_regression_tests.py"],
  694. data = ["tuned_examples/qmix/two-step-game-qmix-vdn-mixer.yaml"],
  695. args = ["--dir=tuned_examples/qmix", "--framework=torch"]
  696. )
  697. py_test(
  698. name = "learning_tests_two_step_game_qmix_no_mixer",
  699. main = "tests/run_regression_tests.py",
  700. tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_discrete"],
  701. size = "medium", # bazel may complain about it being too long sometimes - medium is on purpose as some frameworks take longer
  702. srcs = ["tests/run_regression_tests.py"],
  703. data = ["tuned_examples/qmix/two-step-game-qmix-no-mixer.yaml"],
  704. args = ["--dir=tuned_examples/qmix", "--framework=torch"]
  705. )
  706. # R2D2
  707. py_test(
  708. name = "learning_tests_stateless_cartpole_r2d2",
  709. main = "tests/run_regression_tests.py",
  710. tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete", "stateless_cartpole"],
  711. size = "large",
  712. srcs = ["tests/run_regression_tests.py"],
  713. data = ["tuned_examples/r2d2/stateless-cartpole-r2d2.yaml"],
  714. args = ["--dir=tuned_examples/r2d2"]
  715. )
  716. py_test(
  717. name = "learning_tests_stateless_cartpole_r2d2_fake_gpus",
  718. main = "tests/run_regression_tests.py",
  719. tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_cartpole", "stateless_cartpole", "fake_gpus"],
  720. size = "large",
  721. srcs = ["tests/run_regression_tests.py"],
  722. data = ["tuned_examples/r2d2/stateless-cartpole-r2d2-fake-gpus.yaml"],
  723. args = ["--dir=tuned_examples/r2d2"]
  724. )
  725. # SAC
  726. py_test(
  727. name = "learning_tests_cartpole_sac",
  728. main = "tests/run_regression_tests.py",
  729. tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete"],
  730. size = "large",
  731. srcs = ["tests/run_regression_tests.py"],
  732. data = ["tuned_examples/sac/cartpole-sac.yaml"],
  733. args = ["--dir=tuned_examples/sac"]
  734. )
  735. # py_test(
  736. # name = "learning_tests_cartpole_continuous_pybullet_sac",
  737. # main = "tests/run_regression_tests.py",
  738. # tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_cartpole", "learning_tests_continuous"],
  739. # size = "large",
  740. # srcs = ["tests/run_regression_tests.py"],
  741. # data = ["tuned_examples/sac/cartpole-continuous-pybullet-sac.yaml"],
  742. # args = ["--dir=tuned_examples/sac"]
  743. # )
  744. # py_test(
  745. # name = "learning_tests_pendulum_sac",
  746. # main = "tests/run_regression_tests.py",
  747. # tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_pendulum", "learning_tests_continuous"],
  748. # size = "large",
  749. # srcs = ["tests/run_regression_tests.py"],
  750. # data = ["tuned_examples/sac/pendulum-sac.yaml"],
  751. # args = ["--dir=tuned_examples/sac"]
  752. # )
  753. # py_test(
  754. # name = "learning_tests_transformed_actions_pendulum_sac",
  755. # main = "tests/run_regression_tests.py",
  756. # tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_pendulum", "learning_tests_continuous"],
  757. # size = "large",
  758. # srcs = ["tests/run_regression_tests.py"],
  759. # data = ["tuned_examples/sac/pendulum-transformed-actions-sac.yaml"],
  760. # args = ["--dir=tuned_examples/sac"]
  761. # )
  762. # py_test(
  763. # name = "learning_tests_pendulum_sac_fake_gpus",
  764. # main = "tests/run_regression_tests.py",
  765. # tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_pendulum", "learning_tests_continuous", "fake_gpus"],
  766. # size = "large",
  767. # srcs = ["tests/run_regression_tests.py"],
  768. # data = ["tuned_examples/sac/pendulum-sac-fake-gpus.yaml"],
  769. # args = ["--dir=tuned_examples/sac"]
  770. # )
  771. # SlateQ
  772. # py_test(
  773. # name = "learning_tests_interest_evolution_10_candidates_recsim_env_slateq",
  774. # main = "tests/run_regression_tests.py",
  775. # tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_discrete"],
  776. # size = "large",
  777. # srcs = ["tests/run_regression_tests.py"],
  778. # data = ["tuned_examples/slateq/interest-evolution-10-candidates-recsim-env-slateq.yaml"],
  779. # args = ["--dir=tuned_examples/slateq"]
  780. # )
  781. py_test(
  782. name = "learning_tests_interest_evolution_10_candidates_recsim_env_slateq_fake_gpus",
  783. main = "tests/run_regression_tests.py",
  784. tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_discrete", "fake_gpus"],
  785. size = "large",
  786. srcs = ["tests/run_regression_tests.py"],
  787. data = ["tuned_examples/slateq/interest-evolution-10-candidates-recsim-env-slateq.yaml"],
  788. args = ["--dir=tuned_examples/slateq"]
  789. )
  790. # TD3
  791. # py_test(
  792. # name = "learning_tests_pendulum_td3",
  793. # main = "tests/run_regression_tests.py",
  794. # tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_pendulum", "learning_tests_continuous"],
  795. # size = "large",
  796. # srcs = ["tests/run_regression_tests.py"],
  797. # data = ["tuned_examples/ddpg/pendulum-td3.yaml"],
  798. # args = ["--dir=tuned_examples/ddpg"]
  799. # )
  800. # --------------------------------------------------------------------
  801. # Algorithms (Compilation, Losses, simple functionality tests)
  802. # rllib/algorithms/
  803. #
  804. # Tag: algorithms_dir
  805. # --------------------------------------------------------------------
  806. # Generic (all Algorithms)
  807. py_test(
  808. name = "test_algorithm",
  809. tags = ["team:rllib", "algorithms_dir", "algorithms_dir_generic"],
  810. size = "large",
  811. srcs = ["algorithms/tests/test_algorithm.py"],
  812. data = ["tests/data/cartpole/small.json"],
  813. )
  814. py_test(
  815. name = "test_algorithm_config",
  816. tags = ["team:rllib", "algorithms_dir", "algorithms_dir_generic"],
  817. size = "medium",
  818. srcs = ["algorithms/tests/test_algorithm_config.py"],
  819. )
  820. py_test(
  821. name = "test_algorithm_export_checkpoint",
  822. tags = ["team:rllib", "algorithms_dir", "algorithms_dir_generic"],
  823. size = "medium",
  824. srcs = ["algorithms/tests/test_algorithm_export_checkpoint.py"],
  825. )
  826. py_test(
  827. name = "test_callbacks",
  828. tags = ["team:rllib", "algorithms_dir", "algorithms_dir_generic"],
  829. size = "large",
  830. srcs = ["algorithms/tests/test_callbacks.py"]
  831. )
  832. py_test(
  833. name = "test_memory_leaks_generic",
  834. main = "algorithms/tests/test_memory_leaks.py",
  835. tags = ["team:rllib", "algorithms_dir"],
  836. size = "medium",
  837. srcs = ["algorithms/tests/test_memory_leaks.py"]
  838. )
  839. py_test(
  840. name = "test_node_failure",
  841. tags = ["team:rllib", "tests_dir", "exclusive"],
  842. size = "medium",
  843. srcs = ["tests/test_node_failure.py"],
  844. )
  845. py_test(
  846. name = "test_registry",
  847. tags = ["team:rllib", "algorithms_dir", "algorithms_dir_generic"],
  848. size = "small",
  849. srcs = ["algorithms/tests/test_registry.py"],
  850. )
  851. py_test(
  852. name = "test_worker_failures",
  853. tags = ["team:rllib", "algorithms_dir", "algorithms_dir_generic", "exclusive"],
  854. size = "large",
  855. srcs = ["algorithms/tests/test_worker_failures.py"]
  856. )
  857. # Specific Algorithms
  858. # A2C
  859. py_test(
  860. name = "test_a2c",
  861. tags = ["team:rllib", "algorithms_dir"],
  862. size = "large",
  863. srcs = ["algorithms/a2c/tests/test_a2c.py"]
  864. )
  865. # A3C
  866. py_test(
  867. name = "test_a3c",
  868. tags = ["team:rllib", "algorithms_dir"],
  869. size = "large",
  870. srcs = ["algorithms/a3c/tests/test_a3c.py"]
  871. )
  872. # AlphaStar
  873. py_test(
  874. name = "test_alpha_star",
  875. tags = ["team:rllib", "algorithms_dir"],
  876. size = "large",
  877. srcs = ["algorithms/alpha_star/tests/test_alpha_star.py"]
  878. )
  879. # AlphaZero
  880. py_test(
  881. name = "test_alpha_zero",
  882. tags = ["team:rllib", "algorithms_dir"],
  883. size = "medium",
  884. srcs = ["algorithms/alpha_zero/tests/test_alpha_zero.py"]
  885. )
  886. # LeelaChessZero
  887. py_test(
  888. name = "test_leela_chess_zero",
  889. tags = ["team:rllib","torch_only", "algorithms_dir"],
  890. size = "medium",
  891. srcs = ["algorithms/leela_chess_zero/tests/test_leela_chess_zero.py"]
  892. )
  893. # APEX-DQN
  894. py_test(
  895. name = "test_apex_dqn",
  896. tags = ["team:rllib", "algorithms_dir"],
  897. size = "large",
  898. srcs = ["algorithms/apex_dqn/tests/test_apex_dqn.py"]
  899. )
  900. # APEX-DDPG
  901. py_test(
  902. name = "test_apex_ddpg",
  903. tags = ["team:rllib", "algorithms_dir"],
  904. size = "medium",
  905. srcs = ["algorithms/apex_ddpg/tests/test_apex_ddpg.py"]
  906. )
  907. # APPO
  908. py_test(
  909. name = "test_appo",
  910. tags = ["team:rllib", "algorithms_dir"],
  911. size = "large",
  912. srcs = ["algorithms/appo/tests/test_appo.py"]
  913. )
  914. py_test(
  915. name = "test_appo_off_policyness",
  916. tags = ["team:rllib", "algorithms_dir", "multi_gpu", "exclusive"],
  917. size = "large",
  918. srcs = ["algorithms/appo/tests/test_appo_off_policyness.py"]
  919. )
  920. py_test(
  921. name = "test_appo_learner",
  922. tags = ["team:rllib", "algorithms_dir"],
  923. size = "medium",
  924. srcs = ["algorithms/appo/tests/test_appo_learner.py"]
  925. )
  926. # ARS
  927. py_test(
  928. name = "test_ars",
  929. tags = ["team:rllib", "algorithms_dir"],
  930. size = "medium",
  931. srcs = ["algorithms/ars/tests/test_ars.py"]
  932. )
  933. # Bandits
  934. py_test(
  935. name = "test_bandits",
  936. tags = ["team:rllib", "algorithms_dir"],
  937. size = "large",
  938. srcs = ["algorithms/bandit/tests/test_bandits.py"],
  939. )
  940. # BC
  941. py_test(
  942. name = "test_bc",
  943. tags = ["team:rllib", "algorithms_dir"],
  944. size = "medium",
  945. # Include the json data file.
  946. data = ["tests/data/cartpole/large.json"],
  947. srcs = ["algorithms/bc/tests/test_bc.py"]
  948. )
  949. # CQL
  950. py_test(
  951. name = "test_cql",
  952. tags = ["team:rllib", "algorithms_dir"],
  953. size = "large",
  954. data = ["tests/data/pendulum/small.json"],
  955. srcs = ["algorithms/cql/tests/test_cql.py"]
  956. )
  957. # CRR
  958. py_test(
  959. name = "test_crr",
  960. tags = ["team:rllib", "algorithms_dir"],
  961. size = "medium",
  962. srcs = ["algorithms/crr/tests/test_crr.py"],
  963. data = ["tests/data/pendulum/large.json"],
  964. )
  965. # DDPG
  966. py_test(
  967. name = "test_ddpg",
  968. tags = ["team:rllib", "algorithms_dir"],
  969. size = "large",
  970. srcs = ["algorithms/ddpg/tests/test_ddpg.py"]
  971. )
  972. # DDPPO
  973. py_test(
  974. name = "test_ddppo",
  975. tags = ["team:rllib", "algorithms_dir"],
  976. size = "medium",
  977. srcs = ["algorithms/ddppo/tests/test_ddppo.py"]
  978. )
  979. # DQN
  980. py_test(
  981. name = "test_dqn",
  982. tags = ["team:rllib", "algorithms_dir"],
  983. size = "large",
  984. srcs = ["algorithms/dqn/tests/test_dqn.py"]
  985. )
  986. # DQN Reproducibility
  987. py_test(
  988. name = "test_repro_dqn",
  989. tags = ["team:rllib", "algorithms_dir", "gpu"],
  990. size = "large",
  991. srcs = ["algorithms/dqn/tests/test_repro_dqn.py"]
  992. )
  993. # Dreamer (V1)
  994. py_test(
  995. name = "test_dreamer",
  996. tags = ["team:rllib", "algorithms_dir"],
  997. size = "medium",
  998. srcs = ["algorithms/dreamer/tests/test_dreamer.py"]
  999. )
  1000. # DreamerV3
  1001. py_test(
  1002. name = "test_dreamerv3",
  1003. tags = ["team:rllib", "algorithms_dir"],
  1004. size = "large",
  1005. srcs = ["algorithms/dreamerv3/tests/test_dreamerv3.py"]
  1006. )
  1007. # DT
  1008. py_test(
  1009. name = "test_segmentation_buffer",
  1010. tags = ["team:rllib", "algorithms_dir"],
  1011. size = "small",
  1012. srcs = ["algorithms/dt/tests/test_segmentation_buffer.py"]
  1013. )
  1014. py_test(
  1015. name = "test_dt_model",
  1016. tags = ["team:rllib", "algorithms_dir"],
  1017. size = "small",
  1018. srcs = ["algorithms/dt/tests/test_dt_model.py"]
  1019. )
  1020. py_test(
  1021. name = "test_dt_policy",
  1022. tags = ["team:rllib", "algorithms_dir"],
  1023. size = "small",
  1024. srcs = ["algorithms/dt/tests/test_dt_policy.py"]
  1025. )
  1026. py_test(
  1027. name = "test_dt",
  1028. tags = ["team:rllib", "algorithms_dir", "ray_data"],
  1029. size = "medium",
  1030. srcs = ["algorithms/dt/tests/test_dt.py"],
  1031. data = ["tests/data/pendulum/large.json"],
  1032. )
  1033. # ES
  1034. py_test(
  1035. name = "test_es",
  1036. tags = ["team:rllib", "algorithms_dir"],
  1037. size = "medium",
  1038. srcs = ["algorithms/es/tests/test_es.py"]
  1039. )
  1040. # Impala
  1041. py_test(
  1042. name = "test_impala",
  1043. tags = ["team:rllib", "algorithms_dir"],
  1044. size = "large",
  1045. srcs = ["algorithms/impala/tests/test_impala.py"]
  1046. )
  1047. py_test(
  1048. name = "test_vtrace",
  1049. tags = ["team:rllib", "algorithms_dir"],
  1050. size = "small",
  1051. srcs = ["algorithms/impala/tests/test_vtrace.py"]
  1052. )
  1053. py_test(
  1054. name = "test_vtrace_v2",
  1055. tags = ["team:rllib", "algorithms_dir"],
  1056. size = "small",
  1057. srcs = ["algorithms/impala/tests/test_vtrace_v2.py"]
  1058. )
  1059. py_test(
  1060. name = "test_impala_off_policyness",
  1061. tags = ["team:rllib", "algorithms_dir", "exclusive"],
  1062. size = "large",
  1063. srcs = ["algorithms/impala/tests/test_impala_off_policyness.py"]
  1064. )
  1065. py_test(
  1066. name = "test_impala_learner",
  1067. tags = ["team:rllib", "algorithms_dir"],
  1068. size = "medium",
  1069. srcs = ["algorithms/impala/tests/test_impala_learner.py"]
  1070. )
  1071. # MARWIL
  1072. py_test(
  1073. name = "test_marwil",
  1074. tags = ["team:rllib", "algorithms_dir"],
  1075. size = "large",
  1076. # Include the json data file.
  1077. data = [
  1078. "tests/data/cartpole/large.json",
  1079. "tests/data/pendulum/large.json",
  1080. "tests/data/cartpole/small.json",
  1081. ],
  1082. srcs = ["algorithms/marwil/tests/test_marwil.py"]
  1083. )
  1084. # MADDPG
  1085. py_test(
  1086. name = "test_maddpg",
  1087. tags = ["team:rllib", "algorithms_dir"],
  1088. size = "medium",
  1089. srcs = ["algorithms/maddpg/tests/test_maddpg.py"]
  1090. )
  1091. # MAML
  1092. py_test(
  1093. name = "test_maml",
  1094. tags = ["team:rllib", "algorithms_dir"],
  1095. size = "medium",
  1096. srcs = ["algorithms/maml/tests/test_maml.py"]
  1097. )
  1098. # MBMPO
  1099. py_test(
  1100. name = "test_mbmpo",
  1101. tags = ["team:rllib", "algorithms_dir"],
  1102. size = "medium",
  1103. srcs = ["algorithms/mbmpo/tests/test_mbmpo.py"]
  1104. )
  1105. # PG
  1106. py_test(
  1107. name = "test_pg",
  1108. tags = ["team:rllib", "algorithms_dir"],
  1109. size = "large",
  1110. srcs = ["algorithms/pg/tests/test_pg.py"]
  1111. )
  1112. # PPO
  1113. py_test(
  1114. name = "test_ppo",
  1115. tags = ["team:rllib", "algorithms_dir"],
  1116. size = "large",
  1117. srcs = ["algorithms/ppo/tests/test_ppo.py"]
  1118. )
  1119. py_test(
  1120. name = "test_ppo_with_rl_module",
  1121. tags = ["team:rllib", "algorithms_dir"],
  1122. size = "large",
  1123. srcs = ["algorithms/ppo/tests/test_ppo_with_rl_module.py"]
  1124. )
  1125. py_test(
  1126. name = "test_ppo_rl_module",
  1127. tags = ["team:rllib", "algorithms_dir"],
  1128. size = "large",
  1129. srcs = ["algorithms/ppo/tests/test_ppo_rl_module.py"]
  1130. )
  1131. py_test(
  1132. name = "test_ppo_learner",
  1133. tags = ["team:rllib", "algorithms_dir"],
  1134. size = "large",
  1135. srcs = ["algorithms/ppo/tests/test_ppo_learner.py"]
  1136. )
  1137. # PPO Reproducibility
  1138. py_test(
  1139. name = "test_repro_ppo",
  1140. tags = ["team:rllib", "algorithms_dir", "gpu"],
  1141. size = "large",
  1142. srcs = ["algorithms/ppo/tests/test_repro_ppo.py"]
  1143. )
  1144. # QMix
  1145. py_test(
  1146. name = "test_qmix",
  1147. tags = ["team:rllib", "algorithms_dir"],
  1148. size = "medium",
  1149. srcs = ["algorithms/qmix/tests/test_qmix.py"]
  1150. )
  1151. # R2D2
  1152. py_test(
  1153. name = "test_r2d2",
  1154. tags = ["team:rllib", "algorithms_dir"],
  1155. size = "medium",
  1156. srcs = ["algorithms/r2d2/tests/test_r2d2.py"]
  1157. )
  1158. # RandomAgent
  1159. py_test(
  1160. name = "test_random_agent",
  1161. main = "algorithms/random_agent/random_agent.py",
  1162. tags = ["team:rllib", "algorithms_dir"],
  1163. size = "small",
  1164. srcs = ["algorithms/random_agent/random_agent.py"]
  1165. )
  1166. # RNNSAC
  1167. py_test(
  1168. name = "test_rnnsac",
  1169. tags = ["team:rllib", "algorithms_dir"],
  1170. size = "small",
  1171. srcs = ["algorithms/sac/tests/test_rnnsac.py"]
  1172. )
  1173. # SAC
  1174. py_test(
  1175. name = "test_sac",
  1176. tags = ["team:rllib", "algorithms_dir"],
  1177. size = "large",
  1178. srcs = ["algorithms/sac/tests/test_sac.py"]
  1179. )
  1180. # SimpleQ
  1181. py_test(
  1182. name = "test_simple_q",
  1183. tags = ["team:rllib", "algorithms_dir"],
  1184. size = "medium",
  1185. srcs = ["algorithms/simple_q/tests/test_simple_q.py"]
  1186. )
  1187. # SimpleQ Reproducibility
  1188. py_test(
  1189. name = "test_repro_simple_q",
  1190. tags = ["team:rllib", "algorithms_dir", "gpu"],
  1191. size = "large",
  1192. srcs = ["algorithms/simple_q/tests/test_repro_simple_q.py"]
  1193. )
  1194. # SlateQ
  1195. py_test(
  1196. name = "test_slateq",
  1197. tags = ["team:rllib", "algorithms_dir"],
  1198. size = "medium",
  1199. srcs = ["algorithms/slateq/tests/test_slateq.py"]
  1200. )
  1201. # TD3
  1202. py_test(
  1203. name = "test_td3",
  1204. tags = ["team:rllib", "algorithms_dir"],
  1205. size = "medium",
  1206. srcs = ["algorithms/td3/tests/test_td3.py"]
  1207. )
  1208. # --------------------------------------------------------------------
  1209. # Memory leak tests
  1210. #
  1211. # Tag: memory_leak_tests
  1212. # --------------------------------------------------------------------
  1213. py_test(
  1214. name = "test_memory_leak_a3c",
  1215. tags = ["team:rllib", "memory_leak_tests"],
  1216. main = "utils/tests/run_memory_leak_tests.py",
  1217. size = "large",
  1218. srcs = ["utils/tests/run_memory_leak_tests.py"],
  1219. data = ["tuned_examples/a3c/memory-leak-test-a3c.yaml"],
  1220. args = ["--dir=tuned_examples/a3c"]
  1221. )
  1222. py_test(
  1223. name = "test_memory_leak_appo",
  1224. tags = ["team:rllib", "memory_leak_tests"],
  1225. main = "utils/tests/run_memory_leak_tests.py",
  1226. size = "large",
  1227. srcs = ["utils/tests/run_memory_leak_tests.py"],
  1228. data = ["tuned_examples/appo/memory-leak-test-appo.yaml"],
  1229. args = ["--dir=tuned_examples/appo"]
  1230. )
  1231. py_test(
  1232. name = "test_memory_leak_ddpg",
  1233. tags = ["team:rllib", "memory_leak_tests"],
  1234. main = "utils/tests/run_memory_leak_tests.py",
  1235. size = "large",
  1236. srcs = ["utils/tests/run_memory_leak_tests.py"],
  1237. data = ["tuned_examples/ddpg/memory-leak-test-ddpg.yaml"],
  1238. args = ["--dir=tuned_examples/ddpg"]
  1239. )
  1240. py_test(
  1241. name = "test_memory_leak_dqn",
  1242. tags = ["team:rllib", "memory_leak_tests"],
  1243. main = "utils/tests/run_memory_leak_tests.py",
  1244. size = "large",
  1245. srcs = ["utils/tests/run_memory_leak_tests.py"],
  1246. data = ["tuned_examples/dqn/memory-leak-test-dqn.yaml"],
  1247. args = ["--dir=tuned_examples/dqn"]
  1248. )
  1249. py_test(
  1250. name = "test_memory_leak_impala",
  1251. tags = ["team:rllib", "memory_leak_tests"],
  1252. main = "utils/tests/run_memory_leak_tests.py",
  1253. size = "large",
  1254. srcs = ["utils/tests/run_memory_leak_tests.py"],
  1255. data = ["tuned_examples/impala/memory-leak-test-impala.yaml"],
  1256. args = ["--dir=tuned_examples/impala"]
  1257. )
  1258. py_test(
  1259. name = "test_memory_leak_ppo",
  1260. tags = ["team:rllib", "memory_leak_tests"],
  1261. main = "utils/tests/run_memory_leak_tests.py",
  1262. size = "large",
  1263. srcs = ["utils/tests/run_memory_leak_tests.py"],
  1264. data = ["tuned_examples/ppo/memory-leak-test-ppo.yaml"],
  1265. args = ["--dir=tuned_examples/ppo"]
  1266. )
  1267. py_test(
  1268. name = "test_memory_leak_sac",
  1269. tags = ["team:rllib", "memory_leak_tests"],
  1270. main = "utils/tests/run_memory_leak_tests.py",
  1271. size = "large",
  1272. srcs = ["utils/tests/run_memory_leak_tests.py"],
  1273. data = ["tuned_examples/sac/memory-leak-test-sac.yaml"],
  1274. args = ["--dir=tuned_examples/sac"]
  1275. )
  1276. # --------------------------------------------------------------------
  1277. # Algorithms (quick training test iterations via `rllib train`)
  1278. #
  1279. # Tag: quick_train
  1280. #
  1281. # These are not(!) learning tests, we only test here compilation and
  1282. # support for certain envs, spaces, setups.
  1283. # Should all be very short tests with label: "quick_train".
  1284. # --------------------------------------------------------------------
  1285. # A2C/A3C
  1286. py_test(
  1287. name = "test_a3c_torch_pong_v5",
  1288. main = "train.py", srcs = ["train.py"],
  1289. tags = ["team:rllib", "quick_train"],
  1290. args = [
  1291. "--env", "ALE/Pong-v5",
  1292. "--run", "A3C",
  1293. "--stop", "'{\"training_iteration\": 1}'",
  1294. "--config", "'{\"framework\": \"torch\", \"num_workers\": 2, \"sample_async\": false, \"model\": {\"use_lstm\": false, \"grayscale\": true, \"zero_mean\": false, \"dim\": 84}, \"preprocessor_pref\": \"rllib\"}'",
  1295. "--ray-num-cpus", "4"
  1296. ]
  1297. )
  1298. py_test(
  1299. name = "test_a3c_tf_pong_ram_v5",
  1300. main = "train.py", srcs = ["train.py"],
  1301. tags = ["team:rllib", "quick_train"],
  1302. args = [
  1303. "--env", "ALE/Pong-ram-v5",
  1304. "--run", "A3C",
  1305. "--stop", "'{\"training_iteration\": 1}'",
  1306. "--config", "'{\"framework\": \"tf\", \"num_workers\": 2}'",
  1307. "--ray-num-cpus", "4"
  1308. ]
  1309. )
  1310. # DDPG/APEX-DDPG/TD3
  1311. py_test(
  1312. name = "test_ddpg_mountaincar_continuous_v0_num_workers_0",
  1313. main = "train.py", srcs = ["train.py"],
  1314. tags = ["team:rllib", "quick_train"],
  1315. args = [
  1316. "--env", "MountainCarContinuous-v0",
  1317. "--run", "DDPG",
  1318. "--stop", "'{\"training_iteration\": 1}'",
  1319. "--config", "'{\"framework\": \"tf\", \"num_workers\": 0}'"
  1320. ]
  1321. )
  1322. py_test(
  1323. name = "test_ddpg_mountaincar_continuous_v0_num_workers_1",
  1324. main = "train.py", srcs = ["train.py"],
  1325. tags = ["team:rllib", "quick_train"],
  1326. args = [
  1327. "--env", "MountainCarContinuous-v0",
  1328. "--run", "DDPG",
  1329. "--stop", "'{\"training_iteration\": 1}'",
  1330. "--config", "'{\"framework\": \"tf\", \"num_workers\": 1}'"
  1331. ]
  1332. )
  1333. py_test(
  1334. name = "test_apex_ddpg_pendulum_v1_complete_episode_batches",
  1335. main = "train.py", srcs = ["train.py"],
  1336. tags = ["team:rllib", "quick_train"],
  1337. args = [
  1338. "--env", "Pendulum-v1",
  1339. "--run", "APEX_DDPG",
  1340. "--stop", "'{\"training_iteration\": 1}'",
  1341. "--config", "'{\"framework\": \"tf\", \"num_workers\": 2, \"optimizer\": {\"num_replay_buffer_shards\": 1}, \"num_steps_sampled_before_learning_starts\": 100, \"min_time_s_per_iteration\": 1, \"batch_mode\": \"complete_episodes\"}'",
  1342. "--ray-num-cpus", "4",
  1343. ]
  1344. )
  1345. # DQN/APEX
  1346. py_test(
  1347. name = "test_dqn_frozenlake_v1",
  1348. main = "train.py", srcs = ["train.py"],
  1349. size = "medium",
  1350. tags = ["team:rllib", "quick_train"],
  1351. args = [
  1352. "--env", "FrozenLake-v1",
  1353. "--run", "DQN",
  1354. "--config", "'{\"framework\": \"tf\"}'",
  1355. "--stop", "'{\"training_iteration\": 1}'"
  1356. ]
  1357. )
  1358. py_test(
  1359. name = "test_dqn_cartpole_v1_no_dueling",
  1360. main = "train.py", srcs = ["train.py"],
  1361. size = "medium",
  1362. tags = ["team:rllib", "quick_train"],
  1363. args = [
  1364. "--env", "CartPole-v1",
  1365. "--run", "DQN",
  1366. "--stop", "'{\"training_iteration\": 1}'",
  1367. "--config", "'{\"framework\": \"tf\", \"lr\": 1e-3, \"exploration_config\": {\"epsilon_timesteps\": 10000, \"final_epsilon\": 0.02}, \"dueling\": false, \"hiddens\": [], \"model\": {\"fcnet_hiddens\": [64], \"fcnet_activation\": \"relu\"}}'"
  1368. ]
  1369. )
  1370. py_test(
  1371. name = "test_dqn_cartpole_v1",
  1372. main = "train.py", srcs = ["train.py"],
  1373. tags = ["team:rllib", "quick_train"],
  1374. args = [
  1375. "--env", "CartPole-v1",
  1376. "--run", "DQN",
  1377. "--stop", "'{\"training_iteration\": 1}'",
  1378. "--config", "'{\"framework\": \"tf\", \"num_workers\": 2}'",
  1379. "--ray-num-cpus", "4"
  1380. ]
  1381. )
  1382. py_test(
  1383. name = "test_dqn_cartpole_v1_with_offline_input_and_softq",
  1384. main = "train.py", srcs = ["train.py"],
  1385. tags = ["team:rllib", "quick_train", "external_files"],
  1386. size = "medium",
  1387. # Include the json data file.
  1388. data = ["tests/data/cartpole/small.json"],
  1389. args = [
  1390. "--env", "CartPole-v1",
  1391. "--run", "DQN",
  1392. "--stop", "'{\"training_iteration\": 1}'",
  1393. "--config", "'{\"framework\": \"tf\", \"input\": \"tests/data/cartpole\", \"num_steps_sampled_before_learning_starts\": 0, \"off_policy_estimation_methods\": {\"wis\": {\"type\": \"ray.rllib.offline.estimators.weighted_importance_sampling.WeightedImportanceSampling\"}, \"is\": {\"type\": \"ray.rllib.offline.estimators.importance_sampling.ImportanceSampling\"}}, \"exploration_config\": {\"type\": \"SoftQ\"}}'"
  1394. ]
  1395. )
  1396. py_test(
  1397. name = "test_dqn_pong_v5",
  1398. main = "train.py", srcs = ["train.py"],
  1399. tags = ["team:rllib", "quick_train"],
  1400. args = [
  1401. "--env", "ALE/Pong-v5",
  1402. "--run", "DQN",
  1403. "--stop", "'{\"training_iteration\": 1}'",
  1404. "--config", "'{\"framework\": \"tf\", \"lr\": 1e-4, \"exploration_config\": {\"epsilon_timesteps\": 200000, \"final_epsilon\": 0.01}, \"replay_buffer_config\": {\"capacity\": 10000}, \"num_steps_sampled_before_learning_starts\": 10000, \"rollout_fragment_length\": 4, \"target_network_update_freq\": 1000, \"gamma\": 0.99}'"
  1405. ]
  1406. )
  1407. # IMPALA
  1408. py_test(
  1409. name = "test_impala_buffers_2",
  1410. main = "train.py", srcs = ["train.py"],
  1411. tags = ["team:rllib", "quick_train"],
  1412. args = [
  1413. "--env", "CartPole-v1",
  1414. "--run", "IMPALA",
  1415. "--stop", "'{\"training_iteration\": 1}'",
  1416. "--config", "'{\"framework\": \"tf\", \"num_gpus\": 0, \"num_workers\": 2, \"min_time_s_per_iteration\": 1, \"num_multi_gpu_tower_stacks\": 2, \"replay_buffer_num_slots\": 100, \"replay_proportion\": 1.0}'",
  1417. "--ray-num-cpus", "4",
  1418. ]
  1419. )
  1420. py_test(
  1421. name = "test_impala_cartpole_v1_buffers_2_lstm",
  1422. main = "train.py",
  1423. srcs = ["train.py"],
  1424. tags = ["team:rllib", "quick_train"],
  1425. args = [
  1426. "--env", "CartPole-v1",
  1427. "--run", "IMPALA",
  1428. "--stop", "'{\"training_iteration\": 1}'",
  1429. "--config", "'{\"framework\": \"tf\", \"num_gpus\": 0, \"num_workers\": 2, \"min_time_s_per_iteration\": 1, \"num_multi_gpu_tower_stacks\": 2, \"replay_buffer_num_slots\": 100, \"replay_proportion\": 1.0, \"model\": {\"use_lstm\": true}}'",
  1430. "--ray-num-cpus", "4",
  1431. ]
  1432. )
  1433. py_test(
  1434. name = "test_impala_pong_v5_40k_ts_1G_obj_store",
  1435. main = "train.py",
  1436. srcs = ["train.py"],
  1437. tags = ["team:rllib", "quick_train"],
  1438. size = "large", # bazel may complain about it being too long sometimes - large is on purpose as some frameworks take longer
  1439. args = [
  1440. "--env", "ALE/Pong-v5",
  1441. "--run", "IMPALA",
  1442. "--stop", "'{\"timesteps_total\": 30000}'",
  1443. "--ray-object-store-memory=1000000000",
  1444. "--config", "'{\"framework\": \"tf\", \"num_workers\": 1, \"num_gpus\": 0, \"num_envs_per_worker\": 32, \"rollout_fragment_length\": 50, \"train_batch_size\": 50, \"learner_queue_size\": 1}'"
  1445. ]
  1446. )
  1447. # PG
  1448. py_test(
  1449. name = "test_pg_tf_cartpole_v1_lstm",
  1450. main = "train.py", srcs = ["train.py"],
  1451. tags = ["team:rllib", "quick_train"],
  1452. args = [
  1453. "--env", "CartPole-v1",
  1454. "--run", "PG",
  1455. "--stop", "'{\"training_iteration\": 1}'",
  1456. "--config", "'{\"framework\": \"tf\", \"train_batch_size\": 500, \"num_workers\": 1, \"model\": {\"use_lstm\": true, \"max_seq_len\": 100}}'"
  1457. ]
  1458. )
  1459. py_test(
  1460. name = "test_pg_tf_cartpole_v1_multi_envs_per_worker",
  1461. main = "train.py", srcs = ["train.py"],
  1462. size = "medium",
  1463. tags = ["team:rllib", "quick_train"],
  1464. args = [
  1465. "--env", "CartPole-v1",
  1466. "--run", "PG",
  1467. "--stop", "'{\"training_iteration\": 1}'",
  1468. "--config", "'{\"framework\": \"tf\", \"train_batch_size\": 5000, \"num_workers\": 1, \"num_envs_per_worker\": 10}'"
  1469. ]
  1470. )
  1471. py_test(
  1472. name = "test_pg_tf_pong_v5",
  1473. main = "train.py", srcs = ["train.py"],
  1474. tags = ["team:rllib", "quick_train"],
  1475. args = [
  1476. "--env", "ALE/Pong-v5",
  1477. "--run", "PG",
  1478. "--stop", "'{\"training_iteration\": 1}'",
  1479. "--config", "'{\"framework\": \"tf\", \"train_batch_size\": 500, \"num_workers\": 1}'"
  1480. ]
  1481. )
  1482. # PPO/APPO
  1483. py_test(
  1484. name = "test_ppo_tf_cartpole_v1_complete_episode_batches",
  1485. main = "train.py", srcs = ["train.py"],
  1486. tags = ["team:rllib", "quick_train"],
  1487. args = [
  1488. "--env", "CartPole-v1",
  1489. "--run", "PPO",
  1490. "--stop", "'{\"training_iteration\": 1}'",
  1491. "--config", "'{\"framework\": \"tf\", \"kl_coeff\": 1.0, \"num_sgd_iter\": 10, \"lr\": 1e-4, \"sgd_minibatch_size\": 64, \"train_batch_size\": 2000, \"num_workers\": 1, \"use_gae\": false, \"batch_mode\": \"complete_episodes\"}'"
  1492. ]
  1493. )
  1494. py_test(
  1495. name = "test_ppo_tf_cartpole_v1_remote_worker_envs",
  1496. main = "train.py", srcs = ["train.py"],
  1497. tags = ["team:rllib", "quick_train"],
  1498. args = [
  1499. "--env", "CartPole-v1",
  1500. "--run", "PPO",
  1501. "--stop", "'{\"training_iteration\": 1}'",
  1502. "--config", "'{\"framework\": \"tf\", \"remote_worker_envs\": true, \"remote_env_batch_wait_ms\": 99999999, \"num_envs_per_worker\": 2, \"num_workers\": 1, \"train_batch_size\": 100, \"sgd_minibatch_size\": 50}'"
  1503. ]
  1504. )
  1505. py_test(
  1506. name = "test_ppo_tf_cartpole_v1_remote_worker_envs_b",
  1507. main = "train.py", srcs = ["train.py"],
  1508. tags = ["team:rllib", "quick_train"],
  1509. args = [
  1510. "--env", "CartPole-v1",
  1511. "--run", "PPO",
  1512. "--stop", "'{\"training_iteration\": 2}'",
  1513. "--config", "'{\"framework\": \"tf\", \"remote_worker_envs\": true, \"num_envs_per_worker\": 2, \"num_workers\": 1, \"train_batch_size\": 100, \"sgd_minibatch_size\": 50}'"
  1514. ]
  1515. )
  1516. py_test(
  1517. name = "test_appo_tf_pendulum_v1_no_gpus",
  1518. main = "train.py", srcs = ["train.py"],
  1519. tags = ["team:rllib", "quick_train"],
  1520. args = [
  1521. "--env", "Pendulum-v1",
  1522. "--run", "APPO",
  1523. "--stop", "'{\"training_iteration\": 1}'",
  1524. "--config", "'{\"framework\": \"tf\", \"num_workers\": 2, \"num_gpus\": 0}'",
  1525. "--ray-num-cpus", "4"
  1526. ]
  1527. )
  1528. # --------------------------------------------------------------------
  1529. # Connector tests
  1530. # rllib/connector/
  1531. #
  1532. # Tag: connector
  1533. # --------------------------------------------------------------------
  1534. py_test(
  1535. name = "connectors/tests/test_connector",
  1536. tags = ["team:rllib", "connector"],
  1537. size = "small",
  1538. srcs = ["connectors/tests/test_connector.py"]
  1539. )
  1540. py_test(
  1541. name = "connectors/tests/test_action",
  1542. tags = ["team:rllib", "connector"],
  1543. size = "small",
  1544. srcs = ["connectors/tests/test_action.py"]
  1545. )
  1546. py_test(
  1547. name = "connectors/tests/test_agent",
  1548. tags = ["team:rllib", "connector"],
  1549. size = "medium",
  1550. srcs = ["connectors/tests/test_agent.py"]
  1551. )
  1552. # --------------------------------------------------------------------
  1553. # Env tests
  1554. # rllib/env/
  1555. #
  1556. # Tag: env
  1557. # --------------------------------------------------------------------
  1558. py_test(
  1559. name = "env/tests/test_single_agent_gym_env_runner",
  1560. tags = ["team:rllib", "env"],
  1561. size = "medium",
  1562. srcs = ["env/tests/test_single_agent_gym_env_runner.py"]
  1563. )
  1564. py_test(
  1565. name = "env/tests/test_env_with_subprocess",
  1566. tags = ["team:rllib", "env"],
  1567. size = "medium",
  1568. srcs = ["env/tests/test_env_with_subprocess.py"]
  1569. )
  1570. py_test(
  1571. name = "env/tests/test_external_env",
  1572. tags = ["team:rllib", "env"],
  1573. size = "large",
  1574. srcs = ["env/tests/test_external_env.py"]
  1575. )
  1576. py_test(
  1577. name = "env/tests/test_external_multi_agent_env",
  1578. tags = ["team:rllib", "env"],
  1579. size = "small",
  1580. srcs = ["env/tests/test_external_multi_agent_env.py"]
  1581. )
  1582. sh_test(
  1583. name = "env/tests/test_local_inference_cartpole",
  1584. tags = ["team:rllib", "env"],
  1585. size = "medium",
  1586. srcs = ["env/tests/test_policy_client_server_setup.sh"],
  1587. args = ["local", "cartpole", "8800"],
  1588. data = glob(["examples/serving/*.py"]),
  1589. )
  1590. sh_test(
  1591. name = "env/tests/test_local_inference_cartpole_w_2_concurrent_episodes",
  1592. tags = ["team:rllib", "env"],
  1593. size = "medium",
  1594. srcs = ["env/tests/test_policy_client_server_setup.sh"],
  1595. args = ["local", "cartpole-dummy-2-episodes", "8830"],
  1596. data = glob(["examples/serving/*.py"]),
  1597. )
  1598. # Tests with unity 3d and external envs currently don't work
  1599. # see: https://github.com/ray-project/ray/issues/34290 for more details
  1600. # sh_test(
  1601. # name = "env/tests/test_local_inference_unity3d",
  1602. # tags = ["team:rllib", "env"],
  1603. # size = "large", # bazel may complain about it being too long sometimes - large is on purpose as some frameworks take longer
  1604. # srcs = ["env/tests/test_policy_client_server_setup.sh"],
  1605. # args = ["local", "unity3d", "8850"],
  1606. # data = glob(["examples/serving/*.py"]),
  1607. # )
  1608. py_test(
  1609. name = "env/tests/test_multi_agent_env",
  1610. tags = ["team:rllib", "tests_dir"],
  1611. size = "medium",
  1612. srcs = ["env/tests/test_multi_agent_env.py"]
  1613. )
  1614. sh_test(
  1615. name = "env/tests/test_remote_inference_cartpole",
  1616. tags = ["team:rllib", "env", "exclusive"],
  1617. size = "large", # bazel may complain about it being too long sometimes - large is on purpose as some frameworks take longer
  1618. srcs = ["env/tests/test_policy_client_server_setup.sh"],
  1619. args = ["remote", "cartpole", "8810"],
  1620. data = glob(["examples/serving/*.py"]),
  1621. )
  1622. sh_test(
  1623. name = "env/tests/test_remote_inference_cartpole_lstm",
  1624. tags = ["team:rllib", "env", "exclusive"],
  1625. size = "large", # bazel may complain about it being too long sometimes - large is on purpose as some frameworks take longer
  1626. srcs = ["env/tests/test_policy_client_server_setup.sh"],
  1627. args = ["remote", "cartpole_lstm", "8820"],
  1628. data = glob(["examples/serving/*.py"]),
  1629. )
  1630. sh_test(
  1631. name = "env/tests/test_remote_inference_cartpole_w_2_concurrent_episodes",
  1632. tags = ["team:rllib", "env", "exclusive"],
  1633. size = "large", # bazel may complain about it being too long sometimes - large is on purpose as some frameworks take longer
  1634. srcs = ["env/tests/test_policy_client_server_setup.sh"],
  1635. args = ["remote", "cartpole-dummy-2-episodes", "8840"],
  1636. data = glob(["examples/serving/*.py"]),
  1637. )
  1638. # Tests with unity 3d and external envs currently don't work
  1639. # see: https://github.com/ray-project/ray/issues/34290 for more details
  1640. # sh_test(
  1641. # name = "env/tests/test_remote_inference_unity3d",
  1642. # tags = ["team:rllib", "env", "exclusive"],
  1643. # size = "small",
  1644. # srcs = ["env/tests/test_policy_client_server_setup.sh"],
  1645. # args = ["remote", "unity3d", "8860"],
  1646. # data = glob(["examples/serving/*.py"]),
  1647. # )
  1648. py_test(
  1649. name = "env/tests/test_remote_worker_envs",
  1650. tags = ["team:rllib", "env"],
  1651. size = "medium",
  1652. srcs = ["env/tests/test_remote_worker_envs.py"]
  1653. )
  1654. py_test(
  1655. name = "env/wrappers/tests/test_exception_wrapper",
  1656. tags = ["team:rllib", "env"],
  1657. size = "small",
  1658. srcs = ["env/wrappers/tests/test_exception_wrapper.py"]
  1659. )
  1660. py_test(
  1661. name = "env/wrappers/tests/test_group_agents_wrapper",
  1662. tags = ["team:rllib", "env"],
  1663. size = "small",
  1664. srcs = ["env/wrappers/tests/test_group_agents_wrapper.py"]
  1665. )
  1666. py_test(
  1667. name = "env/wrappers/tests/test_recsim_wrapper",
  1668. tags = ["team:rllib", "env"],
  1669. size = "small",
  1670. srcs = ["env/wrappers/tests/test_recsim_wrapper.py"]
  1671. )
  1672. py_test(
  1673. name = "env/wrappers/tests/test_unity3d_env",
  1674. tags = ["team:rllib", "env"],
  1675. size = "small",
  1676. srcs = ["env/wrappers/tests/test_unity3d_env.py"]
  1677. )
  1678. # --------------------------------------------------------------------
  1679. # Evaluation components
  1680. # rllib/evaluation/
  1681. #
  1682. # Tag: evaluation
  1683. # --------------------------------------------------------------------
  1684. py_test(
  1685. name = "evaluation/tests/test_agent_collector",
  1686. tags = ["team:rllib", "evaluation"],
  1687. size = "small",
  1688. srcs = ["evaluation/tests/test_agent_collector.py"]
  1689. )
  1690. py_test(
  1691. name = "evaluation/tests/test_envs_that_crash",
  1692. tags = ["team:rllib", "evaluation"],
  1693. size = "medium",
  1694. srcs = ["evaluation/tests/test_envs_that_crash.py"]
  1695. )
  1696. py_test(
  1697. name = "evaluation/tests/test_episode",
  1698. tags = ["team:rllib", "evaluation"],
  1699. size = "small",
  1700. srcs = ["evaluation/tests/test_episode.py"]
  1701. )
  1702. py_test(
  1703. name = "evaluation/tests/test_env_runner_v2",
  1704. tags = ["team:rllib", "evaluation"],
  1705. size = "small",
  1706. srcs = ["evaluation/tests/test_env_runner_v2.py"]
  1707. )
  1708. py_test(
  1709. name = "evaluation/tests/test_episode_v2",
  1710. tags = ["team:rllib", "evaluation"],
  1711. size = "small",
  1712. srcs = ["evaluation/tests/test_episode_v2.py"]
  1713. )
  1714. py_test(
  1715. name = "evaluation/tests/test_postprocessing",
  1716. tags = ["team:rllib", "evaluation"],
  1717. size = "small",
  1718. srcs = ["evaluation/tests/test_postprocessing.py"]
  1719. )
  1720. py_test(
  1721. name = "evaluation/tests/test_worker_set",
  1722. tags = ["team:rllib", "evaluation", "exclusive"],
  1723. size = "small",
  1724. srcs = ["evaluation/tests/test_worker_set.py"]
  1725. )
  1726. py_test(
  1727. name = "evaluation/tests/test_rollout_worker",
  1728. tags = ["team:rllib", "evaluation", "exclusive"],
  1729. size = "large",
  1730. srcs = ["evaluation/tests/test_rollout_worker.py"]
  1731. )
  1732. py_test(
  1733. name = "evaluation/tests/test_trajectory_view_api",
  1734. tags = ["team:rllib", "evaluation"],
  1735. size = "large",
  1736. srcs = ["evaluation/tests/test_trajectory_view_api.py"]
  1737. )
  1738. # --------------------------------------------------------------------
  1739. # Execution Utils
  1740. # rllib/execution/
  1741. #
  1742. # Tag: execution
  1743. # --------------------------------------------------------------------
  1744. py_test(
  1745. name = "test_async_requests_manager",
  1746. tags = ["team:rllib", "execution", "exclusive"],
  1747. size = "medium",
  1748. srcs = ["execution/tests/test_async_requests_manager.py"]
  1749. )
  1750. # --------------------------------------------------------------------
  1751. # RLlib core
  1752. # rllib/core/
  1753. #
  1754. # Tag: core
  1755. # --------------------------------------------------------------------
  1756. # Catalog
  1757. py_test(
  1758. name = "test_catalog",
  1759. tags = ["team:rllib", "core"],
  1760. size = "medium",
  1761. srcs = ["core/models/tests/test_catalog.py"]
  1762. )
  1763. # Default Models
  1764. py_test(
  1765. name = "test_base_models",
  1766. tags = ["team:rllib", "core"],
  1767. size = "small",
  1768. srcs = ["core/models/tests/test_base_models.py"]
  1769. )
  1770. py_test(
  1771. name = "test_cnn_encoders",
  1772. tags = ["team:rllib", "core", "models"],
  1773. size = "large",
  1774. srcs = ["core/models/tests/test_cnn_encoders.py"]
  1775. )
  1776. py_test(
  1777. name = "test_cnn_transpose_heads",
  1778. tags = ["team:rllib", "core", "models"],
  1779. size = "medium",
  1780. srcs = ["core/models/tests/test_cnn_transpose_heads.py"]
  1781. )
  1782. py_test(
  1783. name = "test_mlp_encoders",
  1784. tags = ["team:rllib", "core", "models"],
  1785. size = "medium",
  1786. srcs = ["core/models/tests/test_mlp_encoders.py"]
  1787. )
  1788. py_test(
  1789. name = "test_mlp_heads",
  1790. tags = ["team:rllib", "core", "models"],
  1791. size = "medium",
  1792. srcs = ["core/models/tests/test_mlp_heads.py"]
  1793. )
  1794. py_test(
  1795. name = "test_recurrent_encoders",
  1796. tags = ["team:rllib", "core", "models"],
  1797. size = "medium",
  1798. srcs = ["core/models/tests/test_recurrent_encoders.py"]
  1799. )
  1800. # Specs
  1801. py_test(
  1802. name = "test_check_specs",
  1803. tags = ["team:rllib", "models"],
  1804. size = "small",
  1805. srcs = ["core/models/specs/tests/test_check_specs.py"]
  1806. )
  1807. py_test(
  1808. name = "test_tensor_spec",
  1809. tags = ["team:rllib", "models"],
  1810. size = "small",
  1811. srcs = ["core/models/specs/tests/test_tensor_spec.py"]
  1812. )
  1813. py_test(
  1814. name = "test_spec_dict",
  1815. tags = ["team:rllib", "models"],
  1816. size = "small",
  1817. srcs = ["core/models/specs/tests/test_spec_dict.py"]
  1818. )
  1819. # RLModule
  1820. py_test(
  1821. name = "test_torch_rl_module",
  1822. tags = ["team:rllib", "core"],
  1823. size = "medium",
  1824. srcs = ["core/rl_module/torch/tests/test_torch_rl_module.py"],
  1825. args = ["TestRLModule"],
  1826. )
  1827. # TODO(Artur): Comment this back in as soon as we can test with GPU
  1828. # py_test(
  1829. # name = "test_torch_rl_module_gpu",
  1830. # main = "core/rl_module/torch/tests/test_torch_rl_module.py",
  1831. # tags = ["team:rllib", "core", "gpu", "exclusive"],
  1832. # size = "medium",
  1833. # srcs = ["core/rl_module/torch/tests/test_torch_rl_module.py"],
  1834. # args = ["TestRLModuleGPU"],
  1835. # )
  1836. py_test(
  1837. name = "test_tf_rl_module",
  1838. tags = ["team:rllib", "core"],
  1839. size = "medium",
  1840. srcs = ["core/rl_module/tf/tests/test_tf_rl_module.py"]
  1841. )
  1842. py_test(
  1843. name = "test_marl_module",
  1844. tags = ["team:rllib", "core"],
  1845. size = "medium",
  1846. srcs = ["core/rl_module/tests/test_marl_module.py"]
  1847. )
  1848. py_test(
  1849. name = "test_rl_module_specs",
  1850. tags = ["team:rllib", "core"],
  1851. size = "medium",
  1852. srcs = ["core/rl_module/tests/test_rl_module_specs.py"]
  1853. )
  1854. # Learner
  1855. py_test(
  1856. name = "TestLearnerGroupSyncUpdate",
  1857. main = "core/learner/tests/test_learner_group.py",
  1858. tags = ["team:rllib", "multi_gpu", "exclusive"],
  1859. size = "large",
  1860. srcs = ["core/learner/tests/test_learner_group.py"],
  1861. args = ["TestLearnerGroupSyncUpdate"]
  1862. )
  1863. py_test(
  1864. name = "TestLearnerGroupCheckpointRestore",
  1865. main = "core/learner/tests/test_learner_group.py",
  1866. tags = ["team:rllib", "multi_gpu", "exclusive"],
  1867. size = "large",
  1868. srcs = ["core/learner/tests/test_learner_group.py"],
  1869. args = ["TestLearnerGroupCheckpointRestore"]
  1870. )
  1871. py_test(
  1872. name = "TestLearnerGroupAsyncUpdate",
  1873. main = "core/learner/tests/test_learner_group.py",
  1874. tags = ["team:rllib", "multi_gpu", "exclusive"],
  1875. size = "large",
  1876. srcs = ["core/learner/tests/test_learner_group.py"],
  1877. args = ["TestLearnerGroupAsyncUpdate"]
  1878. )
  1879. py_test(
  1880. name = "TestLearnerGroupSaveLoadState",
  1881. main = "core/learner/tests/test_learner_group.py",
  1882. tags = ["team:rllib", "multi_gpu", "exclusive"],
  1883. size = "large",
  1884. srcs = ["core/learner/tests/test_learner_group.py"],
  1885. args = ["TestLearnerGroupSaveLoadState"]
  1886. )
  1887. py_test(
  1888. name = "test_learner_group_config",
  1889. tags = ["team:rllib", "core"],
  1890. size = "medium",
  1891. srcs = ["core/learner/tests/test_learner_group_config.py"]
  1892. )
  1893. py_test(
  1894. name = "test_learner",
  1895. tags = ["team:rllib", "core", "ray_data"],
  1896. size = "medium",
  1897. srcs = ["core/learner/tests/test_learner.py"]
  1898. )
  1899. py_test(
  1900. name = "test_torch_learner_compile",
  1901. tags = ["team:rllib", "core", "ray_data"],
  1902. size = "medium",
  1903. srcs = ["core/learner/torch/tests/test_torch_learner_compile.py"]
  1904. )
  1905. py_test(
  1906. name ="tests/test_algorithm_save_load_checkpoint_learner",
  1907. tags = ["team:rllib", "core"],
  1908. size = "medium",
  1909. srcs = ["tests/test_algorithm_save_load_checkpoint_learner.py"]
  1910. )
  1911. py_test(
  1912. name="test_algorithm_rl_module_restore",
  1913. tags=["team:rllib", "core"],
  1914. size="large",
  1915. srcs=["tests/test_algorithm_rl_module_restore.py"]
  1916. )
  1917. py_test(
  1918. name = "test_bc_algorithm",
  1919. tags = ["team:rllib", "core"],
  1920. size = "medium",
  1921. srcs = ["core/testing/tests/test_bc_algorithm.py"]
  1922. )
  1923. # --------------------------------------------------------------------
  1924. # Models and Distributions
  1925. # rllib/models/
  1926. #
  1927. # Tag: models
  1928. # --------------------------------------------------------------------
  1929. py_test(
  1930. name = "test_attention_nets",
  1931. tags = ["team:rllib", "models"],
  1932. size = "large",
  1933. srcs = ["models/tests/test_attention_nets.py"]
  1934. )
  1935. py_test(
  1936. name = "test_conv2d_default_stacks",
  1937. tags = ["team:rllib", "models"],
  1938. size = "small",
  1939. srcs = ["models/tests/test_conv2d_default_stacks.py"]
  1940. )
  1941. py_test(
  1942. name = "test_convtranspose2d_stack",
  1943. tags = ["team:rllib", "models"],
  1944. size = "medium",
  1945. data = glob(["tests/data/images/obstacle_tower.png"]),
  1946. srcs = ["models/tests/test_convtranspose2d_stack.py"]
  1947. )
  1948. py_test(
  1949. name = "test_action_distributions",
  1950. tags = ["team:rllib", "models"],
  1951. size = "medium",
  1952. srcs = ["models/tests/test_action_distributions.py"]
  1953. )
  1954. py_test(
  1955. name = "test_distributions",
  1956. tags = ["team:rllib", "models"],
  1957. size = "small",
  1958. srcs = ["models/tests/test_distributions.py"]
  1959. )
  1960. py_test(
  1961. name = "test_lstms",
  1962. tags = ["team:rllib", "models"],
  1963. size = "large",
  1964. srcs = ["models/tests/test_lstms.py"]
  1965. )
  1966. py_test(
  1967. name = "test_models",
  1968. tags = ["team:rllib", "models"],
  1969. size = "medium",
  1970. srcs = ["models/tests/test_models.py"]
  1971. )
  1972. py_test(
  1973. name = "test_preprocessors",
  1974. tags = ["team:rllib", "models"],
  1975. size = "medium",
  1976. srcs = ["models/tests/test_preprocessors.py"]
  1977. )
  1978. # test abstract base models
  1979. py_test(
  1980. name = "test_base_model",
  1981. tags = ["team:rllib", "models"],
  1982. size = "small",
  1983. srcs = ["models/tests/test_base_model.py"]
  1984. )
  1985. # test torch base models
  1986. py_test(
  1987. name = "test_torch_model",
  1988. tags = ["team:rllib", "models"],
  1989. size = "small",
  1990. srcs = ["models/tests/test_torch_model.py"]
  1991. )
  1992. # --------------------------------------------------------------------
  1993. # Offline
  1994. # rllib/offline/
  1995. #
  1996. # Tag: offline
  1997. # --------------------------------------------------------------------
  1998. py_test(
  1999. name = "test_dataset_reader",
  2000. tags = ["team:rllib", "offline"],
  2001. size = "small",
  2002. srcs = ["offline/tests/test_dataset_reader.py"],
  2003. data = [
  2004. "tests/data/pendulum/large.json",
  2005. "tests/data/pendulum/enormous.zip",
  2006. ],
  2007. )
  2008. py_test(
  2009. name = "test_feature_importance",
  2010. tags = ["team:rllib", "offline", "torch_only"],
  2011. size = "medium",
  2012. srcs = ["offline/tests/test_feature_importance.py"]
  2013. )
  2014. py_test(
  2015. name = "test_json_reader",
  2016. tags = ["team:rllib", "offline"],
  2017. size = "small",
  2018. srcs = ["offline/tests/test_json_reader.py"],
  2019. data = ["tests/data/pendulum/large.json"],
  2020. )
  2021. py_test(
  2022. name = "test_ope",
  2023. tags = ["team:rllib", "offline", "ray_data"],
  2024. size = "medium",
  2025. srcs = ["offline/estimators/tests/test_ope.py"],
  2026. data = ["tests/data/cartpole/small.json"],
  2027. )
  2028. py_test(
  2029. name = "test_ope_math",
  2030. tags = ["team:rllib", "offline"],
  2031. size = "small",
  2032. srcs = ["offline/estimators/tests/test_ope_math.py"]
  2033. )
  2034. py_test(
  2035. name = "test_dm_learning",
  2036. tags = ["team:rllib", "offline"],
  2037. size = "large",
  2038. srcs = ["offline/estimators/tests/test_dm_learning.py"],
  2039. )
  2040. py_test(
  2041. name = "test_dr_learning",
  2042. tags = ["team:rllib", "offline"],
  2043. size = "large",
  2044. srcs = ["offline/estimators/tests/test_dr_learning.py"],
  2045. )
  2046. # --------------------------------------------------------------------
  2047. # Policies
  2048. # rllib/policy/
  2049. #
  2050. # Tag: policy
  2051. # --------------------------------------------------------------------
  2052. py_test(
  2053. name = "policy/tests/test_compute_log_likelihoods",
  2054. tags = ["team:rllib", "policy"],
  2055. size = "medium",
  2056. srcs = ["policy/tests/test_compute_log_likelihoods.py"]
  2057. )
  2058. py_test(
  2059. name = "policy/tests/test_export_checkpoint_and_model",
  2060. tags = ["team:rllib", "policy"],
  2061. size = "large",
  2062. srcs = ["policy/tests/test_export_checkpoint_and_model.py"]
  2063. )
  2064. py_test(
  2065. name = "policy/tests/test_multi_agent_batch",
  2066. tags = ["team:rllib", "policy"],
  2067. size = "small",
  2068. srcs = ["policy/tests/test_multi_agent_batch.py"]
  2069. )
  2070. py_test(
  2071. name = "policy/tests/test_policy",
  2072. tags = ["team:rllib", "policy"],
  2073. size = "medium",
  2074. srcs = ["policy/tests/test_policy.py"]
  2075. )
  2076. py_test(
  2077. name = "policy/tests/test_policy_map",
  2078. tags = ["team:rllib", "policy"],
  2079. size = "medium",
  2080. srcs = ["policy/tests/test_policy_map.py"]
  2081. )
  2082. py_test(
  2083. name = "policy/tests/test_policy_state_swapping",
  2084. tags = ["team:rllib", "policy", "gpu"],
  2085. size = "medium",
  2086. srcs = ["policy/tests/test_policy_state_swapping.py"]
  2087. )
  2088. py_test(
  2089. name = "policy/tests/test_rnn_sequencing",
  2090. tags = ["team:rllib", "policy"],
  2091. size = "small",
  2092. srcs = ["policy/tests/test_rnn_sequencing.py"]
  2093. )
  2094. py_test(
  2095. name = "policy/tests/test_sample_batch",
  2096. tags = ["team:rllib", "policy", "multi_gpu"],
  2097. size = "small",
  2098. srcs = ["policy/tests/test_sample_batch.py"]
  2099. )
  2100. py_test(
  2101. name = "policy/tests/test_view_requirement",
  2102. tags = ["team:rllib", "policy"],
  2103. size = "small",
  2104. srcs = ["policy/tests/test_view_requirement.py"]
  2105. )
  2106. # --------------------------------------------------------------------
  2107. # Utils:
  2108. # rllib/utils/
  2109. #
  2110. # Tag: utils
  2111. # --------------------------------------------------------------------
  2112. # Checkpoint Utils
  2113. py_test(
  2114. name = "test_checkpoint_utils",
  2115. tags = ["team:rllib", "utils"],
  2116. size = "small",
  2117. srcs = ["utils/tests/test_checkpoint_utils.py"]
  2118. )
  2119. py_test(
  2120. name = "test_errors",
  2121. tags = ["team:rllib", "utils"],
  2122. size = "medium",
  2123. srcs = ["utils/tests/test_errors.py"]
  2124. )
  2125. py_test(
  2126. name = "test_minibatch_utils",
  2127. tags = ["team:rllib", "utils"],
  2128. size = "small",
  2129. srcs = ["utils/tests/test_minibatch_utils.py"]
  2130. )
  2131. py_test(
  2132. name = "test_nested_dict",
  2133. tags = ["team:rllib", "utils"],
  2134. size = "small",
  2135. srcs = ["utils/tests/test_nested_dict.py"]
  2136. )
  2137. py_test(
  2138. name = "test_serialization",
  2139. tags = ["team:rllib", "utils"],
  2140. size = "small",
  2141. srcs = ["utils/tests/test_serialization.py"]
  2142. )
  2143. py_test(
  2144. name = "test_curiosity",
  2145. tags = ["team:rllib", "utils"],
  2146. size = "large",
  2147. srcs = ["utils/exploration/tests/test_curiosity.py"]
  2148. )
  2149. py_test(
  2150. name = "test_explorations",
  2151. tags = ["team:rllib", "utils"],
  2152. size = "large",
  2153. srcs = ["utils/exploration/tests/test_explorations.py"]
  2154. )
  2155. py_test(
  2156. name = "test_parameter_noise",
  2157. tags = ["team:rllib", "utils"],
  2158. size = "medium",
  2159. srcs = ["utils/exploration/tests/test_parameter_noise.py"]
  2160. )
  2161. py_test(
  2162. name = "test_random_encoder",
  2163. tags = ["team:rllib", "utils"],
  2164. size = "large",
  2165. srcs = ["utils/exploration/tests/test_random_encoder.py"]
  2166. )
  2167. py_test(
  2168. name = "utils/tests/test_torch_utils",
  2169. tags = ["team:rllib", "utils", "gpu"],
  2170. size = "medium",
  2171. srcs = ["utils/tests/test_torch_utils.py"]
  2172. )
  2173. # Schedules
  2174. py_test(
  2175. name = "test_schedules",
  2176. tags = ["team:rllib", "utils"],
  2177. size = "small",
  2178. srcs = ["utils/schedules/tests/test_schedules.py"]
  2179. )
  2180. py_test(
  2181. name = "test_framework_agnostic_components",
  2182. tags = ["team:rllib", "utils"],
  2183. size = "small",
  2184. data = glob(["utils/tests/**"]),
  2185. srcs = ["utils/tests/test_framework_agnostic_components.py"]
  2186. )
  2187. # Spaces/Space utils.
  2188. py_test(
  2189. name = "test_space_utils",
  2190. tags = ["team:rllib", "utils"],
  2191. size = "small",
  2192. srcs = ["utils/spaces/tests/test_space_utils.py"]
  2193. )
  2194. # TaskPool
  2195. py_test(
  2196. name = "test_taskpool",
  2197. tags = ["team:rllib", "utils"],
  2198. size = "small",
  2199. srcs = ["utils/tests/test_taskpool.py"]
  2200. )
  2201. # ReplayBuffers
  2202. py_test(
  2203. name = "test_episode_replay_buffer",
  2204. tags = ["team:rllib", "utils"],
  2205. size = "small",
  2206. srcs = ["utils/replay_buffers/tests/test_episode_replay_buffer.py"]
  2207. )
  2208. py_test(
  2209. name = "test_multi_agent_mixin_replay_buffer",
  2210. tags = ["team:rllib", "utils"],
  2211. size = "small",
  2212. srcs = ["utils/replay_buffers/tests/test_multi_agent_mixin_replay_buffer.py"]
  2213. )
  2214. py_test(
  2215. name = "test_multi_agent_prioritized_replay_buffer",
  2216. tags = ["team:rllib", "utils"],
  2217. size = "small",
  2218. srcs = ["utils/replay_buffers/tests/test_multi_agent_prioritized_replay_buffer.py"]
  2219. )
  2220. py_test(
  2221. name = "test_multi_agent_replay_buffer",
  2222. tags = ["team:rllib", "utils"],
  2223. size = "small",
  2224. srcs = ["utils/replay_buffers/tests/test_multi_agent_replay_buffer.py"]
  2225. )
  2226. py_test(
  2227. name = "test_prioritized_replay_buffer_replay_buffer_api",
  2228. tags = ["team:rllib", "utils"],
  2229. size = "small",
  2230. srcs = ["utils/replay_buffers/tests/test_prioritized_replay_buffer_replay_buffer_api.py"]
  2231. )
  2232. py_test(
  2233. name = "test_replay_buffer",
  2234. tags = ["team:rllib", "utils"],
  2235. size = "small",
  2236. srcs = ["utils/replay_buffers/tests/test_replay_buffer.py"]
  2237. )
  2238. py_test(
  2239. name = "test_fifo_replay_buffer",
  2240. tags = ["team:rllib", "utils"],
  2241. size = "small",
  2242. srcs = ["utils/replay_buffers/tests/test_fifo_replay_buffer.py"]
  2243. )
  2244. py_test(
  2245. name = "test_reservoir_buffer",
  2246. tags = ["team:rllib", "utils"],
  2247. size = "small",
  2248. srcs = ["utils/replay_buffers/tests/test_reservoir_buffer.py"]
  2249. )
  2250. py_test(
  2251. name = "test_segment_tree_replay_buffer_api",
  2252. tags = ["team:rllib", "utils"],
  2253. size = "small",
  2254. srcs = ["utils/replay_buffers/tests/test_segment_tree_replay_buffer_api.py"]
  2255. )
  2256. py_test(
  2257. name = "test_check_env",
  2258. tags = ["team:rllib", "utils"],
  2259. size = "small",
  2260. srcs = ["utils/tests/test_check_env.py"]
  2261. )
  2262. py_test(
  2263. name = "test_check_multi_agent",
  2264. tags = ["team:rllib", "utils"],
  2265. size = "small",
  2266. srcs = ["utils/tests/test_check_multi_agent.py"]
  2267. )
  2268. py_test(
  2269. name = "test_actor_manager",
  2270. tags = ["team:rllib", "utils", "exclusive"],
  2271. size = "medium",
  2272. srcs = ["utils/tests/test_actor_manager.py"],
  2273. data = ["utils/tests/random_numbers.pkl"],
  2274. )
  2275. # --------------------------------------------------------------------
  2276. # rllib/tests/ directory
  2277. #
  2278. # Tag: tests_dir
  2279. #
  2280. # NOTE: Add tests alphabetically into this list.
  2281. # --------------------------------------------------------------------
  2282. py_test(
  2283. name = "tests/backward_compat/test_backward_compat",
  2284. tags = ["team:rllib", "tests_dir"],
  2285. size = "medium",
  2286. srcs = ["tests/backward_compat/test_backward_compat.py"],
  2287. data = glob(["tests/backward_compat/checkpoints/**"]),
  2288. )
  2289. py_test(
  2290. name = "tests/backward_compat/test_gym_env_apis",
  2291. tags = ["team:rllib", "env"],
  2292. size = "large",
  2293. srcs = ["tests/backward_compat/test_gym_env_apis.py"]
  2294. )
  2295. py_test(
  2296. name = "tests/test_algorithm_imports",
  2297. tags = ["team:rllib", "tests_dir"],
  2298. size = "small",
  2299. srcs = ["tests/test_algorithm_imports.py"]
  2300. )
  2301. py_test(
  2302. name = "tests/test_catalog",
  2303. tags = ["team:rllib", "tests_dir"],
  2304. size = "medium",
  2305. srcs = ["tests/test_catalog.py"]
  2306. )
  2307. py_test(
  2308. name = "tests/test_checkpoint_restore_pg",
  2309. main = "tests/test_algorithm_checkpoint_restore.py",
  2310. tags = ["team:rllib", "tests_dir"],
  2311. size = "large",
  2312. srcs = ["tests/test_algorithm_checkpoint_restore.py"],
  2313. args = ["TestCheckpointRestorePG"]
  2314. )
  2315. py_test(
  2316. name = "tests/test_checkpoint_restore_pg_gpu",
  2317. main = "tests/test_algorithm_checkpoint_restore.py",
  2318. tags = ["team:rllib", "tests_dir", "gpu"],
  2319. size = "large",
  2320. srcs = ["tests/test_algorithm_checkpoint_restore.py"],
  2321. args = ["TestCheckpointRestorePG"]
  2322. )
  2323. py_test(
  2324. name = "tests/test_checkpoint_restore_off_policy",
  2325. main = "tests/test_algorithm_checkpoint_restore.py",
  2326. tags = ["team:rllib", "tests_dir"],
  2327. size = "large",
  2328. srcs = ["tests/test_algorithm_checkpoint_restore.py"],
  2329. args = ["TestCheckpointRestoreOffPolicy"]
  2330. )
  2331. py_test(
  2332. name = "tests/test_checkpoint_restore_off_policy_gpu",
  2333. main = "tests/test_algorithm_checkpoint_restore.py",
  2334. tags = ["team:rllib", "tests_dir", "gpu"],
  2335. size = "large",
  2336. srcs = ["tests/test_algorithm_checkpoint_restore.py"],
  2337. args = ["TestCheckpointRestoreOffPolicy"]
  2338. )
  2339. py_test(
  2340. name = "tests/test_checkpoint_restore_evolution_algos",
  2341. main = "tests/test_algorithm_checkpoint_restore.py",
  2342. tags = ["team:rllib", "tests_dir"],
  2343. size = "medium",
  2344. srcs = ["tests/test_algorithm_checkpoint_restore.py"],
  2345. args = ["TestCheckpointRestoreEvolutionAlgos"]
  2346. )
  2347. py_test(
  2348. name = "tests/test_checkpoint_restore_evolution_algos_gpu",
  2349. main = "tests/test_algorithm_checkpoint_restore.py",
  2350. tags = ["team:rllib", "tests_dir", "gpu"],
  2351. size = "medium",
  2352. srcs = ["tests/test_algorithm_checkpoint_restore.py"],
  2353. args = ["TestCheckpointRestoreEvolutionAlgos"]
  2354. )
  2355. py_test(
  2356. name = "policy/tests/test_policy_checkpoint_restore",
  2357. main = "policy/tests/test_policy_checkpoint_restore.py",
  2358. tags = ["team:rllib", "tests_dir"],
  2359. size = "large",
  2360. data = glob([
  2361. "tests/data/checkpoints/APPO_CartPole-v1-connector-enabled/**",
  2362. ]),
  2363. srcs = ["policy/tests/test_policy_checkpoint_restore.py"],
  2364. )
  2365. py_test(
  2366. name = "tests/test_custom_resource",
  2367. tags = ["team:rllib", "tests_dir"],
  2368. size = "large", # bazel may complain about it being too long sometimes - large is on purpose as some frameworks take longer
  2369. srcs = ["tests/test_custom_resource.py"]
  2370. )
  2371. py_test(
  2372. name = "tests/test_dependency_tf",
  2373. tags = ["team:rllib", "tests_dir"],
  2374. size = "small",
  2375. srcs = ["tests/test_dependency_tf.py"]
  2376. )
  2377. py_test(
  2378. name = "tests/test_dependency_torch",
  2379. tags = ["team:rllib", "tests_dir"],
  2380. size = "small",
  2381. srcs = ["tests/test_dependency_torch.py"]
  2382. )
  2383. py_test(
  2384. name = "tests/test_eager_support_pg",
  2385. main = "tests/test_eager_support.py",
  2386. tags = ["team:rllib", "tests_dir"],
  2387. size = "small",
  2388. srcs = ["tests/test_eager_support.py"],
  2389. args = ["TestEagerSupportPG"]
  2390. )
  2391. py_test(
  2392. name = "tests/test_eager_support_off_policy",
  2393. main = "tests/test_eager_support.py",
  2394. tags = ["team:rllib", "tests_dir"],
  2395. size = "small",
  2396. srcs = ["tests/test_eager_support.py"],
  2397. args = ["TestEagerSupportOffPolicy"]
  2398. )
  2399. py_test(
  2400. name = "tests/test_filters",
  2401. tags = ["team:rllib", "tests_dir"],
  2402. size = "small",
  2403. srcs = ["tests/test_filters.py"]
  2404. )
  2405. py_test(
  2406. name = "tests/test_gpus",
  2407. tags = ["team:rllib", "tests_dir"],
  2408. size = "large",
  2409. srcs = ["tests/test_gpus.py"]
  2410. )
  2411. py_test(
  2412. name = "tests/test_io",
  2413. tags = ["team:rllib", "tests_dir"],
  2414. size = "large",
  2415. srcs = ["tests/test_io.py"]
  2416. )
  2417. py_test(
  2418. name = "tests/test_local",
  2419. tags = ["team:rllib", "tests_dir"],
  2420. size = "small",
  2421. srcs = ["tests/test_local.py"]
  2422. )
  2423. py_test(
  2424. name = "tests/test_lstm",
  2425. tags = ["team:rllib", "tests_dir"],
  2426. size = "medium",
  2427. srcs = ["tests/test_lstm.py"]
  2428. )
  2429. py_test(
  2430. name = "tests/test_model_imports",
  2431. tags = ["team:rllib", "tests_dir", "model_imports"],
  2432. size = "medium",
  2433. data = glob(["tests/data/model_weights/**"]),
  2434. srcs = ["tests/test_model_imports.py"]
  2435. )
  2436. py_test(
  2437. name = "tests/test_nested_action_spaces",
  2438. main = "tests/test_nested_action_spaces.py",
  2439. tags = ["team:rllib", "tests_dir"],
  2440. size = "medium",
  2441. srcs = ["tests/test_nested_action_spaces.py"]
  2442. )
  2443. py_test(
  2444. name = "tests/test_nested_observation_spaces",
  2445. main = "tests/test_nested_observation_spaces.py",
  2446. tags = ["team:rllib", "tests_dir"],
  2447. size = "medium",
  2448. srcs = ["tests/test_nested_observation_spaces.py"]
  2449. )
  2450. py_test(
  2451. name = "tests/test_nn_framework_import_errors",
  2452. tags = ["team:rllib", "tests_dir"],
  2453. size = "small",
  2454. srcs = ["tests/test_nn_framework_import_errors.py"]
  2455. )
  2456. py_test(
  2457. name = "tests/test_pettingzoo_env",
  2458. tags = ["team:rllib", "tests_dir"],
  2459. size = "medium",
  2460. srcs = ["tests/test_pettingzoo_env.py"]
  2461. )
  2462. py_test(
  2463. name = "tests/test_placement_groups",
  2464. tags = ["team:rllib", "tests_dir"],
  2465. size = "large", # bazel may complain about it being too long sometimes - large is on purpose as some frameworks take longer
  2466. srcs = ["tests/test_placement_groups.py"]
  2467. )
  2468. py_test(
  2469. name = "tests/test_ray_client",
  2470. tags = ["team:rllib", "tests_dir"],
  2471. size = "large",
  2472. srcs = ["tests/test_ray_client.py"]
  2473. )
  2474. py_test(
  2475. name = "tests/test_reproducibility",
  2476. tags = ["team:rllib", "tests_dir"],
  2477. size = "medium",
  2478. srcs = ["tests/test_reproducibility.py"]
  2479. )
  2480. # Test [train|evaluate].py scripts (w/o confirming evaluation performance).
  2481. py_test(
  2482. name = "test_rllib_evaluate_1",
  2483. main = "tests/test_rllib_train_and_evaluate.py",
  2484. tags = ["team:rllib", "tests_dir"],
  2485. size = "large",
  2486. data = ["train.py", "evaluate.py"],
  2487. srcs = ["tests/test_rllib_train_and_evaluate.py"],
  2488. args = ["TestEvaluate1"]
  2489. )
  2490. py_test(
  2491. name = "test_rllib_evaluate_2",
  2492. main = "tests/test_rllib_train_and_evaluate.py",
  2493. tags = ["team:rllib", "tests_dir"],
  2494. size = "large",
  2495. data = ["train.py", "evaluate.py"],
  2496. srcs = ["tests/test_rllib_train_and_evaluate.py"],
  2497. args = ["TestEvaluate2"]
  2498. )
  2499. py_test(
  2500. name = "test_rllib_evaluate_3",
  2501. main = "tests/test_rllib_train_and_evaluate.py",
  2502. tags = ["team:rllib", "tests_dir"],
  2503. size = "large",
  2504. data = ["train.py", "evaluate.py"],
  2505. srcs = ["tests/test_rllib_train_and_evaluate.py"],
  2506. args = ["TestEvaluate3"]
  2507. )
  2508. py_test(
  2509. name = "test_rllib_evaluate_4",
  2510. main = "tests/test_rllib_train_and_evaluate.py",
  2511. tags = ["team:rllib", "tests_dir"],
  2512. size = "large",
  2513. data = ["train.py", "evaluate.py"],
  2514. srcs = ["tests/test_rllib_train_and_evaluate.py"],
  2515. args = ["TestEvaluate4"]
  2516. )
  2517. # Test [train|evaluate].py scripts (and confirm `rllib evaluate` performance is same
  2518. # as the final one from the `rllib train` run).
  2519. py_test(
  2520. name = "test_rllib_train_and_evaluate",
  2521. main = "tests/test_rllib_train_and_evaluate.py",
  2522. tags = ["team:rllib", "tests_dir"],
  2523. size = "large",
  2524. data = ["train.py", "evaluate.py"],
  2525. srcs = ["tests/test_rllib_train_and_evaluate.py"],
  2526. args = ["TestTrainAndEvaluate"]
  2527. )
  2528. py_test(
  2529. name = "tests/test_supported_multi_agent_multi_gpu",
  2530. main = "tests/test_supported_multi_agent.py",
  2531. tags = ["team:rllib", "tests_dir", "multi_gpu"],
  2532. size = "medium",
  2533. srcs = ["tests/test_supported_multi_agent.py"],
  2534. args = ["TestSupportedMultiAgentMultiGPU"]
  2535. )
  2536. py_test(
  2537. name = "tests/test_supported_multi_agent_pg",
  2538. main = "tests/test_supported_multi_agent.py",
  2539. tags = ["team:rllib", "tests_dir"],
  2540. size = "large",
  2541. srcs = ["tests/test_supported_multi_agent.py"],
  2542. args = ["TestSupportedMultiAgentPG"]
  2543. )
  2544. py_test(
  2545. name = "tests/test_supported_multi_agent_off_policy",
  2546. main = "tests/test_supported_multi_agent.py",
  2547. tags = ["team:rllib", "tests_dir"],
  2548. size = "large",
  2549. srcs = ["tests/test_supported_multi_agent.py"],
  2550. args = ["TestSupportedMultiAgentOffPolicy"]
  2551. )
  2552. py_test(
  2553. name = "tests/test_supported_spaces_appo",
  2554. main = "tests/test_supported_spaces.py",
  2555. tags = ["team:rllib", "tests_dir", "exclusive"],
  2556. size = "large",
  2557. srcs = ["tests/test_supported_spaces.py"],
  2558. args = ["TestSupportedSpacesAPPO"]
  2559. )
  2560. py_test(
  2561. name = "tests/test_supported_spaces_impala",
  2562. main = "tests/test_supported_spaces.py",
  2563. tags = ["team:rllib", "tests_dir", "exclusive"],
  2564. size = "large",
  2565. srcs = ["tests/test_supported_spaces.py"],
  2566. args = ["TestSupportedSpacesIMPALA"]
  2567. )
  2568. py_test(
  2569. name = "tests/test_supported_spaces_a3c",
  2570. main = "tests/test_supported_spaces.py",
  2571. tags = ["team:rllib", "tests_dir", "exclusive"],
  2572. size = "large",
  2573. srcs = ["tests/test_supported_spaces.py"],
  2574. args = ["TestSupportedSpacesA3C"]
  2575. )
  2576. py_test(
  2577. name = "tests/test_supported_spaces_ppo",
  2578. main = "tests/test_supported_spaces.py",
  2579. tags = ["team:rllib", "tests_dir"],
  2580. size = "large",
  2581. srcs = ["tests/test_supported_spaces.py"],
  2582. args = ["TestSupportedSpacesPPO"]
  2583. )
  2584. py_test(
  2585. name="tests/test_supported_spaces_dqn",
  2586. main="tests/test_supported_spaces.py",
  2587. tags=["team:rllib", "tests_dir"],
  2588. size="large",
  2589. srcs=["tests/test_supported_spaces.py"],
  2590. args=["TestSupportedSpacesDQN"]
  2591. )
  2592. py_test(
  2593. name = "tests/test_supported_spaces_ppo_no_preprocessor_gpu",
  2594. main = "tests/test_supported_spaces.py",
  2595. tags = ["team:rllib", "gpu", "no_cpu"],
  2596. size = "large",
  2597. srcs = ["tests/test_supported_spaces.py"],
  2598. args = ["TestSupportedSpacesPPONoPreprocessorGPU"]
  2599. )
  2600. py_test(
  2601. name = "tests/test_supported_spaces_off_policy",
  2602. main = "tests/test_supported_spaces.py",
  2603. tags = ["team:rllib", "tests_dir", "exclusive"],
  2604. size = "medium",
  2605. srcs = ["tests/test_supported_spaces.py"],
  2606. args = ["TestSupportedSpacesOffPolicy"]
  2607. )
  2608. py_test(
  2609. name = "tests/test_supported_spaces_evolution_algos",
  2610. main = "tests/test_supported_spaces.py",
  2611. tags = ["team:rllib", "tests_dir"],
  2612. size = "large",
  2613. srcs = ["tests/test_supported_spaces.py"],
  2614. args = ["TestSupportedSpacesEvolutionAlgos"]
  2615. )
  2616. py_test(
  2617. name = "tests/test_timesteps",
  2618. tags = ["team:rllib", "tests_dir"],
  2619. size = "small",
  2620. srcs = ["tests/test_timesteps.py"]
  2621. )
  2622. # --------------------------------------------------------------------
  2623. # examples/ directory (excluding examples/documentation/...)
  2624. #
  2625. # Tag: examples
  2626. #
  2627. # NOTE: Add tests alphabetically into this list.
  2628. # --------------------------------------------------------------------
  2629. py_test(
  2630. name = "examples/action_masking_tf2",
  2631. main = "examples/action_masking.py",
  2632. tags = ["team:rllib", "exclusive", "examples"],
  2633. size = "small",
  2634. srcs = ["examples/action_masking.py"],
  2635. args = ["--stop-iter=2", "--framework=tf2"]
  2636. )
  2637. py_test(
  2638. name = "examples/action_masking_torch",
  2639. main = "examples/action_masking.py",
  2640. tags = ["team:rllib", "exclusive", "examples"],
  2641. size = "small",
  2642. srcs = ["examples/action_masking.py"],
  2643. args = ["--stop-iter=2", "--framework=torch"]
  2644. )
  2645. py_test(
  2646. name = "examples/attention_net_tf",
  2647. main = "examples/attention_net.py",
  2648. tags = ["team:rllib", "exclusive", "examples"],
  2649. size = "medium",
  2650. srcs = ["examples/attention_net.py"],
  2651. args = ["--as-test", "--stop-reward=70", "--framework=tf"]
  2652. )
  2653. py_test(
  2654. name = "examples/attention_net_torch",
  2655. main = "examples/attention_net.py",
  2656. tags = ["team:rllib", "exclusive", "examples"],
  2657. size = "medium",
  2658. srcs = ["examples/attention_net.py"],
  2659. args = ["--as-test", "--stop-reward=70", "--framework torch"]
  2660. )
  2661. py_test(
  2662. name = "examples/autoregressive_action_dist_tf",
  2663. main = "examples/autoregressive_action_dist.py",
  2664. tags = ["team:rllib", "exclusive", "examples"],
  2665. size = "medium",
  2666. srcs = ["examples/autoregressive_action_dist.py"],
  2667. args = ["--as-test", "--framework=tf", "--stop-reward=150", "--num-cpus=4"]
  2668. )
  2669. py_test(
  2670. name = "examples/autoregressive_action_dist_torch",
  2671. main = "examples/autoregressive_action_dist.py",
  2672. tags = ["team:rllib", "exclusive", "examples"],
  2673. size = "medium",
  2674. srcs = ["examples/autoregressive_action_dist.py"],
  2675. args = ["--as-test", "--framework=torch", "--stop-reward=150", "--num-cpus=4"]
  2676. )
  2677. py_test(
  2678. name = "examples/bare_metal_policy_with_custom_view_reqs",
  2679. main = "examples/bare_metal_policy_with_custom_view_reqs.py",
  2680. tags = ["team:rllib", "exclusive", "examples"],
  2681. size = "small",
  2682. srcs = ["examples/bare_metal_policy_with_custom_view_reqs.py"],
  2683. )
  2684. py_test(
  2685. name = "examples/batch_norm_model_ppo_tf",
  2686. main = "examples/batch_norm_model.py",
  2687. tags = ["team:rllib", "exclusive", "examples"],
  2688. size = "medium",
  2689. srcs = ["examples/batch_norm_model.py"],
  2690. args = ["--as-test", "--framework=tf", "--run=PPO", "--stop-reward=80"]
  2691. )
  2692. py_test(
  2693. name = "examples/batch_norm_model_ppo_torch",
  2694. main = "examples/batch_norm_model.py",
  2695. tags = ["team:rllib", "exclusive", "examples"],
  2696. size = "medium",
  2697. srcs = ["examples/batch_norm_model.py"],
  2698. args = ["--as-test", "--framework=torch", "--run=PPO", "--stop-reward=80"]
  2699. )
  2700. py_test(
  2701. name = "examples/batch_norm_model_dqn_tf",
  2702. main = "examples/batch_norm_model.py",
  2703. tags = ["team:rllib", "exclusive", "examples"],
  2704. size = "large",
  2705. srcs = ["examples/batch_norm_model.py"],
  2706. args = ["--as-test", "--framework=tf", "--run=DQN", "--stop-reward=70", "--stop-time=400"]
  2707. )
  2708. py_test(
  2709. name = "examples/batch_norm_model_dqn_torch",
  2710. main = "examples/batch_norm_model.py",
  2711. tags = ["team:rllib", "exclusive", "examples"],
  2712. size = "large", # DQN learns much slower with BatchNorm.
  2713. srcs = ["examples/batch_norm_model.py"],
  2714. args = ["--as-test", "--framework=torch", "--run=DQN", "--stop-reward=70", "--stop-time=400"]
  2715. )
  2716. py_test(
  2717. name = "examples/batch_norm_model_ddpg_tf",
  2718. main = "examples/batch_norm_model.py",
  2719. tags = ["team:rllib", "exclusive", "examples"],
  2720. size = "small",
  2721. srcs = ["examples/batch_norm_model.py"],
  2722. args = ["--run=DDPG", "--framework=tf", "--stop-iters=1"]
  2723. )
  2724. py_test(
  2725. name = "examples/batch_norm_model_ddpg_torch",
  2726. main = "examples/batch_norm_model.py",
  2727. tags = ["team:rllib", "exclusive", "examples"],
  2728. size = "small",
  2729. srcs = ["examples/batch_norm_model.py"],
  2730. args = ["--framework=torch", "--run=DDPG", "--stop-iters=1"]
  2731. )
  2732. py_test(
  2733. name = "examples/cartpole_lstm_impala_tf2",
  2734. main = "examples/cartpole_lstm.py",
  2735. tags = ["team:rllib", "exclusive", "examples"],
  2736. size = "medium",
  2737. srcs = ["examples/cartpole_lstm.py"],
  2738. args = ["--run=IMPALA", "--as-test", "--framework=tf2", "--stop-reward=28", "--num-cpus=4"]
  2739. )
  2740. py_test(
  2741. name = "examples/cartpole_lstm_impala_torch",
  2742. main = "examples/cartpole_lstm.py",
  2743. tags = ["team:rllib", "exclusive", "examples"],
  2744. size = "medium",
  2745. srcs = ["examples/cartpole_lstm.py"],
  2746. args = ["--run=IMPALA", "--as-test", "--framework=torch", "--stop-reward=28", "--num-cpus=4"]
  2747. )
  2748. # TODO (Kourosh): tf2 ~5x slower compared to torch on the new stack
  2749. py_test(
  2750. name = "examples/cartpole_lstm_ppo_tf2",
  2751. main = "examples/cartpole_lstm.py",
  2752. tags = ["team:rllib", "exclusive", "examples"],
  2753. size = "large",
  2754. srcs = ["examples/cartpole_lstm.py"],
  2755. args = ["--run=PPO", "--as-test", "--framework=tf2", "--stop-reward=28", "--num-cpus=4"]
  2756. )
  2757. py_test(
  2758. name = "examples/cartpole_lstm_ppo_torch",
  2759. main = "examples/cartpole_lstm.py",
  2760. tags = ["team:rllib", "exclusive", "examples"],
  2761. size = "medium",
  2762. srcs = ["examples/cartpole_lstm.py"],
  2763. args = ["--run=PPO", "--as-test", "--framework=torch", "--stop-reward=28", "--num-cpus=4"]
  2764. )
  2765. py_test(
  2766. name = "examples/cartpole_lstm_ppo_torch_with_prev_a_and_r",
  2767. main = "examples/cartpole_lstm.py",
  2768. tags = ["team:rllib", "exclusive", "examples"],
  2769. size = "medium",
  2770. srcs = ["examples/cartpole_lstm.py"],
  2771. args = ["--run=PPO", "--as-test", "--framework=torch", "--stop-reward=28", "--num-cpus=4", "--use-prev-action", "--use-prev-reward"]
  2772. )
  2773. py_test(
  2774. name = "examples/catalog/custom_action_distribution",
  2775. main = "examples/catalog/custom_action_distribution.py",
  2776. tags = ["team:rllib", "examples", "no_main"],
  2777. size = "small",
  2778. srcs = ["examples/catalog/custom_action_distribution.py"],
  2779. )
  2780. py_test(
  2781. name = "examples/catalog/mobilenet_v2_encoder",
  2782. main = "examples/catalog/mobilenet_v2_encoder.py",
  2783. tags = ["team:rllib", "examples", "no_main"],
  2784. size = "small",
  2785. srcs = ["examples/catalog/mobilenet_v2_encoder.py"],
  2786. )
  2787. py_test(
  2788. name = "examples/rl_module/mobilenet_rlm",
  2789. main = "examples/rl_module/mobilenet_rlm.py",
  2790. tags = ["team:rllib", "examples", "no_main"],
  2791. size = "small",
  2792. srcs = ["examples/rl_module/mobilenet_rlm.py"],
  2793. )
  2794. py_test(
  2795. name = "examples/centralized_critic_tf",
  2796. main = "examples/centralized_critic.py",
  2797. tags = ["team:rllib", "exclusive", "examples"],
  2798. size = "medium",
  2799. srcs = ["examples/centralized_critic.py"],
  2800. args = ["--as-test", "--framework=tf", "--stop-reward=7.2"]
  2801. )
  2802. py_test(
  2803. name = "examples/centralized_critic_torch",
  2804. main = "examples/centralized_critic.py",
  2805. tags = ["team:rllib", "exclusive", "examples"],
  2806. size = "medium",
  2807. srcs = ["examples/centralized_critic.py"],
  2808. args = ["--as-test", "--framework=torch", "--stop-reward=7.2"]
  2809. )
  2810. py_test(
  2811. name = "examples/centralized_critic_2_tf",
  2812. main = "examples/centralized_critic_2.py",
  2813. tags = ["team:rllib", "exclusive", "examples"],
  2814. size = "medium",
  2815. srcs = ["examples/centralized_critic_2.py"],
  2816. args = ["--as-test", "--framework=tf", "--stop-reward=6.0"]
  2817. )
  2818. py_test(
  2819. name = "examples/centralized_critic_2_torch",
  2820. main = "examples/centralized_critic_2.py",
  2821. tags = ["team:rllib", "exclusive", "examples"],
  2822. size = "medium",
  2823. srcs = ["examples/centralized_critic_2.py"],
  2824. args = ["--as-test", "--framework=torch", "--stop-reward=6.0"]
  2825. )
  2826. py_test(
  2827. name = "examples/checkpoint_by_custom_criteria",
  2828. main = "examples/checkpoint_by_custom_criteria.py",
  2829. tags = ["team:rllib", "exclusive", "examples"],
  2830. size = "medium",
  2831. srcs = ["examples/checkpoint_by_custom_criteria.py"],
  2832. args = ["--stop-iters=3 --num-cpus=3"]
  2833. )
  2834. py_test(
  2835. name = "examples/coin_game_env",
  2836. tags = ["team:rllib", "examples"],
  2837. size = "small",
  2838. srcs = ["examples/coin_game_env.py"],
  2839. args = ["--stop-iters=2"]
  2840. )
  2841. py_test(
  2842. name = "examples/complex_struct_space_tf",
  2843. main = "examples/complex_struct_space.py",
  2844. tags = ["team:rllib", "exclusive", "examples"],
  2845. size = "small",
  2846. srcs = ["examples/complex_struct_space.py"],
  2847. args = ["--framework=tf"],
  2848. )
  2849. py_test(
  2850. name = "examples/complex_struct_space_tf_eager",
  2851. main = "examples/complex_struct_space.py",
  2852. tags = ["team:rllib", "exclusive", "examples"],
  2853. size = "small",
  2854. srcs = ["examples/complex_struct_space.py"],
  2855. args = ["--framework=tf2"],
  2856. )
  2857. py_test(
  2858. name = "examples/complex_struct_space_torch",
  2859. main = "examples/complex_struct_space.py",
  2860. tags = ["team:rllib", "exclusive", "examples"],
  2861. size = "small",
  2862. srcs = ["examples/complex_struct_space.py"],
  2863. args = ["--framework=torch"],
  2864. )
  2865. py_test(
  2866. name = "examples/curriculum_learning",
  2867. main = "examples/curriculum_learning.py",
  2868. tags = ["team:rllib", "exclusive", "examples"],
  2869. size = "medium",
  2870. srcs = ["examples/curriculum_learning.py"],
  2871. args = ["--as-test", "--stop-reward=800.0"]
  2872. )
  2873. py_test(
  2874. name = "examples/custom_env_tf",
  2875. main = "examples/custom_env.py",
  2876. tags = ["team:rllib", "exclusive", "examples"],
  2877. size = "medium",
  2878. srcs = ["examples/custom_env.py"],
  2879. args = ["--as-test", "--framework=tf"]
  2880. )
  2881. py_test(
  2882. name = "examples/custom_env_torch",
  2883. main = "examples/custom_env.py",
  2884. tags = ["team:rllib", "exclusive", "examples"],
  2885. size = "medium",
  2886. srcs = ["examples/custom_env.py"],
  2887. args = ["--as-test", "--framework=torch"]
  2888. )
  2889. py_test(
  2890. name = "examples/custom_eval_tf",
  2891. main = "examples/custom_eval.py",
  2892. tags = ["team:rllib", "exclusive", "examples"],
  2893. size = "small",
  2894. srcs = ["examples/custom_eval.py"],
  2895. args = ["--num-cpus=4", "--framework=tf", "--as-test"]
  2896. )
  2897. py_test(
  2898. name = "examples/custom_eval_torch",
  2899. main = "examples/custom_eval.py",
  2900. tags = ["team:rllib", "exclusive", "examples"],
  2901. size = "small",
  2902. srcs = ["examples/custom_eval.py"],
  2903. args = ["--num-cpus=4", "--as-test", "--framework=torch"]
  2904. )
  2905. py_test(
  2906. name = "examples/custom_eval_parallel_to_training_torch",
  2907. main = "examples/custom_eval.py",
  2908. tags = ["team:rllib", "exclusive", "examples"],
  2909. size = "small",
  2910. srcs = ["examples/custom_eval.py"],
  2911. args = ["--num-cpus=4", "--as-test", "--framework=torch", "--evaluation-parallel-to-training"]
  2912. )
  2913. py_test(
  2914. name = "examples/custom_experiment",
  2915. main = "examples/custom_experiment.py",
  2916. tags = ["team:rllib", "exclusive", "examples"],
  2917. size = "medium",
  2918. srcs = ["examples/custom_experiment.py"],
  2919. args = ["--train-iterations=10"]
  2920. )
  2921. py_test(
  2922. name = "examples/custom_fast_model_tf",
  2923. main = "examples/custom_fast_model.py",
  2924. tags = ["team:rllib", "exclusive", "examples"],
  2925. size = "medium",
  2926. srcs = ["examples/custom_fast_model.py"],
  2927. args = ["--stop-iters=1", "--framework=tf"]
  2928. )
  2929. py_test(
  2930. name = "examples/custom_fast_model_torch",
  2931. main = "examples/custom_fast_model.py",
  2932. tags = ["team:rllib", "exclusive", "examples"],
  2933. size = "medium",
  2934. srcs = ["examples/custom_fast_model.py"],
  2935. args = ["--stop-iters=1", "--framework=torch"]
  2936. )
  2937. py_test(
  2938. name = "examples/custom_keras_model_a2c",
  2939. main = "examples/custom_keras_model.py",
  2940. tags = ["team:rllib", "exclusive", "examples"],
  2941. size = "small",
  2942. srcs = ["examples/custom_keras_model.py"],
  2943. args = ["--run=A2C", "--stop=50", "--num-cpus=4"]
  2944. )
  2945. py_test(
  2946. name = "examples/custom_keras_model_dqn",
  2947. main = "examples/custom_keras_model.py",
  2948. tags = ["team:rllib", "exclusive", "examples"],
  2949. size = "small",
  2950. srcs = ["examples/custom_keras_model.py"],
  2951. args = ["--run=DQN", "--stop=50"]
  2952. )
  2953. py_test(
  2954. name = "examples/custom_keras_model_ppo",
  2955. main = "examples/custom_keras_model.py",
  2956. tags = ["team:rllib", "exclusive", "examples"],
  2957. size = "small",
  2958. srcs = ["examples/custom_keras_model.py"],
  2959. args = ["--run=PPO", "--stop=50", "--num-cpus=4"]
  2960. )
  2961. py_test(
  2962. name = "examples/custom_metrics_and_callbacks",
  2963. main = "examples/custom_metrics_and_callbacks.py",
  2964. tags = ["team:rllib", "exclusive", "examples"],
  2965. size = "small",
  2966. srcs = ["examples/custom_metrics_and_callbacks.py"],
  2967. args = ["--stop-iters=2"]
  2968. )
  2969. py_test(
  2970. name = "examples/custom_model_api_tf",
  2971. main = "examples/custom_model_api.py",
  2972. tags = ["team:rllib", "exclusive", "examples"],
  2973. size = "small",
  2974. srcs = ["examples/custom_model_api.py"],
  2975. args = ["--framework=tf"],
  2976. )
  2977. py_test(
  2978. name = "examples/custom_model_api_torch",
  2979. main = "examples/custom_model_api.py",
  2980. tags = ["team:rllib", "exclusive", "examples"],
  2981. size = "small",
  2982. srcs = ["examples/custom_model_api.py"],
  2983. args = ["--framework=torch"],
  2984. )
  2985. py_test(
  2986. name = "examples/custom_model_loss_and_metrics_ppo_tf",
  2987. main = "examples/custom_model_loss_and_metrics.py",
  2988. tags = ["team:rllib", "exclusive", "examples"],
  2989. size = "small",
  2990. # Include the json data file.
  2991. data = ["tests/data/cartpole/small.json"],
  2992. srcs = ["examples/custom_model_loss_and_metrics.py"],
  2993. args = ["--run=PPO", "--stop-iters=1", "--framework=tf","--input-files=tests/data/cartpole"]
  2994. )
  2995. py_test(
  2996. name = "examples/custom_model_loss_and_metrics_ppo_torch",
  2997. main = "examples/custom_model_loss_and_metrics.py",
  2998. tags = ["team:rllib", "exclusive", "examples"],
  2999. size = "small",
  3000. # Include the json data file.
  3001. data = ["tests/data/cartpole/small.json"],
  3002. srcs = ["examples/custom_model_loss_and_metrics.py"],
  3003. args = ["--run=PPO", "--framework=torch", "--stop-iters=1", "--input-files=tests/data/cartpole"]
  3004. )
  3005. py_test(
  3006. name = "examples/custom_model_loss_and_metrics_pg_tf",
  3007. main = "examples/custom_model_loss_and_metrics.py",
  3008. tags = ["team:rllib", "exclusive", "examples"],
  3009. size = "small",
  3010. # Include the json data file.
  3011. data = ["tests/data/cartpole/small.json"],
  3012. srcs = ["examples/custom_model_loss_and_metrics.py"],
  3013. args = ["--run=PG", "--stop-iters=1", "--framework=tf", "--input-files=tests/data/cartpole"]
  3014. )
  3015. py_test(
  3016. name = "examples/custom_model_loss_and_metrics_pg_torch",
  3017. main = "examples/custom_model_loss_and_metrics.py",
  3018. tags = ["team:rllib", "exclusive", "examples"],
  3019. size = "small",
  3020. # Include the json data file.
  3021. data = ["tests/data/cartpole/small.json"],
  3022. srcs = ["examples/custom_model_loss_and_metrics.py"],
  3023. args = ["--run=PG", "--framework=torch", "--stop-iters=1", "--input-files=tests/data/cartpole"]
  3024. )
  3025. py_test(
  3026. name = "examples/custom_observation_filters",
  3027. main = "examples/custom_observation_filters.py",
  3028. tags = ["team:rllib", "exclusive", "examples"],
  3029. size = "medium",
  3030. srcs = ["examples/custom_observation_filters.py"],
  3031. args = ["--stop-iters=3"]
  3032. )
  3033. py_test(
  3034. name = "examples/custom_rnn_model_repeat_after_me_tf",
  3035. main = "examples/custom_rnn_model.py",
  3036. tags = ["team:rllib", "exclusive", "examples"],
  3037. size = "medium",
  3038. srcs = ["examples/custom_rnn_model.py"],
  3039. args = ["--as-test", "--run=PPO", "--framework=tf", "--stop-reward=40", "--env=RepeatAfterMeEnv", "--num-cpus=4"]
  3040. )
  3041. py_test(
  3042. name = "examples/custom_rnn_model_repeat_initial_obs_tf",
  3043. main = "examples/custom_rnn_model.py",
  3044. tags = ["team:rllib", "exclusive", "examples"],
  3045. size = "medium",
  3046. srcs = ["examples/custom_rnn_model.py"],
  3047. args = ["--as-test", "--run=PPO", "--framework=tf", "--stop-reward=10", "--stop-timesteps=300000", "--env=RepeatInitialObsEnv", "--num-cpus=4"]
  3048. )
  3049. py_test(
  3050. name = "examples/custom_rnn_model_repeat_after_me_torch",
  3051. main = "examples/custom_rnn_model.py",
  3052. tags = ["team:rllib", "exclusive", "examples"],
  3053. size = "medium",
  3054. srcs = ["examples/custom_rnn_model.py"],
  3055. args = ["--as-test", "--framework=torch", "--run=PPO", "--stop-reward=40", "--env=RepeatAfterMeEnv", "--num-cpus=4"]
  3056. )
  3057. py_test(
  3058. name = "examples/custom_rnn_model_repeat_initial_obs_torch",
  3059. main = "examples/custom_rnn_model.py",
  3060. tags = ["team:rllib", "exclusive", "examples"],
  3061. size = "medium",
  3062. srcs = ["examples/custom_rnn_model.py"],
  3063. args = ["--as-test", "--framework=torch", "--run=PPO", "--stop-reward=10", "--stop-timesteps=300000", "--env=RepeatInitialObsEnv", "--num-cpus=4"]
  3064. )
  3065. py_test(
  3066. name = "examples/custom_recurrent_rnn_tokenizer_repeat_after_me_tf2",
  3067. main = "examples/custom_recurrent_rnn_tokenizer.py",
  3068. tags = ["team:rllib", "exclusive", "examples"],
  3069. size = "medium",
  3070. srcs = ["examples/custom_recurrent_rnn_tokenizer.py"],
  3071. args = ["--as-test", "--framework=tf2", "--stop-reward=40", "--env=RepeatAfterMeEnv", "--num-cpus=4"]
  3072. )
  3073. py_test(
  3074. name = "examples/custom_recurrent_rnn_tokenizer_repeat_initial_obs_env_tf2",
  3075. main = "examples/custom_recurrent_rnn_tokenizer.py",
  3076. tags = ["team:rllib", "examples"],
  3077. size = "medium",
  3078. srcs = ["examples/custom_recurrent_rnn_tokenizer.py"],
  3079. args = ["--as-test", "--framework=tf2", "--stop-reward=10", "--stop-timesteps=300000", "--env=RepeatInitialObsEnv", "--num-cpus=4"]
  3080. )
  3081. py_test(
  3082. name = "examples/custom_recurrent_rnn_tokenizer_repeat_after_me_torch",
  3083. main = "examples/custom_recurrent_rnn_tokenizer.py",
  3084. tags = ["team:rllib", "exclusive", "examples"],
  3085. size = "medium",
  3086. srcs = ["examples/custom_recurrent_rnn_tokenizer.py"],
  3087. args = ["--as-test", "--framework=torch", "--stop-reward=40", "--env=RepeatAfterMeEnv", "--num-cpus=4"]
  3088. )
  3089. py_test(
  3090. name = "examples/custom_recurrent_rnn_tokenizer_repeat_initial_obs_env_torch",
  3091. main = "examples/custom_recurrent_rnn_tokenizer.py",
  3092. tags = ["team:rllib", "exclusive", "examples"],
  3093. size = "medium",
  3094. srcs = ["examples/custom_recurrent_rnn_tokenizer.py"],
  3095. args = ["--as-test", "--framework=torch", "--stop-reward=10", "--stop-timesteps=300000", "--env=RepeatInitialObsEnv", "--num-cpus=4"]
  3096. )
  3097. py_test(
  3098. name = "examples/custom_tf_policy",
  3099. tags = ["team:rllib", "exclusive", "examples"],
  3100. size = "small",
  3101. srcs = ["examples/custom_tf_policy.py"],
  3102. args = ["--stop-iters=2", "--num-cpus=4"]
  3103. )
  3104. py_test(
  3105. name = "examples/custom_torch_policy",
  3106. tags = ["team:rllib", "exclusive", "examples"],
  3107. size = "small",
  3108. srcs = ["examples/custom_torch_policy.py"],
  3109. args = ["--stop-iters=2", "--num-cpus=4"]
  3110. )
  3111. py_test(
  3112. name = "examples/custom_train_fn",
  3113. main = "examples/custom_train_fn.py",
  3114. tags = ["team:rllib", "exclusive", "examples"],
  3115. size = "medium",
  3116. srcs = ["examples/custom_train_fn.py"],
  3117. )
  3118. py_test(
  3119. name = "examples/custom_vector_env_tf",
  3120. main = "examples/custom_vector_env.py",
  3121. tags = ["team:rllib", "exclusive", "examples"],
  3122. size = "medium",
  3123. srcs = ["examples/custom_vector_env.py"],
  3124. args = ["--as-test", "--framework=tf", "--stop-reward=40.0"]
  3125. )
  3126. py_test(
  3127. name = "examples/custom_vector_env_torch",
  3128. main = "examples/custom_vector_env.py",
  3129. tags = ["team:rllib", "exclusive", "examples"],
  3130. size = "medium",
  3131. srcs = ["examples/custom_vector_env.py"],
  3132. args = ["--as-test", "--framework=torch", "--stop-reward=40.0"]
  3133. )
  3134. py_test(
  3135. name = "examples/deterministic_training_tf",
  3136. main = "examples/deterministic_training.py",
  3137. tags = ["team:rllib", "exclusive", "multi_gpu", "examples"],
  3138. size = "medium",
  3139. srcs = ["examples/deterministic_training.py"],
  3140. args = ["--as-test", "--stop-iters=1", "--framework=tf", "--num-gpus=1", "--num-gpus-per-worker=1"]
  3141. )
  3142. py_test(
  3143. name = "examples/deterministic_training_tf2",
  3144. main = "examples/deterministic_training.py",
  3145. tags = ["team:rllib", "exclusive", "multi_gpu", "examples"],
  3146. size = "medium",
  3147. srcs = ["examples/deterministic_training.py"],
  3148. args = ["--as-test", "--stop-iters=1", "--framework=tf2", "--num-gpus=1", "--num-gpus-per-worker=1"]
  3149. )
  3150. py_test(
  3151. name = "examples/deterministic_training_torch",
  3152. main = "examples/deterministic_training.py",
  3153. tags = ["team:rllib", "exclusive", "multi_gpu", "examples"],
  3154. size = "medium",
  3155. srcs = ["examples/deterministic_training.py"],
  3156. args = ["--as-test", "--stop-iters=1", "--framework=torch", "--num-gpus=1", "--num-gpus-per-worker=1"]
  3157. )
  3158. py_test(
  3159. name = "examples/eager_execution",
  3160. tags = ["team:rllib", "exclusive", "examples"],
  3161. size = "small",
  3162. srcs = ["examples/eager_execution.py"],
  3163. args = ["--stop-iters=2"]
  3164. )
  3165. py_test(
  3166. name = "examples/env/greyscale_env",
  3167. tags = ["team:rllib", "examples", "no_main"],
  3168. size = "medium",
  3169. srcs = ["examples/env/greyscale_env.py"],
  3170. args = ["--stop-iters=1 --as-test --framework torch"]
  3171. )
  3172. py_test(
  3173. name = "examples/export/cartpole_dqn_export",
  3174. main = "examples/export/cartpole_dqn_export.py",
  3175. tags = ["team:rllib", "exclusive", "examples"],
  3176. size = "small",
  3177. srcs = ["examples/export/cartpole_dqn_export.py"],
  3178. )
  3179. py_test(
  3180. name = "examples/export/onnx_tf",
  3181. main = "examples/export/onnx_tf.py",
  3182. tags = ["team:rllib", "exclusive", "examples", "no_main"],
  3183. size = "small",
  3184. srcs = ["examples/export/onnx_tf.py"],
  3185. args = ["--framework=tf"],
  3186. )
  3187. py_test(
  3188. name = "examples/export/onnx_tf2",
  3189. main = "examples/export/onnx_tf.py",
  3190. tags = ["team:rllib", "exclusive", "examples", "no_main"],
  3191. size = "small",
  3192. srcs = ["examples/export/onnx_tf.py"],
  3193. args = ["--framework=tf2"],
  3194. )
  3195. py_test(
  3196. name = "examples/export/onnx_torch",
  3197. main = "examples/export/onnx_torch.py",
  3198. tags = ["team:rllib", "exclusive", "examples", "no_main"],
  3199. size = "small",
  3200. srcs = ["examples/export/onnx_torch.py"],
  3201. )
  3202. py_test(
  3203. name = "examples/fractional_gpus",
  3204. main = "examples/fractional_gpus.py",
  3205. tags = ["team:rllib", "exclusive", "examples"],
  3206. size = "medium",
  3207. srcs = ["examples/fractional_gpus.py"],
  3208. args = ["--as-test", "--stop-reward=40.0", "--num-gpus=0", "--num-workers=0"]
  3209. )
  3210. py_test(
  3211. name = "examples/hierarchical_training_tf",
  3212. main = "examples/hierarchical_training.py",
  3213. tags = ["team:rllib", "exclusive", "examples"],
  3214. size = "medium",
  3215. srcs = ["examples/hierarchical_training.py"],
  3216. args = [ "--framework=tf", "--stop-reward=0.0"]
  3217. )
  3218. py_test(
  3219. name = "examples/hierarchical_training_torch",
  3220. main = "examples/hierarchical_training.py",
  3221. tags = ["team:rllib", "exclusive", "examples"],
  3222. size = "medium",
  3223. srcs = ["examples/hierarchical_training.py"],
  3224. args = ["--framework=torch", "--stop-reward=0.0"]
  3225. )
  3226. # Do not run this test (MobileNetV2 is gigantic and takes forever for 1 iter).
  3227. # py_test(
  3228. # name = "examples/mobilenet_v2_with_lstm_tf",
  3229. # main = "examples/mobilenet_v2_with_lstm.py",
  3230. # tags = ["team:rllib", "examples"],
  3231. # size = "small",
  3232. # srcs = ["examples/mobilenet_v2_with_lstm.py"]
  3233. # )
  3234. py_test(
  3235. name = "examples/multi_agent_cartpole_tf",
  3236. main = "examples/multi_agent_cartpole.py",
  3237. tags = ["team:rllib", "exclusive", "examples"],
  3238. size = "small",
  3239. srcs = ["examples/multi_agent_cartpole.py"],
  3240. args = ["--as-test", "--framework=tf", "--stop-reward=70.0", "--num-cpus=4"]
  3241. )
  3242. py_test(
  3243. name = "examples/multi_agent_cartpole_torch",
  3244. main = "examples/multi_agent_cartpole.py",
  3245. tags = ["team:rllib", "exclusive", "examples"],
  3246. size = "small",
  3247. srcs = ["examples/multi_agent_cartpole.py"],
  3248. args = ["--as-test", "--framework=torch", "--stop-reward=70.0", "--num-cpus=4"]
  3249. )
  3250. py_test(
  3251. name = "examples/multi_agent_cartpole_w_rlm_torch",
  3252. main = "examples/multi_agent_cartpole.py",
  3253. tags = ["team:rllib", "exclusive", "examples", "rlm"],
  3254. size = "medium",
  3255. srcs = ["examples/multi_agent_cartpole.py"],
  3256. args = ["--as-test", "--framework=torch", "--stop-reward=70.0", "--num-cpus=4"]
  3257. )
  3258. py_test(
  3259. name = "examples/multi_agent_cartpole_w_rlm_tf2",
  3260. main = "examples/multi_agent_cartpole.py",
  3261. tags = ["team:rllib", "exclusive", "examples", "rlm"],
  3262. size = "medium",
  3263. srcs = ["examples/multi_agent_cartpole.py"],
  3264. args = ["--as-test", "--framework=tf2", "--stop-reward=70.0", "--num-cpus=4"]
  3265. )
  3266. py_test(
  3267. name = "examples/multi_agent_custom_policy_tf",
  3268. main = "examples/multi_agent_custom_policy.py",
  3269. tags = ["team:rllib", "exclusive", "examples"],
  3270. size = "medium",
  3271. srcs = ["examples/multi_agent_custom_policy.py"],
  3272. args = ["--as-test", "--framework=tf", "--stop-reward=80"]
  3273. )
  3274. py_test(
  3275. name = "examples/multi_agent_custom_policy_torch",
  3276. main = "examples/multi_agent_custom_policy.py",
  3277. tags = ["team:rllib", "exclusive", "examples"],
  3278. size = "medium",
  3279. srcs = ["examples/multi_agent_custom_policy.py"],
  3280. args = ["--as-test", "--framework=torch", "--stop-reward=80"]
  3281. )
  3282. py_test(
  3283. name = "examples/multi_agent_custom_policy_w_rlm_torch",
  3284. main = "examples/multi_agent_custom_policy.py",
  3285. tags = ["team:rllib", "exclusive", "examples", "rlm"],
  3286. size = "medium",
  3287. srcs = ["examples/multi_agent_custom_policy.py"],
  3288. args = ["--as-test", "--framework=torch", "--stop-reward=80"]
  3289. )
  3290. py_test(
  3291. name = "examples/multi_agent_custom_policy_w_rlm_tf2",
  3292. main = "examples/multi_agent_custom_policy.py",
  3293. tags = ["team:rllib", "exclusive", "examples", "rlm"],
  3294. size = "medium",
  3295. srcs = ["examples/multi_agent_custom_policy.py"],
  3296. args = ["--as-test", "--framework=tf2", "--stop-reward=80"]
  3297. )
  3298. py_test(
  3299. name = "examples/multi_agent_different_spaces_for_agents_tf2",
  3300. main = "examples/multi_agent_different_spaces_for_agents.py",
  3301. tags = ["team:rllib", "exclusive", "examples"],
  3302. size = "medium",
  3303. srcs = ["examples/multi_agent_different_spaces_for_agents.py"],
  3304. args = ["--stop-iters=4", "--framework=tf2"]
  3305. )
  3306. py_test(
  3307. name = "examples/multi_agent_different_spaces_for_agents_torch",
  3308. main = "examples/multi_agent_different_spaces_for_agents.py",
  3309. tags = ["team:rllib", "exclusive", "examples"],
  3310. size = "medium",
  3311. srcs = ["examples/multi_agent_different_spaces_for_agents.py"],
  3312. args = ["--stop-iters=4", "--framework=torch"]
  3313. )
  3314. py_test(
  3315. name = "examples/multi_agent_different_spaces_for_agents_w_rlm_torch",
  3316. main = "examples/multi_agent_different_spaces_for_agents.py",
  3317. tags = ["team:rllib", "exclusive", "examples", "rlm"],
  3318. size = "medium",
  3319. srcs = ["examples/multi_agent_different_spaces_for_agents.py"],
  3320. args = ["--stop-iters=4", "--framework=torch"]
  3321. )
  3322. py_test(
  3323. name = "examples/multi_agent_different_spaces_for_agents_w_rlm_tf2",
  3324. main = "examples/multi_agent_different_spaces_for_agents.py",
  3325. tags = ["team:rllib", "exclusive", "examples", "rlm"],
  3326. size = "medium",
  3327. srcs = ["examples/multi_agent_different_spaces_for_agents.py"],
  3328. args = ["--stop-iters=4", "--framework=tf2"]
  3329. )
  3330. py_test(
  3331. name = "examples/multi_agent_independent_learning",
  3332. main = "examples/multi_agent_independent_learning.py",
  3333. tags = ["team:rllib", "examples"],
  3334. size = "medium",
  3335. srcs = ["examples/multi_agent_independent_learning.py"],
  3336. args = ["--num-gpus=0", "--as-test"]
  3337. )
  3338. py_test(
  3339. name = "examples/multi_agent_two_trainers_tf",
  3340. main = "examples/multi_agent_two_trainers.py",
  3341. tags = ["team:rllib", "exclusive", "examples"],
  3342. size = "medium",
  3343. srcs = ["examples/multi_agent_two_trainers.py"],
  3344. args = ["--as-test", "--framework=tf", "--stop-reward=70"]
  3345. )
  3346. py_test(
  3347. name = "examples/multi_agent_two_trainers_torch",
  3348. main = "examples/multi_agent_two_trainers.py",
  3349. tags = ["team:rllib", "exclusive", "examples"],
  3350. size = "small",
  3351. srcs = ["examples/multi_agent_two_trainers.py"],
  3352. args = ["--as-test", "--framework=torch", "--stop-reward=70"]
  3353. )
  3354. py_test(
  3355. name = "examples/offline_rl_torch",
  3356. main = "examples/offline_rl.py",
  3357. tags = ["team:rllib", "exclusive", "examples"],
  3358. size = "medium",
  3359. srcs = ["examples/offline_rl.py"],
  3360. args = ["--as-test", "--stop-reward=-300", "--stop-iters=1"]
  3361. )
  3362. # Taking out this test for now: Mixed torch- and tf- policies within the same
  3363. # Algorithm never really worked.
  3364. # py_test(
  3365. # name = "examples/multi_agent_two_trainers_mixed_torch_tf",
  3366. # main = "examples/multi_agent_two_trainers.py",
  3367. # tags = ["team:rllib", "exclusive", "examples"],
  3368. # size = "medium",
  3369. # srcs = ["examples/multi_agent_two_trainers.py"],
  3370. # args = ["--as-test", "--mixed-torch-tf", "--stop-reward=70"]
  3371. # )
  3372. py_test(
  3373. name = "examples/nested_action_spaces_ppo_tf",
  3374. main = "examples/nested_action_spaces.py",
  3375. tags = ["team:rllib", "exclusive", "examples"],
  3376. size = "medium",
  3377. srcs = ["examples/nested_action_spaces.py"],
  3378. args = ["--as-test", "--framework=tf", "--stop-reward=-600", "--run=PPO"]
  3379. )
  3380. py_test(
  3381. name = "examples/nested_action_spaces_ppo_torch",
  3382. main = "examples/nested_action_spaces.py",
  3383. tags = ["team:rllib", "exclusive", "examples"],
  3384. size = "medium",
  3385. srcs = ["examples/nested_action_spaces.py"],
  3386. args = ["--as-test", "--framework=torch", "--stop-reward=-600", "--run=PPO"]
  3387. )
  3388. py_test(
  3389. name = "examples/parallel_evaluation_and_training_13_episodes_tf",
  3390. main = "examples/parallel_evaluation_and_training.py",
  3391. tags = ["team:rllib", "exclusive", "examples"],
  3392. size = "medium",
  3393. srcs = ["examples/parallel_evaluation_and_training.py"],
  3394. args = ["--as-test", "--framework=tf", "--stop-reward=50.0", "--num-cpus=6", "--evaluation-duration=13"]
  3395. )
  3396. py_test(
  3397. name = "examples/parallel_evaluation_and_training_auto_episodes_tf",
  3398. main = "examples/parallel_evaluation_and_training.py",
  3399. tags = ["team:rllib", "exclusive", "examples"],
  3400. size = "medium",
  3401. srcs = ["examples/parallel_evaluation_and_training.py"],
  3402. args = ["--as-test", "--stop-reward=50.0", "--num-cpus=6", "--evaluation-duration=auto"]
  3403. )
  3404. py_test(
  3405. name = "examples/parallel_evaluation_and_training_211_ts_tf2",
  3406. main = "examples/parallel_evaluation_and_training.py",
  3407. tags = ["team:rllib", "exclusive", "examples"],
  3408. size = "medium",
  3409. srcs = ["examples/parallel_evaluation_and_training.py"],
  3410. args = ["--as-test", "--framework=tf2", "--stop-reward=30.0", "--num-cpus=6", "--evaluation-num-workers=3", "--evaluation-duration=211", "--evaluation-duration-unit=timesteps"]
  3411. )
  3412. py_test(
  3413. name = "examples/parallel_evaluation_and_training_auto_ts_torch",
  3414. main = "examples/parallel_evaluation_and_training.py",
  3415. tags = ["team:rllib", "exclusive", "examples"],
  3416. size = "medium",
  3417. srcs = ["examples/parallel_evaluation_and_training.py"],
  3418. args = ["--as-test", "--framework=torch", "--stop-reward=30.0", "--num-cpus=6", "--evaluation-num-workers=3", "--evaluation-duration=auto", "--evaluation-duration-unit=timesteps"]
  3419. )
  3420. py_test(
  3421. name = "examples/parametric_actions_cartpole_pg_tf",
  3422. main = "examples/parametric_actions_cartpole.py",
  3423. tags = ["team:rllib", "exclusive", "examples"],
  3424. size = "small",
  3425. srcs = ["examples/parametric_actions_cartpole.py"],
  3426. args = ["--as-test", "--stop-reward=60.0", "--run=PG"]
  3427. )
  3428. py_test(
  3429. name = "examples/parametric_actions_cartpole_dqn_tf",
  3430. main = "examples/parametric_actions_cartpole.py",
  3431. tags = ["team:rllib", "exclusive", "examples"],
  3432. size = "medium",
  3433. srcs = ["examples/parametric_actions_cartpole.py"],
  3434. args = ["--as-test", "--framework=tf", "--stop-reward=60.0", "--run=DQN"]
  3435. )
  3436. py_test(
  3437. name = "examples/parametric_actions_cartpole_pg_torch",
  3438. main = "examples/parametric_actions_cartpole.py",
  3439. tags = ["team:rllib", "exclusive", "examples"],
  3440. size = "small",
  3441. srcs = ["examples/parametric_actions_cartpole.py"],
  3442. args = ["--as-test", "--framework=torch", "--stop-reward=60.0", "--run=PG"]
  3443. )
  3444. py_test(
  3445. name = "examples/parametric_actions_cartpole_dqn_torch",
  3446. main = "examples/parametric_actions_cartpole.py",
  3447. tags = ["team:rllib", "exclusive", "examples"],
  3448. size = "medium",
  3449. srcs = ["examples/parametric_actions_cartpole.py"],
  3450. args = ["--as-test", "--framework=torch", "--stop-reward=60.0", "--run=DQN"]
  3451. )
  3452. py_test(
  3453. name = "examples/parametric_actions_cartpole_embeddings_learnt_by_model",
  3454. main = "examples/parametric_actions_cartpole_embeddings_learnt_by_model.py",
  3455. tags = ["team:rllib", "exclusive", "examples"],
  3456. size = "medium",
  3457. srcs = ["examples/parametric_actions_cartpole_embeddings_learnt_by_model.py"],
  3458. args = ["--as-test", "--stop-reward=80.0"]
  3459. )
  3460. py_test(
  3461. name = "examples/inference_and_serving/policy_inference_after_training_tf",
  3462. main = "examples/inference_and_serving/policy_inference_after_training.py",
  3463. tags = ["team:rllib", "exclusive", "examples"],
  3464. size = "medium",
  3465. srcs = ["examples/inference_and_serving/policy_inference_after_training.py"],
  3466. args = ["--stop-iters=3", "--framework=tf"]
  3467. )
  3468. py_test(
  3469. name = "examples/inference_and_serving/policy_inference_after_training_torch",
  3470. main = "examples/inference_and_serving/policy_inference_after_training.py",
  3471. tags = ["team:rllib", "exclusive", "examples"],
  3472. size = "medium",
  3473. srcs = ["examples/inference_and_serving/policy_inference_after_training.py"],
  3474. args = ["--stop-iters=3", "--framework=torch"]
  3475. )
  3476. py_test(
  3477. name = "examples/inference_and_serving/policy_inference_after_training_with_attention_tf",
  3478. main = "examples/inference_and_serving/policy_inference_after_training_with_attention.py",
  3479. tags = ["team:rllib", "exclusive", "examples"],
  3480. size = "medium",
  3481. srcs = ["examples/inference_and_serving/policy_inference_after_training_with_attention.py"],
  3482. args = ["--stop-iters=2", "--framework=tf"]
  3483. )
  3484. py_test(
  3485. name = "examples/inference_and_serving/policy_inference_after_training_with_attention_torch",
  3486. main = "examples/inference_and_serving/policy_inference_after_training_with_attention.py",
  3487. tags = ["team:rllib", "exclusive", "examples"],
  3488. size = "medium",
  3489. srcs = ["examples/inference_and_serving/policy_inference_after_training_with_attention.py"],
  3490. args = ["--stop-iters=2", "--framework=torch"]
  3491. )
  3492. py_test(
  3493. name = "examples/inference_and_serving/policy_inference_after_training_with_dt_torch",
  3494. main = "examples/inference_and_serving/policy_inference_after_training_with_dt.py",
  3495. tags = ["team:rllib", "exclusive", "examples", "ray_data"],
  3496. size = "medium",
  3497. srcs = ["examples/inference_and_serving/policy_inference_after_training_with_dt.py"],
  3498. data = ["tests/data/cartpole/large.json"],
  3499. args = ["--input-files=tests/data/cartpole/large.json"]
  3500. )
  3501. py_test(
  3502. name = "examples/inference_and_serving/policy_inference_after_training_with_lstm_tf",
  3503. main = "examples/inference_and_serving/policy_inference_after_training_with_lstm.py",
  3504. tags = ["team:rllib", "exclusive", "examples"],
  3505. size = "medium",
  3506. srcs = ["examples/inference_and_serving/policy_inference_after_training_with_lstm.py"],
  3507. args = ["--stop-iters=1", "--framework=tf"]
  3508. )
  3509. py_test(
  3510. name = "examples/inference_and_serving/policy_inference_after_training_with_lstm_torch",
  3511. main = "examples/inference_and_serving/policy_inference_after_training_with_lstm.py",
  3512. tags = ["team:rllib", "exclusive", "examples"],
  3513. size = "medium",
  3514. srcs = ["examples/inference_and_serving/policy_inference_after_training_with_lstm.py"],
  3515. args = ["--stop-iters=1", "--framework=torch"]
  3516. )
  3517. py_test(
  3518. name = "examples/preprocessing_disabled_tf",
  3519. main = "examples/preprocessing_disabled.py",
  3520. tags = ["team:rllib", "exclusive", "examples"],
  3521. size = "medium",
  3522. srcs = ["examples/preprocessing_disabled.py"],
  3523. args = ["--stop-iters=2", "--framework=tf"]
  3524. )
  3525. py_test(
  3526. name = "examples/preprocessing_disabled_torch",
  3527. main = "examples/preprocessing_disabled.py",
  3528. tags = ["team:rllib", "exclusive", "examples"],
  3529. size = "medium",
  3530. srcs = ["examples/preprocessing_disabled.py"],
  3531. args = ["--framework=torch", "--stop-iters=2"]
  3532. )
  3533. py_test(
  3534. name = "examples/recommender_system_with_recsim_and_slateq_torch",
  3535. main = "examples/recommender_system_with_recsim_and_slateq.py",
  3536. tags = ["team:rllib", "exclusive", "examples"],
  3537. size = "large",
  3538. srcs = ["examples/recommender_system_with_recsim_and_slateq.py"],
  3539. args = ["--stop-iters=2", "--num-steps-sampled-before-learning_starts=100", "--framework=torch", "--use-tune", "--random-test-episodes=10", "--env-num-candidates=50", "--env-slate-size=2"],
  3540. )
  3541. py_test(
  3542. name = "examples/recommender_system_with_recsim_and_slateq_tf2",
  3543. main = "examples/recommender_system_with_recsim_and_slateq.py",
  3544. tags = ["team:rllib", "exclusive", "examples"],
  3545. size = "large",
  3546. srcs = ["examples/recommender_system_with_recsim_and_slateq.py"],
  3547. args = ["--stop-iters=2", "--num-steps-sampled-before-learning_starts=100", "--framework=tf2", "--use-tune", "--random-test-episodes=10", "--env-num-candidates=50", "--env-slate-size=2"],
  3548. )
  3549. py_test(
  3550. name = "examples/remote_envs_with_inference_done_on_main_node_tf",
  3551. main = "examples/remote_envs_with_inference_done_on_main_node.py",
  3552. tags = ["team:rllib", "exclusive", "examples"],
  3553. size = "medium",
  3554. srcs = ["examples/remote_envs_with_inference_done_on_main_node.py"],
  3555. args = ["--as-test", "--framework=tf"],
  3556. )
  3557. py_test(
  3558. name = "examples/remote_envs_with_inference_done_on_main_node_torch",
  3559. main = "examples/remote_envs_with_inference_done_on_main_node.py",
  3560. tags = ["team:rllib", "exclusive", "examples"],
  3561. size = "medium",
  3562. srcs = ["examples/remote_envs_with_inference_done_on_main_node.py"],
  3563. args = ["--as-test", "--framework=torch"],
  3564. )
  3565. # py_test(
  3566. # name = "examples/remote_base_env_with_custom_api",
  3567. # tags = ["team:rllib", "exclusive", "examples"],
  3568. # size = "medium",
  3569. # srcs = ["examples/remote_base_env_with_custom_api.py"],
  3570. # args = ["--stop-iters=3"]
  3571. # )
  3572. py_test(
  3573. name = "examples/replay_buffer_api",
  3574. tags = ["team:rllib", "examples"],
  3575. size = "large",
  3576. srcs = ["examples/replay_buffer_api.py"],
  3577. )
  3578. py_test(
  3579. name = "examples/restore_1_of_n_agents_from_checkpoint",
  3580. tags = ["team:rllib", "exclusive", "examples"],
  3581. size = "medium",
  3582. srcs = ["examples/restore_1_of_n_agents_from_checkpoint.py"],
  3583. args = ["--pre-training-iters=1", "--stop-iters=1", "--num-cpus=4"]
  3584. )
  3585. py_test(
  3586. name = "examples/rnnsac_stateless_cartpole",
  3587. tags = ["team:rllib", "exclusive", "gpu"],
  3588. size = "medium",
  3589. srcs = ["examples/rnnsac_stateless_cartpole.py"]
  3590. )
  3591. py_test(
  3592. name = "examples/rollout_worker_custom_workflow",
  3593. tags = ["team:rllib", "exclusive", "examples"],
  3594. size = "small",
  3595. srcs = ["examples/rollout_worker_custom_workflow.py"],
  3596. args = ["--num-cpus=4"]
  3597. )
  3598. py_test(
  3599. name = "examples/rock_paper_scissors_multiagent_tf",
  3600. main = "examples/rock_paper_scissors_multiagent.py",
  3601. tags = ["team:rllib", "exclusive", "examples"],
  3602. size = "medium",
  3603. srcs = ["examples/rock_paper_scissors_multiagent.py"],
  3604. args = ["--as-test", "--framework=tf"],
  3605. )
  3606. py_test(
  3607. name = "examples/rock_paper_scissors_multiagent_torch",
  3608. main = "examples/rock_paper_scissors_multiagent.py",
  3609. tags = ["team:rllib", "exclusive", "examples"],
  3610. size = "medium",
  3611. srcs = ["examples/rock_paper_scissors_multiagent.py"],
  3612. args = ["--as-test", "--framework=torch"],
  3613. )
  3614. py_test(
  3615. name = "examples/self_play_with_open_spiel_connect_4_tf",
  3616. main = "examples/self_play_with_open_spiel.py",
  3617. tags = ["team:rllib", "exclusive", "examples"],
  3618. size = "small",
  3619. srcs = ["examples/self_play_with_open_spiel.py"],
  3620. args = ["--framework=tf", "--env=connect_four", "--win-rate-threshold=0.9", "--num-episodes-human-play=0", "--as-test", "--min-win-rate=0.6"]
  3621. )
  3622. py_test(
  3623. name = "examples/self_play_with_open_spiel_connect_4_torch",
  3624. main = "examples/self_play_with_open_spiel.py",
  3625. tags = ["team:rllib", "exclusive", "examples"],
  3626. size = "medium",
  3627. srcs = ["examples/self_play_with_open_spiel.py"],
  3628. args = ["--framework=torch", "--env=connect_four", "--win-rate-threshold=0.9", "--num-episodes-human-play=0", "--as-test", "--min-win-rate=0.6"]
  3629. )
  3630. py_test(
  3631. name = "examples/self_play_with_open_spiel_connect_4_w_rlm_torch",
  3632. main = "examples/self_play_with_open_spiel.py",
  3633. tags = ["team:rllib", "exclusive", "examples", "rlm"],
  3634. size = "medium",
  3635. srcs = ["examples/self_play_with_open_spiel.py"],
  3636. args = ["--framework=torch", "--env=connect_four", "--win-rate-threshold=0.9", "--num-episodes-human-play=0", "--as-test", "--min-win-rate=0.6"]
  3637. )
  3638. py_test(
  3639. name = "examples/self_play_with_open_spiel_connect_4_w_rlm_tf2",
  3640. main = "examples/self_play_with_open_spiel.py",
  3641. tags = ["team:rllib", "exclusive", "examples", "rlm"],
  3642. size = "medium",
  3643. srcs = ["examples/self_play_with_open_spiel.py"],
  3644. args = ["--framework=tf2", "--env=connect_four", "--win-rate-threshold=0.9", "--num-episodes-human-play=0", "--as-test", "--min-win-rate=0.6"]
  3645. )
  3646. py_test(
  3647. name = "examples/self_play_league_based_with_open_spiel_markov_soccer_tf",
  3648. main = "examples/self_play_league_based_with_open_spiel.py",
  3649. tags = ["team:rllib", "exclusive", "examples"],
  3650. size = "medium",
  3651. srcs = ["examples/self_play_league_based_with_open_spiel.py"],
  3652. args = ["--framework=tf", "--env=markov_soccer", "--win-rate-threshold=0.6", "--stop-iters=2", "--num-episodes-human-play=0"]
  3653. )
  3654. py_test(
  3655. name = "examples/self_play_league_based_with_open_spiel_markov_soccer_torch",
  3656. main = "examples/self_play_league_based_with_open_spiel.py",
  3657. tags = ["team:rllib", "exclusive", "examples"],
  3658. size = "medium",
  3659. srcs = ["examples/self_play_league_based_with_open_spiel.py"],
  3660. args = ["--framework=torch", "--env=markov_soccer", "--win-rate-threshold=0.6", "--stop-iters=2", "--num-episodes-human-play=0"]
  3661. )
  3662. py_test(
  3663. name = "examples/trajectory_view_api_tf",
  3664. main = "examples/trajectory_view_api.py",
  3665. tags = ["team:rllib", "exclusive", "examples"],
  3666. size = "medium",
  3667. srcs = ["examples/trajectory_view_api.py"],
  3668. args = ["--as-test", "--framework=tf", "--stop-reward=100.0"]
  3669. )
  3670. py_test(
  3671. name = "examples/trajectory_view_api_torch",
  3672. main = "examples/trajectory_view_api.py",
  3673. tags = ["team:rllib", "exclusive", "examples"],
  3674. size = "medium",
  3675. srcs = ["examples/trajectory_view_api.py"],
  3676. args = ["--as-test", "--framework=torch", "--stop-reward=100.0"]
  3677. )
  3678. py_test(
  3679. name = "examples/trajectory_view_api_rlm_tf2",
  3680. main = "examples/trajectory_view_api_rlm.py",
  3681. tags = ["team:rllib", "exclusive", "examples"],
  3682. size = "medium",
  3683. srcs = ["examples/trajectory_view_api_rlm.py"],
  3684. args = ["--as-test", "--framework=tf2", "--stop-reward=100.0"]
  3685. )
  3686. py_test(
  3687. name = "examples/trajectory_view_api_rlm_torch",
  3688. main = "examples/trajectory_view_api_rlm.py",
  3689. tags = ["team:rllib", "exclusive", "examples"],
  3690. size = "medium",
  3691. srcs = ["examples/trajectory_view_api_rlm.py"],
  3692. args = ["--as-test", "--framework=torch", "--stop-reward=100.0"]
  3693. )
  3694. py_test(
  3695. name = "examples/tune/framework",
  3696. main = "examples/tune/framework.py",
  3697. tags = ["team:rllib", "exclusive", "examples"],
  3698. size = "medium",
  3699. srcs = ["examples/tune/framework.py"],
  3700. args = ["--smoke-test"]
  3701. )
  3702. py_test(
  3703. name = "examples/two_trainer_workflow_tf",
  3704. main = "examples/two_trainer_workflow.py",
  3705. tags = ["team:rllib", "exclusive", "examples"],
  3706. size = "medium",
  3707. srcs = ["examples/two_trainer_workflow.py"],
  3708. args = ["--as-test", "--stop-reward=450.0"]
  3709. )
  3710. py_test(
  3711. name = "examples/two_trainer_workflow_torch",
  3712. main = "examples/two_trainer_workflow.py",
  3713. tags = ["team:rllib", "exclusive", "examples"],
  3714. size = "medium",
  3715. srcs = ["examples/two_trainer_workflow.py"],
  3716. args = ["--as-test", "--torch", "--stop-reward=450.0"]
  3717. )
  3718. py_test(
  3719. name = "examples/two_trainer_workflow_mixed_torch_tf",
  3720. main = "examples/two_trainer_workflow.py",
  3721. tags = ["team:rllib", "exclusive", "examples"],
  3722. size = "medium",
  3723. srcs = ["examples/two_trainer_workflow.py"],
  3724. args = ["--as-test", "--mixed-torch-tf", "--stop-reward=450.0"]
  3725. )
  3726. py_test(
  3727. name = "examples/two_step_game_pg_tf",
  3728. main = "examples/two_step_game.py",
  3729. tags = ["team:rllib", "exclusive", "examples"],
  3730. size = "small",
  3731. srcs = ["examples/two_step_game.py"],
  3732. args = ["--as-test", "--framework=tf", "--stop-reward=7", "--run=PG"]
  3733. )
  3734. py_test(
  3735. name = "examples/two_step_game_pg_torch",
  3736. main = "examples/two_step_game.py",
  3737. tags = ["team:rllib", "exclusive", "examples"],
  3738. size = "small",
  3739. srcs = ["examples/two_step_game.py"],
  3740. args = ["--as-test", "--framework=torch", "--stop-reward=7", "--run=PG"]
  3741. )
  3742. py_test(
  3743. name = "examples/bandit/lin_ts_train_wheel_env",
  3744. main = "examples/bandit/lin_ts_train_wheel_env.py",
  3745. tags = ["team:rllib", "exclusive", "examples"],
  3746. size = "small",
  3747. srcs = ["examples/bandit/lin_ts_train_wheel_env.py"],
  3748. )
  3749. py_test(
  3750. name = "examples/bandit/tune_lin_ts_train_wheel_env",
  3751. main = "examples/bandit/tune_lin_ts_train_wheel_env.py",
  3752. tags = ["team:rllib", "exclusive", "examples"],
  3753. size = "small",
  3754. srcs = ["examples/bandit/tune_lin_ts_train_wheel_env.py"],
  3755. )
  3756. py_test(
  3757. name = "examples/bandit/tune_lin_ucb_train_recommendation",
  3758. main = "examples/bandit/tune_lin_ucb_train_recommendation.py",
  3759. tags = ["team:rllib","exclusive", "examples"],
  3760. size = "small",
  3761. srcs = ["examples/bandit/tune_lin_ucb_train_recommendation.py"],
  3762. )
  3763. py_test(
  3764. name = "examples/bandit/tune_lin_ucb_train_recsim_env",
  3765. main = "examples/bandit/tune_lin_ucb_train_recsim_env.py",
  3766. tags = ["team:rllib", "exclusive", "examples"],
  3767. size = "small",
  3768. srcs = ["examples/bandit/tune_lin_ucb_train_recsim_env.py"],
  3769. )
  3770. py_test(
  3771. name = "examples/connectors/run_connector_policy",
  3772. main = "examples/connectors/run_connector_policy.py",
  3773. tags = ["team:rllib", "exclusive", "examples"],
  3774. size = "small",
  3775. srcs = ["examples/connectors/run_connector_policy.py"],
  3776. )
  3777. py_test(
  3778. name = "examples/connectors/adapt_connector_policy",
  3779. main = "examples/connectors/adapt_connector_policy.py",
  3780. tags = ["team:rllib", "exclusive", "examples"],
  3781. size = "small",
  3782. srcs = ["examples/connectors/adapt_connector_policy.py"],
  3783. )
  3784. py_test(
  3785. name = "examples/connectors/self_play_with_policy_checkpoint",
  3786. main = "examples/connectors/self_play_with_policy_checkpoint.py",
  3787. tags = ["team:rllib", "exclusive", "examples"],
  3788. size = "small",
  3789. srcs = ["examples/connectors/self_play_with_policy_checkpoint.py"],
  3790. args = [
  3791. "--train_iteration=1" # Smoke test.
  3792. ]
  3793. )
  3794. # --------------------------------------------------------------------
  3795. # examples/learner directory
  3796. #
  3797. #
  3798. # Description: These are RLlib tests for the new multi-gpu enabled
  3799. # training stack via Learners.
  3800. #
  3801. # NOTE: Add tests alphabetically to this list.
  3802. # --------------------------------------------------------------------
  3803. py_test(
  3804. name = "examples/learner/multi_agent_cartpole_ppo_torch",
  3805. main = "examples/learner/multi_agent_cartpole_ppo.py",
  3806. tags = ["team:rllib", "examples"],
  3807. size = "medium",
  3808. srcs = ["examples/learner/multi_agent_cartpole_ppo.py"],
  3809. args = ["--as-test", "--framework=torch", "--num-gpus=0"]
  3810. )
  3811. py_test(
  3812. name = "examples/learner/multi_agent_cartpole_ppo_torch_gpu",
  3813. main = "examples/learner/multi_agent_cartpole_ppo.py",
  3814. tags = ["team:rllib", "exclusive", "examples", "gpu"],
  3815. size = "medium",
  3816. srcs = ["examples/learner/multi_agent_cartpole_ppo.py"],
  3817. args = ["--as-test", "--framework=torch", "--num-gpus=1"]
  3818. )
  3819. py_test(
  3820. name = "examples/learner/multi_agent_cartpole_ppo_torch_multi_gpu",
  3821. main = "examples/learner/multi_agent_cartpole_ppo.py",
  3822. tags = ["team:rllib", "exclusive", "examples", "multi_gpu"],
  3823. size = "medium",
  3824. srcs = ["examples/learner/multi_agent_cartpole_ppo.py"],
  3825. args = ["--as-test", "--framework=torch", "--num-gpus=2"]
  3826. )
  3827. py_test(
  3828. name = "examples/learner/ppo_tuner_local_cpu_torch",
  3829. main = "examples/learner/ppo_tuner.py",
  3830. tags = ["team:rllib", "examples"],
  3831. size = "medium",
  3832. srcs = ["examples/learner/ppo_tuner.py"],
  3833. args = ["--framework=torch", "--config=local-cpu"]
  3834. )
  3835. py_test(
  3836. name = "examples/learner/ppo_tuner_local_cpu_tf2",
  3837. main = "examples/learner/ppo_tuner.py",
  3838. tags = ["team:rllib", "examples"],
  3839. size = "medium",
  3840. srcs = ["examples/learner/ppo_tuner.py"],
  3841. args = ["--framework=tf2", "--config=local-cpu"]
  3842. )
  3843. py_test(
  3844. name = "examples/learner/ppo_tuner_local_gpu_torch",
  3845. main = "examples/learner/ppo_tuner.py",
  3846. tags = ["team:rllib", "examples", "gpu"],
  3847. size = "medium",
  3848. srcs = ["examples/learner/ppo_tuner.py"],
  3849. args = ["--framework=torch", "--config=local-gpu"]
  3850. )
  3851. py_test(
  3852. name = "examples/learner/ppo_tuner_local_gpu_tf2",
  3853. main = "examples/learner/ppo_tuner.py",
  3854. tags = ["team:rllib", "examples", "gpu", "exclusive"],
  3855. size = "medium",
  3856. srcs = ["examples/learner/ppo_tuner.py"],
  3857. args = ["--framework=tf2", "--config=local-gpu"]
  3858. )
  3859. py_test(
  3860. name = "examples/learner/ppo_tuner_remote_cpu_torch",
  3861. main = "examples/learner/ppo_tuner.py",
  3862. tags = ["team:rllib", "examples"],
  3863. size = "medium",
  3864. srcs = ["examples/learner/ppo_tuner.py"],
  3865. args = ["--framework=torch", "--config=remote-cpu"]
  3866. )
  3867. py_test(
  3868. name = "examples/learner/ppo_tuner_remote_cpu_tf2",
  3869. main = "examples/learner/ppo_tuner.py",
  3870. tags = ["team:rllib", "examples"],
  3871. size = "medium",
  3872. srcs = ["examples/learner/ppo_tuner.py"],
  3873. args = ["--framework=tf2", "--config=remote-cpu"]
  3874. )
  3875. py_test(
  3876. name = "examples/learner/ppo_tuner_remote_gpu_torch",
  3877. main = "examples/learner/ppo_tuner.py",
  3878. tags = ["team:rllib", "examples", "gpu", "exclusive"],
  3879. size = "medium",
  3880. srcs = ["examples/learner/ppo_tuner.py"],
  3881. args = ["--framework=torch", "--config=remote-gpu"]
  3882. )
  3883. py_test(
  3884. name = "examples/learner/ppo_tuner_remote_gpu_tf2",
  3885. main = "examples/learner/ppo_tuner.py",
  3886. tags = ["team:rllib", "examples", "gpu", "exclusive"],
  3887. size = "medium",
  3888. srcs = ["examples/learner/ppo_tuner.py"],
  3889. args = ["--framework=tf2", "--config=remote-gpu"]
  3890. )
  3891. py_test(
  3892. name = "examples/learner/ppo_tuner_multi_gpu_torch",
  3893. main = "examples/learner/ppo_tuner.py",
  3894. tags = ["team:rllib", "examples", "multi_gpu", "exclusive"],
  3895. size = "medium",
  3896. srcs = ["examples/learner/ppo_tuner.py"],
  3897. args = ["--framework=torch", "--config=multi-gpu-ddp"]
  3898. )
  3899. py_test(
  3900. name = "examples/learner/ppo_tuner_multi_gpu_tf2",
  3901. main = "examples/learner/ppo_tuner.py",
  3902. tags = ["team:rllib", "examples", "multi_gpu", "exclusive"],
  3903. size = "medium",
  3904. srcs = ["examples/learner/ppo_tuner.py"],
  3905. args = ["--framework=tf2", "--config=multi-gpu-ddp"]
  3906. )
  3907. py_test(
  3908. name = "examples/learner/train_w_bc_finetune_w_ppo",
  3909. main = "examples/learner/train_w_bc_finetune_w_ppo.py",
  3910. tags = ["team:rllib", "examples", "exclusive"],
  3911. size = "medium",
  3912. srcs = ["examples/learner/train_w_bc_finetune_w_ppo.py"],
  3913. )
  3914. # --------------------------------------------------------------------
  3915. # examples/documentation directory
  3916. #
  3917. # Tag: documentation
  3918. #
  3919. # NOTE: Add tests alphabetically to this list.
  3920. # --------------------------------------------------------------------
  3921. py_test(
  3922. name = "examples/documentation/custom_gym_env",
  3923. main = "examples/documentation/custom_gym_env.py",
  3924. tags = ["team:rllib", "documentation", "no_main"],
  3925. size = "medium",
  3926. srcs = ["examples/documentation/custom_gym_env.py"],
  3927. )
  3928. py_test(
  3929. name = "examples/documentation/saving_and_loading_algos_and_policies",
  3930. main = "examples/documentation/saving_and_loading_algos_and_policies.py",
  3931. tags = ["team:rllib", "documentation", "no_main"],
  3932. size = "large",
  3933. srcs = ["examples/documentation/saving_and_loading_algos_and_policies.py"],
  3934. )
  3935. py_test(
  3936. name = "examples/documentation/replay_buffer_demo",
  3937. main = "examples/documentation/replay_buffer_demo.py",
  3938. tags = ["team:rllib", "documentation", "no_main"],
  3939. size = "medium",
  3940. srcs = ["examples/documentation/replay_buffer_demo.py"],
  3941. )
  3942. py_test(
  3943. name = "examples/documentation/rllib_on_ray_readme",
  3944. main = "examples/documentation/rllib_on_ray_readme.py",
  3945. tags = ["team:rllib", "documentation", "no_main"],
  3946. size = "medium",
  3947. srcs = ["examples/documentation/rllib_on_ray_readme.py"],
  3948. )
  3949. py_test(
  3950. name = "examples/documentation/rllib_on_rllib_readme",
  3951. main = "examples/documentation/rllib_on_rllib_readme.py",
  3952. tags = ["team:rllib", "documentation", "no_main"],
  3953. size = "medium",
  3954. srcs = ["examples/documentation/rllib_on_rllib_readme.py"],
  3955. )
  3956. # --------------------------------------------------------------------
  3957. # Manual/disabled tests
  3958. # --------------------------------------------------------------------
  3959. py_test_module_list(
  3960. files = [
  3961. "tests/test_dnc.py",
  3962. "tests/test_perf.py",
  3963. "env/wrappers/tests/test_kaggle_wrapper.py",
  3964. "examples/env/tests/test_cliff_walking_wall_env.py",
  3965. "examples/env/tests/test_coin_game_non_vectorized_env.py",
  3966. "examples/env/tests/test_coin_game_vectorized_env.py",
  3967. "examples/env/tests/test_matrix_sequential_social_dilemma.py",
  3968. "examples/env/tests/test_wrappers.py",
  3969. "utils/tests/test_utils.py",
  3970. ],
  3971. size = "large",
  3972. extra_srcs = [],
  3973. deps = [],
  3974. tags = ["manual", "team:rllib", "no_main"],
  3975. )