code-loader 1.0.193.dev3__py3-none-any.whl → 1.0.193.dev4__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.
@@ -299,8 +299,19 @@ def tensorleap_integration_test():
299
299
  def inner(*args, **kwargs):
300
300
  if not _call_from_tl_platform:
301
301
  set_current('tensorleap_integration_test')
302
+ # Keyword calls must work with the user function's OWN parameter names — the local
303
+ # run template calls integration_test(sample_id=..., preprocess=...) against a
304
+ # signature the user chose, not the canonical placeholder names.
305
+ expected_names = inspect.getfullargspec(integration_test_function)[0][:2]
306
+ if len(expected_names) < 2:
307
+ expected_names = ['idx', 'preprocess']
302
308
  validate_args_structure(*args, types_order=[Union[int, str], PreprocessResponse],
303
- func_name='integration_test', expected_names=["idx", "preprocess"], **kwargs)
309
+ func_name='integration_test', expected_names=expected_names,
310
+ **kwargs)
311
+ sample_id, preprocess_response = (
312
+ args[i] if i < len(args) else kwargs[name]
313
+ for i, name in enumerate(expected_names))
314
+ args, kwargs = (sample_id, preprocess_response), {}
304
315
  _validate_input_args(*args, **kwargs)
305
316
 
306
317
  global _called_from_inside_tl_integration_test_decorator, _integration_test_started
@@ -433,7 +444,7 @@ def tensorleap_load_model(prediction_types: Optional[List[PredictionTypeHandler]
433
444
  pass
434
445
 
435
446
  @lru_cache()
436
- def inner(*args, **kwargs):
447
+ def _cached_inner(*args, **kwargs):
437
448
  if not _call_from_tl_platform:
438
449
  set_current('tensorleap_load_model')
439
450
  validate_args_structure(*args, types_order=[],
@@ -587,12 +598,20 @@ def tensorleap_load_model(prediction_types: Optional[List[PredictionTypeHandler]
587
598
  return self.model.get_inputs()
588
599
 
589
600
  model_placeholder = ModelPlaceholder(prediction_types)
590
- global _last_loaded_model
591
- _last_loaded_model = model_placeholder
592
601
  if not _call_from_tl_platform:
593
602
  update_env_params_func("tensorleap_load_model", "v")
594
603
  return model_placeholder
595
604
 
605
+ def inner(*args, **kwargs):
606
+ model_placeholder = _cached_inner(*args, **kwargs)
607
+ # Re-assert on every call, outside the cache: each mapping rerun's load_model
608
+ # overwrites this global with its mapping placeholder, and on a cache hit the
609
+ # body above never runs — a second integration test would otherwise fail the
610
+ # model loop's identity check against the stale mapping placeholder.
611
+ global _last_loaded_model
612
+ _last_loaded_model = model_placeholder
613
+ return model_placeholder
614
+
596
615
  def mapping_inner():
597
616
  class ModelOutputPlaceholder:
598
617
  def __init__(self):
@@ -3376,6 +3395,12 @@ def tensorleap_status_table():
3376
3395
  if not started_from("leap_integration.py"):
3377
3396
  return
3378
3397
 
3398
+ if leap_binder.setup_container.autoregressive_step is not None:
3399
+ # Input encoders are forbidden in autoregressive integrations — the step hook is
3400
+ # the sole source of model inputs — so the row is not applicable: it must not be
3401
+ # printed, gate readiness, or be recommended as a next step.
3402
+ table[:] = [row for row in table if row["name"] != "tensorleap_input_encoder"]
3403
+
3379
3404
  ready_mess = "\nAll parts have been successfully set. If no errors accured, you can now push the project to the Tensorleap system."
3380
3405
  not_ready_mess = "\nSome mandatory components have not yet been added to the Integration test. Recommended next interface to add is: "
3381
3406
  mandatory_ready_mess = "\nAll mandatory parts have been successfully set. If no errors accured, you can now push the project to the Tensorleap system or continue to the next optional reccomeded interface,adding: "
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: code-loader
3
- Version: 1.0.193.dev3
3
+ Version: 1.0.193.dev4
4
4
  Summary:
5
5
  Home-page: https://github.com/tensorleap/code-loader
6
6
  License: MIT
@@ -22,7 +22,7 @@ code_loader/experiment_api/utils.py,sha256=XZHtxge12TS4H4-8PjV3sKuhp8Ud6ojAiIzTZ
22
22
  code_loader/experiment_api/workingspace_config_utils.py,sha256=DLzXQCg4dgTV_YgaSbeTVzq-2ja_SQw4zi7LXwKL9cY,990
23
23
  code_loader/inner_leap_binder/__init__.py,sha256=koOlJyMNYzGbEsoIbXathSmQ-L38N_pEXH_HvL7beXU,99
24
24
  code_loader/inner_leap_binder/leapbinder.py,sha256=4cbSEbN6vVwjFUMxDEksxk1VSCip2ntLB32RxA81_JE,53194
25
- code_loader/inner_leap_binder/leapbinder_decorators.py,sha256=EMg6o1wDl3HMFm8n6kEjyprXUX1UKgcOZjNJQCBSu_I,174865
25
+ code_loader/inner_leap_binder/leapbinder_decorators.py,sha256=ShgqKiyfcJKMIpoB_QdxHoQJ0S1gdQDEQgoPIv6sSIw,176492
26
26
  code_loader/leaploader.py,sha256=sx-BzeVG3qt54S2uF5VbBi2xL0x70AIFN1to6OtjBYU,66979
27
27
  code_loader/leaploaderbase.py,sha256=ncKEWsVv_1Vhtgl8Dqgt4ampxTzOj5nVitGJwQQtTc4,10561
28
28
  code_loader/mixpanel_tracker.py,sha256=rNwRmFifNbdUoqLQvvhhgpKczWpWiEmd8MfyJe27sxw,9131
@@ -32,7 +32,7 @@ code_loader/plot_functions/visualize.py,sha256=gsBAYYkwMh7jIpJeDMPS8G4CW-pxwx6Lz
32
32
  code_loader/utils.py,sha256=1XLY5hNQaOsqXeUIooGs6KXV0E1edeiQyxAdnG3eiy0,6338
33
33
  code_loader/visualizers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
34
34
  code_loader/visualizers/default_visualizers.py,sha256=onRnLE_TXfgLN4o52hQIOOhUcFexGlqJ3xSpQDVLuZM,2604
35
- code_loader-1.0.193.dev3.dist-info/LICENSE,sha256=qIwWjdspQeSMTtnFZBC8MuT-95L02FPvzRUdWFxrwJY,1067
36
- code_loader-1.0.193.dev3.dist-info/METADATA,sha256=3rGLwq82vR91AHkFJXYOaCCe_KRiwDBVWlkZYqWMKk4,1095
37
- code_loader-1.0.193.dev3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
38
- code_loader-1.0.193.dev3.dist-info/RECORD,,
35
+ code_loader-1.0.193.dev4.dist-info/LICENSE,sha256=qIwWjdspQeSMTtnFZBC8MuT-95L02FPvzRUdWFxrwJY,1067
36
+ code_loader-1.0.193.dev4.dist-info/METADATA,sha256=0HFcGksXyXxl3m20DjXWkMzAxAXZ7Zt3O0Vl8a8h0K4,1095
37
+ code_loader-1.0.193.dev4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
38
+ code_loader-1.0.193.dev4.dist-info/RECORD,,