convert string to GCSPath object or create one
See original GitHub issueI want to convert my string "gs://some_bucket/some_dir"
into kfp.dsl.types.GCPPath
How do I do it?
Or probably I need to create a GCSPath Object with the above GCS path
Any ideas?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:12 (4 by maintainers)
Top Results From Across the Web
String to object in JS - javascript - Stack Overflow
Actually, the best solution is using JSON: Documentation. JSON.parse(text[, reviver]);. Examples: 1) var myobj = JSON.parse('{ "hello":"world" } ...
Read more >GcsPath (Apache Beam 2.13.0)
Creates a GcsPath from bucket and object components. ... Returns the object name associated with this GCS path, or an empty string if...
Read more >Detect multiple objects | Cloud Vision API - Google Cloud
The Vision API can detect and extract multiple objects in an image with Object ... If you're new to Google Cloud, create an...
Read more >How to convert string of properties into an object...
You can use the json() function to convert a string into a JSON. But you're going to need some quotes around the Properties....
Read more >org.apache.beam.sdk.util.gcsfs.GcsPath.getFileName java ...
Returns the object name associated with this GCS path, or an empty string if no object is specified. getBucket. Returns the bucket name...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I am also having this same problem on
kfp 1.8.3
. I’m using the dataproc components from the component store.Compiler:
Error:
Someone else mentioned that
.ignore_type()
works, but it appears that’s no longer the case.This is the fundamental question that needs answering, imo, in order to get folks to pass parameters to pipelines the way that the v2 pipelines expect them to be:
Otherwise, it seems an inconsistency was introduced in the type conversion of strings -> dsl types with the migration to v2. This pipeline code compiles with the v1 compiler.
I have a similar problem with the
GCPProjectID
type andkfp.v2.compiler
.I am trying to use this GCP Component to performe a BigQuery query. Sadly setting
type_check=False
in the compiler dosen’t help, and I don’t know how exactly I should apply theIgnore_type()
function.The Error I get is:
TypeError: Passing PipelineParam "project_id" with type "String" (as "Parameter") to component input "project_id" with type "GCPProjectID" (as "Artifact") is incompatible. Please fix the type of the component input.
I understand that this is not only a type problem, more a problem of kfp.v2 expecting not primary types to be Artifacts. But how can I provide the project_id as a Artifact in my pipeline definition?
This is my pipeline definition:
Compiler: