datachain 0.18.11__tar.gz → 0.19__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of datachain might be problematic. Click here for more details.
- {datachain-0.18.11 → datachain-0.19}/PKG-INFO +56 -2
- {datachain-0.18.11 → datachain-0.19}/README.rst +55 -1
- datachain-0.19/docs/guide/delta.md +82 -0
- datachain-0.19/docs/guide/index.md +12 -0
- datachain-0.19/docs/guide/processing.md +10 -0
- datachain-0.19/docs/guide/retry.md +105 -0
- {datachain-0.18.11 → datachain-0.19}/docs/index.md +1 -0
- datachain-0.19/examples/incremental_processing/retry.py +130 -0
- {datachain-0.18.11 → datachain-0.19}/mkdocs.yml +7 -1
- {datachain-0.18.11 → datachain-0.19}/src/datachain/client/fsspec.py +1 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/client/hf.py +19 -2
- datachain-0.19/src/datachain/delta.py +244 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/lib/dc/datachain.py +19 -4
- {datachain-0.18.11 → datachain-0.19}/src/datachain/lib/dc/datasets.py +12 -1
- {datachain-0.18.11 → datachain-0.19}/src/datachain/lib/dc/storage.py +13 -1
- {datachain-0.18.11 → datachain-0.19}/src/datachain/lib/file.py +40 -11
- {datachain-0.18.11 → datachain-0.19}/src/datachain/semver.py +15 -5
- {datachain-0.18.11 → datachain-0.19}/src/datachain.egg-info/PKG-INFO +56 -2
- {datachain-0.18.11 → datachain-0.19}/src/datachain.egg-info/SOURCES.txt +7 -1
- {datachain-0.18.11 → datachain-0.19}/tests/examples/test_examples.py +1 -1
- {datachain-0.18.11 → datachain-0.19}/tests/func/test_datachain.py +16 -9
- datachain-0.19/tests/func/test_retry.py +315 -0
- datachain-0.19/tests/unit/test_semver.py +135 -0
- datachain-0.18.11/src/datachain/delta.py +0 -119
- datachain-0.18.11/tests/unit/test_semver.py +0 -71
- {datachain-0.18.11 → datachain-0.19}/.cruft.json +0 -0
- {datachain-0.18.11 → datachain-0.19}/.gitattributes +0 -0
- {datachain-0.18.11 → datachain-0.19}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {datachain-0.18.11 → datachain-0.19}/.github/ISSUE_TEMPLATE/empty_issue.md +0 -0
- {datachain-0.18.11 → datachain-0.19}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {datachain-0.18.11 → datachain-0.19}/.github/codecov.yaml +0 -0
- {datachain-0.18.11 → datachain-0.19}/.github/dependabot.yml +0 -0
- {datachain-0.18.11 → datachain-0.19}/.github/workflows/benchmarks.yml +0 -0
- {datachain-0.18.11 → datachain-0.19}/.github/workflows/release.yml +0 -0
- {datachain-0.18.11 → datachain-0.19}/.github/workflows/tests-studio.yml +0 -0
- {datachain-0.18.11 → datachain-0.19}/.github/workflows/tests.yml +0 -0
- {datachain-0.18.11 → datachain-0.19}/.github/workflows/update-template.yaml +0 -0
- {datachain-0.18.11 → datachain-0.19}/.gitignore +0 -0
- {datachain-0.18.11 → datachain-0.19}/.pre-commit-config.yaml +0 -0
- {datachain-0.18.11 → datachain-0.19}/CODE_OF_CONDUCT.rst +0 -0
- {datachain-0.18.11 → datachain-0.19}/LICENSE +0 -0
- {datachain-0.18.11 → datachain-0.19}/docs/assets/captioned_cartoons.png +0 -0
- {datachain-0.18.11 → datachain-0.19}/docs/assets/datachain-white.svg +0 -0
- {datachain-0.18.11 → datachain-0.19}/docs/assets/datachain.svg +0 -0
- {datachain-0.18.11 → datachain-0.19}/docs/commands/auth/login.md +0 -0
- {datachain-0.18.11 → datachain-0.19}/docs/commands/auth/logout.md +0 -0
- {datachain-0.18.11 → datachain-0.19}/docs/commands/auth/team.md +0 -0
- {datachain-0.18.11 → datachain-0.19}/docs/commands/auth/token.md +0 -0
- {datachain-0.18.11 → datachain-0.19}/docs/commands/index.md +0 -0
- {datachain-0.18.11 → datachain-0.19}/docs/commands/job/cancel.md +0 -0
- {datachain-0.18.11 → datachain-0.19}/docs/commands/job/logs.md +0 -0
- {datachain-0.18.11 → datachain-0.19}/docs/commands/job/ls.md +0 -0
- {datachain-0.18.11 → datachain-0.19}/docs/commands/job/run.md +0 -0
- {datachain-0.18.11 → datachain-0.19}/docs/contributing.md +0 -0
- {datachain-0.18.11 → datachain-0.19}/docs/css/github-permalink-style.css +0 -0
- {datachain-0.18.11 → datachain-0.19}/docs/examples.md +0 -0
- {datachain-0.18.11/docs/references → datachain-0.19/docs/guide}/remotes.md +0 -0
- {datachain-0.18.11 → datachain-0.19}/docs/overrides/main.html +0 -0
- {datachain-0.18.11 → datachain-0.19}/docs/quick-start.md +0 -0
- {datachain-0.18.11 → datachain-0.19}/docs/references/data-types/arrowrow.md +0 -0
- {datachain-0.18.11 → datachain-0.19}/docs/references/data-types/bbox.md +0 -0
- {datachain-0.18.11 → datachain-0.19}/docs/references/data-types/file.md +0 -0
- {datachain-0.18.11 → datachain-0.19}/docs/references/data-types/imagefile.md +0 -0
- {datachain-0.18.11 → datachain-0.19}/docs/references/data-types/index.md +0 -0
- {datachain-0.18.11 → datachain-0.19}/docs/references/data-types/pose.md +0 -0
- {datachain-0.18.11 → datachain-0.19}/docs/references/data-types/segment.md +0 -0
- {datachain-0.18.11 → datachain-0.19}/docs/references/data-types/tarvfile.md +0 -0
- {datachain-0.18.11 → datachain-0.19}/docs/references/data-types/textfile.md +0 -0
- {datachain-0.18.11 → datachain-0.19}/docs/references/data-types/videofile.md +0 -0
- {datachain-0.18.11 → datachain-0.19}/docs/references/datachain.md +0 -0
- {datachain-0.18.11 → datachain-0.19}/docs/references/func.md +0 -0
- {datachain-0.18.11 → datachain-0.19}/docs/references/index.md +0 -0
- {datachain-0.18.11 → datachain-0.19}/docs/references/toolkit.md +0 -0
- {datachain-0.18.11 → datachain-0.19}/docs/references/torch.md +0 -0
- {datachain-0.18.11 → datachain-0.19}/docs/references/udf.md +0 -0
- {datachain-0.18.11 → datachain-0.19}/docs/tutorials.md +0 -0
- {datachain-0.18.11 → datachain-0.19}/examples/computer_vision/iptc_exif_xmp_lib.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/examples/computer_vision/llava2_image_desc_lib.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/examples/computer_vision/openimage-detect.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/examples/computer_vision/ultralytics-bbox.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/examples/computer_vision/ultralytics-pose.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/examples/computer_vision/ultralytics-segment.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/examples/get_started/common_sql_functions.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/examples/get_started/json-csv-reader.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/examples/get_started/torch-loader.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/examples/get_started/udfs/parallel.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/examples/get_started/udfs/simple.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/examples/get_started/udfs/stateful.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/examples/incremental_processing/delta.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/examples/incremental_processing/utils.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/examples/llm_and_nlp/claude-query.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/examples/llm_and_nlp/hf-dataset-llm-eval.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/examples/multimodal/clip_inference.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/examples/multimodal/hf_pipeline.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/examples/multimodal/openai_image_desc_lib.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/examples/multimodal/wds.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/examples/multimodal/wds_filtered.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/noxfile.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/pyproject.toml +0 -0
- {datachain-0.18.11 → datachain-0.19}/setup.cfg +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/__init__.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/__main__.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/asyn.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/cache.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/catalog/__init__.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/catalog/catalog.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/catalog/datasource.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/catalog/loader.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/cli/__init__.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/cli/commands/__init__.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/cli/commands/datasets.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/cli/commands/du.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/cli/commands/index.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/cli/commands/ls.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/cli/commands/misc.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/cli/commands/query.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/cli/commands/show.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/cli/parser/__init__.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/cli/parser/job.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/cli/parser/studio.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/cli/parser/utils.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/cli/utils.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/client/__init__.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/client/azure.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/client/fileslice.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/client/gcs.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/client/local.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/client/s3.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/config.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/data_storage/__init__.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/data_storage/db_engine.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/data_storage/job.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/data_storage/metastore.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/data_storage/schema.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/data_storage/serializer.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/data_storage/sqlite.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/data_storage/warehouse.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/dataset.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/diff/__init__.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/error.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/fs/__init__.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/fs/reference.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/fs/utils.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/func/__init__.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/func/aggregate.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/func/array.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/func/base.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/func/conditional.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/func/func.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/func/numeric.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/func/path.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/func/random.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/func/string.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/func/window.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/job.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/lib/__init__.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/lib/arrow.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/lib/clip.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/lib/convert/__init__.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/lib/convert/flatten.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/lib/convert/python_to_sql.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/lib/convert/sql_to_python.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/lib/convert/unflatten.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/lib/convert/values_to_tuples.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/lib/data_model.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/lib/dataset_info.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/lib/dc/__init__.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/lib/dc/csv.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/lib/dc/database.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/lib/dc/hf.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/lib/dc/json.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/lib/dc/listings.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/lib/dc/pandas.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/lib/dc/parquet.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/lib/dc/records.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/lib/dc/utils.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/lib/dc/values.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/lib/hf.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/lib/image.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/lib/listing.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/lib/listing_info.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/lib/meta_formats.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/lib/model_store.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/lib/pytorch.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/lib/settings.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/lib/signal_schema.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/lib/tar.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/lib/text.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/lib/udf.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/lib/udf_signature.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/lib/utils.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/lib/video.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/lib/webdataset.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/lib/webdataset_laion.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/listing.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/model/__init__.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/model/bbox.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/model/pose.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/model/segment.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/model/ultralytics/__init__.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/model/ultralytics/bbox.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/model/ultralytics/pose.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/model/ultralytics/segment.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/model/utils.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/node.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/nodes_fetcher.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/nodes_thread_pool.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/progress.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/py.typed +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/query/__init__.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/query/batch.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/query/dataset.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/query/dispatch.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/query/metrics.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/query/params.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/query/queue.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/query/schema.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/query/session.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/query/udf.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/query/utils.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/remote/__init__.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/remote/studio.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/script_meta.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/sql/__init__.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/sql/default/__init__.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/sql/default/base.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/sql/functions/__init__.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/sql/functions/aggregate.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/sql/functions/array.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/sql/functions/conditional.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/sql/functions/numeric.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/sql/functions/path.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/sql/functions/random.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/sql/functions/string.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/sql/selectable.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/sql/sqlite/__init__.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/sql/sqlite/base.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/sql/sqlite/types.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/sql/sqlite/vector.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/sql/types.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/sql/utils.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/studio.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/telemetry.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/toolkit/__init__.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/toolkit/split.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/torch/__init__.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain/utils.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain.egg-info/dependency_links.txt +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain.egg-info/entry_points.txt +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain.egg-info/requires.txt +0 -0
- {datachain-0.18.11 → datachain-0.19}/src/datachain.egg-info/top_level.txt +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/__init__.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/benchmarks/__init__.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/benchmarks/conftest.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/benchmarks/datasets/.dvc/.gitignore +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/benchmarks/datasets/.dvc/config +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/benchmarks/datasets/.gitignore +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/benchmarks/datasets/laion-tiny.npz.dvc +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/benchmarks/test_datachain.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/benchmarks/test_ls.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/benchmarks/test_version.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/conftest.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/data.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/examples/__init__.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/examples/test_wds_e2e.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/examples/wds_data.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/__init__.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/data/Big_Buck_Bunny_360_10s_1MB.mp4 +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/data/lena.jpg +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/fake-service-account-credentials.json +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/functions/__init__.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/functions/test_aggregate.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/functions/test_array.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/functions/test_conditional.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/functions/test_numeric.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/functions/test_path.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/functions/test_random.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/functions/test_string.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/model/__init__.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/model/data/running-mask0.png +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/model/data/running-mask1.png +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/model/data/running.jpg +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/model/data/ships.jpg +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/model/test_yolo.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/test_batching.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/test_catalog.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/test_client.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/test_cloud_transfer.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/test_data_storage.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/test_datachain_merge.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/test_dataset_query.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/test_datasets.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/test_delta.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/test_feature_pickling.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/test_file.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/test_hf.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/test_hidden_field.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/test_image.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/test_listing.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/test_ls.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/test_meta_formats.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/test_metastore.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/test_metrics.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/test_pull.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/test_pytorch.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/test_query.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/test_read_database.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/test_session.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/test_toolkit.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/test_video.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/func/test_warehouse.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/scripts/feature_class.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/scripts/feature_class_exception.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/scripts/feature_class_parallel.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/scripts/feature_class_parallel_data_model.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/scripts/name_len_slow.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/test_atomicity.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/test_cli_e2e.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/test_cli_studio.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/test_import_time.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/test_query_e2e.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/test_telemetry.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/__init__.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/lib/__init__.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/lib/conftest.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/lib/test_arrow.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/lib/test_clip.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/lib/test_datachain.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/lib/test_datachain_bootstrap.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/lib/test_datachain_merge.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/lib/test_diff.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/lib/test_feature.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/lib/test_feature_utils.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/lib/test_file.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/lib/test_hf.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/lib/test_image.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/lib/test_listing_info.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/lib/test_python_to_sql.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/lib/test_schema.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/lib/test_signal_schema.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/lib/test_sql_to_python.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/lib/test_text.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/lib/test_udf.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/lib/test_udf_signature.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/lib/test_utils.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/lib/test_webdataset.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/model/__init__.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/model/test_bbox.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/model/test_pose.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/model/test_segment.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/model/test_utils.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/sql/__init__.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/sql/sqlite/__init__.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/sql/sqlite/test_types.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/sql/sqlite/test_utils.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/sql/test_array.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/sql/test_conditional.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/sql/test_path.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/sql/test_random.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/sql/test_selectable.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/sql/test_string.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/test_asyn.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/test_cache.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/test_catalog.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/test_catalog_loader.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/test_cli_parsing.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/test_client.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/test_client_gcs.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/test_client_s3.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/test_config.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/test_data_storage.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/test_database_engine.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/test_dataset.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/test_dispatch.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/test_fileslice.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/test_func.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/test_listing.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/test_metastore.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/test_module_exports.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/test_pytorch.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/test_query.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/test_query_metrics.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/test_query_params.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/test_script_meta.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/test_serializer.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/test_session.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/test_utils.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/unit/test_warehouse.py +0 -0
- {datachain-0.18.11 → datachain-0.19}/tests/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: datachain
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.19
|
|
4
4
|
Summary: Wrangle unstructured AI data at scale
|
|
5
5
|
Author-email: Dmitry Petrov <support@dvc.org>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -146,6 +146,12 @@ Use Cases
|
|
|
146
146
|
on these tables at scale.
|
|
147
147
|
3. **Versioning.** DataChain doesn't store, require moving or copying data (unlike DVC).
|
|
148
148
|
Perfect use case is a bucket with thousands or millions of images, videos, audio, PDFs.
|
|
149
|
+
4. **Incremental Processing.** DataChain's delta and retry features allow for efficient
|
|
150
|
+
processing workflows:
|
|
151
|
+
|
|
152
|
+
- **Delta Processing**: Process only new or changed files/records
|
|
153
|
+
- **Retry Processing**: Automatically reprocess records with errors or missing results
|
|
154
|
+
- **Combined Approach**: Process new data and fix errors in a single pipeline
|
|
149
155
|
|
|
150
156
|
Getting Started
|
|
151
157
|
===============
|
|
@@ -158,7 +164,7 @@ to get started with `DataChain` and learn more.
|
|
|
158
164
|
pip install datachain
|
|
159
165
|
|
|
160
166
|
|
|
161
|
-
Example:
|
|
167
|
+
Example: Download Subset of Files Based on Metadata
|
|
162
168
|
---------------------------------------------------
|
|
163
169
|
|
|
164
170
|
Sometimes users only need to download a specific subset of files from cloud storage,
|
|
@@ -182,6 +188,54 @@ high confidence scores.
|
|
|
182
188
|
likely_cats.to_storage("high-confidence-cats/", signal="file")
|
|
183
189
|
|
|
184
190
|
|
|
191
|
+
Example: Incremental Processing with Error Handling
|
|
192
|
+
---------------------------------------------------
|
|
193
|
+
|
|
194
|
+
This example shows how to use both delta and retry processing for efficient handling of large
|
|
195
|
+
datasets that evolve over time and may occasionally have processing errors.
|
|
196
|
+
|
|
197
|
+
.. code:: py
|
|
198
|
+
|
|
199
|
+
import datachain as dc
|
|
200
|
+
from datachain import C, File
|
|
201
|
+
|
|
202
|
+
def process_file(file: File):
|
|
203
|
+
"""Process a file, which may occasionally fail."""
|
|
204
|
+
try:
|
|
205
|
+
# Your processing logic here
|
|
206
|
+
content = file.read_text()
|
|
207
|
+
result = analyze_content(content)
|
|
208
|
+
return {
|
|
209
|
+
"content": content,
|
|
210
|
+
"result": result,
|
|
211
|
+
"error": None # No error
|
|
212
|
+
}
|
|
213
|
+
except Exception as e:
|
|
214
|
+
# Return an error that will trigger reprocessing next time
|
|
215
|
+
return {
|
|
216
|
+
"content": None,
|
|
217
|
+
"result": None,
|
|
218
|
+
"error": str(e) # Error field will trigger retry
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
# Process files efficiently with delta and retry
|
|
222
|
+
chain = (
|
|
223
|
+
dc.read_storage(
|
|
224
|
+
"data/",
|
|
225
|
+
update=True,
|
|
226
|
+
delta=True, # Process only new/changed files
|
|
227
|
+
delta_on="file.path", # Identify files by path
|
|
228
|
+
retry_on="error" # Field that indicates errors
|
|
229
|
+
)
|
|
230
|
+
.map(processed_result=process_file)
|
|
231
|
+
.mutate(
|
|
232
|
+
content=C("processed_result.content"),
|
|
233
|
+
result=C("processed_result.result"),
|
|
234
|
+
error=C("processed_result.error")
|
|
235
|
+
)
|
|
236
|
+
.save(name="processed_data")
|
|
237
|
+
)
|
|
238
|
+
|
|
185
239
|
Example: LLM based text-file evaluation
|
|
186
240
|
---------------------------------------
|
|
187
241
|
|
|
@@ -35,6 +35,12 @@ Use Cases
|
|
|
35
35
|
on these tables at scale.
|
|
36
36
|
3. **Versioning.** DataChain doesn't store, require moving or copying data (unlike DVC).
|
|
37
37
|
Perfect use case is a bucket with thousands or millions of images, videos, audio, PDFs.
|
|
38
|
+
4. **Incremental Processing.** DataChain's delta and retry features allow for efficient
|
|
39
|
+
processing workflows:
|
|
40
|
+
|
|
41
|
+
- **Delta Processing**: Process only new or changed files/records
|
|
42
|
+
- **Retry Processing**: Automatically reprocess records with errors or missing results
|
|
43
|
+
- **Combined Approach**: Process new data and fix errors in a single pipeline
|
|
38
44
|
|
|
39
45
|
Getting Started
|
|
40
46
|
===============
|
|
@@ -47,7 +53,7 @@ to get started with `DataChain` and learn more.
|
|
|
47
53
|
pip install datachain
|
|
48
54
|
|
|
49
55
|
|
|
50
|
-
Example:
|
|
56
|
+
Example: Download Subset of Files Based on Metadata
|
|
51
57
|
---------------------------------------------------
|
|
52
58
|
|
|
53
59
|
Sometimes users only need to download a specific subset of files from cloud storage,
|
|
@@ -71,6 +77,54 @@ high confidence scores.
|
|
|
71
77
|
likely_cats.to_storage("high-confidence-cats/", signal="file")
|
|
72
78
|
|
|
73
79
|
|
|
80
|
+
Example: Incremental Processing with Error Handling
|
|
81
|
+
---------------------------------------------------
|
|
82
|
+
|
|
83
|
+
This example shows how to use both delta and retry processing for efficient handling of large
|
|
84
|
+
datasets that evolve over time and may occasionally have processing errors.
|
|
85
|
+
|
|
86
|
+
.. code:: py
|
|
87
|
+
|
|
88
|
+
import datachain as dc
|
|
89
|
+
from datachain import C, File
|
|
90
|
+
|
|
91
|
+
def process_file(file: File):
|
|
92
|
+
"""Process a file, which may occasionally fail."""
|
|
93
|
+
try:
|
|
94
|
+
# Your processing logic here
|
|
95
|
+
content = file.read_text()
|
|
96
|
+
result = analyze_content(content)
|
|
97
|
+
return {
|
|
98
|
+
"content": content,
|
|
99
|
+
"result": result,
|
|
100
|
+
"error": None # No error
|
|
101
|
+
}
|
|
102
|
+
except Exception as e:
|
|
103
|
+
# Return an error that will trigger reprocessing next time
|
|
104
|
+
return {
|
|
105
|
+
"content": None,
|
|
106
|
+
"result": None,
|
|
107
|
+
"error": str(e) # Error field will trigger retry
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
# Process files efficiently with delta and retry
|
|
111
|
+
chain = (
|
|
112
|
+
dc.read_storage(
|
|
113
|
+
"data/",
|
|
114
|
+
update=True,
|
|
115
|
+
delta=True, # Process only new/changed files
|
|
116
|
+
delta_on="file.path", # Identify files by path
|
|
117
|
+
retry_on="error" # Field that indicates errors
|
|
118
|
+
)
|
|
119
|
+
.map(processed_result=process_file)
|
|
120
|
+
.mutate(
|
|
121
|
+
content=C("processed_result.content"),
|
|
122
|
+
result=C("processed_result.result"),
|
|
123
|
+
error=C("processed_result.error")
|
|
124
|
+
)
|
|
125
|
+
.save(name="processed_data")
|
|
126
|
+
)
|
|
127
|
+
|
|
74
128
|
Example: LLM based text-file evaluation
|
|
75
129
|
---------------------------------------
|
|
76
130
|
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Delta Processing
|
|
2
|
+
|
|
3
|
+
Delta processing allows you to optimize the creation of new dataset versions by calculating and processing only the differences (deltas) between dataset versions. This is especially useful when working with large datasets that change incrementally over time.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
When working with large datasets that receive regular updates, reprocessing the entire dataset each time is inefficient. The `delta=True` flag in DataChain enables incremental processing, where only new or changed records are processed.
|
|
8
|
+
|
|
9
|
+
## How Delta Processing Works
|
|
10
|
+
|
|
11
|
+
When delta processing is enabled:
|
|
12
|
+
|
|
13
|
+
1. DataChain calculates the difference between the latest version of your source dataset and the version used to create the most recent version of your result dataset
|
|
14
|
+
2. Only the records that are new or modified in the source dataset are processed
|
|
15
|
+
3. These processed records are then merged with the latest version of your result dataset
|
|
16
|
+
|
|
17
|
+
This optimization significantly reduces processing time and resource usage for incremental updates.
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
Delta processing can be enabled through the `delta` parameter when using `read_storage()` or `read_dataset()`:
|
|
22
|
+
|
|
23
|
+
```python
|
|
24
|
+
import datachain as dc
|
|
25
|
+
|
|
26
|
+
# Process only new or changed files
|
|
27
|
+
chain = (
|
|
28
|
+
dc.read_storage(
|
|
29
|
+
"data/",
|
|
30
|
+
delta=True, # Enable delta processing
|
|
31
|
+
delta_on="file.path", # Field that uniquely identifies records
|
|
32
|
+
delta_compare="file.mtime" # Field to check for changes
|
|
33
|
+
)
|
|
34
|
+
.map(result=process_function)
|
|
35
|
+
.save(name="processed_data")
|
|
36
|
+
)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Parameters
|
|
40
|
+
|
|
41
|
+
- **delta**: Boolean flag to enable delta processing
|
|
42
|
+
- **delta_on**: Field(s) that uniquely identify rows in the source dataset
|
|
43
|
+
- **delta_result_on**: Field(s) in the resulting dataset that correspond to `delta_on` fields (if they have different names)
|
|
44
|
+
- **delta_compare**: Field(s) used to check if a record has been modified
|
|
45
|
+
|
|
46
|
+
## Example: Processing New Files Only
|
|
47
|
+
|
|
48
|
+
```python
|
|
49
|
+
import datachain as dc
|
|
50
|
+
import time
|
|
51
|
+
|
|
52
|
+
def process_file(file):
|
|
53
|
+
"""Process a file and return results."""
|
|
54
|
+
content = file.read_text()
|
|
55
|
+
# Simulate processing time
|
|
56
|
+
time.sleep(0.1)
|
|
57
|
+
return {
|
|
58
|
+
"content": content,
|
|
59
|
+
"processed_at": time.strftime("%Y-%m-%d %H:%M:%S")
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
# Process only new or modified files
|
|
63
|
+
chain = (
|
|
64
|
+
dc.read_storage(
|
|
65
|
+
"data/",
|
|
66
|
+
update=True, # Update the storage index
|
|
67
|
+
delta=True, # Process only new files
|
|
68
|
+
delta_on="file.path" # Files are identified by their paths
|
|
69
|
+
)
|
|
70
|
+
.map(result=process_file)
|
|
71
|
+
.save(name="processed_files")
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
print(f"Processed {chain.count()} files")
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Combining with Retry Processing
|
|
78
|
+
|
|
79
|
+
Delta processing can be combined with [retry processing](./retry.md) to create a powerful workflow that both:
|
|
80
|
+
|
|
81
|
+
1. Processes only new or changed records (delta)
|
|
82
|
+
2. Reprocesses records with errors or that are missing (retry)
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: User Guide
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# User Guide
|
|
6
|
+
|
|
7
|
+
Welcome to the DataChain User Guide! This section provides comprehensive documentation on how to effectively use DataChain's advanced features and capabilities.
|
|
8
|
+
|
|
9
|
+
- [Interacting with Remote Storage](./remotes.md) - Learn how to connect to and work with various remote storage systems.
|
|
10
|
+
- [Data Processing Overview](./processing.md) - Discover DataChain's specialized data processing features.
|
|
11
|
+
- [Delta Processing](./delta.md) - Incremental data processing to efficiently handle large datasets that change over time.
|
|
12
|
+
- [Error Handling and Retries](./retry.md) - Learn how to handle processing errors and selectively reprocess problematic records.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Data Processing Features
|
|
2
|
+
|
|
3
|
+
DataChain offers specialized data processing features that help optimize the handling of large and evolving datasets:
|
|
4
|
+
|
|
5
|
+
## Key Processing Features
|
|
6
|
+
|
|
7
|
+
- [Delta Processing](./delta.md): Efficiently process only new or changed records between dataset versions
|
|
8
|
+
- [Retry Processing](./retry.md): Automatically identify and reprocess records with errors or missing records
|
|
9
|
+
|
|
10
|
+
These features can be used independently or combined to create powerful data processing workflows.
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# Retry Processing
|
|
2
|
+
|
|
3
|
+
The retry functionality in DataChain allows for selective reprocessing of records that either have errors or are missing from the final result dataset. This powerful feature works alongside the existing `delta` functionality, providing both incremental processing of new data and reprocessing of problematic records.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
When working with large datasets, two common scenarios arise:
|
|
8
|
+
|
|
9
|
+
1. **Processing new data incrementally**: You only want to process new data that has been added since the last run (handled by the `delta=True` functionality)
|
|
10
|
+
2. **Reprocessing problematic records**: Some records may have failed processing or produced errors that need to be fixed and reprocessed
|
|
11
|
+
|
|
12
|
+
The retry functionality addresses the second scenario while still supporting the first.
|
|
13
|
+
|
|
14
|
+
## How It Works
|
|
15
|
+
|
|
16
|
+
The retry functionality allows you to:
|
|
17
|
+
|
|
18
|
+
1. **Identify error records**: Records in the result dataset with a non-NULL value in a specified error field
|
|
19
|
+
2. **Identify missing records**: Records that exist in the source dataset but are missing from the result dataset
|
|
20
|
+
3. **Reprocess only these records**: Applying your full processing chain only to these records that need attention
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
`retry` can be enabled by specifying `delta_retry`. It is enabled only when `delta` is enabled.
|
|
25
|
+
|
|
26
|
+
```python
|
|
27
|
+
import datachain as dc
|
|
28
|
+
from datachain import C
|
|
29
|
+
|
|
30
|
+
chain = (
|
|
31
|
+
dc.read_storage(
|
|
32
|
+
"path/to/data/",
|
|
33
|
+
# Enable delta processing to handle only new files (and retries in this case)
|
|
34
|
+
delta=True,
|
|
35
|
+
# Field(s) that uniquely identify records in the source dataset
|
|
36
|
+
delta_on="id",
|
|
37
|
+
# Controls which records to reprocess:
|
|
38
|
+
# - String: field name indicating errors when not empty
|
|
39
|
+
# - True: retry missing records from result dataset
|
|
40
|
+
# - False/None: no retry processing
|
|
41
|
+
delta_retry="error"
|
|
42
|
+
)
|
|
43
|
+
.map(result=process_function) # Your processing function
|
|
44
|
+
.save(name="processed_data") # Save results
|
|
45
|
+
)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Example: Processing Files with Error Handling
|
|
49
|
+
|
|
50
|
+
```python
|
|
51
|
+
import datachain as dc
|
|
52
|
+
from datachain import C
|
|
53
|
+
|
|
54
|
+
def process_file(file):
|
|
55
|
+
"""Process a file - may occasionally fail with an error."""
|
|
56
|
+
try:
|
|
57
|
+
# Your processing logic here
|
|
58
|
+
content = file.read_text()
|
|
59
|
+
result = analyze_content(content)
|
|
60
|
+
return {
|
|
61
|
+
"content": content,
|
|
62
|
+
"result": result,
|
|
63
|
+
"error": "" # No error
|
|
64
|
+
}
|
|
65
|
+
except Exception as e:
|
|
66
|
+
# Log the error and return it in the result
|
|
67
|
+
return {
|
|
68
|
+
"content": "",
|
|
69
|
+
"result": "",
|
|
70
|
+
"error": str(e) # Store the error message
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
# Process files with with retry functionality
|
|
74
|
+
chain = (
|
|
75
|
+
dc.read_storage(
|
|
76
|
+
"data/",
|
|
77
|
+
delta=True, # Process only new files
|
|
78
|
+
delta_on="file.path", # Files are identified by their paths
|
|
79
|
+
delta_retry="error" # Retry records with errors in "error" field
|
|
80
|
+
)
|
|
81
|
+
.map(result=process_file)
|
|
82
|
+
.save(name="processed_files")
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
# Show records with errors that will be retried next time
|
|
86
|
+
error_records = chain.filter(C("error") != None)
|
|
87
|
+
if not error_records.empty:
|
|
88
|
+
print("Records with errors that will be retried:")
|
|
89
|
+
error_records.show()
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Combining Delta and Retry
|
|
93
|
+
|
|
94
|
+
The real power comes when combining both delta and retry processing:
|
|
95
|
+
|
|
96
|
+
1. **Delta processing**: Only process new or modified records
|
|
97
|
+
2. **Retry processing**: Reprocess any records that had errors previously
|
|
98
|
+
|
|
99
|
+
When both are enabled, DataChain will:
|
|
100
|
+
|
|
101
|
+
1. First identify records that need to be retried (based on errors or missing records)
|
|
102
|
+
2. Then apply delta processing to that subset
|
|
103
|
+
3. Process only the resulting records, avoiding unnecessary reprocessing of unchanged data
|
|
104
|
+
|
|
105
|
+
This provides the most efficient way to maintain a dataset that is always up-to-date and free of processing errors.
|
|
@@ -86,6 +86,7 @@ The following pages provide detailed documentation on DataChain's features, arch
|
|
|
86
86
|
- [🏃🏼♂️ Quick Start](quick-start.md): Get up and running with DataChain in no time.
|
|
87
87
|
- [🎯 Examples](examples.md): Explore practical examples and use cases.
|
|
88
88
|
- [📚 Tutorials](tutorials.md): Learn how to use DataChain for specific tasks.
|
|
89
|
+
- [📚 User Guide](guide/index.md): Deeper dive into DataChain technical aspects and supported workflows.
|
|
89
90
|
- [🐍 API Reference](references/index.md): Dive into the technical details and API reference.
|
|
90
91
|
- [🤝 Contributing](contributing.md): Learn how to contribute to DataChain.
|
|
91
92
|
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
"""
|
|
3
|
+
Retry Processing Example with DataChain
|
|
4
|
+
|
|
5
|
+
This script demonstrates DataChain's retry functionality by:
|
|
6
|
+
1. Creating an initial in-memory dataset with sample data
|
|
7
|
+
2. Processing records with simulated errors
|
|
8
|
+
3. Using retry flags to reprocess failed records in a second pass
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
from datetime import datetime, timezone
|
|
12
|
+
|
|
13
|
+
import datachain as dc
|
|
14
|
+
from datachain import C, DataModel
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class ProcessingResult(DataModel):
|
|
18
|
+
"""Data model for processing results."""
|
|
19
|
+
|
|
20
|
+
processed_content: str
|
|
21
|
+
processed_at: str
|
|
22
|
+
error: str
|
|
23
|
+
attempt: int
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def process_data(item_id: int, content: str, attempt: int) -> ProcessingResult:
|
|
27
|
+
"""
|
|
28
|
+
Process a data record - initially fails for odd IDs, but succeeds on retry.
|
|
29
|
+
In a real-world application, this could be data validation,
|
|
30
|
+
transformation, or an ML model inference step.
|
|
31
|
+
"""
|
|
32
|
+
# Simulate an error for odd IDs on first attempt only
|
|
33
|
+
# This will succeed on retry to demonstrate the retry functionality
|
|
34
|
+
error = item_id % 2 == 1 and attempt == 1
|
|
35
|
+
return ProcessingResult(
|
|
36
|
+
processed_content="" if error else content.upper(),
|
|
37
|
+
processed_at=datetime.now(tz=timezone.utc).isoformat(),
|
|
38
|
+
error=f"Processing error for item {item_id} (attempt {attempt})"
|
|
39
|
+
if error
|
|
40
|
+
else "",
|
|
41
|
+
attempt=attempt,
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def retry_processing_example():
|
|
46
|
+
"""
|
|
47
|
+
Demonstrates retry processing using DataChain.
|
|
48
|
+
"""
|
|
49
|
+
|
|
50
|
+
# Step 1: Create initial dataset with sample data
|
|
51
|
+
print("Step 1: Creating initial dataset with sample data...")
|
|
52
|
+
sample_ids = [1, 2, 3, 4, 5]
|
|
53
|
+
sample_contents = [
|
|
54
|
+
"first item",
|
|
55
|
+
"second item",
|
|
56
|
+
"third item",
|
|
57
|
+
"fourth item",
|
|
58
|
+
"fifth item",
|
|
59
|
+
]
|
|
60
|
+
|
|
61
|
+
initial_chain = dc.read_values(
|
|
62
|
+
item_id=sample_ids, content=sample_contents, in_memory=True
|
|
63
|
+
).save(name="sample_data")
|
|
64
|
+
print(f"Created dataset with {initial_chain.count()} records\n")
|
|
65
|
+
|
|
66
|
+
# Step 2: First processing pass - some records will fail
|
|
67
|
+
# We enable delta, initially it won't do anything, but it means
|
|
68
|
+
# that code stays the same across all attempts
|
|
69
|
+
print("Step 2: First processing pass (some records will fail)...")
|
|
70
|
+
first_pass = (
|
|
71
|
+
dc.read_dataset(
|
|
72
|
+
"sample_data",
|
|
73
|
+
delta=True,
|
|
74
|
+
delta_on="item_id",
|
|
75
|
+
delta_retry="result.error",
|
|
76
|
+
)
|
|
77
|
+
# Set attempt number for processing, this is specific to this example only
|
|
78
|
+
.setup(attempt=lambda: 1)
|
|
79
|
+
.map(result=process_data)
|
|
80
|
+
.save(name="processed_data")
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
print(f"First pass completed. Total records: {first_pass.count()}")
|
|
84
|
+
|
|
85
|
+
# Show results of first pass
|
|
86
|
+
error_count = first_pass.filter(C("result.error") != "").count()
|
|
87
|
+
success_count = first_pass.filter(C("result.error") == "").count()
|
|
88
|
+
print(f"Successful: {success_count}, Failed: {error_count}")
|
|
89
|
+
|
|
90
|
+
print("\nFirst pass results:")
|
|
91
|
+
first_pass.show()
|
|
92
|
+
|
|
93
|
+
# Step 3: Retry processing - only failed records will be reprocessed
|
|
94
|
+
# Note how we use exactly the same DataChain code as above
|
|
95
|
+
print("\nStep 3: Retry processing (failed records will be reprocessed)...")
|
|
96
|
+
retry_chain = (
|
|
97
|
+
dc.read_dataset(
|
|
98
|
+
"sample_data",
|
|
99
|
+
delta=True,
|
|
100
|
+
delta_on="item_id",
|
|
101
|
+
# Retry records where result.error field is not empty
|
|
102
|
+
delta_retry="result.error",
|
|
103
|
+
)
|
|
104
|
+
.setup(attempt=lambda: 2) # Set attempt number for processing
|
|
105
|
+
.map(result=process_data)
|
|
106
|
+
.save(name="processed_data")
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
print(f"Retry pass completed. Total records: {retry_chain.count()}")
|
|
110
|
+
|
|
111
|
+
# Show final results
|
|
112
|
+
final_error_count = retry_chain.filter(C("result.error") != "").count()
|
|
113
|
+
final_success_count = retry_chain.filter(C("result.error") == "").count()
|
|
114
|
+
print(f"Final - Successful: {final_success_count}, Failed: {final_error_count}")
|
|
115
|
+
|
|
116
|
+
print("\nFinal results after retry:")
|
|
117
|
+
retry_chain.show()
|
|
118
|
+
|
|
119
|
+
if final_error_count > 0:
|
|
120
|
+
print(f"\nNote: {final_error_count} records still have errors after retry.")
|
|
121
|
+
print(
|
|
122
|
+
"In a real scenario, you could run this again or implement "
|
|
123
|
+
"different retry logic."
|
|
124
|
+
)
|
|
125
|
+
else:
|
|
126
|
+
print("\nAll records processed successfully after retry!")
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
if __name__ == "__main__":
|
|
130
|
+
retry_processing_example()
|
|
@@ -97,7 +97,13 @@ nav:
|
|
|
97
97
|
- logs: commands/job/logs.md
|
|
98
98
|
- cancel: commands/job/cancel.md
|
|
99
99
|
- ls: commands/job/ls.md
|
|
100
|
-
-
|
|
100
|
+
- 📚 User Guide:
|
|
101
|
+
- Overview: guide/index.md
|
|
102
|
+
- 📡 Interacting with remote storage: guide/remotes.md
|
|
103
|
+
- Data Processing:
|
|
104
|
+
- Overview: guide/processing.md
|
|
105
|
+
- Delta Processing: guide/delta.md
|
|
106
|
+
- Errors Handling and Retries: guide/retry.md
|
|
101
107
|
- 🤝 Contributing: contributing.md
|
|
102
108
|
|
|
103
109
|
- DataChain Website ↗: https://datachain.ai" target="_blank"
|
|
@@ -15,6 +15,24 @@ class classproperty: # noqa: N801
|
|
|
15
15
|
return self.fget(owner)
|
|
16
16
|
|
|
17
17
|
|
|
18
|
+
def _wrap_class(sync_fs_class):
|
|
19
|
+
"""
|
|
20
|
+
Analog of `AsyncFileSystemWrapper.wrap_class` from fsspec, but sets
|
|
21
|
+
asynchronous to False by default. This is similar to other Async FS
|
|
22
|
+
we initialize. E.g. it means we don't break things in Jupyter where code
|
|
23
|
+
run in async.
|
|
24
|
+
"""
|
|
25
|
+
from fsspec.implementations.asyn_wrapper import AsyncFileSystemWrapper
|
|
26
|
+
|
|
27
|
+
class GeneratedAsyncFileSystemWrapper(AsyncFileSystemWrapper):
|
|
28
|
+
def __init__(self, *args, **kwargs):
|
|
29
|
+
sync_fs = sync_fs_class(*args, **kwargs)
|
|
30
|
+
super().__init__(sync_fs, asynchronous=False)
|
|
31
|
+
|
|
32
|
+
GeneratedAsyncFileSystemWrapper.__name__ = f"Async{sync_fs_class.__name__}Wrapper"
|
|
33
|
+
return GeneratedAsyncFileSystemWrapper
|
|
34
|
+
|
|
35
|
+
|
|
18
36
|
@functools.cache
|
|
19
37
|
def get_hf_filesystem_cls():
|
|
20
38
|
import fsspec
|
|
@@ -29,10 +47,9 @@ def get_hf_filesystem_cls():
|
|
|
29
47
|
f"{fsspec_version} is installed."
|
|
30
48
|
)
|
|
31
49
|
|
|
32
|
-
from fsspec.implementations.asyn_wrapper import AsyncFileSystemWrapper
|
|
33
50
|
from huggingface_hub import HfFileSystem
|
|
34
51
|
|
|
35
|
-
fs_cls =
|
|
52
|
+
fs_cls = _wrap_class(HfFileSystem)
|
|
36
53
|
# AsyncFileSystemWrapper does not set class properties, so we need to set them back.
|
|
37
54
|
fs_cls.protocol = HfFileSystem.protocol
|
|
38
55
|
return fs_cls
|