From a0c6543e1495099410392435f079f3496e110c3e Mon Sep 17 00:00:00 2001 From: Divya Date: Thu, 17 Apr 2025 15:21:07 +0530 Subject: [PATCH 01/12] added files --- GenerateCheckWeights.ipynb | 149 +++++++++++++++++++ README.md | 72 ++++++++- requirement.txt | 1 + traceblocTrainingGuide.ipynb | 276 +++++++++++++++++++++++++++++++++++ 4 files changed, 497 insertions(+), 1 deletion(-) create mode 100644 GenerateCheckWeights.ipynb create mode 100644 requirement.txt create mode 100644 traceblocTrainingGuide.ipynb diff --git a/GenerateCheckWeights.ipynb b/GenerateCheckWeights.ipynb new file mode 100644 index 0000000..6f9cb21 --- /dev/null +++ b/GenerateCheckWeights.ipynb @@ -0,0 +1,149 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "81eecdd6", + "metadata": {}, + "source": [ + "### Generate Weights" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "10056885", + "metadata": {}, + "outputs": [], + "source": [ + "from tracebloc_package import ModelWeights" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "6bcc8615", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter Model Name : CNN\n" + ] + } + ], + "source": [ + "weights = ModelWeights() # load module and Enter model file name" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "97c9f85a", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Metal device set to: Apple M1\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2022-06-16 16:02:01.507828: I tensorflow/core/common_runtime/pluggable_device/pluggable_device_factory.cc:305] Could not identify NUMA node of platform GPU ID 0, defaulting to 0. Your kernel may not have been built with NUMA support.\n", + "2022-06-16 16:02:01.508042: I tensorflow/core/common_runtime/pluggable_device/pluggable_device_factory.cc:271] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 0 MB memory) -> physical PluggableDevice (device: 0, name: METAL, pci bus id: )\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Model input shape: 224\n", + "Model output shape: 3\n", + "Dumped new weights for CNN model\n" + ] + } + ], + "source": [ + "weights.generateweights() # generate weights" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "ee7cd1f1", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Model: \"model\"\n", + "_________________________________________________________________\n", + " Layer (type) Output Shape Param # \n", + "=================================================================\n", + " input_1 (InputLayer) [(None, 224, 224, 3)] 0 \n", + " \n", + " zero_padding2d (ZeroPadding (None, 230, 230, 3) 0 \n", + " 2D) \n", + " \n", + " conv2d (Conv2D) (None, 112, 112, 64) 9472 \n", + " \n", + " batch_normalization (BatchN (None, 112, 112, 64) 256 \n", + " ormalization) \n", + " \n", + " activation (Activation) (None, 112, 112, 64) 0 \n", + " \n", + " max_pooling2d (MaxPooling2D (None, 55, 55, 64) 0 \n", + " ) \n", + " \n", + " flatten (Flatten) (None, 193600) 0 \n", + " \n", + " dense (Dense) (None, 3) 580803 \n", + " \n", + "=================================================================\n", + "Total params: 590,531\n", + "Trainable params: 590,403\n", + "Non-trainable params: 128\n", + "_________________________________________________________________\n" + ] + } + ], + "source": [ + "weights.checkweights() # check if weights file are properly generated" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "2eb7a796", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.12" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/README.md b/README.md index 6ba9392..abc200a 100644 --- a/README.md +++ b/README.md @@ -1 +1,71 @@ -# start-training \ No newline at end of file +#Jupyter notebook for Data Scientist +Data scientist tool to create and run experiment with required model and training plan . + + +## Pre-requisite +###1. Install Ananconda +```shell +wget https://repo.anaconda.com/archive/Anaconda3-2020.11-Linux-x86_64.sh + +bash Anaconda3-2020.11-Linux-x86_64.sh -b -p -y + +source ~/.bashrc +``` +###2. Create an environment and activate it +```shell +conda create -n dsenvironemnt python=3.8 + +conda activate dsenvironemnt +``` +###3. Install required package +```shell +pip install -r requirement.txt +``` +###4. Install tensorflow and keras +```shell +pip install tensorflow==2.6.0 +pip install keras==2.6.0 + +``` +####In case of mac m1 machine + +Follow this link to install tensorflow: https://caffeinedev.medium.com/how-to-install-tensorflow-on-m1-mac-8e9b91d93706 + +or + +Enter following commands +```shell +conda install -c apple tensorflow-deps +pip install tensorflow-macos +pip install tensorflow-metal +pip uninstall -y numpy +pip uninstall -y setuptools +pip install numpy +pip install setuptools +``` +###4. Install Jupyter Notebook +```shell +conda install jupyter notebook + +pip install jupyter +``` +###5. Move to Directory +```shell +cd federated-xray-datascientist +``` +###6. Start Jupyter Notebook +```shell +jupyter notebook +``` + +## How to run an experiment +Follow this document guide to learn how to create and run an experiment. + +## Testing Jupyter Notebook +In order to start and test experiment, a model file required. + +For this purpose one model is placed in directory ("CNN.py") + +There are some other test models in this repo in test-models directory. + +In order to test those copy the model file from test-models directory to parent directory. diff --git a/requirement.txt b/requirement.txt new file mode 100644 index 0000000..7a38c05 --- /dev/null +++ b/requirement.txt @@ -0,0 +1 @@ +tracebloc_package diff --git a/traceblocTrainingGuide.ipynb b/traceblocTrainingGuide.ipynb new file mode 100644 index 0000000..df03e2b --- /dev/null +++ b/traceblocTrainingGuide.ipynb @@ -0,0 +1,276 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "public-perception", + "metadata": {}, + "source": [ + "## Guide to train machine learning models on Tracebloc" + ] + }, + { + "cell_type": "markdown", + "id": "fe54c7a7", + "metadata": {}, + "source": [ + "In this five step guide, you will learn how to train your ML models on Tracebloc's privacy-preserving ML infrastructure.\n", + "\n", + "With that \n", + "\n", + "* you get access large data sets.\n", + "* collaborate with peers to build high-performance models.\n", + "* participate in enterprise competitions." + ] + }, + { + "cell_type": "markdown", + "id": "a141f90f", + "metadata": {}, + "source": [ + "### 1. Connect to Tracebloc" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "numeric-constant", + "metadata": { + "scrolled": true + }, + "outputs": [], + "source": [ + "from tracebloc_package import User # package used for authentification, model upload, custom training plan, and more" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "d31c8fff", + "metadata": { + "scrolled": true + }, + "outputs": [], + "source": [ + "user = User() # run cell. You will be asked to enter your email and password to login" + ] + }, + { + "cell_type": "markdown", + "id": "brilliant-access", + "metadata": {}, + "source": [ + "### 2. Upload Model & Weights File" + ] + }, + { + "cell_type": "markdown", + "id": "4c9994f2", + "metadata": {}, + "source": [ + "* Check out the [**model structure requirements**](https://docs.tracebloc.io/model-structure) \n", + "* You will find models to test tracebloc in the [**tracebloc model zoo**](https://gitlab.com/tracebloc/datascientist/-/tree/master/model_zoo)\n", + "* Not sure how to upload models and weight to Colab? [**upload**](https://docs.tracebloc.io/)\n", + "* Please follow the **file name convention**: if model file name is \"model.py\" -> model weight file name should be \"model_weights.pkl\"." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "meaning-professional", + "metadata": { + "scrolled": true + }, + "outputs": [], + "source": [ + "user.uploadModel('filename') # (model, weights=True)" + ] + }, + { + "cell_type": "markdown", + "id": "d7c16a36", + "metadata": {}, + "source": [ + "### 3. Link uploaded Model with Dataset" + ] + }, + { + "cell_type": "markdown", + "id": "21772887", + "metadata": {}, + "source": [ + "This step links the above model with the provided dataset. The model should be [compatible](https://docs.tracebloc.io/) with the dataset." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "03c08e31", + "metadata": {}, + "outputs": [], + "source": [ + "trainingObject = user.linkModelDataset('datasetID') # link dataset to uploaded model in previous step" + ] + }, + { + "cell_type": "markdown", + "id": "be2ac917", + "metadata": {}, + "source": [ + "### 4. Set Training Plan" + ] + }, + { + "cell_type": "markdown", + "id": "1f102be2", + "metadata": {}, + "source": [ + "Configurate your training parameter with:\n", + "\n", + "> `trainingObject.parameter_name(value)`\n", + "\n", + "Check your training plan with:\n", + "\n", + "> `trainingObject.getTrainingPlan()`\n", + "\n", + "Reset your training plan with:\n", + "\n", + "> `trainingObject.resetTrainingPlan()`\n", + "\n", + "The values are as per tensorflow [standard parameters](https://www.tensorflow.org/api_docs/python/tf/keras/Model#fit) value.\n" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "dc9c09e8", + "metadata": { + "scrolled": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " \u001b[1mTraining Description\u001b[0m\n", + "\n", + " experimentName: Give your experiment a name for easy colaboration with your peers! :)\n", + " modelName: CNN\n", + " objective: \n", + " \n", + " \u001b[1mDataset Parameters\u001b[0m\n", + "\n", + " datasetId: DIOAXGuH\n", + " totalDatasetSize: 4000\n", + " allClasses: {'MALIGNANT': 2685, 'BENIGN': 1315}\n", + "\n", + " trainingDatasetSize: 4000\n", + " trainingClasses: {'MALIGNANT': 2685, 'BENIGN': 1315}\n", + " imageShape: 224\n", + " imageType: rgb\n", + " seed: False\n", + " \n", + " \u001b[1mTraining Parameters\u001b[0m\n", + "\n", + " epochs: 10\n", + " cycles: 1\n", + " batchSize: 64\n", + " validation_split: 0.0\n", + " \n", + " \u001b[1mHyperparameters\u001b[0m\n", + "\n", + " optimizer: sgd\n", + " lossFunction: {'type': 'standard', 'value': 'mse'}\n", + " learningRate: {'type': 'constant', 'value': 0.001}\n", + " layersFreeze: \n", + " earlystopCallback: {}\n", + " reducelrCallback: {}\n", + " modelCheckpointCallback: {}\n", + " terminateOnNaNCallback: {}\n", + " \n", + " \u001b[1mAugmentation Parameters\u001b[0m\n", + "\n", + " brightness_range: None\n", + " channel_shift_range: 0.0\n", + " cval: 0.0\n", + " fill_mode: nearest\n", + " height_shift_range: 0.0\n", + " horizontal_flip: False\n", + " rescale: None\n", + " rotation_range: 0\n", + " samplewise_center: False\n", + " samplewise_std_normalization: False\n", + " shear_range: 0.0\n", + " shuffle: True\n", + " vertical_flip: False\n", + " width_shift_range: 0.0\n", + " zoom_range: 0.0\n", + "\n" + ] + } + ], + "source": [ + "trainingObject.experimentName(\"Give your experiment a name for easy colaboration with your peers! :)\") # name is a mandatory field\n", + "trainingObject.getTrainingPlan()" + ] + }, + { + "cell_type": "markdown", + "id": "435d919c", + "metadata": {}, + "source": [ + "### 5. Start Training" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "3df4bf40", + "metadata": { + "scrolled": true + }, + "outputs": [], + "source": [ + "trainingObject.start() # start the experiment as configured above" + ] + }, + { + "cell_type": "markdown", + "id": "b67859de", + "metadata": {}, + "source": [ + "### Logout" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "c81f6d7d", + "metadata": {}, + "outputs": [], + "source": [ + "user.logout()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.16" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} From 33cc46c726b67ee62b2c800e0cd6385ce7298c27 Mon Sep 17 00:00:00 2001 From: Divya Date: Tue, 22 Apr 2025 12:59:34 +0530 Subject: [PATCH 02/12] improvements --- LICENSE.txt | 7 +++++ README.md | 31 ++++++++++--------- .../GenerateCheckWeights.ipynb | 0 .../traceblocTrainingGuide.ipynb | 0 4 files changed, 23 insertions(+), 15 deletions(-) create mode 100644 LICENSE.txt rename GenerateCheckWeights.ipynb => notebooks/GenerateCheckWeights.ipynb (100%) rename traceblocTrainingGuide.ipynb => notebooks/traceblocTrainingGuide.ipynb (100%) diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..e2c3555 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,7 @@ +Copyright 2021 Tracebloc + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index abc200a..5374510 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,11 @@ -#Jupyter notebook for Data Scientist +# Jupyter notebook for Start Training +[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) + Data scientist tool to create and run experiment with required model and training plan . ## Pre-requisite -###1. Install Ananconda +### 1. Install Ananconda ```shell wget https://repo.anaconda.com/archive/Anaconda3-2020.11-Linux-x86_64.sh @@ -11,23 +13,23 @@ bash Anaconda3-2020.11-Linux-x86_64.sh -b -p -y source ~/.bashrc ``` -###2. Create an environment and activate it +### 2. Create an environment and activate it ```shell conda create -n dsenvironemnt python=3.8 conda activate dsenvironemnt ``` -###3. Install required package +### 3. Install required package ```shell pip install -r requirement.txt ``` -###4. Install tensorflow and keras +### 4. Install tensorflow and keras ```shell pip install tensorflow==2.6.0 pip install keras==2.6.0 ``` -####In case of mac m1 machine +#### In case of mac m1 machine Follow this link to install tensorflow: https://caffeinedev.medium.com/how-to-install-tensorflow-on-m1-mac-8e9b91d93706 @@ -43,29 +45,28 @@ pip uninstall -y setuptools pip install numpy pip install setuptools ``` -###4. Install Jupyter Notebook +### 4. Install Jupyter Notebook ```shell conda install jupyter notebook pip install jupyter ``` -###5. Move to Directory +### 5. Move to Directory ```shell cd federated-xray-datascientist ``` -###6. Start Jupyter Notebook +### 6. Start Jupyter Notebook ```shell jupyter notebook ``` -## How to run an experiment -Follow this document guide to learn how to create and run an experiment. ## Testing Jupyter Notebook -In order to start and test experiment, a model file required. +In order to start and test experiment, go through step by step guide [Start Training](https://traceblocdocsdev.azureedge.net/category/start-training) -For this purpose one model is placed in directory ("CNN.py") +## ๐Ÿ“œ License +This project is licensed under the MIT License - see the [LICENSE.txt](LICENSE.txt) file for details. -There are some other test models in this repo in test-models directory. -In order to test those copy the model file from test-models directory to parent directory. +## ๐Ÿ“ž Support +For additional support or questions, please refer to our documentation or contact the Tracebloc support team at `support@tracebloc.io`. diff --git a/GenerateCheckWeights.ipynb b/notebooks/GenerateCheckWeights.ipynb similarity index 100% rename from GenerateCheckWeights.ipynb rename to notebooks/GenerateCheckWeights.ipynb diff --git a/traceblocTrainingGuide.ipynb b/notebooks/traceblocTrainingGuide.ipynb similarity index 100% rename from traceblocTrainingGuide.ipynb rename to notebooks/traceblocTrainingGuide.ipynb From 4b530883e7bfa6a4674b93b88659ea9f3714acdc Mon Sep 17 00:00:00 2001 From: Divya Date: Tue, 22 Apr 2025 14:45:19 +0530 Subject: [PATCH 03/12] improvements --- .gitignore | 146 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 146 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..34af4a1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,146 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +xrays/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# ds store +.DS_Store/* + +.idea +.DS_Store + From 5f9fddc91c3e7d3f9ebbcc927f68f72e0eb8a629 Mon Sep 17 00:00:00 2001 From: Divya Date: Tue, 22 Apr 2025 14:53:03 +0530 Subject: [PATCH 04/12] license updated --- LICENSE.txt | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/LICENSE.txt b/LICENSE.txt index e2c3555..14827a6 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,7 +1,21 @@ -Copyright 2021 Tracebloc +MIT License -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +Copyright (c) 2021 tracebloc -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file From 18af0b1b5e6d6417a0127bb49506ce2412133041 Mon Sep 17 00:00:00 2001 From: Divya Date: Tue, 22 Apr 2025 15:24:24 +0530 Subject: [PATCH 05/12] license updated --- LICENSE.txt => LICENSE | 0 README.md | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename LICENSE.txt => LICENSE (100%) diff --git a/LICENSE.txt b/LICENSE similarity index 100% rename from LICENSE.txt rename to LICENSE diff --git a/README.md b/README.md index 5374510..dca0819 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ jupyter notebook In order to start and test experiment, go through step by step guide [Start Training](https://traceblocdocsdev.azureedge.net/category/start-training) ## ๐Ÿ“œ License -This project is licensed under the MIT License - see the [LICENSE.txt](LICENSE.txt) file for details. +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. ## ๐Ÿ“ž Support From a1910c64411028f9c19f6392334fadff67148a76 Mon Sep 17 00:00:00 2001 From: Divya Date: Tue, 22 Apr 2025 16:48:59 +0530 Subject: [PATCH 06/12] Update LICENSE --- LICENSE | 222 ++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 201 insertions(+), 21 deletions(-) diff --git a/LICENSE b/LICENSE index 14827a6..d5f76c2 100644 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1,201 @@ -MIT License - -Copyright (c) 2021 tracebloc - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2025 tracebloc + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. From 6ea863bce0cf7ccbc18057871a2c1350f2dec94d Mon Sep 17 00:00:00 2001 From: lukasWuttke <54042461+LukasWodka@users.noreply.github.com> Date: Sat, 25 Apr 2026 15:39:21 +0200 Subject: [PATCH 07/12] chore: add auto-add to engineer kanban workflow (#5) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Develop (#1) * added files * improvements * improvements * license updated * license updated * Update LICENSE * Create requirements.txt * Delete requirement.txt * Update traceblocTrainingGuide.ipynb * Update traceblocTrainingGuide.ipynb * Delete requirements.txt * Update traceblocTrainingGuide.ipynb * Update traceblocTrainingGuide.ipynb * Update traceblocTrainingGuide.ipynb * Update traceblocTrainingGuide.ipynb * Update traceblocTrainingGuide.ipynb * Update traceblocTrainingGuide.ipynb * Update traceblocTrainingGuide.ipynb * Update traceblocTrainingGuide.ipynb * Update traceblocTrainingGuide.ipynb * Update traceblocTrainingGuide.ipynb * Update traceblocTrainingGuide.ipynb * Update traceblocTrainingGuide.ipynb * Update traceblocTrainingGuide.ipynb * Update traceblocTrainingGuide.ipynb * Update README.md * Update README.md * Update traceblocTrainingGuide.ipynb * Update README.md * Update README.md * Update training notebook to match Colab quickstart The GitHub notebook was outdated โ€” minimal instructions, links to GitLab (should be GitHub), no prerequisites, no troubleshooting, no model zoo table, no expected outputs. Updated to mirror the Colab notebook with: - Prerequisites checklist with signup/join links - Model zoo task table with all 9 task types and frameworks - Option A (model zoo) / Option B (own model) structure - Dataset ID instructions (where to find it) - Available training commands table - Expected outputs and troubleshooting for each step - "What happens next" section (monitoring, leaderboard, compare) - Links to docs, support, Discord Co-Authored-By: Claude Opus 4.6 (1M context) * Add auto-add to engineer kanban workflow * fix(ci): pin actions/add-to-project to v1.0.2 @v1 is not a valid tag โ€” action publishes full semver only. Pin to v1.0.2. Co-Authored-By: Claude Opus 4.7 (1M context) --------- Co-authored-by: Divya Co-authored-by: Moritz Berthold <76496190+BerthoMo@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) Co-authored-by: Asad Iqbal (Saadi) --- .github/workflows/add-to-kanban.yml | 16 ++ README.md | 90 +++---- notebooks/traceblocTrainingGuide.ipynb | 350 +++++++++++++++---------- 3 files changed, 264 insertions(+), 192 deletions(-) create mode 100644 .github/workflows/add-to-kanban.yml diff --git a/.github/workflows/add-to-kanban.yml b/.github/workflows/add-to-kanban.yml new file mode 100644 index 0000000..45aa70a --- /dev/null +++ b/.github/workflows/add-to-kanban.yml @@ -0,0 +1,16 @@ +name: Add to engineer kanban + +on: + issues: + types: [opened, reopened, transferred] + pull_request: + types: [opened, reopened, ready_for_review] + +jobs: + add-to-project: + runs-on: ubuntu-latest + steps: + - uses: actions/add-to-project@v1.0.2 + with: + project-url: https://github.com/orgs/tracebloc/projects/2 + github-token: ${{ secrets.PROJECTS_KANBAN_TOKEN }} diff --git a/README.md b/README.md index dca0819..6d59255 100644 --- a/README.md +++ b/README.md @@ -1,72 +1,52 @@ -# Jupyter notebook for Start Training -[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) +[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1N00idtpoaq1lk9OJE6g4bMqd8o-Qex2C?usp=sharing) [![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE) [![Platform](https://img.shields.io/badge/platform-tracebloc-00C9A7.svg)](https://ai.tracebloc.io) -Data scientist tool to create and run experiment with required model and training plan . +# Start Training ๐Ÿš€ +Launch an ML training experiment on [tracebloc](https://tracebloc.io/) in under 10 minutes. Connect your account, upload a model, link it to a dataset, configure training parameters, and start benchmarking โ€” all from a single notebook. -## Pre-requisite -### 1. Install Ananconda -```shell -wget https://repo.anaconda.com/archive/Anaconda3-2020.11-Linux-x86_64.sh +## Get started -bash Anaconda3-2020.11-Linux-x86_64.sh -b -p -y +### Option A: Google Colab (recommended) -source ~/.bashrc -``` -### 2. Create an environment and activate it -```shell -conda create -n dsenvironemnt python=3.8 +No local setup. Click the badge above or: -conda activate dsenvironemnt -``` -### 3. Install required package -```shell -pip install -r requirement.txt -``` -### 4. Install tensorflow and keras -```shell -pip install tensorflow==2.6.0 -pip install keras==2.6.0 +**๐Ÿ‘‰ [Open in Google Colab](https://colab.research.google.com/drive/1N00idtpoaq1lk9OJE6g4bMqd8o-Qex2C?usp=sharing)** + +Copy the notebook to your Drive and start running cells. + +### Option B: Run locally +```bash +git clone https://github.com/tracebloc/start-training.git +cd start-training +pip install tracebloc_package>=0.6.32 +jupyter notebook notebooks/traceblocTrainingGuide.ipynb ``` -#### In case of mac m1 machine -Follow this link to install tensorflow: https://caffeinedev.medium.com/how-to-install-tensorflow-on-m1-mac-8e9b91d93706 +## What the notebook covers -or +| Step | What you do | +|:---:|---| +| **1** | Connect to tracebloc with your email + password | +| **2** | Upload a model from the [model zoo](https://github.com/tracebloc/model-zoo) or your own | +| **3** | Link it to a dataset from your use case | +| **4** | Configure training โ€” epochs, batch size, learning rate, augmentation | +| **5** | Start training โ€” model runs inside your secure Kubernetes environment | -Enter following commands -```shell -conda install -c apple tensorflow-deps -pip install tensorflow-macos -pip install tensorflow-metal -pip uninstall -y numpy -pip uninstall -y setuptools -pip install numpy -pip install setuptools -``` -### 4. Install Jupyter Notebook -```shell -conda install jupyter notebook +Results appear on the use case leaderboard in the [tracebloc web app](https://ai.tracebloc.io/). -pip install jupyter -``` -### 5. Move to Directory -```shell -cd federated-xray-datascientist -``` -### 6. Start Jupyter Notebook -```shell -jupyter notebook -``` +## Before you start + +- A **tracebloc account** โ€” [sign up free](https://ai.tracebloc.io/signup) +- An **active use case** with a dataset โ€” [how to join one](https://docs.tracebloc.io/join-use-case/) +- A **model file** โ€” grab one from the [model zoo](https://github.com/tracebloc/model-zoo) or [build your own](https://docs.tracebloc.io/join-use-case/model-optimization) +## Links -## Testing Jupyter Notebook -In order to start and test experiment, go through step by step guide [Start Training](https://traceblocdocsdev.azureedge.net/category/start-training) +[Platform](https://ai.tracebloc.io/) ยท [Docs](https://docs.tracebloc.io/) ยท [Model zoo](https://github.com/tracebloc/model-zoo) ยท [PyPI package](https://pypi.org/project/tracebloc-package/) ยท [Discord](https://discord.gg/tracebloc) -## ๐Ÿ“œ License -This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. +## License +Apache 2.0 โ€” see [LICENSE](LICENSE). -## ๐Ÿ“ž Support -For additional support or questions, please refer to our documentation or contact the Tracebloc support team at `support@tracebloc.io`. +**Need help?** [support@tracebloc.io](mailto:support@tracebloc.io) or [open an issue](https://github.com/tracebloc/start-training/issues). diff --git a/notebooks/traceblocTrainingGuide.ipynb b/notebooks/traceblocTrainingGuide.ipynb index df03e2b..ad150c6 100644 --- a/notebooks/traceblocTrainingGuide.ipynb +++ b/notebooks/traceblocTrainingGuide.ipynb @@ -2,254 +2,338 @@ "cells": [ { "cell_type": "markdown", - "id": "public-perception", "metadata": {}, "source": [ - "## Guide to train machine learning models on Tracebloc" + "# Guide to Train Machine Learning Models on tracebloc \ud83d\ude80\n", + "\n", + "This notebook walks you through training an ML model on the tracebloc platform \u2014 from connecting your account to launching a training run.\n", + "\n", + "**What you'll do:**\n", + "1. Connect to your tracebloc account\n", + "2. Upload a model & weights\n", + "3. Link the model with a dataset\n", + "4. Configure a training plan\n", + "5. Start training\n", + "\n", + "This guide takes about **10\u201315 minutes** to complete." ] }, { "cell_type": "markdown", - "id": "fe54c7a7", "metadata": {}, "source": [ - "In this five step guide, you will learn how to train your ML models on Tracebloc's privacy-preserving ML infrastructure.\n", + "## Prerequisites\n", "\n", - "With that \n", + "Before you begin, make sure you have:\n", "\n", - "* you get access large data sets.\n", - "* collaborate with peers to build high-performance models.\n", - "* participate in enterprise competitions." + "- \u2705 A **tracebloc account** \u2014 [Sign up here](https://ai.tracebloc.io/signup) if you don't have one\n", + "- \u2705 **Joined a use case** \u2014 you need an active use case with a dataset. [How to join a use case \u2192](https://docs.tracebloc.io/join-use-case/explore-use-case)\n", + "- \u2705 A **model file** (`.py`) compatible with the dataset \u2014 you can use one from the [tracebloc model zoo](https://github.com/tracebloc/model-zoo) or bring your own. [Model structure requirements \u2192](https://docs.tracebloc.io/join-use-case/model-optimization)\n", + "\n", + "\ud83d\udcd6 **Full documentation:** [docs.tracebloc.io](https://docs.tracebloc.io)\n", + "\n", + "\ud83d\udca1 **Prefer Google Colab?** [Open this guide in Colab](https://colab.research.google.com/drive/1N00idtpoaq1lk9OJE6g4bMqd8o-Qex2C) \u2014 runs entirely in your browser, no local setup needed." ] }, { "cell_type": "markdown", - "id": "a141f90f", "metadata": {}, "source": [ - "### 1. Connect to Tracebloc" + "---\n", + "## 1. Connect to tracebloc\n", + "\n", + "First, install the tracebloc package and log in with your tracebloc account email and password." ] }, { "cell_type": "code", "execution_count": null, - "id": "numeric-constant", - "metadata": { - "scrolled": true - }, + "metadata": {}, "outputs": [], "source": [ - "from tracebloc_package import User # package used for authentification, model upload, custom training plan, and more" + "# Install the tracebloc package (pinned version for compatibility)\n", + "!pip install tracebloc_package>=0.6.32 -q" ] }, { "cell_type": "code", "execution_count": null, - "id": "d31c8fff", - "metadata": { - "scrolled": true - }, + "metadata": {}, "outputs": [], "source": [ - "user = User() # run cell. You will be asked to enter your email and password to login" + "from tracebloc_package import User\n", + "\n", + "# This will prompt you for your tracebloc email and password\n", + "user = User()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**Expected output:** You'll see a prompt asking for your email and password. After entering them, you should see a confirmation that you're logged in.\n", + "\n", + "\u26a0\ufe0f **If login fails:**\n", + "- Double-check your email and password at [ai.tracebloc.io](https://ai.tracebloc.io)\n", + "- Make sure you've verified your email address\n", + "- If you don't have an account yet, [sign up here](https://ai.tracebloc.io/signup)" ] }, { "cell_type": "markdown", - "id": "brilliant-access", "metadata": {}, "source": [ - "### 2. Upload Model & Weights File" + "---\n", + "## 2. Upload model & weights file\n", + "\n", + "Next, upload your model file to the platform. You have two options:" ] }, { "cell_type": "markdown", - "id": "4c9994f2", "metadata": {}, "source": [ - "* Check out the [**model structure requirements**](https://docs.tracebloc.io/model-structure) \n", - "* You will find models to test tracebloc in the [**tracebloc model zoo**](https://gitlab.com/tracebloc/datascientist/-/tree/master/model_zoo)\n", - "* Not sure how to upload models and weight to Colab? [**upload**](https://docs.tracebloc.io/)\n", - "* Please follow the **file name convention**: if model file name is \"model.py\" -> model weight file name should be \"model_weights.pkl\"." + "### Option A: Use a model from the tracebloc model zoo\n", + "\n", + "The [tracebloc model zoo](https://github.com/tracebloc/model-zoo) has ready-to-use models for common tasks:\n", + "\n", + "| Task | Framework | Path |\n", + "|------|-----------|------|\n", + "| Image classification | PyTorch / TensorFlow | `model_zoo/image_classification/` |\n", + "| Object detection | PyTorch | `model_zoo/object_detection/pytorch/` |\n", + "| Text classification | PyTorch | `model_zoo/text_classification/pytorch/` |\n", + "| Tabular classification | PyTorch / Sklearn | `model_zoo/tabular_classification/` |\n", + "| Tabular regression | PyTorch / Sklearn | `model_zoo/tabular_regression/` |\n", + "| Time series forecasting | PyTorch | `model_zoo/time_series_forecasting/pytorch/` |\n", + "| Semantic segmentation | PyTorch | `model_zoo/semantic_segmentation/pytorch/` |\n", + "| Keypoint detection | PyTorch | `model_zoo/keypoint_detection/pytorch/` |\n", + "| Time-to-event prediction | PyTorch / Lifelines / Scikit-survival | `model_zoo/time_to_event_prediction/` |\n", + "\n", + "Clone the model zoo and pick a model that fits your use case:" ] }, { "cell_type": "code", "execution_count": null, - "id": "meaning-professional", - "metadata": { - "scrolled": true - }, + "metadata": {}, "outputs": [], "source": [ - "user.uploadModel('filename') # (model, weights=True)" + "# Clone the tracebloc model zoo (skip if you already have it)\n", + "!git clone https://github.com/tracebloc/model-zoo.git ../model-zoo 2>/dev/null || echo \"model-zoo already cloned\"" ] }, { - "cell_type": "markdown", - "id": "d7c16a36", + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ - "### 3. Link uploaded Model with Dataset" + "# List available models\n", + "!ls ../model-zoo/model_zoo/" ] }, { "cell_type": "markdown", - "id": "21772887", "metadata": {}, "source": [ - "This step links the above model with the provided dataset. The model should be [compatible](https://docs.tracebloc.io/) with the dataset." + "### Option B: Use your own model\n", + "\n", + "You can upload your own model file. Place your `.py` file in the working directory or provide the full path.\n", + "\n", + "Make sure your model follows the [model structure requirements](https://docs.tracebloc.io/join-use-case/model-optimization)." ] }, { "cell_type": "code", "execution_count": null, - "id": "03c08e31", "metadata": {}, "outputs": [], "source": [ - "trainingObject = user.linkModelDataset('datasetID') # link dataset to uploaded model in previous step" + "# Upload your model file to tracebloc\n", + "# Replace the path with your actual model file location\n", + "MODEL_PATH = \"../model-zoo/model_zoo/image_classification/pytorch/densenet.py\" # <-- change this\n", + "\n", + "user.uploadModel(MODEL_PATH)" ] }, { "cell_type": "markdown", - "id": "be2ac917", "metadata": {}, "source": [ - "### 4. Set Training Plan" + "**Expected output:** A confirmation message showing the model was uploaded successfully.\n", + "\n", + "\ud83d\udca1 **Loading weights?** Follow this naming convention:\n", + "- Model file: `mymodel.py`\n", + "- Weights file: `mymodel_weights.pkl`\n", + "\n", + "The weights file must be in the same directory as the model file.\n", + "\n", + "```python\n", + "# To upload with pretrained weights:\n", + "user.uploadModel(MODEL_PATH, weights=True)\n", + "```" ] }, { "cell_type": "markdown", - "id": "1f102be2", "metadata": {}, "source": [ - "Configurate your training parameter with:\n", + "---\n", + "## 3. Link uploaded model with dataset\n", "\n", - "> `trainingObject.parameter_name(value)`\n", + "Now connect your uploaded model to a dataset from your use case.\n", "\n", - "Check your training plan with:\n", + "**Where to find the Dataset ID:**\n", + "1. Go to [ai.tracebloc.io](https://ai.tracebloc.io) and open your use case\n", + "2. Look for the **\"Training Dataset ID\"** shown in the center of the use case panel\n", + "3. Copy that ID and paste it below\n", "\n", - "> `trainingObject.getTrainingPlan()`\n", + "The dataset ID is a short alphanumeric string (e.g., `DKbtefZy`)." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Paste your Training Dataset ID here\n", + "DATASET_ID = \"YOUR_DATASET_ID_HERE\" # <-- replace with your actual dataset ID (e.g., \"DKbtefZy\")\n", "\n", - "Reset your training plan with:\n", + "trainingObject = user.linkModelDataset(DATASET_ID)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**Expected output:** A confirmation that the model and dataset are linked.\n", "\n", - "> `trainingObject.resetTrainingPlan()`\n", + "\u26a0\ufe0f **If this fails:**\n", + "- Make sure the dataset ID is correct (check your use case page)\n", + "- Your model must be compatible with the dataset (e.g., an image classification model for an image dataset)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "---\n", + "## 4. Set training plan\n", + "\n", + "Configure your training parameters. Start by naming your experiment, then adjust any parameters you need.\n", "\n", - "The values are as per tensorflow [standard parameters](https://www.tensorflow.org/api_docs/python/tf/keras/Model#fit) value.\n" + "| Command | Description | Example |\n", + "|---------|-------------|--------|\n", + "| `trainingObject.experimentName(\"...\")` | Name your experiment | `trainingObject.experimentName(\"My first run\")` |\n", + "| `trainingObject.epochs(n)` | Number of training epochs | `trainingObject.epochs(10)` |\n", + "| `trainingObject.optimizer(\"...\")` | Set optimizer | `trainingObject.optimizer(\"adam\")` |\n", + "| `trainingObject.learningRate({...})` | Set learning rate | `trainingObject.learningRate({\"type\": \"constant\", \"value\": 0.001})` |\n", + "| `trainingObject.validation_split(n)` | Validation split | `trainingObject.validation_split(0.2)` |\n", + "| `trainingObject.getTrainingPlan()` | View the full training plan | |\n", + "| `trainingObject.resetTrainingPlan()` | Reset to defaults | |\n", + "\n", + "For all available parameters, see the [Hyperparameters reference](https://docs.tracebloc.io/join-use-case/hyperparameters)." ] }, { "cell_type": "code", - "execution_count": 7, - "id": "dc9c09e8", - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - " \u001b[1mTraining Description\u001b[0m\n", - "\n", - " experimentName: Give your experiment a name for easy colaboration with your peers! :)\n", - " modelName: CNN\n", - " objective: \n", - " \n", - " \u001b[1mDataset Parameters\u001b[0m\n", - "\n", - " datasetId: DIOAXGuH\n", - " totalDatasetSize: 4000\n", - " allClasses: {'MALIGNANT': 2685, 'BENIGN': 1315}\n", - "\n", - " trainingDatasetSize: 4000\n", - " trainingClasses: {'MALIGNANT': 2685, 'BENIGN': 1315}\n", - " imageShape: 224\n", - " imageType: rgb\n", - " seed: False\n", - " \n", - " \u001b[1mTraining Parameters\u001b[0m\n", - "\n", - " epochs: 10\n", - " cycles: 1\n", - " batchSize: 64\n", - " validation_split: 0.0\n", - " \n", - " \u001b[1mHyperparameters\u001b[0m\n", - "\n", - " optimizer: sgd\n", - " lossFunction: {'type': 'standard', 'value': 'mse'}\n", - " learningRate: {'type': 'constant', 'value': 0.001}\n", - " layersFreeze: \n", - " earlystopCallback: {}\n", - " reducelrCallback: {}\n", - " modelCheckpointCallback: {}\n", - " terminateOnNaNCallback: {}\n", - " \n", - " \u001b[1mAugmentation Parameters\u001b[0m\n", - "\n", - " brightness_range: None\n", - " channel_shift_range: 0.0\n", - " cval: 0.0\n", - " fill_mode: nearest\n", - " height_shift_range: 0.0\n", - " horizontal_flip: False\n", - " rescale: None\n", - " rotation_range: 0\n", - " samplewise_center: False\n", - " samplewise_std_normalization: False\n", - " shear_range: 0.0\n", - " shuffle: True\n", - " vertical_flip: False\n", - " width_shift_range: 0.0\n", - " zoom_range: 0.0\n", - "\n" - ] - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ - "trainingObject.experimentName(\"Give your experiment a name for easy colaboration with your peers! :)\") # name is a mandatory field\n", + "# Set experiment name\n", + "trainingObject.experimentName(\"My Experiment\")\n", + "\n", + "# Set training parameters\n", + "trainingObject.epochs(10)\n", + "\n", + "# Review your training plan\n", "trainingObject.getTrainingPlan()" ] }, { "cell_type": "markdown", - "id": "435d919c", "metadata": {}, "source": [ - "### 5. Start Training" + "**Expected output:** A summary showing all training parameters including:\n", + "- **Training Description** \u2014 experiment name, model name, objective\n", + "- **Dataset Parameters** \u2014 dataset ID, size, classes\n", + "- **Training Parameters** \u2014 epochs, cycles, batch size, validation split\n", + "- **Hyperparameters** \u2014 optimizer, loss function, learning rate, callbacks\n", + "- **Augmentation Parameters** \u2014 data augmentation settings\n", + "\n", + "Review these carefully before starting. Adjust any values using the commands in the table above." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "---\n", + "## 5. Start training\n", + "\n", + "Everything configured? Launch the training run:" ] }, { "cell_type": "code", "execution_count": null, - "id": "3df4bf40", - "metadata": { - "scrolled": true - }, + "metadata": {}, "outputs": [], "source": [ - "trainingObject.start() # start the experiment as configured above" + "trainingObject.start() # start the experiment as configured above" ] }, { "cell_type": "markdown", - "id": "b67859de", "metadata": {}, "source": [ - "### Logout" + "## What happens next?\n", + "\n", + "Your model is now being trained on the tracebloc infrastructure. Here's what to expect:\n", + "\n", + "1. **Training starts** \u2014 the model will begin training on the linked dataset inside a secure environment\n", + "2. **Monitor progress** \u2014 go to your use case on [ai.tracebloc.io](https://ai.tracebloc.io) to see training status and logs\n", + "3. **View results** \u2014 once training completes, check the leaderboard in your use case to see how your model performed\n", + "4. **Compare models** \u2014 if other team members or vendors have submitted models, you can compare performance metrics side by side\n", + "\n", + "Training time depends on your dataset size, model complexity, and the number of epochs. A typical training run takes a few minutes to a few hours.\n", + "\n", + "\ud83d\udcd6 **Learn more:** [How to evaluate models \u2192](https://docs.tracebloc.io/join-use-case/model-evaluation)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "---\n", + "## Logout\n", + "\n", + "When you're done, log out to end your session:" ] }, { "cell_type": "code", "execution_count": null, - "id": "c81f6d7d", "metadata": {}, "outputs": [], "source": [ "user.logout()" ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "---\n", + "## Need help?\n", + "\n", + "- \ud83d\udcd6 [Documentation](https://docs.tracebloc.io)\n", + "- \ud83d\udce7 [support@tracebloc.io](mailto:support@tracebloc.io)\n", + "- \ud83d\udc1b [Open an issue](https://github.com/tracebloc/start-training/issues)\n", + "- \ud83d\udcac [Discord](https://discord.gg/tracebloc)" + ] } ], "metadata": { @@ -259,18 +343,10 @@ "name": "python3" }, "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.9.16" + "version": "3.9.0" } }, "nbformat": 4, - "nbformat_minor": 5 + "nbformat_minor": 4 } From 310f938e737e12c01ccbec95edfa4184c41e0a14 Mon Sep 17 00:00:00 2001 From: lukasWuttke <54042461+LukasWodka@users.noreply.github.com> Date: Thu, 7 May 2026 17:39:18 +0200 Subject: [PATCH 08/12] ci: add WIP-limit-check caller workflow (#10) --- .github/workflows/wip-limit-check.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .github/workflows/wip-limit-check.yml diff --git a/.github/workflows/wip-limit-check.yml b/.github/workflows/wip-limit-check.yml new file mode 100644 index 0000000..8c027df --- /dev/null +++ b/.github/workflows/wip-limit-check.yml @@ -0,0 +1,10 @@ +name: WIP limit check + +on: + pull_request: + types: [opened, ready_for_review] + +jobs: + check: + uses: tracebloc/.github/.github/workflows/wip-limit-check.yml@main + secrets: inherit From 329e8cf4cf272e7ba9fdfc132c2f95b14e76f72e Mon Sep 17 00:00:00 2001 From: lukasWuttke <54042461+LukasWodka@users.noreply.github.com> Date: Thu, 7 May 2026 17:39:41 +0200 Subject: [PATCH 09/12] chore: add PR template + customer bump + stale auto-close (#6) * chore: add PR template * ci: add customer priority bump caller * ci: add stale backlog auto-close * ci: add set-pr-status caller workflow --- .github/pull_request_template.md | 28 +++++++++++++++++ .github/workflows/customer-priority-bump.yml | 10 ++++++ .github/workflows/set-pr-status.yml | 10 ++++++ .github/workflows/stale-backlog.yml | 33 ++++++++++++++++++++ 4 files changed, 81 insertions(+) create mode 100644 .github/pull_request_template.md create mode 100644 .github/workflows/customer-priority-bump.yml create mode 100644 .github/workflows/set-pr-status.yml create mode 100644 .github/workflows/stale-backlog.yml diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..cea0c18 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,28 @@ +## Summary + + +## Related + + +## Type of change +- [ ] Feature +- [ ] Bug fix +- [ ] Tech-debt / refactor +- [ ] Docs +- [ ] Security / hardening +- [ ] Breaking change + +## Test plan + + +## Screenshots / recordings + + +## Deployment notes + + +## Checklist +- [ ] Tests added / updated and passing locally +- [ ] Docs updated if behavior or config changed +- [ ] No secrets / credentials in the diff +- [ ] For security-sensitive paths: appropriate reviewer requested diff --git a/.github/workflows/customer-priority-bump.yml b/.github/workflows/customer-priority-bump.yml new file mode 100644 index 0000000..ea4e9ea --- /dev/null +++ b/.github/workflows/customer-priority-bump.yml @@ -0,0 +1,10 @@ +name: Customer priority bump + +on: + issues: + types: [labeled] + +jobs: + bump: + uses: tracebloc/.github/.github/workflows/customer-priority-bump.yml@main + secrets: inherit diff --git a/.github/workflows/set-pr-status.yml b/.github/workflows/set-pr-status.yml new file mode 100644 index 0000000..e19a67e --- /dev/null +++ b/.github/workflows/set-pr-status.yml @@ -0,0 +1,10 @@ +name: Set PR Status + +on: + pull_request: + types: [opened, reopened, ready_for_review, converted_to_draft] + +jobs: + set-status: + uses: tracebloc/.github/.github/workflows/set-pr-status.yml@main + secrets: inherit diff --git a/.github/workflows/stale-backlog.yml b/.github/workflows/stale-backlog.yml new file mode 100644 index 0000000..318e372 --- /dev/null +++ b/.github/workflows/stale-backlog.yml @@ -0,0 +1,33 @@ +name: Close stale backlog issues + +on: + schedule: + - cron: '0 0 * * 1' # Mondays 00:00 UTC + workflow_dispatch: {} + +permissions: + issues: write + pull-requests: write + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9 + with: + days-before-issue-stale: 42 # 6 weeks of no activity โ†’ warning + days-before-issue-close: 14 # +2 weeks of silence โ†’ close + stale-issue-label: 'stale' + stale-issue-message: | + ๐Ÿ‘‹ This issue has had no activity for 6 weeks. + + If it's still relevant, please leave a comment with current context (or assign someone). Otherwise it will auto-close in 2 weeks. + + To exempt permanently, add the `keep-open` label. + close-issue-message: | + Closing due to 8+ weeks of inactivity. Please reopen with current context if relevant. + exempt-issue-labels: 'keep-open,blocked' + # PRs: don't auto-stale โ€” branch protection + active reviews govern those + days-before-pr-stale: -1 + days-before-pr-close: -1 + operations-per-run: 50 From 942cc791b5f898bed1e8bd54a65ebda6099e8d89 Mon Sep 17 00:00:00 2001 From: lukasWuttke <54042461+LukasWodka@users.noreply.github.com> Date: Thu, 7 May 2026 17:39:56 +0200 Subject: [PATCH 10/12] ci: add kanban closure-routing caller workflow (#9) --- .github/workflows/kanban-closure-routing.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/workflows/kanban-closure-routing.yml diff --git a/.github/workflows/kanban-closure-routing.yml b/.github/workflows/kanban-closure-routing.yml new file mode 100644 index 0000000..0b54df5 --- /dev/null +++ b/.github/workflows/kanban-closure-routing.yml @@ -0,0 +1,12 @@ +name: Kanban closure routing + +on: + pull_request: + types: [closed] + issues: + types: [closed] + +jobs: + route: + uses: tracebloc/.github/.github/workflows/kanban-closure-router.yml@main + secrets: inherit From b593ad37b7db5798c2ece1fbb5c1bf0c900de427 Mon Sep 17 00:00:00 2001 From: "Asad Iqbal (Saadi)" Date: Fri, 15 May 2026 12:47:03 +0500 Subject: [PATCH 11/12] chore: sync develop with main and tidy Python conventions (#14) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Develop (#1) * added files * improvements * improvements * license updated * license updated * Update LICENSE * Create requirements.txt * Delete requirement.txt * Update traceblocTrainingGuide.ipynb * Update traceblocTrainingGuide.ipynb * Delete requirements.txt * Update traceblocTrainingGuide.ipynb * Update traceblocTrainingGuide.ipynb * Update traceblocTrainingGuide.ipynb * Update traceblocTrainingGuide.ipynb * Update traceblocTrainingGuide.ipynb * Update traceblocTrainingGuide.ipynb * Update traceblocTrainingGuide.ipynb * Update traceblocTrainingGuide.ipynb * Update traceblocTrainingGuide.ipynb * Update traceblocTrainingGuide.ipynb * Update traceblocTrainingGuide.ipynb * Update traceblocTrainingGuide.ipynb * Update traceblocTrainingGuide.ipynb * Update traceblocTrainingGuide.ipynb * Update README.md * Update README.md * Update traceblocTrainingGuide.ipynb * Update README.md * Update README.md * Update training notebook to match Colab quickstart The GitHub notebook was outdated โ€” minimal instructions, links to GitLab (should be GitHub), no prerequisites, no troubleshooting, no model zoo table, no expected outputs. Updated to mirror the Colab notebook with: - Prerequisites checklist with signup/join links - Model zoo task table with all 9 task types and frameworks - Option A (model zoo) / Option B (own model) structure - Dataset ID instructions (where to find it) - Available training commands table - Expected outputs and troubleshooting for each step - "What happens next" section (monitoring, leaderboard, compare) - Links to docs, support, Discord Co-Authored-By: Claude Opus 4.6 (1M context) * docs: switch install to extras syntax for tracebloc_package 0.6.33 Aligns with the optional-dependency-groups change shipping in tracebloc-py-package 0.6.33. Default install no longer bundles every ML framework โ€” users pick the extra that matches their setup. - README.md: 3-line extras table in the local-setup section. - notebooks/traceblocTrainingGuide.ipynb cell 3: switch install cmd to [pytorch] as the most common setup; comment points at [tensorflow] and [all]. DO NOT MERGE until tracebloc_package 0.6.33 is live on real PyPI. Currently 0.6.33 is only on TestPyPI. Co-Authored-By: Claude Opus 4.7 (1M context) * docs: rename camelCase API calls in notebook + bump install pin to 0.7.0 Builds on top of the install-extras change (eeae340) and broadens scope for the upcoming tracebloc_package 0.7.0 release. Notebook changes (notebooks/traceblocTrainingGuide.ipynb): - Cell 3 install pin: >=0.6.33 -> >=0.7.0 - Cell 11: user.uploadModel(MODEL_PATH) -> user.upload_model(MODEL_PATH) - Cell 12 (markdown docs example): same uploadModel rename - Cell 14: user.linkModelDataset(DATASET_ID) -> user.link_model_dataset(DATASET_ID) - Cell 16 (reference table): experimentName, learningRate, getTrainingPlan, resetTrainingPlan -> experiment_name, learning_rate, get_training_plan, reset_training_plan - Cell 17: experimentName + getTrainingPlan call sites updated README.md: pip install lines bumped from >=0.6.33 to >=0.7.0 across all three extras (pytorch, tensorflow, all). Static rewrite only; the notebook was not executed (requires real workspace credentials). All deprecated symbols touched here have deprecation aliases on the Python side, so callers using the old names would still work but emit DeprecationWarning. Supersedes #4 (which was scoped only to the 0.6.33 install-extras migration). The 0.6.33 release path is being collapsed into 0.7.0 now that SDK.2/3 work has landed on develop, so this PR ships both changes together. Cannot merge until tracebloc_package 0.7.0 is published to real PyPI โ€” same merge-coordination block as #4. Co-Authored-By: Claude Opus 4.7 (1M context) * Add CLAUDE.md for Claude Code guidance (#3) Co-authored-by: Claude Opus 4.6 (1M context) * docs: migrate notebooks to tracebloc 0.8.x (closes #11) The SDK was renamed in tracebloc/tracebloc-py-package#135. `tracebloc==0.8.1` is live on PyPI. Notebooks and docs here still pointed at the old `tracebloc_package` name. - Install cells / commands: `tracebloc_package[X]>=0.7.0` -> `tracebloc[X]>=0.8.0`. - Import cells: `from tracebloc_package import ...` -> `from tracebloc import ...`. - README links the new PyPI page (`tracebloc`, not `tracebloc-package`). - CLAUDE.md notes the historical name and the metadata-only redirect that keeps `pip install tracebloc_package` working for old notebooks. Old name keeps working in 0.8.x via the compat shim (with DeprecationWarning) and the redirect distribution on PyPI; this PR moves the canonical examples to the new name. Co-Authored-By: Claude Opus 4.7 * docs: bump install pin to 0.8.1 (latest) * chore: align develop with main and tidy up Python conventions - Delete stale `requirement.txt` (matches main; install lives in README) - Rename `trainingObject` โ†’ `training_object` in traceblocTrainingGuide.ipynb (PEP 8) - Rewrite GenerateCheckWeights.ipynb against the 0.8.x SDK (`from tracebloc import ModelWeights` no longer exists). New version walks through generating + verifying a `_weights.pkl` for both PyTorch and TensorFlow models, matching the format the SDK expects. Closes #13 Co-Authored-By: Claude Opus 4.7 * chore: rename training_object โ†’ training in training guide Shorter, reads more naturally in the configuration calls (`training.epochs(10)` vs `training_object.epochs(10)`). Co-Authored-By: Claude Opus 4.7 * docs: align dataset wording with actual UI labels - "Training Dataset ID" โ†’ "Dataset" (the actual label in the use case panel; the value next to it is the ID) - "use case page" โ†’ "use case panel" (matches the term used elsewhere in the notebook) Co-Authored-By: Claude Opus 4.7 * docs: add step 0 โ€” save a copy to Drive (Colab) Colab users who skip "Save a copy in Drive" lose their edits (model path, dataset ID, training plan) on reload. Co-Authored-By: Claude Opus 4.7 * docs: inline Drive-save tip in Prerequisites, drop Step 0 Step 0 was redundant for local readers and broke the 1-5 numbered flow. Folding the "Save a copy in Drive" reminder into the existing Colab callout keeps the guidance where Colab users will see it (next to the Colab link they're about to click) without adding a "Skip this" item for everyone else. Co-Authored-By: Claude Opus 4.7 * docs: repoint Colab links to GitHub-backed URL Previously the badge + body link + in-notebook link all pointed at a Drive-hosted Colab copy (file id 1N00idtp...) that had to be manually synced whenever the notebook changed โ€” which is how it ended up stale. Switch to the colab.research.google.com/github/... form, which loads the canonical notebook from the repo on `main` directly. Future updates to traceblocTrainingGuide.ipynb propagate without any manual Drive step. Co-Authored-By: Claude Opus 4.7 * fix: use .pth extension for PyTorch weights in GenerateCheckWeights The setup cell hardcoded weights_path to '_weights.pkl' for all frameworks, but the notebook header documents the convention as '.pth' for PyTorch โ€” and torch.save() produces a zip archive that isn't a generic pickle. Mixing the extension confuses users who hand the file to anything other than torch.load(). Move weights_path into each framework-specific cell so the extension matches the documented convention: '.pth' for the PyTorch save/verify cells, '.pkl' for the TensorFlow ones. Reported by Cursor Bugbot on PR #14. Co-Authored-By: Claude Opus 4.7 --------- Co-authored-by: Divya Co-authored-by: Moritz Berthold <76496190+BerthoMo@users.noreply.github.com> Co-authored-by: lukasWuttke <54042461+LukasWodka@users.noreply.github.com> Co-authored-by: Lukas Wuttke Co-authored-by: Claude Opus 4.6 (1M context) Co-authored-by: Arturo Peroni --- CLAUDE.md | 35 +++++ README.md | 13 +- notebooks/GenerateCheckWeights.ipynb | 196 +++++++++++++------------ notebooks/traceblocTrainingGuide.ipynb | 78 +++------- requirement.txt | 1 - 5 files changed, 170 insertions(+), 153 deletions(-) create mode 100644 CLAUDE.md delete mode 100644 requirement.txt diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..05b4cc2 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,35 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## What this repo does + +Jupyter notebook quick-start guide for running ML training experiments on the tracebloc platform. Walks users through connecting their account, uploading a model, linking a dataset, configuring training parameters, and starting an experiment. + +## Notebook locations + +- `notebooks/traceblocTrainingGuide.ipynb` -- main training guide (also available on [Google Colab](https://colab.research.google.com/drive/1N00idtpoaq1lk9OJE6g4bMqd8o-Qex2C?usp=sharing)) +- `notebooks/GenerateCheckWeights.ipynb` -- utility for generating/checking model weights + +## How users run it + +### Google Colab (recommended) +Open the Colab link, copy to Drive, and run cells. + +### Locally +```bash +pip install "tracebloc[pytorch]>=0.8.1" +jupyter notebook notebooks/traceblocTrainingGuide.ipynb +``` + +## Prerequisites + +- A tracebloc account +- An active use case with a dataset +- A model file (from the [model-zoo](https://github.com/tracebloc/model-zoo) repo or custom) + +## Key dependency + +[`tracebloc`](https://pypi.org/project/tracebloc/) (PyPI, 0.8.x+) -- the Python SDK used in the notebook to authenticate, upload models, and start training. + +> Was published as `tracebloc_package` before 0.8.0. The old install command (`pip install tracebloc_package`) still resolves via a metadata-only redirect on PyPI, but new notebooks should use the canonical `tracebloc` name. diff --git a/README.md b/README.md index 6d59255..6e9eb7d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1N00idtpoaq1lk9OJE6g4bMqd8o-Qex2C?usp=sharing) [![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE) [![Platform](https://img.shields.io/badge/platform-tracebloc-00C9A7.svg)](https://ai.tracebloc.io) +[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tracebloc/start-training/blob/main/notebooks/traceblocTrainingGuide.ipynb) [![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE) [![Platform](https://img.shields.io/badge/platform-tracebloc-00C9A7.svg)](https://ai.tracebloc.io) # Start Training ๐Ÿš€ @@ -10,7 +10,7 @@ Launch an ML training experiment on [tracebloc](https://tracebloc.io/) in under No local setup. Click the badge above or: -**๐Ÿ‘‰ [Open in Google Colab](https://colab.research.google.com/drive/1N00idtpoaq1lk9OJE6g4bMqd8o-Qex2C?usp=sharing)** +**๐Ÿ‘‰ [Open in Google Colab](https://colab.research.google.com/github/tracebloc/start-training/blob/main/notebooks/traceblocTrainingGuide.ipynb)** Copy the notebook to your Drive and start running cells. @@ -19,7 +19,12 @@ Copy the notebook to your Drive and start running cells. ```bash git clone https://github.com/tracebloc/start-training.git cd start-training -pip install tracebloc_package>=0.6.32 + +# Pick the extra that matches your ML framework: +pip install "tracebloc[pytorch]>=0.8.1" # most common +# pip install "tracebloc[tensorflow]>=0.8.1" # TensorFlow +# pip install "tracebloc[all]>=0.8.1" # everything + jupyter notebook notebooks/traceblocTrainingGuide.ipynb ``` @@ -43,7 +48,7 @@ Results appear on the use case leaderboard in the [tracebloc web app](https://ai ## Links -[Platform](https://ai.tracebloc.io/) ยท [Docs](https://docs.tracebloc.io/) ยท [Model zoo](https://github.com/tracebloc/model-zoo) ยท [PyPI package](https://pypi.org/project/tracebloc-package/) ยท [Discord](https://discord.gg/tracebloc) +[Platform](https://ai.tracebloc.io/) ยท [Docs](https://docs.tracebloc.io/) ยท [Model zoo](https://github.com/tracebloc/model-zoo) ยท [PyPI package](https://pypi.org/project/tracebloc/) ยท [Discord](https://discord.gg/tracebloc) ## License diff --git a/notebooks/GenerateCheckWeights.ipynb b/notebooks/GenerateCheckWeights.ipynb index 6f9cb21..0f079bc 100644 --- a/notebooks/GenerateCheckWeights.ipynb +++ b/notebooks/GenerateCheckWeights.ipynb @@ -2,127 +2,143 @@ "cells": [ { "cell_type": "markdown", - "id": "81eecdd6", + "id": "0e68ce9a", "metadata": {}, "source": [ - "### Generate Weights" + "# Generate & Verify Model Weights\n", + "\n", + "A small utility for producing a starting-weights file that pairs with a tracebloc model file.\n", + "\n", + "Use this when:\n", + "- You wrote a custom model and need a `_weights.pkl` to upload alongside it\n", + "- You want to confirm a weights file loads correctly before running `user.upload_model(..., weights=True)`\n", + "\n", + "**Convention:** tracebloc expects a model file `mymodel.py` defining a function `MyModel()`, and a companion weights file named `mymodel_weights.pkl` (or `.pth` for PyTorch) in the same directory.\n", + "\n", + "\ud83d\udcd6 [Model structure requirements](https://docs.tracebloc.io/join-use-case/model-optimization)" + ] + }, + { + "cell_type": "markdown", + "id": "db0877bc", + "metadata": {}, + "source": [ + "## 1. Point at your model file\n", + "\n", + "Set the path to the `.py` file that defines `MyModel()`. The weights file will be written next to it." ] }, { "cell_type": "code", - "execution_count": 1, - "id": "10056885", + "id": "732903bb", "metadata": {}, + "execution_count": null, "outputs": [], + "source": "import importlib.util\nimport os\n\nMODEL_PATH = \"mymodel.py\" # <-- change to your model file\n\nmodel_dir = os.path.dirname(os.path.abspath(MODEL_PATH)) or \".\"\nmodel_name = os.path.splitext(os.path.basename(MODEL_PATH))[0]\n\nspec = importlib.util.spec_from_file_location(model_name, MODEL_PATH)\nmodule = importlib.util.module_from_spec(spec)\nspec.loader.exec_module(module)" + }, + { + "cell_type": "markdown", + "id": "d7e0f3ca", + "metadata": {}, "source": [ - "from tracebloc_package import ModelWeights" + "## 2. Generate weights\n", + "\n", + "Pick the cell that matches your framework. Each one builds the model via `MyModel()` and writes a weights file using the format tracebloc expects." ] }, { - "cell_type": "code", - "execution_count": 2, - "id": "6bcc8615", + "cell_type": "markdown", + "id": "c55d3110", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Enter Model Name : CNN\n" - ] - } - ], "source": [ - "weights = ModelWeights() # load module and Enter model file name" + "### PyTorch\n", + "\n", + "Saves the model's `state_dict` with `torch.save` \u2014 tracebloc loads it back via `model.load_state_dict(torch.load(...))`." ] }, { "cell_type": "code", - "execution_count": 3, - "id": "97c9f85a", + "id": "0356466d", + "metadata": {}, + "execution_count": null, + "outputs": [], + "source": "import torch\n\nweights_path = os.path.join(model_dir, f\"{model_name}_weights.pth\")\n\nmodel = module.MyModel()\ntorch.save(model.state_dict(), weights_path)\nprint(f\"Wrote {weights_path}\")" + }, + { + "cell_type": "markdown", + "id": "25068e30", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Metal device set to: Apple M1\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2022-06-16 16:02:01.507828: I tensorflow/core/common_runtime/pluggable_device/pluggable_device_factory.cc:305] Could not identify NUMA node of platform GPU ID 0, defaulting to 0. Your kernel may not have been built with NUMA support.\n", - "2022-06-16 16:02:01.508042: I tensorflow/core/common_runtime/pluggable_device/pluggable_device_factory.cc:271] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 0 MB memory) -> physical PluggableDevice (device: 0, name: METAL, pci bus id: )\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Model input shape: 224\n", - "Model output shape: 3\n", - "Dumped new weights for CNN model\n" - ] - } - ], "source": [ - "weights.generateweights() # generate weights" + "### TensorFlow / Keras\n", + "\n", + "Saves the weights as a pickled list of arrays \u2014 tracebloc loads it back via `model.set_weights(pickle.load(...))`." ] }, { "cell_type": "code", - "execution_count": 4, - "id": "ee7cd1f1", + "id": "0c902690", + "metadata": {}, + "execution_count": null, + "outputs": [], + "source": "import pickle\n\nweights_path = os.path.join(model_dir, f\"{model_name}_weights.pkl\")\n\nmodel = module.MyModel()\nwith open(weights_path, \"wb\") as f:\n pickle.dump(model.get_weights(), f)\nprint(f\"Wrote {weights_path}\")" + }, + { + "cell_type": "markdown", + "id": "fcdd9389", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Model: \"model\"\n", - "_________________________________________________________________\n", - " Layer (type) Output Shape Param # \n", - "=================================================================\n", - " input_1 (InputLayer) [(None, 224, 224, 3)] 0 \n", - " \n", - " zero_padding2d (ZeroPadding (None, 230, 230, 3) 0 \n", - " 2D) \n", - " \n", - " conv2d (Conv2D) (None, 112, 112, 64) 9472 \n", - " \n", - " batch_normalization (BatchN (None, 112, 112, 64) 256 \n", - " ormalization) \n", - " \n", - " activation (Activation) (None, 112, 112, 64) 0 \n", - " \n", - " max_pooling2d (MaxPooling2D (None, 55, 55, 64) 0 \n", - " ) \n", - " \n", - " flatten (Flatten) (None, 193600) 0 \n", - " \n", - " dense (Dense) (None, 3) 580803 \n", - " \n", - "=================================================================\n", - "Total params: 590,531\n", - "Trainable params: 590,403\n", - "Non-trainable params: 128\n", - "_________________________________________________________________\n" - ] - } - ], "source": [ - "weights.checkweights() # check if weights file are properly generated" + "## 3. Verify the weights file\n", + "\n", + "Reload the weights into a fresh model instance to confirm shapes match and the file is readable. Run the cell that matches your framework." + ] + }, + { + "cell_type": "markdown", + "id": "62c3b96f", + "metadata": {}, + "source": [ + "### PyTorch" ] }, { "cell_type": "code", + "id": "2a98f6ae", + "metadata": {}, "execution_count": null, - "id": "2eb7a796", + "outputs": [], + "source": "import torch\n\nweights_path = os.path.join(model_dir, f\"{model_name}_weights.pth\")\n\nverify_model = module.MyModel()\nverify_model.load_state_dict(torch.load(weights_path))\nprint(f\"Loaded weights into {type(verify_model).__name__}\")\nprint(f\" parameters: {sum(p.numel() for p in verify_model.parameters()):,}\")" + }, + { + "cell_type": "markdown", + "id": "860d0ad5", + "metadata": {}, + "source": [ + "### TensorFlow / Keras" + ] + }, + { + "cell_type": "code", + "id": "bb9a78ae", "metadata": {}, + "execution_count": null, "outputs": [], - "source": [] + "source": "import pickle\n\nweights_path = os.path.join(model_dir, f\"{model_name}_weights.pkl\")\n\nverify_model = module.MyModel()\nwith open(weights_path, \"rb\") as f:\n verify_model.set_weights(pickle.load(f))\nverify_model.summary()" + }, + { + "cell_type": "markdown", + "id": "8ac220ec", + "metadata": {}, + "source": [ + "## 4. Upload with your model\n", + "\n", + "Once the weights file is in place, upload both together from the main training notebook:\n", + "\n", + "```python\n", + "user.upload_model(MODEL_PATH, weights=True)\n", + "```\n", + "\n", + "The SDK will look for `_weights.pkl` (or `.pth`) next to your `.py` file." + ] } ], "metadata": { @@ -141,9 +157,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.12" + "version": "3.11" } }, "nbformat": 4, "nbformat_minor": 5 -} +} \ No newline at end of file diff --git a/notebooks/traceblocTrainingGuide.ipynb b/notebooks/traceblocTrainingGuide.ipynb index ad150c6..d9a9ecc 100644 --- a/notebooks/traceblocTrainingGuide.ipynb +++ b/notebooks/traceblocTrainingGuide.ipynb @@ -21,19 +21,7 @@ { "cell_type": "markdown", "metadata": {}, - "source": [ - "## Prerequisites\n", - "\n", - "Before you begin, make sure you have:\n", - "\n", - "- \u2705 A **tracebloc account** \u2014 [Sign up here](https://ai.tracebloc.io/signup) if you don't have one\n", - "- \u2705 **Joined a use case** \u2014 you need an active use case with a dataset. [How to join a use case \u2192](https://docs.tracebloc.io/join-use-case/explore-use-case)\n", - "- \u2705 A **model file** (`.py`) compatible with the dataset \u2014 you can use one from the [tracebloc model zoo](https://github.com/tracebloc/model-zoo) or bring your own. [Model structure requirements \u2192](https://docs.tracebloc.io/join-use-case/model-optimization)\n", - "\n", - "\ud83d\udcd6 **Full documentation:** [docs.tracebloc.io](https://docs.tracebloc.io)\n", - "\n", - "\ud83d\udca1 **Prefer Google Colab?** [Open this guide in Colab](https://colab.research.google.com/drive/1N00idtpoaq1lk9OJE6g4bMqd8o-Qex2C) \u2014 runs entirely in your browser, no local setup needed." - ] + "source": "## Prerequisites\n\nBefore you begin, make sure you have:\n\n- \u2705 A **tracebloc account** \u2014 [Sign up here](https://ai.tracebloc.io/signup) if you don't have one\n- \u2705 **Joined a use case** \u2014 you need an active use case with a dataset. [How to join a use case \u2192](https://docs.tracebloc.io/join-use-case/explore-use-case)\n- \u2705 A **model file** (`.py`) compatible with the dataset \u2014 you can use one from the [tracebloc model zoo](https://github.com/tracebloc/model-zoo) or bring your own. [Model structure requirements \u2192](https://docs.tracebloc.io/join-use-case/model-optimization)\n\n\ud83d\udcd6 **Full documentation:** [docs.tracebloc.io](https://docs.tracebloc.io)\n\n\ud83d\udca1 **Prefer Google Colab?** [Open this guide in Colab](https://colab.research.google.com/github/tracebloc/start-training/blob/main/notebooks/traceblocTrainingGuide.ipynb) \u2014 runs entirely in your browser, no local setup needed. Once it opens, do **File \u2192 Save a copy in Drive** so your edits persist." }, { "cell_type": "markdown", @@ -50,10 +38,7 @@ "execution_count": null, "metadata": {}, "outputs": [], - "source": [ - "# Install the tracebloc package (pinned version for compatibility)\n", - "!pip install tracebloc_package>=0.6.32 -q" - ] + "source": "# Install the tracebloc package \u2014 the [pytorch] extra covers the most common setup.\n# Using TensorFlow? Replace [pytorch] with [tensorflow]. See the README for all extras.\n!pip install \"tracebloc[pytorch]>=0.8.1\" -q" }, { "cell_type": "code", @@ -61,7 +46,7 @@ "metadata": {}, "outputs": [], "source": [ - "from tracebloc_package import User\n", + "from tracebloc import User\n", "\n", "# This will prompt you for your tracebloc email and password\n", "user = User()" @@ -153,7 +138,7 @@ "# Replace the path with your actual model file location\n", "MODEL_PATH = \"../model-zoo/model_zoo/image_classification/pytorch/densenet.py\" # <-- change this\n", "\n", - "user.uploadModel(MODEL_PATH)" + "user.upload_model(MODEL_PATH)" ] }, { @@ -170,49 +155,26 @@ "\n", "```python\n", "# To upload with pretrained weights:\n", - "user.uploadModel(MODEL_PATH, weights=True)\n", + "user.upload_model(MODEL_PATH, weights=True)\n", "```" ] }, { "cell_type": "markdown", "metadata": {}, - "source": [ - "---\n", - "## 3. Link uploaded model with dataset\n", - "\n", - "Now connect your uploaded model to a dataset from your use case.\n", - "\n", - "**Where to find the Dataset ID:**\n", - "1. Go to [ai.tracebloc.io](https://ai.tracebloc.io) and open your use case\n", - "2. Look for the **\"Training Dataset ID\"** shown in the center of the use case panel\n", - "3. Copy that ID and paste it below\n", - "\n", - "The dataset ID is a short alphanumeric string (e.g., `DKbtefZy`)." - ] + "source": "---\n## 3. Link uploaded model with dataset\n\nNow connect your uploaded model to a dataset from your use case.\n\n**Where to find the Dataset ID:**\n1. Go to [ai.tracebloc.io](https://ai.tracebloc.io) and open your use case\n2. Copy the ID shown next to **Dataset** in the use case panel\n3. Paste it below\n\nThe dataset ID is a short alphanumeric string (e.g., `DKbtefZy`)." }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], - "source": [ - "# Paste your Training Dataset ID here\n", - "DATASET_ID = \"YOUR_DATASET_ID_HERE\" # <-- replace with your actual dataset ID (e.g., \"DKbtefZy\")\n", - "\n", - "trainingObject = user.linkModelDataset(DATASET_ID)" - ] + "source": "# Paste your Dataset ID here\nDATASET_ID = \"YOUR_DATASET_ID_HERE\" # <-- replace with your actual dataset ID (e.g., \"DKbtefZy\")\n\ntraining = user.link_model_dataset(DATASET_ID)" }, { "cell_type": "markdown", "metadata": {}, - "source": [ - "**Expected output:** A confirmation that the model and dataset are linked.\n", - "\n", - "\u26a0\ufe0f **If this fails:**\n", - "- Make sure the dataset ID is correct (check your use case page)\n", - "- Your model must be compatible with the dataset (e.g., an image classification model for an image dataset)" - ] + "source": "**Expected output:** A confirmation that the model and dataset are linked.\n\n\u26a0\ufe0f **If this fails:**\n- Make sure the dataset ID is correct (check your use case panel)\n- Your model must be compatible with the dataset (e.g., an image classification model for an image dataset)" }, { "cell_type": "markdown", @@ -225,13 +187,13 @@ "\n", "| Command | Description | Example |\n", "|---------|-------------|--------|\n", - "| `trainingObject.experimentName(\"...\")` | Name your experiment | `trainingObject.experimentName(\"My first run\")` |\n", - "| `trainingObject.epochs(n)` | Number of training epochs | `trainingObject.epochs(10)` |\n", - "| `trainingObject.optimizer(\"...\")` | Set optimizer | `trainingObject.optimizer(\"adam\")` |\n", - "| `trainingObject.learningRate({...})` | Set learning rate | `trainingObject.learningRate({\"type\": \"constant\", \"value\": 0.001})` |\n", - "| `trainingObject.validation_split(n)` | Validation split | `trainingObject.validation_split(0.2)` |\n", - "| `trainingObject.getTrainingPlan()` | View the full training plan | |\n", - "| `trainingObject.resetTrainingPlan()` | Reset to defaults | |\n", + "| `training.experiment_name(\"...\")` | Name your experiment | `training.experiment_name(\"My first run\")` |\n", + "| `training.epochs(n)` | Number of training epochs | `training.epochs(10)` |\n", + "| `training.optimizer(\"...\")` | Set optimizer | `training.optimizer(\"adam\")` |\n", + "| `training.learning_rate({...})` | Set learning rate | `training.learning_rate({\"type\": \"constant\", \"value\": 0.001})` |\n", + "| `training.validation_split(n)` | Validation split | `training.validation_split(0.2)` |\n", + "| `training.get_training_plan()` | View the full training plan | |\n", + "| `training.reset_training_plan()` | Reset to defaults | |\n", "\n", "For all available parameters, see the [Hyperparameters reference](https://docs.tracebloc.io/join-use-case/hyperparameters)." ] @@ -243,13 +205,13 @@ "outputs": [], "source": [ "# Set experiment name\n", - "trainingObject.experimentName(\"My Experiment\")\n", + "training.experiment_name(\"My Experiment\")\n", "\n", "# Set training parameters\n", - "trainingObject.epochs(10)\n", + "training.epochs(10)\n", "\n", "# Review your training plan\n", - "trainingObject.getTrainingPlan()" + "training.get_training_plan()" ] }, { @@ -282,7 +244,7 @@ "metadata": {}, "outputs": [], "source": [ - "trainingObject.start() # start the experiment as configured above" + "training.start() # start the experiment as configured above" ] }, { @@ -349,4 +311,4 @@ }, "nbformat": 4, "nbformat_minor": 4 -} +} \ No newline at end of file diff --git a/requirement.txt b/requirement.txt deleted file mode 100644 index 7a38c05..0000000 --- a/requirement.txt +++ /dev/null @@ -1 +0,0 @@ -tracebloc_package From 73f775f922ec23ed8b77ce7db4b5a8b49a55f98b Mon Sep 17 00:00:00 2001 From: "Asad Iqbal (Saadi)" Date: Tue, 19 May 2026 13:13:37 +0500 Subject: [PATCH 12/12] chore: merge main into develop to resolve PR #15 conflicts (#16) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Develop (#1) * added files * improvements * improvements * license updated * license updated * Update LICENSE * Create requirements.txt * Delete requirement.txt * Update traceblocTrainingGuide.ipynb * Update traceblocTrainingGuide.ipynb * Delete requirements.txt * Update traceblocTrainingGuide.ipynb * Update traceblocTrainingGuide.ipynb * Update traceblocTrainingGuide.ipynb * Update traceblocTrainingGuide.ipynb * Update traceblocTrainingGuide.ipynb * Update traceblocTrainingGuide.ipynb * Update traceblocTrainingGuide.ipynb * Update traceblocTrainingGuide.ipynb * Update traceblocTrainingGuide.ipynb * Update traceblocTrainingGuide.ipynb * Update traceblocTrainingGuide.ipynb * Update traceblocTrainingGuide.ipynb * Update traceblocTrainingGuide.ipynb * Update traceblocTrainingGuide.ipynb * Update README.md * Update README.md * Update traceblocTrainingGuide.ipynb * Update README.md * Update README.md * Update training notebook to match Colab quickstart The GitHub notebook was outdated โ€” minimal instructions, links to GitLab (should be GitHub), no prerequisites, no troubleshooting, no model zoo table, no expected outputs. Updated to mirror the Colab notebook with: - Prerequisites checklist with signup/join links - Model zoo task table with all 9 task types and frameworks - Option A (model zoo) / Option B (own model) structure - Dataset ID instructions (where to find it) - Available training commands table - Expected outputs and troubleshooting for each step - "What happens next" section (monitoring, leaderboard, compare) - Links to docs, support, Discord Co-Authored-By: Claude Opus 4.6 (1M context) * docs: switch install to extras syntax for tracebloc_package 0.6.33 Aligns with the optional-dependency-groups change shipping in tracebloc-py-package 0.6.33. Default install no longer bundles every ML framework โ€” users pick the extra that matches their setup. - README.md: 3-line extras table in the local-setup section. - notebooks/traceblocTrainingGuide.ipynb cell 3: switch install cmd to [pytorch] as the most common setup; comment points at [tensorflow] and [all]. DO NOT MERGE until tracebloc_package 0.6.33 is live on real PyPI. Currently 0.6.33 is only on TestPyPI. Co-Authored-By: Claude Opus 4.7 (1M context) * docs: rename camelCase API calls in notebook + bump install pin to 0.7.0 Builds on top of the install-extras change (eeae340) and broadens scope for the upcoming tracebloc_package 0.7.0 release. Notebook changes (notebooks/traceblocTrainingGuide.ipynb): - Cell 3 install pin: >=0.6.33 -> >=0.7.0 - Cell 11: user.uploadModel(MODEL_PATH) -> user.upload_model(MODEL_PATH) - Cell 12 (markdown docs example): same uploadModel rename - Cell 14: user.linkModelDataset(DATASET_ID) -> user.link_model_dataset(DATASET_ID) - Cell 16 (reference table): experimentName, learningRate, getTrainingPlan, resetTrainingPlan -> experiment_name, learning_rate, get_training_plan, reset_training_plan - Cell 17: experimentName + getTrainingPlan call sites updated README.md: pip install lines bumped from >=0.6.33 to >=0.7.0 across all three extras (pytorch, tensorflow, all). Static rewrite only; the notebook was not executed (requires real workspace credentials). All deprecated symbols touched here have deprecation aliases on the Python side, so callers using the old names would still work but emit DeprecationWarning. Supersedes #4 (which was scoped only to the 0.6.33 install-extras migration). The 0.6.33 release path is being collapsed into 0.7.0 now that SDK.2/3 work has landed on develop, so this PR ships both changes together. Cannot merge until tracebloc_package 0.7.0 is published to real PyPI โ€” same merge-coordination block as #4. Co-Authored-By: Claude Opus 4.7 (1M context) * Add CLAUDE.md for Claude Code guidance (#3) Co-authored-by: Claude Opus 4.6 (1M context) * docs: migrate notebooks to tracebloc 0.8.x (closes #11) The SDK was renamed in tracebloc/tracebloc-py-package#135. `tracebloc==0.8.1` is live on PyPI. Notebooks and docs here still pointed at the old `tracebloc_package` name. - Install cells / commands: `tracebloc_package[X]>=0.7.0` -> `tracebloc[X]>=0.8.0`. - Import cells: `from tracebloc_package import ...` -> `from tracebloc import ...`. - README links the new PyPI page (`tracebloc`, not `tracebloc-package`). - CLAUDE.md notes the historical name and the metadata-only redirect that keeps `pip install tracebloc_package` working for old notebooks. Old name keeps working in 0.8.x via the compat shim (with DeprecationWarning) and the redirect distribution on PyPI; this PR moves the canonical examples to the new name. Co-Authored-By: Claude Opus 4.7 * docs: bump install pin to 0.8.1 (latest) --------- Co-authored-by: Divya Co-authored-by: Moritz Berthold <76496190+BerthoMo@users.noreply.github.com> Co-authored-by: lukasWuttke <54042461+LukasWodka@users.noreply.github.com> Co-authored-by: Lukas Wuttke Co-authored-by: Claude Opus 4.6 (1M context) Co-authored-by: Arturo Peroni