BUILD 85 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722
  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_[tf|tf2|torch]": Distinguish tf/tf2 vs torch.
  11. # -- "learning_tests_[discrete|continuous]_[tf|tf2|torch]": distinguish discrete
  12. # actions vs continuous actions AND tf vs torch.
  13. # -- "fake_gpus_[tf|torch]": Tests that run using 2 fake GPUs.
  14. # - Quick agent compilation/tune-train tests, tagged "quick_train".
  15. # NOTE: These should be obsoleted in favor of "trainers_dir" tests as
  16. # they cover the same functionaliy.
  17. # - Folder-bound tests, tagged with the name of the top-level dir:
  18. # - `env` directory tests.
  19. # - `evaluation` directory tests.
  20. # - `execution` directory tests.
  21. # - `models` directory tests.
  22. # - `policy` directory tests.
  23. # - `utils` directory tests.
  24. # - Trainer ("agents") tests, tagged "trainers_dir".
  25. # - Tests directory (everything in rllib/tests/...), tagged: "tests_dir" and
  26. # "tests_dir_[A-Z]"
  27. # - Examples directory (everything in rllib/examples/...), tagged: "examples" and
  28. # "examples_[A-Z]"
  29. # Note: The "examples" and "tests_dir" tags have further sub-tags going by the
  30. # starting letter of the test name (e.g. "examples_A", or "tests_dir_F") for
  31. # split-up purposes in buildkite.
  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:ml": Indicating that all tests in this file are the responsibility of
  37. # the ML 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.yaml.
  41. # - "multi-gpu": Indicating that a test will definitely be run in the Large GPU
  42. # pipeline, defined in .buildkite/pipeline.gpu.large.yaml.
  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. # --------------------------------------------------------------------
  50. # Agents learning regression tests.
  51. #
  52. # Tag: learning_tests
  53. #
  54. # This will test all yaml files (via `rllib train`)
  55. # inside rllib/tuned_examples/[algo-name] for actual learning success.
  56. # --------------------------------------------------------------------
  57. # A2C/A3C
  58. py_test(
  59. name = "learning_tests_cartpole_a2c",
  60. main = "tests/run_regression_tests.py",
  61. tags = ["team:ml", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete"],
  62. size = "large",
  63. srcs = ["tests/run_regression_tests.py"],
  64. data = ["tuned_examples/a3c/cartpole-a2c.yaml"],
  65. args = ["--yaml-dir=tuned_examples/a3c"]
  66. )
  67. py_test(
  68. name = "learning_cartpole_a2c_fake_gpus",
  69. main = "tests/run_regression_tests.py",
  70. tags = ["team:ml", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete", "fake_gpus"],
  71. size = "large",
  72. srcs = ["tests/run_regression_tests.py"],
  73. data = ["tuned_examples/a3c/cartpole-a2c-fake-gpus.yaml"],
  74. args = ["--yaml-dir=tuned_examples/a3c"]
  75. )
  76. py_test(
  77. name = "learning_tests_cartpole_a3c",
  78. main = "tests/run_regression_tests.py",
  79. tags = ["team:ml", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete"],
  80. size = "large",
  81. srcs = ["tests/run_regression_tests.py"],
  82. data = ["tuned_examples/a3c/cartpole-a3c.yaml"],
  83. args = ["--yaml-dir=tuned_examples/a3c"]
  84. )
  85. # APEX-DQN
  86. py_test(
  87. name = "learning_tests_cartpole_apex",
  88. main = "tests/run_regression_tests.py",
  89. tags = ["team:ml", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete"],
  90. size = "large",
  91. srcs = ["tests/run_regression_tests.py"],
  92. data = [
  93. "tuned_examples/dqn/cartpole-apex.yaml",
  94. ],
  95. args = ["--yaml-dir=tuned_examples/dqn", "--num-cpus=6"]
  96. )
  97. # Once APEX supports multi-GPU.
  98. # py_test(
  99. # name = "learning_cartpole_apex_fake_gpus",
  100. # main = "tests/run_regression_tests.py",
  101. # tags = ["team:ml", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete", "fake_gpus"],
  102. # size = "large",
  103. # srcs = ["tests/run_regression_tests.py"],
  104. # data = ["tuned_examples/dqn/cartpole-apex-fake-gpus.yaml"],
  105. # args = ["--yaml-dir=tuned_examples/dqn"]
  106. # )
  107. # APPO
  108. py_test(
  109. name = "learning_tests_cartpole_appo",
  110. main = "tests/run_regression_tests.py",
  111. tags = ["team:ml", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete"],
  112. size = "large",
  113. srcs = ["tests/run_regression_tests.py"],
  114. data = [
  115. "tuned_examples/ppo/cartpole-appo.yaml",
  116. "tuned_examples/ppo/cartpole-appo-vtrace.yaml"
  117. ],
  118. args = ["--yaml-dir=tuned_examples/ppo"]
  119. )
  120. py_test(
  121. name = "learning_tests_cartpole_separate_losses_appo",
  122. main = "tests/run_regression_tests.py",
  123. tags = ["team:ml", "tf_only", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete"],
  124. size = "large",
  125. srcs = ["tests/run_regression_tests.py"],
  126. data = [
  127. "tuned_examples/ppo/cartpole-appo-vtrace-separate-losses.yaml"
  128. ],
  129. args = ["--yaml-dir=tuned_examples/ppo"]
  130. )
  131. py_test(
  132. name = "learning_frozenlake_appo",
  133. main = "tests/run_regression_tests.py",
  134. tags = ["team:ml", "learning_tests", "learning_tests_discrete"],
  135. size = "large",
  136. srcs = ["tests/run_regression_tests.py"],
  137. data = ["tuned_examples/ppo/frozenlake-appo-vtrace.yaml"],
  138. args = ["--yaml-dir=tuned_examples/ppo"]
  139. )
  140. py_test(
  141. name = "learning_cartpole_appo_fake_gpus",
  142. main = "tests/run_regression_tests.py",
  143. tags = ["team:ml", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete", "fake_gpus"],
  144. size = "large",
  145. srcs = ["tests/run_regression_tests.py"],
  146. data = ["tuned_examples/ppo/cartpole-appo-vtrace-fake-gpus.yaml"],
  147. args = ["--yaml-dir=tuned_examples/ppo"]
  148. )
  149. # ARS
  150. py_test(
  151. name = "learning_tests_cartpole_ars",
  152. main = "tests/run_regression_tests.py",
  153. tags = ["team:ml", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete"],
  154. size = "large",
  155. srcs = ["tests/run_regression_tests.py"],
  156. data = ["tuned_examples/ars/cartpole-ars.yaml"],
  157. args = ["--yaml-dir=tuned_examples/ars"]
  158. )
  159. # CQL
  160. py_test(
  161. name = "learning_tests_pendulum_cql",
  162. main = "tests/run_regression_tests.py",
  163. tags = ["team:ml", "learning_tests", "learning_tests_pendulum", "learning_tests_continuous", "flaky"],
  164. size = "large",
  165. srcs = ["tests/run_regression_tests.py"],
  166. # Include the zipped json data file as well.
  167. data = [
  168. "tuned_examples/cql/pendulum-cql.yaml",
  169. "tests/data/pendulum/enormous.zip",
  170. ],
  171. args = ["--yaml-dir=tuned_examples/cql"]
  172. )
  173. # DDPG
  174. py_test(
  175. name = "learning_tests_pendulum_ddpg",
  176. main = "tests/run_regression_tests.py",
  177. tags = ["team:ml", "learning_tests", "learning_tests_pendulum", "learning_tests_continuous"],
  178. size = "large",
  179. srcs = ["tests/run_regression_tests.py"],
  180. data = glob(["tuned_examples/ddpg/pendulum-ddpg.yaml"]),
  181. args = ["--yaml-dir=tuned_examples/ddpg"]
  182. )
  183. py_test(
  184. name = "learning_pendulum_ddpg_fake_gpus",
  185. main = "tests/run_regression_tests.py",
  186. tags = ["team:ml", "learning_tests", "learning_tests_pendulum", "learning_tests_continuous", "fake_gpus"],
  187. size = "large",
  188. srcs = ["tests/run_regression_tests.py"],
  189. data = ["tuned_examples/ddpg/pendulum-ddpg-fake-gpus.yaml"],
  190. args = ["--yaml-dir=tuned_examples/ddpg"]
  191. )
  192. # DDPPO
  193. py_test(
  194. name = "learning_tests_cartpole_ddppo",
  195. main = "tests/run_regression_tests.py",
  196. tags = ["team:ml", "torch_only", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete"],
  197. size = "large",
  198. srcs = ["tests/run_regression_tests.py"],
  199. data = glob(["tuned_examples/ppo/cartpole-ddppo.yaml"]),
  200. args = ["--yaml-dir=tuned_examples/ppo"]
  201. )
  202. # DQN
  203. py_test(
  204. name = "learning_tests_cartpole_dqn",
  205. main = "tests/run_regression_tests.py",
  206. tags = ["team:ml", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete"],
  207. size = "large",
  208. srcs = ["tests/run_regression_tests.py"],
  209. data = ["tuned_examples/dqn/cartpole-dqn.yaml"],
  210. args = ["--yaml-dir=tuned_examples/dqn"]
  211. )
  212. py_test(
  213. name = "learning_tests_cartpole_dqn_softq",
  214. main = "tests/run_regression_tests.py",
  215. tags = ["team:ml", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete"],
  216. size = "large",
  217. srcs = ["tests/run_regression_tests.py"],
  218. data = ["tuned_examples/dqn/cartpole-dqn-softq.yaml"],
  219. args = ["--yaml-dir=tuned_examples/dqn"]
  220. )
  221. # Does not work with tf-eager tracing due to Exploration's postprocessing
  222. # method injecting a tensor into a new graph. Revisit when tf-eager tracing
  223. # is better supported.
  224. py_test(
  225. name = "learning_tests_cartpole_dqn_param_noise",
  226. main = "tests/run_regression_tests.py",
  227. tags = ["team:ml", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete", "no_tf_eager_tracing"],
  228. size = "large",
  229. srcs = ["tests/run_regression_tests.py"],
  230. data = ["tuned_examples/dqn/cartpole-dqn-param-noise.yaml"],
  231. args = ["--yaml-dir=tuned_examples/dqn"]
  232. )
  233. py_test(
  234. name = "learning_cartpole_dqn_fake_gpus",
  235. main = "tests/run_regression_tests.py",
  236. tags = ["team:ml", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete", "fake_gpus"],
  237. size = "large",
  238. srcs = ["tests/run_regression_tests.py"],
  239. data = ["tuned_examples/dqn/cartpole-dqn-fake-gpus.yaml"],
  240. args = ["--yaml-dir=tuned_examples/dqn"]
  241. )
  242. # Simple-Q
  243. py_test(
  244. name = "learning_tests_cartpole_simpleq",
  245. main = "tests/run_regression_tests.py",
  246. tags = ["team:ml", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete"],
  247. size = "large",
  248. srcs = ["tests/run_regression_tests.py"],
  249. data = [
  250. "tuned_examples/dqn/cartpole-simpleq.yaml",
  251. ],
  252. args = ["--yaml-dir=tuned_examples/dqn"]
  253. )
  254. py_test(
  255. name = "learning_cartpole_simpleq_fake_gpus",
  256. main = "tests/run_regression_tests.py",
  257. tags = ["team:ml", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete", "fake_gpus"],
  258. size = "large",
  259. srcs = ["tests/run_regression_tests.py"],
  260. data = ["tuned_examples/dqn/cartpole-simpleq-fake-gpus.yaml"],
  261. args = ["--yaml-dir=tuned_examples/dqn"]
  262. )
  263. # ES
  264. py_test(
  265. name = "learning_tests_cartpole_es",
  266. main = "tests/run_regression_tests.py",
  267. tags = ["team:ml", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete"],
  268. size = "large",
  269. srcs = ["tests/run_regression_tests.py"],
  270. data = ["tuned_examples/es/cartpole-es.yaml"],
  271. args = ["--yaml-dir=tuned_examples/es"]
  272. )
  273. # IMPALA
  274. py_test(
  275. name = "learning_tests_cartpole_impala",
  276. main = "tests/run_regression_tests.py",
  277. tags = ["team:ml", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete"],
  278. size = "large",
  279. srcs = ["tests/run_regression_tests.py"],
  280. data = ["tuned_examples/impala/cartpole-impala.yaml"],
  281. args = ["--yaml-dir=tuned_examples/impala"]
  282. )
  283. py_test(
  284. name = "learning_cartpole_impala_fake_gpus",
  285. main = "tests/run_regression_tests.py",
  286. tags = ["team:ml", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete", "fake_gpus"],
  287. size = "large",
  288. srcs = ["tests/run_regression_tests.py"],
  289. data = ["tuned_examples/impala/cartpole-impala-fake-gpus.yaml"],
  290. args = ["--yaml-dir=tuned_examples/impala"]
  291. )
  292. # Working, but takes a long time to learn (>15min).
  293. # Removed due to Higher API conflicts with Pytorch-Import tests
  294. ## MB-MPO
  295. #py_test(
  296. # name = "learning_tests_pendulum_mbmpo",
  297. # main = "tests/run_regression_tests.py",
  298. # tags = ["team:ml", "torch_only", "learning_tests", "learning_tests_pendulum", "learning_tests_continuous"],
  299. # size = "large",
  300. # srcs = ["tests/run_regression_tests.py"],
  301. # data = ["tuned_examples/mbmpo/pendulum-mbmpo.yaml"],
  302. # args = ["--yaml-dir=tuned_examples/mbmpo"]
  303. #)
  304. # PG
  305. py_test(
  306. name = "learning_tests_cartpole_pg",
  307. main = "tests/run_regression_tests.py",
  308. tags = ["team:ml", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete"],
  309. size = "large",
  310. srcs = ["tests/run_regression_tests.py"],
  311. data = ["tuned_examples/pg/cartpole-pg.yaml"],
  312. args = ["--yaml-dir=tuned_examples/pg"]
  313. )
  314. py_test(
  315. name = "learning_cartpole_pg_fake_gpus",
  316. main = "tests/run_regression_tests.py",
  317. tags = ["team:ml", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete", "fake_gpus"],
  318. size = "large",
  319. srcs = ["tests/run_regression_tests.py"],
  320. data = ["tuned_examples/pg/cartpole-pg-fake-gpus.yaml"],
  321. args = ["--yaml-dir=tuned_examples/pg"]
  322. )
  323. # PPO
  324. py_test(
  325. name = "learning_tests_cartpole_ppo",
  326. main = "tests/run_regression_tests.py",
  327. tags = ["team:ml", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete"],
  328. size = "large",
  329. srcs = ["tests/run_regression_tests.py"],
  330. data = ["tuned_examples/ppo/cartpole-ppo.yaml"],
  331. args = ["--yaml-dir=tuned_examples/ppo"]
  332. )
  333. py_test(
  334. name = "learning_tests_pendulum_ppo",
  335. main = "tests/run_regression_tests.py",
  336. tags = ["team:ml", "learning_tests", "learning_tests_pendulum", "learning_tests_continuous"],
  337. size = "large",
  338. srcs = ["tests/run_regression_tests.py"],
  339. data = ["tuned_examples/ppo/pendulum-ppo.yaml"],
  340. args = ["--yaml-dir=tuned_examples/ppo"]
  341. )
  342. py_test(
  343. name = "learning_tests_transformed_actions_pendulum_ppo",
  344. main = "tests/run_regression_tests.py",
  345. tags = ["team:ml", "learning_tests", "learning_tests_pendulum", "learning_tests_continuous"],
  346. size = "large",
  347. srcs = ["tests/run_regression_tests.py"],
  348. data = ["tuned_examples/ppo/pendulum-transformed-actions-ppo.yaml"],
  349. args = ["--yaml-dir=tuned_examples/ppo"]
  350. )
  351. py_test(
  352. name = "learning_tests_repeat_after_me_ppo",
  353. main = "tests/run_regression_tests.py",
  354. tags = ["team:ml", "learning_tests", "learning_tests_discrete"],
  355. size = "large",
  356. srcs = ["tests/run_regression_tests.py"],
  357. data = ["tuned_examples/ppo/repeatafterme-ppo-lstm.yaml"],
  358. args = ["--yaml-dir=tuned_examples/ppo"]
  359. )
  360. py_test(
  361. name = "learning_cartpole_ppo_fake_gpus",
  362. main = "tests/run_regression_tests.py",
  363. tags = ["team:ml", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete", "fake_gpus"],
  364. size = "large",
  365. srcs = ["tests/run_regression_tests.py"],
  366. data = ["tuned_examples/ppo/cartpole-ppo-fake-gpus.yaml"],
  367. args = ["--yaml-dir=tuned_examples/ppo"]
  368. )
  369. # R2D2
  370. py_test(
  371. name = "learning_tests_stateless_cartpole_r2d2",
  372. main = "tests/run_regression_tests.py",
  373. tags = ["team:ml", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete"],
  374. size = "large",
  375. srcs = ["tests/run_regression_tests.py"],
  376. data = ["tuned_examples/dqn/stateless-cartpole-r2d2.yaml"],
  377. args = ["--yaml-dir=tuned_examples/dqn"]
  378. )
  379. py_test(
  380. name = "learning_stateless_cartpole_r2d2_fake_gpus",
  381. main = "tests/run_regression_tests.py",
  382. tags = ["team:ml", "learning_tests", "learning_tests_cartpole", "fake_gpus"],
  383. size = "large",
  384. srcs = ["tests/run_regression_tests.py"],
  385. data = ["tuned_examples/dqn/stateless-cartpole-r2d2-fake-gpus.yaml"],
  386. args = ["--yaml-dir=tuned_examples/dqn"]
  387. )
  388. # SAC
  389. py_test(
  390. name = "learning_tests_cartpole_sac",
  391. main = "tests/run_regression_tests.py",
  392. tags = ["team:ml", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete"],
  393. size = "large",
  394. srcs = ["tests/run_regression_tests.py"],
  395. data = ["tuned_examples/sac/cartpole-sac.yaml"],
  396. args = ["--yaml-dir=tuned_examples/sac"]
  397. )
  398. py_test(
  399. name = "learning_tests_cartpole_continuous_pybullet_sac",
  400. main = "tests/run_regression_tests.py",
  401. tags = ["team:ml", "learning_tests", "learning_tests_cartpole", "learning_tests_continuous"],
  402. size = "large",
  403. srcs = ["tests/run_regression_tests.py"],
  404. data = ["tuned_examples/sac/cartpole-continuous-pybullet-sac.yaml"],
  405. args = ["--yaml-dir=tuned_examples/sac"]
  406. )
  407. py_test(
  408. name = "learning_tests_pendulum_sac",
  409. main = "tests/run_regression_tests.py",
  410. tags = ["team:ml", "learning_tests", "learning_tests_pendulum", "learning_tests_continuous", "flaky"],
  411. size = "large",
  412. srcs = ["tests/run_regression_tests.py"],
  413. data = ["tuned_examples/sac/pendulum-sac.yaml"],
  414. args = ["--yaml-dir=tuned_examples/sac"]
  415. )
  416. py_test(
  417. name = "learning_tests_transformed_actions_pendulum_sac",
  418. main = "tests/run_regression_tests.py",
  419. tags = ["team:ml", "learning_tests", "learning_tests_pendulum", "learning_tests_continuous"],
  420. size = "large",
  421. srcs = ["tests/run_regression_tests.py"],
  422. data = ["tuned_examples/sac/pendulum-transformed-actions-sac.yaml"],
  423. args = ["--yaml-dir=tuned_examples/sac"]
  424. )
  425. py_test(
  426. name = "learning_pendulum_sac_fake_gpus",
  427. main = "tests/run_regression_tests.py",
  428. tags = ["team:ml", "learning_tests", "learning_tests_pendulum", "learning_tests_continuous", "fake_gpus"],
  429. size = "large",
  430. srcs = ["tests/run_regression_tests.py"],
  431. data = ["tuned_examples/sac/pendulum-sac-fake-gpus.yaml"],
  432. args = ["--yaml-dir=tuned_examples/sac"]
  433. )
  434. # TD3
  435. py_test(
  436. name = "learning_tests_pendulum_td3",
  437. main = "tests/run_regression_tests.py",
  438. tags = ["team:ml", "learning_tests", "learning_tests_pendulum", "learning_tests_continuous"],
  439. size = "large",
  440. srcs = ["tests/run_regression_tests.py"],
  441. data = ["tuned_examples/ddpg/pendulum-td3.yaml"],
  442. args = ["--yaml-dir=tuned_examples/ddpg"]
  443. )
  444. # --------------------------------------------------------------------
  445. # Agents (Compilation, Losses, simple agent functionality tests)
  446. # rllib/agents/
  447. #
  448. # Tag: trainers_dir
  449. # --------------------------------------------------------------------
  450. # Generic (all Trainers)
  451. py_test(
  452. name = "test_trainer",
  453. tags = ["team:ml", "trainers_dir"],
  454. size = "large",
  455. srcs = ["agents/tests/test_trainer.py"]
  456. )
  457. # A2/3CTrainer
  458. py_test(
  459. name = "test_a2c",
  460. tags = ["team:ml", "trainers_dir"],
  461. size = "large",
  462. srcs = ["agents/a3c/tests/test_a2c.py"]
  463. )
  464. py_test(
  465. name = "test_a3c",
  466. tags = ["team:ml", "trainers_dir"],
  467. size = "medium",
  468. srcs = ["agents/a3c/tests/test_a3c.py"]
  469. )
  470. # APEXTrainer (DQN)
  471. py_test(
  472. name = "test_apex_dqn",
  473. tags = ["team:ml", "trainers_dir"],
  474. size = "large",
  475. srcs = ["agents/dqn/tests/test_apex_dqn.py"]
  476. )
  477. # APEXDDPGTrainer
  478. py_test(
  479. name = "test_apex_ddpg",
  480. tags = ["team:ml", "trainers_dir"],
  481. size = "medium",
  482. srcs = ["agents/ddpg/tests/test_apex_ddpg.py"]
  483. )
  484. # ARS
  485. py_test(
  486. name = "test_ars",
  487. tags = ["team:ml", "trainers_dir"],
  488. size = "medium",
  489. srcs = ["agents/ars/tests/test_ars.py"]
  490. )
  491. # CQLTrainer
  492. py_test(
  493. name = "test_cql",
  494. tags = ["team:ml", "trainers_dir"],
  495. size = "medium",
  496. srcs = ["agents/cql/tests/test_cql.py"]
  497. )
  498. # DDPGTrainer
  499. py_test(
  500. name = "test_ddpg",
  501. tags = ["team:ml", "trainers_dir"],
  502. size = "large",
  503. srcs = ["agents/ddpg/tests/test_ddpg.py"]
  504. )
  505. # DQNTrainer
  506. py_test(
  507. name = "test_dqn",
  508. tags = ["team:ml", "trainers_dir"],
  509. size = "large",
  510. srcs = ["agents/dqn/tests/test_dqn.py"]
  511. )
  512. # Dreamer
  513. py_test(
  514. name = "test_dreamer",
  515. tags = ["team:ml", "trainers_dir"],
  516. size = "small",
  517. srcs = ["agents/dreamer/tests/test_dreamer.py"]
  518. )
  519. # ES
  520. py_test(
  521. name = "test_es",
  522. tags = ["team:ml", "trainers_dir"],
  523. size = "medium",
  524. srcs = ["agents/es/tests/test_es.py"]
  525. )
  526. # IMPALA
  527. py_test(
  528. name = "test_impala",
  529. tags = ["team:ml", "trainers_dir"],
  530. size = "large",
  531. srcs = ["agents/impala/tests/test_impala.py"]
  532. )
  533. py_test(
  534. name = "test_vtrace",
  535. tags = ["team:ml", "trainers_dir"],
  536. size = "small",
  537. srcs = ["agents/impala/tests/test_vtrace.py"]
  538. )
  539. # MARWILTrainer
  540. py_test(
  541. name = "test_marwil",
  542. tags = ["team:ml", "trainers_dir"],
  543. size = "large",
  544. # Include the json data file.
  545. data = ["tests/data/cartpole/large.json"],
  546. srcs = ["agents/marwil/tests/test_marwil.py"]
  547. )
  548. # BCTrainer (sub-type of MARWIL)
  549. py_test(
  550. name = "test_bc",
  551. tags = ["team:ml", "trainers_dir"],
  552. size = "large",
  553. # Include the json data file.
  554. data = ["tests/data/cartpole/large.json"],
  555. srcs = ["agents/marwil/tests/test_bc.py"]
  556. )
  557. # MAMLTrainer
  558. py_test(
  559. name = "test_maml",
  560. tags = ["team:ml", "trainers_dir"],
  561. size = "medium",
  562. srcs = ["agents/maml/tests/test_maml.py"]
  563. )
  564. # MBMPOTrainer
  565. py_test(
  566. name = "test_mbmpo",
  567. tags = ["team:ml", "trainers_dir"],
  568. size = "medium",
  569. srcs = ["agents/mbmpo/tests/test_mbmpo.py"]
  570. )
  571. # PGTrainer
  572. py_test(
  573. name = "test_pg",
  574. tags = ["team:ml", "trainers_dir"],
  575. size = "medium",
  576. srcs = ["agents/pg/tests/test_pg.py"]
  577. )
  578. # PPOTrainer
  579. py_test(
  580. name = "test_ppo",
  581. tags = ["team:ml", "trainers_dir"],
  582. size = "large",
  583. srcs = ["agents/ppo/tests/test_ppo.py"]
  584. )
  585. # PPO: DDPPO
  586. py_test(
  587. name = "test_ddppo",
  588. tags = ["team:ml", "trainers_dir", "flaky"],
  589. size = "medium",
  590. srcs = ["agents/ppo/tests/test_ddppo.py"]
  591. )
  592. # PPO: APPO
  593. py_test(
  594. name = "test_appo",
  595. tags = ["team:ml", "trainers_dir"],
  596. size = "large",
  597. srcs = ["agents/ppo/tests/test_appo.py"]
  598. )
  599. # QMixTrainer
  600. py_test(
  601. name = "test_qmix",
  602. tags = ["team:ml", "trainers_dir"],
  603. size = "medium",
  604. srcs = ["agents/qmix/tests/test_qmix.py"]
  605. )
  606. # R2D2Trainer
  607. py_test(
  608. name = "test_r2d2",
  609. tags = ["team:ml", "trainers_dir"],
  610. size = "large",
  611. srcs = ["agents/dqn/tests/test_r2d2.py"]
  612. )
  613. # RNNSACTrainer
  614. py_test(
  615. name = "test_rnnsac",
  616. tags = ["team:ml", "trainers_dir"],
  617. size = "medium",
  618. srcs = ["agents/sac/tests/test_rnnsac.py"]
  619. )
  620. # SACTrainer
  621. py_test(
  622. name = "test_sac",
  623. tags = ["team:ml", "trainers_dir"],
  624. size = "large",
  625. srcs = ["agents/sac/tests/test_sac.py"]
  626. )
  627. # SimpleQTrainer
  628. py_test(
  629. name = "test_simple_q",
  630. tags = ["team:ml", "trainers_dir"],
  631. size = "medium",
  632. srcs = ["agents/dqn/tests/test_simple_q.py"]
  633. )
  634. # TD3Trainer
  635. py_test(
  636. name = "test_td3",
  637. tags = ["team:ml", "trainers_dir"],
  638. size = "large",
  639. srcs = ["agents/ddpg/tests/test_td3.py"]
  640. )
  641. # --------------------------------------------------------------------
  642. # contrib Agents
  643. # --------------------------------------------------------------------
  644. py_test(
  645. name = "random_agent",
  646. tags = ["team:ml", "trainers_dir"],
  647. main = "contrib/random_agent/random_agent.py",
  648. size = "small",
  649. srcs = ["contrib/random_agent/random_agent.py"]
  650. )
  651. py_test(
  652. name = "alpha_zero_cartpole",
  653. tags = ["team:ml", "trainers_dir"],
  654. main = "contrib/alpha_zero/examples/train_cartpole.py",
  655. size = "large",
  656. srcs = ["contrib/alpha_zero/examples/train_cartpole.py"],
  657. args = ["--training-iteration=1", "--num-workers=2", "--ray-num-cpus=3"]
  658. )
  659. # --------------------------------------------------------------------
  660. # Agents (quick training test iterations via `rllib train`)
  661. #
  662. # Tag: quick_train
  663. #
  664. # These are not(!) learning tests, we only test here compilation and
  665. # support for certain envs, spaces, setups.
  666. # Should all be very short tests with label: "quick_train".
  667. # --------------------------------------------------------------------
  668. # A2C/A3C
  669. py_test(
  670. name = "test_a3c_torch_pong_deterministic_v4",
  671. main = "train.py", srcs = ["train.py"],
  672. tags = ["team:ml", "quick_train"],
  673. args = [
  674. "--env", "PongDeterministic-v4",
  675. "--run", "A3C",
  676. "--stop", "'{\"training_iteration\": 1}'",
  677. "--config", "'{\"framework\": \"torch\", \"num_workers\": 2, \"sample_async\": false, \"model\": {\"use_lstm\": false, \"grayscale\": true, \"zero_mean\": false, \"dim\": 84}, \"preprocessor_pref\": \"rllib\"}'",
  678. "--ray-num-cpus", "4"
  679. ]
  680. )
  681. py_test(
  682. name = "test_a3c_tf_pong_ram_v4",
  683. main = "train.py", srcs = ["train.py"],
  684. tags = ["team:ml", "quick_train"],
  685. args = [
  686. "--env", "Pong-ram-v4",
  687. "--run", "A3C",
  688. "--stop", "'{\"training_iteration\": 1}'",
  689. "--config", "'{\"framework\": \"tf\", \"num_workers\": 2}'",
  690. "--ray-num-cpus", "4"
  691. ]
  692. )
  693. # DDPG/APEX-DDPG/TD3
  694. py_test(
  695. name = "test_ddpg_mountaincar_continuous_v0_num_workers_0",
  696. main = "train.py", srcs = ["train.py"],
  697. tags = ["team:ml", "quick_train"],
  698. args = [
  699. "--env", "MountainCarContinuous-v0",
  700. "--run", "DDPG",
  701. "--stop", "'{\"training_iteration\": 1}'",
  702. "--config", "'{\"framework\": \"tf\", \"num_workers\": 0}'"
  703. ]
  704. )
  705. py_test(
  706. name = "test_ddpg_mountaincar_continuous_v0_num_workers_1",
  707. main = "train.py", srcs = ["train.py"],
  708. tags = ["team:ml", "quick_train"],
  709. args = [
  710. "--env", "MountainCarContinuous-v0",
  711. "--run", "DDPG",
  712. "--stop", "'{\"training_iteration\": 1}'",
  713. "--config", "'{\"framework\": \"tf\", \"num_workers\": 1}'"
  714. ]
  715. )
  716. py_test(
  717. name = "test_apex_ddpg_pendulum_v0_complete_episode_batches",
  718. main = "train.py", srcs = ["train.py"],
  719. tags = ["team:ml", "quick_train"],
  720. args = [
  721. "--env", "Pendulum-v1",
  722. "--run", "APEX_DDPG",
  723. "--stop", "'{\"training_iteration\": 1}'",
  724. "--config", "'{\"framework\": \"tf\", \"num_workers\": 2, \"optimizer\": {\"num_replay_buffer_shards\": 1}, \"learning_starts\": 100, \"min_iter_time_s\": 1, \"batch_mode\": \"complete_episodes\"}'",
  725. "--ray-num-cpus", "4",
  726. ]
  727. )
  728. # DQN/APEX
  729. py_test(
  730. name = "test_dqn_frozenlake_v1",
  731. main = "train.py", srcs = ["train.py"],
  732. size = "small",
  733. tags = ["team:ml", "quick_train"],
  734. args = [
  735. "--env", "FrozenLake-v1",
  736. "--run", "DQN",
  737. "--config", "'{\"framework\": \"tf\"}'",
  738. "--stop", "'{\"training_iteration\": 1}'"
  739. ]
  740. )
  741. py_test(
  742. name = "test_dqn_cartpole_v0_no_dueling",
  743. main = "train.py", srcs = ["train.py"],
  744. size = "small",
  745. tags = ["team:ml", "quick_train"],
  746. args = [
  747. "--env", "CartPole-v0",
  748. "--run", "DQN",
  749. "--stop", "'{\"training_iteration\": 1}'",
  750. "--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\"}}'"
  751. ]
  752. )
  753. py_test(
  754. name = "test_dqn_cartpole_v0",
  755. main = "train.py", srcs = ["train.py"],
  756. tags = ["team:ml", "quick_train"],
  757. args = [
  758. "--env", "CartPole-v0",
  759. "--run", "DQN",
  760. "--stop", "'{\"training_iteration\": 1}'",
  761. "--config", "'{\"framework\": \"tf\", \"num_workers\": 2}'",
  762. "--ray-num-cpus", "4"
  763. ]
  764. )
  765. py_test(
  766. name = "test_dqn_cartpole_v0_with_offline_input_and_softq",
  767. main = "train.py", srcs = ["train.py"],
  768. tags = ["team:ml", "quick_train", "external_files"],
  769. size = "small",
  770. # Include the json data file.
  771. data = ["tests/data/cartpole/small.json"],
  772. args = [
  773. "--env", "CartPole-v0",
  774. "--run", "DQN",
  775. "--stop", "'{\"training_iteration\": 1}'",
  776. "--config", "'{\"framework\": \"tf\", \"input\": \"tests/data/cartpole\", \"learning_starts\": 0, \"input_evaluation\": [\"wis\", \"is\"], \"exploration_config\": {\"type\": \"SoftQ\"}}'"
  777. ]
  778. )
  779. py_test(
  780. name = "test_dqn_pong_deterministic_v4",
  781. main = "train.py", srcs = ["train.py"],
  782. tags = ["team:ml", "quick_train"],
  783. args = [
  784. "--env", "PongDeterministic-v4",
  785. "--run", "DQN",
  786. "--stop", "'{\"training_iteration\": 1}'",
  787. "--config", "'{\"framework\": \"tf\", \"lr\": 1e-4, \"exploration_config\": {\"epsilon_timesteps\": 200000, \"final_epsilon\": 0.01}, \"buffer_size\": 10000, \"rollout_fragment_length\": 4, \"learning_starts\": 10000, \"target_network_update_freq\": 1000, \"gamma\": 0.99, \"prioritized_replay\": true}'"
  788. ]
  789. )
  790. # IMPALA
  791. py_test(
  792. name = "test_impala_buffers_2",
  793. main = "train.py", srcs = ["train.py"],
  794. tags = ["team:ml", "quick_train"],
  795. args = [
  796. "--env", "CartPole-v0",
  797. "--run", "IMPALA",
  798. "--stop", "'{\"training_iteration\": 1}'",
  799. "--config", "'{\"framework\": \"tf\", \"num_gpus\": 0, \"num_workers\": 2, \"min_iter_time_s\": 1, \"num_multi_gpu_tower_stacks\": 2, \"replay_buffer_num_slots\": 100, \"replay_proportion\": 1.0}'",
  800. "--ray-num-cpus", "4",
  801. ]
  802. )
  803. py_test(
  804. name = "test_impala_cartpole_v0_buffers_2_lstm",
  805. main = "train.py",
  806. srcs = ["train.py"],
  807. tags = ["team:ml", "quick_train"],
  808. args = [
  809. "--env", "CartPole-v0",
  810. "--run", "IMPALA",
  811. "--stop", "'{\"training_iteration\": 1}'",
  812. "--config", "'{\"framework\": \"tf\", \"num_gpus\": 0, \"num_workers\": 2, \"min_iter_time_s\": 1, \"num_multi_gpu_tower_stacks\": 2, \"replay_buffer_num_slots\": 100, \"replay_proportion\": 1.0, \"model\": {\"use_lstm\": true}}'",
  813. "--ray-num-cpus", "4",
  814. ]
  815. )
  816. py_test(
  817. name = "test_impala_pong_deterministic_v4_40k_ts_1G_obj_store",
  818. main = "train.py",
  819. srcs = ["train.py"],
  820. tags = ["team:ml", "quick_train"],
  821. size = "medium",
  822. args = [
  823. "--env", "PongDeterministic-v4",
  824. "--run", "IMPALA",
  825. "--stop", "'{\"timesteps_total\": 30000}'",
  826. "--ray-object-store-memory=1000000000",
  827. "--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}'"
  828. ]
  829. )
  830. # PG
  831. py_test(
  832. name = "test_pg_tf_cartpole_v0_lstm",
  833. main = "train.py", srcs = ["train.py"],
  834. tags = ["team:ml", "quick_train"],
  835. args = [
  836. "--env", "CartPole-v0",
  837. "--run", "PG",
  838. "--stop", "'{\"training_iteration\": 1}'",
  839. "--config", "'{\"framework\": \"tf\", \"rollout_fragment_length\": 500, \"num_workers\": 1, \"model\": {\"use_lstm\": true, \"max_seq_len\": 100}}'"
  840. ]
  841. )
  842. py_test(
  843. name = "test_pg_tf_cartpole_v0_multi_envs_per_worker",
  844. main = "train.py", srcs = ["train.py"],
  845. size = "small",
  846. tags = ["team:ml", "quick_train"],
  847. args = [
  848. "--env", "CartPole-v0",
  849. "--run", "PG",
  850. "--stop", "'{\"training_iteration\": 1}'",
  851. "--config", "'{\"framework\": \"tf\", \"rollout_fragment_length\": 500, \"num_workers\": 1, \"num_envs_per_worker\": 10}'"
  852. ]
  853. )
  854. py_test(
  855. name = "test_pg_tf_pong_v0",
  856. main = "train.py", srcs = ["train.py"],
  857. tags = ["team:ml", "quick_train"],
  858. args = [
  859. "--env", "Pong-v0",
  860. "--run", "PG",
  861. "--stop", "'{\"training_iteration\": 1}'",
  862. "--config", "'{\"framework\": \"tf\", \"rollout_fragment_length\": 500, \"num_workers\": 1}'"
  863. ]
  864. )
  865. # PPO/APPO
  866. py_test(
  867. name = "test_ppo_tf_cartpole_v1_complete_episode_batches",
  868. main = "train.py", srcs = ["train.py"],
  869. tags = ["team:ml", "quick_train"],
  870. args = [
  871. "--env", "CartPole-v1",
  872. "--run", "PPO",
  873. "--stop", "'{\"training_iteration\": 1}'",
  874. "--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\"}'"
  875. ]
  876. )
  877. py_test(
  878. name = "test_ppo_tf_cartpole_v1_remote_worker_envs",
  879. main = "train.py", srcs = ["train.py"],
  880. tags = ["team:ml", "quick_train"],
  881. args = [
  882. "--env", "CartPole-v1",
  883. "--run", "PPO",
  884. "--stop", "'{\"training_iteration\": 1}'",
  885. "--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}'"
  886. ]
  887. )
  888. py_test(
  889. name = "test_ppo_tf_cartpole_v1_remote_worker_envs_b",
  890. main = "train.py", srcs = ["train.py"],
  891. tags = ["team:ml", "quick_train"],
  892. args = [
  893. "--env", "CartPole-v1",
  894. "--run", "PPO",
  895. "--stop", "'{\"training_iteration\": 2}'",
  896. "--config", "'{\"framework\": \"tf\", \"remote_worker_envs\": true, \"num_envs_per_worker\": 2, \"num_workers\": 1, \"train_batch_size\": 100, \"sgd_minibatch_size\": 50}'"
  897. ]
  898. )
  899. py_test(
  900. name = "test_appo_tf_pendulum_v1_no_gpus",
  901. main = "train.py", srcs = ["train.py"],
  902. tags = ["team:ml", "quick_train"],
  903. args = [
  904. "--env", "Pendulum-v1",
  905. "--run", "APPO",
  906. "--stop", "'{\"training_iteration\": 1}'",
  907. "--config", "'{\"framework\": \"tf\", \"num_workers\": 2, \"num_gpus\": 0}'",
  908. "--ray-num-cpus", "4"
  909. ]
  910. )
  911. # --------------------------------------------------------------------
  912. # Env tests
  913. # rllib/env/
  914. #
  915. # Tag: env
  916. # --------------------------------------------------------------------
  917. sh_test(
  918. name = "env/tests/test_local_inference_cartpole",
  919. tags = ["team:ml", "env"],
  920. size = "medium",
  921. srcs = ["env/tests/test_policy_client_server_setup.sh"],
  922. args = ["local", "cartpole"],
  923. data = glob(["examples/serving/*.py"]),
  924. )
  925. sh_test(
  926. name = "env/tests/test_remote_inference_cartpole",
  927. tags = ["team:ml", "env"],
  928. size = "medium",
  929. srcs = ["env/tests/test_policy_client_server_setup.sh"],
  930. args = ["remote", "cartpole"],
  931. data = glob(["examples/serving/*.py"]),
  932. )
  933. sh_test(
  934. name = "env/tests/test_local_inference_unity3d",
  935. tags = ["team:ml", "env"],
  936. size = "medium",
  937. srcs = ["env/tests/test_policy_client_server_setup.sh"],
  938. args = ["local", "unity3d"],
  939. data = glob(["examples/serving/*.py"]),
  940. )
  941. sh_test(
  942. name = "env/tests/test_remote_inference_unity3d",
  943. tags = ["team:ml", "env"],
  944. size = "medium",
  945. srcs = ["env/tests/test_policy_client_server_setup.sh"],
  946. args = ["remote", "unity3d"],
  947. data = glob(["examples/serving/*.py"]),
  948. )
  949. py_test(
  950. name = "env/tests/test_record_env_wrapper",
  951. tags = ["team:ml", "env"],
  952. size = "small",
  953. srcs = ["env/tests/test_record_env_wrapper.py"]
  954. )
  955. py_test(
  956. name = "env/tests/test_remote_worker_envs",
  957. tags = ["team:ml", "env"],
  958. size = "medium",
  959. srcs = ["env/tests/test_remote_worker_envs.py"]
  960. )
  961. py_test(
  962. name = "env/wrappers/tests/test_unity3d_env",
  963. tags = ["team:ml", "env"],
  964. size = "small",
  965. srcs = ["env/wrappers/tests/test_unity3d_env.py"]
  966. )
  967. py_test(
  968. name = "env/wrappers/tests/test_recsim_wrapper",
  969. tags = ["team:ml", "env"],
  970. size = "small",
  971. srcs = ["env/wrappers/tests/test_recsim_wrapper.py"]
  972. )
  973. py_test(
  974. name = "env/wrappers/tests/test_exception_wrapper",
  975. tags = ["team:ml", "env"],
  976. size = "small",
  977. srcs = ["env/wrappers/tests/test_exception_wrapper.py"]
  978. )
  979. py_test(
  980. name = "env/wrappers/tests/test_group_agents_wrapper",
  981. tags = ["team:ml", "env"],
  982. size = "small",
  983. srcs = ["env/wrappers/tests/test_group_agents_wrapper.py"]
  984. )
  985. # --------------------------------------------------------------------
  986. # Evaluation components
  987. # rllib/evaluation/
  988. #
  989. # Tag: evaluation
  990. # --------------------------------------------------------------------
  991. py_test(
  992. name = "evaluation/tests/test_postprocessing",
  993. tags = ["team:ml", "evaluation"],
  994. size = "small",
  995. srcs = ["evaluation/tests/test_postprocessing.py"]
  996. )
  997. py_test(
  998. name = "evaluation/tests/test_rollout_worker",
  999. tags = ["team:ml", "evaluation"],
  1000. size = "medium",
  1001. srcs = ["evaluation/tests/test_rollout_worker.py"]
  1002. )
  1003. py_test(
  1004. name = "evaluation/tests/test_trajectory_view_api",
  1005. tags = ["team:ml", "evaluation"],
  1006. size = "medium",
  1007. srcs = ["evaluation/tests/test_trajectory_view_api.py"]
  1008. )
  1009. py_test(
  1010. name = "evaluation/tests/test_episode",
  1011. tags = ["team:ml", "evaluation"],
  1012. size = "small",
  1013. srcs = ["evaluation/tests/test_episode.py"]
  1014. )
  1015. # --------------------------------------------------------------------
  1016. # Optimizers and Memories
  1017. # rllib/execution/
  1018. #
  1019. # Tag: execution
  1020. # --------------------------------------------------------------------
  1021. py_test(
  1022. name = "test_segment_tree",
  1023. tags = ["team:ml", "execution"],
  1024. size = "small",
  1025. srcs = ["execution/tests/test_segment_tree.py"]
  1026. )
  1027. py_test(
  1028. name = "test_prioritized_replay_buffer",
  1029. tags = ["team:ml", "execution"],
  1030. size = "small",
  1031. srcs = ["execution/tests/test_prioritized_replay_buffer.py"]
  1032. )
  1033. # --------------------------------------------------------------------
  1034. # Models and Distributions
  1035. # rllib/models/
  1036. #
  1037. # Tag: models
  1038. # --------------------------------------------------------------------
  1039. py_test(
  1040. name = "test_convtranspose2d_stack",
  1041. tags = ["team:ml", "models"],
  1042. size = "small",
  1043. data = glob(["tests/data/images/obstacle_tower.png"]),
  1044. srcs = ["models/tests/test_convtranspose2d_stack.py"]
  1045. )
  1046. py_test(
  1047. name = "test_distributions",
  1048. tags = ["team:ml", "models", "flaky"],
  1049. size = "medium",
  1050. srcs = ["models/tests/test_distributions.py"]
  1051. )
  1052. py_test(
  1053. name = "test_models",
  1054. tags = ["team:ml", "models"],
  1055. size = "medium",
  1056. srcs = ["models/tests/test_models.py"]
  1057. )
  1058. py_test(
  1059. name = "test_preprocessors",
  1060. tags = ["team:ml", "models"],
  1061. size = "medium",
  1062. srcs = ["models/tests/test_preprocessors.py"]
  1063. )
  1064. # --------------------------------------------------------------------
  1065. # Policies
  1066. # rllib/policy/
  1067. #
  1068. # Tag: policy
  1069. # --------------------------------------------------------------------
  1070. py_test(
  1071. name = "policy/tests/test_compute_log_likelihoods",
  1072. tags = ["team:ml", "policy"],
  1073. size = "medium",
  1074. srcs = ["policy/tests/test_compute_log_likelihoods.py"]
  1075. )
  1076. py_test(
  1077. name = "policy/tests/test_policy",
  1078. tags = ["team:ml", "policy"],
  1079. size = "medium",
  1080. srcs = ["policy/tests/test_policy.py"]
  1081. )
  1082. py_test(
  1083. name = "policy/tests/test_sample_batch",
  1084. tags = ["team:ml", "policy"],
  1085. size = "small",
  1086. srcs = ["policy/tests/test_sample_batch.py"]
  1087. )
  1088. # --------------------------------------------------------------------
  1089. # Utils:
  1090. # rllib/utils/
  1091. #
  1092. # Tag: utils
  1093. # --------------------------------------------------------------------
  1094. py_test(
  1095. name = "test_curiosity",
  1096. tags = ["team:ml", "utils", "flaky"],
  1097. size = "large",
  1098. srcs = ["utils/exploration/tests/test_curiosity.py"]
  1099. )
  1100. py_test(
  1101. name = "test_explorations",
  1102. tags = ["team:ml", "utils"],
  1103. size = "large",
  1104. srcs = ["utils/exploration/tests/test_explorations.py"]
  1105. )
  1106. py_test(
  1107. name = "test_parameter_noise",
  1108. tags = ["team:ml", "utils"],
  1109. size = "medium",
  1110. srcs = ["utils/exploration/tests/test_parameter_noise.py"]
  1111. )
  1112. # Schedules
  1113. py_test(
  1114. name = "test_schedules",
  1115. tags = ["team:ml", "utils"],
  1116. size = "small",
  1117. srcs = ["utils/schedules/tests/test_schedules.py"]
  1118. )
  1119. py_test(
  1120. name = "test_framework_agnostic_components",
  1121. tags = ["team:ml", "utils"],
  1122. size = "small",
  1123. data = glob(["utils/tests/**"]),
  1124. srcs = ["utils/tests/test_framework_agnostic_components.py"]
  1125. )
  1126. # Spaces/Space utils.
  1127. py_test(
  1128. name = "test_space_utils",
  1129. tags = ["team:ml", "utils"],
  1130. size = "large",
  1131. srcs = ["utils/spaces/tests/test_space_utils.py"]
  1132. )
  1133. # TaskPool
  1134. py_test(
  1135. name = "test_taskpool",
  1136. tags = ["team:ml", "utils"],
  1137. size = "small",
  1138. srcs = ["utils/tests/test_taskpool.py"]
  1139. )
  1140. # --------------------------------------------------------------------
  1141. # rllib/tests/ directory
  1142. #
  1143. # Tag: tests_dir, tests_dir_[A-Z]
  1144. #
  1145. # NOTE: Add tests alphabetically into this list and make sure, to tag
  1146. # it correctly by its starting letter, e.g. tags=["tests_dir", "tests_dir_A"]
  1147. # for `tests/test_all_stuff.py`.
  1148. # --------------------------------------------------------------------
  1149. py_test(
  1150. name = "tests/test_attention_net_learning",
  1151. tags = ["team:ml", "tests_dir", "tests_dir_A"],
  1152. size = "large",
  1153. srcs = ["tests/test_attention_net_learning.py"]
  1154. )
  1155. py_test(
  1156. name = "tests/test_catalog",
  1157. tags = ["team:ml", "tests_dir", "tests_dir_C"],
  1158. size = "medium",
  1159. srcs = ["tests/test_catalog.py"]
  1160. )
  1161. py_test(
  1162. name = "tests/test_checkpoint_restore_pg",
  1163. main = "tests/test_checkpoint_restore.py",
  1164. tags = ["team:ml", "tests_dir", "tests_dir_C"],
  1165. size = "large",
  1166. srcs = ["tests/test_checkpoint_restore.py"],
  1167. args = ["TestCheckpointRestorePG"]
  1168. )
  1169. py_test(
  1170. name = "tests/test_checkpoint_restore_off_policy",
  1171. main = "tests/test_checkpoint_restore.py",
  1172. tags = ["team:ml", "tests_dir", "tests_dir_C"],
  1173. size = "large",
  1174. srcs = ["tests/test_checkpoint_restore.py"],
  1175. args = ["TestCheckpointRestoreOffPolicy"]
  1176. )
  1177. py_test(
  1178. name = "tests/test_checkpoint_restore_evolution_algos",
  1179. main = "tests/test_checkpoint_restore.py",
  1180. tags = ["team:ml", "tests_dir", "tests_dir_C"],
  1181. size = "large",
  1182. srcs = ["tests/test_checkpoint_restore.py"],
  1183. args = ["TestCheckpointRestoreEvolutionAlgos"]
  1184. )
  1185. py_test(
  1186. name = "tests/test_dependency_tf",
  1187. tags = ["team:ml", "tests_dir", "tests_dir_D"],
  1188. size = "small",
  1189. srcs = ["tests/test_dependency_tf.py"]
  1190. )
  1191. py_test(
  1192. name = "tests/test_dependency_torch",
  1193. tags = ["team:ml", "tests_dir", "tests_dir_D"],
  1194. size = "small",
  1195. srcs = ["tests/test_dependency_torch.py"]
  1196. )
  1197. py_test(
  1198. name = "tests/test_eager_support_pg",
  1199. main = "tests/test_eager_support.py",
  1200. tags = ["team:ml", "tests_dir", "tests_dir_E"],
  1201. size = "large",
  1202. srcs = ["tests/test_eager_support.py"],
  1203. args = ["TestEagerSupportPG"]
  1204. )
  1205. py_test(
  1206. name = "tests/test_eager_support_off_policy",
  1207. main = "tests/test_eager_support.py",
  1208. tags = ["team:ml", "tests_dir", "tests_dir_E"],
  1209. size = "large",
  1210. srcs = ["tests/test_eager_support.py"],
  1211. args = ["TestEagerSupportOffPolicy"]
  1212. )
  1213. py_test(
  1214. name = "test_env_with_subprocess",
  1215. main = "tests/test_env_with_subprocess.py",
  1216. tags = ["team:ml", "tests_dir", "tests_dir_E"],
  1217. size = "medium",
  1218. srcs = ["tests/test_env_with_subprocess.py"]
  1219. )
  1220. py_test(
  1221. name = "tests/test_exec_api",
  1222. tags = ["team:ml", "tests_dir", "tests_dir_E"],
  1223. size = "medium",
  1224. srcs = ["tests/test_exec_api.py"]
  1225. )
  1226. py_test(
  1227. name = "tests/test_execution",
  1228. tags = ["team:ml", "tests_dir", "tests_dir_E"],
  1229. size = "medium",
  1230. srcs = ["tests/test_execution.py"]
  1231. )
  1232. py_test(
  1233. name = "tests/test_export",
  1234. tags = ["team:ml", "tests_dir", "tests_dir_E"],
  1235. size = "medium",
  1236. srcs = ["tests/test_export.py"]
  1237. )
  1238. py_test(
  1239. name = "tests/test_external_env",
  1240. tags = ["team:ml", "tests_dir", "tests_dir_E"],
  1241. size = "large",
  1242. srcs = ["tests/test_external_env.py"]
  1243. )
  1244. py_test(
  1245. name = "tests/test_external_multi_agent_env",
  1246. tags = ["team:ml", "tests_dir", "tests_dir_E"],
  1247. size = "medium",
  1248. srcs = ["tests/test_external_multi_agent_env.py"]
  1249. )
  1250. py_test(
  1251. name = "tests/test_filters",
  1252. tags = ["team:ml", "tests_dir", "tests_dir_F"],
  1253. size = "small",
  1254. srcs = ["tests/test_filters.py"]
  1255. )
  1256. py_test(
  1257. name = "tests/test_gpus",
  1258. tags = ["team:ml", "tests_dir", "tests_dir_G"],
  1259. size = "large",
  1260. srcs = ["tests/test_gpus.py"]
  1261. )
  1262. py_test(
  1263. name = "tests/test_ignore_worker_failure",
  1264. tags = ["team:ml", "tests_dir", "tests_dir_I"],
  1265. size = "large",
  1266. srcs = ["tests/test_ignore_worker_failure.py"]
  1267. )
  1268. py_test(
  1269. name = "tests/test_io",
  1270. tags = ["team:ml", "tests_dir", "tests_dir_I"],
  1271. size = "large",
  1272. srcs = ["tests/test_io.py"]
  1273. )
  1274. py_test(
  1275. name = "tests/test_local",
  1276. tags = ["team:ml", "tests_dir", "tests_dir_L"],
  1277. size = "medium",
  1278. srcs = ["tests/test_local.py"]
  1279. )
  1280. py_test(
  1281. name = "tests/test_lstm",
  1282. tags = ["team:ml", "tests_dir", "tests_dir_L"],
  1283. size = "medium",
  1284. srcs = ["tests/test_lstm.py"]
  1285. )
  1286. py_test(
  1287. name = "tests/test_model_imports",
  1288. tags = ["team:ml", "tests_dir", "tests_dir_M", "model_imports"],
  1289. size = "medium",
  1290. data = glob(["tests/data/model_weights/**"]),
  1291. srcs = ["tests/test_model_imports.py"]
  1292. )
  1293. py_test(
  1294. name = "tests/test_multi_agent_env",
  1295. tags = ["team:ml", "tests_dir", "tests_dir_M"],
  1296. size = "medium",
  1297. srcs = ["tests/test_multi_agent_env.py"]
  1298. )
  1299. py_test(
  1300. name = "tests/test_multi_agent_pendulum",
  1301. tags = ["team:ml", "tests_dir", "tests_dir_M"],
  1302. size = "large",
  1303. srcs = ["tests/test_multi_agent_pendulum.py"]
  1304. )
  1305. py_test(
  1306. name = "tests/test_nested_observation_spaces",
  1307. main = "tests/test_nested_observation_spaces.py",
  1308. tags = ["team:ml", "tests_dir", "tests_dir_N"],
  1309. size = "medium",
  1310. srcs = ["tests/test_nested_observation_spaces.py"]
  1311. )
  1312. py_test(
  1313. name = "tests/test_pettingzoo_env",
  1314. tags = ["team:ml", "tests_dir", "tests_dir_P"],
  1315. size = "medium",
  1316. srcs = ["tests/test_pettingzoo_env.py"]
  1317. )
  1318. py_test(
  1319. name = "tests/test_placement_groups",
  1320. tags = ["team:ml", "tests_dir", "tests_dir_P"],
  1321. size = "medium",
  1322. srcs = ["tests/test_placement_groups.py"]
  1323. )
  1324. py_test(
  1325. name = "tests/test_ray_client",
  1326. tags = ["team:ml", "tests_dir", "tests_dir_R"],
  1327. size = "large",
  1328. srcs = ["tests/test_ray_client.py"]
  1329. )
  1330. py_test(
  1331. name = "tests/test_reproducibility",
  1332. tags = ["team:ml", "tests_dir", "tests_dir_R"],
  1333. size = "medium",
  1334. srcs = ["tests/test_reproducibility.py"]
  1335. )
  1336. # Test [train|evaluate].py scripts (w/o confirming evaluation performance).
  1337. py_test(
  1338. name = "test_rllib_evaluate_1",
  1339. main = "tests/test_rllib_train_and_evaluate.py",
  1340. tags = ["team:ml", "tests_dir", "tests_dir_R"],
  1341. size = "large",
  1342. data = ["train.py", "evaluate.py"],
  1343. srcs = ["tests/test_rllib_train_and_evaluate.py"],
  1344. args = ["TestEvaluate1"]
  1345. )
  1346. py_test(
  1347. name = "test_rllib_evaluate_2",
  1348. main = "tests/test_rllib_train_and_evaluate.py",
  1349. tags = ["team:ml", "tests_dir", "tests_dir_R"],
  1350. size = "large",
  1351. data = ["train.py", "evaluate.py"],
  1352. srcs = ["tests/test_rllib_train_and_evaluate.py"],
  1353. args = ["TestEvaluate2"]
  1354. )
  1355. py_test(
  1356. name = "test_rllib_evaluate_3",
  1357. main = "tests/test_rllib_train_and_evaluate.py",
  1358. tags = ["team:ml", "tests_dir", "tests_dir_R"],
  1359. size = "large",
  1360. data = ["train.py", "evaluate.py"],
  1361. srcs = ["tests/test_rllib_train_and_evaluate.py"],
  1362. args = ["TestEvaluate3"]
  1363. )
  1364. py_test(
  1365. name = "test_rllib_evaluate_4",
  1366. main = "tests/test_rllib_train_and_evaluate.py",
  1367. tags = ["team:ml", "tests_dir", "tests_dir_R"],
  1368. size = "large",
  1369. data = ["train.py", "evaluate.py"],
  1370. srcs = ["tests/test_rllib_train_and_evaluate.py"],
  1371. args = ["TestEvaluate4"]
  1372. )
  1373. # Test [train|evaluate].py scripts (and confirm `rllib evaluate` performance is same
  1374. # as the final one from the `rllib train` run).
  1375. py_test(
  1376. name = "test_rllib_train_and_evaluate",
  1377. main = "tests/test_rllib_train_and_evaluate.py",
  1378. tags = ["team:ml", "tests_dir", "tests_dir_R"],
  1379. size = "large",
  1380. data = ["train.py", "evaluate.py"],
  1381. srcs = ["tests/test_rllib_train_and_evaluate.py"],
  1382. args = ["TestTrainAndEvaluate"]
  1383. )
  1384. py_test(
  1385. name = "tests/test_supported_multi_agent_pg",
  1386. main = "tests/test_supported_multi_agent.py",
  1387. tags = ["team:ml", "tests_dir", "tests_dir_S"],
  1388. size = "medium",
  1389. srcs = ["tests/test_supported_multi_agent.py"],
  1390. args = ["TestSupportedMultiAgentPG"]
  1391. )
  1392. py_test(
  1393. name = "tests/test_supported_multi_agent_off_policy",
  1394. main = "tests/test_supported_multi_agent.py",
  1395. tags = ["team:ml", "tests_dir", "tests_dir_S"],
  1396. size = "medium",
  1397. srcs = ["tests/test_supported_multi_agent.py"],
  1398. args = ["TestSupportedMultiAgentOffPolicy"]
  1399. )
  1400. py_test(
  1401. name = "tests/test_supported_spaces_pg",
  1402. main = "tests/test_supported_spaces.py",
  1403. tags = ["team:ml", "tests_dir", "tests_dir_S"],
  1404. size = "large",
  1405. srcs = ["tests/test_supported_spaces.py"],
  1406. args = ["TestSupportedSpacesPG"]
  1407. )
  1408. py_test(
  1409. name = "tests/test_supported_spaces_off_policy",
  1410. main = "tests/test_supported_spaces.py",
  1411. tags = ["team:ml", "tests_dir", "tests_dir_S"],
  1412. size = "medium",
  1413. srcs = ["tests/test_supported_spaces.py"],
  1414. args = ["TestSupportedSpacesOffPolicy"]
  1415. )
  1416. py_test(
  1417. name = "tests/test_supported_spaces_evolution_algos",
  1418. main = "tests/test_supported_spaces.py",
  1419. tags = ["team:ml", "tests_dir", "tests_dir_S", "flaky"],
  1420. size = "large",
  1421. srcs = ["tests/test_supported_spaces.py"],
  1422. args = ["TestSupportedSpacesEvolutionAlgos"]
  1423. )
  1424. py_test(
  1425. name = "tests/test_timesteps",
  1426. tags = ["team:ml", "tests_dir", "tests_dir_T"],
  1427. size = "small",
  1428. srcs = ["tests/test_timesteps.py"]
  1429. )
  1430. # --------------------------------------------------------------------
  1431. # examples/ directory (excluding examples/documentation/...)
  1432. #
  1433. # Tag: examples, examples_[A-Z]
  1434. #
  1435. # NOTE: Add tests alphabetically into this list and make sure, to tag
  1436. # it correctly by its starting letter, e.g. tags=["examples", "examples_A"]
  1437. # for `examples/all_stuff.py`.
  1438. # --------------------------------------------------------------------
  1439. py_test(
  1440. name = "examples/action_masking_tf",
  1441. main = "examples/action_masking.py",
  1442. tags = ["team:ml", "examples", "examples_A"],
  1443. size = "medium",
  1444. srcs = ["examples/action_masking.py"],
  1445. args = ["--stop-iter=2"]
  1446. )
  1447. py_test(
  1448. name = "examples/action_masking_torch",
  1449. main = "examples/action_masking.py",
  1450. tags = ["team:ml", "examples", "examples_A"],
  1451. size = "medium",
  1452. srcs = ["examples/action_masking.py"],
  1453. args = ["--stop-iter=2", "--framework=torch"]
  1454. )
  1455. py_test(
  1456. name = "examples/attention_net_tf",
  1457. main = "examples/attention_net.py",
  1458. tags = ["team:ml", "examples", "examples_A"],
  1459. size = "medium",
  1460. srcs = ["examples/attention_net.py"],
  1461. args = ["--as-test", "--stop-reward=60"]
  1462. )
  1463. py_test(
  1464. name = "examples/attention_net_torch",
  1465. main = "examples/attention_net.py",
  1466. tags = ["team:ml", "examples", "examples_A"],
  1467. size = "medium",
  1468. srcs = ["examples/attention_net.py"],
  1469. args = ["--as-test", "--stop-reward=60", "--framework torch"]
  1470. )
  1471. py_test(
  1472. name = "examples/autoregressive_action_dist_tf",
  1473. main = "examples/autoregressive_action_dist.py",
  1474. tags = ["team:ml", "examples", "examples_A"],
  1475. size = "medium",
  1476. srcs = ["examples/autoregressive_action_dist.py"],
  1477. args = ["--as-test", "--stop-reward=150", "--num-cpus=4"]
  1478. )
  1479. py_test(
  1480. name = "examples/autoregressive_action_dist_torch",
  1481. main = "examples/autoregressive_action_dist.py",
  1482. tags = ["team:ml", "examples", "examples_A"],
  1483. size = "medium",
  1484. srcs = ["examples/autoregressive_action_dist.py"],
  1485. args = ["--as-test", "--framework=torch", "--stop-reward=150", "--num-cpus=4"]
  1486. )
  1487. py_test(
  1488. name = "examples/bare_metal_policy_with_custom_view_reqs",
  1489. main = "examples/bare_metal_policy_with_custom_view_reqs.py",
  1490. tags = ["team:ml", "examples", "examples_B"],
  1491. size = "medium",
  1492. srcs = ["examples/bare_metal_policy_with_custom_view_reqs.py"],
  1493. )
  1494. py_test(
  1495. name = "examples/batch_norm_model_ppo_tf",
  1496. main = "examples/batch_norm_model.py",
  1497. tags = ["team:ml", "examples", "examples_B"],
  1498. size = "medium",
  1499. srcs = ["examples/batch_norm_model.py"],
  1500. args = ["--as-test", "--run=PPO", "--stop-reward=80"]
  1501. )
  1502. py_test(
  1503. name = "examples/batch_norm_model_ppo_torch",
  1504. main = "examples/batch_norm_model.py",
  1505. tags = ["team:ml", "examples", "examples_B"],
  1506. size = "medium",
  1507. srcs = ["examples/batch_norm_model.py"],
  1508. args = ["--as-test", "--framework=torch", "--run=PPO", "--stop-reward=80"]
  1509. )
  1510. py_test(
  1511. name = "examples/batch_norm_model_dqn_tf",
  1512. main = "examples/batch_norm_model.py",
  1513. tags = ["team:ml", "examples", "examples_B"],
  1514. size = "medium",
  1515. srcs = ["examples/batch_norm_model.py"],
  1516. args = ["--as-test", "--run=DQN", "--stop-reward=70"]
  1517. )
  1518. py_test(
  1519. name = "examples/batch_norm_model_dqn_torch",
  1520. main = "examples/batch_norm_model.py",
  1521. tags = ["team:ml", "examples", "examples_B"],
  1522. size = "large", # DQN learns much slower with BatchNorm.
  1523. srcs = ["examples/batch_norm_model.py"],
  1524. args = ["--as-test", "--framework=torch", "--run=DQN", "--stop-reward=70"]
  1525. )
  1526. py_test(
  1527. name = "examples/batch_norm_model_ddpg_tf",
  1528. main = "examples/batch_norm_model.py",
  1529. tags = ["team:ml", "examples", "examples_B"],
  1530. size = "medium",
  1531. srcs = ["examples/batch_norm_model.py"],
  1532. args = ["--run=DDPG", "--stop-iters=1"]
  1533. )
  1534. py_test(
  1535. name = "examples/batch_norm_model_ddpg_torch",
  1536. main = "examples/batch_norm_model.py",
  1537. tags = ["team:ml", "examples", "examples_B"],
  1538. size = "medium",
  1539. srcs = ["examples/batch_norm_model.py"],
  1540. args = ["--framework=torch", "--run=DDPG", "--stop-iters=1"]
  1541. )
  1542. py_test(
  1543. name = "examples/cartpole_lstm_impala_tf",
  1544. main = "examples/cartpole_lstm.py",
  1545. tags = ["team:ml", "examples", "examples_C", "examples_C_AtoT"],
  1546. size = "medium",
  1547. srcs = ["examples/cartpole_lstm.py"],
  1548. args = ["--as-test", "--run=IMPALA", "--stop-reward=40", "--num-cpus=4"]
  1549. )
  1550. py_test(
  1551. name = "examples/cartpole_lstm_impala_torch",
  1552. main = "examples/cartpole_lstm.py",
  1553. tags = ["team:ml", "examples", "examples_C", "examples_C_AtoT"],
  1554. size = "medium",
  1555. srcs = ["examples/cartpole_lstm.py"],
  1556. args = ["--as-test", "--framework=torch", "--run=IMPALA", "--stop-reward=40", "--num-cpus=4"]
  1557. )
  1558. py_test(
  1559. name = "examples/cartpole_lstm_ppo_tf",
  1560. main = "examples/cartpole_lstm.py",
  1561. tags = ["team:ml", "examples", "examples_C", "examples_C_AtoT"],
  1562. size = "medium",
  1563. srcs = ["examples/cartpole_lstm.py"],
  1564. args = ["--as-test", "--framework=tf", "--run=PPO", "--stop-reward=40", "--num-cpus=4"]
  1565. )
  1566. py_test(
  1567. name = "examples/cartpole_lstm_ppo_tf2",
  1568. main = "examples/cartpole_lstm.py",
  1569. tags = ["team:ml", "examples", "examples_C", "examples_C_AtoT"],
  1570. size = "large",
  1571. srcs = ["examples/cartpole_lstm.py"],
  1572. args = ["--as-test", "--framework=tf2", "--run=PPO", "--stop-reward=40", "--num-cpus=4"]
  1573. )
  1574. py_test(
  1575. name = "examples/cartpole_lstm_ppo_torch",
  1576. main = "examples/cartpole_lstm.py",
  1577. tags = ["team:ml", "examples", "examples_C", "examples_C_AtoT"],
  1578. size = "medium",
  1579. srcs = ["examples/cartpole_lstm.py"],
  1580. args = ["--as-test", "--framework=torch", "--run=PPO", "--stop-reward=40", "--num-cpus=4"]
  1581. )
  1582. py_test(
  1583. name = "examples/cartpole_lstm_ppo_tf_with_prev_a_and_r",
  1584. main = "examples/cartpole_lstm.py",
  1585. tags = ["team:ml", "examples", "examples_C", "examples_C_AtoT"],
  1586. size = "medium",
  1587. srcs = ["examples/cartpole_lstm.py"],
  1588. args = ["--as-test", "--run=PPO", "--stop-reward=40", "--use-prev-action", "--use-prev-reward", "--num-cpus=4"]
  1589. )
  1590. py_test(
  1591. name = "examples/centralized_critic_tf",
  1592. main = "examples/centralized_critic.py",
  1593. tags = ["team:ml", "examples", "examples_C", "examples_C_AtoT"],
  1594. size = "large",
  1595. srcs = ["examples/centralized_critic.py"],
  1596. args = ["--as-test", "--stop-reward=7.2"]
  1597. )
  1598. py_test(
  1599. name = "examples/centralized_critic_torch",
  1600. main = "examples/centralized_critic.py",
  1601. tags = ["team:ml", "examples", "examples_C", "examples_C_AtoT"],
  1602. size = "large",
  1603. srcs = ["examples/centralized_critic.py"],
  1604. args = ["--as-test", "--framework=torch", "--stop-reward=7.2"]
  1605. )
  1606. py_test(
  1607. name = "examples/centralized_critic_2_tf",
  1608. main = "examples/centralized_critic_2.py",
  1609. tags = ["team:ml", "examples", "examples_C", "examples_C_AtoT"],
  1610. size = "medium",
  1611. srcs = ["examples/centralized_critic_2.py"],
  1612. args = ["--as-test", "--stop-reward=6.0"]
  1613. )
  1614. py_test(
  1615. name = "examples/centralized_critic_2_torch",
  1616. main = "examples/centralized_critic_2.py",
  1617. tags = ["team:ml", "examples", "examples_C", "examples_C_AtoT"],
  1618. size = "medium",
  1619. srcs = ["examples/centralized_critic_2.py"],
  1620. args = ["--as-test", "--framework=torch", "--stop-reward=6.0"]
  1621. )
  1622. py_test(
  1623. name = "examples/checkpoint_by_custom_criteria",
  1624. main = "examples/checkpoint_by_custom_criteria.py",
  1625. tags = ["team:ml", "examples", "examples_C", "examples_C_AtoT"],
  1626. size = "medium",
  1627. srcs = ["examples/checkpoint_by_custom_criteria.py"],
  1628. args = ["--stop-iters=3 --num-cpus=3"]
  1629. )
  1630. py_test(
  1631. name = "examples/complex_struct_space_tf",
  1632. main = "examples/complex_struct_space.py",
  1633. tags = ["team:ml", "examples", "examples_C", "examples_C_AtoT"],
  1634. size = "medium",
  1635. srcs = ["examples/complex_struct_space.py"],
  1636. args = ["--framework=tf"],
  1637. )
  1638. py_test(
  1639. name = "examples/complex_struct_space_tf_eager",
  1640. main = "examples/complex_struct_space.py",
  1641. tags = ["team:ml", "examples", "examples_C", "examples_C_AtoT"],
  1642. size = "medium",
  1643. srcs = ["examples/complex_struct_space.py"],
  1644. args = ["--framework=tfe"],
  1645. )
  1646. py_test(
  1647. name = "examples/complex_struct_space_torch",
  1648. main = "examples/complex_struct_space.py",
  1649. tags = ["team:ml", "examples", "examples_C", "examples_C_AtoT"],
  1650. size = "medium",
  1651. srcs = ["examples/complex_struct_space.py"],
  1652. args = ["--framework=torch"],
  1653. )
  1654. py_test(
  1655. name = "examples/curriculum_learning",
  1656. main = "examples/curriculum_learning.py",
  1657. tags = ["team:ml", "examples", "examples_C", "examples_C_UtoZ"],
  1658. size = "medium",
  1659. srcs = ["examples/curriculum_learning.py"],
  1660. args = ["--as-test", "--stop-reward=800.0"]
  1661. )
  1662. py_test(
  1663. name = "examples/custom_env_tf",
  1664. main = "examples/custom_env.py",
  1665. tags = ["team:ml", "examples", "examples_C", "examples_C_UtoZ"],
  1666. size = "medium",
  1667. srcs = ["examples/custom_env.py"],
  1668. args = ["--as-test"]
  1669. )
  1670. py_test(
  1671. name = "examples/custom_env_torch",
  1672. main = "examples/custom_env.py",
  1673. tags = ["team:ml", "examples", "examples_C", "examples_C_UtoZ"],
  1674. size = "large",
  1675. srcs = ["examples/custom_env.py"],
  1676. args = ["--as-test", "--framework=torch"]
  1677. )
  1678. py_test(
  1679. name = "examples/custom_eval_tf",
  1680. main = "examples/custom_eval.py",
  1681. tags = ["team:ml", "examples", "examples_C", "examples_C_UtoZ"],
  1682. size = "medium",
  1683. srcs = ["examples/custom_eval.py"],
  1684. args = ["--num-cpus=4", "--as-test"]
  1685. )
  1686. py_test(
  1687. name = "examples/custom_eval_torch",
  1688. main = "examples/custom_eval.py",
  1689. tags = ["team:ml", "examples", "examples_C", "examples_C_UtoZ"],
  1690. size = "medium",
  1691. srcs = ["examples/custom_eval.py"],
  1692. args = ["--num-cpus=4", "--as-test", "--framework=torch"]
  1693. )
  1694. py_test(
  1695. name = "examples/custom_experiment",
  1696. main = "examples/custom_experiment.py",
  1697. tags = ["team:ml", "examples", "examples_C", "examples_C_UtoZ"],
  1698. size = "medium",
  1699. srcs = ["examples/custom_experiment.py"],
  1700. args = ["--train-iterations=10"]
  1701. )
  1702. py_test(
  1703. name = "examples/custom_fast_model_tf",
  1704. main = "examples/custom_fast_model.py",
  1705. tags = ["team:ml", "examples", "examples_C", "examples_C_UtoZ"],
  1706. size = "medium",
  1707. srcs = ["examples/custom_fast_model.py"],
  1708. args = ["--stop-iters=1"]
  1709. )
  1710. py_test(
  1711. name = "examples/custom_fast_model_torch",
  1712. main = "examples/custom_fast_model.py",
  1713. tags = ["team:ml", "examples", "examples_C", "examples_C_UtoZ"],
  1714. size = "medium",
  1715. srcs = ["examples/custom_fast_model.py"],
  1716. args = ["--stop-iters=1", "--framework=torch"]
  1717. )
  1718. py_test(
  1719. name = "examples/custom_keras_model_a2c",
  1720. main = "examples/custom_keras_model.py",
  1721. tags = ["team:ml", "examples", "examples_C", "examples_C_UtoZ"],
  1722. size = "large",
  1723. srcs = ["examples/custom_keras_model.py"],
  1724. args = ["--run=A2C", "--stop=50", "--num-cpus=4"]
  1725. )
  1726. py_test(
  1727. name = "examples/custom_keras_model_dqn",
  1728. main = "examples/custom_keras_model.py",
  1729. tags = ["team:ml", "examples", "examples_C", "examples_C_UtoZ"],
  1730. size = "medium",
  1731. srcs = ["examples/custom_keras_model.py"],
  1732. args = ["--run=DQN", "--stop=50"]
  1733. )
  1734. py_test(
  1735. name = "examples/custom_keras_model_ppo",
  1736. main = "examples/custom_keras_model.py",
  1737. tags = ["team:ml", "examples", "examples_C", "examples_C_UtoZ"],
  1738. size = "medium",
  1739. srcs = ["examples/custom_keras_model.py"],
  1740. args = ["--run=PPO", "--stop=50", "--num-cpus=4"]
  1741. )
  1742. py_test(
  1743. name = "examples/custom_metrics_and_callbacks",
  1744. main = "examples/custom_metrics_and_callbacks.py",
  1745. tags = ["team:ml", "examples", "examples_C", "examples_C_UtoZ"],
  1746. size = "small",
  1747. srcs = ["examples/custom_metrics_and_callbacks.py"],
  1748. args = ["--stop-iters=2"]
  1749. )
  1750. py_test(
  1751. name = "examples/custom_metrics_and_callbacks_legacy",
  1752. main = "examples/custom_metrics_and_callbacks_legacy.py",
  1753. tags = ["team:ml", "examples", "examples_C", "examples_C_UtoZ"],
  1754. size = "small",
  1755. srcs = ["examples/custom_metrics_and_callbacks_legacy.py"],
  1756. args = ["--stop-iters=2"]
  1757. )
  1758. py_test(
  1759. name = "examples/custom_model_api_tf",
  1760. main = "examples/custom_model_api.py",
  1761. tags = ["team:ml", "examples", "examples_C", "examples_C_UtoZ"],
  1762. size = "small",
  1763. srcs = ["examples/custom_model_api.py"],
  1764. )
  1765. py_test(
  1766. name = "examples/custom_model_api_torch",
  1767. main = "examples/custom_model_api.py",
  1768. tags = ["team:ml", "examples", "examples_C", "examples_C_UtoZ"],
  1769. size = "small",
  1770. srcs = ["examples/custom_model_api.py"],
  1771. args = ["--framework=torch"],
  1772. )
  1773. py_test(
  1774. name = "examples/custom_model_loss_and_metrics_ppo_tf",
  1775. main = "examples/custom_model_loss_and_metrics.py",
  1776. tags = ["team:ml", "examples", "examples_C", "examples_C_UtoZ"],
  1777. size = "medium",
  1778. # Include the json data file.
  1779. data = ["tests/data/cartpole/small.json"],
  1780. srcs = ["examples/custom_model_loss_and_metrics.py"],
  1781. args = ["--run=PPO", "--stop-iters=1", "--input-files=tests/data/cartpole"]
  1782. )
  1783. py_test(
  1784. name = "examples/custom_model_loss_and_metrics_ppo_torch",
  1785. main = "examples/custom_model_loss_and_metrics.py",
  1786. tags = ["team:ml", "examples", "examples_C", "examples_C_UtoZ"],
  1787. size = "medium",
  1788. # Include the json data file.
  1789. data = ["tests/data/cartpole/small.json"],
  1790. srcs = ["examples/custom_model_loss_and_metrics.py"],
  1791. args = ["--run=PPO", "--framework=torch", "--stop-iters=1", "--input-files=tests/data/cartpole"]
  1792. )
  1793. py_test(
  1794. name = "examples/custom_model_loss_and_metrics_pg_tf",
  1795. main = "examples/custom_model_loss_and_metrics.py",
  1796. tags = ["team:ml", "examples", "examples_C", "examples_C_UtoZ"],
  1797. size = "medium",
  1798. # Include the json data file.
  1799. data = ["tests/data/cartpole/small.json"],
  1800. srcs = ["examples/custom_model_loss_and_metrics.py"],
  1801. args = ["--run=PG", "--stop-iters=1", "--input-files=tests/data/cartpole"]
  1802. )
  1803. py_test(
  1804. name = "examples/custom_model_loss_and_metrics_pg_torch",
  1805. main = "examples/custom_model_loss_and_metrics.py",
  1806. tags = ["team:ml", "examples", "examples_C", "examples_C_UtoZ"],
  1807. size = "medium",
  1808. # Include the json data file.
  1809. data = ["tests/data/cartpole/small.json"],
  1810. srcs = ["examples/custom_model_loss_and_metrics.py"],
  1811. args = ["--run=PG", "--framework=torch", "--stop-iters=1", "--input-files=tests/data/cartpole"]
  1812. )
  1813. py_test(
  1814. name = "examples/custom_observation_filters",
  1815. main = "examples/custom_observation_filters.py",
  1816. tags = ["team:ml", "examples", "examples_C", "examples_C_UtoZ"],
  1817. size = "medium",
  1818. srcs = ["examples/custom_observation_filters.py"],
  1819. args = ["--stop-iters=3"]
  1820. )
  1821. py_test(
  1822. name = "examples/custom_rnn_model_repeat_after_me_tf",
  1823. main = "examples/custom_rnn_model.py",
  1824. tags = ["team:ml", "examples", "examples_C", "examples_C_UtoZ"],
  1825. size = "medium",
  1826. srcs = ["examples/custom_rnn_model.py"],
  1827. args = ["--as-test", "--run=PPO", "--stop-reward=40", "--env=RepeatAfterMeEnv", "--num-cpus=4"]
  1828. )
  1829. py_test(
  1830. name = "examples/custom_rnn_model_repeat_initial_obs_tf",
  1831. main = "examples/custom_rnn_model.py",
  1832. tags = ["team:ml", "examples", "examples_C", "examples_C_UtoZ"],
  1833. size = "medium",
  1834. srcs = ["examples/custom_rnn_model.py"],
  1835. args = ["--as-test", "--run=PPO", "--stop-reward=10", "--stop-timesteps=300000", "--env=RepeatInitialObsEnv", "--num-cpus=4"]
  1836. )
  1837. py_test(
  1838. name = "examples/custom_rnn_model_repeat_after_me_torch",
  1839. main = "examples/custom_rnn_model.py",
  1840. tags = ["team:ml", "examples", "examples_C", "examples_C_UtoZ"],
  1841. size = "medium",
  1842. srcs = ["examples/custom_rnn_model.py"],
  1843. args = ["--as-test", "--framework=torch", "--run=PPO", "--stop-reward=40", "--env=RepeatAfterMeEnv", "--num-cpus=4"]
  1844. )
  1845. py_test(
  1846. name = "examples/custom_rnn_model_repeat_initial_obs_torch",
  1847. main = "examples/custom_rnn_model.py",
  1848. tags = ["team:ml", "examples", "examples_C", "examples_C_UtoZ"],
  1849. size = "medium",
  1850. srcs = ["examples/custom_rnn_model.py"],
  1851. args = ["--as-test", "--framework=torch", "--run=PPO", "--stop-reward=10", "--stop-timesteps=300000", "--env=RepeatInitialObsEnv", "--num-cpus=4"]
  1852. )
  1853. py_test(
  1854. name = "examples/custom_tf_policy",
  1855. tags = ["team:ml", "examples", "examples_C", "examples_C_UtoZ"],
  1856. size = "medium",
  1857. srcs = ["examples/custom_tf_policy.py"],
  1858. args = ["--stop-iters=2", "--num-cpus=4"]
  1859. )
  1860. py_test(
  1861. name = "examples/custom_torch_policy",
  1862. tags = ["team:ml", "examples", "examples_C", "examples_C_UtoZ"],
  1863. size = "medium",
  1864. srcs = ["examples/custom_torch_policy.py"],
  1865. args = ["--stop-iters=2", "--num-cpus=4"]
  1866. )
  1867. py_test(
  1868. name = "examples/custom_train_fn",
  1869. main = "examples/custom_train_fn.py",
  1870. tags = ["team:ml", "examples", "examples_C", "examples_C_UtoZ"],
  1871. size = "medium",
  1872. srcs = ["examples/custom_train_fn.py"],
  1873. )
  1874. py_test(
  1875. name = "examples/custom_vector_env_tf",
  1876. main = "examples/custom_vector_env.py",
  1877. tags = ["team:ml", "examples", "examples_C", "examples_C_UtoZ"],
  1878. size = "medium",
  1879. srcs = ["examples/custom_vector_env.py"],
  1880. args = ["--as-test", "--stop-reward=40.0"]
  1881. )
  1882. py_test(
  1883. name = "examples/custom_vector_env_torch",
  1884. main = "examples/custom_vector_env.py",
  1885. tags = ["team:ml", "examples", "examples_C", "examples_C_UtoZ"],
  1886. size = "medium",
  1887. srcs = ["examples/custom_vector_env.py"],
  1888. args = ["--as-test", "--framework=torch", "--stop-reward=40.0"]
  1889. )
  1890. py_test(
  1891. name = "examples/deterministic_training_tf",
  1892. main = "examples/deterministic_training.py",
  1893. tags = ["team:ml", "multi_gpu"],
  1894. size = "medium",
  1895. srcs = ["examples/deterministic_training.py"],
  1896. args = ["--as-test", "--stop-iters=1", "--framework=tf", "--num-gpus-trainer=1", "--num-gpus-per-worker=1"]
  1897. )
  1898. py_test(
  1899. name = "examples/deterministic_training_tf2",
  1900. main = "examples/deterministic_training.py",
  1901. tags = ["team:ml", "multi_gpu"],
  1902. size = "medium",
  1903. srcs = ["examples/deterministic_training.py"],
  1904. args = ["--as-test", "--stop-iters=1", "--framework=tf2", "--num-gpus-trainer=1", "--num-gpus-per-worker=1"]
  1905. )
  1906. py_test(
  1907. name = "examples/deterministic_training_torch",
  1908. main = "examples/deterministic_training.py",
  1909. tags = ["team:ml", "multi_gpu"],
  1910. size = "medium",
  1911. srcs = ["examples/deterministic_training.py"],
  1912. args = ["--as-test", "--stop-iters=1", "--framework=torch", "--num-gpus-trainer=1", "--num-gpus-per-worker=1"]
  1913. )
  1914. py_test(
  1915. name = "examples/eager_execution",
  1916. tags = ["team:ml", "examples", "examples_E"],
  1917. size = "small",
  1918. srcs = ["examples/eager_execution.py"],
  1919. args = ["--stop-iters=2"]
  1920. )
  1921. py_test(
  1922. name = "examples/export/cartpole_dqn_export",
  1923. main = "examples/export/cartpole_dqn_export.py",
  1924. tags = ["team:ml", "examples", "examples_E"],
  1925. size = "medium",
  1926. srcs = ["examples/export/cartpole_dqn_export.py"],
  1927. )
  1928. py_test(
  1929. name = "examples/export/onnx_tf",
  1930. main = "examples/export/onnx_tf.py",
  1931. tags = ["team:ml", "examples", "examples_E"],
  1932. size = "medium",
  1933. srcs = ["examples/export/onnx_tf.py"],
  1934. )
  1935. py_test(
  1936. name = "examples/export/onnx_torch",
  1937. main = "examples/export/onnx_torch.py",
  1938. tags = ["team:ml", "examples", "examples_E"],
  1939. size = "medium",
  1940. srcs = ["examples/export/onnx_torch.py"],
  1941. )
  1942. py_test(
  1943. name = "examples/fractional_gpus",
  1944. main = "examples/fractional_gpus.py",
  1945. tags = ["team:ml", "examples", "examples_F"],
  1946. size = "medium",
  1947. srcs = ["examples/fractional_gpus.py"],
  1948. args = ["--as-test", "--stop-reward=40.0", "--num-gpus=0", "--num-workers=0"]
  1949. )
  1950. py_test(
  1951. name = "examples/hierarchical_training_tf",
  1952. main = "examples/hierarchical_training.py",
  1953. tags = ["team:ml", "examples", "examples_H"],
  1954. size = "medium",
  1955. srcs = ["examples/hierarchical_training.py"],
  1956. args = ["--stop-reward=0.0"]
  1957. )
  1958. py_test(
  1959. name = "examples/hierarchical_training_torch",
  1960. main = "examples/hierarchical_training.py",
  1961. tags = ["team:ml", "examples", "examples_H"],
  1962. size = "medium",
  1963. srcs = ["examples/hierarchical_training.py"],
  1964. args = ["--framework=torch", "--stop-reward=0.0"]
  1965. )
  1966. # Do not run this test (MobileNetV2 is gigantic and takes forever for 1 iter).
  1967. # py_test(
  1968. # name = "examples/mobilenet_v2_with_lstm_tf",
  1969. # main = "examples/mobilenet_v2_with_lstm.py",
  1970. # tags = ["team:ml", "examples", "examples_M"],
  1971. # size = "small",
  1972. # srcs = ["examples/mobilenet_v2_with_lstm.py"]
  1973. # )
  1974. py_test(
  1975. name = "examples/multi_agent_cartpole_tf",
  1976. main = "examples/multi_agent_cartpole.py",
  1977. tags = ["team:ml", "examples", "examples_M"],
  1978. size = "medium",
  1979. srcs = ["examples/multi_agent_cartpole.py"],
  1980. args = ["--as-test", "--stop-reward=70.0", "--num-cpus=4"]
  1981. )
  1982. py_test(
  1983. name = "examples/multi_agent_cartpole_torch",
  1984. main = "examples/multi_agent_cartpole.py",
  1985. tags = ["team:ml", "examples", "examples_M"],
  1986. size = "medium",
  1987. srcs = ["examples/multi_agent_cartpole.py"],
  1988. args = ["--as-test", "--framework=torch", "--stop-reward=70.0", "--num-cpus=4"]
  1989. )
  1990. py_test(
  1991. name = "examples/multi_agent_custom_policy_tf",
  1992. main = "examples/multi_agent_custom_policy.py",
  1993. tags = ["team:ml", "examples", "examples_M"],
  1994. size = "small",
  1995. srcs = ["examples/multi_agent_custom_policy.py"],
  1996. args = ["--as-test", "--stop-reward=80"]
  1997. )
  1998. py_test(
  1999. name = "examples/multi_agent_custom_policy_torch",
  2000. main = "examples/multi_agent_custom_policy.py",
  2001. tags = ["team:ml", "examples", "examples_M"],
  2002. size = "small",
  2003. srcs = ["examples/multi_agent_custom_policy.py"],
  2004. args = ["--as-test", "--framework=torch", "--stop-reward=80"]
  2005. )
  2006. py_test(
  2007. name = "examples/multi_agent_two_trainers_tf",
  2008. main = "examples/multi_agent_two_trainers.py",
  2009. tags = ["team:ml", "examples", "examples_M"],
  2010. size = "medium",
  2011. srcs = ["examples/multi_agent_two_trainers.py"],
  2012. args = ["--as-test", "--stop-reward=70"]
  2013. )
  2014. py_test(
  2015. name = "examples/multi_agent_two_trainers_torch",
  2016. main = "examples/multi_agent_two_trainers.py",
  2017. tags = ["team:ml", "examples", "examples_M"],
  2018. size = "medium",
  2019. srcs = ["examples/multi_agent_two_trainers.py"],
  2020. args = ["--as-test", "--framework=torch", "--stop-reward=70"]
  2021. )
  2022. # Taking out this test for now: Mixed torch- and tf- policies within the same
  2023. # Trainer never really worked.
  2024. # py_test(
  2025. # name = "examples/multi_agent_two_trainers_mixed_torch_tf",
  2026. # main = "examples/multi_agent_two_trainers.py",
  2027. # tags = ["team:ml", "examples", "examples_M"],
  2028. # size = "medium",
  2029. # srcs = ["examples/multi_agent_two_trainers.py"],
  2030. # args = ["--as-test", "--mixed-torch-tf", "--stop-reward=70"]
  2031. # )
  2032. py_test(
  2033. name = "examples/nested_action_spaces_ppo_tf",
  2034. main = "examples/nested_action_spaces.py",
  2035. tags = ["team:ml", "examples", "examples_N"],
  2036. size = "medium",
  2037. srcs = ["examples/nested_action_spaces.py"],
  2038. args = ["--as-test", "--stop-reward=-600", "--run=PPO"]
  2039. )
  2040. py_test(
  2041. name = "examples/nested_action_spaces_ppo_torch",
  2042. main = "examples/nested_action_spaces.py",
  2043. tags = ["team:ml", "examples", "examples_N"],
  2044. size = "medium",
  2045. srcs = ["examples/nested_action_spaces.py"],
  2046. args = ["--as-test", "--framework=torch", "--stop-reward=-600", "--run=PPO"]
  2047. )
  2048. py_test(
  2049. name = "examples/parallel_evaluation_and_training_13_episodes_tf",
  2050. main = "examples/parallel_evaluation_and_training.py",
  2051. tags = ["team:ml", "examples", "examples_P"],
  2052. size = "medium",
  2053. srcs = ["examples/parallel_evaluation_and_training.py"],
  2054. args = ["--as-test", "--stop-reward=50.0", "--num-cpus=6", "--evaluation-num-episodes=13"]
  2055. )
  2056. py_test(
  2057. name = "examples/parallel_evaluation_and_training_auto_num_episodes_tf",
  2058. main = "examples/parallel_evaluation_and_training.py",
  2059. tags = ["team:ml", "examples", "examples_P"],
  2060. size = "medium",
  2061. srcs = ["examples/parallel_evaluation_and_training.py"],
  2062. args = ["--as-test", "--stop-reward=50.0", "--num-cpus=6", "--evaluation-num-episodes=auto"]
  2063. )
  2064. py_test(
  2065. name = "examples/parallel_evaluation_and_training_11_episodes_tf2",
  2066. main = "examples/parallel_evaluation_and_training.py",
  2067. tags = ["team:ml", "examples", "examples_P"],
  2068. size = "medium",
  2069. srcs = ["examples/parallel_evaluation_and_training.py"],
  2070. args = ["--as-test", "--framework=tf2", "--stop-reward=30.0", "--num-cpus=6", "--evaluation-num-episodes=11"]
  2071. )
  2072. py_test(
  2073. name = "examples/parallel_evaluation_and_training_14_episodes_torch",
  2074. main = "examples/parallel_evaluation_and_training.py",
  2075. tags = ["team:ml", "examples", "examples_P"],
  2076. size = "medium",
  2077. srcs = ["examples/parallel_evaluation_and_training.py"],
  2078. args = ["--as-test", "--framework=torch", "--stop-reward=30.0", "--num-cpus=6", "--evaluation-num-episodes=14"]
  2079. )
  2080. py_test(
  2081. name = "examples/parametric_actions_cartpole_pg_tf",
  2082. main = "examples/parametric_actions_cartpole.py",
  2083. tags = ["team:ml", "examples", "examples_P"],
  2084. size = "medium",
  2085. srcs = ["examples/parametric_actions_cartpole.py"],
  2086. args = ["--as-test", "--stop-reward=60.0", "--run=PG"]
  2087. )
  2088. py_test(
  2089. name = "examples/parametric_actions_cartpole_dqn_tf",
  2090. main = "examples/parametric_actions_cartpole.py",
  2091. tags = ["team:ml", "examples", "examples_P"],
  2092. size = "medium",
  2093. srcs = ["examples/parametric_actions_cartpole.py"],
  2094. args = ["--as-test", "--stop-reward=60.0", "--run=DQN"]
  2095. )
  2096. py_test(
  2097. name = "examples/parametric_actions_cartpole_pg_torch",
  2098. main = "examples/parametric_actions_cartpole.py",
  2099. tags = ["team:ml", "examples", "examples_P"],
  2100. size = "medium",
  2101. srcs = ["examples/parametric_actions_cartpole.py"],
  2102. args = ["--as-test", "--framework=torch", "--stop-reward=60.0", "--run=PG"]
  2103. )
  2104. py_test(
  2105. name = "examples/parametric_actions_cartpole_dqn_torch",
  2106. main = "examples/parametric_actions_cartpole.py",
  2107. tags = ["team:ml", "examples", "examples_P"],
  2108. size = "medium",
  2109. srcs = ["examples/parametric_actions_cartpole.py"],
  2110. args = ["--as-test", "--framework=torch", "--stop-reward=60.0", "--run=DQN"]
  2111. )
  2112. py_test(
  2113. name = "examples/parametric_actions_cartpole_embeddings_learnt_by_model",
  2114. main = "examples/parametric_actions_cartpole_embeddings_learnt_by_model.py",
  2115. tags = ["team:ml", "examples", "examples_P"],
  2116. size = "medium",
  2117. srcs = ["examples/parametric_actions_cartpole_embeddings_learnt_by_model.py"],
  2118. args = ["--as-test", "--stop-reward=80.0"]
  2119. )
  2120. py_test(
  2121. name = "examples/inference_and_serving/policy_inference_after_training_tf",
  2122. main = "examples/inference_and_serving/policy_inference_after_training.py",
  2123. tags = ["team:ml", "examples", "examples_P"],
  2124. size = "medium",
  2125. srcs = ["examples/inference_and_serving/policy_inference_after_training.py"],
  2126. args = ["--stop-iters=3", "--framework=tf"]
  2127. )
  2128. py_test(
  2129. name = "examples/inference_and_serving/policy_inference_after_training_torch",
  2130. main = "examples/inference_and_serving/policy_inference_after_training.py",
  2131. tags = ["team:ml", "examples", "examples_P"],
  2132. size = "medium",
  2133. srcs = ["examples/inference_and_serving/policy_inference_after_training.py"],
  2134. args = ["--stop-iters=3", "--framework=torch"]
  2135. )
  2136. py_test(
  2137. name = "examples/inference_and_serving/policy_inference_after_training_with_attention_tf",
  2138. main = "examples/inference_and_serving/policy_inference_after_training_with_attention.py",
  2139. tags = ["team:ml", "examples", "examples_P"],
  2140. size = "medium",
  2141. srcs = ["examples/inference_and_serving/policy_inference_after_training_with_attention.py"],
  2142. args = ["--stop-iters=2", "--framework=tf"]
  2143. )
  2144. py_test(
  2145. name = "examples/inference_and_serving/policy_inference_after_training_with_attention_torch",
  2146. main = "examples/inference_and_serving/policy_inference_after_training_with_attention.py",
  2147. tags = ["team:ml", "examples", "examples_P"],
  2148. size = "medium",
  2149. srcs = ["examples/inference_and_serving/policy_inference_after_training_with_attention.py"],
  2150. args = ["--stop-iters=2", "--framework=torch"]
  2151. )
  2152. py_test(
  2153. name = "examples/inference_and_serving/policy_inference_after_training_with_lstm_tf",
  2154. main = "examples/inference_and_serving/policy_inference_after_training_with_lstm.py",
  2155. tags = ["team:ml", "examples", "examples_P"],
  2156. size = "medium",
  2157. srcs = ["examples/inference_and_serving/policy_inference_after_training_with_lstm.py"],
  2158. args = ["--stop-iters=1", "--framework=tf"]
  2159. )
  2160. py_test(
  2161. name = "examples/inference_and_serving/policy_inference_after_training_with_lstm_torch",
  2162. main = "examples/inference_and_serving/policy_inference_after_training_with_lstm.py",
  2163. tags = ["team:ml", "examples", "examples_P"],
  2164. size = "medium",
  2165. srcs = ["examples/inference_and_serving/policy_inference_after_training_with_lstm.py"],
  2166. args = ["--stop-iters=1", "--framework=torch"]
  2167. )
  2168. py_test(
  2169. name = "examples/preprocessing_disabled_tf",
  2170. main = "examples/preprocessing_disabled.py",
  2171. tags = ["team:ml", "examples", "examples_P"],
  2172. size = "medium",
  2173. srcs = ["examples/preprocessing_disabled.py"],
  2174. args = ["--stop-iters=2"]
  2175. )
  2176. py_test(
  2177. name = "examples/preprocessing_disabled_torch",
  2178. main = "examples/preprocessing_disabled.py",
  2179. tags = ["team:ml", "examples", "examples_P"],
  2180. size = "medium",
  2181. srcs = ["examples/preprocessing_disabled.py"],
  2182. args = ["--framework=torch", "--stop-iters=2"]
  2183. )
  2184. py_test(
  2185. name = "examples/remote_envs_with_inference_done_on_main_node_tf",
  2186. main = "examples/remote_envs_with_inference_done_on_main_node.py",
  2187. tags = ["team:ml", "examples", "examples_R"],
  2188. size = "medium",
  2189. srcs = ["examples/remote_envs_with_inference_done_on_main_node.py"],
  2190. args = ["--as-test"],
  2191. )
  2192. py_test(
  2193. name = "examples/remote_envs_with_inference_done_on_main_node_torch",
  2194. main = "examples/remote_envs_with_inference_done_on_main_node.py",
  2195. tags = ["team:ml", "examples", "examples_R"],
  2196. size = "medium",
  2197. srcs = ["examples/remote_envs_with_inference_done_on_main_node.py"],
  2198. args = ["--as-test", "--framework=torch"],
  2199. )
  2200. py_test(
  2201. name = "examples/remote_vector_env_with_custom_api",
  2202. tags = ["team:ml", "examples", "examples_R"],
  2203. size = "medium",
  2204. srcs = ["examples/remote_vector_env_with_custom_api.py"],
  2205. args = ["--stop-iters=3"]
  2206. )
  2207. py_test(
  2208. name = "examples/restore_1_of_n_agents_from_checkpoint",
  2209. tags = ["team:ml", "examples", "examples_R"],
  2210. size = "medium",
  2211. srcs = ["examples/restore_1_of_n_agents_from_checkpoint.py"],
  2212. args = ["--pre-training-iters=1", "--stop-iters=1", "--num-cpus=4"]
  2213. )
  2214. py_test(
  2215. name = "examples/rnnsac_stateless_cartpole",
  2216. tags = ["team:ml", "gpu"],
  2217. size = "large",
  2218. srcs = ["examples/rnnsac_stateless_cartpole.py"]
  2219. )
  2220. py_test(
  2221. name = "examples/rollout_worker_custom_workflow",
  2222. tags = ["team:ml", "examples", "examples_R"],
  2223. size = "small",
  2224. srcs = ["examples/rollout_worker_custom_workflow.py"],
  2225. args = ["--num-cpus=4"]
  2226. )
  2227. py_test(
  2228. name = "examples/rock_paper_scissors_multiagent_tf",
  2229. main = "examples/rock_paper_scissors_multiagent.py",
  2230. tags = ["team:ml", "examples", "examples_R"],
  2231. size = "medium",
  2232. srcs = ["examples/rock_paper_scissors_multiagent.py"],
  2233. args = ["--as-test"],
  2234. )
  2235. py_test(
  2236. name = "examples/rock_paper_scissors_multiagent_torch",
  2237. main = "examples/rock_paper_scissors_multiagent.py",
  2238. tags = ["team:ml", "examples", "examples_R"],
  2239. size = "medium",
  2240. srcs = ["examples/rock_paper_scissors_multiagent.py"],
  2241. args = ["--as-test", "--framework=torch"],
  2242. )
  2243. # Deactivated for now due to open-spiel's dependency on an outdated
  2244. # tensorflow-probability version.
  2245. # py_test(
  2246. # name = "examples/self_play_with_open_spiel_connect_4_tf",
  2247. # main = "examples/self_play_with_open_spiel.py",
  2248. # tags = ["team:ml", "examples", "examples_S"],
  2249. # size = "medium",
  2250. # srcs = ["examples/self_play_with_open_spiel.py"],
  2251. # args = ["--framework=tf", "--env=connect_four", "--win-rate-threshold=0.6", "--stop-iters=2", "--num-episodes-human-play=0"]
  2252. # )
  2253. # py_test(
  2254. # name = "examples/self_play_with_open_spiel_connect_4_torch",
  2255. # main = "examples/self_play_with_open_spiel.py",
  2256. # tags = ["team:ml", "examples", "examples_S"],
  2257. # size = "medium",
  2258. # srcs = ["examples/self_play_with_open_spiel.py"],
  2259. # args = ["--framework=torch", "--env=connect_four", "--win-rate-threshold=0.6", "--stop-iters=2", "--num-episodes-human-play=0"]
  2260. # )
  2261. # py_test(
  2262. # name = "examples/self_play_league_based_with_open_spiel_markov_soccer_tf",
  2263. # main = "examples/self_play_league_based_with_open_spiel.py",
  2264. # tags = ["team:ml", "examples", "examples_S"],
  2265. # size = "medium",
  2266. # srcs = ["examples/self_play_league_based_with_open_spiel.py"],
  2267. # args = ["--framework=tf", "--env=markov_soccer", "--win-rate-threshold=0.6", "--stop-iters=2", "--num-episodes-human-play=0"]
  2268. # )
  2269. # py_test(
  2270. # name = "examples/self_play_league_based_with_open_spiel_markov_soccer_torch",
  2271. # main = "examples/self_play_league_based_with_open_spiel.py",
  2272. # tags = ["team:ml", "examples", "examples_S"],
  2273. # size = "medium",
  2274. # srcs = ["examples/self_play_league_based_with_open_spiel_markov_soccer.py"],
  2275. # args = ["--framework=torch", "--env=markov_soccer", "--win-rate-threshold=0.6", "--stop-iters=2", "--num-episodes-human-play=0"]
  2276. # )
  2277. py_test(
  2278. name = "examples/trajectory_view_api_tf",
  2279. main = "examples/trajectory_view_api.py",
  2280. tags = ["team:ml", "examples", "examples_T"],
  2281. size = "medium",
  2282. srcs = ["examples/trajectory_view_api.py"],
  2283. args = ["--as-test", "--framework=tf", "--stop-reward=100.0"]
  2284. )
  2285. py_test(
  2286. name = "examples/trajectory_view_api_torch",
  2287. main = "examples/trajectory_view_api.py",
  2288. tags = ["team:ml", "examples", "examples_T"],
  2289. size = "medium",
  2290. srcs = ["examples/trajectory_view_api.py"],
  2291. args = ["--as-test", "--framework=torch", "--stop-reward=100.0"]
  2292. )
  2293. py_test(
  2294. name = "examples/tune/framework",
  2295. main = "examples/tune/framework.py",
  2296. tags = ["team:ml", "examples", "examples_F"],
  2297. size = "medium",
  2298. srcs = ["examples/tune/framework.py"],
  2299. args = ["--smoke-test"]
  2300. )
  2301. py_test(
  2302. name = "examples/two_trainer_workflow_tf",
  2303. main = "examples/two_trainer_workflow.py",
  2304. tags = ["team:ml", "examples", "examples_T"],
  2305. size = "small",
  2306. srcs = ["examples/two_trainer_workflow.py"],
  2307. args = ["--as-test", "--stop-reward=100.0"]
  2308. )
  2309. py_test(
  2310. name = "examples/two_trainer_workflow_torch",
  2311. main = "examples/two_trainer_workflow.py",
  2312. tags = ["team:ml", "examples", "examples_T"],
  2313. size = "small",
  2314. srcs = ["examples/two_trainer_workflow.py"],
  2315. args = ["--as-test", "--torch", "--stop-reward=100.0"]
  2316. )
  2317. py_test(
  2318. name = "examples/two_trainer_workflow_mixed_torch_tf",
  2319. main = "examples/two_trainer_workflow.py",
  2320. tags = ["team:ml", "examples", "examples_T"],
  2321. size = "small",
  2322. srcs = ["examples/two_trainer_workflow.py"],
  2323. args = ["--as-test", "--mixed-torch-tf", "--stop-reward=100.0"]
  2324. )
  2325. py_test(
  2326. name = "examples/two_step_game_maddpg",
  2327. main = "examples/two_step_game.py",
  2328. tags = ["team:ml", "examples", "examples_T"],
  2329. size = "medium",
  2330. srcs = ["examples/two_step_game.py"],
  2331. args = ["--as-test", "--stop-reward=7.1", "--run=contrib/MADDPG"]
  2332. )
  2333. py_test(
  2334. name = "examples/two_step_game_pg_tf",
  2335. main = "examples/two_step_game.py",
  2336. tags = ["team:ml", "examples", "examples_T"],
  2337. size = "medium",
  2338. srcs = ["examples/two_step_game.py"],
  2339. args = ["--as-test", "--stop-reward=7", "--run=PG"]
  2340. )
  2341. py_test(
  2342. name = "examples/two_step_game_pg_torch",
  2343. main = "examples/two_step_game.py",
  2344. tags = ["team:ml", "examples", "examples_T"],
  2345. size = "medium",
  2346. srcs = ["examples/two_step_game.py"],
  2347. args = ["--as-test", "--framework=torch", "--stop-reward=7", "--run=PG"]
  2348. )
  2349. py_test(
  2350. name = "examples/two_step_game_qmix",
  2351. main = "examples/two_step_game.py",
  2352. tags = ["team:ml", "examples", "examples_T"],
  2353. size = "large",
  2354. srcs = ["examples/two_step_game.py"],
  2355. args = ["--as-test", "--framework=torch", "--stop-reward=7", "--run=QMIX"]
  2356. )
  2357. py_test(
  2358. name = "contrib/bandits/examples/lin_ts",
  2359. main = "contrib/bandits/examples/simple_context_bandit.py",
  2360. tags = ["team:ml", "examples", "examples_T"],
  2361. size = "small",
  2362. srcs = ["contrib/bandits/examples/simple_context_bandit.py"],
  2363. args = ["--as-test", "--stop-reward=10", "--run=contrib/LinTS"],
  2364. )
  2365. py_test(
  2366. name = "contrib/bandits/examples/lin_ucb",
  2367. main = "contrib/bandits/examples/simple_context_bandit.py",
  2368. tags = ["team:ml", "examples", "examples_U"],
  2369. size = "small",
  2370. srcs = ["contrib/bandits/examples/simple_context_bandit.py"],
  2371. args = ["--as-test", "--stop-reward=10", "--run=contrib/LinUCB"],
  2372. )
  2373. py_test(
  2374. name = "contrib/bandits/examples/lin_ts_train_wheel_env",
  2375. main = "contrib/bandits/examples/LinTS_train_wheel_env.py",
  2376. tags = ["team:ml", "examples", "examples_U"],
  2377. size = "small",
  2378. srcs = ["contrib/bandits/examples/LinTS_train_wheel_env.py"],
  2379. )
  2380. py_test(
  2381. name = "contrib/bandits/examples/tune_lin_ts_train_wheel_env",
  2382. main = "contrib/bandits/examples/tune_LinTS_train_wheel_env.py",
  2383. tags = ["team:ml", "examples", "examples_U"],
  2384. size = "small",
  2385. srcs = ["contrib/bandits/examples/tune_LinTS_train_wheel_env.py"],
  2386. )
  2387. py_test(
  2388. name = "contrib/bandits/examples/tune_lin_ucb_train_recommendation",
  2389. main = "contrib/bandits/examples/tune_LinUCB_train_recommendation.py",
  2390. tags = ["team:ml", "examples", "examples_U"],
  2391. size = "small",
  2392. srcs = ["contrib/bandits/examples/tune_LinUCB_train_recommendation.py"],
  2393. )
  2394. # --------------------------------------------------------------------
  2395. # examples/documentation directory
  2396. #
  2397. # Tag: documentation
  2398. #
  2399. # NOTE: Add tests alphabetically into this list.
  2400. # --------------------------------------------------------------------
  2401. py_test(
  2402. name = "examples/documentation/rllib_in_60s",
  2403. main = "examples/documentation/rllib_in_60s.py",
  2404. tags = ["team:ml", "documentation"],
  2405. size = "medium",
  2406. srcs = ["examples/documentation/rllib_in_60s.py"],
  2407. )