bulky-fireman-68939
12/03/2024, 5:14 PMargo-workflows create --only-json
for metaflow>=2.12.13
I have a flow for which I can generate the template OK with metaflow==2.12.12
, but when I upgrade to metaflow==2.12.13
I get: TypeError: Object of type V1Container is not JSON serializable
I need to set --no-enable-heartbeat-daemon --no-enable-error-msg-capture
for the template to generate again.
Is this a bug, or a misconfiguration in my flow? 🤔dry-beach-38304
12/03/2024, 6:21 PMdry-beach-38304
12/03/2024, 6:21 PMbulky-fireman-68939
12/04/2024, 8:51 AM$> pants run projects/flows/flow_template/main.py -- --no-pylint argo-workflows create --only-json
Metaflow 2.12.33 executing MyFlowName for user:leonor
Project: examples, Branch: user.leonor
Validating your flow...
The graph looks good!
Deploying examples.user.leonor.myflowname to Argo Workflows...
It seems this is the first time you are deploying examples.user.leonor.myflowname to Argo Workflows.
A new production token generated.
The namespace of this production flow is
production:mfprj-q7ashbgrztr3xcpe-0-gvzt
To analyze results of this production flow add this line in your notebooks:
namespace("production:mfprj-q7ashbgrztr3xcpe-0-gvzt")
If you want to authorize other people to deploy new versions of this flow to Argo Workflows, they need to call
argo-workflows create --authorize mfprj-q7ashbgrztr3xcpe-0-gvzt
when deploying this flow to Argo Workflows for the first time.
See "Organizing Results" at <https://docs.metaflow.org/> for more information about production tokens.
Internal error
Traceback (most recent call last):
File "/Users/leonor/.cache/pants/named_caches/pex_root/venvs/37acb20989dc39854e736319f4d61b6d9f9808c5/cc95e65237c9965687b2be41acff8e202ebd07c0/lib/python3.10/site-packages/metaflow/cli.py", line 1167, in main
start(auto_envvar_prefix="METAFLOW", obj=state)
File "/Users/leonor/.cache/pants/named_caches/pex_root/venvs/37acb20989dc39854e736319f4d61b6d9f9808c5/cc95e65237c9965687b2be41acff8e202ebd07c0/lib/python3.10/site-packages/metaflow/tracing/__init__.py", line 27, in wrapper_func
return func(args, kwargs)
File "/Users/leonor/.cache/pants/named_caches/pex_root/venvs/37acb20989dc39854e736319f4d61b6d9f9808c5/cc95e65237c9965687b2be41acff8e202ebd07c0/lib/python3.10/site-packages/metaflow/_vendor/click/core.py", line 829, in __call__
return self.main(args, kwargs)
File "/Users/leonor/.cache/pants/named_caches/pex_root/venvs/37acb20989dc39854e736319f4d61b6d9f9808c5/cc95e65237c9965687b2be41acff8e202ebd07c0/lib/python3.10/site-packages/metaflow/_vendor/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/Users/leonor/.cache/pants/named_caches/pex_root/venvs/37acb20989dc39854e736319f4d61b6d9f9808c5/cc95e65237c9965687b2be41acff8e202ebd07c0/lib/python3.10/site-packages/metaflow/_vendor/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/leonor/.cache/pants/named_caches/pex_root/venvs/37acb20989dc39854e736319f4d61b6d9f9808c5/cc95e65237c9965687b2be41acff8e202ebd07c0/lib/python3.10/site-packages/metaflow/_vendor/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/leonor/.cache/pants/named_caches/pex_root/venvs/37acb20989dc39854e736319f4d61b6d9f9808c5/cc95e65237c9965687b2be41acff8e202ebd07c0/lib/python3.10/site-packages/metaflow/_vendor/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, ctx.params)
File "/Users/leonor/.cache/pants/named_caches/pex_root/venvs/37acb20989dc39854e736319f4d61b6d9f9808c5/cc95e65237c9965687b2be41acff8e202ebd07c0/lib/python3.10/site-packages/metaflow/_vendor/click/core.py", line 610, in invoke
return callback(args, kwargs)
File "/Users/leonor/.cache/pants/named_caches/pex_root/venvs/37acb20989dc39854e736319f4d61b6d9f9808c5/cc95e65237c9965687b2be41acff8e202ebd07c0/lib/python3.10/site-packages/metaflow/_vendor/click/decorators.py", line 33, in new_func
return f(get_current_context().obj, args, kwargs)
File "/Users/leonor/.cache/pants/named_caches/pex_root/venvs/37acb20989dc39854e736319f4d61b6d9f9808c5/cc95e65237c9965687b2be41acff8e202ebd07c0/lib/python3.10/site-packages/metaflow/plugins/argo/argo_workflows_cli.py", line 277, in create
obj.echo_always(str(flow), err=False, no_bold=True)
File "/Users/leonor/.cache/pants/named_caches/pex_root/venvs/37acb20989dc39854e736319f4d61b6d9f9808c5/cc95e65237c9965687b2be41acff8e202ebd07c0/lib/python3.10/site-packages/metaflow/plugins/argo/argo_workflows.py", line 178, in __str__
return str(self._workflow_template)
File "/Users/leonor/.cache/pants/named_caches/pex_root/venvs/37acb20989dc39854e736319f4d61b6d9f9808c5/cc95e65237c9965687b2be41acff8e202ebd07c0/lib/python3.10/site-packages/metaflow/plugins/argo/argo_workflows.py", line 3096, in __str__
return json.dumps(self.payload, indent=4)
File "/opt/homebrew/Cellar/python@3.10/3.10.15/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/__init__.py", line 238, in dumps
kw).encode(obj)
File "/opt/homebrew/Cellar/python@3.10/3.10.15/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/encoder.py", line 201, in encode
chunks = list(chunks)
File "/opt/homebrew/Cellar/python@3.10/3.10.15/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/encoder.py", line 431, in _iterencode
yield from _iterencode_dict(o, _current_indent_level)
File "/opt/homebrew/Cellar/python@3.10/3.10.15/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/encoder.py", line 405, in _iterencode_dict
yield from chunks
File "/opt/homebrew/Cellar/python@3.10/3.10.15/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/encoder.py", line 405, in _iterencode_dict
yield from chunks
File "/opt/homebrew/Cellar/python@3.10/3.10.15/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/encoder.py", line 325, in _iterencode_list
yield from chunks
File "/opt/homebrew/Cellar/python@3.10/3.10.15/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/encoder.py", line 405, in _iterencode_dict
yield from chunks
File "/opt/homebrew/Cellar/python@3.10/3.10.15/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/encoder.py", line 438, in _iterencode
o = _default(o)
File "/opt/homebrew/Cellar/python@3.10/3.10.15/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/encoder.py", line 179, in default
raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type V1Container is not JSON serializable
dry-beach-38304
12/04/2024, 9:15 AMbulky-fireman-68939
12/04/2024, 10:26 AM2.12.33
) and I get the same errordry-beach-38304
12/04/2024, 10:41 AMthankful-ambulance-42457
12/04/2024, 10:43 AMdry-beach-38304
12/04/2024, 10:45 AMbulky-afternoon-92433
12/04/2024, 4:28 PM--only-json
, as it only outputs the workflow template json. This excludes
• cronworkflow [1730]
• argo sensors [1940]bulky-fireman-68939
12/04/2024, 4:46 PMbulky-afternoon-92433
12/05/2024, 10:50 AMbulky-fireman-68939
12/05/2024, 10:55 AM