Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BatchAPI storage component together with test #104

Merged
merged 17 commits into from
Aug 30, 2024
Merged

Conversation

xinchen384
Copy link
Contributor

@xinchen384 xinchen384 commented Aug 28, 2024

Pull Request Description

  1. batch storage interfaces and implementations
  2. a setup script to install python packages
  3. a test to verify that various types of read and write are consistent

Related Issues

Resolves: #[Insert issue number(s)]

Important: Before submitting, please complete the description above and review the checklist below.


Contribution Guidelines (Expand for Details)

We appreciate your contribution to aibrix! To ensure a smooth review process and maintain high code quality, please adhere to the following guidelines:

Pull Request Title Format

Your PR title should start with one of these prefixes to indicate the nature of the change:

  • [Bug]: Corrections to existing functionality
  • [CI]: Changes to build process or CI pipeline
  • [Docs]: Updates or additions to documentation
  • [API]: Modifications to aibrix's API or interface
  • [CLI]: Changes or additions to the Command Line Interface
  • [Misc]: For changes not covered above (use sparingly)

Note: For changes spanning multiple categories, use multiple prefixes in order of importance.

Submission Checklist

  • PR title includes appropriate prefix(es)
  • Changes are clearly explained in the PR description
  • New and existing tests pass successfully
  • Code adheres to project style and best practices
  • Documentation updated to reflect changes (if applicable)
  • Thorough testing completed, no regressions introduced

By submitting this PR, you confirm that you've read these guidelines and your changes align with the project's contribution standards.

self._storage_type_name = "undefined"

@abstractmethod
def write_job_input_data(self, job_id, inputDataFileName):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to write the job input data? should it be read-only?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it is read-only. This api is used to upload job's input data at the first place. After this upload, there is no need to write it.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can keep it here now. Let's have a discussion later on the "writing" part.


@classmethod
def create_storage(cls, storage_type=0):
if storage_type == 0:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do not we use some enum? int is not readable


current_job_offsets = {}
job_input_requests = {}
p_storage = LocalDiskFiles()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am ok for short term. it supposed to be a object wrapper for following methods. In the initialization, you can initialize the persist_storage.

"""

def __init__(self):
self.directory_path = os.path.abspath(os.path.dirname(__file__))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should you create an env path instead of using the code path?

@xinchen384 xinchen384 merged commit 926b17a into main Aug 30, 2024
2 checks passed
@xinchen384 xinchen384 deleted the xin/batchStorage branch August 30, 2024 22:19
gangmuk pushed a commit that referenced this pull request Jan 25, 2025
* support of batch storage and test

* add repo version for setup

* update print string format

* update import format for isort

* type annotation

* ruff format

* two formats

* update variable name and remove setup script

* add storage implmentation back

* [CI] Remove isort check (#113)

fix: remove isort check

* use enum for storage type and env var

* merge lock

* update lock

* format check

---------

Signed-off-by: xinchen384 <[email protected]>
Co-authored-by: xin.chen <[email protected]>
Co-authored-by: brosoul <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants