Giter Club home page Giter Club logo

Comments (2)

gomrinal avatar gomrinal commented on September 26, 2024

cp = kfp.components.load_component_from_url("https://storage.cloud.google.com/<bucket name here>/mycomponent.yaml")

from kfp_sdk_components.

gomrinal avatar gomrinal commented on September 26, 2024

Error:
ParserError Traceback (most recent call last)
/var/tmp/ipykernel_18640/3316611576.py in
----> 1 cp = kfp.components.load_component_from_url("https://storage.cloud.google.com/bucket name/mycomponent.yaml")

/opt/conda/lib/python3.7/site-packages/kfp/components/_components.py in load_component_from_url(url, auth)
82 Once called with the required arguments, the factory constructs a pipeline task instance (ContainerOp).
83 """
---> 84 component_spec = _load_component_spec_from_url(url, auth)
85 url = _fix_component_uri(url)
86 component_ref = ComponentReference(url=url)

/opt/conda/lib/python3.7/site-packages/kfp/components/_components.py in _load_component_spec_from_url(url, auth)
166 resp = requests.get(url, auth=auth)
167 resp.raise_for_status()
--> 168 return _load_component_spec_from_yaml_or_zip_bytes(resp.content)
169
170

/opt/conda/lib/python3.7/site-packages/kfp/components/_components.py in _load_component_spec_from_yaml_or_zip_bytes(data)
185 with zipfile.ZipFile(stream) as zip_obj:
186 data = zip_obj.read(_COMPONENT_FILE_NAME_IN_ARCHIVE)
--> 187 return _load_component_spec_from_component_text(data)
188
189

/opt/conda/lib/python3.7/site-packages/kfp/components/_components.py in _load_component_spec_from_component_text(text)
189
190 def _load_component_spec_from_component_text(text) -> ComponentSpec:
--> 191 component_dict = load_yaml(text)
192 component_spec = ComponentSpec.from_dict(component_dict)
193

/opt/conda/lib/python3.7/site-packages/kfp/components/_yaml_utils.py in load_yaml(stream)
35 return yaml.load(stream, OrderedLoader)
36
---> 37 return ordered_load(stream)
38
39

/opt/conda/lib/python3.7/site-packages/kfp/components/_yaml_utils.py in ordered_load(stream, Loader, object_pairs_hook)
33 OrderedLoader.add_constructor(
34 yaml.resolver.BaseResolver.DEFAULT_MAPPING_TAG, construct_mapping)
---> 35 return yaml.load(stream, OrderedLoader)
36
37 return ordered_load(stream)

/opt/conda/lib/python3.7/site-packages/yaml/init.py in load(stream, Loader)
112 loader = Loader(stream)
113 try:
--> 114 return loader.get_single_data()
115 finally:
116 loader.dispose()

/opt/conda/lib/python3.7/site-packages/yaml/constructor.py in get_single_data(self)
47 def get_single_data(self):
48 # Ensure that the stream contains a single document and construct it.
---> 49 node = self.get_single_node()
50 if node is not None:
51 return self.construct_document(node)

/opt/conda/lib/python3.7/site-packages/yaml/composer.py in get_single_node(self)
37
38 # Ensure that the stream contains no more documents.
---> 39 if not self.check_event(StreamEndEvent):
40 event = self.get_event()
41 raise ComposerError("expected a single document in the stream",

/opt/conda/lib/python3.7/site-packages/yaml/parser.py in check_event(self, *choices)
96 if self.current_event is None:
97 if self.state:
---> 98 self.current_event = self.state()
99 if self.current_event is not None:
100 if not choices:

/opt/conda/lib/python3.7/site-packages/yaml/parser.py in parse_document_start(self)
172 "expected '', but found %r"
173 % self.peek_token().id,
--> 174 self.peek_token().start_mark)
175 token = self.get_token()
176 end_mark = token.end_mark

ParserError: expected '', but found ''
in "", line 2, column 1:
/*# sourceURL=/_/mss/boq-identit ...
^

from kfp_sdk_components.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.