Fix documentation and prints

This commit is contained in:
allegroai 2021-08-25 16:46:44 +03:00
parent 8f48d5c884
commit aff39ae061
2 changed files with 20 additions and 4 deletions

View File

@ -1236,7 +1236,7 @@ class _Boto3Driver(_Driver):
except ImportError:
raise UsageError(
'AWS S3 storage driver (boto3) not found. '
'Please install driver using "pip install \'boto3>=1.9\'"'
'Please install driver using: pip install \"boto3>=1.9\"'
)
# skip 's3://'
@ -1496,7 +1496,7 @@ class _GoogleCloudStorageDriver(_Driver):
except ImportError:
raise UsageError(
'Google cloud driver not found. '
'Please install driver using "pip install \'google-cloud-storage>=1.13.2\'"'
'Please install driver using: pip install \"google-cloud-storage>=1.13.2\"'
)
self.name = name[len(_GoogleCloudStorageDriver.scheme_prefix):]
@ -1612,7 +1612,7 @@ class _AzureBlobServiceStorageDriver(_Driver):
except ImportError:
raise UsageError(
'Azure blob storage driver not found. '
'Please install driver using "pip install \'azure.storage.blob<=2.1.0\'"'
'Please install driver using: pip install \"azure.storage.blob<=2.1.0\"'
)
self.name = name

View File

@ -18,32 +18,48 @@ def trigger_task_func(task_id):
if __name__ == '__main__':
trigger = TriggerScheduler(pooling_frequency_minutes=3.0)
# create the TriggerScheduler object (checking system state every minute)
trigger = TriggerScheduler(pooling_frequency_minutes=1.0)
# Add trigger on model publishing
trigger.add_model_trigger(
name='model deploy',
schedule_function=trigger_model_func,
# schedule_task_id='task_id_here', # you can also schedule an existing task to be executed
trigger_project='examples',
trigger_on_tags=['deploy']
)
# Add trigger on model publishing
trigger.add_model_trigger(
name='model quality check',
# schedule_function=trigger_model_func, # you can also schedule a function to be executed.
schedule_task_id='add_task_id_here',
schedule_queue='default',
trigger_project='examples',
trigger_on_tags=['deploy']
)
# Add trigger on dataset creation
trigger.add_dataset_trigger(
name='retrain on dataset',
schedule_function=trigger_dataset_func,
# schedule_task_id='aabbcc', # you can also schedule an existing task to be executed
trigger_project='datasets',
trigger_on_tags=['retrain']
)
# Add trigger on Task performance
trigger.add_task_trigger(
name='performance high-score',
schedule_function=trigger_task_func,
# schedule_task_id='task_id_here', # you can also schedule an existing task to be executed
trigger_project='examples',
trigger_on_metric='epoch_accuracy', trigger_on_variant='epoch_accuracy',
trigger_on_sign='max',
trigger_on_threshold=0.99
)
# start the trigger daemon (locally/remotely)
# trigger.start()
trigger.start_remotely()