C2W3: Exercise 12

Hi folks,
I’m stuck at the first part of the Exercise 12, assigning ‘artifact ids’.
When I looked at the discussion here, I seeartifact_id = artifact.id but I found such method nowhere in the TensorFlow document.

The closest thing I found was this which cites store.get_artifact_types_by_id as a method to store artifact ids but when I run the method, I get TypeError: 'Artifact' object is not iterable.

My questions are:

  1. where did anyone find the artifact.id function
  2. why store.get_artifact_types_by_iddoes not work but artifact_id = artifact.id works.

Thank you!

get_parent_artifacts takes artifacts that are fetched via MetadataStore.get_artifacts_by_type. This method returns a list of Artifact instances, each of which has id field.

The artifact id has to be provided in order to use MetadataStore.get_artifacts_by_id
The documentation is very well done IMO. Read python typing to understand the docs better.

Hi Balaji,
I’ve resolved the situation and submitted the assignment (thank you for your help!)
Now I’m getting zero for my assignment…even though I did not get any error when I run on my jupyternotebook. Could you take a look at it?

The error message says

"There was a problem compiling the code from your notebook. Details:
name 'get_parent_artifacts' is not defined"

If that’s the case, why I’m getting 0 for everything before? Shouldn’t I be passing at least all the exercises before the last one?

Thank you,
Shohei

One of 2 things has happened:

  1. The assignment notebook file is corrupt. Please check notebook metadata and refresh the workspace.
  2. If that doesn’t work, it’s possible that there might be a problem with the grading infrastructure. Click my name and message your notebook and expanded screenshot of grader feedback as attachments. Will notify the staff if I can’t find anything odd.

I’d think even a short pointer would be helpful. It was a reach for me to make the connection between the artifact and its id and it’s a minor comment update. I suppose though we have the dual relationship of this both being a class and being paid, so it’s a tossup on that front.