Skip to content

Commit ecd5997

Browse files
committed
for the moment switch back to boto3 for file transfer
1 parent 518b1bc commit ecd5997

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

doubleml_serverless/double_ml_data_aws.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from doubleml import DoubleMLData
22
import os
3-
from botocore.session import Session
3+
import boto3
44
import pandas as pd
55

66

@@ -50,8 +50,7 @@ def from_s3(cls,
5050
x_cols=None,
5151
z_cols=None,
5252
use_other_treat_as_covariate=True):
53-
session = Session()
54-
s3_client = session.create_client('s3')
53+
s3_client = boto3.client('s3')
5554
response = s3_client.get_object(Bucket=bucket,
5655
Key=file_key)
5756
file = response["Body"]
@@ -66,8 +65,7 @@ def store_and_upload_to_s3(self):
6665
# load csv as a pd.DataFrame
6766
file_name = os.path.split(self.file_key)[1]
6867
self.data.to_csv(file_name)
69-
session = Session()
70-
s3_client = session.create_client('s3')
68+
s3_client = boto3.client('s3')
7169
response = s3_client.upload_file(Filename=file_name,
7270
Bucket=self.bucket,
7371
Key=self.file_key)

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ pandas
55
scipy
66
sklearn
77
statsmodels
8-
aiobotocore
8+
boto3==1.14.44
9+
aiobotocore==1.1.2

0 commit comments

Comments
 (0)