From e22a4203d2c763c8b070e8fccecdb11aa9945c48 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 7 Sep 2026 21:27:56 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit suggestions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/codespell-project/codespell: v2.4.1 → v2.4.3](https://github.com/codespell-project/codespell/compare/v2.4.1...v2.4.3) - [github.com/JoC0de/pre-commit-prettier: v3.6.2 → v3.9.6](https://github.com/JoC0de/pre-commit-prettier/compare/v3.6.2...v3.9.6) - [github.com/executablebooks/mdformat: 0.7.22 → 1.0.0](https://github.com/executablebooks/mdformat/compare/0.7.22...1.0.0) - [github.com/astral-sh/ruff-pre-commit: v0.13.3 → v0.16.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.13.3...v0.16.6) --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4ddabac..ddd638f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -28,14 +28,14 @@ repos: - id: python-use-type-annotations - repo: https://github.com/codespell-project/codespell - rev: v2.4.1 + rev: v2.4.3 hooks: - id: codespell additional_dependencies: [tomli] #args: ["--write-changes"] - repo: https://github.com/JoC0de/pre-commit-prettier - rev: v3.6.2 # v3.6.2 using SHA as tags are not persistent + rev: v3.9.6 # v3.6.2 using SHA as tags are not persistent hooks: - id: prettier files: \.(json|yml|yaml|toml) @@ -43,7 +43,7 @@ repos: args: ["--print-width=120"] - repo: https://github.com/executablebooks/mdformat - rev: 0.7.22 + rev: 1.0.0 hooks: - id: mdformat args: ["--number"] @@ -54,7 +54,7 @@ repos: exclude: CHANGELOG.md - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.13.3 + rev: v0.16.6 hooks: - id: ruff args: ["--fix"] From fd62a9e48c6f12e394c66c9e15e929149c58807d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 7 Sep 2026 21:28:06 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- README.md | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 4a8fd3e..bb8f1a9 100644 --- a/README.md +++ b/README.md @@ -138,12 +138,10 @@ from tensorflow import keras from litmodels import save_model # Define the model -model = keras.Sequential( - [ - keras.layers.Dense(10, input_shape=(784,), name="dense_1"), - keras.layers.Dense(10, name="dense_2"), - ] -) +model = keras.Sequential([ + keras.layers.Dense(10, input_shape=(784,), name="dense_1"), + keras.layers.Dense(10, name="dense_2"), +]) # Compile the model model.compile(optimizer="adam", loss="categorical_crossentropy") @@ -157,9 +155,7 @@ Load model: ```python from litmodels import load_model -model_ = load_model( - "lightning-ai/jirka/sample-tf-keras-model", download_dir="./my-model" -) +model_ = load_model("lightning-ai/jirka/sample-tf-keras-model", download_dir="./my-model") ``` @@ -178,9 +174,7 @@ iris = datasets.load_iris() X, y = iris.data, iris.target # Split dataset into training and test sets -X_train, X_test, y_train, y_test = model_selection.train_test_split( - X, y, test_size=0.2, random_state=42 -) +X_train, X_test, y_train, y_test = model_selection.train_test_split(X, y, test_size=0.2, random_state=42) # Train a simple SVC model model = svm.SVC() @@ -196,9 +190,7 @@ Use model: from litmodels import load_model # Download and load the model file from cloud storage -model = load_model( - name="your_org/your_team/sklearn-svm-model", download_dir="my_models" -) +model = load_model(name="your_org/your_team/sklearn-svm-model", download_dir="my_models") # Example: run inference with the loaded model sample_input = [[5.1, 3.5, 1.4, 0.2]]