vertex-ai-samples icon indicating copy to clipboard operation
vertex-ai-samples copied to clipboard

Text classification evaluation

Open SamyuktaDR opened this issue 3 years ago • 6 comments

REQUIRED: Add a summary of your PR here, typically including why the change is needed and what was changed. Include any design alternatives for discussion purposes.


This notebook demonstrates training an AutoML text classification model. Using this model to create Vertex AI BatchPrediction job and generate evaluations on its results.


REQUIRED: Fill out the below checklists or remove if irrelevant

  1. If you are opening a PR for Official Notebooks under the notebooks/official folder, follow this mandatory checklist:
  • [x] Use the notebook template as a starting point.
  • [x] Follow the style and grammar rules outlined in the above notebook template.
  • [x] Verify the notebook runs successfully in Colab since the automated tests cannot guarantee this even when it passes.
  • [x] Passes all the required automated checks. You can locally test for formatting and linting with these instructions.
  • [ ] You have consulted with a tech writer to see if tech writer review is necessary. If so, the notebook has been reviewed by a tech writer, and they have approved it.
  • [x] This notebook has been added to the CODEOWNERS file under the Official Notebooks section, pointing to the author or the author's team.
  • [x] The Jupyter notebook cleans up any artifacts it has created (datasets, ML models, endpoints, etc) so as not to eat up unnecessary resources.

  1. If you are opening a PR for Community Notebooks under the notebooks/community folder:
  • [ ] This notebook has been added to the CODEOWNERS file under the Community Notebooks section, pointing to the author or the author's team.
  • [ ] Passes all the required formatting and linting checks. You can locally test with these instructions.

  1. If you are opening a PR for Community Content under the community-content folder:
  • [ ] Make sure your main Content Directory Name is descriptive, informative, and includes some of the key products and attributes of your content, so that it is differentiable from other content
  • [ ] The main content directory has been added to the CODEOWNERS file under the Community Content section, pointing to the author or the author's team.
  • [ ] Passes all the required formatting and linting checks. You can locally test with these instructions.

SamyuktaDR avatar Sep 15 '22 12:09 SamyuktaDR

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Add a title and PR description describing why this PR exists and what was changed.

ivanmkc avatar Sep 21 '22 18:09 ivanmkc

Missing PR summary.

ivanmkc avatar Sep 22 '22 19:09 ivanmkc

PR Summary : This notebook demonstrates training an AutoML text classification model. Using this model to create Vertex AI BatchPrediction job and generate evaluations on its results.

SamyuktaDR avatar Sep 26 '22 15:09 SamyuktaDR

Please update the links at the beginning. They are pointing to the wrong file!

soheilazangeneh avatar Sep 28 '22 21:09 soheilazangeneh

RuntimeError Traceback (most recent call last) Step #5: Step #4: Cell In [40], line 8 Step #5: Step #4: 1 evaluation_job = aip.PipelineJob( Step #5: Step #4: 2 display_name=PIPELINE_DISPLAY_NAME, Step #5: Step #4: 3 template_path="automl_text_classification_evaluation.json", Step #5: Step #4: 4 parameter_values=parameters, Step #5: Step #4: 5 enable_caching=False, Step #5: Step #4: 6 ) Step #5: Step #4: ----> 8 evaluation_job.run(service_account=SERVICE_ACCOUNT) Step #5: Step #4: Step #5: Step #4: File /workspace/workspace/env/lib/python3.9/site-packages/google/cloud/aiplatform/base.py:807, in optional_sync..optional_run_in_thread..wrapper(*args, **kwargs) Step #5: Step #4: 805 if self: Step #5: Step #4: 806 VertexAiResourceNounWithFutureManager.wait(self) Step #5: Step #4: --> 807 return method(*args, **kwargs) Step #5: Step #4: 809 # callbacks to call within the Future (in same Thread) Step #5: Step #4: 810 internal_callbacks = [] Step #5: Step #4: Step #5: Step #4: File /workspace/workspace/env/lib/python3.9/site-packages/google/cloud/aiplatform/pipeline_jobs.py:316, in PipelineJob.run(self, service_account, network, sync, create_request_timeout) Step #5: Step #4: 293 """Run this configured PipelineJob and monitor the job until completion. Step #5: Step #4: 294 Step #5: Step #4: 295 Args: Step #5: Step #4: (...) Step #5: Step #4: 308 Optional. The timeout for the create request in seconds. Step #5: Step #4: 309 """ Step #5: Step #4: 310 self.submit( Step #5: Step #4: 311 service_account=service_account, Step #5: Step #4: 312 network=network, Step #5: Step #4: 313 create_request_timeout=create_request_timeout, Step #5: Step #4: 314 ) Step #5: Step #4: --> 316 self._block_until_complete() Step #5: Step #4: Step #5: Step #4: File /workspace/workspace/env/lib/python3.9/site-packages/google/cloud/aiplatform/pipeline_jobs.py:461, in PipelineJob._block_until_complete(self) Step #5: Step #4: 458 # Error is only populated when the job state is Step #5: Step #4: 459 # JOB_STATE_FAILED or JOB_STATE_CANCELLED. Step #5: Step #4: 460 if self._gca_resource.state in _PIPELINE_ERROR_STATES: Step #5: Step #4: --> 461 raise RuntimeError("Job failed with:\n%s" % self._gca_resource.error) Step #5: Step #4: 462 else: Step #5: Step #4: 463 _LOGGER.log_action_completed_against_resource("run", "completed", self) Step #5: Step #4: Step #5: Step #4: RuntimeError: Job failed with: Step #5: Step #4: code: 9 Step #5: Step #4: message: "The DAG failed because some tasks failed. The failed tasks are: [model-evaluation-import].; Job (project_id = python-docs-samples-tests, job_id = 6205767871981682688) is failed due to the above error.; Failed to handle the job: {project_number = 1012616486416, job_id = 6205767871981682688}"

andrewferlitsch avatar Sep 30 '22 00:09 andrewferlitsch

Latest PR updates : Made the changes suggested in review. PR fix: bad links.

SamyuktaDR avatar Sep 30 '22 12:09 SamyuktaDR