Comments (11)
Thanks @rosscdh ! We're up with 0.1.0-rc0 https://pypi.org/project/argo-workflows-dsl/0.1.0rc0/ 👍
from argo-python-dsl.
Hello @Omenien,
This is strange, the spec.arguments
shouldn't really be NoneType
... can you please check whether you can reproduce the issue in Python 3.6?
Cheers,
M
from argo-python-dsl.
It looks like it's happening for me with Python 3.6 as well.
python3.6 artifact-passing.py
Traceback (most recent call last):
File "artifact-passing.py", line 49, in <module>
workflow_instance.submit(argo_api, "argo", parameters={"test_param": "some_value"})
File ".../venv2/lib/python3.6/site-packages/argo/workflows/dsl/_workflow.py", line 416, in submit
self.spec.arguments.parameters = new_parameters
AttributeError: 'NoneType' object has no attribute 'parameters'
Here's what's installed into that Python 3.6 environment:
python3.6 -m pip freeze
argo-workflows==3.0.2
argo-workflows-dsl==0.1.0.dev0
cachetools==4.0.0
certifi==2019.11.28
chardet==3.0.4
google-auth==1.11.2
idna==2.9
inflection==0.3.1
kubernetes==10.0.1
mock==4.0.1
oauthlib==3.1.0
pyasn1==0.4.8
pyasn1-modules==0.2.8
python-dateutil==2.8.1
PyYAML==5.3
requests==2.23.0
requests-oauthlib==1.3.0
rsa==4.0
six==1.14.0
urllib3==1.25.8
websocket-client==0.57.0
and the specific version of Python 3.6:
Python 3.6.9 (default, Nov 7 2019, 10:44:02)
[GCC 8.3.0] on linux
from argo-python-dsl.
+1 same behaviour here.
(Pdb) dir(instance.spec.arguments)
['__bool__', '__class__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__']
(Pdb) dir(instance.spec.arguments.parameters)
*** AttributeError: 'NoneType' object has no attribute 'parameters'
from argo-python-dsl.
hacked it on _workflow.py:416
but it looks like attributes is not being incarnated as V1alpha1Arguments as on line 350 arguments: V1alpha1Arguments = props.get("arguments")
props in this case appears to be None.... thus arguments is none
if not self.spec.arguments:
self.spec.arguments = V1alpha1Arguments(artifacts=[], parameters={})
from argo-python-dsl.
@Omenien just submitted a PR for it, feel free to check it out and let me know :)
The problem here was (and I did not notice it initially, sorry about that), that the Workflow doesn't expect any parameters. You should have the following in the Workflow definition:
class ArtifactPassing(Workflow):
arguments = V1alpha1Arguments(parameters=[V1alpha1Parameter(name="test_param")])
...
I made some changes so that this case is checked for and an error is raised accordingly, therefore it is more informative for users.
from argo-python-dsl.
@rosscdh BTW, it's good to have you here, since I don't know how to contact you otherwise... I noticed that you created a package for this already: https://pypi.org/project/argo-workflows-dsl/ which is quite unfortunate for me as I am about to release 0.1 and I cannot use my standard release process for it.
Would you mind giving me ownership of that package so that I could plug it into my release pipeline along with https://pypi.org/project/argo-workflows/?
Cheers,
M
from argo-python-dsl.
Hi @CermakM absolutely! sorry I meant to raise it with you! More than happy to release!
from argo-python-dsl.
@CermakM I've deleted the PyPi project feel free to take ownership
from argo-python-dsl.
from argo-python-dsl.
Thanks for this good looking project! made working with the workflows allot simpler
from argo-python-dsl.
Related Issues (20)
- Host as part of Argo Labs HOT 10
- Development plan and contribution HOT 3
- Dynamic Template & Task generation
- how to use V1Volume, V1Toleration etc? HOT 3
- workflow.from_url is not taking `url` HOT 1
- Missing kind and other metadata HOT 3
- [Discussion] Dynamic task generation HOT 2
- AttributeError: 'dependencies' object has no attribute 'model' HOT 4
- new install from master - as require the full body posted on submit HOT 6
- Would you consider integration with the component format of Kubeflow Pipelines?
- how to set pod-metadata HOT 2
- how to use with_param decorator HOT 2
- submit failed, prompt "argo.workflows.client.rest.ApiException: (400)" HOT 6
- Nested DAGs HOT 1
- Functional API? HOT 3
- Argo Python SDK -> to Argo Python DSL
- Documentation comparing to Kubeflow Pipelines Python SDK
- cannot import name 'models' from 'argo.workflows' HOT 8
- Workflow metadata name parsed from class name prevents generated name from working HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from argo-python-dsl.