comet_ml.get_s3_uploader ¶
get_s3_uploader(
bucket: str, key: Optional[str] = None, **kwargs
) -> UploadCallback
Return an upload callback that can be used to upload offline archive when an online Experiment has fallback to offline.
See also: comet_ml.Experiment.set_offline_zip_uploader
The AWS credentials must be present either via environment variables or in the user home directory in format supported by boto3
client as described at: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html
Parameters:
bucket
(str
) –The bucket name to which the PUT action was initiated.
key
(Optional[str]
, default:None
) –Object key for which the PUT action was initiated. If not provided the automatically generated file name will be used.
kwargs
–The additional parameters supported by
boto3
client as described here: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3/client/put_object.html
Returns:
UploadCallback
–A callback to be used to upload offline experiment data to S3.
For example:
from comet_ml import get_s3_uploader
upload_callback = get_s3_uploader(bucket="my_bucket")
experiment = Experiment()
experiment.set_offline_zip_uploader(upload_callback)