allenai / allenai/objaverse-xl

Request: Make `_VERSIONED_PATH` configurable via public API

Open
#67 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.4k
Forks
93
PR merge metrics
No merged PRs in 30d

Description

### Description:

Currently, Objaverse uses a private variable _VERSIONED_PATH to determine where data is stored.
To override this behavior, users need to monkeypatch:
```python
import objaverse as oxl
oxl._VERSIONED_PATH = "./data"
```
This approach has a few downsides:

- Relies on a private/internal variable
- Not stable across versions
- Not discoverable for users
- Can break unexpectedly if internal implementation changes

### Proposed solution:

Expose a public way to configure the data directory, such as:

```python
oxl.set_data_dir("./data")
```
or alternatively allow passing a download_dir parameter in relevant APIs.

Optionally, support an environment variable like:
```python
OBJAVERSE_DATA_DIR=./data
```
### Benefits:

- Cleaner and safer usage
- Avoids reliance on internal implementation
- Improves usability for large-scale dataset workflows
- Backward compatibility can be maintained by keeping the current default behavior when no directory is specified.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.