I think that will work, but I'm not sure actually. I know for sure that something like us-east-2
is supported
Could you try adding region
under credentials
as well?
SmugDolphin23 Thank you very much!
That's clearml.conf for ClearML end users right?
` s3 {
# S3 credentials, used for read/write access by various SDK elements
# default, used for any bucket not specified below
key: "mykey"
secret: "mysecret"
region: " ` ` "
credentials: [
{
bucket: "mybucket"
key: "mykey"
secret: "mysecret"
region: " ` ` "
}, `
@<1526734383564722176:profile|BoredBat47> Yeah. This is an example:
s3 {
key: "mykey"
secret: "mysecret"
region: "us-east-1"
credentials: [
{
bucket: "
"
key: "mykey"
secret: "mysecret"
region: "us-east-1"
},
]
}
# some other config
default_output_uri: "
"
SmugDolphin23 Got it. Now I am a bit confused about region parameter in s3 section. Amazon docs say that region could be a regular URL with protocol like https://etc.etc which my endpoint actually is. I plugged it in s3 section in clearml.conf. Should it stay that way?
A bit overwhelmed by configuration, since it has an agent, a server and bunch of configuration files, easy to mess up
OK. Bt the way, you can find the region from the AWS dashabord
And I believe that by default we send artifacts to the clearml server if not specified
Hi again, @<1526734383564722176:profile|BoredBat47> ! I actually took a closer look at this. The config file should look like this:
s3 {
key: "KEY"
secret: "SECRET"
use_credentials_chain: false
credentials: [
{
host: "myendpoint:443" # no http(s):// and no s3:// prefix, also no bucket name
key: "KEY"
secret: "SECRET"
secure: true # if https
},
]
}
default_output_uri: "
" # notice the s3:// prefix (not http(s))
The region should be optional, but try setting it as well if it doesn't work
Yeah, that's always the case with complex systems 😕
@<1523701087100473344:profile|SuccessfulKoala55> Hey, Jake, getting back to you. I couldn't be able to resolve my issue. I can access my bucket by any means just fine, e.g. by S3 CLI client. All the tools I use require 4 params: AK, SK, endpoint, bucket. I wonder why ClearML doesn't have explicit endpoint
parameter and you have to use output_uri
for it and why is there a region
when other tools don't require it.
SmugDolphin23 I added a region, run experiment again. Didn't work
@<1523701304709353472:profile|OddShrimp85> I haven't done it, for me it worked as-is
` from random import random
from clearml import Task, TaskTypes
args = {}
task: Task = Task.init(
project_name="My Proj",
task_name='Sample task',
task_type=TaskTypes.inference,
auto_connect_frameworks=False
)
task.connect(args)
task.execute_remotely(queue_name="default")
value = random()
task.get_logger().report_single_value(name="sample_value", value=value)
with open("some_artifact.txt", "w") as f:
f.write(f"Some random value: {value}\n")
task.upload_artifact(name="test_artifact", artifact_object="some_artifact.txt") `
The code is run from another machine where clearml.conf configured to connect to ClearML server, no other configurations are provided
I meant the code where you upload an artifact, sorry
@<1523701435869433856:profile|SmugDolphin23> I didn't use a region at first and that was not working. Now I use a region and it still doesn't work.
From the boto3 inside a Python I could create a session where I specify ak and sk, and create a client from the session where I pass service_name and endpoint_url. It works just fine
Oh, it's configured o agent machine, got you
@<1526734383564722176:profile|BoredBat47> How would you connect with boto3
? ClearML uses boto3
as well, what it basically does is getting the key/secret/region from the conf file. After that it opens a Session
with the credentials. Have you tried deleting the region altogether from the conf file?
The only expection is the models if I'm not mistaken, which are stored locally by default.
@<1523701435869433856:profile|SmugDolphin23> Hello, again! I tried to fill the values by your example. Still no luck. I noticed console log on my task says that I have certificate error. I disabled it in api section in clearml.conf like this: verify_certificate = false
and I still have SSL error. Any clues why would that be?
@<1523701304709353472:profile|OddShrimp85> I fixed my SSL error by putting REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt
in .bashrc
file
@<1526734383564722176:profile|BoredBat47> Just to check if u need to do update-ca-certificates or equivalent?
@<1523701087100473344:profile|SuccessfulKoala55> Fixed it by setting env var with path to certificates. I was sure that wouldn't help since I can curl and python get request to my endpoint from shell just fine. Now it says I am missing security headers, seems it's something on my side. Will try to fix this
How can you have a certificate error if you're using S3? I'm sure their certificate is OK...