Skip to content

Commit

Permalink
Update to latest Mountpoint client crates (#212)
Browse files Browse the repository at this point in the history
* Update to latest Mountpoint client crates

Signed-off-by: James Bornholt <[email protected]>

* Pin numpy version

Signed-off-by: James Bornholt <[email protected]>

* Appease clippy

Signed-off-by: James Bornholt <[email protected]>

---------

Signed-off-by: James Bornholt <[email protected]>
  • Loading branch information
jamesbornholt authored Jun 28, 2024
1 parent 91b36e9 commit 3ec7f02
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 16 deletions.
5 changes: 2 additions & 3 deletions s3torchconnector/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ classifiers = [
]

dependencies = [
#TODO: Remove torch != 2.3.0 restriction when https://github.com/pytorch/data/issues/1244 is fixed
"torch >= 2.0.1, != 2.3.0",
"torch >= 2.0.1",
"s3torchconnectorclient >= 1.2.3",
]

Expand All @@ -42,7 +41,7 @@ e2e = [
"torchvision",
"Pillow",
"boto3",
"numpy",
"numpy < 2",
"pytest-xdist"
]

Expand Down
12 changes: 6 additions & 6 deletions s3torchconnectorclient/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions s3torchconnectorclient/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ built = "0.7"
pyo3 = { version = "0.19.2" }
pyo3-log = "0.8.3"
futures = "0.3.28"
mountpoint-s3-client = { version = "0.8.1", features = ["mock"] }
mountpoint-s3-crt = "0.7.0"
mountpoint-s3-client = { version = "0.9.0", features = ["mock"] }
mountpoint-s3-crt = "0.8.0"
log = "0.4.20"
tracing = { version = "0.1.40", default-features = false, features = ["std", "log"] }
tracing-subscriber = { version = "0.3.18", features = ["fmt", "env-filter"]}
Expand Down
2 changes: 1 addition & 1 deletion s3torchconnectorclient/rust/src/mock_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl PyMockClient {
unsigned: bool,
) -> PyMockClient {
let unordered_list_seed: Option<u64> = None;
let config = MockClientConfig { bucket, part_size, unordered_list_seed };
let config = MockClientConfig { bucket, part_size, unordered_list_seed, ..Default::default() };
let mock_client = Arc::new(MockClient::new(config));

PyMockClient {
Expand Down
6 changes: 3 additions & 3 deletions s3torchconnectorclient/rust/src/mountpoint_s3_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ impl MountpointS3Client {

#[allow(clippy::too_many_arguments)]
impl MountpointS3Client {
pub(crate) fn new<Client: ObjectClient>(
pub(crate) fn new<Client>(
region: String,
user_agent_prefix: String,
throughput_target_gbps: f64,
Expand All @@ -175,8 +175,8 @@ impl MountpointS3Client {
endpoint: Option<String>,
) -> Self
where
Client: Sync + Send + 'static,
<Client as ObjectClient>::GetObjectResult: Unpin + Sync,
Client: ObjectClient + Sync + Send + 'static,
<Client as ObjectClient>::GetObjectRequest: Unpin + Sync,
<Client as ObjectClient>::PutObjectRequest: Sync,
{
Self {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl<T: ObjectClient> MountpointS3ClientInnerImpl<T> {
impl<Client> MountpointS3ClientInner for MountpointS3ClientInnerImpl<Client>
where
Client: ObjectClient,
<Client as ObjectClient>::GetObjectResult: Sync + Send + Unpin + 'static,
<Client as ObjectClient>::GetObjectRequest: Sync + Unpin + 'static,
<Client as ObjectClient>::PutObjectRequest: Sync + 'static,
{
fn get_object(&self, py: Python, bucket: String, key: String) -> PyResult<GetObjectStream> {
Expand Down

0 comments on commit 3ec7f02

Please sign in to comment.