google's notebook on vertex ai throwing following error: type name google.VertexModel is different from expected: Model - google-cloud-vertex-ai

I got this error, when compiling my pipeline:
type name google.VertexModel is different from expected: Model
when running the following notebook by google: automl_tabular_classification_beans
I suppose that kubeflow v2 is not able to handle (yet) google.vertexmodel as type for component input. However, I've been browsing a bit and did not find any good clue, or refs (kfp documentation for v2 is not up to date..) to solve this issue. Hopefully someone here can give me a good pointer? I look forward to all of your ideas.
Cheers

Google.Vertex is defined here:
https://github.com/kubeflow/pipelines/blob/286a49547cce763c502592c822296aa60f50b3e8/components/google-cloud/google_cloud_pipeline_components/types/artifact_types.py#L20
Here is an example on how to define it:
https://github.com/kubeflow/pipelines/blob/286a49547cce763c502592c822296aa60f50b3e8/components/google-cloud/tests/types/artifact_types_test.py#L22
For example,
from google_cloud_pipeline_components.types import artifact_types
model = artifact_types.VertexModel(uri='YOUR_MODEL_URI_STRING')
Can you try specifying your model using the syntax above and let us know if this works for your code?

This was a breaking change with release 0.1.9. Here there are some recommendation:
Pin your release to 0.1.7 and continue to use the Model type.
Use 0.1.9 and switch the output from Output[Model] to Output[Artifact].
Try 0.2.0 release, documentation here.
Hope these suggestions work!

Related

Witir browser.link(id: 'identifier').wait_until_present 6.17.0 Usage Issue

The Watir gem has updated one of their browser methods, wait_until_present and it's confusing me.
https://www.rubydoc.info/gems/watir/Watir/Waitable#wait_until_present-instance_method
...says that I should use it like this:
browser.link(id: 'identifier').wait_until_present
However I'm getting this error instead:
WARN Watir [DEPRECATION] ["wait_until_present"] Watir::Anchor#wait_until_present is deprecated. Use Watir::Anchor#wait_until(&:present?) instead.
It's also reported at the bottom here however that English is unclear, as is the solution above.
The reported gem similar methods are as follows:
wait_for_enabled
wait_for_exists
wait_for_present
wait_for_writable
wait_until
wait_until_present
wait_while
wait_while_present
So I don't know which one to use, before the fact I can't get it to work.
Questions:
Which one should I use?
How is it properly used? There's a link on a form that I need to click before a field is viewable.
What does this mean: Use Watir::Anchor#wait_until(&:present?)
Cheers
Found it in other documentation:
browser.text_field(name: "new_user_first_name").wait_until(&:present?).click

property overrideSelector does not exist on type Store<state> ngrx/store#8.2

I am adding a test that needs to return a different mock value for a selector. So I found a nice way of doing it using overrideSelecor as mentioned here https://ngrx.io/guide/store/testing. But when adding mockstore.overrideSelector, got this error "property overrideSelector does not exist on type Store". Has anyone fixed this before?
In Angular 7 the mockStore does not have that function indeed. Migrating to Angular 8 will fix your issue.
This is most likely just typings issue. If you use provideMockStore it in fact creates an instance of MockStore that is provided as Store instance on DI so it won't break you apps functionality.
So in your tests you should use it like this:
let store: MockStore<State>;
...
store = TestBed.get<Store<State>>(Store);
...
store.overrideSelector(...);

Dynamic Path is not working in require react native

Below is the code
require("index/components/" + name); //fails
require("index/components/myComponent"); //work fine
any good solution ?
Dynamic paths in require are not currently supported.
Please check this answer
This is covered in the documentation under the section "Static Resources":
The only allowed way to refer to an image in the bundle is to literally write require('name-of-the-asset') in the source.
You can use a switch statement to implement this.
I'm not sure about it but you can try to write it in ES6
require(`index/components/${name}`);

How do I call the evernote struct object to report all notes inside a notebook?

I am working through the ruby evernote-thrift API and sandbox.
I am experiencing some issues interpreting the docs; I am trying to retrieve the subject line from all the notes inside a particular notebook.
To get the name of the notebook I call
notebooks = noteStore.listNotebooks(authToken) and then run .each on notebooks. According to the docs there is a struct object called noteList but I can’t figure out how to use it.
this is the link to the docs area I am trying to leverage http://www.rubydoc.info/gems/evernote-thrift/Evernote/EDAM/NoteStore/NoteList#struct_fields-instance_method
my attempt, is as follows, but its not returning anything. unfortunately im not familiar with structs at all.
notebooks = noteStore.listNotebooks(authToken)
notebooks.each do |notebook|
next if notebook.name != 'First Notebook'
notes = notebook.noteList
noteList.each do |note|
puts note
end
end
i am getting a no method error... which makese sense because its a struct I just dont know how to leverage it...
undefined method `noteList' for <Evernote::EDAM::Type::Notebook:0x007fb2041683f8> (NoMethodError)
The generated docs for our Ruby SDK are confusing (sorry!), but I find the general docs to be much clearer: https://dev.evernote.com/doc/reference/.
As you can see in https://dev.evernote.com/doc/reference/Types.html#Struct_Notebook, the Notebook object does not have an attribute called noteList. There is a struct called NoteList, but that was what the removed NoteStore.findNotes returned.
The procedure for getting the titles/subjects of the notes in a notebook is to get the Notebook (which you have done), then pass the notebook's guid into NoteStore.findNotesMetadata (https://dev.evernote.com/doc/reference/NoteStore.html#Fn_NoteStore_findNotesMetadata). This returns a NotesMetadataList which has a notes attribute which is a list of NoteMetadata. This struct has metadata like title and GUID but not the body. If you want the full information, you would pass the GUID into NoteStore.getNote (https://dev.evernote.com/doc/reference/NoteStore.html#Fn_NoteStore_getNote).
That API is one of the least Ruby things I've ever seen. You have my condolences for trying to trudge through that :)
From the API docs, all I'm seeing that hangs off of that Evernote::EDAM::Type::Notebook class are #struct_fields and #validate, as far as instance methods go. Perhaps that struct_fields has what you're looking for?
If that doesn't lead you anywhere, I'd suggest doing using something like Pry to help you troubleshoot the error. I'd put a binding.pry statement on the second line and then explore the notebooks objects from there.

LevelHelper and Box2D Collions: How to get "tag"?

I have successfully made a very simple LevelHelper/Box2D/Cocos2D project.
I am now trying to register a collision as described in the documentation here.
I used the example code as follows:
[lh registerBeginOrEndColisionCallbackBetweenTagA:COIN
andTagB:MARIO
idListener:self
selListener:#selector(beginEndCollisionBetweenMarioAndCoin:)];
My Question is this: how do I get the tag? Am I correct in setting it in LevelHelper in the "General Properties" pane? (below)
In LevelHelper's Custom Properties window the "Tag Value" for "CHARACTER_TAG" is 1, but if I try and put this into the above code instead of "MARIO" XCode gets upset because it "cannot initialize a parameter of type 'enum LevelHelper_TAG' with an rvalue of type 'int' " (fair enough).
Thank you!
I've figured it out!
After setting the tag to CHARACTER_TAG in LevelHelper, I needed to regenerate my code with File\Generate Code\Cocos2D with Box2D. Then I could simply type CHARACTER_TAG in place of MARIO as seen in my question!
I hope this helps someone!

Resources