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
Unanswered
Hi, I Tried Download Model From Clearml.Storage (From S3 Bucket), But I Got This Error. Err: [Errno 36] File Name Too Long: Is There Any Way To Fix This? Thanks


` import tensorflow as tf
from clearml import Model
from clearml.model import InputModel

def get_model_id(model_name,tags = None):
print("Model name: ", model_name)
print("Model tags: ", tags)
response = Model.query_models(model_name=model_name,
tags=tags)
if not response:
raise ValueError('your model name and tags result in empty query')
model_data= None
for model_obj in response:
if model_obj.name == model_name:
model_data = model_obj
break
return model_data

def get_keras_model(model_name, model_tags, generate_model=True):
"""
Load model from clearml, transform it as a InputModel
then, converts to Keras model
"""

model_obj = get_model_id(model_name,
                        model_tags)
task_input_model = InputModel(model_obj.id)
if generate_model:
    # Construct Keras model
    model = tf.keras.models.model_from_config(task_input_model.config_dict)
    model.load_weights(task_input_model.get_local_copy())

    return task_input_model, model
else:
    return task_input_model

Call

_, model = get_keras_model(task_params['model_name'], task_params['model_tags']) `

  
  
Posted 3 years ago
190 Views
0 Answers
3 years ago
one year ago
Tags