Data version control for machine learning
Project description
🐂 🐍 Oxen Python Interface
The Oxen python interface makes it easy to integrate Oxen datasets directly into machine learning dataloaders or other data pipelines.
Repositories
There are two types of repositories one can interact with, a LocalRepo
and a RemoteRepo
.
Local Repo
To fully clone all the data to your local machine, you can use the LocalRepo
class.
import oxen
repo = LocalRepo("path/to/repository")
repo.clone("https://hub.oxen.ai/ox/CatDogBBox")
If there is a specific version of your data you want to access, you can specify the branch
when cloning.
repo.clone("https://hub.oxen.ai/ox/CatDogBBox", branch="my-pets")
Once you have a repository locally, you can perform the same operations you might via the command line, through the python api.
For example, you can checkout a branch, add a file, commit, and push the data to the same remote you cloned it from.
import oxen
repo = LocalRepo("path/to/repository")
repo.clone("https://hub.oxen.ai/ox/CatDogBBox")
repo.checkout()
Remote Repo
If you don't want to download the data locally, you can use the RemoteRepo
class to interact with a remote repository on OxenHub.
import oxen
repo = RemoteRepo("https://hub.oxen.ai/ox/CatDogBBox")
To stage and commit files to a specific version of the data, you can checkout
an existing branch or create a new one.
repo.create_branch("dev")
repo.checkout("dev")
You can then stage files to the remote repository by specifying the file path and destination directory.
repo.add("new-cat.png", "images") # Stage to images/new-cat.png on remote
repo.commit("Adding another training image")
Note that no "push" command is required here, since the above code creates a commit directly on the remote branch.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for oxenai-0.1.24-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0dbe27a08ea96be752e3ee06743a07285b9bf6813d8fca0472c3a05ed4516e01 |
|
MD5 | 262d25f29a3005f7772f6fc451104f35 |
|
BLAKE2b-256 | f2cc4e77145d67f0e754ee1f1bc1a76b67c61d3e6a1cdc84d4b43625f56a87d4 |
Hashes for oxenai-0.1.24-cp310-cp310-manylinux_2_35_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7176fe836206a9f2d35c6ceabdac722c29dd25132f219e13a1caa9a3915daa49 |
|
MD5 | 0c0e19cd2788a372275785840a7b0783 |
|
BLAKE2b-256 | 9429f97693e477267873f4fda4c4715872ce31f322b06622b27bd394b6612859 |
Hashes for oxenai-0.1.24-cp310-cp310-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1868c852633aea1752e72441e6f8a96da7f7989083db9b604c92e8ebf0af44e9 |
|
MD5 | 3bd919ea8ff632b34a3d475289f7ed74 |
|
BLAKE2b-256 | c48bd78d37252f849d699eebfb0ce4ceca5bd1485bb09c2e0eeb538b38ed4093 |
Hashes for oxenai-0.1.24-cp310-cp310-macosx_13_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dbe048777eda71aaf04ed7b525abf6242651d1b09080e85b663ddebaeab79e86 |
|
MD5 | 17ba2c7b88b368b3af894a92ac17ff06 |
|
BLAKE2b-256 | 50f82cde407ed3d93d96bdec99ea1b13ea2ac138e695c995acd69e469b917c7e |
Hashes for oxenai-0.1.24-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 907da8f053839c96de24249f0c9601e1106102e9a5f22461cfcffc53d81ae6af |
|
MD5 | 971db3db9928eba49e92edd1b76c27f9 |
|
BLAKE2b-256 | e45cdfbdf4e65d2c50b52ababe719fa601365a688186c11927d0d06e7513552e |
Hashes for oxenai-0.1.24-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e90caa7e5c96e9ee3d3e7d6224f5a0056c4d22ca330f559e5409ca71b00ce461 |
|
MD5 | 371d04acb7baee6352f8515c613428c1 |
|
BLAKE2b-256 | 09ea5681cf562ec605b7c8f453b2ed126c0bf7dce7c9177f55b3386d9552377c |
Hashes for oxenai-0.1.24-cp38-cp38-manylinux_2_35_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c08629aea2e1e4d4c2441c34ff75e705e07a9dc3895f43e5374af64b4190a1dc |
|
MD5 | 639aa084ebafff817f336f86c9d5f8ab |
|
BLAKE2b-256 | e400180e6f4ef2047a755dba0b34a065981e4ef21298398e142a6ec89c8a5939 |
Hashes for oxenai-0.1.24-cp38-cp38-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e8a2bfb4e66668e294fd6aa67ad0beaff1792ba1d49b0ff8fc67b77708aa4f8 |
|
MD5 | 87954e87b67eba102a799f0c15ca54b5 |
|
BLAKE2b-256 | 02e8ad5d55cf739c1e911acc31fd8948b05e1b72990297a66fb377589b281844 |
Hashes for oxenai-0.1.24-cp38-cp38-macosx_13_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35daacddaa1b291a143a6dcb081eabaaac0c49008258482fc75c1132933eae24 |
|
MD5 | 94836d47d7c0d1d7216f11b8f4357b64 |
|
BLAKE2b-256 | 402aeffa79b03218263c6441bc2d6fe9a20205a9503c1af3aef4cc85479de887 |
Hashes for oxenai-0.1.24-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2320a32e8d75772b2ae39549c66c2c1a93cae9b271f69a589d8ff4e3f98c515 |
|
MD5 | 1ac21f8d8bee552d4359fbfb96559498 |
|
BLAKE2b-256 | 08302e3a107d9ce3c71625606f410b079d72d2c674296b56cd2eb7076fb3587d |