tensorless 0.7.0__tar.gz → 0.9.0__tar.gz

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.
Files changed (85) hide show
  1. {tensorless-0.7.0/tensorless.egg-info → tensorless-0.9.0}/PKG-INFO +1 -1
  2. {tensorless-0.7.0 → tensorless-0.9.0}/docs/training.md +4 -3
  3. {tensorless-0.7.0 → tensorless-0.9.0}/pyproject.toml +1 -1
  4. {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/auto/config.py +1 -1
  5. tensorless-0.9.0/tensorless/data/english_grammar.txt +1450 -0
  6. {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/models/mlp.py +15 -2
  7. {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/models/transformer.py +30 -3
  8. {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/runtime.py +4 -1
  9. {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/training/early_stopping.py +1 -1
  10. {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/training/trainer.py +3 -3
  11. {tensorless-0.7.0 → tensorless-0.9.0/tensorless.egg-info}/PKG-INFO +1 -1
  12. {tensorless-0.7.0 → tensorless-0.9.0}/tests/test_train_tabular.py +3 -2
  13. tensorless-0.7.0/tensorless/data/english_grammar.txt +0 -262
  14. {tensorless-0.7.0 → tensorless-0.9.0}/LICENSE +0 -0
  15. {tensorless-0.7.0 → tensorless-0.9.0}/MANIFEST.in +0 -0
  16. {tensorless-0.7.0 → tensorless-0.9.0}/README.md +0 -0
  17. {tensorless-0.7.0 → tensorless-0.9.0}/docs/api_reference.md +0 -0
  18. {tensorless-0.7.0 → tensorless-0.9.0}/docs/architecture.md +0 -0
  19. {tensorless-0.7.0 → tensorless-0.9.0}/docs/automatic_mode.md +0 -0
  20. {tensorless-0.7.0 → tensorless-0.9.0}/docs/checkpointing.md +0 -0
  21. {tensorless-0.7.0 → tensorless-0.9.0}/docs/cli.md +0 -0
  22. {tensorless-0.7.0 → tensorless-0.9.0}/docs/configuration.md +0 -0
  23. {tensorless-0.7.0 → tensorless-0.9.0}/docs/contributing.md +0 -0
  24. {tensorless-0.7.0 → tensorless-0.9.0}/docs/examples.md +0 -0
  25. {tensorless-0.7.0 → tensorless-0.9.0}/docs/inference.md +0 -0
  26. {tensorless-0.7.0 → tensorless-0.9.0}/docs/installation.md +0 -0
  27. {tensorless-0.7.0 → tensorless-0.9.0}/docs/limitations.md +0 -0
  28. {tensorless-0.7.0 → tensorless-0.9.0}/docs/quickstart.md +0 -0
  29. {tensorless-0.7.0 → tensorless-0.9.0}/docs/roadmap.md +0 -0
  30. {tensorless-0.7.0 → tensorless-0.9.0}/docs/tl_format.md +0 -0
  31. {tensorless-0.7.0 → tensorless-0.9.0}/docs/troubleshooting.md +0 -0
  32. {tensorless-0.7.0 → tensorless-0.9.0}/docs/tutorial.md +0 -0
  33. {tensorless-0.7.0 → tensorless-0.9.0}/examples/tabular_classification_example.py +0 -0
  34. {tensorless-0.7.0 → tensorless-0.9.0}/examples/tabular_regression_example.py +0 -0
  35. {tensorless-0.7.0 → tensorless-0.9.0}/examples/text_classification_example.py +0 -0
  36. {tensorless-0.7.0 → tensorless-0.9.0}/examples/text_generation_example.py +0 -0
  37. {tensorless-0.7.0 → tensorless-0.9.0}/setup.cfg +0 -0
  38. {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/__init__.py +0 -0
  39. {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/_version.py +0 -0
  40. {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/api.py +0 -0
  41. {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/auto/__init__.py +0 -0
  42. {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/auto/detector.py +0 -0
  43. {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/backends/__init__.py +0 -0
  44. {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/backends/jax_backend.py +0 -0
  45. {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/backends/mlx_backend.py +0 -0
  46. {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/checkpoint/__init__.py +0 -0
  47. {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/checkpoint/manager.py +0 -0
  48. {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/cli/__init__.py +0 -0
  49. {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/cli/main.py +0 -0
  50. {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/config.py +0 -0
  51. {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/data/__init__.py +0 -0
  52. {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/data/fingerprint.py +0 -0
  53. {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/data/inspector.py +0 -0
  54. {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/data/loader.py +0 -0
  55. {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/data/tabular.py +0 -0
  56. {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/devices/__init__.py +0 -0
  57. {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/devices/device.py +0 -0
  58. {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/devices/memory.py +0 -0
  59. {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/engine.py +0 -0
  60. {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/errors.py +0 -0
  61. {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/models/__init__.py +0 -0
  62. {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/models/registry.py +0 -0
  63. {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/serialization/__init__.py +0 -0
  64. {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/serialization/tl_format.py +0 -0
  65. {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/tokenization/__init__.py +0 -0
  66. {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/tokenization/bpe_tokenizer.py +0 -0
  67. {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/tokenization/char_tokenizer.py +0 -0
  68. {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/training/__init__.py +0 -0
  69. {tensorless-0.7.0 → tensorless-0.9.0}/tensorless/training/data_prep.py +0 -0
  70. {tensorless-0.7.0 → tensorless-0.9.0}/tensorless.egg-info/SOURCES.txt +0 -0
  71. {tensorless-0.7.0 → tensorless-0.9.0}/tensorless.egg-info/dependency_links.txt +0 -0
  72. {tensorless-0.7.0 → tensorless-0.9.0}/tensorless.egg-info/entry_points.txt +0 -0
  73. {tensorless-0.7.0 → tensorless-0.9.0}/tensorless.egg-info/requires.txt +0 -0
  74. {tensorless-0.7.0 → tensorless-0.9.0}/tensorless.egg-info/top_level.txt +0 -0
  75. {tensorless-0.7.0 → tensorless-0.9.0}/tests/test_auto_detection.py +0 -0
  76. {tensorless-0.7.0 → tensorless-0.9.0}/tests/test_checkpoint_resume.py +0 -0
  77. {tensorless-0.7.0 → tensorless-0.9.0}/tests/test_cli.py +0 -0
  78. {tensorless-0.7.0 → tensorless-0.9.0}/tests/test_data_loading.py +0 -0
  79. {tensorless-0.7.0 → tensorless-0.9.0}/tests/test_end_to_end.py +0 -0
  80. {tensorless-0.7.0 → tensorless-0.9.0}/tests/test_fingerprint.py +0 -0
  81. {tensorless-0.7.0 → tensorless-0.9.0}/tests/test_jax_backend.py +0 -0
  82. {tensorless-0.7.0 → tensorless-0.9.0}/tests/test_mlx_backend.py +0 -0
  83. {tensorless-0.7.0 → tensorless-0.9.0}/tests/test_serialization.py +0 -0
  84. {tensorless-0.7.0 → tensorless-0.9.0}/tests/test_train_text_classification.py +0 -0
  85. {tensorless-0.7.0 → tensorless-0.9.0}/tests/test_train_text_generation.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tensorless
3
- Version: 0.7.0
3
+ Version: 0.9.0
4
4
  Summary: ML with maximum automation and minimum setup.
5
5
  Author: Tensorless Contributors
6
6
  License: MIT
@@ -95,9 +95,10 @@ By default, Tensorless holds out `val_split` of the data (10% for
95
95
  datasets with 50+ examples, 0% for smaller ones where a held-out split
96
96
  wouldn't be meaningful) and tracks validation loss after each epoch. If
97
97
  validation loss doesn't improve by at least `min_delta` for `patience`
98
- consecutive epochs, training stops early. The automatic default is 3
99
- consecutive epochs, and the completed model is still written to the `.tl`
100
- output file.
98
+ consecutive epochs, training stops early. The automatic default is 5
99
+ consecutive epochs. Before the completed model is written to the `.tl` output
100
+ file, Tensorless restores the weights from the epoch with the best validation
101
+ loss. This applies equally to regular training and built-in pretraining.
101
102
 
102
103
  ## Checkpointing during training
103
104
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "tensorless"
7
- version = "0.7.0"
7
+ version = "0.9.0"
8
8
  description = "ML with maximum automation and minimum setup."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -125,7 +125,7 @@ def resolve_config(ds: Dataset, user: TrainConfig) -> ResolvedConfig:
125
125
  grad_clip=user.grad_clip if user.grad_clip is not None else 1.0,
126
126
  warmup_steps=user.warmup_steps if user.warmup_steps is not None else min(100, max(1, n // 10)),
127
127
  val_split=user.val_split if user.val_split is not None else (0.1 if n >= 50 else 0.0),
128
- patience=user.patience if user.patience is not None else 3,
128
+ patience=user.patience if user.patience is not None else 5,
129
129
  min_delta=user.min_delta if user.min_delta is not None else 1e-4,
130
130
  device=device,
131
131
  precision=precision,