clearml icon indicating copy to clipboard operation
clearml copied to clipboard

Manual register model does not upload a model file to upload_uri (output_model) or output_uri (task)

Open chorus12 opened this issue 1 year ago • 4 comments

Hi. I need to manually register a model and use the following lines of code:

task = Task.init(project_name=args['cml_project_name'], 
                     task_name=args['cml_task_name'], 
                     output_uri = args['cml_output_uri'],  # this points to a valid S3 path
                     auto_connect_frameworks=False)

Then I create an instance of output model and invoke update weigths.

    output_model = OutputModel(task=cml.Task.current_task(), 
                                   label_enumeration=labels, 
                                   framework='tensorflow')
    
    output_model.update_weights(register_uri=output_filename)  # upload_uri=args['cml_output_uri'])

I still have a link to local file in model in WebUI. Even in clearml.conf sdk.development.default_output_uri points to s3 location.

$ pip freeze|grep clearml clearml==1.5.0

chorus12 avatar Aug 04 '22 15:08 chorus12

with clearml==1.6.2 the same stuff

chorus12 avatar Aug 04 '22 15:08 chorus12

Hi @chorus12 ! I had the same problem with selfhosted S3.

Try to specify port in output uri.

For example chunk of my clearml.conf in clearml-agent:

     sdk {
      aws {
        s3 {
          host: "s3.mystorage.org:443"
          key: "S3_USERNAME"
          region: "myregion"
          secret: "S3_PASSWORD"
          use_credentials_chain: false
          credentials: [{
            bucket: "S3_BUCKET"
            secure: true
          }]
        }
      }
      development {
        default_output_uri: "s3://s3.mystorage.org:443/S3_BUCKET/clearml"
      }
    }

Shm013 avatar Aug 05 '22 13:08 Shm013

Thanks. I do have a port in s3 since it's not native AWS but the problem is that uploading to S3 works not with manual model register - with automatic - it's all fine.

chorus12 avatar Aug 12 '22 06:08 chorus12

Hi @chorus12 ,

Sorry for the late reply - can you show this output URI's contents?

output_uri = args['cml_output_uri'], # this points to a valid S3 path

jkhenning avatar Sep 05 '22 14:09 jkhenning