Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
Hi Everyone, Quick Question Regarding Minio And Logging:

Hi everyone,
quick question regarding MinIO and logging:
task = Task.init( project_name=project_name, task_name=task_name, tags=tags, output_uri=" ` ",
)

    torch.save({"key": "some_value"}, "my_artifact") # <---- This works and I can see it on MinIO!

    Logger.current_logger().set_default_upload_destination(
        " ` ` "
    ) # This call fails <------------------------------------------------------------- `I verified MinIO works. I can safe artifacts to MinIO, however setting the logger fails with

botocore.exceptions.ClientError: An error occurred (InvalidAccessKeyId) when calling the PutObject operation: The AWS Access Key Id you provided does not exist in our records.Any idea why?

  
  
Posted 2 years ago
Votes Newest

Answers 30


After setting the sdk.development.default_output_uri in the configs, my code kinda looks like:
` task = Task.init(project_name=..., task_name=..., tags=...)
logger = task.get_logger()

report with logger freely `

  
  
Posted 2 years ago

But this means the logger will use the default fileserver or not?

  
  
Posted 2 years ago

Now trying changing the default file server.

  
  
Posted 2 years ago

No I don't this at all

  
  
Posted 2 years ago

mytask.get_logger().current_logger().set_default_upload_destination(" s3://ip:9000/clearml ") this is what I do. Do you do the same?

  
  
Posted 2 years ago

Let me double check, one moment

  
  
Posted 2 years ago

The logs are on the bucket, yes.
The default file server is also set to s3://ip:9000/clearml

  
  
Posted 2 years ago

Unfortunately, not. Quick question: Is there caching happening somewhere besides .clearml ? Does the boto3 driver create cache?

  
  
Posted 2 years ago

So I suppose there is a bug in ClearML.

  
  
Posted 2 years ago

oups yes, you are right. output_uri is used for the artifacts
for the logger it is https://clear.ml/docs/latest/docs/references/sdk/logger#set_default_upload_destination

btw what do you get when you do task.get_logger().get_default_upload_destination() ?

  
  
Posted 2 years ago

yes everything that is downloaded is cached. The cache folder is in your config file :

` sdk {
# ClearML - default SDK configuration

storage {
    cache {
        # Defaults to system temp folder / cache
        default_base_dir: "~/.clearml/cache"
         size {
            # max_used_bytes = -1
            min_free_bytes = 10GB
            # cleanup_margin_percent = 5%
        }
    }

    direct_access: [
        # Objects matching are considered to be available for direct access, i.e. they will not be downloaded
        # or cached, and any download request will return a direct reference.
        # Objects are specified in glob format, available for url and content_type.
        { url: "file://*" }  # file-urls are always directly referenced
    ]
} `
  
  
Posted 2 years ago

This is the error I get from setting the logger upload destination.
botocore.exceptions.ClientError: An error occurred (InvalidAccessKeyId) when calling the PutObject operation: The AWS Access Key Id you provided does not exist in our records.

  
  
Posted 2 years ago

Setting the api.files_server: s3://myhost:9000/clearml in clearml.conf works!

  
  
Posted 2 years ago

with s3

  
  
Posted 2 years ago

Is sdk.development.default_output_uri used with s3://ip:9000/clearml or ip:9000/clearml ?

  
  
Posted 2 years ago

thank you, will try

  
  
Posted 2 years ago

Or I am using this method wrong.

  
  
Posted 2 years ago

the same as for me

  
  
Posted 2 years ago

It is. Let me see what else I have set up for MinIO in configs, one moment

  
  
Posted 2 years ago

The api.files_server is set to the MinIO endpoint s3://ip:9000/clearml (both locally and remotely) The sdk.development.default_output_uri is set to the MinIO endpoint (both locally and remotely) When we call Task.init I do not set the output_uri at all I get the logger directly with task.get_logger()

  
  
Posted 2 years ago

Hey ReassuredTiger98
Is there any update from your side ?
I confirm that you need to put your key and secret in the credentials section of the configuration file . As Idan, I let my policy configuration untouched

  
  
Posted 2 years ago

Is this really working for you guys? I have no clue what's wrong. Seems so unlikely that my code works with artifacts, datasets, but not logging...

  
  
Posted 2 years ago

Is there a simple way to get the response of the MinIO instance? Then I can verify whether it is the MinIO instance or my client

  
  
Posted 2 years ago

as long as you dont precise any uri when you init a task (with default outuput uri parameter), clearml will use the config file value registered into sdk.development.default_output_uri

  
  
Posted 2 years ago

Not for the logger, I just tested it.

  
  
Posted 2 years ago

Thank you. I am still having the issue. I verified that output_uri of Task.init works and also clearml-data with MinIO storage works, but the logger still throws errors

  
  
Posted 2 years ago

Also I can see that clearml correctly loads the config
STORAGE S3BucketConfig(bucket='clearml', host='myhost:9000', key='mykey' secret='mysecret', token='', multipart=False, acl='', secure=True, region=None, verify=True, use_credentials_chain=False)

  
  
Posted 2 years ago

Hurray! Some success is good 😄

  
  
Posted 2 years ago

Okay, but are you logs still stored on MinIO with only using sdk.development.default_output_uri ?

  
  
Posted 2 years ago
1K Views
30 Answers
2 years ago
one year ago
Tags