truss 0.11.17__py3-none-any.whl → 0.11.18__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 truss might be problematic. Click here for more details.

truss/cli/cli.py CHANGED
@@ -548,8 +548,9 @@ def push(
548
548
  model_name = remote_cli.inquire_model_name()
549
549
 
550
550
  if promote and environment:
551
- promote_warning = "'promote' flag and 'environment' flag were both specified. Ignoring the value of 'promote'"
552
- console.print(promote_warning, style="yellow")
551
+ raise click.UsageError(
552
+ "'promote' flag and 'environment' flag cannot both be specified."
553
+ )
553
554
  if promote and not environment:
554
555
  environment = PRODUCTION_ENVIRONMENT_NAME
555
556
 
@@ -199,6 +199,7 @@ class BasetenApi:
199
199
  allow_truss_download: bool = True,
200
200
  deployment_name: Optional[str] = None,
201
201
  origin: Optional[b10_types.ModelOrigin] = None,
202
+ environment: Optional[str] = None,
202
203
  ):
203
204
  query_string = f"""
204
205
  mutation ($trussUserEnv: String) {{
@@ -211,6 +212,7 @@ class BasetenApi:
211
212
  allow_truss_download: {"true" if allow_truss_download else "false"}
212
213
  {f'version_name: "{deployment_name}"' if deployment_name else ""}
213
214
  {f"model_origin: {origin.value}" if origin else ""}
215
+ {f'environment_name: "{environment}"' if environment else ""}
214
216
  ) {{
215
217
  model_version {{
216
218
  id
@@ -438,9 +438,6 @@ def create_truss_service(
438
438
  )
439
439
 
440
440
  if model_id is None:
441
- if environment and environment != PRODUCTION_ENVIRONMENT_NAME:
442
- raise ValueError(NO_ENVIRONMENTS_EXIST_ERROR_MESSAGING)
443
-
444
441
  model_version_json = api.create_model_from_truss(
445
442
  model_name,
446
443
  s3_key,
@@ -450,6 +447,7 @@ def create_truss_service(
450
447
  allow_truss_download=allow_truss_download,
451
448
  deployment_name=deployment_name,
452
449
  origin=origin,
450
+ environment=environment,
453
451
  )
454
452
 
455
453
  return ModelVersionHandle(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: truss
3
- Version: 0.11.17
3
+ Version: 0.11.18
4
4
  Summary: A seamless bridge from model development to model delivery
5
5
  Project-URL: Repository, https://github.com/basetenlabs/truss
6
6
  Project-URL: Homepage, https://truss.baseten.co
@@ -9,7 +9,7 @@ truss/base/trt_llm_config.py,sha256=rEtBVFg2QnNMxnaz11s5Z69dJB1w7Bpt48Wf6jSsVZI,
9
9
  truss/base/truss_config.py,sha256=s39Xc1e20s8IV07YLl_aVnp-uRS18ZQ2TV-3FILx4nY,28416
10
10
  truss/base/truss_spec.py,sha256=jFVF79CXoEEspl2kXBAPyi-rwISReIGTdobGpaIhwJw,5979
11
11
  truss/cli/chains_commands.py,sha256=QijtACpuAt2O1RV_qhTNPw0jcFg-u0dX9PP-ct0t-rs,17716
12
- truss/cli/cli.py,sha256=PaMkuwXZflkU7sa1tEoT_Zmy-iBkEZs1m4IVqcieaeo,30367
12
+ truss/cli/cli.py,sha256=VGOw1ell7h9bna64UmopavCpVPdjDerSaGPDoizIsRI,30313
13
13
  truss/cli/remote_cli.py,sha256=G_xCKRXzgkCmkiZJhUFfsv5YSVgde1jLA5LPQitpZgI,1905
14
14
  truss/cli/train_commands.py,sha256=CrVqWsdkmSxgi3i2sSEyiE4QdfD0Z96F2Ib-PMZJjm8,20444
15
15
  truss/cli/logs/base_watcher.py,sha256=vuqteoaMVGX34cgKcETf4X_gOkvnSnDaWz1_pbeFhqs,3343
@@ -52,9 +52,9 @@ truss/patch/truss_dir_patch_applier.py,sha256=ALnaVnu96g0kF2UmGuBFTua3lrXpwAy4sG
52
52
  truss/remote/remote_factory.py,sha256=-0gLh_yIyNDgD48Q6sR8Yo5dOMQg84lrHRvn_XR0n4s,3585
53
53
  truss/remote/truss_remote.py,sha256=TEe6h6by5-JLy7PMFsDN2QxIY5FmdIYN3bKvHHl02xM,8440
54
54
  truss/remote/baseten/__init__.py,sha256=XNqJW1zyp143XQc6-7XVwsUA_Q_ZJv_ausn1_Ohtw9Y,176
55
- truss/remote/baseten/api.py,sha256=2Es2afWKnz7OlQJHIbvYAKoSrb1dn9SnsAY--uHXbTs,30210
55
+ truss/remote/baseten/api.py,sha256=54Cl_2zHpRU4g2VXzK-BYlxPJeHHImceFrbxD9AASXo,30335
56
56
  truss/remote/baseten/auth.py,sha256=tI7s6cI2EZgzpMIzrdbILHyGwiHDnmoKf_JBhJXT55E,776
57
- truss/remote/baseten/core.py,sha256=69utHGGFRw1ZQUobj80TSmaBgU3plnsfHZfiR15dPrY,23502
57
+ truss/remote/baseten/core.py,sha256=FC5-87Vs2f0NR8eddtSRvr3Z5W2rF7mpiq9jCPrbzr4,23399
58
58
  truss/remote/baseten/custom_types.py,sha256=g7yWkE8p6uIAG5JqgfELFGHzjFLvO7vLPzbe-yl1nYs,4735
59
59
  truss/remote/baseten/error.py,sha256=3TNTwwPqZnr4NRd9Sl6SfLUQR2fz9l6akDPpOntTpzA,578
60
60
  truss/remote/baseten/remote.py,sha256=aKG1BODtrnmuRV-M8T3F3pw8oHawGwI09caKANJ19BM,23420
@@ -374,8 +374,8 @@ truss_train/deployment.py,sha256=lWWANSuzBWu2M4oK4qD7n-oVR1JKdmw2Pn5BJQHg-Ck,307
374
374
  truss_train/loader.py,sha256=0o66EjBaHc2YY4syxxHVR4ordJWs13lNXnKjKq2wq0U,1630
375
375
  truss_train/public_api.py,sha256=9N_NstiUlmBuLUwH_fNG_1x7OhGCytZLNvqKXBlStrM,1220
376
376
  truss_train/restore_from_checkpoint.py,sha256=8hdPm-WSgkt74HDPjvCjZMBpvA9MwtoYsxVjOoa7BaM,1176
377
- truss-0.11.17.dist-info/METADATA,sha256=z5W692XFnV2zh5UD0VlZTkRIagNShoxtaSB_mhYa0lA,6678
378
- truss-0.11.17.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
379
- truss-0.11.17.dist-info/entry_points.txt,sha256=-MwKfHHQHQ6j0HqIgvxrz3CehCmczDLTD-OsRHnjjuU,130
380
- truss-0.11.17.dist-info/licenses/LICENSE,sha256=FTqGzu85i-uw1Gi8E_o0oD60bH9yQ_XIGtZbA1QUYiw,1064
381
- truss-0.11.17.dist-info/RECORD,,
377
+ truss-0.11.18.dist-info/METADATA,sha256=vlaTGYYSaK0iMt1NvmUEuF6uhy-hygDj2MLDbQQpJO0,6678
378
+ truss-0.11.18.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
379
+ truss-0.11.18.dist-info/entry_points.txt,sha256=-MwKfHHQHQ6j0HqIgvxrz3CehCmczDLTD-OsRHnjjuU,130
380
+ truss-0.11.18.dist-info/licenses/LICENSE,sha256=FTqGzu85i-uw1Gi8E_o0oD60bH9yQ_XIGtZbA1QUYiw,1064
381
+ truss-0.11.18.dist-info/RECORD,,