I finally got around to look into Automate and happy to share some initial feedback.
-
Maybe a silly question, but instead of only pausing an automation, how to delete one?
-
I think the featured functions really help to lower the entry bar to get started with Automate as well as building custom functions. However, some featured functions aren’t working or give some confusing results (I haven’t checked all of them). Some of the things encountered:
- Window Safety Legislation Impact https://automate.speckle.dev/functions/2b96a1ed03. The GitHub repo seems to contain the Python template file, contrary to the readme and description. When I setup an Automation I got this log:
Log Window Safety Legislation Impact
task 2b96a1ed03-5be03dca71-0 has failed: “step-2b96a1ed03-5be03dca71-0” exited with code 1
[prepare] 2024/04/11 13:39:05 Entrypoint initialization[2b96a1ed03-5be03dca71-0] Reporting run status with content: {‘automationId’: ‘73f4f13340’, ‘automationRevisionId’: ‘c3a9ce35cf’, ‘automationRunId’: ‘de7b10f4e751db533ddf’, ‘versionId’: ‘c9c8a7f01b’, ‘functionId’: ‘2b96a1ed03-5be03dca71-0’, ‘functionName’: ‘Window Safety Legislation Impact’, ‘functionLogo’: 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/
. . .
deleted jpeg data to prevent running into character limit of this post
. . .Ad0XioyJJ1WoAGiqKioqOLqqKioqIoqioqKiKKosYuekYnrEUWKjGGYurvjCOqL//2Q==', ‘runStatus’: ‘RUNNING’, ‘statusMessage’: None, ‘contextView’: None, ‘elapsed’: 0.002548567019402981, ‘resultVersionIds’: [], ‘objectResults’: None}
[2b96a1ed03-5be03dca71-0] It took 7.10 seconds to receive the speckle version c9c8a7f01b
[2b96a1ed03-5be03dca71-0] Traceback (most recent call last):
[2b96a1ed03-5be03dca71-0] File “/usr/local/lib/python3.11/site-packages/speckle_automate/runner.py”, line 168, in run_function
[2b96a1ed03-5be03dca71-0] automate_function(automation_context, inputs) # type: ignore
[2b96a1ed03-5be03dca71-0] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[2b96a1ed03-5be03dca71-0] File “/home/speckle/main.py”, line 49, in automate_function
[2b96a1ed03-5be03dca71-0] objects_with_forbidden_speckle_type = [
[2b96a1ed03-5be03dca71-0] ^
[2b96a1ed03-5be03dca71-0] File “/home/speckle/main.py”, line 49, in
[2b96a1ed03-5be03dca71-0] objects_with_forbidden_speckle_type = [
[2b96a1ed03-5be03dca71-0] ^
[2b96a1ed03-5be03dca71-0] File “/home/speckle/flatten.py”, line 12, in flatten_base
[2b96a1ed03-5be03dca71-0] yield from flatten_base(element)
[2b96a1ed03-5be03dca71-0] File “/home/speckle/flatten.py”, line 12, in flatten_base
[2b96a1ed03-5be03dca71-0] yield from flatten_base(element)
[2b96a1ed03-5be03dca71-0] File “/home/speckle/flatten.py”, line 11, in flatten_base
[2b96a1ed03-5be03dca71-0] for element in base[“elements”]:
[2b96a1ed03-5be03dca71-0] TypeError: ‘NoneType’ object is not iterable
[2b96a1ed03-5be03dca71-0]
[2b96a1ed03-5be03dca71-0] Automation run FAILED after 7.10 seconds.
[2b96a1ed03-5be03dca71-0] Function error. Check the automation run logs for details.
[2b96a1ed03-5be03dca71-0] Reporting run status with content: {‘automationId’: ‘73f4f13340’, ‘automationRevisionId’: ‘c3a9ce35cf’, ‘automationRunId’: ‘de7b10f4e751db533ddf’, ‘versionId’: ‘c9c8a7f01b’, ‘functionId’: ‘2b96a1ed03-5be03dca71-0’, ‘functionName’: ‘Window Safety Legislation Impact’, ‘functionLogo’: 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/. . .
deleted jpeg data to prevent running into character limit of this post
. . .Ad0XioyJJ1WoAGiqKioqOLqqKioqIoqioqKiKKosYuekYnrEUWKjGGYurvjCOqL//2Q==', ‘runStatus’: ‘FAILED’, ‘statusMessage’: ‘Function error. Check the automation run logs for details.’, ‘contextView’: ‘/projects/73e45b58d8/models/7ed4f20c89@c9c8a7f01b’, ‘elapsed’: 7.115144368028268, ‘resultVersionIds’: [], ‘objectResults’: {‘version’: ‘1.0.0’, ‘values’: {‘objectResults’: [], ‘blobIds’: []}}}
container step-2b96a1ed03-5be03dca71-0 has failed : [{“key”:“StartedAt”,“value”:“2024-04-11T13:39:06.403Z”,“type”:3}]
- Data Sanitiser Demo https://automate.speckle.dev/functions/69601ebea4. It doesn’t allow to provide all input required. I set it to pattern matching but then the pattern match input field stays greyed out as you can see in the screenshot below. I tried various input combinations, but the log throws an error.
Log Data Sanitiser Demo
task 69601ebea4-58c75ed14b-0 has failed: “step-69601ebea4-58c75ed14b-0” exited with code 1
[prepare] 2024/04/08 10:05:17 Entrypoint initialization[69601ebea4-58c75ed14b-0] Traceback (most recent call last):
[69601ebea4-58c75ed14b-0] File “/home/speckle/main.py”, line 177, in
[69601ebea4-58c75ed14b-0] execute_automate_function(automate_function, FunctionInputs)
[69601ebea4-58c75ed14b-0] File “/usr/local/lib/python3.11/site-packages/speckle_automate/runner.py”, line 62, in execute_automate_function
[69601ebea4-58c75ed14b-0] function_inputs = args[2]
[69601ebea4-58c75ed14b-0] ~~~~^^^
[69601ebea4-58c75ed14b-0] IndexError: list index out of rangecontainer step-69601ebea4-58c75ed14b-0 has failed : [{“key”:“StartedAt”,“value”:“2024-04-08T10:05:17.815Z”,“type”:3}]
- Fire Rating Checker https://automate.speckle.dev/functions/2df6bdab50. Returns SUCCESS status in the UI, but it doesn’t seem to be doing anything.
Log Fire Rating Checker
[prepare] > 2024/04/11 13:46:43 Entrypoint initialization
[2df6bdab50-88efa86ae8-0] Required argument missing for command: ‘SpeckleAutomateDotnetExample’.
[2df6bdab50-88efa86ae8-0] Required argument missing for command: ‘SpeckleAutomateDotnetExample’.
[2df6bdab50-88efa86ae8-0]
[2df6bdab50-88efa86ae8-0] Description:
[2df6bdab50-88efa86ae8-0]
[2df6bdab50-88efa86ae8-0] Usage:
[2df6bdab50-88efa86ae8-0] SpeckleAutomateDotnetExample [command] [options]
[2df6bdab50-88efa86ae8-0]
[2df6bdab50-88efa86ae8-0] Arguments:
[2df6bdab50-88efa86ae8-0] The values of the project / model / version that triggered this function
[2df6bdab50-88efa86ae8-0] The values provided by the function user, matching the function input schema
[2df6bdab50-88efa86ae8-0] A token to talk to the Speckle server with
[2df6bdab50-88efa86ae8-0]
[2df6bdab50-88efa86ae8-0] Options:
[2df6bdab50-88efa86ae8-0] --version Show version information
[2df6bdab50-88efa86ae8-0] -?, -h, --help Show help and usage information
[2df6bdab50-88efa86ae8-0]
[2df6bdab50-88efa86ae8-0]
[2df6bdab50-88efa86ae8-0] Commands:
[2df6bdab50-88efa86ae8-0] generate-schema Generate JSON schema for the function inputs
[2df6bdab50-88efa86ae8-0]
[2df6bdab50-88efa86ae8-0]%!s()
-
Python template speckle_automate_python_example/main.py at 4b9d6b051d016ca84cb5971d63e4122ababcd1b7 · specklesystems/speckle_automate_python_example · GitHub. The linked code threw me off a bit in the beginning because the function returns the status FAILURE in the Automate UI, but the function did seem to run successfully. Is this intentional?
I replaced two of the automate_context functions:
attach_error_to_objects
>attach_warning_to_objects
mark_run_failed
>mark_run_success
This returns the status SUCCESS, which I think should happen when the function completes a run successfully, regardless of the function or model content.
- Great to see how Automate integrates directly with FE2! Just as the sidebar menu on the right, it would be nice if the left sidebar menu could also be made wider to improve readability of automation information (function names, output messages, etc.). I can imagine this can also be useful in any of the other sub menu’s (Scene Explorer, Discussions, etc.).