Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
960 lines (855 loc) · 43.9 KB
/
Copy pathpyproject.toml
File metadata and controls
960 lines (855 loc) · 43.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
################################################
# Project
################################################
[project]
name = "nemo-gym"
dynamic = [
"version",
"readme",
]
description = "NeMo Gym is a library for building reinforcement learning environments"
license = {file = "LICENSE"}
requires-python = ">=3.13.14"
authors = [{ name = "NVIDIA" }]
maintainers = [{ name = "NVIDIA" }]
keywords = [
"reinforcement-learning",
"RL",
"agent",
"agentic",
"LLM",
"large-language-models",
"training-data",
"rollout",
"trajectory",
"verification",
"verifier",
"reward",
"tool-calling",
"function-calling",
"data-collection",
"NeMo",
"NVIDIA",
]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
########################################
# Every dependency listed here contains the following information:
# 1. Why this dependency is here in NeMo Gym
# 2. When this dependency was last updated
# 3. The license of the dependencies.
#
# If you are adding or removing dependencies, please do your due diligence to update this information. PRs to main that modify dependencies will not be accepted unless this information is provided.
# The licenses of the below dependencies include: Apache 2.0, MIT, and BSD 3-Clause
#
# By design, most (if not all) dependencies are unfrozen here to be easier to consume. The core pieces we need are server infra like FastAPI, etc.
#
# Dependency management philosophy:
# - pyproject.toml: Specifies minimum version requirements (e.g., "mlflow>=3.5.0" means "we need at least 3.5.0 for security/features")
# - uv.lock: Locks exact versions for reproducibility (e.g., "mlflow==3.9.0" means "we're currently using exactly 3.9.0")
# This ensures both flexibility for consumers and reproducibility for developers.
########################################
# OpenAI: We leverage OpenAI Responses, Chat Completions, and Completions schemas for Nemo Gym abstractions. It may also be used to directly query endpoints.
# We specifically upper bound this OpenAI dependency since the version bumps so frequently.
# Pinned to a single version, not a range.
# Gym subclasses the SDK's pydantic models and mirrors its Responses item union by hand.
# Each version needs its own audit, so a range would claim support for versions nobody tested.
# 2.45.0 makes InputTokensDetails.cache_write_tokens required.
# NeMoGymResponseInputTokensDetails overrides it as Optional, so a provider that does not report cache writes stays unknown instead of becoming zero.
# Moving this pin means re-running tests/unit_tests/core/test_responses_api_types.py, which names each item type Gym cannot represent.
# Updated 2026-11-02 with openai==2.45.0 for MAX reasoning effort.
# License: Apache 2.0 https://github.com/openai/openai-python/blob/v2.45.0/LICENSE
"openai==2.45.0",
# Anthropic: We leverage the Anthropic Messages schemas (request/response Python types) for the
# /v1/messages <-> Responses mapping in nemo_gym/models/anthropic_converter.py. Types only — we never
# use the anthropic client (it uses httpx, whose O(n^2) connection pooling hangs at high
# concurrency); all transport stays on aiohttp. Upper-bounded since the version bumps frequently,
# mirroring how we pin openai.
# Updated Tue Jun 16, 2026 with anthropic<=0.109.2
# License: MIT https://github.com/anthropics/anthropic-sdk-python/blob/v0.109.2/LICENSE
"anthropic<=0.109.2",
# tqdm: Used for progress tracking on batch operations.
# Updated Fri Jul 25, 2025 with tqdm==4.67.1
# License: MIT https://github.com/tqdm/tqdm/blob/0ed5d7f18fa3153834cbac0aa57e8092b217cc16/LICENCE
"tqdm",
# Pydantic: Used for typing and import/export.
# Updated Fri Jul 25, 2025 with pydantic==2.11.7 and pydantic_core==2.33.2
# pydantic license: MIT https://github.com/pydantic/pydantic/blob/1c79f0e4d3fbdb8b93e837175d7098e016117237/LICENSE
# pydantic_core license: MIT https://github.com/pydantic/pydantic-core/blob/17cbe988de187701dd21d5cd2306086ced5a8872/LICENSE
# devtools license: MIT https://github.com/samuelcolvin/python-devtools/blob/5022f1f6f1c55d871b1db208c9c1b2ab0df488fe/LICENSE
"pydantic",
"pydantic_core",
"devtools",
# JSON Schema: Validates retained harness capability evidence.
# Updated Tue Sep 22, 2026 with jsonschema>=4.18,<5
# License: MIT https://github.com/python-jsonschema/jsonschema/blob/main/COPYING
"jsonschema>=4.18,<5",
# Packaging: Validates SPDX license expressions in environment manifests.
# Updated Tue Aug 11, 2026 with packaging==25.0
# License: Apache-2.0 OR BSD-2-Clause https://github.com/pypa/packaging/tree/25.0
"packaging>=24.2",
# FastAPI: Used for server infrastructure
# Updated Thu Mar 26, 2026 with fastapi==0.135.2
# License: MIT https://github.com/fastapi/fastapi/blob/25a3697cedc6e7dfb84e93c8ff965801486f00f4/LICENSE
# 0.142.x exports telemetry a second time next to nemo-lens; 0.143 made that opt-in (fastapi/fastapi#16476)
"fastapi!=0.142.*",
# MCP Python SDK: Used by Gym-owned Streamable HTTP MCP resources servers.
# Updated Tue Oct 13, 2026: MCP 1.30.0 and 2.3.0 compatibility validated.
# License: MIT https://github.com/modelcontextprotocol/python-sdk/blob/main/LICENSE
"mcp>=1.28.1,<3",
# anyio: transitive dependency of mcp/fastapi/starlette; pinned directly since
# mcp's own floor (>=4.10.0) resolves to a version with a known CVE.
# Updated Tue Sep 29, 2026 with anyio>=4.15.1 (CVE mitigation)
# License: MIT https://github.com/agronholm/anyio/blob/master/LICENSE
"anyio>=4.15.1",
# itsdangerous: Requirement for Starlette SessionMiddleware
# Updated Tue Feb 17, 2026 with itsdangerous==2.2.0
# License: BSD 3-Clause https://github.com/pallets/itsdangerous/blob/672971d66a2ef9f85151e53283113f33d642dabd/LICENSE.txt
"itsdangerous",
# Uvicorn: Used to serve FastAPI apps
# Updated Mon Jul 28, 2025 with uvicorn==0.35.0
# License: BSD 3-Clause https://github.com/encode/uvicorn/blob/c1144fd4f130388cffc05ee17b08747ce8c1be11/LICENSE.md
"uvicorn",
# httptools: C bindings to the llhttp HTTP parser.
# Gym explicitly selects httptools as Uvicorn's HTTP protocol implementation.
# Explicit selection prevents a silent fallback to the pure-Python h11 parser.
# A missing or incompatible wheel now fails during server startup.
# Updated Fri Aug 28, 2026 with httptools==0.8.0
# License: MIT https://github.com/MagicStack/httptools/blob/master/LICENSE
"httptools",
# UVLoop: a faster async event loop than Python's native asyncio. Used automatically by Uvicorn as an async loop backend.
# Updated Fri Aug 01, 2025 with uvloop==0.21.0
# License: Apache 2.0 and MIT https://github.com/MagicStack/uvloop/blob/96b7ed31afaf02800d779a395591da6a2c8c50e1/LICENSE-APACHE https://github.com/MagicStack/uvloop/blob/96b7ed31afaf02800d779a395591da6a2c8c50e1/LICENSE-MIT
"uvloop",
# Hydra and OmegaConf: CLI Configuration utilities
# Updated Mon Nov 16, 2026: hydra-core>=1.4.0rc3 (security bump; the fix only exists on the 1.4
# pre-release line, which pulls in omegaconf 2.4). Move the floor to 1.4.0 once it ships stable.
# hydra-core license: MIT https://github.com/facebookresearch/hydra/blob/737fc3349ef3a4031035645f7e8c80be66a57042/LICENSE
# omegaconf license: BSD 3-Clause https://github.com/omry/omegaconf/blob/117f7de07285e4d1324b9229eaf873de15279457/LICENSE
"hydra-core>=1.4.0rc3",
# hydra-core 1.4.0rc3 imports omegaconf._validation_context, which omegaconf 2.4.0 lacks and
# 2.4.1rc2 adds; hydra declares a bare `omegaconf`, so pin the floor here for component venvs.
"omegaconf>=2.4.1rc2",
# rich: used for nicer terminal content displays
# Updated Tue Feb 17, 2026 with rich==14.3.2
# License: MIT https://github.com/Textualize/rich/blob/27701029082052c6541031b6f139097230253900/LICENSE
"rich",
# scipy: t-distribution confidence intervals for repeat-level reward metrics in
# nemo_gym/metrics/reward_profile.py. Lower bound is the first release with cp313 wheels;
# deliberately NOT >=1.18, which requires numpy>=2.0 and breaks servers pinned to
# numpy<2 (wmt_translation and osworld_agent, via unbabel-comet).
# Updated Tue Aug 18, 2026 with scipy>=1.14.1
# License: BSD 3-Clause https://github.com/scipy/scipy/blob/main/LICENSE.txt
"scipy>=1.14.1",
# aiohttp: async http backend
# Updated Wed Oct 07, 2026 with aiohttp>=3.14.4 (CVE mitigation)
# License: Apache 2.0 https://github.com/aio-libs/aiohttp/blob/9a2f146a12e3525b43e96723ef41584bf9cf784e/LICENSE.txt
"aiohttp>=3.14.4",
# requests: sync HTTP client used across nemo_gym (the server client, CLI)
# No lower bound: some server venvs pin older releases (osworld_agent, cvdp).
# Updated Fri Oct 16, 2026 with requests==2.32.5
# License: Apache 2.0 https://github.com/psf/requests/blob/main/LICENSE
"requests",
# yappi: profiling tool
# Updated Wed Aug 12, 2026 with yappi==1.7.6 for CPython 3.14 support
# License: MIT https://github.com/sumerc/yappi/blob/1d3f7501701e1f050b6dcd6a86fd36aec08185c7/LICENSE
"yappi>=1.7.6",
# psutil: Cross-platform process and system utilities
# Updated: Fri Nov 07, 2025 with psutil==6.1.1
# License: BSD 3-Clause https://github.com/giampaolo/psutil/blob/master/LICENSE
"psutil",
# HuggingFace datasets: for loading and converting parquet datasets
# Updated Thu Dec 04, 2025 with datasets==4.4.1
# License: Apache 2.0 https://github.com/huggingface/datasets/blob/main/LICENSE
"datasets",
# orjson: JSON library for faster serialization/deserialization
# Updated: Tue Sep 29, 2026 with orjson>=3.11.6 (CVE mitigation: unbounded recursion on deeply nested JSON)
# License: Apache 2.0 https://github.com/ijl/orjson/blob/fb3eb1f729c7e7b019f780af5695722c99c7c695/LICENSE-APACHE
"orjson>=3.11.6",
# urllib3: HTTP client library (transitive dependency, pinned for security)
# Updated: Tue Sep 30, 2026 with urllib3>=2.8.0 (CVE mitigation)
# License: MIT https://github.com/urllib3/urllib3/blob/main/LICENSE.txt
"urllib3>=2.8.0",
# PyJWT: transitive dependency of mcp (a core nemo-gym dep); pinned directly
# since mcp's own floor resolves to a version with a known CVE.
# Updated: Tue Sep 30, 2026 with PyJWT>=2.15.1 (CVE mitigation)
# License: MIT https://raw.githubusercontent.com/jpadilla/pyjwt/master/LICENSE
"PyJWT>=2.15.1",
# fonttools: Library to manipulate font files (transitive dependency, pinned for security)
# Updated: Mon Feb 10, 2026 with fonttools>=4.60.2
# License: MIT https://github.com/fonttools/fonttools/blob/main/LICENSE
"fonttools>=4.60.2",
# python-multipart: Streaming multipart parser (transitive dependency, pinned for security)
# Updated: Tue Sep 29, 2026 with python-multipart>=0.0.27 (CVE mitigation: unbounded multipart part headers DoS)
# License: Apache 2.0 https://github.com/andrew-d/python-multipart/blob/master/LICENSE.txt
"python-multipart>=0.0.27",
# pyasn1: ASN.1 library (transitive dependency via google-auth, pinned for security)
# Updated: Tue Jul 29, 2026 with pyasn1>=0.6.4
# License: BSD 2-Clause https://pyasn1.readthedocs.io/en/latest/license.html
"pyasn1>=0.6.4",
# pydot License: MIT https://github.com/pydot/pydot/blob/a2bee1e770698867332516fb2878fac262b4ffc5/LICENSES/MIT.txt
"pydot",
# tiktoken: BPE tokenizer for SPEED-Bench dataset preparation script
# License: MIT https://raw.githubusercontent.com/openai/tiktoken/refs/tags/0.9.0/LICENSE
"tiktoken>=0.9.0",
]
[project.optional-dependencies]
all = [
"nemo-gym[dev,mlflow,ray,sandbox,wandb]",
]
# Ray: optional. Install it where `gym` runs when a configured server declares `ray_enabled = True`; those
# servers also request this extra in their own manifests so their venvs get Ray, pinned to the parent's version.
ray = [
# Ray: Used for distributed processing
# Updated Mon Sep 28, 2026 with ray[default]>=2.58.0 (CVE mitigation: httpcore5 bundled in ray_dist.jar)
# Upper bound <2.60: Ray Serve 2.60 imports grpc_reflection without declaring it, and grpcio-reflection
# needs protobuf 7, which conflicts with vLLM's protobuf<7.
# Updated Thu Nov 19, 2026 with ray[default]>=2.58.0,<2.60
# License: Apache 2.0 https://github.com/ray-project/ray/blob/master/LICENSE
"ray[default]>=2.58.0,<2.60",
# jinja2: Ray Serve's HAProxy-based ingress (ray.serve._private.haproxy, since ray 2.57)
# imports jinja2 unconditionally, but ray[default] doesn't declare it (only ray[serve] does).
# nemo_gym.orchestration.ray_serve_gateway imports ray.serve at module level, so pin it directly.
# Updated: Mon Sep 28, 2026 with jinja2>=3.1
# License: BSD 3-Clause https://github.com/pallets/jinja/blob/main/LICENSE.txt
"jinja2>=3.1",
]
# MLflow is used both by the rollout exporter (nemo_gym/artifacts/exporters/mlflow.py) and by the
# GitLab dataset/model-registry integration (nemo_gym/data/gitlab_utils.py). Without this extra,
# both call paths report an actionable error instead of failing on unrelated imports.
mlflow = [
# mlflow-skinny: used for interacting with the Gitlab model registry. We use the "skinny" version that does not have unnecessary dependencies.
# mlflow dependency is necessary for importing. However, all of mlflow's dependencies that don't overlap with mlflow-skinny are excluded below.
# Updated Mon Nov 16, 2026 with mlflow>=3.18.0 (security bump)
# License: Apache 2.0 https://github.com/mlflow/mlflow/blob/c6ce84e817897e1a0461632f8a06d4e5e4ac3726/LICENSE.txt
"mlflow-skinny>=3.18.0",
"mlflow>=3.18.0",
# sqlparse: SQL parsing library (transitive dependency of mlflow-skinny, pinned for security)
# mlflow-skinny only requires sqlparse<1,>=0.4.0, so it won't pull the fixed version on its own.
# Updated: Wed Sep 02, 2026 with sqlparse>=0.6.0 (security bump)
# License: BSD 3-Clause https://github.com/andialbrecht/sqlparse/blob/master/LICENSE
"sqlparse>=0.6.0",
# pyarrow: columnar data library (transitive dependency via mlflow, pinned for security)
# mlflow caps pyarrow<25; versions >=23.0.1 have cp313 wheels and address use-after-free.
# Updated: Tue Jul 29, 2026 with pyarrow>=23.0.1
# License: Apache 2.0 https://github.com/apache/arrow/blob/main/LICENSE
"pyarrow>=23.0.1",
]
wandb = [
# wandb: E2E rollout collection data and metrics upload
# Updated: Mon Sep 28, 2026 with wandb>=0.30.0 (CVE mitigation: x/crypto, x/net, grpc-go, go-git bundled in wandb-core)
# License: MIT https://github.com/wandb/wandb/blob/f8acf479342b6aa8217dd0833bb32190b11c14bc/LICENSE
"wandb>=0.30.0",
# GitPython: Git interaction library (transitive dependency of wandb, pinned for security)
# Updated: Mon Nov 16, 2026 with GitPython>=3.2.1 (security bump)
# License: BSD 3-Clause https://github.com/gitpython-developers/GitPython/blob/main/LICENSE
"GitPython>=3.2.1",
]
vllm = [
# Pin to the same version used by local_vllm_model / genrm_model server venvs.
# Updated: Mon Sep 28, 2026 with vllm==0.29.0
"vllm==0.29.0",
# Pin flashinfer to the exact version vllm 0.29.0 specifies, ensuring pre-compiled
# CUDA kernels are used (avoids JIT compilation on first generation == slow step time).
# flashinfer>=0.2 bundles compiled kernels in the python package directly.
"flashinfer-python==0.6.18",
]
sandbox = [
# Tenacity: Retry helpers used by sandbox providers.
# Updated: Sat May 09, 2026 with tenacity==9.1.4
# License: Apache 2.0 https://github.com/jd/tenacity/blob/master/LICENSE
"tenacity>=9.1.4",
# OpenSandbox SDK: used by the OpenSandbox sandbox provider for create/exec/delete and SDK pool creation.
# Lower bound 0.1.15: first version exposing separate `resource_requests` on Sandbox.create.
# Updated: Thu Jul 30, 2026 with opensandbox>=0.1.15
# License: Apache 2.0
"opensandbox>=0.1.15",
# Daytona SDK: used by the Daytona sandbox provider for create/exec/delete and file operations.
# License: Apache 2.0 https://pypi.org/project/daytona/
"daytona>=0.179.0",
# E2B SDK: used by the E2B sandbox provider for create/exec/kill and file operations.
# Also drives any e2b-compatible gateway via connection.api_url/sandbox_url.
# Lower bound 2.46.0: gateway port routing requires ConnectionConfig.sandbox_headers.
# Upper bound <2.51.0: 2.51 stopped defaulting pause() to keep memory, and 2.52 removed
# client_async.get_envd_transport, which nemo_gym/sandbox/providers/e2b/_sdk.py replaces.
# Raise it once the provider handles both.
# Updated: Thu Nov 19, 2026 with e2b>=2.46.0,<2.51.0
# License: MIT https://github.com/e2b-dev/E2B/blob/e2b@2.46.0/packages/python-sdk/LICENSE
"e2b>=2.46.0,<2.51.0",
# boto3: AWS SDK used by the ECS Fargate sandbox provider for ECS/EC2/ECR/
# CodeBuild/S3/SSM/Secrets Manager calls.
# Updated: Tue Jun 03, 2026 with boto3>=1.34
# License: Apache 2.0 https://github.com/boto/boto3/blob/develop/LICENSE
"boto3>=1.34",
]
# Keep OpenShell opt-in so its grpcio and protobuf dependencies stay out of installs for other providers.
openshell = [
# OpenShell SDK: used by the OpenShell sandbox provider for gateway create/exec/delete over gRPC.
# Lower bound 0.1.6: the provider uses the 0.1.x lifecycle API (exec takes the sandbox name plus a
# required `workspace`; delete returns a DeletionResult) and 0.1.x gateways are wire-incompatible
# with 0.0.x clients. Upper bound <0.2: the SDK is alpha and the provider also relies on its
# generated protos (openshell._proto), so minor bumps can break call shapes; the SDK-conformance
# unit test guards the raise of this ceiling.
# Updated: Sat Oct 31, 2026 with openshell>=0.1.6,<0.2
# License: Apache 2.0 https://github.com/NVIDIA/OpenShell/blob/main/LICENSE
"openshell>=0.1.6,<0.2",
]
# Telemetry is opt-in: without this extra (or with `telemetry.enabled: false`) every
# instrumentation site in nemo_gym is a ~0-cost no-op and Gym behaves identically.
#
# NOTE: uv resolves one unified lockfile across all optional-dependency groups, so this
# extra's floor on opentelemetry-api (via nemo-lens[sdk] and the instrumentation packages
# below) raises the version uv.lock records for *every* install, not just one that
# requests `telemetry` — opentelemetry-api was already a transitive dependency (via
# mlflow-tracing, a core dependency) and moved from 1.38.0 to 1.44.0 when this extra was
# added. Accepted: OpenTelemetry's Python API keeps strict backward compatibility within
# 1.x, and the full test suite passes unchanged at 1.44.0. There's no clean uv mechanism
# to isolate one extra's transitive floor from the shared lockfile while still letting it
# be installed alongside other extras (`[tool.uv] conflicts` forces extras to be mutually
# exclusive, which `telemetry` is not — it needs to coexist with `dev`/`sandbox` in CI).
telemetry = [
# nemo-lens: OpenTelemetry instrumentation shared across the NeMo ecosystem. Provides the
# tracer/meter lifecycle, span-group gating, W3C context propagation, and the FastAPI
# auto-instrumentation Gym uses to stitch one trace across its server processes.
# Pinned to a Lens commit via [tool.uv.sources] until 0.2.0 ships to PyPI; then drop that
# entry and use a version range. NeMo-RL pins this same commit; the two must agree,
# since an RL job installs Gym into its environment and resolves one nemo-lens.
# Updated: Sun Oct 11, 2026 with nemo-lens @ 4d045c03
# License: Apache 2.0 https://github.com/NVIDIA-NeMo/Lens/blob/main/LICENSE
"nemo-lens[sdk]",
# FastAPI OTel auto-instrumentation. Not pulled in by nemo-lens[sdk]: its
# `contrib.instrument_fastapi` helper imports this lazily and raises ImportError when it
# is missing. The instrumentor extracts inbound traceparent on every server. Outbound
# calls need no instrumentor: `nemo_gym.client.http_client.request` injects traceparent itself.
# Updated: Tue Aug 18, 2026 with opentelemetry-instrumentation-*==0.65b0
# License: Apache 2.0 https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/LICENSE
"opentelemetry-instrumentation-fastapi>=0.60b0",
]
# We include dev dependencies as an extra since technically each server module is a consumer (which means we cannot use dependency groups, which are intended to be within a project).
dev = [
# Hugging Face Hub 2.x installs httpx2, which Starlette's TestClient prefers over httpx.
# Keep test clients compatible with OpenAI's http_client and Gym's httpx cookie helpers.
# Updated: Thu Oct 09, 2026; uv.lock uses huggingface-hub==1.33.0.
# License: Apache 2.0 https://github.com/huggingface/huggingface_hub/blob/main/LICENSE
"huggingface-hub<2",
# Pre-commit: Used for pre-commit hooks.
# Updated: Thu Sep 04, 2025 with pre-commit==4.3.0
# License: MIT https://github.com/pre-commit/pre-commit/blob/e70b313c8017b2b6d7844e91795c9d41b9ceb9fb/LICENSE
"pre-commit>=3.6.0",
# Mypy: Used for Python type checking.
# Updated: Thu Sep 04, 2025 with mypy==1.17.1
# License: MIT https://github.com/python/mypy/blob/645b421fa23a3f0d63f651059fa1e8318a6f214a/LICENSE
"mypy>=1.8.0",
# Ruff: Used for Python code formatting and linting.
# Updated: Fri Jul 25, 2025 with ruff==0.12.5
# License: MIT https://github.com/astral-sh/ruff/blob/21ac16db85452c2c196d3b9cc61fb27b7b81f3f7/LICENSE
"ruff",
# Coverage: Used for Python code coverage.
# Updated: Fri Jul 25, 2025 with coverage[toml]==7.10.0
# License: Apache 2.0 https://github.com/nedbat/coveragepy/blob/a2baa66b55ca71ea6b35009f2b4a51ff8fda1753/LICENSE.txt
"coverage[toml]",
# Pytest: Used for Python test orchestration.
# Updated: Fri Jul 25, 2025 with pytest-cov==5.0.0, pytest-xdist==3.6.1, pytest==7.4.3, and pytest-asyncio==0.21.1
# pytest-cov license: MIT https://github.com/pytest-dev/pytest-cov/blob/9d6d57c78627d4811fc473610d61a0b7225e4b40/LICENSE
# pytest-xdist license: MIT https://github.com/pytest-dev/pytest-xdist/blob/2f1d80cb9d83ea2d91bba741ef5deffa9f8f85bf/LICENSE
# pytest license: MIT https://github.com/pytest-dev/pytest/blob/5989efe3efec31a9d14f550d89903b6311dfc828/LICENSE
# pytest-asyncio: Apache 2.0 https://github.com/pytest-dev/pytest-asyncio/blob/66b9f8e31f5f3c3bcf124a52f316516e70c90b46/LICENSE
"pytest-cov",
"pytest-xdist",
"pytest",
"pytest-asyncio",
# DefusedXML: Hardened XML parsing for the GitLab JUnit relay receiver.
# License: Python Software Foundation License
"defusedxml>=0.7.1",
# Requests-mock: Used for mocking HTTP requests in tests
# Updated: Fri Jul 25, 2025 and requests-mock==1.12.1
# License: Apache 2.0 https://github.com/jamielennox/requests-mock/blob/9742d02a8cad17276dbeba7b300b6d27ae1b6fb1/LICENSE
"requests-mock",
"tomlkit>=0.12",
# OpenTelemetry SDK: the in-memory meter of the telemetry tests, which other tests import. Without it the importing
# modules were skipped silently in a dev environment; CI already installs it with the telemetry and mlflow extras.
# Updated: Sun Nov 01, 2026 with opentelemetry-sdk==1.44.0
# License: Apache 2.0 https://github.com/open-telemetry/opentelemetry-python/blob/main/LICENSE
"opentelemetry-sdk",
]
[dependency-groups]
# Codec-bearing packages excluded from the shipped package and container.
# Not published to PyPI. Versions are resolved and tracked in uv.lock.
# docker/install_excluded_deps.sh pins these explicitly to their uv.lock versions;
# update the script when uv lock bumps them.
codec = [
"opencv-python-headless",
"pynvvideocodec",
"torchcodec",
"torchvision",
"torchaudio",
]
[build-system]
requires = ["setuptools>=61", "setuptools-scm"]
build-backend = "setuptools.build_meta"
[tool.uv]
managed = true
required-version = ">=0.13.4"
# grpcio and msgpack are transitive dependencies of ray. Pin the lower bounds here to
# ensure uv selects a CVE-safe version across all resolver paths.
# Updated Sun Jun 22, 2026 (CVE remediation)
constraint-dependencies = [
"grpcio>=1.84.1,!=1.85.0rc1",
"certifi>=2026.10.19",
"msgpack>=1.2.1",
"pyarrow>=25.0.1",
"transformers>=5.17.0",
]
# override-dependencies overrides transitive dep version pins that conflict with
# Python 3.13 wheel availability. Server venvs inherit this via the editable
# nemo-gym install (uv >=0.11.24).
override-dependencies = [
# segale pins spacy==3.8.4 which has no cp313 wheels; 3.8.13+ does.
"spacy>=3.8.13",
# Keep wcwidth opt-in; mini-SWE's native CLI restores it via overrides.txt.
# exclude-dependencies would prevent that server override from taking effect.
"wcwidth; sys_platform == 'never'",
# Codec-bearing packages — never installed in the shipped package or container.
# Binary wheels bundle libavcodec / static FFmpeg executables (H.264, H.265, AAC)
# that may incur MPEG-LA royalties. Servers that genuinely need these declare
# them in their own overrides.txt (requirements.txt servers) or
# [tool.uv] override-dependencies (pyproject.toml servers), which takes
# precedence. Reinstall for testing via docker/install_excluded_deps.sh.
"opencv-python-headless; sys_platform == 'never'",
"pynvvideocodec; sys_platform == 'never'",
"torchcodec; sys_platform == 'never'",
"torchvision; sys_platform == 'never'",
"torchaudio; sys_platform == 'never'",
"pycountry; sys_platform == 'never'",
# Copyleft-licensed packages (LGPL/MPL) — never installed in the shipped package
# or container. Servers that need one declare it in their own overrides.txt.
"gprof2dot; sys_platform == 'never'",
"pathspec; sys_platform == 'never'",
]
# NOTE: server venvs install nemo-gym editably and inherit this list, so anything
# here is also silently dropped from them (uv >=0.11.24). Servers that need a
# dropped package must re-enable it via their own overrides.txt or
# [tool.uv] override-dependencies. Context: https://github.com/NVIDIA-NeMo/Gym/pull/1835
exclude-dependencies = [
# fasttext-wheel has no cp313 wheels and fails to compile on Python 3.13
# (missing #include <cstdint> in src/args.cc). Excluded as a transitive dep
# of unbabel-comet; wmt_translation does not import fasttext at runtime.
"fasttext-wheel",
# cryptography must remain available: MCP 2 imports it at startup via pyjwt[crypto].
# Exclude unwanted dependencies from mlflow
"alembic",
"blinker",
"flask",
"flask-cors",
"graphene",
"graphql-core",
"graphql-relay",
"gunicorn",
"huey",
"prettytable",
"skops",
"sqlalchemy",
"werkzeug",
"waitress",
# diskcache has unfixed CVEs and is no longer a transitive dep since vllm>=0.24.0.
# Explicitly block it to prevent re-introduction via future transitive pulls.
"diskcache",
]
# nemo-lens has no 0.2.0 release on PyPI yet (only 0.1.0), and Gym needs post-0.1.0 APIs
# (compact single-line JSON console export, the gym.* instruments). Pin the git rev until
# 0.2.0 is published, then delete this table and put a version range on the extra above.
# NOTE: [tool.uv.sources] is a uv-only mechanism and is NOT recorded in a built wheel, so
# `pip install nemo-gym[telemetry]` from PyPI resolves nemo-lens 0.1.0 from PyPI instead.
# The pin governs source checkouts, `uv sync`, and the uv lock — including the per-server
# venvs that `gym env test` / `gym env start` build, which inherit it through the editable
# nemo-gym install exactly as override-dependencies does.
[tool.uv.sources]
nemo-lens = { git = "https://github.com/NVIDIA-NeMo/Lens.git", rev = "4d045c03186b90afdc815db46b671f6a21bc7e98" }
[tool.setuptools.package-data]
# The built-in asset trees (resources_servers, responses_api_agents, responses_api_models,
# benchmarks, environments — all under [tool.setuptools.packages.find]) ship their configs, READMEs,
# and example data into the wheel via the setuptools-scm VCS file-finder, which includes git-tracked
# files. (Adding `environments` to packages.find above is what makes that tree ship at all.) Bulk
# train/validation JSONL is intentionally not committed to git, so it is excluded automatically.
# Only nemo_gym's own non-package data files need an explicit entry here.
nemo_gym = ["models/token_capture/staging/conformance/golden_vectors.json"]
[tool.setuptools.dynamic]
version = {attr = "nemo_gym.__version__"}
readme = {file = "README.md", content-type = "text/markdown"}
[tool.distutils.egg_info]
egg_base = "cache"
[project.urls]
Download = "https://github.com/NVIDIA-NeMo/Gym/releases"
Homepage = "https://github.com/NVIDIA-NeMo/Gym"
[project.scripts]
gym = "nemo_gym.cli.main:main"
ng = "nemo_gym.cli.main:main"
########################## DEPRECATED COMMANDS ##########################
# Run/test scripts for servers.
nemo_gym_run = "nemo_gym.cli.legacy:main"
ng_run = "nemo_gym.cli.legacy:main"
nemo_gym_test = "nemo_gym.cli.legacy:main"
ng_test = "nemo_gym.cli.legacy:main"
nemo_gym_test_all = "nemo_gym.cli.legacy:main"
ng_test_all = "nemo_gym.cli.legacy:main"
# Development convenience aliases.
nemo_gym_dev_test = "nemo_gym.cli.legacy:main"
ng_dev_test = "nemo_gym.cli.legacy:main"
nemo_gym_init_resources_server = "nemo_gym.cli.legacy:main"
ng_init_resources_server = "nemo_gym.cli.legacy:main"
# Benchmarks
nemo_gym_list_benchmarks = "nemo_gym.cli.legacy:main"
ng_list_benchmarks = "nemo_gym.cli.legacy:main"
nemo_gym_prepare_benchmark = "nemo_gym.cli.legacy:main"
ng_prepare_benchmark = "nemo_gym.cli.legacy:main"
# Rollout collection
nemo_gym_collect_rollouts = "nemo_gym.cli.legacy:main"
ng_collect_rollouts = "nemo_gym.cli.legacy:main"
nemo_gym_e2e_collect_rollouts = "nemo_gym.cli.legacy:main"
ng_e2e_collect_rollouts = "nemo_gym.cli.legacy:main"
nemo_gym_aggregate_rollouts = "nemo_gym.cli.legacy:main"
ng_aggregate_rollouts = "nemo_gym.cli.legacy:main"
# Prompt materialization
nemo_gym_materialize_prompts = "nemo_gym.cli.legacy:main"
ng_materialize_prompts = "nemo_gym.cli.legacy:main"
# Reward profiling
nemo_gym_reward_profile = "nemo_gym.cli.legacy:main"
ng_reward_profile = "nemo_gym.cli.legacy:main"
# Dataset management
nemo_gym_upload_dataset_to_gitlab = "nemo_gym.cli.legacy:main"
ng_upload_dataset_to_gitlab = "nemo_gym.cli.legacy:main"
nemo_gym_download_dataset_from_gitlab = "nemo_gym.cli.legacy:main"
ng_download_dataset_from_gitlab = "nemo_gym.cli.legacy:main"
nemo_gym_prepare_data = "nemo_gym.cli.legacy:main"
ng_prepare_data = "nemo_gym.cli.legacy:main"
# HF dataset upload and download
nemo_gym_upload_dataset_to_hf = "nemo_gym.cli.legacy:main"
ng_upload_dataset_to_hf = "nemo_gym.cli.legacy:main"
nemo_gym_download_dataset_from_hf = "nemo_gym.cli.legacy:main"
ng_download_dataset_from_hf = "nemo_gym.cli.legacy:main"
# Gitlab -> HF (upload then delete)
nemo_gym_gitlab_to_hf_dataset = "nemo_gym.cli.legacy:main"
ng_gitlab_to_hf_dataset = "nemo_gym.cli.legacy:main"
# Manually delete from Gitlab
nemo_gym_delete_dataset_from_gitlab = "nemo_gym.cli.legacy:main"
ng_delete_dataset_from_gitlab = "nemo_gym.cli.legacy:main"
# Configuration utils
nemo_gym_dump_config = "nemo_gym.cli.legacy:main"
ng_dump_config = "nemo_gym.cli.legacy:main"
nemo_gym_validate = "nemo_gym.cli.legacy:main"
ng_validate = "nemo_gym.cli.legacy:main"
# Display help
nemo_gym_help = "nemo_gym.cli.legacy:main"
ng_help = "nemo_gym.cli.legacy:main"
# Server status
nemo_gym_status = "nemo_gym.cli.legacy:main"
ng_status = "nemo_gym.cli.legacy:main"
# Environment-specific uv pip list
nemo_gym_pip_list = "nemo_gym.cli.legacy:main"
ng_pip_list = "nemo_gym.cli.legacy:main"
# Display version
nemo_gym_version = "nemo_gym.cli.legacy:main"
ng_version = "nemo_gym.cli.legacy:main"
# Re-install Gym and dependencies
nemo_gym_reinstall = "nemo_gym.cli.legacy:main"
ng_reinstall = "nemo_gym.cli.legacy:main"
[tool.setuptools.packages.find]
where = ["."]
include = [
"benchmarks",
"benchmarks.*",
"environment_servers",
"environment_servers.*",
"resources_servers",
"resources_servers.*",
"responses_api_agents",
"responses_api_agents.*",
"responses_api_models",
"responses_api_models.*",
"environments",
"environments.*",
"nemo_gym",
"nemo_gym.*",
]
# SWE harnesses create mutable runtime trees inside their package directory.
# Package discovery must never race or ship those caches and rollout outputs.
exclude = [
"responses_api_agents.swe_agents.results",
"responses_api_agents.swe_agents.results.*",
"responses_api_agents.swe_agents.swe_openhands_setup",
"responses_api_agents.swe_agents.swe_openhands_setup.*",
"responses_api_agents.swe_agents.swe_opencode_setup",
"responses_api_agents.swe_agents.swe_opencode_setup.*",
"responses_api_agents.swe_agents.swe_r2e_gym_setup",
"responses_api_agents.swe_agents.swe_r2e_gym_setup.*",
"responses_api_agents.swe_agents.swe_rebench_setup",
"responses_api_agents.swe_agents.swe_rebench_setup.*",
"responses_api_agents.swe_agents.swe_swebench_multilingual_setup",
"responses_api_agents.swe_agents.swe_swebench_multilingual_setup.*",
"responses_api_agents.swe_agents.swe_swebench_setup",
"responses_api_agents.swe_agents.swe_swebench_setup.*",
# `gym dataset pull` lands Harbor datasets under environments/harbor/<entry>/ (gitignored); the pulled tasks
# ship Python (tests/*.py, task_data.py) that must never be discovered as packages of this distribution. The
# committed entry files (README, dataset.toml, YAML) still ship as environments.harbor's package data.
"environments.harbor.*",
]
################################################
# Testing
################################################
[tool.pytest.ini_options]
# durations=0 will display all tests execution time, sorted in ascending order starting from the slowest one.
# -vv will also display tests with duration = 0.00s
addopts = "--verbose --pyargs --durations=0 --strict-markers" # always add these arguments to pytest
testpaths = ["tests"]
# directories to ignore when discovering tests
norecursedirs = [
"nemo_gym",
"external",
"examples",
"docs",
"scripts",
"tools",
"tutorials",
"deps",
"results",
"*.egg",
".*",
"_darcs",
"build",
"CVS",
"dist",
"venv",
"{arch}"
]
log_cli = true
log_cli_level = "INFO"
cache_dir = "cache/.pytest_cache"
filterwarnings = "ignore::DeprecationWarning"
asyncio_mode = "auto"
# markers to select tests, use `pytest --markers` to see all available markers, `pytest -m "<marker>"` to select tests
markers = [
"unit: marks unit test, i.e. testing a single, well isolated functionality (deselect with '-m \"not unit\"')",
"integration: marks test checking the elements when integrated into subsystems (deselect with '-m \"not integration\"')",
"system: marks test working at the highest integration level (deselect with '-m \"not system\"')",
"acceptance: marks test checking whether the developed product/model passes the user defined acceptance criteria (deselect with '-m \"not acceptance\"')",
"docs: mark tests related to documentation (deselect with '-m \"not docs\"')",
"sandbox: marks sandbox unit tests (deselect with '-m \"not sandbox\"')",
"skipduringci: marks tests that are skipped during ci as they are addressed by Jenkins jobs but should be run to test user setups",
"pleasefixme: marks tests that are broken and need fixing",
]
[tool.coverage.run]
# Shard artifacts must combine across ARC and GitHub-hosted checkout paths.
relative_files = true
source = ["."]
command_line = "-m pytest --durations=10"
omit = [
"tests/*",
"temp*",
"results/*",
"/tmp/*",
"benchmarks/*",
"environments/*",
"scripts/*",
]
data_file = "results/.coverage"
concurrency = ["thread", "multiprocessing"]
[tool.coverage.paths]
source = ["nemo_gym/", "/workspace/nemo_gym"]
[tool.coverage.html]
directory = "results/htmlcov"
[tool.coverage.report]
skip_covered = true
sort = "miss"
# Coverage uses this precision for both display and fail_under comparisons.
# Without it, 94.97% rounds to 95% and incorrectly satisfies a 95% gate.
precision = 2
fail_under = 95.0
exclude_also = [
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
"pass",
]
################################################
# Linting, formatting, and QOL (using ruff)
################################################
[tool.ruff]
# Line length configuration
line-length = 119
target-version = "py313"
cache-dir = "cache/.ruff_cache"
# Exclude common directories that shouldn't be linted
exclude = [
"resources",
".git",
".github",
".venv",
"venv",
"__pycache__",
"*.egg",
"build",
"dist",
"setup.py",
]
# Files to completely ignore
extend-exclude = [
"responses_api_agents/saas_bench_agent/benchmark",
"*.ipynb",
# Vendored apple/ToolSandbox source — kept verbatim (see its VENDORING.md).
"resources_servers/toolsandbox/tool_sandbox",
]
[tool.ruff.lint]
# Configure linting rules
select = [
"F541", # f-string without any placeholders
"F841", # local variable assigned but never used
"F401", # imported but unused
"E741", # ambiguous variable name
"F821", # undefined name
"E266", # too many leading '#' for block comment
"I", # isort
]
# Additional rules can be added here
ignore = [
"E501", # Line too long - handled by formatter
]
[tool.ruff.lint.isort]
known-first-party = ["nemo_gym"]
known-third-party = ["examples", "scripts"]
section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"]
lines-after-imports = 2
[tool.ruff.lint.per-file-ignores]
# Ignore import violations in __init__ files
"__init__.py" = ["F401", "F403"]
# Ignore docstring requirements in test files
"test_*.py" = ["D101", "D103"]
"*_test.py" = ["D101", "D103"]
"tests/*.py" = ["D101", "D103"]
[tool.ruff.format]
# Code formatting configuration
quote-style = "double"
skip-magic-trailing-comma = false
line-ending = "auto"
################################################
# Package layering (import-linter)
################################################
# nemo_gym is moving into packages that each depend only on packages below them.
# The contract lists today's modules grouped by the package each one moves to, highest first.
# Each move PR renames its modules here, and the target packages replace these groups as they land.
# A package with a submodule that moves elsewhere is listed as its other submodules, so its __init__ is not checked.
# tests/unit_tests/test_import_linter_coverage.py checks that every module is in a layer,
# and that no import inside nemo_gym goes around the contract.
[tool.importlinter]
root_package = "nemo_gym"
[[tool.importlinter.contracts]]
name = "nemo_gym packages depend only on packages below them"
type = "layers"
layers = [
# cli/
"nemo_gym.cli.agents : nemo_gym.cli.dataset : nemo_gym.cli.dev : nemo_gym.cli.env : nemo_gym.cli.eval : nemo_gym.cli.general : nemo_gym.cli.legacy : nemo_gym.cli.main : nemo_gym.cli.models : nemo_gym.cli.resources_servers : nemo_gym.cli.utils",
# environment/
"nemo_gym.environment",
# Shared web benchmark browser, session and task contracts.
"nemo_gym.web",
# eval/ (above orchestration, except the recovery policy below)
"nemo_gym.eval.comparison : nemo_gym.eval.eval_plan : nemo_gym.eval.rollout_compare : nemo_gym.eval.rollout_reverification",
# orchestration/
"nemo_gym.orchestration",
# eval/recovery/: the recovery policy that orchestration's executors call; it never imports orchestration
"nemo_gym.eval.recovery",
# rollouts/
"nemo_gym.rollouts",
# data/
"nemo_gym.data",
# agents/
"nemo_gym.agents",
# models/
"nemo_gym.models",
# server_runtime/supervisor/: starts the servers of a run, so it sits above the rest of server_runtime;
# nothing that runs inside a server may import it
"nemo_gym.server_runtime.supervisor",
# server_runtime/
"nemo_gym.server_runtime._checkpoint : nemo_gym.server_runtime.agent_context : nemo_gym.server_runtime.base_environment_server : nemo_gym.server_runtime.base_resources_server : nemo_gym.server_runtime.base_server : nemo_gym.server_runtime.entrypoint_flags : nemo_gym.server_runtime.episode_tokens : nemo_gym.server_runtime.episode_tools : nemo_gym.server_runtime.mcp_auto_exposure : nemo_gym.server_runtime.owned_sandboxes : nemo_gym.server_runtime.ray_support : nemo_gym.server_runtime.registry_server : nemo_gym.server_runtime.request_handling : nemo_gym.server_runtime.runtime_dir : nemo_gym.server_runtime.sandbox_borrow : nemo_gym.server_runtime.sandbox_lending : nemo_gym.server_runtime.server_status : nemo_gym.server_runtime.single_agent_turn_types : nemo_gym.server_runtime.tool_access : nemo_gym.server_runtime.testing : nemo_gym.server_runtime.uvicorn_reuse_port : nemo_gym.server_runtime.verifier_observability",
# artifacts/
"nemo_gym.artifacts",
# metrics/
"nemo_gym.metrics",
# verification/
"nemo_gym.verification",
# trajectory/
"nemo_gym.trajectory",
# sandbox/
"nemo_gym.sandbox",
# client/
"nemo_gym.client",
# telemetry/
"nemo_gym.telemetry",
# core/
"nemo_gym.core",
# utils/
"nemo_gym.utils",
# config/
"nemo_gym.config",
]
# Imports that point up the order today. Each one goes away with the split or move that resolves it.
# import-linter fails on an entry that matches no import, but not on a new entry, nor on one whose import no longer
# points up. Review of this list is what keeps it from growing.
ignore_imports = [
"nemo_gym.client.server_client -> nemo_gym.server_runtime._checkpoint.settings",
"nemo_gym.config.global_config -> nemo_gym.server_runtime._checkpoint.settings",
"nemo_gym.config.global_config -> nemo_gym.artifacts.exporters",
"nemo_gym.config.global_config -> nemo_gym.sandbox.providers.registry",
"nemo_gym.config.global_config -> nemo_gym.telemetry.setup",
"nemo_gym.sandbox.adapters.docker_compose -> nemo_gym.data.tasks.harbor.digest",
"nemo_gym.sandbox.compose_config -> nemo_gym.data.tasks.harbor.digest",
"nemo_gym.telemetry.setup -> nemo_gym.sandbox.observability",
]
# orchestration is a Gym-aware orchestrator, not a home for core functionality: only the CLI entrypoint imports it.
# Every module directly under nemo_gym is a source (`nemo_gym.*`), so a new package is checked without being listed;
# the exceptions below are the whole list.
[[tool.importlinter.contracts]]
name = "only the CLI entrypoint imports orchestration"
type = "forbidden"
source_modules = ["nemo_gym.*"]
forbidden_modules = ["nemo_gym.orchestration"]
allow_indirect_imports = true
ignore_imports = [
"nemo_gym.cli.main -> nemo_gym.orchestration.**",
"nemo_gym.orchestration.** -> nemo_gym.orchestration.**",
]