torchx-nightly 2024.5.16__py3-none-any.whl → 2024.5.17__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of torchx-nightly might be problematic. Click here for more details.

torchx/cli/cmd_run.py CHANGED
@@ -13,6 +13,7 @@ import sys
13
13
  import threading
14
14
  from collections import Counter
15
15
  from dataclasses import asdict
16
+ from itertools import groupby
16
17
  from pathlib import Path
17
18
  from pprint import pformat
18
19
  from typing import Dict, List, Optional, Tuple
@@ -85,16 +86,19 @@ def _parse_component_name_and_args(
85
86
  component = args[0]
86
87
  component_args = args[1:]
87
88
 
88
- # Error if there are repeated command line arguments
89
- all_options = [
90
- x
91
- for x in component_args
92
- if x.startswith("-") and x.strip() != "-" and x.strip() != "--"
93
- ]
94
- arg_count = Counter(all_options)
95
- duplicates = [arg for arg, count in arg_count.items() if count > 1]
96
- if len(duplicates) > 0:
97
- subparser.error(f"Repeated Command Line Arguments: {duplicates}")
89
+ # Error if there are repeated command line arguments each group of arguments,
90
+ # where the groups are separated by "--"
91
+ arg_groups = [list(g) for _, g in groupby(component_args, key=lambda x: x == "--")]
92
+ for arg_group in arg_groups:
93
+ all_options = [
94
+ x
95
+ for x in arg_group
96
+ if x.startswith("-") and x.strip() != "-" and x.strip() != "--"
97
+ ]
98
+ arg_count = Counter(all_options)
99
+ duplicates = [arg for arg, count in arg_count.items() if count > 1]
100
+ if len(duplicates) > 0:
101
+ subparser.error(f"Repeated Command Line Arguments: {duplicates}")
98
102
 
99
103
  if not component:
100
104
  subparser.error(MISSING_COMPONENT_ERROR_MSG)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: torchx-nightly
3
- Version: 2024.5.16
3
+ Version: 2024.5.17
4
4
  Summary: TorchX SDK and Components
5
5
  Home-page: https://github.com/pytorch/torchx
6
6
  Author: TorchX Devs
@@ -16,7 +16,7 @@ torchx/cli/cmd_configure.py,sha256=1kTv0qbsbV44So74plAySwWu56pQrqjhfW_kbfdC3Rw,1
16
16
  torchx/cli/cmd_describe.py,sha256=E5disbHoKTsqYKp2s3DaFW9GDLCCOgdOc3pQoHKoyCs,1283
17
17
  torchx/cli/cmd_list.py,sha256=BVqHEW2oTEJ3GqcFK7c1K-i2R-DUjaXQ-WBr0meeIGM,1429
18
18
  torchx/cli/cmd_log.py,sha256=Xh5vrsbwyV_ppwurrENGBNKxc1XLVbFC6YH1b8jlHAM,6104
19
- torchx/cli/cmd_run.py,sha256=3IewCg6KqUY8V8Uhm6LSUyoNvbw64QQC-zVdh_hOTTA,10968
19
+ torchx/cli/cmd_run.py,sha256=T2TmkVZNbIljCEmVQHAQjzVIkHkOH_BV5dlY_4ErrUs,11220
20
20
  torchx/cli/cmd_runopts.py,sha256=NWZiP8XpQjfTDJgays2c6MgL_8wxFoeDge6NstaZdKk,1302
21
21
  torchx/cli/cmd_status.py,sha256=ubtmCp4PylrIh_kC3ZJ5QJm7lzXRt_aRPmY7j-sZu_0,1836
22
22
  torchx/cli/cmd_tracker.py,sha256=RfLxE4Cq1wfk7k051RtZ8RPJp0pEKSCa3KmTeRs3LF8,5218
@@ -113,9 +113,9 @@ torchx/workspace/__init__.py,sha256=FqN8AN4VhR1C_SBY10MggQvNZmyanbbuPuE-JCjkyUY,
113
113
  torchx/workspace/api.py,sha256=1heBmPgB-W5Zf9gwViM7NrqvHpZlVYeMN7jpY8Qkytc,5479
114
114
  torchx/workspace/dir_workspace.py,sha256=npNW_IjUZm_yS5r-8hrRkH46ndDd9a_eApT64m1S1T4,2268
115
115
  torchx/workspace/docker_workspace.py,sha256=PFu2KQNVC-0p2aKJ-W_BKA9ZOmXdCY2ABEkCExp3udQ,10269
116
- torchx_nightly-2024.5.16.dist-info/LICENSE,sha256=WVHfXhFC0Ia8LTKt_nJVYobdqTJVg_4J3Crrfm2A8KQ,1721
117
- torchx_nightly-2024.5.16.dist-info/METADATA,sha256=G_brjaroLDfy83kMu3f1bU_41kHtb7eymtCU8sXj5iU,6053
118
- torchx_nightly-2024.5.16.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
119
- torchx_nightly-2024.5.16.dist-info/entry_points.txt,sha256=3JYZFlX9aWzR-Gs_qsx1zq7mlqbFz6Mi9rQUULW8caI,170
120
- torchx_nightly-2024.5.16.dist-info/top_level.txt,sha256=pxew3bc2gsiViS0zADs0jb6kC5v8o_Yy_85fhHj_J1A,7
121
- torchx_nightly-2024.5.16.dist-info/RECORD,,
116
+ torchx_nightly-2024.5.17.dist-info/LICENSE,sha256=WVHfXhFC0Ia8LTKt_nJVYobdqTJVg_4J3Crrfm2A8KQ,1721
117
+ torchx_nightly-2024.5.17.dist-info/METADATA,sha256=i50i--l7WlUuP4wfXkGTsNW9kM8iNHx0mx7Pa2XVDXk,6053
118
+ torchx_nightly-2024.5.17.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
119
+ torchx_nightly-2024.5.17.dist-info/entry_points.txt,sha256=3JYZFlX9aWzR-Gs_qsx1zq7mlqbFz6Mi9rQUULW8caI,170
120
+ torchx_nightly-2024.5.17.dist-info/top_level.txt,sha256=pxew3bc2gsiViS0zADs0jb6kC5v8o_Yy_85fhHj_J1A,7
121
+ torchx_nightly-2024.5.17.dist-info/RECORD,,